@powerhousedao/design-system 6.2.3-dev.9 → 6.2.3

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 (372) hide show
  1. package/dist/{Removed-CO_5C1ce.js → Removed-OP4eTrAN.js} +1 -1
  2. package/dist/{Removed-CO_5C1ce.js.map → Removed-OP4eTrAN.js.map} +1 -1
  3. package/dist/{Tabler-FjvVqX5a.js → Tabler-rjLxlzUV.js} +1 -1
  4. package/dist/{Tabler-FjvVqX5a.js.map → Tabler-rjLxlzUV.js.map} +1 -1
  5. package/dist/button-BYcXvZXr.d.ts +13 -0
  6. package/dist/button-BYcXvZXr.d.ts.map +1 -0
  7. package/dist/{character-counter-BWoglM2P.d.ts → character-counter-BZmZZCHN.d.ts} +2 -1
  8. package/dist/character-counter-BZmZZCHN.d.ts.map +1 -0
  9. package/dist/{checkbox-CGBtXQnI.d.ts → checkbox-BmTXBcCE.d.ts} +4 -4
  10. package/dist/checkbox-BmTXBcCE.d.ts.map +1 -0
  11. package/dist/{checkbox-base-CZo-4eL0.d.ts → checkbox-base-Bm0GPWgm.d.ts} +2 -2
  12. package/dist/checkbox-base-Bm0GPWgm.d.ts.map +1 -0
  13. package/dist/{command-tFzjgzge.d.ts → command-DHHTsHfH.d.ts} +5 -5
  14. package/dist/command-DHHTsHfH.d.ts.map +1 -0
  15. package/dist/connect/components/toast/toast.d.ts +8 -10
  16. package/dist/connect/components/toast/toast.d.ts.map +1 -1
  17. package/dist/connect/components/toast/toast.js +4 -4
  18. package/dist/connect/components/toast/toast.js.map +1 -1
  19. package/dist/connect/index.d.ts +376 -355
  20. package/dist/connect/index.d.ts.map +1 -1
  21. package/dist/connect/index.js +779 -151
  22. package/dist/connect/index.js.map +1 -1
  23. package/dist/{content-BHWIqmio.d.ts → content-BMXLcwWY.d.ts} +3 -3
  24. package/dist/content-BMXLcwWY.d.ts.map +1 -0
  25. package/dist/{enum-field-CwZVs3Ux.d.ts → enum-field-qgV9wsyI.d.ts} +4 -4
  26. package/dist/enum-field-qgV9wsyI.d.ts.map +1 -0
  27. package/dist/{form-CKRKn0TQ.d.ts → form-Brj5AQNr.d.ts} +3 -4
  28. package/dist/form-Brj5AQNr.d.ts.map +1 -0
  29. package/dist/{form-description-CYkcMEzm.d.ts → form-description-DJrDJzJi.d.ts} +2 -1
  30. package/dist/form-description-DJrDJzJi.d.ts.map +1 -0
  31. package/dist/{form-group-C8kL6pdZ.d.ts → form-group-Ckd28lpW.d.ts} +2 -1
  32. package/dist/form-group-Ckd28lpW.d.ts.map +1 -0
  33. package/dist/{form-label-b6nQi0XO.d.ts → form-label-C8ghd_lR.d.ts} +2 -1
  34. package/dist/form-label-C8ghd_lR.d.ts.map +1 -0
  35. package/dist/{form-message-Dq72nBXz.d.ts → form-message-CnKUkvlj.d.ts} +2 -1
  36. package/dist/form-message-CnKUkvlj.d.ts.map +1 -0
  37. package/dist/form-server-error-message-D2tFtDZ0.d.ts +6 -0
  38. package/dist/form-server-error-message-D2tFtDZ0.d.ts.map +1 -0
  39. package/dist/{icon-C4QOpsdI.js → icon-01W_S_9A.js} +3 -3
  40. package/dist/{icon-C4QOpsdI.js.map → icon-01W_S_9A.js.map} +1 -1
  41. package/dist/{id-autocomplete-C-hwriS5.d.ts → id-autocomplete-CHvGhffo.d.ts} +3 -3
  42. package/dist/id-autocomplete-CHvGhffo.d.ts.map +1 -0
  43. package/dist/{id-autocomplete-input-container-DFEyPh5p.d.ts → id-autocomplete-input-container-BqRQGpcs.d.ts} +3 -3
  44. package/dist/id-autocomplete-input-container-BqRQGpcs.d.ts.map +1 -0
  45. package/dist/{id-autocomplete-list-EzLpF23C.d.ts → id-autocomplete-list-ChQsiJDg.d.ts} +3 -3
  46. package/dist/id-autocomplete-list-ChQsiJDg.d.ts.map +1 -0
  47. package/dist/{id-autocomplete-list-option-CB5B07Hi.d.ts → id-autocomplete-list-option-MsqKeLXD.d.ts} +3 -3
  48. package/dist/id-autocomplete-list-option-MsqKeLXD.d.ts.map +1 -0
  49. package/dist/{index--hDSfvJT.d.ts → index-C05uhexJ.d.ts} +14 -45
  50. package/dist/index-C05uhexJ.d.ts.map +1 -0
  51. package/dist/index-CpSqVZKp.d.ts +2 -0
  52. package/dist/index-D6Zk5OLV.d.ts +4 -0
  53. package/dist/index-DSknqh8u.d.ts +30 -0
  54. package/dist/index-DU-WgcAh.d.ts +4 -0
  55. package/dist/index-DaRBrjZI.d.ts +3 -0
  56. package/dist/index.d.ts +4 -3
  57. package/dist/index.js +2 -2
  58. package/dist/{input-BpEQjaWV.d.ts → input-WDvjJFqf.d.ts} +2 -2
  59. package/dist/input-WDvjJFqf.d.ts.map +1 -0
  60. package/dist/json-viewer-Kg0IBIt-.d.ts +7 -0
  61. package/dist/json-viewer-Kg0IBIt-.d.ts.map +1 -0
  62. package/dist/{message-list-C4mPpBBa.d.ts → message-list-D8d2ltLd.d.ts} +3 -3
  63. package/dist/message-list-D8d2ltLd.d.ts.map +1 -0
  64. package/dist/{popover-XSBOuSih.d.ts → popover-TvQxa0RU.d.ts} +2 -2
  65. package/dist/popover-TvQxa0RU.d.ts.map +1 -0
  66. package/dist/{radio-eL0Oy86J.d.ts → radio-CTS4WsNy.d.ts} +2 -2
  67. package/dist/radio-CTS4WsNy.d.ts.map +1 -0
  68. package/dist/{radio-group-Bkli6nUz.d.ts → radio-group-CROIwgYz.d.ts} +2 -2
  69. package/dist/radio-group-CROIwgYz.d.ts.map +1 -0
  70. package/dist/{radio-group-field-wlqeiLN3.d.ts → radio-group-field-CjX_Zt0C.d.ts} +5 -6
  71. package/dist/radio-group-field-CjX_Zt0C.d.ts.map +1 -0
  72. package/dist/{search-autocomplete-BJJkrZ1i.d.ts → search-autocomplete-COvFRZIb.d.ts} +3 -3
  73. package/dist/search-autocomplete-COvFRZIb.d.ts.map +1 -0
  74. package/dist/{select-field-C97QIhUL.d.ts → select-field-BuXjM43L.d.ts} +5 -5
  75. package/dist/select-field-BuXjM43L.d.ts.map +1 -0
  76. package/dist/{selected-content-CGsK5PR4.d.ts → selected-content-C49jmTLU.d.ts} +3 -3
  77. package/dist/selected-content-C49jmTLU.d.ts.map +1 -0
  78. package/dist/{sidebar-DOoE4krt.d.ts → sidebar-4juLhREX.d.ts} +3 -3
  79. package/dist/sidebar-4juLhREX.d.ts.map +1 -0
  80. package/dist/{sidebar-provider-C2eyz9TL.d.ts → sidebar-provider-CMG6WQWo.d.ts} +4 -8
  81. package/dist/sidebar-provider-CMG6WQWo.d.ts.map +1 -0
  82. package/dist/splitted-input-diff-DBkgDh9Q.d.ts +11 -0
  83. package/dist/splitted-input-diff-DBkgDh9Q.d.ts.map +1 -0
  84. package/dist/{src-CVV6HzQZ.js → src-CrUksCLW.js} +17 -14
  85. package/dist/{src-CVV6HzQZ.js.map → src-CrUksCLW.js.map} +1 -1
  86. package/dist/text-field-3j4fLJ-7.d.ts +9 -0
  87. package/dist/text-field-3j4fLJ-7.d.ts.map +1 -0
  88. package/dist/text-input-diff-B7iFyzTK.d.ts +12 -0
  89. package/dist/text-input-diff-B7iFyzTK.d.ts.map +1 -0
  90. package/dist/{text-input-8zXIWHLi.d.ts → text-input-tkqggbWx.d.ts} +5 -6
  91. package/dist/text-input-tkqggbWx.d.ts.map +1 -0
  92. package/dist/{tooltip-BxS9HpML.d.ts → tooltip-B4uQJPUm.d.ts} +3 -4
  93. package/dist/tooltip-B4uQJPUm.d.ts.map +1 -0
  94. package/dist/{types-Bsn62tJB.d.ts → types-BNTIrhb5.d.ts} +2 -1
  95. package/dist/types-BNTIrhb5.d.ts.map +1 -0
  96. package/dist/{types-BTq-St7H.d.ts → types-CpFPFB1a.d.ts} +2 -1
  97. package/dist/types-CpFPFB1a.d.ts.map +1 -0
  98. package/dist/{types-C04Q_Fan.d.ts → types-D4CirgNk.d.ts} +2 -2
  99. package/dist/types-D4CirgNk.d.ts.map +1 -0
  100. package/dist/{types-CNbvfWjh.d.ts → types-DDSmPhHp.d.ts} +3 -3
  101. package/dist/types-DDSmPhHp.d.ts.map +1 -0
  102. package/dist/ui/components/button/button.d.ts +3 -2
  103. package/dist/ui/components/button/button.js +1 -1
  104. package/dist/ui/components/button/button.js.map +1 -1
  105. package/dist/ui/components/character-counter/character-counter.d.ts +3 -2
  106. package/dist/ui/components/character-counter/character-counter.js.map +1 -1
  107. package/dist/ui/components/checkbox/checkbox-base.d.ts +3 -2
  108. package/dist/ui/components/checkbox/checkbox-base.js +1 -1
  109. package/dist/ui/components/checkbox/checkbox-base.js.map +1 -1
  110. package/dist/ui/components/checkbox/checkbox.d.ts +3 -2
  111. package/dist/ui/components/checkbox/checkbox.js +1 -1
  112. package/dist/ui/components/checkbox/checkbox.js.map +1 -1
  113. package/dist/ui/components/command/command.d.ts +3 -2
  114. package/dist/ui/components/command/command.js +8 -8
  115. package/dist/ui/components/command/command.js.map +1 -1
  116. package/dist/ui/components/enum-field/enum-field.d.ts +3 -2
  117. package/dist/ui/components/enum-field/enum-field.js +1 -1
  118. package/dist/ui/components/enum-field/enum-field.js.map +1 -1
  119. package/dist/ui/components/enum-field/types.d.ts +3 -2
  120. package/dist/ui/components/form/form.d.ts +3 -2
  121. package/dist/ui/components/form/form.js +1 -1
  122. package/dist/ui/components/form/form.js.map +1 -1
  123. package/dist/ui/components/form/utils.d.ts +4 -4
  124. package/dist/ui/components/form/utils.d.ts.map +1 -1
  125. package/dist/ui/components/form/utils.js.map +1 -1
  126. package/dist/ui/components/form-description/form-description.d.ts +3 -2
  127. package/dist/ui/components/form-description/form-description.js.map +1 -1
  128. package/dist/ui/components/form-group/form-group.d.ts +3 -2
  129. package/dist/ui/components/form-group/form-group.js.map +1 -1
  130. package/dist/ui/components/form-label/form-label.d.ts +3 -2
  131. package/dist/ui/components/form-label/form-label.js +3 -2
  132. package/dist/ui/components/form-label/form-label.js.map +1 -1
  133. package/dist/ui/components/form-message/form-message.d.ts +3 -2
  134. package/dist/ui/components/form-message/form-message.js.map +1 -1
  135. package/dist/ui/components/form-message/form-server-error-message.d.ts +3 -2
  136. package/dist/ui/components/form-message/form-server-error-message.js.map +1 -1
  137. package/dist/ui/components/form-message/message-list.d.ts +3 -2
  138. package/dist/ui/components/form-message/message-list.js.map +1 -1
  139. package/dist/ui/components/id-autocomplete/id-autocomplete-context.d.ts +3 -5
  140. package/dist/ui/components/id-autocomplete/id-autocomplete-context.d.ts.map +1 -1
  141. package/dist/ui/components/id-autocomplete/id-autocomplete-context.js +1 -1
  142. package/dist/ui/components/id-autocomplete/id-autocomplete-context.js.map +1 -1
  143. package/dist/ui/components/id-autocomplete/id-autocomplete-input-container.d.ts +3 -2
  144. package/dist/ui/components/id-autocomplete/id-autocomplete-input-container.js +2 -2
  145. package/dist/ui/components/id-autocomplete/id-autocomplete-input-container.js.map +1 -1
  146. package/dist/ui/components/id-autocomplete/id-autocomplete-list-option.d.ts +3 -2
  147. package/dist/ui/components/id-autocomplete/id-autocomplete-list-option.js +2 -2
  148. package/dist/ui/components/id-autocomplete/id-autocomplete-list-option.js.map +1 -1
  149. package/dist/ui/components/id-autocomplete/id-autocomplete-list.d.ts +3 -2
  150. package/dist/ui/components/id-autocomplete/id-autocomplete-list.js.map +1 -1
  151. package/dist/ui/components/id-autocomplete/id-autocomplete.d.ts +3 -2
  152. package/dist/ui/components/id-autocomplete/id-autocomplete.js +1 -1
  153. package/dist/ui/components/id-autocomplete/id-autocomplete.js.map +1 -1
  154. package/dist/ui/components/id-autocomplete/types.d.ts +3 -2
  155. package/dist/ui/components/id-autocomplete/use-id-autocomplete.d.ts +3 -2
  156. package/dist/ui/components/id-autocomplete/use-id-autocomplete.js.map +1 -1
  157. package/dist/ui/components/index.d.ts +42 -40
  158. package/dist/ui/components/input/input.d.ts +3 -2
  159. package/dist/ui/components/input/input.js +1 -1
  160. package/dist/ui/components/input/input.js.map +1 -1
  161. package/dist/ui/components/input/splitted-input-diff.d.ts +3 -2
  162. package/dist/ui/components/input/splitted-input-diff.js +10 -9
  163. package/dist/ui/components/input/splitted-input-diff.js.map +1 -1
  164. package/dist/ui/components/input/subcomponent/input-diff.d.ts +2 -11
  165. package/dist/ui/components/input/subcomponent/input-diff.d.ts.map +1 -1
  166. package/dist/ui/components/input/subcomponent/input-diff.js.map +1 -1
  167. package/dist/ui/components/input/subcomponent/text-diff.d.ts +3 -12
  168. package/dist/ui/components/input/subcomponent/text-diff.d.ts.map +1 -1
  169. package/dist/ui/components/input/subcomponent/text-diff.js.map +1 -1
  170. package/dist/ui/components/json-viewer/json-viewer.d.ts +3 -2
  171. package/dist/ui/components/json-viewer/json-viewer.js +1 -1
  172. package/dist/ui/components/json-viewer/json-viewer.js.map +1 -1
  173. package/dist/ui/components/popover/popover.d.ts +3 -2
  174. package/dist/ui/components/popover/popover.js +1 -1
  175. package/dist/ui/components/popover/popover.js.map +1 -1
  176. package/dist/ui/components/radio-group-field/radio-group-field.d.ts +3 -2
  177. package/dist/ui/components/radio-group-field/radio-group-field.js +4 -3
  178. package/dist/ui/components/radio-group-field/radio-group-field.js.map +1 -1
  179. package/dist/ui/components/radio-group-field/radio-group.d.ts +3 -2
  180. package/dist/ui/components/radio-group-field/radio-group.js +1 -1
  181. package/dist/ui/components/radio-group-field/radio-group.js.map +1 -1
  182. package/dist/ui/components/radio-group-field/radio.d.ts +3 -2
  183. package/dist/ui/components/radio-group-field/radio.js +1 -1
  184. package/dist/ui/components/radio-group-field/radio.js.map +1 -1
  185. package/dist/ui/components/search-autocomplete/index.d.ts +6 -4
  186. package/dist/ui/components/search-autocomplete/search-autocomplete.d.ts +3 -2
  187. package/dist/ui/components/search-autocomplete/search-autocomplete.js.map +1 -1
  188. package/dist/ui/components/search-autocomplete/types.d.ts +3 -2
  189. package/dist/ui/components/search-autocomplete/use-search-autocomplete.d.ts +3 -2
  190. package/dist/ui/components/search-autocomplete/use-search-autocomplete.js.map +1 -1
  191. package/dist/ui/components/select-field/content.d.ts +3 -2
  192. package/dist/ui/components/select-field/content.js +1 -1
  193. package/dist/ui/components/select-field/content.js.map +1 -1
  194. package/dist/ui/components/select-field/select-field.d.ts +3 -2
  195. package/dist/ui/components/select-field/select-field.js +1 -1
  196. package/dist/ui/components/select-field/select-field.js.map +1 -1
  197. package/dist/ui/components/select-field/selected-content.d.ts +3 -2
  198. package/dist/ui/components/select-field/selected-content.js +1 -1
  199. package/dist/ui/components/select-field/selected-content.js.map +1 -1
  200. package/dist/ui/components/select-field/subcomponents/CommandItemList.d.ts +3 -4
  201. package/dist/ui/components/select-field/subcomponents/CommandItemList.d.ts.map +1 -1
  202. package/dist/ui/components/select-field/subcomponents/CommandItemList.js +1 -1
  203. package/dist/ui/components/select-field/subcomponents/CommandItemList.js.map +1 -1
  204. package/dist/ui/components/select-field/use-select-field.d.ts +4 -12
  205. package/dist/ui/components/select-field/use-select-field.d.ts.map +1 -1
  206. package/dist/ui/components/select-field/use-select-field.js.map +1 -1
  207. package/dist/ui/components/sidebar/index.d.ts +6 -4
  208. package/dist/ui/components/sidebar/sidebar.d.ts +3 -2
  209. package/dist/ui/components/sidebar/sidebar.js +1 -1
  210. package/dist/ui/components/sidebar/sidebar.js.map +1 -1
  211. package/dist/ui/components/sidebar/subcomponents/sidebar-content-area.d.ts +2 -7
  212. package/dist/ui/components/sidebar/subcomponents/sidebar-content-area.d.ts.map +1 -1
  213. package/dist/ui/components/sidebar/subcomponents/sidebar-content-area.js +1 -1
  214. package/dist/ui/components/sidebar/subcomponents/sidebar-content-area.js.map +1 -1
  215. package/dist/ui/components/sidebar/subcomponents/sidebar-header.d.ts +2 -2
  216. package/dist/ui/components/sidebar/subcomponents/sidebar-header.d.ts.map +1 -1
  217. package/dist/ui/components/sidebar/subcomponents/sidebar-header.js.map +1 -1
  218. package/dist/ui/components/sidebar/subcomponents/sidebar-item.d.ts +3 -18
  219. package/dist/ui/components/sidebar/subcomponents/sidebar-item.d.ts.map +1 -1
  220. package/dist/ui/components/sidebar/subcomponents/sidebar-item.js +3 -3
  221. package/dist/ui/components/sidebar/subcomponents/sidebar-item.js.map +1 -1
  222. package/dist/ui/components/sidebar/subcomponents/sidebar-pinning-area.d.ts +2 -4
  223. package/dist/ui/components/sidebar/subcomponents/sidebar-pinning-area.d.ts.map +1 -1
  224. package/dist/ui/components/sidebar/subcomponents/sidebar-pinning-area.js.map +1 -1
  225. package/dist/ui/components/sidebar/subcomponents/sidebar-provider/index.d.ts +4 -2
  226. package/dist/ui/components/sidebar/subcomponents/sidebar-provider/sidebar-provider.d.ts +3 -2
  227. package/dist/ui/components/sidebar/subcomponents/sidebar-provider/sidebar-provider.js +2 -2
  228. package/dist/ui/components/sidebar/subcomponents/sidebar-provider/sidebar-provider.js.map +1 -1
  229. package/dist/ui/components/sidebar/subcomponents/sidebar-provider/sidebar-reducer.d.ts +7 -8
  230. package/dist/ui/components/sidebar/subcomponents/sidebar-provider/sidebar-reducer.d.ts.map +1 -1
  231. package/dist/ui/components/sidebar/subcomponents/sidebar-provider/sidebar-reducer.js +1 -1
  232. package/dist/ui/components/sidebar/subcomponents/sidebar-provider/sidebar-reducer.js.map +1 -1
  233. package/dist/ui/components/sidebar/subcomponents/sidebar-search/index.d.ts +2 -1
  234. package/dist/ui/components/sidebar/subcomponents/sidebar-search/search-navigation-arrow.d.ts +2 -2
  235. package/dist/ui/components/sidebar/subcomponents/sidebar-search/search-navigation-arrow.d.ts.map +1 -1
  236. package/dist/ui/components/sidebar/subcomponents/sidebar-search/search-navigation-arrow.js.map +1 -1
  237. package/dist/ui/components/sidebar/subcomponents/sidebar-search/search-result-counter.d.ts +2 -2
  238. package/dist/ui/components/sidebar/subcomponents/sidebar-search/search-result-counter.d.ts.map +1 -1
  239. package/dist/ui/components/sidebar/subcomponents/sidebar-search/search-result-counter.js.map +1 -1
  240. package/dist/ui/components/sidebar/subcomponents/sidebar-search/sidebar-search.d.ts +2 -2
  241. package/dist/ui/components/sidebar/subcomponents/sidebar-search/sidebar-search.d.ts.map +1 -1
  242. package/dist/ui/components/sidebar/subcomponents/sidebar-search/sidebar-search.js +1 -1
  243. package/dist/ui/components/sidebar/subcomponents/sidebar-search/sidebar-search.js.map +1 -1
  244. package/dist/ui/components/sidebar/subcomponents/sidebar-skeleton-item.d.ts +2 -8
  245. package/dist/ui/components/sidebar/subcomponents/sidebar-skeleton-item.d.ts.map +1 -1
  246. package/dist/ui/components/sidebar/subcomponents/sidebar-skeleton-item.js +2 -1
  247. package/dist/ui/components/sidebar/subcomponents/sidebar-skeleton-item.js.map +1 -1
  248. package/dist/ui/components/sidebar/subcomponents/sidebar-skeleton.d.ts +2 -4
  249. package/dist/ui/components/sidebar/subcomponents/sidebar-skeleton.d.ts.map +1 -1
  250. package/dist/ui/components/sidebar/subcomponents/sidebar-skeleton.js.map +1 -1
  251. package/dist/ui/components/sidebar/subcomponents/status-icon.d.ts +3 -9
  252. package/dist/ui/components/sidebar/subcomponents/status-icon.d.ts.map +1 -1
  253. package/dist/ui/components/sidebar/subcomponents/status-icon.js +1 -1
  254. package/dist/ui/components/sidebar/subcomponents/status-icon.js.map +1 -1
  255. package/dist/ui/components/sidebar/types.d.ts +3 -2
  256. package/dist/ui/components/sidebar/types.js +1 -1
  257. package/dist/ui/components/sidebar/types.js.map +1 -1
  258. package/dist/ui/components/sidebar/use-ellipsis.d.ts +2 -2
  259. package/dist/ui/components/sidebar/use-ellipsis.d.ts.map +1 -1
  260. package/dist/ui/components/sidebar/use-ellipsis.js.map +1 -1
  261. package/dist/ui/components/sidebar/use-sidebar-resize.d.ts +3 -9
  262. package/dist/ui/components/sidebar/use-sidebar-resize.d.ts.map +1 -1
  263. package/dist/ui/components/sidebar/use-sidebar-resize.js.map +1 -1
  264. package/dist/ui/components/sidebar/utils.d.ts +10 -11
  265. package/dist/ui/components/sidebar/utils.d.ts.map +1 -1
  266. package/dist/ui/components/sidebar/utils.js.map +1 -1
  267. package/dist/ui/components/text-field/text-field.d.ts +3 -2
  268. package/dist/ui/components/text-field/text-field.js +3 -2
  269. package/dist/ui/components/text-field/text-field.js.map +1 -1
  270. package/dist/ui/components/text-input/text-input-diff.d.ts +3 -2
  271. package/dist/ui/components/text-input/text-input-diff.js.map +1 -1
  272. package/dist/ui/components/text-input/text-input.d.ts +3 -2
  273. package/dist/ui/components/text-input/text-input.js +1 -1
  274. package/dist/ui/components/text-input/text-input.js.map +1 -1
  275. package/dist/ui/components/text-input/types.d.ts +3 -2
  276. package/dist/ui/components/tooltip/tooltip.d.ts +3 -2
  277. package/dist/ui/components/tooltip/tooltip.js +1 -1
  278. package/dist/ui/components/tooltip/tooltip.js.map +1 -1
  279. package/dist/ui/components/types.d.ts +3 -2
  280. package/dist/ui/components/value-transformer/value-transformer.d.ts +3 -2
  281. package/dist/ui/components/value-transformer/value-transformer.js +5 -3
  282. package/dist/ui/components/value-transformer/value-transformer.js.map +1 -1
  283. package/dist/ui/components/with-field-validation/with-field-validation.d.ts +3 -2
  284. package/dist/ui/components/with-field-validation/with-field-validation.js +1 -1
  285. package/dist/ui/components/with-field-validation/with-field-validation.js.map +1 -1
  286. package/dist/ui/index.d.ts +44 -42
  287. package/dist/ui/lib/date-picker.d.ts +4 -5
  288. package/dist/ui/lib/date-picker.d.ts.map +1 -1
  289. package/dist/ui/lib/date-picker.js +2 -1
  290. package/dist/ui/lib/date-picker.js.map +1 -1
  291. package/dist/ui/lib/date-time-picker.d.ts +6 -6
  292. package/dist/ui/lib/date-time-picker.d.ts.map +1 -1
  293. package/dist/ui/lib/date-time-picker.js.map +1 -1
  294. package/dist/ui/lib/deep-equal.d.ts +2 -2
  295. package/dist/ui/lib/deep-equal.d.ts.map +1 -1
  296. package/dist/ui/lib/deep-equal.js.map +1 -1
  297. package/dist/ui/lib/index.d.ts +2 -1
  298. package/dist/ui/lib/is-empty.d.ts +2 -2
  299. package/dist/ui/lib/is-empty.d.ts.map +1 -1
  300. package/dist/ui/lib/is-empty.js.map +1 -1
  301. package/dist/ui/lib/shared-value-transformers.d.ts +3 -4
  302. package/dist/ui/lib/shared-value-transformers.d.ts.map +1 -1
  303. package/dist/ui/lib/shared-value-transformers.js.map +1 -1
  304. package/dist/ui/lib/types.d.ts +3 -2
  305. package/dist/ui/lib/value-cast.d.ts +4 -4
  306. package/dist/ui/lib/value-cast.d.ts.map +1 -1
  307. package/dist/ui/lib/value-cast.js +10 -4
  308. package/dist/ui/lib/value-cast.js.map +1 -1
  309. package/dist/ui/types.d.ts +4 -3
  310. package/dist/{use-id-autocomplete-By7YSChC.d.ts → use-id-autocomplete-wdw3CfYc.d.ts} +5 -16
  311. package/dist/use-id-autocomplete-wdw3CfYc.d.ts.map +1 -0
  312. package/dist/{use-search-autocomplete-IfcQ_gKh.d.ts → use-search-autocomplete-vSvcsvcB.d.ts} +5 -6
  313. package/dist/use-search-autocomplete-vSvcsvcB.d.ts.map +1 -0
  314. package/dist/{value-transformer-DQjqtNih.d.ts → value-transformer-BAD6r8Ol.d.ts} +5 -7
  315. package/dist/value-transformer-BAD6r8Ol.d.ts.map +1 -0
  316. package/dist/{with-field-validation-Di5D8vU-.d.ts → with-field-validation-Bt02MQn2.d.ts} +3 -3
  317. package/dist/with-field-validation-Bt02MQn2.d.ts.map +1 -0
  318. package/package.json +8 -9
  319. package/dist/button-C8doazjv.d.ts +0 -15
  320. package/dist/button-C8doazjv.d.ts.map +0 -1
  321. package/dist/character-counter-BWoglM2P.d.ts.map +0 -1
  322. package/dist/checkbox-CGBtXQnI.d.ts.map +0 -1
  323. package/dist/checkbox-base-CZo-4eL0.d.ts.map +0 -1
  324. package/dist/command-tFzjgzge.d.ts.map +0 -1
  325. package/dist/content-BHWIqmio.d.ts.map +0 -1
  326. package/dist/enum-field-CwZVs3Ux.d.ts.map +0 -1
  327. package/dist/form-CKRKn0TQ.d.ts.map +0 -1
  328. package/dist/form-description-CYkcMEzm.d.ts.map +0 -1
  329. package/dist/form-group-C8kL6pdZ.d.ts.map +0 -1
  330. package/dist/form-label-b6nQi0XO.d.ts.map +0 -1
  331. package/dist/form-message-Dq72nBXz.d.ts.map +0 -1
  332. package/dist/form-server-error-message-DXbaiTfF.d.ts +0 -7
  333. package/dist/form-server-error-message-DXbaiTfF.d.ts.map +0 -1
  334. package/dist/id-autocomplete-C-hwriS5.d.ts.map +0 -1
  335. package/dist/id-autocomplete-input-container-DFEyPh5p.d.ts.map +0 -1
  336. package/dist/id-autocomplete-list-EzLpF23C.d.ts.map +0 -1
  337. package/dist/id-autocomplete-list-option-CB5B07Hi.d.ts.map +0 -1
  338. package/dist/index--hDSfvJT.d.ts.map +0 -1
  339. package/dist/index--okzibnx.d.ts +0 -1
  340. package/dist/index-BLwMeReG.d.ts +0 -1
  341. package/dist/index-Cw3C7_1f.d.ts +0 -1
  342. package/dist/index-E7Wvm5uX.d.ts +0 -1
  343. package/dist/index-J3R2mDFQ.d.ts +0 -1
  344. package/dist/input-BpEQjaWV.d.ts.map +0 -1
  345. package/dist/json-viewer-DaTgmzkS.d.ts +0 -8
  346. package/dist/json-viewer-DaTgmzkS.d.ts.map +0 -1
  347. package/dist/message-list-C4mPpBBa.d.ts.map +0 -1
  348. package/dist/popover-XSBOuSih.d.ts.map +0 -1
  349. package/dist/radio-eL0Oy86J.d.ts.map +0 -1
  350. package/dist/radio-group-Bkli6nUz.d.ts.map +0 -1
  351. package/dist/radio-group-field-wlqeiLN3.d.ts.map +0 -1
  352. package/dist/search-autocomplete-BJJkrZ1i.d.ts.map +0 -1
  353. package/dist/select-field-C97QIhUL.d.ts.map +0 -1
  354. package/dist/selected-content-CGsK5PR4.d.ts.map +0 -1
  355. package/dist/sidebar-DOoE4krt.d.ts.map +0 -1
  356. package/dist/sidebar-provider-C2eyz9TL.d.ts.map +0 -1
  357. package/dist/splitted-input-diff-CwPedpov.d.ts +0 -18
  358. package/dist/splitted-input-diff-CwPedpov.d.ts.map +0 -1
  359. package/dist/text-field-DSInH67J.d.ts +0 -10
  360. package/dist/text-field-DSInH67J.d.ts.map +0 -1
  361. package/dist/text-input-8zXIWHLi.d.ts.map +0 -1
  362. package/dist/text-input-diff-B0vLSKQm.d.ts +0 -20
  363. package/dist/text-input-diff-B0vLSKQm.d.ts.map +0 -1
  364. package/dist/tooltip-BxS9HpML.d.ts.map +0 -1
  365. package/dist/types-BTq-St7H.d.ts.map +0 -1
  366. package/dist/types-Bsn62tJB.d.ts.map +0 -1
  367. package/dist/types-C04Q_Fan.d.ts.map +0 -1
  368. package/dist/types-CNbvfWjh.d.ts.map +0 -1
  369. package/dist/use-id-autocomplete-By7YSChC.d.ts.map +0 -1
  370. package/dist/use-search-autocomplete-IfcQ_gKh.d.ts.map +0 -1
  371. package/dist/value-transformer-DQjqtNih.d.ts.map +0 -1
  372. package/dist/with-field-validation-Di5D8vU-.d.ts.map +0 -1
@@ -1,5 +1,5 @@
1
- import { _ as DropdownMenuTrigger, c as SidebarHeader, d as PackageAnimation, f as Modal, h as DropdownMenuItem, l as SidebarPanel, m as DropdownMenuContent, n as usePagination, o as Sidebar, p as DropdownMenu, s as SidebarFooter, u as Pagination, v as PowerhouseButton } from "../src-CVV6HzQZ.js";
2
- import { n as getDimensions, t as Icon } from "../icon-C4QOpsdI.js";
1
+ import { _ as DropdownMenuTrigger, c as SidebarHeader, d as PackageAnimation, f as Modal, h as DropdownMenuItem, l as SidebarPanel, m as DropdownMenuContent, n as usePagination, o as Sidebar, p as DropdownMenu, s as SidebarFooter, u as Pagination, v as PowerhouseButton } from "../src-CrUksCLW.js";
2
+ import { n as getDimensions, t as Icon } from "../icon-01W_S_9A.js";
3
3
  import { Popover, PopoverContent, PopoverTrigger } from "../ui/components/popover/popover.js";
4
4
  import { SelectFieldRaw } from "../ui/components/select-field/select-field.js";
5
5
  import { Input } from "../ui/components/input/input.js";
@@ -328,6 +328,317 @@ function Breadcrumb(props) {
328
328
  });
329
329
  }
330
330
  //#endregion
331
+ //#region src/connect/components/catch-up-inspector/catch-up-inspector.tsx
332
+ const COLUMNS$3 = [
333
+ {
334
+ key: "consumerId",
335
+ label: "Consumer",
336
+ width: "180px"
337
+ },
338
+ {
339
+ key: "thread",
340
+ label: "Thread",
341
+ width: "90px"
342
+ },
343
+ {
344
+ key: "appliedThrough",
345
+ label: "Applied Through",
346
+ width: "110px"
347
+ },
348
+ {
349
+ key: "lag",
350
+ label: "Lag",
351
+ width: "70px"
352
+ },
353
+ {
354
+ key: "trackedAbove",
355
+ label: "Tracked Above",
356
+ width: "100px"
357
+ },
358
+ {
359
+ key: "lastAdvance",
360
+ label: "Last Advance",
361
+ width: "160px"
362
+ },
363
+ {
364
+ key: "blockedOrdinal",
365
+ label: "Blocked At",
366
+ width: "90px"
367
+ },
368
+ {
369
+ key: "blockedDocument",
370
+ label: "Document",
371
+ width: "150px"
372
+ },
373
+ {
374
+ key: "blockedScope",
375
+ label: "Scope",
376
+ width: "80px"
377
+ },
378
+ {
379
+ key: "blockedBranch",
380
+ label: "Branch",
381
+ width: "80px"
382
+ },
383
+ {
384
+ key: "blockedType",
385
+ label: "Type",
386
+ width: "140px"
387
+ },
388
+ {
389
+ key: "blockedError",
390
+ label: "Error",
391
+ width: "180px"
392
+ }
393
+ ];
394
+ const POLL_INTERVAL_MS = 2e3;
395
+ function truncateId$3(id, maxLength = 12) {
396
+ if (id.length <= maxLength) return id;
397
+ return id.slice(0, maxLength) + "...";
398
+ }
399
+ function formatDuration(ms) {
400
+ const totalSeconds = Math.max(0, Math.floor(ms / 1e3));
401
+ const hours = Math.floor(totalSeconds / 3600);
402
+ const minutes = Math.floor(totalSeconds % 3600 / 60);
403
+ const seconds = totalSeconds % 60;
404
+ if (hours > 0) return `${hours}h ${minutes}m ${seconds}s`;
405
+ if (minutes > 0) return `${minutes}m ${seconds}s`;
406
+ return `${seconds}s`;
407
+ }
408
+ function Empty() {
409
+ return /* @__PURE__ */ jsx("span", {
410
+ className: "text-muted-foreground",
411
+ children: "-"
412
+ });
413
+ }
414
+ function Cell({ children }) {
415
+ return /* @__PURE__ */ jsx("td", {
416
+ className: "border-l border-border px-3 py-2 text-xs text-foreground",
417
+ children
418
+ });
419
+ }
420
+ function TruncatedText({ text, className }) {
421
+ return /* @__PURE__ */ jsx("span", {
422
+ className: twMerge("block truncate", className),
423
+ title: text,
424
+ children: text
425
+ });
426
+ }
427
+ function CatchUpInspector({ status, onRefresh, onSweepNow }) {
428
+ const [loading, setLoading] = useState(true);
429
+ const [sweeping, setSweeping] = useState(false);
430
+ const [error, setError] = useState(null);
431
+ const [now, setNow] = useState();
432
+ const loadStatus = useCallback(async () => {
433
+ try {
434
+ await onRefresh();
435
+ setError(null);
436
+ setNow(Date.now());
437
+ } catch (e) {
438
+ setError(e instanceof Error ? e.message : String(e));
439
+ } finally {
440
+ setLoading(false);
441
+ }
442
+ }, [onRefresh]);
443
+ useEffect(() => {
444
+ loadStatus();
445
+ const interval = setInterval(() => {
446
+ loadStatus();
447
+ }, POLL_INTERVAL_MS);
448
+ return () => clearInterval(interval);
449
+ }, [loadStatus]);
450
+ const handleRefresh = useCallback(async () => {
451
+ setLoading(true);
452
+ await loadStatus();
453
+ }, [loadStatus]);
454
+ const handleSweepNow = useCallback(async () => {
455
+ setSweeping(true);
456
+ try {
457
+ await onSweepNow();
458
+ setError(null);
459
+ } catch (e) {
460
+ setError(e instanceof Error ? e.message : String(e));
461
+ } finally {
462
+ setSweeping(false);
463
+ }
464
+ await loadStatus();
465
+ }, [onSweepNow, loadStatus]);
466
+ const watermark = status?.watermark;
467
+ const consumers = status?.consumers ?? [];
468
+ const settledThrough = watermark?.settledThrough ?? 0;
469
+ const blockedCount = consumers.filter((c) => c.blockedAt).length;
470
+ return /* @__PURE__ */ jsxs("div", {
471
+ className: "flex h-full flex-col gap-2",
472
+ children: [
473
+ /* @__PURE__ */ jsxs("div", {
474
+ className: "flex shrink-0 items-center justify-between",
475
+ children: [/* @__PURE__ */ jsx("h2", {
476
+ className: "text-lg font-semibold text-foreground",
477
+ children: "Catch-up Inspector"
478
+ }), /* @__PURE__ */ jsxs("div", {
479
+ className: "flex items-center gap-2",
480
+ children: [/* @__PURE__ */ jsx("button", {
481
+ className: "flex items-center gap-1 rounded-sm border border-border bg-background px-3 py-1.5 text-sm text-foreground hover:hover-effect disabled:disabled-effect",
482
+ disabled: sweeping,
483
+ onClick: () => void handleSweepNow(),
484
+ type: "button",
485
+ children: "Sweep now"
486
+ }), /* @__PURE__ */ jsxs("button", {
487
+ className: "flex items-center gap-1 rounded-sm border border-border bg-background px-3 py-1.5 text-sm text-foreground hover:hover-effect disabled:disabled-effect",
488
+ disabled: loading,
489
+ onClick: () => void handleRefresh(),
490
+ type: "button",
491
+ children: [/* @__PURE__ */ jsx(Icon, {
492
+ name: "Reload",
493
+ size: 14
494
+ }), "Refresh"]
495
+ })]
496
+ })]
497
+ }),
498
+ watermark && /* @__PURE__ */ jsxs("div", {
499
+ className: "flex shrink-0 flex-wrap items-center gap-4 rounded-lg bg-muted px-4 py-2 text-sm",
500
+ children: [
501
+ /* @__PURE__ */ jsxs("div", {
502
+ className: "text-foreground",
503
+ children: ["Head: ", /* @__PURE__ */ jsx("span", {
504
+ className: "font-medium",
505
+ children: watermark.head
506
+ })]
507
+ }),
508
+ /* @__PURE__ */ jsxs("div", {
509
+ className: "text-foreground",
510
+ children: [
511
+ "Settled through:",
512
+ " ",
513
+ /* @__PURE__ */ jsx("span", {
514
+ className: "font-medium",
515
+ children: watermark.settledThrough
516
+ })
517
+ ]
518
+ }),
519
+ /* @__PURE__ */ jsxs("div", {
520
+ className: "text-foreground",
521
+ children: [
522
+ "Lag:",
523
+ " ",
524
+ /* @__PURE__ */ jsx("span", {
525
+ className: "font-medium",
526
+ children: watermark.head - watermark.settledThrough
527
+ })
528
+ ]
529
+ }),
530
+ /* @__PURE__ */ jsxs("div", {
531
+ className: "text-foreground",
532
+ children: [
533
+ "Waiting on:",
534
+ " ",
535
+ /* @__PURE__ */ jsx("span", {
536
+ className: "font-medium",
537
+ children: watermark.waitingOn.length > 0 ? watermark.waitingOn.join(", ") : "none"
538
+ })
539
+ ]
540
+ }),
541
+ watermark.stalledSinceUtcMs !== void 0 && now !== void 0 && /* @__PURE__ */ jsxs("div", {
542
+ className: "flex items-center gap-2 text-destructive",
543
+ children: [
544
+ /* @__PURE__ */ jsx("span", { className: "size-2 rounded-full bg-destructive" }),
545
+ "Stalled for:",
546
+ " ",
547
+ /* @__PURE__ */ jsx("span", {
548
+ className: "font-medium",
549
+ title: new Date(watermark.stalledSinceUtcMs).toISOString(),
550
+ children: formatDuration(now - watermark.stalledSinceUtcMs)
551
+ })
552
+ ]
553
+ }),
554
+ /* @__PURE__ */ jsxs("div", {
555
+ className: "flex items-center gap-2 text-foreground",
556
+ children: [
557
+ /* @__PURE__ */ jsx("span", { className: "size-2 rounded-full bg-destructive" }),
558
+ "Blocked: ",
559
+ /* @__PURE__ */ jsx("span", {
560
+ className: "font-medium",
561
+ children: blockedCount
562
+ })
563
+ ]
564
+ })
565
+ ]
566
+ }),
567
+ error && /* @__PURE__ */ jsxs("div", {
568
+ className: "shrink-0 rounded-lg border border-destructive bg-destructive/10 px-4 py-2 text-sm text-destructive",
569
+ children: ["Catch-up request failed: ", error]
570
+ }),
571
+ /* @__PURE__ */ jsx("div", {
572
+ className: "max-h-full overflow-auto rounded-lg border border-border",
573
+ children: /* @__PURE__ */ jsxs("table", {
574
+ className: "w-full border-collapse",
575
+ children: [/* @__PURE__ */ jsx("thead", {
576
+ className: "sticky top-0 bg-muted",
577
+ children: /* @__PURE__ */ jsx("tr", { children: COLUMNS$3.map((column, index) => /* @__PURE__ */ jsx("th", {
578
+ className: twMerge("px-3 py-2 text-left text-xs font-medium text-foreground", index > 0 && "border-l border-border"),
579
+ style: { width: column.width },
580
+ children: /* @__PURE__ */ jsx("span", {
581
+ className: "truncate",
582
+ children: column.label
583
+ })
584
+ }, column.key)) })
585
+ }), /* @__PURE__ */ jsx("tbody", { children: loading && !status ? /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", {
586
+ className: "px-3 py-8 text-center text-sm text-muted-foreground",
587
+ colSpan: COLUMNS$3.length,
588
+ children: "Loading..."
589
+ }) }) : consumers.length === 0 ? /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", {
590
+ className: "px-3 py-8 text-center text-sm text-muted-foreground",
591
+ colSpan: COLUMNS$3.length,
592
+ children: "No catch-up consumers"
593
+ }) }) : consumers.map((consumer) => {
594
+ const blocked = consumer.blockedAt;
595
+ const lastAdvance = new Date(consumer.lastAdvanceUtcMs);
596
+ return /* @__PURE__ */ jsxs("tr", {
597
+ className: twMerge("hover:hover-effect", blocked ? "bg-destructive/10" : "odd:bg-card even:bg-background"),
598
+ children: [
599
+ /* @__PURE__ */ jsx("td", {
600
+ className: "px-3 py-2 text-xs text-foreground",
601
+ children: /* @__PURE__ */ jsx(TruncatedText, { text: consumer.consumerId })
602
+ }),
603
+ /* @__PURE__ */ jsx(Cell, { children: consumer.thread }),
604
+ /* @__PURE__ */ jsx(Cell, { children: consumer.appliedThrough }),
605
+ /* @__PURE__ */ jsx(Cell, { children: settledThrough - consumer.appliedThrough }),
606
+ /* @__PURE__ */ jsx(Cell, { children: consumer.trackedAbove }),
607
+ /* @__PURE__ */ jsx(Cell, { children: /* @__PURE__ */ jsx("span", {
608
+ className: "block truncate",
609
+ title: lastAdvance.toISOString(),
610
+ children: lastAdvance.toLocaleString()
611
+ }) }),
612
+ /* @__PURE__ */ jsx(Cell, { children: blocked ? blocked.ordinal : /* @__PURE__ */ jsx(Empty, {}) }),
613
+ /* @__PURE__ */ jsx(Cell, { children: blocked ? /* @__PURE__ */ jsx("span", {
614
+ className: "block truncate",
615
+ title: blocked.documentId,
616
+ children: truncateId$3(blocked.documentId)
617
+ }) : /* @__PURE__ */ jsx(Empty, {}) }),
618
+ /* @__PURE__ */ jsx(Cell, { children: blocked ? blocked.scope : /* @__PURE__ */ jsx(Empty, {}) }),
619
+ /* @__PURE__ */ jsx(Cell, { children: blocked ? blocked.branch : /* @__PURE__ */ jsx(Empty, {}) }),
620
+ /* @__PURE__ */ jsx(Cell, { children: blocked ? /* @__PURE__ */ jsx(TruncatedText, { text: blocked.type }) : /* @__PURE__ */ jsx(Empty, {}) }),
621
+ /* @__PURE__ */ jsx(Cell, { children: blocked ? /* @__PURE__ */ jsx(TruncatedText, {
622
+ className: "text-destructive",
623
+ text: blocked.error
624
+ }) : /* @__PURE__ */ jsx(Empty, {}) })
625
+ ]
626
+ }, consumer.consumerId);
627
+ }) })]
628
+ })
629
+ }),
630
+ /* @__PURE__ */ jsxs("div", {
631
+ className: "shrink-0 text-sm text-foreground",
632
+ children: [
633
+ "Showing ",
634
+ consumers.length,
635
+ " consumer(s)"
636
+ ]
637
+ })
638
+ ]
639
+ });
640
+ }
641
+ //#endregion
331
642
  //#region src/connect/components/combobox/combobox.tsx
332
643
  function DropdownIndicator(props) {
333
644
  return /* @__PURE__ */ jsx(components.DropdownIndicator, {
@@ -527,8 +838,9 @@ function ModalButton(props) {
527
838
  const { variant, className, ...rest } = props;
528
839
  const confirmStyle = twMerge(defaultStyle, "bg-primary text-primary-foreground");
529
840
  const cancelStyle = twMerge(defaultStyle, "bg-muted text-muted-foreground");
841
+ const variantStyle = twMerge(variant === "confirm" ? confirmStyle : cancelStyle, className);
530
842
  return /* @__PURE__ */ jsx("button", {
531
- className: twMerge(variant === "confirm" ? confirmStyle : cancelStyle, className),
843
+ className: variantStyle,
532
844
  ...rest
533
845
  });
534
846
  }
@@ -702,7 +1014,7 @@ function SchemaTreeSidebar({ schema, tables, selectedTable, onSelectTable, onRef
702
1014
  //#endregion
703
1015
  //#region src/connect/components/select/select.tsx
704
1016
  function fixedForwardRef(render) {
705
- return /* @__PURE__ */ forwardRef(render);
1017
+ return /*#__PURE__*/ forwardRef(render);
706
1018
  }
707
1019
  const ConnectSelect = /* @__PURE__ */ fixedForwardRef(function Select(props, ref) {
708
1020
  const { items, value, id, onChange, containerClassName, menuClassName, itemClassName, absolutePositionMenu = false, borderRadius = "6px", listClassName } = props;
@@ -1279,9 +1591,10 @@ function DBExplorer({ schema, getTables, getTableRows, getDefaultSort, pageSize
1279
1591
  ]);
1280
1592
  const handleCopyAll = useCallback(async () => {
1281
1593
  if (!selectedTable) return "";
1594
+ const limit = pagination.total ?? 1e6;
1282
1595
  return rowsToCsv((await getTableRows(selectedTable, {
1283
1596
  schema,
1284
- limit: pagination.total ?? 1e6,
1597
+ limit,
1285
1598
  offset: 0,
1286
1599
  sort,
1287
1600
  filters
@@ -1638,9 +1951,7 @@ const SEQUENCE = [
1638
1951
  }
1639
1952
  ];
1640
1953
  const ANIM_DUR = 460;
1641
- const HOLD = 800;
1642
- const LAST_DROP = 1220;
1643
- const LOOP_TOTAL = LAST_DROP + ANIM_DUR + HOLD + 1040 + ANIM_DUR + 400;
1954
+ const LOOP_TOTAL = 4380;
1644
1955
  const DROP_STYLE = `brickDrop ${ANIM_DUR}ms cubic-bezier(0.28, 1.08, 0.58, 1) forwards`;
1645
1956
  const FALL_STYLE = `brickFall ${ANIM_DUR}ms cubic-bezier(0.28, 1.08, 0.58, 1) forwards`;
1646
1957
  const PATHS = {
@@ -1699,7 +2010,7 @@ function LogoAnimation({ size = 48, className = "" }) {
1699
2010
  clearTimers();
1700
2011
  resetAll();
1701
2012
  SEQUENCE.forEach(({ id, dropDelay }) => runDrop(id, dropDelay));
1702
- const fallStart = LAST_DROP + ANIM_DUR + HOLD;
2013
+ const fallStart = 2480;
1703
2014
  SEQUENCE.forEach(({ id, fallDelay }) => runFall(id, fallStart + fallDelay));
1704
2015
  schedule(startLoop, LOOP_TOTAL);
1705
2016
  }
@@ -1798,7 +2109,7 @@ function Tabs({ children, defaultValue, onValueChange, listClassName }) {
1798
2109
  children: /* @__PURE__ */ jsx(List, {
1799
2110
  className: "flex w-full gap-x-2 rounded-xl p-1 text-sm font-semibold text-foreground outline-none",
1800
2111
  children: React.Children.map(children, (child, _i) => {
1801
- if (!/* @__PURE__ */ React.isValidElement(child)) return;
2112
+ if (!/*#__PURE__*/ React.isValidElement(child)) return;
1802
2113
  const props = child.props;
1803
2114
  const value = resolveTabValue(props);
1804
2115
  return /* @__PURE__ */ jsx(Trigger$2, {
@@ -1812,10 +2123,11 @@ function Tabs({ children, defaultValue, onValueChange, listClassName }) {
1812
2123
  }), /* @__PURE__ */ jsx("div", {
1813
2124
  className: "mt-3 min-h-0 flex-1 rounded-md bg-background",
1814
2125
  children: React.Children.map(children, (child, i) => {
1815
- if (!/* @__PURE__ */ React.isValidElement(child)) return;
2126
+ if (!/*#__PURE__*/ React.isValidElement(child)) return;
2127
+ const value = resolveTabValue(child.props);
1816
2128
  return /* @__PURE__ */ jsx(Content$2, {
1817
2129
  className: "h-full",
1818
- value: resolveTabValue(child.props),
2130
+ value,
1819
2131
  children: child
1820
2132
  }, i);
1821
2133
  })
@@ -1954,7 +2266,8 @@ const getBarHeight = (size = 0) => {
1954
2266
  const formatTimestamp$1 = (isoString) => {
1955
2267
  if (!isoString) return "";
1956
2268
  try {
1957
- return format(parseISO(isoString), "HH:mm, dd, MMMM");
2269
+ const date = parseISO(isoString);
2270
+ return format(date, "HH:mm, dd, MMMM");
1958
2271
  } catch {
1959
2272
  return isoString;
1960
2273
  }
@@ -2239,12 +2552,11 @@ function ToolbarRedoButton(props) {
2239
2552
  }) } = props;
2240
2553
  const { redo, canRedo } = useRedo(document?.header.id);
2241
2554
  const onClick = makeOnClick(document, onClickOverride, redo);
2242
- const disabled = !canRedo;
2243
2555
  return /* @__PURE__ */ jsx(ToolbarButton, {
2244
2556
  "data-testid": "toolbar-redo-button",
2245
2557
  "aria-label": "Redo",
2246
2558
  className,
2247
- disabled,
2559
+ disabled: !canRedo,
2248
2560
  onClick,
2249
2561
  children
2250
2562
  });
@@ -2860,7 +3172,7 @@ function UploadFileItemStatusRow(props) {
2860
3172
  }
2861
3173
  //#endregion
2862
3174
  //#region src/connect/components/upload-file-item/upload-file-item.tsx
2863
- const UploadFileItem = /* @__PURE__ */ forwardRef(function UploadFileItem(props, ref) {
3175
+ const UploadFileItem = /*#__PURE__*/ forwardRef(function UploadFileItem(props, ref) {
2864
3176
  const { fileName, fileSize, status, documentType, progress = 0, errorDetails, onClose, onOpenDocument, onFindResolution, className, ...delegatedProps } = props;
2865
3177
  return /* @__PURE__ */ jsxs("div", {
2866
3178
  ref,
@@ -3100,7 +3412,7 @@ function uploadsReducer(state, action) {
3100
3412
  }
3101
3413
  }
3102
3414
  function useUploadTracker(useLocalStorage = false, driveId) {
3103
- const [uploads, dispatch] = useReducer(uploadsReducer, useCallback(() => {
3415
+ const getInitialState = useCallback(() => {
3104
3416
  if (useLocalStorage && driveId) try {
3105
3417
  const stored = localStorage.getItem(`uploadTracker_${driveId}`);
3106
3418
  if (stored) return JSON.parse(stored);
@@ -3110,7 +3422,8 @@ function useUploadTracker(useLocalStorage = false, driveId) {
3110
3422
  return {};
3111
3423
  }
3112
3424
  return {};
3113
- }, [useLocalStorage, driveId])());
3425
+ }, [useLocalStorage, driveId]);
3426
+ const [uploads, dispatch] = useReducer(uploadsReducer, getInitialState());
3114
3427
  useEffect(() => {
3115
3428
  if (useLocalStorage && driveId) try {
3116
3429
  localStorage.setItem(`uploadTracker_${driveId}`, JSON.stringify(uploads));
@@ -3152,11 +3465,12 @@ function useUploadTracker(useLocalStorage = false, driveId) {
3152
3465
  });
3153
3466
  };
3154
3467
  try {
3468
+ const fileNode = await onAddFile(file, parent, progressCallback);
3155
3469
  dispatch({
3156
3470
  type: "SET_FILE_NODE",
3157
3471
  payload: {
3158
3472
  id: fileId,
3159
- fileNode: await onAddFile(file, parent, progressCallback) || void 0
3473
+ fileNode: fileNode || void 0
3160
3474
  }
3161
3475
  });
3162
3476
  } catch (error) {
@@ -4008,7 +4322,7 @@ const Footer = ({ children, className, ...props }) => {
4008
4322
  };
4009
4323
  //#endregion
4010
4324
  //#region src/connect/components/form-input/form-input.tsx
4011
- const FormInput = /* @__PURE__ */ forwardRef(function FormInput(props, ref) {
4325
+ const FormInput = /*#__PURE__*/ forwardRef(function FormInput(props, ref) {
4012
4326
  const { icon, errorMessage, isDirty, containerClassName, inputClassName, errorMessageClassName, hideErrors = false, ...delegatedProps } = props;
4013
4327
  const type = props.type ?? "text";
4014
4328
  const isError = !!errorMessage;
@@ -4106,7 +4420,7 @@ function AddLocalDriveForm(props) {
4106
4420
  }
4107
4421
  //#endregion
4108
4422
  //#region src/connect/components/toggle/toggle.tsx
4109
- const Toggle = /* @__PURE__ */ forwardRef(function Toggle(props, ref) {
4423
+ const Toggle = /*#__PURE__*/ forwardRef(function Toggle(props, ref) {
4110
4424
  return /* @__PURE__ */ jsxs("label", {
4111
4425
  className: "relative cursor-pointer items-center",
4112
4426
  htmlFor: props.id,
@@ -4121,7 +4435,7 @@ const Toggle = /* @__PURE__ */ forwardRef(function Toggle(props, ref) {
4121
4435
  });
4122
4436
  //#endregion
4123
4437
  //#region src/connect/components/form/inputs/available-offline-toggle.tsx
4124
- const AvailableOfflineToggle = /* @__PURE__ */ forwardRef(function AvailableOfflineToggle(props, ref) {
4438
+ const AvailableOfflineToggle = /*#__PURE__*/ forwardRef(function AvailableOfflineToggle(props, ref) {
4125
4439
  return /* @__PURE__ */ jsxs("div", {
4126
4440
  className: "flex items-center rounded-md border border-border bg-background p-3 text-foreground",
4127
4441
  children: [/* @__PURE__ */ jsxs("div", {
@@ -4490,7 +4804,8 @@ function IntegrityInspector({ onValidate, onRebuildKeyframes, onRebuildSnapshots
4490
4804
  clearResults();
4491
4805
  setStatus("running");
4492
4806
  try {
4493
- setValidationResult(await onValidate(documentId.trim(), branch.trim() || void 0));
4807
+ const result = await onValidate(documentId.trim(), branch.trim() || void 0);
4808
+ setValidationResult(result);
4494
4809
  setStatus("done");
4495
4810
  } catch (err) {
4496
4811
  setError(err instanceof Error ? err.message : String(err));
@@ -4507,7 +4822,8 @@ function IntegrityInspector({ onValidate, onRebuildKeyframes, onRebuildSnapshots
4507
4822
  clearResults();
4508
4823
  setStatus("running");
4509
4824
  try {
4510
- setRebuildResult(await onRebuildKeyframes(documentId.trim(), branch.trim() || void 0));
4825
+ const result = await onRebuildKeyframes(documentId.trim(), branch.trim() || void 0);
4826
+ setRebuildResult(result);
4511
4827
  setStatus("done");
4512
4828
  } catch (err) {
4513
4829
  setError(err instanceof Error ? err.message : String(err));
@@ -4524,7 +4840,8 @@ function IntegrityInspector({ onValidate, onRebuildKeyframes, onRebuildSnapshots
4524
4840
  clearResults();
4525
4841
  setStatus("running");
4526
4842
  try {
4527
- setRebuildResult(await onRebuildSnapshots(documentId.trim(), branch.trim() || void 0));
4843
+ const result = await onRebuildSnapshots(documentId.trim(), branch.trim() || void 0);
4844
+ setRebuildResult(result);
4528
4845
  setStatus("done");
4529
4846
  } catch (err) {
4530
4847
  setError(err instanceof Error ? err.message : String(err));
@@ -5103,7 +5420,7 @@ function ConnectDeleteItemModal(props) {
5103
5420
  }
5104
5421
  //#endregion
5105
5422
  //#region src/connect/components/form/inputs/drive-name-input.tsx
5106
- const DriveNameInput = /* @__PURE__ */ forwardRef(function DriveNameInput(props, ref) {
5423
+ const DriveNameInput = /*#__PURE__*/ forwardRef(function DriveNameInput(props, ref) {
5107
5424
  return /* @__PURE__ */ jsx(FormInput, {
5108
5425
  ...props,
5109
5426
  icon: props.icon ?? /* @__PURE__ */ jsx(Icon, { name: "Drive" }),
@@ -5487,7 +5804,8 @@ function ProcessorsInspector({ getProcessors, onRetry }) {
5487
5804
  const [error, setError] = useState(null);
5488
5805
  const loadProcessors = useCallback(async () => {
5489
5806
  try {
5490
- setProcessors(await getProcessors());
5807
+ const result = await getProcessors();
5808
+ setProcessors(result);
5491
5809
  setError(null);
5492
5810
  } catch (e) {
5493
5811
  setError(e instanceof Error ? e.message : String(e));
@@ -5517,9 +5835,10 @@ function ProcessorsInspector({ getProcessors, onRetry }) {
5517
5835
  }
5518
5836
  }, [onRetry, loadProcessors]);
5519
5837
  const handleSort = (columnKey) => {
5838
+ const newDirection = sort?.column === columnKey && sort.direction === "asc" ? "desc" : "asc";
5520
5839
  setSort({
5521
5840
  column: columnKey,
5522
- direction: sort?.column === columnKey && sort.direction === "asc" ? "desc" : "asc"
5841
+ direction: newDirection
5523
5842
  });
5524
5843
  };
5525
5844
  const sortedProcessors = sortProcessors(processors, sort);
@@ -5841,7 +6160,8 @@ function QueueInspector({ getQueueState, onPause, onResume }) {
5841
6160
  const [actionInProgress, setActionInProgress] = useState(false);
5842
6161
  const [selectedJob, setSelectedJob] = useState(null);
5843
6162
  const loadState = useCallback(async () => {
5844
- setState(await getQueueState());
6163
+ const newState = await getQueueState();
6164
+ setState(newState);
5845
6165
  setLoading(false);
5846
6166
  }, [getQueueState]);
5847
6167
  useEffect(() => {
@@ -5868,9 +6188,10 @@ function QueueInspector({ getQueueState, onPause, onResume }) {
5868
6188
  loadState
5869
6189
  ]);
5870
6190
  const handleSort = (columnKey) => {
6191
+ const newDirection = sort?.column === columnKey && sort.direction === "asc" ? "desc" : "asc";
5871
6192
  setSort({
5872
6193
  column: columnKey,
5873
- direction: sort?.column === columnKey && sort.direction === "asc" ? "desc" : "asc"
6194
+ direction: newDirection
5874
6195
  });
5875
6196
  };
5876
6197
  const sortedJobs = sortJobs([...state.executingJobs.map((job) => ({
@@ -6071,8 +6392,9 @@ const stateStyles = {
6071
6392
  disconnected: "bg-muted text-foreground"
6072
6393
  };
6073
6394
  function ConnectionStateBadge({ state, failureCount }) {
6395
+ const style = stateStyles[state] ?? "bg-muted text-foreground";
6074
6396
  return /* @__PURE__ */ jsxs("span", {
6075
- className: twMerge("inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium", stateStyles[state] ?? "bg-muted text-foreground"),
6397
+ className: twMerge("inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium", style),
6076
6398
  children: [state, failureCount > 0 && /* @__PURE__ */ jsxs("span", {
6077
6399
  className: "text-xs opacity-75",
6078
6400
  children: [
@@ -6722,6 +7044,175 @@ function ChannelInspector({ remoteName, channel, onBack, onRefresh, connectionSt
6722
7044
  });
6723
7045
  }
6724
7046
  //#endregion
7047
+ //#region src/connect/components/remotes-inspector/components/peer-agreement-panel.tsx
7048
+ const cell = "px-3 py-1.5 text-xs text-foreground";
7049
+ const head = "px-3 py-1.5 text-left text-xs font-medium text-foreground";
7050
+ function versions(list) {
7051
+ return list && list.length > 0 ? list.join(", ") : "none";
7052
+ }
7053
+ /** How a remote's peer announced itself. */
7054
+ function peerManifestLabel(peer) {
7055
+ if (peer === void 0) return "Not yet heard (baseline)";
7056
+ if (peer.manifest === null) return "Silent (baseline)";
7057
+ return `Announced, revision ${peer.manifest.revision.slice(0, 8)}`;
7058
+ }
7059
+ function PeerAgreementPanel({ remoteName, collectionId, peer, agreement, holds }) {
7060
+ const local = agreement.local();
7061
+ const theirs = agreement.peer(remoteName);
7062
+ const protocols = Object.keys(local.protocols).sort();
7063
+ const features = Object.keys(local.features).sort();
7064
+ return /* @__PURE__ */ jsxs("section", {
7065
+ "aria-label": "Peer agreement",
7066
+ className: "flex flex-col gap-2 rounded-lg border border-border p-3",
7067
+ children: [
7068
+ /* @__PURE__ */ jsxs("div", {
7069
+ className: "flex items-center justify-between",
7070
+ children: [/* @__PURE__ */ jsx("h3", {
7071
+ className: "text-sm font-semibold text-foreground",
7072
+ children: "Peer agreement"
7073
+ }), /* @__PURE__ */ jsx("span", {
7074
+ className: "text-xs text-muted-foreground",
7075
+ children: peerManifestLabel(peer)
7076
+ })]
7077
+ }),
7078
+ /* @__PURE__ */ jsxs("table", {
7079
+ className: "w-full border-collapse",
7080
+ children: [/* @__PURE__ */ jsx("thead", {
7081
+ className: "bg-muted",
7082
+ children: /* @__PURE__ */ jsxs("tr", { children: [
7083
+ /* @__PURE__ */ jsx("th", {
7084
+ className: head,
7085
+ children: "Protocol"
7086
+ }),
7087
+ /* @__PURE__ */ jsx("th", {
7088
+ className: head,
7089
+ children: "Local"
7090
+ }),
7091
+ /* @__PURE__ */ jsx("th", {
7092
+ className: head,
7093
+ children: "Peer"
7094
+ }),
7095
+ /* @__PURE__ */ jsx("th", {
7096
+ className: head,
7097
+ children: "Limits new documents"
7098
+ })
7099
+ ] })
7100
+ }), /* @__PURE__ */ jsxs("tbody", { children: [protocols.map((protocol) => {
7101
+ const limits = agreement.limitedBy(collectionId, protocol).includes(remoteName);
7102
+ return /* @__PURE__ */ jsxs("tr", {
7103
+ className: "odd:bg-card even:bg-background",
7104
+ children: [
7105
+ /* @__PURE__ */ jsx("td", {
7106
+ className: cell,
7107
+ children: protocol
7108
+ }),
7109
+ /* @__PURE__ */ jsx("td", {
7110
+ className: cell,
7111
+ children: versions(local.protocols[protocol])
7112
+ }),
7113
+ /* @__PURE__ */ jsx("td", {
7114
+ className: cell,
7115
+ children: versions(theirs.protocols[protocol])
7116
+ }),
7117
+ /* @__PURE__ */ jsx("td", {
7118
+ className: twMerge(cell, limits && "text-warning"),
7119
+ children: limits ? "Yes" : "No"
7120
+ })
7121
+ ]
7122
+ }, protocol);
7123
+ }), features.map((feature) => /* @__PURE__ */ jsxs("tr", {
7124
+ className: "odd:bg-card even:bg-background",
7125
+ children: [
7126
+ /* @__PURE__ */ jsxs("td", {
7127
+ className: cell,
7128
+ children: [feature, " (feature)"]
7129
+ }),
7130
+ /* @__PURE__ */ jsx("td", {
7131
+ className: cell,
7132
+ children: versions(local.features[feature])
7133
+ }),
7134
+ /* @__PURE__ */ jsx("td", {
7135
+ className: cell,
7136
+ children: versions(theirs.features[feature])
7137
+ }),
7138
+ /* @__PURE__ */ jsx("td", {
7139
+ className: cell,
7140
+ children: "-"
7141
+ })
7142
+ ]
7143
+ }, feature))] })]
7144
+ }),
7145
+ /* @__PURE__ */ jsxs("h4", {
7146
+ className: "text-xs font-semibold text-foreground",
7147
+ children: [
7148
+ "Held documents (",
7149
+ holds.length,
7150
+ ")"
7151
+ ]
7152
+ }),
7153
+ holds.length === 0 ? /* @__PURE__ */ jsx("p", {
7154
+ className: "text-xs text-muted-foreground",
7155
+ children: "No documents held"
7156
+ }) : /* @__PURE__ */ jsxs("table", {
7157
+ className: "w-full border-collapse",
7158
+ children: [/* @__PURE__ */ jsx("thead", {
7159
+ className: "bg-muted",
7160
+ children: /* @__PURE__ */ jsxs("tr", { children: [
7161
+ /* @__PURE__ */ jsx("th", {
7162
+ className: head,
7163
+ children: "Document"
7164
+ }),
7165
+ /* @__PURE__ */ jsx("th", {
7166
+ className: head,
7167
+ children: "Branch"
7168
+ }),
7169
+ /* @__PURE__ */ jsx("th", {
7170
+ className: head,
7171
+ children: "Requires"
7172
+ }),
7173
+ /* @__PURE__ */ jsx("th", {
7174
+ className: head,
7175
+ children: "Peer runs"
7176
+ }),
7177
+ /* @__PURE__ */ jsx("th", {
7178
+ className: head,
7179
+ children: "Held since"
7180
+ })
7181
+ ] })
7182
+ }), /* @__PURE__ */ jsx("tbody", { children: holds.map((hold) => /* @__PURE__ */ jsxs("tr", {
7183
+ className: "odd:bg-card even:bg-background",
7184
+ children: [
7185
+ /* @__PURE__ */ jsx("td", {
7186
+ className: cell,
7187
+ children: hold.documentId
7188
+ }),
7189
+ /* @__PURE__ */ jsx("td", {
7190
+ className: cell,
7191
+ children: hold.branch
7192
+ }),
7193
+ /* @__PURE__ */ jsxs("td", {
7194
+ className: cell,
7195
+ children: [
7196
+ hold.reason.protocol,
7197
+ " ",
7198
+ hold.reason.version
7199
+ ]
7200
+ }),
7201
+ /* @__PURE__ */ jsx("td", {
7202
+ className: cell,
7203
+ children: versions(hold.reason.peerSupports)
7204
+ }),
7205
+ /* @__PURE__ */ jsx("td", {
7206
+ className: cell,
7207
+ children: new Date(hold.heldAtUtcMs).toLocaleString()
7208
+ })
7209
+ ]
7210
+ }, `${hold.documentId}:${hold.branch}`)) })]
7211
+ })
7212
+ ]
7213
+ });
7214
+ }
7215
+ //#endregion
6725
7216
  //#region src/connect/components/remotes-inspector/remotes-inspector.tsx
6726
7217
  const BASE_COLUMNS = [
6727
7218
  {
@@ -6749,6 +7240,11 @@ const BASE_COLUMNS = [
6749
7240
  label: "Filter",
6750
7241
  width: "200px"
6751
7242
  },
7243
+ {
7244
+ key: "peer",
7245
+ label: "Peer",
7246
+ width: "160px"
7247
+ },
6752
7248
  {
6753
7249
  key: "channel",
6754
7250
  label: "Channel",
@@ -6795,7 +7291,7 @@ function sortRemotes(remotes, sort) {
6795
7291
  return sort.direction === "asc" ? comparison : -comparison;
6796
7292
  });
6797
7293
  }
6798
- function RemotesInspector({ getRemotes, removeRemote, addRemoteManual, triggerPull, connectionStates }) {
7294
+ function RemotesInspector({ getRemotes, removeRemote, addRemoteManual, triggerPull, connectionStates, getAgreement, getHolds }) {
6799
7295
  const [remotes, setRemotes] = useState([]);
6800
7296
  const [loading, setLoading] = useState(true);
6801
7297
  const [sort, setSort] = useState();
@@ -6803,29 +7299,47 @@ function RemotesInspector({ getRemotes, removeRemote, addRemoteManual, triggerPu
6803
7299
  const [manualUrl, setManualUrl] = useState("");
6804
7300
  const [adding, setAdding] = useState(false);
6805
7301
  const [addError, setAddError] = useState();
7302
+ const [holds, setHolds] = useState([]);
6806
7303
  const hasRowActions = !!removeRemote || !!triggerPull;
6807
7304
  const columns = useMemo(() => hasRowActions ? [...BASE_COLUMNS, ACTIONS_COLUMN] : BASE_COLUMNS, [hasRowActions]);
6808
7305
  const loadRemotes = useCallback(async () => {
6809
7306
  setLoading(true);
6810
- setRemotes(await getRemotes());
7307
+ const data = await getRemotes();
7308
+ setRemotes(data);
6811
7309
  setLoading(false);
6812
7310
  }, [getRemotes]);
6813
7311
  useEffect(() => {
6814
7312
  loadRemotes();
6815
7313
  }, [loadRemotes]);
7314
+ useEffect(() => {
7315
+ if (!selectedRemote || !getHolds) return;
7316
+ let current = true;
7317
+ getHolds(selectedRemote.meta.name).then((loaded) => {
7318
+ if (current) setHolds(loaded);
7319
+ }).catch(() => {
7320
+ if (current) setHolds([]);
7321
+ });
7322
+ return () => {
7323
+ current = false;
7324
+ };
7325
+ }, [selectedRemote, getHolds]);
6816
7326
  const handleRefresh = useCallback(async () => {
6817
7327
  await loadRemotes();
6818
- if (selectedRemote) setSelectedRemote(remotes.find((r) => r.meta.id === selectedRemote.meta.id));
7328
+ if (selectedRemote) {
7329
+ const updated = remotes.find((r) => r.meta.id === selectedRemote.meta.id);
7330
+ setSelectedRemote(updated);
7331
+ }
6819
7332
  }, [
6820
7333
  loadRemotes,
6821
7334
  selectedRemote,
6822
7335
  remotes
6823
7336
  ]);
6824
7337
  const handleSort = (columnKey) => {
6825
- if (columnKey === "channel" || columnKey === "actions" || columnKey === "status") return;
7338
+ if (columnKey === "channel" || columnKey === "actions" || columnKey === "status" || columnKey === "peer") return;
7339
+ const newDirection = sort?.column === columnKey && sort.direction === "asc" ? "desc" : "asc";
6826
7340
  setSort({
6827
7341
  column: columnKey,
6828
- direction: sort?.column === columnKey && sort.direction === "asc" ? "desc" : "asc"
7342
+ direction: newDirection
6829
7343
  });
6830
7344
  };
6831
7345
  const handleViewChannel = (remote) => {
@@ -6867,13 +7381,30 @@ function RemotesInspector({ getRemotes, removeRemote, addRemoteManual, triggerPu
6867
7381
  const handlePull = useCallback((remote) => {
6868
7382
  triggerPull?.(remote.meta.name);
6869
7383
  }, [triggerPull]);
6870
- if (selectedRemote) return /* @__PURE__ */ jsx(ChannelInspector, {
6871
- channel: selectedRemote.channel,
6872
- connectionState: connectionStates?.get(selectedRemote.meta.name),
6873
- onBack: handleBack,
6874
- onRefresh: () => void handleRefresh(),
6875
- remoteName: selectedRemote.meta.name
6876
- });
7384
+ if (selectedRemote) {
7385
+ let agreement;
7386
+ try {
7387
+ agreement = getAgreement?.();
7388
+ } catch {
7389
+ agreement = void 0;
7390
+ }
7391
+ return /* @__PURE__ */ jsxs("div", {
7392
+ className: "flex h-full flex-col gap-2 overflow-auto",
7393
+ children: [agreement && /* @__PURE__ */ jsx(PeerAgreementPanel, {
7394
+ agreement,
7395
+ collectionId: selectedRemote.meta.collectionId.key,
7396
+ holds,
7397
+ peer: selectedRemote.meta.peer,
7398
+ remoteName: selectedRemote.meta.name
7399
+ }), /* @__PURE__ */ jsx(ChannelInspector, {
7400
+ channel: selectedRemote.channel,
7401
+ connectionState: connectionStates?.get(selectedRemote.meta.name),
7402
+ onBack: handleBack,
7403
+ onRefresh: () => void handleRefresh(),
7404
+ remoteName: selectedRemote.meta.name
7405
+ })]
7406
+ });
7407
+ }
6877
7408
  const sortedRemotes = sortRemotes(remotes, sort);
6878
7409
  return /* @__PURE__ */ jsxs("div", {
6879
7410
  className: "flex h-full flex-col gap-2",
@@ -6930,7 +7461,7 @@ function RemotesInspector({ getRemotes, removeRemote, addRemoteManual, triggerPu
6930
7461
  children: /* @__PURE__ */ jsx("tr", { children: columns.map((column, index) => {
6931
7462
  const isActive = sort?.column === column.key;
6932
7463
  const sortDirection = isActive ? sort.direction : "asc";
6933
- const isSortable = column.key !== "channel" && column.key !== "actions" && column.key !== "status";
7464
+ const isSortable = column.key !== "channel" && column.key !== "actions" && column.key !== "status" && column.key !== "peer";
6934
7465
  return /* @__PURE__ */ jsx("th", {
6935
7466
  className: twMerge("group px-3 py-2 text-left text-xs font-medium text-foreground", index > 0 && "border-l border-border", isSortable && "cursor-pointer hover:hover-effect"),
6936
7467
  onClick: () => isSortable && handleSort(column.key),
@@ -7000,6 +7531,13 @@ function RemotesInspector({ getRemotes, removeRemote, addRemoteManual, triggerPu
7000
7531
  children: formatFilter(remote.meta.filter)
7001
7532
  })
7002
7533
  }),
7534
+ /* @__PURE__ */ jsx("td", {
7535
+ className: "border-l border-border px-3 py-2 text-xs text-foreground",
7536
+ children: /* @__PURE__ */ jsx("span", {
7537
+ className: "block truncate",
7538
+ children: peerManifestLabel(remote.meta.peer)
7539
+ })
7540
+ }),
7003
7541
  /* @__PURE__ */ jsx("td", {
7004
7542
  className: "border-l border-border px-3 py-2",
7005
7543
  children: /* @__PURE__ */ jsxs("button", {
@@ -7077,7 +7615,8 @@ function WorkerInspector({ getInfo, onRestart }) {
7077
7615
  const [restarting, setRestarting] = useState(false);
7078
7616
  const loadInfo = useCallback(async () => {
7079
7617
  try {
7080
- setInfo(await getInfo());
7618
+ const next = await getInfo();
7619
+ setInfo(next);
7081
7620
  setError(null);
7082
7621
  } catch (e) {
7083
7622
  setError(e instanceof Error ? e.message : String(e));
@@ -7172,7 +7711,7 @@ function InspectorUnavailable({ message }) {
7172
7711
  })]
7173
7712
  });
7174
7713
  }
7175
- function InspectorModal({ open, onOpenChange, modalProps, containerProps, dbExplorerProps, remotesInspectorProps, queueInspectorProps, processorsInspectorProps, integrityInspectorProps, workerInspectorProps, unavailableTabs, defaultTab = "Database" }) {
7714
+ function InspectorModal({ open, onOpenChange, modalProps, containerProps, dbExplorerProps, remotesInspectorProps, queueInspectorProps, processorsInspectorProps, integrityInspectorProps, catchUpInspectorProps, workerInspectorProps, unavailableTabs, defaultTab = "Database" }) {
7176
7715
  return /* @__PURE__ */ jsx(Modal, {
7177
7716
  ...modalProps,
7178
7717
  contentProps: {
@@ -7257,6 +7796,20 @@ function InspectorModal({ open, onOpenChange, modalProps, containerProps, dbExpl
7257
7796
  label: "Integrity",
7258
7797
  children: /* @__PURE__ */ jsx(InspectorUnavailable, { message: unavailableTabs.Integrity })
7259
7798
  }) : null,
7799
+ catchUpInspectorProps ? /* @__PURE__ */ jsx(TabContent, {
7800
+ description: "Catch-up inspector",
7801
+ label: "Catch-up",
7802
+ value: "CatchUp",
7803
+ children: /* @__PURE__ */ jsx("div", {
7804
+ className: "h-full",
7805
+ children: /* @__PURE__ */ jsx(CatchUpInspector, { ...catchUpInspectorProps })
7806
+ })
7807
+ }) : unavailableTabs?.CatchUp ? /* @__PURE__ */ jsx(TabContent, {
7808
+ description: "Catch-up inspector",
7809
+ label: "Catch-up",
7810
+ value: "CatchUp",
7811
+ children: /* @__PURE__ */ jsx(InspectorUnavailable, { message: unavailableTabs.CatchUp })
7812
+ }) : null,
7260
7813
  workerInspectorProps && /* @__PURE__ */ jsx(TabContent, {
7261
7814
  description: "Worker inspector",
7262
7815
  label: "Worker",
@@ -7380,10 +7933,12 @@ function ReadRequiredModal(props) {
7380
7933
  useEffect(() => {
7381
7934
  const checkScroll = () => {
7382
7935
  const element = contentRef.current;
7383
- if (element) if (element.scrollHeight > element.clientHeight) {
7384
- setDisableClose(true);
7385
- element.addEventListener("scroll", handleScroll);
7386
- } else setDisableClose(false);
7936
+ if (element) {
7937
+ if (element.scrollHeight > element.clientHeight) {
7938
+ setDisableClose(true);
7939
+ element.addEventListener("scroll", handleScroll);
7940
+ } else setDisableClose(false);
7941
+ }
7387
7942
  };
7388
7943
  const handleScroll = () => {
7389
7944
  const element = contentRef.current;
@@ -7896,6 +8451,7 @@ const VersionPicker = (props) => {
7896
8451
  className: "px-3 py-1 text-xs font-semibold tracking-wide text-muted-foreground uppercase",
7897
8452
  children: "Tags"
7898
8453
  }), filteredTags.map(([tag, ver]) => {
8454
+ const isSelected = selected.kind === "tag" && selected.value === tag;
7899
8455
  return /* @__PURE__ */ jsxs("button", {
7900
8456
  type: "button",
7901
8457
  onClick: () => {
@@ -7906,7 +8462,7 @@ const VersionPicker = (props) => {
7906
8462
  setOpen(false);
7907
8463
  setQuery("");
7908
8464
  },
7909
- className: twMerge("flex w-full items-center justify-between gap-2 px-3 py-1.5 text-left text-xs transition-colors", "hover:hover-effect", selected.kind === "tag" && selected.value === tag && "bg-muted font-semibold"),
8465
+ className: twMerge("flex w-full items-center justify-between gap-2 px-3 py-1.5 text-left text-xs transition-colors", "hover:hover-effect", isSelected && "bg-muted font-semibold"),
7910
8466
  children: [/* @__PURE__ */ jsx("span", {
7911
8467
  className: "truncate text-foreground",
7912
8468
  children: tag
@@ -7927,6 +8483,7 @@ const VersionPicker = (props) => {
7927
8483
  className: "px-3 py-1 text-xs font-semibold tracking-wide text-muted-foreground uppercase",
7928
8484
  children: "Versions"
7929
8485
  }), filteredVersions.map((ver) => {
8486
+ const isSelected = selected.kind === "version" && selected.value === ver;
7930
8487
  return /* @__PURE__ */ jsx("button", {
7931
8488
  type: "button",
7932
8489
  onClick: () => {
@@ -7937,7 +8494,7 @@ const VersionPicker = (props) => {
7937
8494
  setOpen(false);
7938
8495
  setQuery("");
7939
8496
  },
7940
- className: twMerge("flex w-full items-center px-3 py-1.5 text-left text-xs transition-colors", "hover:hover-effect", selected.kind === "version" && selected.value === ver && "bg-muted font-semibold"),
8497
+ className: twMerge("flex w-full items-center px-3 py-1.5 text-left text-xs transition-colors", "hover:hover-effect", isSelected && "bg-muted font-semibold"),
7941
8498
  children: /* @__PURE__ */ jsxs("span", {
7942
8499
  className: "flex min-w-0 items-center gap-1.5 text-foreground",
7943
8500
  children: [/* @__PURE__ */ jsx("span", {
@@ -8086,6 +8643,14 @@ const PackageManagerListItem = (props) => {
8086
8643
  updateTarget
8087
8644
  ]
8088
8645
  }),
8646
+ registryPackage.sharedDepWarnings && registryPackage.sharedDepWarnings.length > 0 && /* @__PURE__ */ jsxs("span", {
8647
+ className: "inline-flex items-center gap-1 rounded-full border border-warning/40 bg-warning/10 px-2 py-0.5 text-[11px] font-medium text-warning",
8648
+ title: registryPackage.sharedDepWarnings.join("\n"),
8649
+ children: [/* @__PURE__ */ jsx(Icon, {
8650
+ name: "Exclamation",
8651
+ size: 10
8652
+ }), "Shared deps out of date"]
8653
+ }),
8089
8654
  !(canPickVersion && hasVersionMetadata) && registryPackage.version && /* @__PURE__ */ jsxs("span", {
8090
8655
  className: "text-xs font-normal text-muted-foreground",
8091
8656
  children: ["v", registryPackage.version]
@@ -8129,7 +8694,8 @@ const PackageManagerListItem = (props) => {
8129
8694
  items: dropdownItems,
8130
8695
  onItemClick: (id) => {
8131
8696
  if (id === "install") {
8132
- onInstall(canPickVersion && hasVersionMetadata ? buildPackageSpec(registryPackage.name, selected.value) : registryPackage.name).catch(console.error);
8697
+ const spec = canPickVersion && hasVersionMetadata ? buildPackageSpec(registryPackage.name, selected.value) : registryPackage.name;
8698
+ onInstall(spec).catch(console.error);
8133
8699
  return;
8134
8700
  }
8135
8701
  if (id === "update") {
@@ -8645,7 +9211,8 @@ const DocumentState = (props) => {
8645
9211
  const { documentState, onCopyState } = props;
8646
9212
  const [, copy] = useCopyToClipboard();
8647
9213
  function handleCopy() {
8648
- copy(JSON.stringify(documentState, null, 2)).then(() => {
9214
+ const jsonState = JSON.stringify(documentState, null, 2);
9215
+ copy(jsonState).then(() => {
8649
9216
  onCopyState?.();
8650
9217
  }).catch((error) => {
8651
9218
  console.error("Failed to copy document state!", error);
@@ -8659,20 +9226,21 @@ const DocumentState = (props) => {
8659
9226
  };
8660
9227
  //#endregion
8661
9228
  //#region src/connect/components/revision-history/header/scope.tsx
9229
+ function labelFor(scope) {
9230
+ return `${scope.charAt(0).toUpperCase()}${scope.slice(1)} scope`;
9231
+ }
8662
9232
  function Scope(props) {
8663
- const { value, onChange } = props;
9233
+ const { scopes, value, onChange } = props;
9234
+ const items = scopes.map((scope) => ({
9235
+ displayValue: labelFor(scope),
9236
+ value: scope
9237
+ }));
8664
9238
  return /* @__PURE__ */ jsx(ConnectSelect, {
8665
9239
  absolutePositionMenu: true,
8666
9240
  containerClassName: "z-10 w-fit rounded-lg bg-background text-xs text-muted-foreground",
8667
9241
  id: "scope select",
8668
9242
  itemClassName: "grid grid-cols-[auto,auto] gap-1 py-2 text-muted-foreground",
8669
- items: [{
8670
- displayValue: "Global scope",
8671
- value: "global"
8672
- }, {
8673
- displayValue: "Local scope",
8674
- value: "local"
8675
- }],
9243
+ items,
8676
9244
  menuClassName: "min-w-0 text-muted-foreground",
8677
9245
  onChange,
8678
9246
  value
@@ -8681,7 +9249,7 @@ function Scope(props) {
8681
9249
  //#endregion
8682
9250
  //#region src/connect/components/revision-history/header/header.tsx
8683
9251
  function Header(props) {
8684
- const { title, docId, scope, onChangeScope, onClose, className, documentState, onCopyState, onCopyDocId, ...divProps } = props;
9252
+ const { title, docId, scope, scopes, onChangeScope, onClose, className, documentState, onCopyState, onCopyDocId, ...divProps } = props;
8685
9253
  return /* @__PURE__ */ jsxs("header", {
8686
9254
  className: twMerge("flex items-center justify-between bg-transparent", className),
8687
9255
  ...divProps,
@@ -8710,6 +9278,7 @@ function Header(props) {
8710
9278
  /* @__PURE__ */ jsx(Branch, {}),
8711
9279
  /* @__PURE__ */ jsx(Scope, {
8712
9280
  onChange: onChangeScope,
9281
+ scopes,
8713
9282
  value: scope
8714
9283
  })
8715
9284
  ]
@@ -8950,9 +9519,10 @@ function Timestamp(props) {
8950
9519
  const timestampNumber = typeof timestamp === "string" && !timestamp.includes("-") ? parseInt(timestamp) : timestamp;
8951
9520
  const date = new Date(timestampNumber);
8952
9521
  const shortDate = format(date, "HH:mm 'UTC'");
9522
+ const longDate = format(date, "eee, dd MMM yyyy HH:mm:ss 'UTC'");
8953
9523
  return /* @__PURE__ */ jsx(CodePopover, {
8954
9524
  content: /* @__PURE__ */ jsx(FormattedJsonViewer, { value: {
8955
- timestampFormatted: format(date, "eee, dd MMM yyyy HH:mm:ss 'UTC'"),
9525
+ timestampFormatted: longDate,
8956
9526
  timestampUtcMs: timestamp
8957
9527
  } }),
8958
9528
  trigger: /* @__PURE__ */ jsxs("span", {
@@ -8980,7 +9550,7 @@ function _Revision(props) {
8980
9550
  })]
8981
9551
  });
8982
9552
  }
8983
- const Revision = /* @__PURE__ */ memo(_Revision);
9553
+ const Revision = /*#__PURE__*/ memo(_Revision);
8984
9554
  //#endregion
8985
9555
  //#region src/connect/components/revision-history/skip/skip.tsx
8986
9556
  function Skip(props) {
@@ -9075,90 +9645,110 @@ function Day(props) {
9075
9645
  }
9076
9646
  //#endregion
9077
9647
  //#region src/connect/components/revision-history/timeline/timeline.tsx
9648
+ /** How far each row is indented from the timeline's vertical line. */
9649
+ const ROW_INSET = 16;
9650
+ /**
9651
+ * How far the line is inset from the scroll container's clip edge -- exactly
9652
+ * the amount the day marker hangs past it (24 pulled back from a 16 inset
9653
+ * leaves 8 on the wrong side of zero). Without this the ring is sliced in
9654
+ * half, since a scrolling box clips on both axes.
9655
+ */
9656
+ const DAY_MARKER_OVERHANG = 8;
9657
+ /**
9658
+ * The revision timeline, windowed by row.
9659
+ *
9660
+ * The scroll element and the content are deliberately two different
9661
+ * elements. A virtualizer decides what is visible by comparing its scroll
9662
+ * element's viewport against the total content size, so a scroll element
9663
+ * sized to the content is a viewport that shows everything at once: it never
9664
+ * scrolls, every row is "visible", and the whole page renders while still
9665
+ * paying the virtualizer's bookkeeping. The outer element here is therefore
9666
+ * bounded and scrollable, and the inner sizer carries the full height that
9667
+ * the absolutely positioned rows are placed within.
9668
+ */
9078
9669
  function Timeline(props) {
9079
- const { localOperations, globalOperations, scope } = props;
9080
- const operations = scope === "local" ? localOperations : globalOperations;
9081
- const initialNumRowsToShow = 100;
9082
- const allRows = useMemo(() => makeRows(operations), [operations]);
9083
- const [scrollAmount, setScrollAmount] = useState(0);
9084
- const [numRowsToShow, setNumRowsToShow] = useState(initialNumRowsToShow);
9085
- const [rows, setRows] = useState(() => allRows.slice(0, numRowsToShow));
9670
+ const { operations, maxHeight = "70vh" } = props;
9671
+ const rows = useMemo(() => makeRows([...operations]), [operations]);
9086
9672
  const parentRef = useRef(null);
9087
- const hasNextPage = rows.length < allRows.length;
9088
9673
  const rowVirtualizer = useVirtualizer({
9089
9674
  count: rows.length,
9090
9675
  getScrollElement: () => parentRef.current,
9091
- estimateSize: (i) => allRows[i].height,
9092
- gap: 8
9676
+ estimateSize: (i) => rows[i]?.height ?? 0,
9677
+ gap: 8,
9678
+ overscan: 8
9093
9679
  });
9094
- useEffect(() => {
9095
- if (!hasNextPage) return;
9096
- const newNumRevisions = initialNumRowsToShow + Math.floor(scrollAmount / 46);
9097
- setNumRowsToShow((prev) => newNumRevisions > prev ? newNumRevisions : prev);
9098
- }, [scrollAmount, hasNextPage]);
9099
- useEffect(() => {
9100
- setRows(allRows.slice(0, numRowsToShow));
9101
- }, [allRows, numRowsToShow]);
9102
- const handleScroll = (e) => {
9103
- setScrollAmount((prev) => {
9104
- const n = prev + e.deltaY;
9105
- if (n < 0) return 0;
9106
- return n;
9107
- });
9108
- };
9109
- useEffect(() => {
9110
- window.addEventListener("wheel", handleScroll);
9111
- return () => {
9112
- window.removeEventListener("wheel", handleScroll);
9113
- };
9114
- }, []);
9115
9680
  return /* @__PURE__ */ jsx("div", {
9116
- className: "border-l border-border dark:border-none",
9681
+ "data-testid": "revision-timeline",
9117
9682
  ref: parentRef,
9118
9683
  style: {
9119
- height: `${rowVirtualizer.getTotalSize()}px`,
9684
+ maxHeight,
9685
+ overflowY: "auto",
9120
9686
  width: "100%",
9121
9687
  position: "relative"
9122
9688
  },
9123
- children: rowVirtualizer.getVirtualItems().map((virtualRow) => {
9124
- const row = rows[virtualRow.index];
9125
- return /* @__PURE__ */ jsxs("div", {
9126
- style: {
9127
- position: "absolute",
9128
- top: 0,
9129
- left: 16,
9130
- width: "100%",
9131
- height: `${virtualRow.size}px`,
9132
- transform: `translateY(${virtualRow.start}px)`
9133
- },
9134
- children: [
9135
- row.type === "revision" && /* @__PURE__ */ createElement(Revision, {
9136
- ...row,
9137
- key: virtualRow.key
9138
- }),
9139
- row.type === "skip" && /* @__PURE__ */ jsx(Skip, { ...row }, virtualRow.key),
9140
- row.type === "day" && /* @__PURE__ */ jsx(Day, { ...row }, virtualRow.key)
9141
- ]
9142
- }, virtualRow.index);
9689
+ children: /* @__PURE__ */ jsx("div", {
9690
+ className: "border-l border-border dark:border-none",
9691
+ style: {
9692
+ height: `${rowVirtualizer.getTotalSize()}px`,
9693
+ marginLeft: DAY_MARKER_OVERHANG,
9694
+ position: "relative"
9695
+ },
9696
+ children: rowVirtualizer.getVirtualItems().map((virtualRow) => {
9697
+ const row = rows[virtualRow.index];
9698
+ if (!row) return null;
9699
+ return /* @__PURE__ */ jsxs("div", {
9700
+ style: {
9701
+ position: "absolute",
9702
+ top: 0,
9703
+ left: ROW_INSET,
9704
+ right: 0,
9705
+ height: `${virtualRow.size}px`,
9706
+ transform: `translateY(${virtualRow.start}px)`
9707
+ },
9708
+ children: [
9709
+ row.type === "revision" && /* @__PURE__ */ jsx(Revision, { ...row }),
9710
+ row.type === "skip" && /* @__PURE__ */ jsx(Skip, { ...row }),
9711
+ row.type === "day" && /* @__PURE__ */ jsx(Day, { ...row })
9712
+ ]
9713
+ }, virtualRow.key);
9714
+ })
9143
9715
  })
9144
9716
  });
9145
9717
  }
9146
9718
  //#endregion
9147
9719
  //#region src/connect/components/revision-history/revision-history.tsx
9148
- function RevisionHistory(props) {
9149
- const { documentTitle, documentId, globalOperations, localOperations, onClose, itemsPerPage = 100, documentState, onCopyState, onCopyDocId } = props;
9150
- const [scope, setScope] = useState("global");
9151
- const visibleOperations = useMemo(() => {
9152
- return garbageCollect(sortOperations(scope === "global" ? globalOperations : localOperations)).sort((a, b) => b.index - a.index);
9720
+ /** The current, scoped props. */
9721
+ /**
9722
+ * Legacy props: the whole global and local history, toggled inside the
9723
+ * component.
9724
+ * @deprecated Pass one scope's `operations` with `scopes`/`scope`/`onScopeChange` and the loading props. Removed in the next major.
9725
+ */
9726
+ /**
9727
+ * The revision history panel. Pages arrive oldest first while the timeline
9728
+ * renders newest first, so rendering progressively would show operations in
9729
+ * the wrong order until the last page landed and would repaint the whole
9730
+ * timeline on every page in between. Instead the component keeps asking for
9731
+ * the next page, showing "Loading operations…" and a running count, until
9732
+ * the walk completes, then renders the pagination and timeline once.
9733
+ */
9734
+ function ScopedRevisionHistory(props) {
9735
+ const { documentTitle, documentId, operations, isLoading, hasNextPage, onLoadNextPage, scopes, scope, onScopeChange, onClose, itemsPerPage = 100, documentState, onCopyState, onCopyDocId, error } = props;
9736
+ useEffect(() => {
9737
+ if (!hasNextPage || isLoading || error) return;
9738
+ const handle = window.setTimeout(onLoadNextPage, 0);
9739
+ return () => window.clearTimeout(handle);
9153
9740
  }, [
9154
- globalOperations,
9155
- localOperations,
9156
- scope
9741
+ hasNextPage,
9742
+ isLoading,
9743
+ onLoadNextPage,
9744
+ error
9157
9745
  ]);
9746
+ const isWalking = !error && (hasNextPage || isLoading && operations.length === 0);
9747
+ const visibleOperations = useMemo(() => isWalking ? [] : garbageCollect(sortOperations([...operations])).sort((a, b) => b.index - a.index), [operations, isWalking]);
9158
9748
  const { pageItems, pages, goToPage, goToNextPage, goToPreviousPage, goToFirstPage, goToLastPage, hiddenNextPages, isNextPageAvailable, isPreviousPageAvailable } = usePagination(visibleOperations, { itemsPerPage });
9159
- function onChangeScope(scope) {
9749
+ function onChangeScope(nextScope) {
9160
9750
  goToFirstPage();
9161
- setScope(scope);
9751
+ onScopeChange(nextScope);
9162
9752
  }
9163
9753
  const PaginationComponent = visibleOperations.length > itemsPerPage ? /* @__PURE__ */ jsx("div", {
9164
9754
  className: "mt-4 flex w-full justify-end",
@@ -9178,38 +9768,76 @@ function RevisionHistory(props) {
9178
9768
  previousPageLabel: "Previous"
9179
9769
  })
9180
9770
  }) : /* @__PURE__ */ jsx("hr", { className: "h-12 border-none" });
9771
+ const hasOperations = visibleOperations.length > 0;
9181
9772
  return /* @__PURE__ */ jsx(ConnectTooltipProvider, { children: /* @__PURE__ */ jsxs("div", {
9182
9773
  className: "p-6",
9183
- children: [
9184
- /* @__PURE__ */ jsx(Header, {
9185
- docId: documentId,
9186
- onChangeScope,
9187
- onClose,
9188
- scope,
9189
- title: documentTitle,
9190
- documentState,
9191
- onCopyState,
9192
- onCopyDocId
9193
- }),
9774
+ children: [/* @__PURE__ */ jsx(Header, {
9775
+ docId: documentId,
9776
+ onChangeScope,
9777
+ onClose,
9778
+ scope,
9779
+ scopes,
9780
+ title: documentTitle,
9781
+ documentState,
9782
+ onCopyState,
9783
+ onCopyDocId
9784
+ }), isWalking ? /* @__PURE__ */ jsxs("div", {
9785
+ className: "mt-4 flex flex-col items-center rounded-md bg-background p-4",
9786
+ children: [/* @__PURE__ */ jsx("h3", {
9787
+ className: "my-40 text-foreground",
9788
+ children: "Loading operations…"
9789
+ }), operations.length > 0 && /* @__PURE__ */ jsxs("p", {
9790
+ className: "text-xs text-muted-foreground",
9791
+ children: [operations.length, " loaded so far"]
9792
+ })]
9793
+ }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [
9194
9794
  PaginationComponent,
9195
- /* @__PURE__ */ jsx("div", {
9196
- className: "mt-4 flex justify-center rounded-md bg-background p-4",
9197
- children: visibleOperations.length > 0 ? /* @__PURE__ */ jsx("div", {
9795
+ /* @__PURE__ */ jsxs("div", {
9796
+ className: "mt-4 flex flex-col items-center rounded-md bg-background p-4",
9797
+ children: [error && /* @__PURE__ */ jsxs("p", {
9798
+ className: "mb-2 text-xs text-destructive",
9799
+ children: ["Could not load the rest of the history: ", error.message]
9800
+ }), hasOperations ? /* @__PURE__ */ jsx("div", {
9198
9801
  className: "grid grid-cols-[minmax(min-content,1018px)]",
9199
- children: /* @__PURE__ */ jsx(Timeline, {
9200
- globalOperations: scope === "global" ? pageItems : [],
9201
- localOperations: scope === "local" ? pageItems : [],
9202
- scope
9203
- })
9204
- }) : /* @__PURE__ */ jsx("h3", {
9802
+ children: /* @__PURE__ */ jsx(Timeline, { operations: pageItems })
9803
+ }) : error ? null : /* @__PURE__ */ jsx("h3", {
9205
9804
  className: "my-40 text-foreground",
9206
9805
  children: "This document has no recorded operations yet."
9207
- })
9806
+ })]
9208
9807
  }),
9209
9808
  PaginationComponent
9210
- ]
9809
+ ] })]
9211
9810
  }) });
9212
9811
  }
9812
+ const LEGACY_SCOPES = ["global", "local"];
9813
+ const noop = () => {};
9814
+ /** Toggles between the whole global and local history loaded up front. */
9815
+ function LegacyRevisionHistory(props) {
9816
+ const { globalOperations, localOperations, ...common } = props;
9817
+ const [scope, setScope] = useState("global");
9818
+ return /* @__PURE__ */ jsx(ScopedRevisionHistory, {
9819
+ ...common,
9820
+ operations: scope === "local" ? localOperations : globalOperations,
9821
+ isLoading: false,
9822
+ hasNextPage: false,
9823
+ onLoadNextPage: noop,
9824
+ scopes: LEGACY_SCOPES,
9825
+ scope,
9826
+ onScopeChange: setScope
9827
+ });
9828
+ }
9829
+ /**
9830
+ * The revision history panel. Pages arrive oldest first while the timeline
9831
+ * renders newest first, so it waits for the whole history to load before
9832
+ * rendering the timeline, showing "Loading operations…" and a running count
9833
+ * in the meantime.
9834
+ *
9835
+ * Also accepts the deprecated `globalOperations`/`localOperations` pair
9836
+ * (see `RevisionHistoryLegacyProps`), toggling between them internally.
9837
+ */
9838
+ function RevisionHistory(props) {
9839
+ return "globalOperations" in props ? /* @__PURE__ */ jsx(LegacyRevisionHistory, { ...props }) : /* @__PURE__ */ jsx(ScopedRevisionHistory, { ...props });
9840
+ }
9213
9841
  //#endregion
9214
9842
  //#region src/connect/components/search-bar/filter-item.tsx
9215
9843
  const FilterItem = (props) => {
@@ -9663,6 +10291,6 @@ const removeSuccessFiles = (files) => {
9663
10291
  return files.filter((file) => file.status !== "SUCCESS");
9664
10292
  };
9665
10293
  //#endregion
9666
- export { About, AccountPopover, AccountPopoverLogin, AddDriveModal, AddLocalDriveForm, AddRemoteDriveForm, AnimatedLoader, AvailablePackagesPanel, Breadcrumb, Breadcrumbs, CONFLICT, ChannelInspector, Combobox, ConnectConfirmationModal, ConnectDeleteDriveModal, ConnectDeleteItemModal, ConnectDropdownMenu, ConnectReplaceDuplicateModal, ConnectSearchBar, ConnectSelect, ConnectSidebar, ConnectSidebarFooter, ConnectSidebarHeader, ConnectTooltip, ConnectTooltipProvider, ConnectUpgradeDriveModal, ConnectionStateBadge, CookieBanner, CreateDocumentModal, CreateDocumentWithTypeModal, DBExplorer, DangerZone, DebugInspector, DefaultEditor, DefaultEditorLoader, DefaultEditorSelect, DependencyVersions, Disclosure, Divider, DocumentStateViewer, DocumentTimeline, DocumentToolbar, DriveAuthGate, DriveSettingsModal, DropZone, DropZoneWrapper, ENSAvatar, ERROR, EditorActionButtons, EditorUndoRedoButtons, FileItem, FolderItem, Footer, FooterLink, FormInput, FormattedJsonViewer, HomeBackgroundImage, HomeScreen, HomeScreenAddDriveItem, HomeScreenItem, INITIAL_SYNC, InspectorModal, InstalledPackagesPanel, IntegrityInspector, LoadingScreen, LogoAnimation, MISSING, ModalButton, NodeInput, ObjectInspectorModal, PackageInstallModal, PackageList, PackageManager, PackageManagerListItem, PackagePanelScrollArea, PackageRegistryError, PackageSubSection, ProcessorsInspector, QueueInspector, ReadRequiredModal, RemotesInspector, RenownLoginMethods, RevisionHistory, SUCCESS, SYNCING, SettingsModal, SidebarAddDriveItem, SidebarItem, SidebarLogin, SidebarUser, SyncStatusIcon, TabContent, Tabs, ThemeSwitch, Toggle, ToolbarButton, ToolbarCloseButton, ToolbarContainer, ToolbarControlsContainer, ToolbarDownloadButton, ToolbarHistoryButton, ToolbarInput, ToolbarName, ToolbarRedoButton, ToolbarSwitchboardButton, ToolbarUndoButton, UploadFileItem, UploadFileList, UploadFileListContainer, WorkerInspector, debugNodeOptions, debugNodeOptionsMap, defaultDriveOptions, defaultNodeOptions, fileNodeDropdownOptions, folderNodeDropdownOptions, formatEthAddress, formatFileSize, generateId, getFolderStatus, locationInfoByLocation, mapProgressStageToStatus, mapUploadsToFileItems, nodeOptions, normalNodeOptions, removeSuccessFiles, sharingTypeOptions, sortFilesByStatus, syncStatuses, useEns, verifyPackageJsonFields };
10294
+ export { About, AccountPopover, AccountPopoverLogin, AddDriveModal, AddLocalDriveForm, AddRemoteDriveForm, AnimatedLoader, AvailablePackagesPanel, Breadcrumb, Breadcrumbs, CONFLICT, CatchUpInspector, ChannelInspector, Combobox, ConnectConfirmationModal, ConnectDeleteDriveModal, ConnectDeleteItemModal, ConnectDropdownMenu, ConnectReplaceDuplicateModal, ConnectSearchBar, ConnectSelect, ConnectSidebar, ConnectSidebarFooter, ConnectSidebarHeader, ConnectTooltip, ConnectTooltipProvider, ConnectUpgradeDriveModal, ConnectionStateBadge, CookieBanner, CreateDocumentModal, CreateDocumentWithTypeModal, DBExplorer, DangerZone, DebugInspector, DefaultEditor, DefaultEditorLoader, DefaultEditorSelect, DependencyVersions, Disclosure, Divider, DocumentStateViewer, DocumentTimeline, DocumentToolbar, DriveAuthGate, DriveSettingsModal, DropZone, DropZoneWrapper, ENSAvatar, ERROR, EditorActionButtons, EditorUndoRedoButtons, FileItem, FolderItem, Footer, FooterLink, FormInput, FormattedJsonViewer, HomeBackgroundImage, HomeScreen, HomeScreenAddDriveItem, HomeScreenItem, INITIAL_SYNC, InspectorModal, InstalledPackagesPanel, IntegrityInspector, LoadingScreen, LogoAnimation, MISSING, ModalButton, NodeInput, ObjectInspectorModal, PackageInstallModal, PackageList, PackageManager, PackageManagerListItem, PackagePanelScrollArea, PackageRegistryError, PackageSubSection, PeerAgreementPanel, ProcessorsInspector, QueueInspector, ReadRequiredModal, RemotesInspector, RenownLoginMethods, RevisionHistory, SUCCESS, SYNCING, SettingsModal, SidebarAddDriveItem, SidebarItem, SidebarLogin, SidebarUser, SyncStatusIcon, TabContent, Tabs, ThemeSwitch, Toggle, ToolbarButton, ToolbarCloseButton, ToolbarContainer, ToolbarControlsContainer, ToolbarDownloadButton, ToolbarHistoryButton, ToolbarInput, ToolbarName, ToolbarRedoButton, ToolbarSwitchboardButton, ToolbarUndoButton, UploadFileItem, UploadFileList, UploadFileListContainer, WorkerInspector, debugNodeOptions, debugNodeOptionsMap, defaultDriveOptions, defaultNodeOptions, fileNodeDropdownOptions, folderNodeDropdownOptions, formatEthAddress, formatFileSize, generateId, getFolderStatus, locationInfoByLocation, mapProgressStageToStatus, mapUploadsToFileItems, nodeOptions, normalNodeOptions, peerManifestLabel, removeSuccessFiles, sharingTypeOptions, sortFilesByStatus, syncStatuses, useEns, verifyPackageJsonFields };
9667
10295
 
9668
10296
  //# sourceMappingURL=index.js.map