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

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 (405) hide show
  1. package/dist/PinFilled-cSbUqZCA.js +41 -0
  2. package/dist/PinFilled-cSbUqZCA.js.map +1 -0
  3. package/dist/{Removed-CO_5C1ce.js → Removed-OP4eTrAN.js} +1 -1
  4. package/dist/{Removed-CO_5C1ce.js.map → Removed-OP4eTrAN.js.map} +1 -1
  5. package/dist/{Tabler-FjvVqX5a.js → Tabler-rjLxlzUV.js} +1 -1
  6. package/dist/{Tabler-FjvVqX5a.js.map → Tabler-rjLxlzUV.js.map} +1 -1
  7. package/dist/add-local-drive-form.impl-COIpcmgW.js +76 -0
  8. package/dist/add-local-drive-form.impl-COIpcmgW.js.map +1 -0
  9. package/dist/add-remote-drive-form.impl-_SqOzbSt.js +123 -0
  10. package/dist/add-remote-drive-form.impl-_SqOzbSt.js.map +1 -0
  11. package/dist/address-DVC3zalI.js +92 -0
  12. package/dist/address-DVC3zalI.js.map +1 -0
  13. package/dist/button-BYcXvZXr.d.ts +13 -0
  14. package/dist/button-BYcXvZXr.d.ts.map +1 -0
  15. package/dist/{character-counter-BWoglM2P.d.ts → character-counter-BZmZZCHN.d.ts} +2 -1
  16. package/dist/character-counter-BZmZZCHN.d.ts.map +1 -0
  17. package/dist/{checkbox-CGBtXQnI.d.ts → checkbox-BIAGwP7d.d.ts} +4 -4
  18. package/dist/checkbox-BIAGwP7d.d.ts.map +1 -0
  19. package/dist/{checkbox-base-CZo-4eL0.d.ts → checkbox-base-Bm0GPWgm.d.ts} +2 -2
  20. package/dist/checkbox-base-Bm0GPWgm.d.ts.map +1 -0
  21. package/dist/combobox.impl-CQHG0NgO.js +144 -0
  22. package/dist/combobox.impl-CQHG0NgO.js.map +1 -0
  23. package/dist/{command-tFzjgzge.d.ts → command-DHHTsHfH.d.ts} +5 -5
  24. package/dist/command-DHHTsHfH.d.ts.map +1 -0
  25. package/dist/connect/components/toast/toast.d.ts +8 -10
  26. package/dist/connect/components/toast/toast.d.ts.map +1 -1
  27. package/dist/connect/components/toast/toast.js +4 -4
  28. package/dist/connect/components/toast/toast.js.map +1 -1
  29. package/dist/connect/index.d.ts +524 -364
  30. package/dist/connect/index.d.ts.map +1 -1
  31. package/dist/connect/index.js +1030 -1620
  32. package/dist/connect/index.js.map +1 -1
  33. package/dist/{content-BHWIqmio.d.ts → content-Cv0kRppo.d.ts} +3 -3
  34. package/dist/content-Cv0kRppo.d.ts.map +1 -0
  35. package/dist/default-editor.impl-a6EOuEme.js +30 -0
  36. package/dist/default-editor.impl-a6EOuEme.js.map +1 -0
  37. package/dist/document-timeline.impl-zx6f7k2d.js +254 -0
  38. package/dist/document-timeline.impl-zx6f7k2d.js.map +1 -0
  39. package/dist/drive-settings-form.impl-yV9u4h5c.js +172 -0
  40. package/dist/drive-settings-form.impl-yV9u4h5c.js.map +1 -0
  41. package/dist/{enum-field-CwZVs3Ux.d.ts → enum-field-Cub1rt3e.d.ts} +4 -4
  42. package/dist/enum-field-Cub1rt3e.d.ts.map +1 -0
  43. package/dist/{form-CKRKn0TQ.d.ts → form-Brj5AQNr.d.ts} +3 -4
  44. package/dist/form-Brj5AQNr.d.ts.map +1 -0
  45. package/dist/{form-description-CYkcMEzm.d.ts → form-description-DJrDJzJi.d.ts} +2 -1
  46. package/dist/form-description-DJrDJzJi.d.ts.map +1 -0
  47. package/dist/{form-group-C8kL6pdZ.d.ts → form-group-Ckd28lpW.d.ts} +2 -1
  48. package/dist/form-group-Ckd28lpW.d.ts.map +1 -0
  49. package/dist/{form-label-b6nQi0XO.d.ts → form-label-C8ghd_lR.d.ts} +2 -1
  50. package/dist/form-label-C8ghd_lR.d.ts.map +1 -0
  51. package/dist/{form-message-Dq72nBXz.d.ts → form-message-CnKUkvlj.d.ts} +2 -1
  52. package/dist/form-message-CnKUkvlj.d.ts.map +1 -0
  53. package/dist/form-server-error-message-D2tFtDZ0.d.ts +6 -0
  54. package/dist/form-server-error-message-D2tFtDZ0.d.ts.map +1 -0
  55. package/dist/formatted-json-viewer.impl-COERJCiE.js +58 -0
  56. package/dist/formatted-json-viewer.impl-COERJCiE.js.map +1 -0
  57. package/dist/icon-DQ2yrWYv.js +358 -0
  58. package/dist/icon-DQ2yrWYv.js.map +1 -0
  59. package/dist/{icon-C4QOpsdI.js → icon-components-NK-y5dkv.js} +7 -481
  60. package/dist/icon-components-NK-y5dkv.js.map +1 -0
  61. package/dist/{id-autocomplete-C-hwriS5.d.ts → id-autocomplete-8LcmtjSR.d.ts} +3 -3
  62. package/dist/id-autocomplete-8LcmtjSR.d.ts.map +1 -0
  63. package/dist/{id-autocomplete-input-container-DFEyPh5p.d.ts → id-autocomplete-input-container-D2L7p-Yh.d.ts} +3 -3
  64. package/dist/id-autocomplete-input-container-D2L7p-Yh.d.ts.map +1 -0
  65. package/dist/{id-autocomplete-list-EzLpF23C.d.ts → id-autocomplete-list-BXvN07Hr.d.ts} +3 -3
  66. package/dist/id-autocomplete-list-BXvN07Hr.d.ts.map +1 -0
  67. package/dist/{id-autocomplete-list-option-CB5B07Hi.d.ts → id-autocomplete-list-option-D_1BOv50.d.ts} +4 -3
  68. package/dist/id-autocomplete-list-option-D_1BOv50.d.ts.map +1 -0
  69. package/dist/{index--hDSfvJT.d.ts → index-5FEr1tXH.d.ts} +25 -59
  70. package/dist/index-5FEr1tXH.d.ts.map +1 -0
  71. package/dist/index-C-Tup7Br.d.ts +4 -0
  72. package/dist/index-D6Zk5OLV.d.ts +4 -0
  73. package/dist/index-i-xHUsLr.d.ts +30 -0
  74. package/dist/index-jfVVOU-H.d.ts +2 -0
  75. package/dist/index.d.ts +5 -3
  76. package/dist/index.js +2 -2
  77. package/dist/{input-BpEQjaWV.d.ts → input-WDvjJFqf.d.ts} +2 -2
  78. package/dist/input-WDvjJFqf.d.ts.map +1 -0
  79. package/dist/json-viewer-Kg0IBIt-.d.ts +7 -0
  80. package/dist/json-viewer-Kg0IBIt-.d.ts.map +1 -0
  81. package/dist/label-nH2HoKfI.js +15 -0
  82. package/dist/label-nH2HoKfI.js.map +1 -0
  83. package/dist/location-info-C3YbSsV0.js +47 -0
  84. package/dist/location-info-C3YbSsV0.js.map +1 -0
  85. package/dist/{message-list-C4mPpBBa.d.ts → message-list-D8d2ltLd.d.ts} +3 -3
  86. package/dist/message-list-D8d2ltLd.d.ts.map +1 -0
  87. package/dist/{popover-XSBOuSih.d.ts → popover-TvQxa0RU.d.ts} +2 -2
  88. package/dist/popover-TvQxa0RU.d.ts.map +1 -0
  89. package/dist/{radio-eL0Oy86J.d.ts → radio-CTS4WsNy.d.ts} +2 -2
  90. package/dist/radio-CTS4WsNy.d.ts.map +1 -0
  91. package/dist/{radio-group-Bkli6nUz.d.ts → radio-group-CROIwgYz.d.ts} +2 -2
  92. package/dist/radio-group-CROIwgYz.d.ts.map +1 -0
  93. package/dist/{radio-group-field-wlqeiLN3.d.ts → radio-group-field-X18o287K.d.ts} +5 -6
  94. package/dist/radio-group-field-X18o287K.d.ts.map +1 -0
  95. package/dist/revision-history.impl-DRbeai2m.js +642 -0
  96. package/dist/revision-history.impl-DRbeai2m.js.map +1 -0
  97. package/dist/{search-autocomplete-BJJkrZ1i.d.ts → search-autocomplete-COvFRZIb.d.ts} +3 -3
  98. package/dist/search-autocomplete-COvFRZIb.d.ts.map +1 -0
  99. package/dist/{select-field-C97QIhUL.d.ts → select-field-DHaCiAso.d.ts} +5 -5
  100. package/dist/select-field-DHaCiAso.d.ts.map +1 -0
  101. package/dist/{selected-content-CGsK5PR4.d.ts → selected-content-CSTFkQr9.d.ts} +3 -3
  102. package/dist/selected-content-CSTFkQr9.d.ts.map +1 -0
  103. package/dist/{sidebar-DOoE4krt.d.ts → sidebar-DFqreKf1.d.ts} +3 -3
  104. package/dist/sidebar-DFqreKf1.d.ts.map +1 -0
  105. package/dist/{sidebar-provider-C2eyz9TL.d.ts → sidebar-provider-CZHhqW5n.d.ts} +4 -8
  106. package/dist/sidebar-provider-CZHhqW5n.d.ts.map +1 -0
  107. package/dist/splitted-input-diff-DNKcSOAB.d.ts +11 -0
  108. package/dist/splitted-input-diff-DNKcSOAB.d.ts.map +1 -0
  109. package/dist/{src-CVV6HzQZ.js → src-DhSJCeu5.js} +180 -24
  110. package/dist/src-DhSJCeu5.js.map +1 -0
  111. package/dist/style.css +144 -62
  112. package/dist/text-field-Dq1DTC_t.d.ts +9 -0
  113. package/dist/text-field-Dq1DTC_t.d.ts.map +1 -0
  114. package/dist/{text-input-8zXIWHLi.d.ts → text-input-CRjOT54_.d.ts} +5 -6
  115. package/dist/text-input-CRjOT54_.d.ts.map +1 -0
  116. package/dist/text-input-diff-CcF0QblL.d.ts +12 -0
  117. package/dist/text-input-diff-CcF0QblL.d.ts.map +1 -0
  118. package/dist/{tooltip-BxS9HpML.d.ts → tooltip-B4uQJPUm.d.ts} +3 -4
  119. package/dist/tooltip-B4uQJPUm.d.ts.map +1 -0
  120. package/dist/{types-Bsn62tJB.d.ts → types-BNTIrhb5.d.ts} +2 -1
  121. package/dist/types-BNTIrhb5.d.ts.map +1 -0
  122. package/dist/{types-BTq-St7H.d.ts → types-CpFPFB1a.d.ts} +2 -1
  123. package/dist/types-CpFPFB1a.d.ts.map +1 -0
  124. package/dist/{types-C04Q_Fan.d.ts → types-D4CirgNk.d.ts} +2 -2
  125. package/dist/types-D4CirgNk.d.ts.map +1 -0
  126. package/dist/{types-CNbvfWjh.d.ts → types-FTqFl5du.d.ts} +3 -3
  127. package/dist/types-FTqFl5du.d.ts.map +1 -0
  128. package/dist/types-TZijOYrE.d.ts +17 -0
  129. package/dist/types-TZijOYrE.d.ts.map +1 -0
  130. package/dist/ui/components/button/button.d.ts +3 -2
  131. package/dist/ui/components/button/button.js +1 -1
  132. package/dist/ui/components/button/button.js.map +1 -1
  133. package/dist/ui/components/character-counter/character-counter.d.ts +3 -2
  134. package/dist/ui/components/character-counter/character-counter.js.map +1 -1
  135. package/dist/ui/components/checkbox/checkbox-base.d.ts +3 -2
  136. package/dist/ui/components/checkbox/checkbox-base.js +1 -1
  137. package/dist/ui/components/checkbox/checkbox-base.js.map +1 -1
  138. package/dist/ui/components/checkbox/checkbox.d.ts +3 -2
  139. package/dist/ui/components/checkbox/checkbox.js +1 -1
  140. package/dist/ui/components/checkbox/checkbox.js.map +1 -1
  141. package/dist/ui/components/command/command.d.ts +3 -2
  142. package/dist/ui/components/command/command.js +8 -8
  143. package/dist/ui/components/command/command.js.map +1 -1
  144. package/dist/ui/components/enum-field/enum-field.d.ts +3 -2
  145. package/dist/ui/components/enum-field/enum-field.js +1 -1
  146. package/dist/ui/components/enum-field/enum-field.js.map +1 -1
  147. package/dist/ui/components/enum-field/types.d.ts +3 -2
  148. package/dist/ui/components/form/form.d.ts +3 -2
  149. package/dist/ui/components/form/form.js +1 -1
  150. package/dist/ui/components/form/form.js.map +1 -1
  151. package/dist/ui/components/form/utils.d.ts +4 -4
  152. package/dist/ui/components/form/utils.d.ts.map +1 -1
  153. package/dist/ui/components/form/utils.js.map +1 -1
  154. package/dist/ui/components/form-description/form-description.d.ts +3 -2
  155. package/dist/ui/components/form-description/form-description.js.map +1 -1
  156. package/dist/ui/components/form-group/form-group.d.ts +3 -2
  157. package/dist/ui/components/form-group/form-group.js.map +1 -1
  158. package/dist/ui/components/form-label/form-label.d.ts +3 -2
  159. package/dist/ui/components/form-label/form-label.js +3 -2
  160. package/dist/ui/components/form-label/form-label.js.map +1 -1
  161. package/dist/ui/components/form-message/form-message.d.ts +3 -2
  162. package/dist/ui/components/form-message/form-message.js.map +1 -1
  163. package/dist/ui/components/form-message/form-server-error-message.d.ts +3 -2
  164. package/dist/ui/components/form-message/form-server-error-message.js.map +1 -1
  165. package/dist/ui/components/form-message/message-list.d.ts +3 -2
  166. package/dist/ui/components/form-message/message-list.js.map +1 -1
  167. package/dist/ui/components/id-autocomplete/id-autocomplete-context.d.ts +3 -5
  168. package/dist/ui/components/id-autocomplete/id-autocomplete-context.d.ts.map +1 -1
  169. package/dist/ui/components/id-autocomplete/id-autocomplete-context.js +1 -1
  170. package/dist/ui/components/id-autocomplete/id-autocomplete-context.js.map +1 -1
  171. package/dist/ui/components/id-autocomplete/id-autocomplete-input-container.d.ts +3 -2
  172. package/dist/ui/components/id-autocomplete/id-autocomplete-input-container.js +2 -2
  173. package/dist/ui/components/id-autocomplete/id-autocomplete-input-container.js.map +1 -1
  174. package/dist/ui/components/id-autocomplete/id-autocomplete-list-option.d.ts +3 -2
  175. package/dist/ui/components/id-autocomplete/id-autocomplete-list-option.js +2 -2
  176. package/dist/ui/components/id-autocomplete/id-autocomplete-list-option.js.map +1 -1
  177. package/dist/ui/components/id-autocomplete/id-autocomplete-list.d.ts +3 -2
  178. package/dist/ui/components/id-autocomplete/id-autocomplete-list.js.map +1 -1
  179. package/dist/ui/components/id-autocomplete/id-autocomplete.d.ts +3 -2
  180. package/dist/ui/components/id-autocomplete/id-autocomplete.js +1 -1
  181. package/dist/ui/components/id-autocomplete/id-autocomplete.js.map +1 -1
  182. package/dist/ui/components/id-autocomplete/types.d.ts +3 -2
  183. package/dist/ui/components/id-autocomplete/use-id-autocomplete.d.ts +3 -2
  184. package/dist/ui/components/id-autocomplete/use-id-autocomplete.js.map +1 -1
  185. package/dist/ui/components/index.d.ts +42 -40
  186. package/dist/ui/components/input/input.d.ts +3 -2
  187. package/dist/ui/components/input/input.js +1 -1
  188. package/dist/ui/components/input/input.js.map +1 -1
  189. package/dist/ui/components/input/splitted-input-diff.d.ts +3 -2
  190. package/dist/ui/components/input/splitted-input-diff.js +10 -9
  191. package/dist/ui/components/input/splitted-input-diff.js.map +1 -1
  192. package/dist/ui/components/input/subcomponent/input-diff.d.ts +2 -11
  193. package/dist/ui/components/input/subcomponent/input-diff.d.ts.map +1 -1
  194. package/dist/ui/components/input/subcomponent/input-diff.js.map +1 -1
  195. package/dist/ui/components/input/subcomponent/text-diff.d.ts +3 -12
  196. package/dist/ui/components/input/subcomponent/text-diff.d.ts.map +1 -1
  197. package/dist/ui/components/input/subcomponent/text-diff.js.map +1 -1
  198. package/dist/ui/components/json-viewer/json-viewer.d.ts +3 -2
  199. package/dist/ui/components/json-viewer/json-viewer.js +1 -1
  200. package/dist/ui/components/json-viewer/json-viewer.js.map +1 -1
  201. package/dist/ui/components/popover/popover.d.ts +3 -2
  202. package/dist/ui/components/popover/popover.js +1 -1
  203. package/dist/ui/components/popover/popover.js.map +1 -1
  204. package/dist/ui/components/radio-group-field/radio-group-field.d.ts +3 -2
  205. package/dist/ui/components/radio-group-field/radio-group-field.js +4 -3
  206. package/dist/ui/components/radio-group-field/radio-group-field.js.map +1 -1
  207. package/dist/ui/components/radio-group-field/radio-group.d.ts +3 -2
  208. package/dist/ui/components/radio-group-field/radio-group.js +1 -1
  209. package/dist/ui/components/radio-group-field/radio-group.js.map +1 -1
  210. package/dist/ui/components/radio-group-field/radio.d.ts +3 -2
  211. package/dist/ui/components/radio-group-field/radio.js +1 -1
  212. package/dist/ui/components/radio-group-field/radio.js.map +1 -1
  213. package/dist/ui/components/search-autocomplete/index.d.ts +6 -4
  214. package/dist/ui/components/search-autocomplete/search-autocomplete.d.ts +3 -2
  215. package/dist/ui/components/search-autocomplete/search-autocomplete.js.map +1 -1
  216. package/dist/ui/components/search-autocomplete/types.d.ts +3 -2
  217. package/dist/ui/components/search-autocomplete/use-search-autocomplete.d.ts +3 -2
  218. package/dist/ui/components/search-autocomplete/use-search-autocomplete.js.map +1 -1
  219. package/dist/ui/components/select-field/content.d.ts +3 -2
  220. package/dist/ui/components/select-field/content.js +1 -1
  221. package/dist/ui/components/select-field/content.js.map +1 -1
  222. package/dist/ui/components/select-field/select-field.d.ts +3 -2
  223. package/dist/ui/components/select-field/select-field.js +1 -1
  224. package/dist/ui/components/select-field/select-field.js.map +1 -1
  225. package/dist/ui/components/select-field/selected-content.d.ts +3 -2
  226. package/dist/ui/components/select-field/selected-content.js +1 -1
  227. package/dist/ui/components/select-field/selected-content.js.map +1 -1
  228. package/dist/ui/components/select-field/subcomponents/CommandItemList.d.ts +3 -4
  229. package/dist/ui/components/select-field/subcomponents/CommandItemList.d.ts.map +1 -1
  230. package/dist/ui/components/select-field/subcomponents/CommandItemList.js +1 -1
  231. package/dist/ui/components/select-field/subcomponents/CommandItemList.js.map +1 -1
  232. package/dist/ui/components/select-field/use-select-field.d.ts +4 -12
  233. package/dist/ui/components/select-field/use-select-field.d.ts.map +1 -1
  234. package/dist/ui/components/select-field/use-select-field.js.map +1 -1
  235. package/dist/ui/components/sidebar/index.d.ts +6 -4
  236. package/dist/ui/components/sidebar/sidebar.d.ts +3 -2
  237. package/dist/ui/components/sidebar/sidebar.js +1 -1
  238. package/dist/ui/components/sidebar/sidebar.js.map +1 -1
  239. package/dist/ui/components/sidebar/subcomponents/sidebar-content-area.d.ts +2 -7
  240. package/dist/ui/components/sidebar/subcomponents/sidebar-content-area.d.ts.map +1 -1
  241. package/dist/ui/components/sidebar/subcomponents/sidebar-content-area.js +1 -1
  242. package/dist/ui/components/sidebar/subcomponents/sidebar-content-area.js.map +1 -1
  243. package/dist/ui/components/sidebar/subcomponents/sidebar-header.d.ts +2 -2
  244. package/dist/ui/components/sidebar/subcomponents/sidebar-header.d.ts.map +1 -1
  245. package/dist/ui/components/sidebar/subcomponents/sidebar-header.js.map +1 -1
  246. package/dist/ui/components/sidebar/subcomponents/sidebar-item.d.ts +3 -18
  247. package/dist/ui/components/sidebar/subcomponents/sidebar-item.d.ts.map +1 -1
  248. package/dist/ui/components/sidebar/subcomponents/sidebar-item.js +4 -3
  249. package/dist/ui/components/sidebar/subcomponents/sidebar-item.js.map +1 -1
  250. package/dist/ui/components/sidebar/subcomponents/sidebar-pinning-area.d.ts +2 -4
  251. package/dist/ui/components/sidebar/subcomponents/sidebar-pinning-area.d.ts.map +1 -1
  252. package/dist/ui/components/sidebar/subcomponents/sidebar-pinning-area.js.map +1 -1
  253. package/dist/ui/components/sidebar/subcomponents/sidebar-provider/index.d.ts +4 -2
  254. package/dist/ui/components/sidebar/subcomponents/sidebar-provider/sidebar-provider.d.ts +3 -2
  255. package/dist/ui/components/sidebar/subcomponents/sidebar-provider/sidebar-provider.js +2 -2
  256. package/dist/ui/components/sidebar/subcomponents/sidebar-provider/sidebar-provider.js.map +1 -1
  257. package/dist/ui/components/sidebar/subcomponents/sidebar-provider/sidebar-reducer.d.ts +7 -8
  258. package/dist/ui/components/sidebar/subcomponents/sidebar-provider/sidebar-reducer.d.ts.map +1 -1
  259. package/dist/ui/components/sidebar/subcomponents/sidebar-provider/sidebar-reducer.js +1 -1
  260. package/dist/ui/components/sidebar/subcomponents/sidebar-provider/sidebar-reducer.js.map +1 -1
  261. package/dist/ui/components/sidebar/subcomponents/sidebar-search/index.d.ts +2 -1
  262. package/dist/ui/components/sidebar/subcomponents/sidebar-search/search-navigation-arrow.d.ts +2 -2
  263. package/dist/ui/components/sidebar/subcomponents/sidebar-search/search-navigation-arrow.d.ts.map +1 -1
  264. package/dist/ui/components/sidebar/subcomponents/sidebar-search/search-navigation-arrow.js.map +1 -1
  265. package/dist/ui/components/sidebar/subcomponents/sidebar-search/search-result-counter.d.ts +2 -2
  266. package/dist/ui/components/sidebar/subcomponents/sidebar-search/search-result-counter.d.ts.map +1 -1
  267. package/dist/ui/components/sidebar/subcomponents/sidebar-search/search-result-counter.js.map +1 -1
  268. package/dist/ui/components/sidebar/subcomponents/sidebar-search/sidebar-search.d.ts +2 -2
  269. package/dist/ui/components/sidebar/subcomponents/sidebar-search/sidebar-search.d.ts.map +1 -1
  270. package/dist/ui/components/sidebar/subcomponents/sidebar-search/sidebar-search.js +1 -1
  271. package/dist/ui/components/sidebar/subcomponents/sidebar-search/sidebar-search.js.map +1 -1
  272. package/dist/ui/components/sidebar/subcomponents/sidebar-skeleton-item.d.ts +2 -8
  273. package/dist/ui/components/sidebar/subcomponents/sidebar-skeleton-item.d.ts.map +1 -1
  274. package/dist/ui/components/sidebar/subcomponents/sidebar-skeleton-item.js +2 -1
  275. package/dist/ui/components/sidebar/subcomponents/sidebar-skeleton-item.js.map +1 -1
  276. package/dist/ui/components/sidebar/subcomponents/sidebar-skeleton.d.ts +2 -4
  277. package/dist/ui/components/sidebar/subcomponents/sidebar-skeleton.d.ts.map +1 -1
  278. package/dist/ui/components/sidebar/subcomponents/sidebar-skeleton.js.map +1 -1
  279. package/dist/ui/components/sidebar/subcomponents/status-icon.d.ts +3 -9
  280. package/dist/ui/components/sidebar/subcomponents/status-icon.d.ts.map +1 -1
  281. package/dist/ui/components/sidebar/subcomponents/status-icon.js +1 -1
  282. package/dist/ui/components/sidebar/subcomponents/status-icon.js.map +1 -1
  283. package/dist/ui/components/sidebar/types.d.ts +3 -2
  284. package/dist/ui/components/sidebar/types.js +1 -1
  285. package/dist/ui/components/sidebar/types.js.map +1 -1
  286. package/dist/ui/components/sidebar/use-ellipsis.d.ts +2 -2
  287. package/dist/ui/components/sidebar/use-ellipsis.d.ts.map +1 -1
  288. package/dist/ui/components/sidebar/use-ellipsis.js.map +1 -1
  289. package/dist/ui/components/sidebar/use-sidebar-resize.d.ts +3 -9
  290. package/dist/ui/components/sidebar/use-sidebar-resize.d.ts.map +1 -1
  291. package/dist/ui/components/sidebar/use-sidebar-resize.js.map +1 -1
  292. package/dist/ui/components/sidebar/utils.d.ts +10 -11
  293. package/dist/ui/components/sidebar/utils.d.ts.map +1 -1
  294. package/dist/ui/components/sidebar/utils.js.map +1 -1
  295. package/dist/ui/components/text-field/text-field.d.ts +3 -2
  296. package/dist/ui/components/text-field/text-field.js +3 -2
  297. package/dist/ui/components/text-field/text-field.js.map +1 -1
  298. package/dist/ui/components/text-input/text-input-diff.d.ts +3 -2
  299. package/dist/ui/components/text-input/text-input-diff.js.map +1 -1
  300. package/dist/ui/components/text-input/text-input.d.ts +3 -2
  301. package/dist/ui/components/text-input/text-input.js +1 -1
  302. package/dist/ui/components/text-input/text-input.js.map +1 -1
  303. package/dist/ui/components/text-input/types.d.ts +3 -2
  304. package/dist/ui/components/tooltip/tooltip.d.ts +3 -2
  305. package/dist/ui/components/tooltip/tooltip.js +1 -1
  306. package/dist/ui/components/tooltip/tooltip.js.map +1 -1
  307. package/dist/ui/components/types.d.ts +3 -2
  308. package/dist/ui/components/value-transformer/value-transformer.d.ts +3 -2
  309. package/dist/ui/components/value-transformer/value-transformer.js +5 -3
  310. package/dist/ui/components/value-transformer/value-transformer.js.map +1 -1
  311. package/dist/ui/components/with-field-validation/with-field-validation.d.ts +3 -2
  312. package/dist/ui/components/with-field-validation/with-field-validation.js +1 -1
  313. package/dist/ui/components/with-field-validation/with-field-validation.js.map +1 -1
  314. package/dist/ui/index.d.ts +44 -42
  315. package/dist/ui/lib/date-picker.d.ts +4 -5
  316. package/dist/ui/lib/date-picker.d.ts.map +1 -1
  317. package/dist/ui/lib/date-picker.js +2 -1
  318. package/dist/ui/lib/date-picker.js.map +1 -1
  319. package/dist/ui/lib/date-time-picker.d.ts +6 -6
  320. package/dist/ui/lib/date-time-picker.d.ts.map +1 -1
  321. package/dist/ui/lib/date-time-picker.js.map +1 -1
  322. package/dist/ui/lib/deep-equal.d.ts +2 -2
  323. package/dist/ui/lib/deep-equal.d.ts.map +1 -1
  324. package/dist/ui/lib/deep-equal.js.map +1 -1
  325. package/dist/ui/lib/index.d.ts +2 -1
  326. package/dist/ui/lib/is-empty.d.ts +2 -2
  327. package/dist/ui/lib/is-empty.d.ts.map +1 -1
  328. package/dist/ui/lib/is-empty.js.map +1 -1
  329. package/dist/ui/lib/shared-value-transformers.d.ts +3 -4
  330. package/dist/ui/lib/shared-value-transformers.d.ts.map +1 -1
  331. package/dist/ui/lib/shared-value-transformers.js.map +1 -1
  332. package/dist/ui/lib/types.d.ts +3 -2
  333. package/dist/ui/lib/value-cast.d.ts +4 -4
  334. package/dist/ui/lib/value-cast.d.ts.map +1 -1
  335. package/dist/ui/lib/value-cast.js +10 -4
  336. package/dist/ui/lib/value-cast.js.map +1 -1
  337. package/dist/ui/types.d.ts +4 -3
  338. package/dist/{use-id-autocomplete-By7YSChC.d.ts → use-id-autocomplete-m9Bf0qCy.d.ts} +5 -16
  339. package/dist/use-id-autocomplete-m9Bf0qCy.d.ts.map +1 -0
  340. package/dist/{use-search-autocomplete-IfcQ_gKh.d.ts → use-search-autocomplete-vSvcsvcB.d.ts} +5 -6
  341. package/dist/use-search-autocomplete-vSvcsvcB.d.ts.map +1 -0
  342. package/dist/{value-transformer-DQjqtNih.d.ts → value-transformer-BtUh3-UP.d.ts} +5 -7
  343. package/dist/value-transformer-BtUh3-UP.d.ts.map +1 -0
  344. package/dist/{with-field-validation-Di5D8vU-.d.ts → with-field-validation-Bh26a6fr.d.ts} +3 -3
  345. package/dist/with-field-validation-Bh26a6fr.d.ts.map +1 -0
  346. package/package.json +17 -12
  347. package/plugins.css +6 -0
  348. package/tailwind.css +213 -0
  349. package/vendor.css +3 -0
  350. package/dist/button-C8doazjv.d.ts +0 -15
  351. package/dist/button-C8doazjv.d.ts.map +0 -1
  352. package/dist/character-counter-BWoglM2P.d.ts.map +0 -1
  353. package/dist/checkbox-CGBtXQnI.d.ts.map +0 -1
  354. package/dist/checkbox-base-CZo-4eL0.d.ts.map +0 -1
  355. package/dist/command-tFzjgzge.d.ts.map +0 -1
  356. package/dist/content-BHWIqmio.d.ts.map +0 -1
  357. package/dist/enum-field-CwZVs3Ux.d.ts.map +0 -1
  358. package/dist/form-CKRKn0TQ.d.ts.map +0 -1
  359. package/dist/form-description-CYkcMEzm.d.ts.map +0 -1
  360. package/dist/form-group-C8kL6pdZ.d.ts.map +0 -1
  361. package/dist/form-label-b6nQi0XO.d.ts.map +0 -1
  362. package/dist/form-message-Dq72nBXz.d.ts.map +0 -1
  363. package/dist/form-server-error-message-DXbaiTfF.d.ts +0 -7
  364. package/dist/form-server-error-message-DXbaiTfF.d.ts.map +0 -1
  365. package/dist/icon-C4QOpsdI.js.map +0 -1
  366. package/dist/id-autocomplete-C-hwriS5.d.ts.map +0 -1
  367. package/dist/id-autocomplete-input-container-DFEyPh5p.d.ts.map +0 -1
  368. package/dist/id-autocomplete-list-EzLpF23C.d.ts.map +0 -1
  369. package/dist/id-autocomplete-list-option-CB5B07Hi.d.ts.map +0 -1
  370. package/dist/index--hDSfvJT.d.ts.map +0 -1
  371. package/dist/index--okzibnx.d.ts +0 -1
  372. package/dist/index-BLwMeReG.d.ts +0 -1
  373. package/dist/index-Cw3C7_1f.d.ts +0 -1
  374. package/dist/index-E7Wvm5uX.d.ts +0 -1
  375. package/dist/index-J3R2mDFQ.d.ts +0 -1
  376. package/dist/input-BpEQjaWV.d.ts.map +0 -1
  377. package/dist/json-viewer-DaTgmzkS.d.ts +0 -8
  378. package/dist/json-viewer-DaTgmzkS.d.ts.map +0 -1
  379. package/dist/message-list-C4mPpBBa.d.ts.map +0 -1
  380. package/dist/popover-XSBOuSih.d.ts.map +0 -1
  381. package/dist/radio-eL0Oy86J.d.ts.map +0 -1
  382. package/dist/radio-group-Bkli6nUz.d.ts.map +0 -1
  383. package/dist/radio-group-field-wlqeiLN3.d.ts.map +0 -1
  384. package/dist/search-autocomplete-BJJkrZ1i.d.ts.map +0 -1
  385. package/dist/select-field-C97QIhUL.d.ts.map +0 -1
  386. package/dist/selected-content-CGsK5PR4.d.ts.map +0 -1
  387. package/dist/sidebar-DOoE4krt.d.ts.map +0 -1
  388. package/dist/sidebar-provider-C2eyz9TL.d.ts.map +0 -1
  389. package/dist/splitted-input-diff-CwPedpov.d.ts +0 -18
  390. package/dist/splitted-input-diff-CwPedpov.d.ts.map +0 -1
  391. package/dist/src-CVV6HzQZ.js.map +0 -1
  392. package/dist/text-field-DSInH67J.d.ts +0 -10
  393. package/dist/text-field-DSInH67J.d.ts.map +0 -1
  394. package/dist/text-input-8zXIWHLi.d.ts.map +0 -1
  395. package/dist/text-input-diff-B0vLSKQm.d.ts +0 -20
  396. package/dist/text-input-diff-B0vLSKQm.d.ts.map +0 -1
  397. package/dist/tooltip-BxS9HpML.d.ts.map +0 -1
  398. package/dist/types-BTq-St7H.d.ts.map +0 -1
  399. package/dist/types-Bsn62tJB.d.ts.map +0 -1
  400. package/dist/types-C04Q_Fan.d.ts.map +0 -1
  401. package/dist/types-CNbvfWjh.d.ts.map +0 -1
  402. package/dist/use-id-autocomplete-By7YSChC.d.ts.map +0 -1
  403. package/dist/use-search-autocomplete-IfcQ_gKh.d.ts.map +0 -1
  404. package/dist/value-transformer-DQjqtNih.d.ts.map +0 -1
  405. package/dist/with-field-validation-Di5D8vU-.d.ts.map +0 -1
@@ -1,31 +1,27 @@
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 DropdownMenuItem, b as PowerhouseButton, c as SidebarHeader, d as PackageAnimation, f as Modal, g as DropdownMenuContent, h as DropdownMenu, l as SidebarPanel, o as Sidebar, s as SidebarFooter, t as useWindowSize, y as DropdownMenuTrigger } from "../src-DhSJCeu5.js";
2
+ import { n as getDimensions, t as Icon } from "../icon-DQ2yrWYv.js";
3
+ import { Checkbox } from "../ui/components/checkbox/checkbox.js";
3
4
  import { Popover, PopoverContent, PopoverTrigger } from "../ui/components/popover/popover.js";
4
- import { SelectFieldRaw } from "../ui/components/select-field/select-field.js";
5
5
  import { Input } from "../ui/components/input/input.js";
6
6
  import { JsonViewer } from "../ui/components/json-viewer/json-viewer.js";
7
- import React, { Fragment, createElement, forwardRef, memo, useCallback, useEffect, useLayoutEffect, useMemo, useReducer, useRef, useState } from "react";
7
+ import "../ui/index.js";
8
+ import { a as lazyComponent, i as ENSAvatar, n as useEns, r as FormattedJsonViewer, t as formatEthAddress } from "../address-DVC3zalI.js";
9
+ import { t as Label } from "../label-nH2HoKfI.js";
10
+ import React, { Fragment, createContext, createElement, forwardRef, useCallback, useContext, useEffect, useLayoutEffect, useMemo, useReducer, useRef, useState } from "react";
8
11
  import { twJoin, twMerge } from "tailwind-merge";
9
12
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
10
13
  import { Content, Portal, Provider, Root, Trigger } from "@radix-ui/react-tooltip";
11
- import { Controller, useForm } from "react-hook-form";
12
- import { Anchor, Content as Content$1, Portal as Portal$1, Root as Root$1, Trigger as Trigger$1 } from "@radix-ui/react-popover";
13
- import { format, formatDistanceToNow, parseISO } from "date-fns";
14
- import { useCopyToClipboard, useDebounceValue, useEventListener, useOnClickOutside } from "usehooks-ts";
14
+ import { useEventListener, useOnClickOutside } from "usehooks-ts";
15
15
  import { Loader2, Mail, Monitor, Moon, Settings, Smartphone, Sun, Wallet } from "lucide-react";
16
- import { SyncOperationStatus, addFolder, getSyncStatusSync, preloadEditorModule, setSelectedDrive, setSelectedNode, showDeleteNodeModal, showPHModal, showRevisionHistory, useDocumentById, useDocumentVersionStatus, useDownloadDocument, useDownloadFolder, useDragNode, useDropFile, useDropNode, useEditorModulesForDocumentType, useGetSwitchboardLink, useIsDragAndDropEnabled, useNodeActions, useNodeById, useNodeParentFolderById, useOnDropFile, useSelectedDocumentSafe, useSelectedDriveId, useSelectedDriveSafe, useSelectedNodePath, useTheme, useUserPermissions } from "@powerhousedao/reactor-browser";
17
- import Select, { components } from "react-select";
18
- import { Content as Content$2, List, Root as Root$2, Trigger as Trigger$2 } from "@radix-ui/react-tabs";
19
- import { addProp, defaultTo, entries, filter, funnel, hasAtLeast, isArray, isDefined, isIncludedIn, isStrictEqual, isString, isTruthy, keys, map, pipe, prop, values } from "remeda";
20
- import { garbageCollect, redo, sortOperations, undo } from "@powerhousedao/shared/document-model";
16
+ import { SyncOperationStatus, addFolder, getNodeTarget, getSyncStatusSync, isPlainClick, makeDriveSlug, preloadEditorModule, showDeleteNodeModal, showPHModal, showRevisionHistory, useCloseNode, useDocumentById, useDocumentVersionStatus, useDownloadDocument, useDownloadFolder, useDragNode, useDriveContext, useDropFile, useDropNode, useEditorModulesForDocumentType, useGetSwitchboardLink, useIsDragAndDropEnabled, useLinkProps, useNodeActions, useNodeById, useNodeTarget, useOnDropFile, usePHNavigation, usePreloadNode, useSelectedDocumentSafe, useSelectedDriveId, useSelectedDriveSafe, useSelectedNodePath, useSetSelectedDrive, useSetSelectedNode, useTheme, useUserPermissions } from "@powerhousedao/reactor-browser";
17
+ import { Content as Content$1, List, Root as Root$1, Trigger as Trigger$1 } from "@radix-ui/react-tabs";
18
+ import { addProp, defaultTo, entries, filter, hasAtLeast, isArray, isDefined, isIncludedIn, isTruthy, keys, map, pipe, prop, values } from "remeda";
19
+ import { redo, undo } from "@powerhousedao/shared/document-model";
21
20
  import { RenownLogo } from "@powerhousedao/reactor-browser/renown";
22
- import { JsonView } from "@uiw/react-json-view";
23
- import { darkTheme } from "@uiw/react-json-view/dark";
24
- import { lightTheme } from "@uiw/react-json-view/light";
21
+ import { colorVariants, imageVariants, layerStyle, normalizeBackground } from "@powerhousedao/shared/connect";
25
22
  import { isValidName } from "@powerhousedao/shared/document-drive";
26
23
  import { capitalCase } from "change-case";
27
24
  import { getUpdateTarget, parseInstallSpec } from "@powerhousedao/shared/registry/updates";
28
- import { useVirtualizer } from "@tanstack/react-virtual";
29
25
  //#region src/connect/components/account-popover/account-popover.tsx
30
26
  const AccountPopover = ({ children, content, open, onOpenChange }) => {
31
27
  return /* @__PURE__ */ jsxs(Popover, {
@@ -245,6 +241,9 @@ function Breadcrumbs() {
245
241
  const selectedDriveId = useSelectedDriveId();
246
242
  const selectedNodePath = useSelectedNodePath();
247
243
  const [isCreating, setIsCreating] = useState(false);
244
+ const driveContext = useDriveContext();
245
+ const setSelectedDrive = useSetSelectedDrive();
246
+ const setSelectedNode = useSetSelectedNode();
248
247
  function onAddNew() {
249
248
  setIsCreating(true);
250
249
  }
@@ -261,6 +260,7 @@ function Breadcrumbs() {
261
260
  function onCancel() {
262
261
  setIsCreating(false);
263
262
  }
263
+ const driveTarget = selectedDrive ? { driveSlug: makeDriveSlug(selectedDrive) } : void 0;
264
264
  const hasSelectedDrive = !!selectedDrive;
265
265
  const hasNodePath = !!selectedNodePath.length;
266
266
  return /* @__PURE__ */ jsxs("div", {
@@ -282,6 +282,7 @@ function Breadcrumbs() {
282
282
  id: selectedDriveId,
283
283
  parentId: void 0,
284
284
  name: selectedDrive.state.global.name || selectedDrive.header.name,
285
+ target: driveTarget,
285
286
  onClick: () => setSelectedDrive(selectedDrive)
286
287
  }),
287
288
  /* @__PURE__ */ jsx("span", { children: "/" })
@@ -290,6 +291,7 @@ function Breadcrumbs() {
290
291
  id: node.id,
291
292
  parentId: node.parentFolder,
292
293
  name: node.name,
294
+ target: getNodeTarget(node, driveContext?.drive),
293
295
  onClick: () => setSelectedNode(node)
294
296
  }), /* @__PURE__ */ jsx("span", { children: "/" })] }, node.id)),
295
297
  isAllowedToCreateDocuments && (isCreating ? /* @__PURE__ */ jsx(NodeInput, {
@@ -311,160 +313,363 @@ function Breadcrumbs() {
311
313
  });
312
314
  }
313
315
  function Breadcrumb(props) {
314
- const { name, id, parentId, onClick } = props;
316
+ const { name, id, parentId, target, onClick } = props;
317
+ const navigation = usePHNavigation();
318
+ const isCurrent = navigation.useIsCurrent?.(target) ?? false;
319
+ const href = props.href ?? (target ? navigation.hrefFor?.(target) : void 0);
315
320
  const { isDragging, ...dragProps } = useDragNode({
316
321
  srcId: id,
317
322
  parentId: parentId ?? void 0
318
323
  });
319
324
  const { isDropTarget, ...dropProps } = useDropNode(id);
320
325
  const containerStyles = twMerge("cursor-pointer transition-colors last-of-type:text-foreground hover:hover-effect", isDragging ? "opacity-60" : isDropTarget ? "bg-info/10" : "");
326
+ if (href) {
327
+ const onLinkClick = (event) => {
328
+ if (!isPlainClick(event)) return;
329
+ event.preventDefault();
330
+ onClick();
331
+ };
332
+ return /* @__PURE__ */ jsx("a", {
333
+ ...dragProps,
334
+ ...dropProps,
335
+ href,
336
+ "aria-current": target && isCurrent ? "page" : void 0,
337
+ className: containerStyles,
338
+ onClick: onLinkClick,
339
+ children: name
340
+ });
341
+ }
342
+ const onKeyDown = (event) => {
343
+ if (event.key !== "Enter" && event.key !== " ") return;
344
+ event.preventDefault();
345
+ onClick();
346
+ };
321
347
  return /* @__PURE__ */ jsx("div", {
322
348
  ...dragProps,
323
349
  ...dropProps,
324
350
  className: containerStyles,
325
351
  onClick,
352
+ onKeyDown,
326
353
  role: "button",
354
+ tabIndex: 0,
327
355
  children: name
328
356
  });
329
357
  }
330
358
  //#endregion
331
- //#region src/connect/components/combobox/combobox.tsx
332
- function DropdownIndicator(props) {
333
- return /* @__PURE__ */ jsx(components.DropdownIndicator, {
334
- ...props,
335
- children: /* @__PURE__ */ jsx(Icon, {
336
- name: "ChevronDown",
337
- size: 16
338
- })
359
+ //#region src/connect/components/catch-up-inspector/catch-up-inspector.tsx
360
+ const COLUMNS$3 = [
361
+ {
362
+ key: "consumerId",
363
+ label: "Consumer",
364
+ width: "180px"
365
+ },
366
+ {
367
+ key: "thread",
368
+ label: "Thread",
369
+ width: "90px"
370
+ },
371
+ {
372
+ key: "appliedThrough",
373
+ label: "Applied Through",
374
+ width: "110px"
375
+ },
376
+ {
377
+ key: "lag",
378
+ label: "Lag",
379
+ width: "70px"
380
+ },
381
+ {
382
+ key: "trackedAbove",
383
+ label: "Tracked Above",
384
+ width: "100px"
385
+ },
386
+ {
387
+ key: "lastAdvance",
388
+ label: "Last Advance",
389
+ width: "160px"
390
+ },
391
+ {
392
+ key: "blockedOrdinal",
393
+ label: "Blocked At",
394
+ width: "90px"
395
+ },
396
+ {
397
+ key: "blockedDocument",
398
+ label: "Document",
399
+ width: "150px"
400
+ },
401
+ {
402
+ key: "blockedScope",
403
+ label: "Scope",
404
+ width: "80px"
405
+ },
406
+ {
407
+ key: "blockedBranch",
408
+ label: "Branch",
409
+ width: "80px"
410
+ },
411
+ {
412
+ key: "blockedType",
413
+ label: "Type",
414
+ width: "140px"
415
+ },
416
+ {
417
+ key: "blockedError",
418
+ label: "Error",
419
+ width: "180px"
420
+ }
421
+ ];
422
+ const POLL_INTERVAL_MS = 2e3;
423
+ function truncateId$3(id, maxLength = 12) {
424
+ if (id.length <= maxLength) return id;
425
+ return id.slice(0, maxLength) + "...";
426
+ }
427
+ function formatDuration(ms) {
428
+ const totalSeconds = Math.max(0, Math.floor(ms / 1e3));
429
+ const hours = Math.floor(totalSeconds / 3600);
430
+ const minutes = Math.floor(totalSeconds % 3600 / 60);
431
+ const seconds = totalSeconds % 60;
432
+ if (hours > 0) return `${hours}h ${minutes}m ${seconds}s`;
433
+ if (minutes > 0) return `${minutes}m ${seconds}s`;
434
+ return `${seconds}s`;
435
+ }
436
+ function Empty() {
437
+ return /* @__PURE__ */ jsx("span", {
438
+ className: "text-muted-foreground",
439
+ children: "-"
339
440
  });
340
441
  }
341
- function ClearIndicator(props) {
342
- return /* @__PURE__ */ jsx(components.ClearIndicator, {
343
- ...props,
344
- children: /* @__PURE__ */ jsx(Icon, {
345
- name: "Xmark",
346
- size: 16
347
- })
442
+ function Cell({ children }) {
443
+ return /* @__PURE__ */ jsx("td", {
444
+ className: "border-l border-border px-3 py-2 text-xs text-foreground",
445
+ children
348
446
  });
349
447
  }
350
- function MenuList(props) {
351
- const { label, onClick, ...rest } = props;
352
- const hasAddItemButton = !!label && !!onClick;
353
- return /* @__PURE__ */ jsxs(components.MenuList, {
354
- ...rest,
355
- children: [props.children, hasAddItemButton ? /* @__PURE__ */ jsx("button", {
356
- className: "w-full px-2 py-3 hover:hover-effect",
357
- onClick,
358
- children: label
359
- }) : null]
448
+ function TruncatedText({ text, className }) {
449
+ return /* @__PURE__ */ jsx("span", {
450
+ className: twMerge("block truncate", className),
451
+ title: text,
452
+ children: text
360
453
  });
361
454
  }
362
- function Combobox(props) {
363
- const invalid = props["aria-invalid"] === "true";
364
- const { addItemButtonProps, ...rest } = props;
365
- const { theme } = useTheme();
366
- const dark = theme === "dark";
367
- return /* @__PURE__ */ jsx(Select, {
368
- ...rest,
369
- components: {
370
- DropdownIndicator,
371
- ClearIndicator,
372
- MenuList: (menuListProps) => MenuList({
373
- ...menuListProps,
374
- ...addItemButtonProps
375
- })
376
- },
377
- classNames: { menuList: () => "scrollbar-thin scrollbar-track-transparent scrollbar-thumb-rounded-md scrollbar-thumb-border" },
378
- styles: {
379
- dropdownIndicator: () => {
380
- return {
381
- label: "indicatorContainer",
382
- display: "flex",
383
- transition: "color 150ms",
384
- color: dark ? "var(--color-slate-50)" : "var(--color-gray-900)",
385
- padding: 8,
386
- boxSizing: "border-box"
387
- };
388
- },
389
- clearIndicator: (baseStyles) => {
390
- return {
391
- ...baseStyles,
392
- color: dark ? "var(--color-slate-50)" : "var(--color-gray-900)"
393
- };
394
- },
395
- container: (baseStyles) => {
396
- return {
397
- ...baseStyles,
398
- borderColor: dark ? "var(--color-slate-700)" : "var(--color-gray-200)",
399
- fontSize: 12
400
- };
401
- },
402
- placeholder: (baseStyles) => {
403
- return {
404
- ...baseStyles,
405
- color: invalid ? dark ? "var(--color-red-400)" : "var(--color-red-900)" : dark ? "var(--color-slate-100)" : "var(--color-gray-500)"
406
- };
407
- },
408
- control: () => {
409
- return {
410
- label: "control",
411
- alignItems: "center",
412
- cursor: "default",
413
- display: "flex",
414
- flexWrap: "wrap",
415
- justifyContent: "space-between",
416
- minHeight: 32,
417
- outline: "0 !important",
418
- position: "relative",
419
- transition: "all 100ms",
420
- backgroundColor: dark ? "var(--color-slate-800)" : "var(--color-white)",
421
- borderColor: invalid ? dark ? "var(--color-red-400)" : "var(--color-red-900)" : dark ? "var(--color-slate-600)" : "var(--color-gray-200)",
422
- borderStyle: "solid",
423
- borderWidth: 1,
424
- borderRadius: "6px",
425
- boxSizing: "border-box"
426
- };
427
- },
428
- option: (baseStyles, state) => {
429
- return {
430
- ...baseStyles,
431
- backgroundColor: state.isSelected ? dark ? "var(--color-slate-700)" : "var(--color-slate-50)" : dark ? "var(--color-slate-800)" : "var(--color-white)",
432
- color: dark ? "var(--color-slate-50)" : "var(--color-gray-800)",
433
- ":hover": { backgroundColor: dark ? "var(--color-slate-700)" : "var(--color-slate-50)" }
434
- };
435
- },
436
- menuList: (baseStyles) => ({
437
- ...baseStyles,
438
- padding: 0,
439
- borderRadius: "6px"
455
+ function CatchUpInspector({ status, onRefresh, onSweepNow }) {
456
+ const [loading, setLoading] = useState(true);
457
+ const [sweeping, setSweeping] = useState(false);
458
+ const [error, setError] = useState(null);
459
+ const [now, setNow] = useState();
460
+ const loadStatus = useCallback(async () => {
461
+ try {
462
+ await onRefresh();
463
+ setError(null);
464
+ setNow(Date.now());
465
+ } catch (e) {
466
+ setError(e instanceof Error ? e.message : String(e));
467
+ } finally {
468
+ setLoading(false);
469
+ }
470
+ }, [onRefresh]);
471
+ useEffect(() => {
472
+ loadStatus();
473
+ const interval = setInterval(() => {
474
+ loadStatus();
475
+ }, POLL_INTERVAL_MS);
476
+ return () => clearInterval(interval);
477
+ }, [loadStatus]);
478
+ const handleRefresh = useCallback(async () => {
479
+ setLoading(true);
480
+ await loadStatus();
481
+ }, [loadStatus]);
482
+ const handleSweepNow = useCallback(async () => {
483
+ setSweeping(true);
484
+ try {
485
+ await onSweepNow();
486
+ setError(null);
487
+ } catch (e) {
488
+ setError(e instanceof Error ? e.message : String(e));
489
+ } finally {
490
+ setSweeping(false);
491
+ }
492
+ await loadStatus();
493
+ }, [onSweepNow, loadStatus]);
494
+ const watermark = status?.watermark;
495
+ const consumers = status?.consumers ?? [];
496
+ const settledThrough = watermark?.settledThrough ?? 0;
497
+ const blockedCount = consumers.filter((c) => c.blockedAt).length;
498
+ return /* @__PURE__ */ jsxs("div", {
499
+ className: "flex h-full flex-col gap-2",
500
+ children: [
501
+ /* @__PURE__ */ jsxs("div", {
502
+ className: "flex shrink-0 items-center justify-between",
503
+ children: [/* @__PURE__ */ jsx("h2", {
504
+ className: "text-lg font-semibold text-foreground",
505
+ children: "Catch-up Inspector"
506
+ }), /* @__PURE__ */ jsxs("div", {
507
+ className: "flex items-center gap-2",
508
+ children: [/* @__PURE__ */ jsx("button", {
509
+ 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",
510
+ disabled: sweeping,
511
+ onClick: () => void handleSweepNow(),
512
+ type: "button",
513
+ children: "Sweep now"
514
+ }), /* @__PURE__ */ jsxs("button", {
515
+ 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",
516
+ disabled: loading,
517
+ onClick: () => void handleRefresh(),
518
+ type: "button",
519
+ children: [/* @__PURE__ */ jsx(Icon, {
520
+ name: "Reload",
521
+ size: 14
522
+ }), "Refresh"]
523
+ })]
524
+ })]
525
+ }),
526
+ watermark && /* @__PURE__ */ jsxs("div", {
527
+ className: "flex shrink-0 flex-wrap items-center gap-4 rounded-lg bg-muted px-4 py-2 text-sm",
528
+ children: [
529
+ /* @__PURE__ */ jsxs("div", {
530
+ className: "text-foreground",
531
+ children: ["Head: ", /* @__PURE__ */ jsx("span", {
532
+ className: "font-medium",
533
+ children: watermark.head
534
+ })]
535
+ }),
536
+ /* @__PURE__ */ jsxs("div", {
537
+ className: "text-foreground",
538
+ children: [
539
+ "Settled through:",
540
+ " ",
541
+ /* @__PURE__ */ jsx("span", {
542
+ className: "font-medium",
543
+ children: watermark.settledThrough
544
+ })
545
+ ]
546
+ }),
547
+ /* @__PURE__ */ jsxs("div", {
548
+ className: "text-foreground",
549
+ children: [
550
+ "Lag:",
551
+ " ",
552
+ /* @__PURE__ */ jsx("span", {
553
+ className: "font-medium",
554
+ children: watermark.head - watermark.settledThrough
555
+ })
556
+ ]
557
+ }),
558
+ /* @__PURE__ */ jsxs("div", {
559
+ className: "text-foreground",
560
+ children: [
561
+ "Waiting on:",
562
+ " ",
563
+ /* @__PURE__ */ jsx("span", {
564
+ className: "font-medium",
565
+ children: watermark.waitingOn.length > 0 ? watermark.waitingOn.join(", ") : "none"
566
+ })
567
+ ]
568
+ }),
569
+ watermark.stalledSinceUtcMs !== void 0 && now !== void 0 && /* @__PURE__ */ jsxs("div", {
570
+ className: "flex items-center gap-2 text-destructive",
571
+ children: [
572
+ /* @__PURE__ */ jsx("span", { className: "size-2 rounded-full bg-destructive" }),
573
+ "Stalled for:",
574
+ " ",
575
+ /* @__PURE__ */ jsx("span", {
576
+ className: "font-medium",
577
+ title: new Date(watermark.stalledSinceUtcMs).toISOString(),
578
+ children: formatDuration(now - watermark.stalledSinceUtcMs)
579
+ })
580
+ ]
581
+ }),
582
+ /* @__PURE__ */ jsxs("div", {
583
+ className: "flex items-center gap-2 text-foreground",
584
+ children: [
585
+ /* @__PURE__ */ jsx("span", { className: "size-2 rounded-full bg-destructive" }),
586
+ "Blocked: ",
587
+ /* @__PURE__ */ jsx("span", {
588
+ className: "font-medium",
589
+ children: blockedCount
590
+ })
591
+ ]
592
+ })
593
+ ]
594
+ }),
595
+ error && /* @__PURE__ */ jsxs("div", {
596
+ className: "shrink-0 rounded-lg border border-destructive bg-destructive/10 px-4 py-2 text-sm text-destructive",
597
+ children: ["Catch-up request failed: ", error]
598
+ }),
599
+ /* @__PURE__ */ jsx("div", {
600
+ className: "max-h-full overflow-auto rounded-lg border border-border",
601
+ children: /* @__PURE__ */ jsxs("table", {
602
+ className: "w-full border-collapse",
603
+ children: [/* @__PURE__ */ jsx("thead", {
604
+ className: "sticky top-0 bg-muted",
605
+ children: /* @__PURE__ */ jsx("tr", { children: COLUMNS$3.map((column, index) => /* @__PURE__ */ jsx("th", {
606
+ className: twMerge("px-3 py-2 text-left text-xs font-medium text-foreground", index > 0 && "border-l border-border"),
607
+ style: { width: column.width },
608
+ children: /* @__PURE__ */ jsx("span", {
609
+ className: "truncate",
610
+ children: column.label
611
+ })
612
+ }, column.key)) })
613
+ }), /* @__PURE__ */ jsx("tbody", { children: loading && !status ? /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", {
614
+ className: "px-3 py-8 text-center text-sm text-muted-foreground",
615
+ colSpan: COLUMNS$3.length,
616
+ children: "Loading..."
617
+ }) }) : consumers.length === 0 ? /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", {
618
+ className: "px-3 py-8 text-center text-sm text-muted-foreground",
619
+ colSpan: COLUMNS$3.length,
620
+ children: "No catch-up consumers"
621
+ }) }) : consumers.map((consumer) => {
622
+ const blocked = consumer.blockedAt;
623
+ const lastAdvance = new Date(consumer.lastAdvanceUtcMs);
624
+ return /* @__PURE__ */ jsxs("tr", {
625
+ className: twMerge("hover:hover-effect", blocked ? "bg-destructive/10" : "odd:bg-card even:bg-background"),
626
+ children: [
627
+ /* @__PURE__ */ jsx("td", {
628
+ className: "px-3 py-2 text-xs text-foreground",
629
+ children: /* @__PURE__ */ jsx(TruncatedText, { text: consumer.consumerId })
630
+ }),
631
+ /* @__PURE__ */ jsx(Cell, { children: consumer.thread }),
632
+ /* @__PURE__ */ jsx(Cell, { children: consumer.appliedThrough }),
633
+ /* @__PURE__ */ jsx(Cell, { children: settledThrough - consumer.appliedThrough }),
634
+ /* @__PURE__ */ jsx(Cell, { children: consumer.trackedAbove }),
635
+ /* @__PURE__ */ jsx(Cell, { children: /* @__PURE__ */ jsx("span", {
636
+ className: "block truncate",
637
+ title: lastAdvance.toISOString(),
638
+ children: lastAdvance.toLocaleString()
639
+ }) }),
640
+ /* @__PURE__ */ jsx(Cell, { children: blocked ? blocked.ordinal : /* @__PURE__ */ jsx(Empty, {}) }),
641
+ /* @__PURE__ */ jsx(Cell, { children: blocked ? /* @__PURE__ */ jsx("span", {
642
+ className: "block truncate",
643
+ title: blocked.documentId,
644
+ children: truncateId$3(blocked.documentId)
645
+ }) : /* @__PURE__ */ jsx(Empty, {}) }),
646
+ /* @__PURE__ */ jsx(Cell, { children: blocked ? blocked.scope : /* @__PURE__ */ jsx(Empty, {}) }),
647
+ /* @__PURE__ */ jsx(Cell, { children: blocked ? blocked.branch : /* @__PURE__ */ jsx(Empty, {}) }),
648
+ /* @__PURE__ */ jsx(Cell, { children: blocked ? /* @__PURE__ */ jsx(TruncatedText, { text: blocked.type }) : /* @__PURE__ */ jsx(Empty, {}) }),
649
+ /* @__PURE__ */ jsx(Cell, { children: blocked ? /* @__PURE__ */ jsx(TruncatedText, {
650
+ className: "text-destructive",
651
+ text: blocked.error
652
+ }) : /* @__PURE__ */ jsx(Empty, {}) })
653
+ ]
654
+ }, consumer.consumerId);
655
+ }) })]
656
+ })
657
+ }),
658
+ /* @__PURE__ */ jsxs("div", {
659
+ className: "shrink-0 text-sm text-foreground",
660
+ children: [
661
+ "Showing ",
662
+ consumers.length,
663
+ " consumer(s)"
664
+ ]
440
665
  })
441
- },
442
- theme: (theme) => ({
443
- ...theme,
444
- colors: {
445
- ...theme.colors,
446
- primary: dark ? "var(--color-slate-700)" : "var(--color-slate-100)",
447
- primary25: dark ? "var(--color-slate-800)" : "var(--color-slate-50)",
448
- primary50: dark ? "var(--color-slate-700)" : "var(--color-slate-100)",
449
- primary75: dark ? "var(--color-slate-700)" : "var(--color-slate-100)",
450
- danger: dark ? "var(--color-red-400)" : "var(--color-red-900)",
451
- dangerLight: dark ? "var(--color-red-900)" : "var(--color-red-100)",
452
- neutral0: dark ? "var(--color-slate-800)" : "var(--color-white)",
453
- neutral5: dark ? "var(--color-slate-800)" : "var(--color-gray-50)",
454
- neutral10: dark ? "var(--color-slate-700)" : "var(--color-gray-100)",
455
- neutral20: dark ? "var(--color-slate-600)" : "var(--color-gray-200)",
456
- neutral30: dark ? "var(--color-slate-600)" : "var(--color-gray-300)",
457
- neutral40: dark ? "var(--color-slate-400)" : "var(--color-gray-400)",
458
- neutral50: dark ? "var(--color-slate-300)" : "var(--color-gray-500)",
459
- neutral60: dark ? "var(--color-slate-200)" : "var(--color-gray-600)",
460
- neutral70: dark ? "var(--color-slate-100)" : "var(--color-gray-700)",
461
- neutral80: dark ? "var(--color-slate-50)" : "var(--color-gray-800)",
462
- neutral90: dark ? "var(--color-slate-50)" : "var(--color-gray-900)"
463
- }
464
- })
666
+ ]
465
667
  });
466
668
  }
467
669
  //#endregion
670
+ //#region src/connect/components/combobox/combobox.tsx
671
+ const Combobox = lazyComponent(() => import("../combobox.impl-CQHG0NgO.js").then((m) => m.Combobox));
672
+ //#endregion
468
673
  //#region src/connect/components/consent-banner/consent-banner.tsx
469
674
  const CookieBanner = (props) => {
470
675
  const { children, cookies, submitLabel, rejectLabel, onSubmit = () => {}, onReject = () => {}, className, ...divProps } = props;
@@ -527,8 +732,9 @@ function ModalButton(props) {
527
732
  const { variant, className, ...rest } = props;
528
733
  const confirmStyle = twMerge(defaultStyle, "bg-primary text-primary-foreground");
529
734
  const cancelStyle = twMerge(defaultStyle, "bg-muted text-muted-foreground");
735
+ const variantStyle = twMerge(variant === "confirm" ? confirmStyle : cancelStyle, className);
530
736
  return /* @__PURE__ */ jsx("button", {
531
- className: twMerge(variant === "confirm" ? confirmStyle : cancelStyle, className),
737
+ className: variantStyle,
532
738
  ...rest
533
739
  });
534
740
  }
@@ -702,7 +908,7 @@ function SchemaTreeSidebar({ schema, tables, selectedTable, onSelectTable, onRef
702
908
  //#endregion
703
909
  //#region src/connect/components/select/select.tsx
704
910
  function fixedForwardRef(render) {
705
- return /* @__PURE__ */ forwardRef(render);
911
+ return /*#__PURE__*/ forwardRef(render);
706
912
  }
707
913
  const ConnectSelect = /* @__PURE__ */ fixedForwardRef(function Select(props, ref) {
708
914
  const { items, value, id, onChange, containerClassName, menuClassName, itemClassName, absolutePositionMenu = false, borderRadius = "6px", listClassName } = props;
@@ -1279,9 +1485,10 @@ function DBExplorer({ schema, getTables, getTableRows, getDefaultSort, pageSize
1279
1485
  ]);
1280
1486
  const handleCopyAll = useCallback(async () => {
1281
1487
  if (!selectedTable) return "";
1488
+ const limit = pagination.total ?? 1e6;
1282
1489
  return rowsToCsv((await getTableRows(selectedTable, {
1283
1490
  schema,
1284
- limit: pagination.total ?? 1e6,
1491
+ limit,
1285
1492
  offset: 0,
1286
1493
  sort,
1287
1494
  filters
@@ -1638,9 +1845,7 @@ const SEQUENCE = [
1638
1845
  }
1639
1846
  ];
1640
1847
  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;
1848
+ const LOOP_TOTAL = 4380;
1644
1849
  const DROP_STYLE = `brickDrop ${ANIM_DUR}ms cubic-bezier(0.28, 1.08, 0.58, 1) forwards`;
1645
1850
  const FALL_STYLE = `brickFall ${ANIM_DUR}ms cubic-bezier(0.28, 1.08, 0.58, 1) forwards`;
1646
1851
  const PATHS = {
@@ -1655,7 +1860,63 @@ const PATHS = {
1655
1860
  b9: "M18.0156 9.8918C18.0156 9.61566 18.2394 9.39181 18.5155 9.39181L43.0627 9.39138C44.9475 11.8519 46.3659 14.6855 47.1892 17.7635L18.5154 17.7641C18.2392 17.7641 18.0154 17.5402 18.0154 17.2641L18.0156 9.8918Z",
1656
1861
  b10: "M25.0158 -2.51999e-05C31.418 0.265176 37.1737 3.03916 41.3227 7.36511L25.5156 7.36547C25.2395 7.36547 25.0156 7.14161 25.0156 6.86546L25.0158 -2.51999e-05Z"
1657
1862
  };
1863
+ /** A project's loading image, declared by the build as
1864
+ * `<meta name="ph-loader" content="<file>" data-animation data-size>`
1865
+ * (powerhouse.config.json `icons.loader`). */
1866
+ const LOADER_MOTION = {
1867
+ pulse: "ph-loader-pulse 1.6s ease-in-out infinite",
1868
+ spin: "ph-loader-spin 1.4s linear infinite",
1869
+ none: "none"
1870
+ };
1871
+ const LOADER_KEYFRAMES = "@keyframes ph-loader-pulse{0%,100%{opacity:1;transform:scale(1)}50%{opacity:.6;transform:scale(.94)}}@keyframes ph-loader-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){[data-ph-loader-img]{animation:none!important}}";
1872
+ let projectLoader;
1873
+ /** The page's project loader, or null when Connect's logo stays. Read once:
1874
+ * the meta tag is static in index.html. */
1875
+ function getProjectLoader() {
1876
+ if (projectLoader !== void 0) return projectLoader;
1877
+ if (typeof document === "undefined") return null;
1878
+ const meta = document.querySelector("meta[name=\"ph-loader\"]");
1879
+ const file = meta?.content;
1880
+ if (!meta || !file) return projectLoader = null;
1881
+ const animation = meta.dataset.animation;
1882
+ const size = Number(meta.dataset.size);
1883
+ projectLoader = {
1884
+ src: new URL(file, document.baseURI).toString(),
1885
+ animation: animation === "spin" || animation === "none" ? animation : "pulse",
1886
+ size: Number.isFinite(size) && size > 0 ? size : 96
1887
+ };
1888
+ return projectLoader;
1889
+ }
1890
+ /** The project's loading image with its motion. */
1891
+ function ProjectLoaderImage({ loader, className = "" }) {
1892
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("style", { children: LOADER_KEYFRAMES }), /* @__PURE__ */ jsx("img", {
1893
+ "data-ph-loader-img": "",
1894
+ src: loader.src,
1895
+ alt: "",
1896
+ "aria-label": "Loading",
1897
+ width: loader.size,
1898
+ className,
1899
+ style: {
1900
+ width: loader.size,
1901
+ height: "auto",
1902
+ animation: LOADER_MOTION[loader.animation]
1903
+ }
1904
+ })] });
1905
+ }
1906
+ /** Connect's loading animation: the project's loader when one is
1907
+ * configured, else the animated Powerhouse logo. */
1658
1908
  function LogoAnimation({ size = 48, className = "" }) {
1909
+ const loader = getProjectLoader();
1910
+ if (loader) return /* @__PURE__ */ jsx(ProjectLoaderImage, {
1911
+ loader,
1912
+ className
1913
+ });
1914
+ return /* @__PURE__ */ jsx(PowerhouseLogoAnimation, {
1915
+ size,
1916
+ className
1917
+ });
1918
+ }
1919
+ function PowerhouseLogoAnimation({ size = 48, className = "" }) {
1659
1920
  const refsMap = useRef({});
1660
1921
  const timers = useRef([]);
1661
1922
  function getEls(id) {
@@ -1699,7 +1960,7 @@ function LogoAnimation({ size = 48, className = "" }) {
1699
1960
  clearTimers();
1700
1961
  resetAll();
1701
1962
  SEQUENCE.forEach(({ id, dropDelay }) => runDrop(id, dropDelay));
1702
- const fallStart = LAST_DROP + ANIM_DUR + HOLD;
1963
+ const fallStart = 2480;
1703
1964
  SEQUENCE.forEach(({ id, fallDelay }) => runFall(id, fallStart + fallDelay));
1704
1965
  schedule(startLoop, LOOP_TOTAL);
1705
1966
  }
@@ -1789,7 +2050,7 @@ function TabContent(props) {
1789
2050
  const toTabValue = (label) => label.trim().replace(/\s+/g, "-");
1790
2051
  const resolveTabValue = (props) => props.value ?? toTabValue(props.label);
1791
2052
  function Tabs({ children, defaultValue, onValueChange, listClassName }) {
1792
- return /* @__PURE__ */ jsxs(Root$2, {
2053
+ return /* @__PURE__ */ jsxs(Root$1, {
1793
2054
  defaultValue: toTabValue(defaultValue),
1794
2055
  onValueChange,
1795
2056
  className: "flex min-h-0 flex-1 flex-col gap-2",
@@ -1798,10 +2059,10 @@ function Tabs({ children, defaultValue, onValueChange, listClassName }) {
1798
2059
  children: /* @__PURE__ */ jsx(List, {
1799
2060
  className: "flex w-full gap-x-2 rounded-xl p-1 text-sm font-semibold text-foreground outline-none",
1800
2061
  children: React.Children.map(children, (child, _i) => {
1801
- if (!/* @__PURE__ */ React.isValidElement(child)) return;
2062
+ if (!/*#__PURE__*/ React.isValidElement(child)) return;
1802
2063
  const props = child.props;
1803
2064
  const value = resolveTabValue(props);
1804
- return /* @__PURE__ */ jsx(Trigger$2, {
2065
+ return /* @__PURE__ */ jsx(Trigger$1, {
1805
2066
  className: "flex min-h-7 flex-1 items-center justify-center rounded-lg border border-border bg-background py-2 text-foreground transition duration-300 data-disabled:disabled-effect data-[state=active]:bg-accent data-[state=active]:text-foreground",
1806
2067
  value,
1807
2068
  disabled: props.disabled ?? false,
@@ -1812,10 +2073,11 @@ function Tabs({ children, defaultValue, onValueChange, listClassName }) {
1812
2073
  }), /* @__PURE__ */ jsx("div", {
1813
2074
  className: "mt-3 min-h-0 flex-1 rounded-md bg-background",
1814
2075
  children: React.Children.map(children, (child, i) => {
1815
- if (!/* @__PURE__ */ React.isValidElement(child)) return;
1816
- return /* @__PURE__ */ jsx(Content$2, {
2076
+ if (!/*#__PURE__*/ React.isValidElement(child)) return;
2077
+ const value = resolveTabValue(child.props);
2078
+ return /* @__PURE__ */ jsx(Content$1, {
1817
2079
  className: "h-full",
1818
- value: resolveTabValue(child.props),
2080
+ value,
1819
2081
  children: child
1820
2082
  }, i);
1821
2083
  })
@@ -1848,271 +2110,8 @@ function DocumentStateViewer({ state, ignoredScopes = ["auth", "document"], defa
1848
2110
  });
1849
2111
  }
1850
2112
  //#endregion
1851
- //#region src/connect/components/tooltip/tooltip.tsx
1852
- function ConnectTooltip(props) {
1853
- const { children, content, open, defaultOpen, onOpenChange, className, side = "top", sideOffset = 5, delayDuration, ...rest } = props;
1854
- return /* @__PURE__ */ jsxs(Root, {
1855
- defaultOpen,
1856
- delayDuration,
1857
- onOpenChange,
1858
- open,
1859
- children: [/* @__PURE__ */ jsx(Trigger, {
1860
- asChild: true,
1861
- children
1862
- }), /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(Content, {
1863
- ...rest,
1864
- side,
1865
- sideOffset,
1866
- className: twMerge("z-50 rounded-lg border border-border bg-popover p-2 text-xs text-popover-foreground shadow-tooltip", className),
1867
- children: content
1868
- }) })]
1869
- });
1870
- }
1871
- const ConnectTooltipProvider = Provider;
1872
- //#endregion
1873
- //#region src/connect/components/document-timeline/components/h-divider.tsx
1874
- const HDivider = (props) => {
1875
- const { className, timestampUtcMs: timestamp, title, subtitle, onClick, isSelected = false } = props;
1876
- const [open, setOpen] = useState(false);
1877
- const hasContent = !!title || !!subtitle || !!timestamp;
1878
- useEffect(() => {
1879
- if (open) {
1880
- setOpen(false);
1881
- setTimeout(() => hasContent && setOpen(true), 50);
1882
- }
1883
- }, [
1884
- title,
1885
- subtitle,
1886
- timestamp,
1887
- hasContent
1888
- ]);
1889
- const formatTimestamp = (isoString) => {
1890
- if (!isoString) return "";
1891
- try {
1892
- return formatDistanceToNow(new Date(isoString), { addSuffix: true });
1893
- } catch {
1894
- return isoString;
1895
- }
1896
- };
1897
- const tooltipContent = /* @__PURE__ */ jsxs("div", {
1898
- className: "flex flex-col text-xs",
1899
- children: [
1900
- !!title && /* @__PURE__ */ jsx("div", { children: title }),
1901
- !!subtitle && /* @__PURE__ */ jsx("div", {
1902
- className: "text-foreground",
1903
- children: subtitle
1904
- }),
1905
- !!timestamp && /* @__PURE__ */ jsx("div", { children: formatTimestamp(timestamp) })
1906
- ]
1907
- });
1908
- const handleMouseEnter = () => {
1909
- if (hasContent) setOpen(true);
1910
- };
1911
- const handleMouseLeave = () => {
1912
- setOpen(false);
1913
- };
1914
- return /* @__PURE__ */ jsxs("div", {
1915
- className: "relative",
1916
- onMouseEnter: handleMouseEnter,
1917
- onMouseLeave: handleMouseLeave,
1918
- children: [isSelected && /* @__PURE__ */ jsx(Icon, {
1919
- name: "TimelineCaret",
1920
- color: "#4EA9FF",
1921
- size: 10,
1922
- className: "absolute top-[-11px] z-40"
1923
- }), /* @__PURE__ */ jsx(ConnectTooltip, {
1924
- className: "rounded-md bg-primary text-primary-foreground",
1925
- content: tooltipContent,
1926
- open: open && hasContent,
1927
- onOpenChange: setOpen,
1928
- delayDuration: 0,
1929
- side: "bottom",
1930
- sideOffset: 5,
1931
- children: /* @__PURE__ */ jsx("div", {
1932
- className: twMerge("mx-0.5 flex h-6.25 w-1.5 cursor-pointer flex-col items-center justify-center rounded-xs hover:hover-effect", isSelected && "bg-info/10", className),
1933
- onClick,
1934
- "data-title": title,
1935
- "data-subtitle": subtitle,
1936
- "data-timestamp": timestamp,
1937
- children: /* @__PURE__ */ jsx("div", { className: "h-0.5 w-1 rounded-full bg-muted" })
1938
- })
1939
- })]
1940
- });
1941
- };
1942
- //#endregion
1943
- //#region src/connect/components/document-timeline/components/timeline-bar.tsx
1944
- const getBarHeight = (size = 0) => {
1945
- switch (true) {
1946
- case size <= 0: return "h-[1px]";
1947
- case size === 1: return "h-[3px]";
1948
- case size === 2: return "h-[6px]";
1949
- case size === 3: return "h-[9px]";
1950
- case size >= 4: return "h-[12px]";
1951
- default: return "h-[1px]";
1952
- }
1953
- };
1954
- const formatTimestamp$1 = (isoString) => {
1955
- if (!isoString) return "";
1956
- try {
1957
- return format(parseISO(isoString), "HH:mm, dd, MMMM");
1958
- } catch {
1959
- return isoString;
1960
- }
1961
- };
1962
- const TimelineBar = ({ onClick, className, timestampUtcMs: timestamp, additions, deletions, addSize = 0, delSize = 0, isSelected = false }) => {
1963
- const [open, setOpen] = useState(false);
1964
- const noChanges = addSize === 0 && delSize === 0;
1965
- const addBarHeight = getBarHeight(addSize);
1966
- const delBarHeight = getBarHeight(delSize);
1967
- const tooltipContent = /* @__PURE__ */ jsxs("div", {
1968
- className: "flex flex-col text-xs",
1969
- children: [
1970
- /* @__PURE__ */ jsx("div", { children: formatTimestamp$1(timestamp) }),
1971
- /* @__PURE__ */ jsx("div", {
1972
- className: "text-success",
1973
- children: `${additions} additions +`
1974
- }),
1975
- /* @__PURE__ */ jsx("div", {
1976
- className: "text-destructive",
1977
- children: `${deletions} deletions -`
1978
- })
1979
- ]
1980
- });
1981
- const handleMouseEnter = () => {
1982
- if (!noChanges) setOpen(true);
1983
- };
1984
- const handleMouseLeave = () => {
1985
- setOpen(false);
1986
- };
1987
- return /* @__PURE__ */ jsxs("div", {
1988
- className: "relative",
1989
- onMouseEnter: handleMouseEnter,
1990
- onMouseLeave: handleMouseLeave,
1991
- children: [isSelected && /* @__PURE__ */ jsx(Icon, {
1992
- name: "TimelineCaret",
1993
- color: "#4EA9FF",
1994
- size: 10,
1995
- className: "absolute top-[-11px] left-[-2px] z-40"
1996
- }), noChanges ? /* @__PURE__ */ jsx("div", {
1997
- className: twMerge("flex h-[25px] w-1.5 cursor-pointer flex-col items-center justify-center rounded-[2px] hover:hover-effect", className),
1998
- "data-timestamp": timestamp,
1999
- onClick,
2000
- children: /* @__PURE__ */ jsx("div", { className: "size-[3px] rounded-full bg-muted-foreground" })
2001
- }) : /* @__PURE__ */ jsx(ConnectTooltip, {
2002
- className: "rounded-md bg-primary text-primary-foreground",
2003
- content: tooltipContent,
2004
- open,
2005
- onOpenChange: setOpen,
2006
- delayDuration: 0,
2007
- side: "bottom",
2008
- sideOffset: 5,
2009
- children: /* @__PURE__ */ jsxs("div", {
2010
- className: twMerge("flex h-[25px] w-1.5 cursor-pointer flex-col items-center justify-center rounded-[2px] hover:hover-effect", className, isSelected && "bg-info/10"),
2011
- "data-timestamp": timestamp,
2012
- onClick,
2013
- children: [/* @__PURE__ */ jsx("div", {
2014
- className: "flex h-3 w-0.5 items-end",
2015
- children: /* @__PURE__ */ jsx("div", { className: twMerge("h-3 w-0.5 rounded-t-full bg-success", addBarHeight) })
2016
- }), /* @__PURE__ */ jsx("div", {
2017
- className: "flex h-3 w-0.5 items-start",
2018
- children: /* @__PURE__ */ jsx("div", { className: twMerge("h-3 w-0.5 rounded-b-full bg-destructive", delBarHeight) })
2019
- })]
2020
- })
2021
- })]
2022
- });
2023
- };
2024
- //#endregion
2025
2113
  //#region src/connect/components/document-timeline/document-timeline.tsx
2026
- const defaultTimeLineItem = {
2027
- id: "default",
2028
- type: "bar",
2029
- addSize: 0,
2030
- delSize: 0
2031
- };
2032
- const DocumentTimeline = (props) => {
2033
- const { timeline = [], onItemClick } = props;
2034
- const [selectedItem, setSelectedItem] = useState(null);
2035
- const scrollContainerRef = useRef(null);
2036
- const handleClick = (item) => {
2037
- if (item.id === selectedItem || item.id === defaultTimeLineItem.id) {
2038
- onItemClick?.(null);
2039
- setSelectedItem(null);
2040
- } else {
2041
- onItemClick?.(item);
2042
- setSelectedItem(item.id);
2043
- }
2044
- };
2045
- const mergedTimelineItems = [...timeline, defaultTimeLineItem];
2046
- const [unselectedItems, selectedItems] = useMemo(() => {
2047
- const indexSelected = mergedTimelineItems.findIndex((item) => item.id === selectedItem);
2048
- return indexSelected === -1 ? [mergedTimelineItems, []] : [mergedTimelineItems.slice(0, indexSelected), mergedTimelineItems.slice(indexSelected)];
2049
- }, [mergedTimelineItems, selectedItem]);
2050
- const renderTimelineItems = useCallback((items) => {
2051
- return items.map((item) => {
2052
- if (item.type === "divider") {
2053
- const { timestampUtcMs, title, subtitle } = item;
2054
- return /* @__PURE__ */ jsx(HDivider, {
2055
- timestampUtcMs,
2056
- title,
2057
- subtitle,
2058
- onClick: () => handleClick(item),
2059
- isSelected: item.id === selectedItem
2060
- }, item.id);
2061
- }
2062
- return /* @__PURE__ */ jsx(TimelineBar, {
2063
- timestampUtcMs: item.timestampUtcMs,
2064
- addSize: item.addSize,
2065
- delSize: item.delSize,
2066
- additions: item.additions,
2067
- deletions: item.deletions,
2068
- isSelected: item.id === selectedItem,
2069
- onClick: () => handleClick(item)
2070
- }, item.id);
2071
- });
2072
- }, [handleClick, selectedItem]);
2073
- const unselectedContent = useMemo(() => renderTimelineItems(unselectedItems), [unselectedItems, renderTimelineItems]);
2074
- const selectedContent = useMemo(() => renderTimelineItems(selectedItems), [selectedItems, renderTimelineItems]);
2075
- useEffect(() => {
2076
- if (scrollContainerRef.current) scrollContainerRef.current.scrollLeft = scrollContainerRef.current.scrollWidth;
2077
- }, []);
2078
- return /* @__PURE__ */ jsx(ConnectTooltipProvider, {
2079
- delayDuration: 0,
2080
- skipDelayDuration: 0,
2081
- children: /* @__PURE__ */ jsxs("div", {
2082
- className: "relative h-[36px] w-full",
2083
- children: [
2084
- /* @__PURE__ */ jsx("div", {
2085
- className: "absolute left-0 z-20 h-[17px] w-[6px] bg-background",
2086
- children: /* @__PURE__ */ jsx("div", { className: "mt-[11px] h-[6px] w-[6px] rounded-tl-md bg-background" })
2087
- }),
2088
- /* @__PURE__ */ jsx("div", {
2089
- className: "absolute top-[11px] right-0 z-20 h-[6px] w-[6px] bg-background",
2090
- children: /* @__PURE__ */ jsx("div", { className: "h-[6px] w-[6px] rounded-tr-md bg-background" })
2091
- }),
2092
- /* @__PURE__ */ jsx("div", { className: "absolute inset-x-0 bottom-0 h-[25px] rounded-md bg-background" }),
2093
- /* @__PURE__ */ jsx("div", {
2094
- className: "absolute inset-x-0 bottom-0 h-[36px]",
2095
- children: /* @__PURE__ */ jsx("div", {
2096
- ref: scrollContainerRef,
2097
- className: "h-full overflow-x-auto rounded-md",
2098
- children: /* @__PURE__ */ jsxs("div", {
2099
- className: "ml-auto flex h-[36px] w-max items-end px-2 pb-0",
2100
- children: [/* @__PURE__ */ jsx("div", {
2101
- className: "flex",
2102
- children: unselectedContent
2103
- }), /* @__PURE__ */ jsx("div", {
2104
- className: "flex rounded-sm bg-info/10",
2105
- children: selectedContent
2106
- })]
2107
- })
2108
- })
2109
- }),
2110
- /* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute bottom-0 left-0 z-10 h-[25px] w-2 rounded-l-md bg-background" }),
2111
- /* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute right-0 bottom-0 z-10 h-[25px] w-2 rounded-r-md bg-background" })
2112
- ]
2113
- })
2114
- });
2115
- };
2114
+ const DocumentTimeline = lazyComponent(() => import("../document-timeline.impl-zx6f7k2d.js").then((m) => m.DocumentTimeline));
2116
2115
  //#endregion
2117
2116
  //#region src/connect/components/document-toolbar/containers.tsx
2118
2117
  /**
@@ -2239,12 +2238,11 @@ function ToolbarRedoButton(props) {
2239
2238
  }) } = props;
2240
2239
  const { redo, canRedo } = useRedo(document?.header.id);
2241
2240
  const onClick = makeOnClick(document, onClickOverride, redo);
2242
- const disabled = !canRedo;
2243
2241
  return /* @__PURE__ */ jsx(ToolbarButton, {
2244
2242
  "data-testid": "toolbar-redo-button",
2245
2243
  "aria-label": "Redo",
2246
2244
  className,
2247
- disabled,
2245
+ disabled: !canRedo,
2248
2246
  onClick,
2249
2247
  children
2250
2248
  });
@@ -2315,7 +2313,8 @@ function ToolbarHistoryButton(props) {
2315
2313
  /**
2316
2314
  * Toolbar control for closing the current document view.
2317
2315
  *
2318
- * By default, this selects the current document's parent folder. Provide
2316
+ * By default, this goes back when the app's history allows, else it selects the
2317
+ * current document's parent folder. Provide
2319
2318
  * `children` to replace the default icon, or `onClick` to override the default
2320
2319
  * close behavior.
2321
2320
  */
@@ -2324,8 +2323,7 @@ function ToolbarCloseButton(props) {
2324
2323
  name: "XmarkLight",
2325
2324
  size: 16
2326
2325
  }) } = props;
2327
- const parentFolder = useNodeParentFolderById(document?.header.id);
2328
- const onClick = makeOnClick(document, onClickOverride, () => setSelectedNode(parentFolder));
2326
+ const onClick = makeOnClick(document, onClickOverride, useCloseNode(document?.header.id));
2329
2327
  return /* @__PURE__ */ jsx(ToolbarButton, {
2330
2328
  "data-testid": "toolbar-close-button",
2331
2329
  "aria-label": "Close document",
@@ -2860,7 +2858,7 @@ function UploadFileItemStatusRow(props) {
2860
2858
  }
2861
2859
  //#endregion
2862
2860
  //#region src/connect/components/upload-file-item/upload-file-item.tsx
2863
- const UploadFileItem = /* @__PURE__ */ forwardRef(function UploadFileItem(props, ref) {
2861
+ const UploadFileItem = /*#__PURE__*/ forwardRef(function UploadFileItem(props, ref) {
2864
2862
  const { fileName, fileSize, status, documentType, progress = 0, errorDetails, onClose, onOpenDocument, onFindResolution, className, ...delegatedProps } = props;
2865
2863
  return /* @__PURE__ */ jsxs("div", {
2866
2864
  ref,
@@ -3100,7 +3098,7 @@ function uploadsReducer(state, action) {
3100
3098
  }
3101
3099
  }
3102
3100
  function useUploadTracker(useLocalStorage = false, driveId) {
3103
- const [uploads, dispatch] = useReducer(uploadsReducer, useCallback(() => {
3101
+ const getInitialState = useCallback(() => {
3104
3102
  if (useLocalStorage && driveId) try {
3105
3103
  const stored = localStorage.getItem(`uploadTracker_${driveId}`);
3106
3104
  if (stored) return JSON.parse(stored);
@@ -3110,7 +3108,8 @@ function useUploadTracker(useLocalStorage = false, driveId) {
3110
3108
  return {};
3111
3109
  }
3112
3110
  return {};
3113
- }, [useLocalStorage, driveId])());
3111
+ }, [useLocalStorage, driveId]);
3112
+ const [uploads, dispatch] = useReducer(uploadsReducer, getInitialState());
3114
3113
  useEffect(() => {
3115
3114
  if (useLocalStorage && driveId) try {
3116
3115
  localStorage.setItem(`uploadTracker_${driveId}`, JSON.stringify(uploads));
@@ -3152,11 +3151,12 @@ function useUploadTracker(useLocalStorage = false, driveId) {
3152
3151
  });
3153
3152
  };
3154
3153
  try {
3154
+ const fileNode = await onAddFile(file, parent, progressCallback);
3155
3155
  dispatch({
3156
3156
  type: "SET_FILE_NODE",
3157
3157
  payload: {
3158
3158
  id: fileId,
3159
- fileNode: await onAddFile(file, parent, progressCallback) || void 0
3159
+ fileNode: fileNode || void 0
3160
3160
  }
3161
3161
  });
3162
3162
  } catch (error) {
@@ -3262,6 +3262,7 @@ function DropZone(props) {
3262
3262
  setConflictUploadId(null);
3263
3263
  };
3264
3264
  const { isDropTarget, ...dropProps } = useDropFile(handleAddFile);
3265
+ const setSelectedNode = useSetSelectedNode();
3265
3266
  return /* @__PURE__ */ jsxs("div", {
3266
3267
  className: twMerge("relative", className),
3267
3268
  ...enable ? dropProps : {},
@@ -3429,22 +3430,32 @@ function EditorUndoRedoButtons(props) {
3429
3430
  });
3430
3431
  }
3431
3432
  //#endregion
3432
- //#region assets/powerhouse-rounded.png
3433
- var powerhouse_rounded_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAABUHSURBVHgBxZwLsBTVmcf/X8+VN+EiT+XhuGo2aojomhQxqIMpS+NuIrqP6K6bYGk2tSYG0FR2XUHErCVruQKL+EiZCDFiJXEX7pYmbtzIGETxfUW0QKIODwHFxyW85d4+Oaf7PL5zuufembkD+aihT5/uOX36N//v+06f7r6EP6EVJ5ZaC0BJyKJcPY0IRSGSMiDLEMnSWIf8VEjIZYSKiLEpAsqdQHulvdyBP5ERjqAxYOfK1amqCtRzF/geIrM1qVFgy3LZ1iWhHkmgRwTgiRNLCtp0+SnJQ7b6R6XM/17JFLQaHUBhl4KvyoKEuUQW2t5qL6/AYbbDBlCpTbrYdHlCM4Co1R0tBEa8mvWMk8sx4RdEsNRUlTLnHiVVub69XMFhsKYDdOAgwaE1OYSFYWDJpSB39EBu7n/hll5PHSThARasjitTVOT3l7z9cnkummxNBSjhTZPw5shmi7Z5MjjkPwPSUyLrQjfxMNwiSGi+amnUp//X5ISFaIBLRRLmvvVyeQmaZE0BKMEVZUMPSBgl06yDRRoSX0/3ybq0XwKFHRSBQ4tgS0Z5DmOyKd0u21xxVIyZzXDrXgP8s8+VposIN5NKDiamkYNj4ZFWG/l+a3F66gyVqf4LYemSl0FcJIQFl8KLDWBhFdohm53ZWzU2DDCJdTHmiIhm+BAMJArc1qjQKZCMAikPmKoRVXvrQeQq8yDGDrAsxD7AtBxhwdsvlmeiQWsIYOKyAsvl1yeScVHywVnXTY4Q6YORc2Hr2npLZtwShkSeSATC4YyLeByoXncxkEFk2+VgXHThkkoDLl03QA1vpUoURJE+ySirOk9xzKUpx61ZVyhIJHkQuZuqJBK6rQImAje2S8Fd29XJqorogymVNfVBrAtgCo9WqmIKL3BZVeetq2VkwVCQlREoMq33e0aszHOtiYt+8jBAhWYTe/sk6waiCCCm36ngqPog1gzQwiOpPA+OLEdGaRFz3Xx4PCM7pYKp1HUqPYbwABIx9yXBIp6D5bmyiDMqdBDjQIVyGUuIdSixJoAGnjyholEaX6ZgosB1o3xwFKgvyLpEbI2CXhJLHEaBxNwzqYuzEOOYqVDtGzMVxjrfGKCqKpYQqSaIEWowCW95Fp6BEMG6c7JNlQt6P7MtSrclLi6nE6hgv5fsg4L+jqxXZUSsrUj/OGY/1z5FkV2ioJfJp8DKsq92G+mP/nHVNlWf/N7ak5LDynM9JJarkUZPbAo97SDHefPlQaZaWBZi5OBBA9HwdC9kPwrWlUl/OHBK9nGx1Ko4InuC0OswY0sinbOMgiPdNUoUSHw/YmEiMvXwtqcKIZ2cvBgyGlHcr2Pbpv9DowCLE0rTqEDzDBCrpqRnBasOdyIFu18UGRWRU5RRjIWl2+LuTy6WGqWTBpEqJoAYcUjwIDmYsJA5MBY/0u08P6WlSa2ji7s6tlfWVGNEVeHJuBcJekUetdXGM+ZWVllWQRE7YXcmdpuOfSbj+jHRnJc7IWInZntKJqHoeEc6rhHLwKTSSZxJJN4QJzbZWCeRmNWpZWwSSrLsQAtOrxYPW1DFIhHNR3J5FsY3piymSB4bBw0chLPPOg1nTPhz9O3XhxEwJcr9CanbyhTenj37sXjpf+OTQ4cSiGd9fgK+PPlMuL3MWDGV0/4DB/Haho148vkXsGffXj0KIj3yidIkkp6xLqvziO1oScJsRScekKUpyLFcBRYnnjctEvJLHqCCVk7BuqyLaU6B5517Jq675nKMPXYkmm3b3/sQN9x6L9a/tdmq7ed334LiuGN6/O7Ojz7GLXf/CE+9+JJVoc3CcaDCrtgpUNcBXVdWXli1JGw3NwYOHXX88mRyINKQoDOelziy8M4563QsuG0mPjV4IJptGzZuxoybFmHT1vds/Jp6wdn46vlfqun7A/v3x0XnTMaGyia8s22bn0CY8atvMlNmqU1sHXn80o4dlQN8/8wwRmbdOfKrRZNVfXhhBjbwIgwaNBCzf3AlDof9pvwCrvnX+Xhv58cW3hD5I111+V+hXrt+2j9isOwrvGFNlQ/P3qCiDHgzwvY8gCpxCIqmgY3ziPgVhomDrmxATjn7LzBi2FA02+5/8FHMvX0J9u8/aBOQKvz9JedjZAPHGzd6FM4584wAlh4vGqje0IeVIaaHY8NAgVFJkSZ2bQuqAo/cuFDVTzj5BDTTPt61B9+/6R78ZNmvbGIwbnfMyGHSdSejUTv95M+4gTP5iqNwnUMkGdYCFXoApcvP8WZLzFDEDaRgxm1uKJLW9e/fF82yd7fvxLdm3IHVL6yzihP6o8qXfe08HN06GI1a3759sipzVyG+8uxHb0vv91izAE+Y8OWpiZ+DWKwjO96zv47nzuxXa5K99sY7Et5/JhCV2Ul4HfsGDuyHiy9oXH2pMSB2AK6uZAKX9a5eLMjW4pmlkmnJjgPlkOhinlEtnDxgTJF8iqq31var1bjz7l/ik85O3aZxXT3jIsufPnE8+vXtpdoNPDMzHWuIgtwO6dSP3o+SoWE6kFegY6XCstozUaAKjHLTtFB9/J8HzHNhf4qqEYvlWOu+pY/itgUP4+ChTjfvx5o0sy8D+/dDU0yryruE9JIGsi5slgIlk0wSBRa6CiWhrxPt/xk1umvY1AMI8D6N2e7d+/HDO36K3z2zlimZz/npjwa6sbI1GQD3OmxohQsDxZQjfVBBgeuSVWCSTPqopyywItlduW/QW+ea5sPc2oNGQKMAN23egauuvR1PrV5rE4R3RW/AmXOSi+0ffIjXN1bQNMvGOF9tvMzOU16klNQyBQhR8uIbBSCtm5opH/KP3gC/VWvW4erpd8ori/ft9wXC6RChs6+bPFDLux76H3R2daFhy4XmIJkZIG8aDb4iZSRMRBcpX5arRQNJwEH0lrYM+PdCeK9qs2WPPInvz74Xu3bvzWzz7nCw3ympo7T+pTfexG0/ehC9MUFk2xfEvEm7sCAmjrxYCCoqdjIGtkz0rgCtVIOPV4+AV+3w7rjrl/j58nL6LQ0m05Qncq1L5tpKkW3l1eg/oB+u/8bXexcPlSjs7QDtZZTGWLsMBvK2nzIOtkSISwhuS3o7BSuur9zFe7b9Bz7BTbc9gPLTa+3XzUjB3CziSYTv40HUJ6JO+OHH/z8ZwH/n7y5BvUb6ZJIZGdLnoUES+bNe4OdskomyGHLOFFTMNh1cjZCDJeC1WLPd8+P/lfBeZb1PzesomKsSm9tj8c9OnuoJ0vvbHsWCh3+Bek14xzbK0xXQs+A2HprhDmsg7dNpkfz2cSa25btnaMRKtYHcvuNDtP16dXdN6ZMSCLOw8NZFADWFsOSxx/EfDy5DXRY4WuIFduiia8mf3gobUOJTAFszDQumvibY+o1bsE/OpqTti7Af2eybLHkSEb4izfQ927bsiSew8BePoFajHtZtPUswTKDaRFHNYxe9QatdETnNU889ybGdH+4K9hWZss2I5h+/30FmP7KwXVZ29uPHHsM9y2t7qtdLXpSzkRc1ubzwpZJ2qxeAqrCivJZrFOjggf3zN4QuTH62s9nPYXX76T2ca6d2T9sKPPTEb9CTJfFcoAYTPKeFLl2MuvueV6S89Zp6gM+eUkShELnd7Xf9rGoDu0FFruwlErhEg6A/qrx4+XLs2ru3pr6xg+ZsABOKsEX+u0fezuihMW31RsdxY0bi3LM+h0wjXusBTA0ruSFJzm3tPl6fOAWB3Xv3ofzKy+jWRB0bhL/CH+qMEJ5E0BmzyO1ubQJM7Mbrr0Bx/Ci/X5R1W5ccmAsT/KGN3h6C5N3Z9sEH6M5E6L8ie07eehWlynEgKpnGUY2NSAabRHWQ0/apwQPwX/O+i/HjHESX1fTwxSQFDpXX6f2FFyOF7w5mN6oenTKJkq9zDYnMF7xt8kfoiMiPOtm93N5uK/9pRHXcoR0zahjuvWMGTigem361myTi3FX4617/3KrfA4ETx4xBjyZc/4UQOWDNueuye0jdLCuRPIlKoioDKQSVSVXcZepX4ohhQ7Bo3rUYlyiRfd9zYa0ssEELG9aAcn4yVjF62DCcftJJqNk8NxVGXeDwBNtH2HWpQFnaBPs9d5kE+zwJ4LZ4rfhHrsOtFcT7bp+B8WO1O+e4adIqy7xWjfZ4QaM6U/Y96ih899K/xrAhQ9CtGS8ywrNPq7p6DtSes7BfTp5oVYGi3bmpaZwPV2P4bsyVkVV9raYgLr71Wow9dgQ8ILnjUOEOz6pcMf3XR8K75eqrcfHkWm46ifQRGO51Go4IXNaCM8q022mTupSrcCUJDgw+/VCF6XHjetlZS2LivBnJMMdANLEuEx68ATZYf9O1McOH42ezZ+OiSZNQkwnvF0h1giDe6XoOlBiXKIrLEQooC/agtaPMoPkBAC6YZnRYt40ecTQWzb0WgwYNQHYyIRjSwJegWTv1+OPxkxtuwMnHHYeaLThP71npOAAJf7tNop0t7ZF6tzZJJFZ5bimCpc1Y8JfInFx9NvaYEbjsq1P8QTTC6SuwowqbwadOPhtLZ92YKLAu85TGFZcDlG83SpSeq9iZe1BtFopwH/fF2GalVKUxy1KiN+ysXWIf1WAK5M7KB9vKfeQ471/+4XL88J+uThJHXWbVB60XDSuEF/vwePwT/L4wRFfZ0jWAPPUJ/TRnEB89FfbOhh89xJ8kyJy0+6GOHT4M99/wA1xx4QVozKq4LnvtwT4XaFw65vtJcDHaVEvpkwmFQll0ig65V2t6I8lATGctoOvUP1L16h6xjo/pdFmMppl+cNKeqKdEOUAeOxYLr/sexo3qxQOcRiz8Ud7gI/g+sfE89kFLWTWVKFD5sgRR9lQlhK8+mHcrYg03tkpthgrflDfMvbEku2Qzv2HpjIl4cO6s3sFLLFSUr74MUGGgai8gscT8XQb3jLToWiigXmeI3Y0eQQmoZD1Wjz50yfVCGkRJKzRpP/LHaA3YiidWpQUb55z6lBdc9bWL8O1LL0bfPnXGu2oWumeiEe66sQ+ZxcNIRG2mGXvFXVn3dFlu7bBS1cozH6NAq77YV2dvFLhl+/to++3TqZaZqtXxBg3oj1u/8y1877K/aSI8MKXFDlwc1jl47LUwmX1X2Wlv//lAiIWerIOEwl03hksqqu7gwU/QqC1+aDkOdh4Cj3XKjj92FJbOvRF/OfmLaKbt239AOhwDZSAxcBaaVV7aLVk7l7flz/m0tCxIVGhUZ1/Uk7iY8ixEk5nlAV5+bQMasVfX/x6Pr3rOtmPi6Rknfxo//ffZOHFcDbMqddraDW+CP52PrtgNWUKIPBtL9RXQp8zb8gAmyUSp0LqQVpiBmUDsSg7iQ+zC7555CVu2vYd67fb7lmWGEn97fgl3/dtMDBnU/Kf93//oI/x2zXPMbWMNKU5AuriXgiPfI5eGL2VnZx2VCtX1sVWfeojHh5i4s4GIFOLu3Xtw5+KfoR57bOWzWPf7tyDMeFMmjeu+8XXM+vY0DOzXpOcAA5tz193Ys2dPCq+LuW1X8L6IXrIEUtnc/szNYXuZ90TUexBDR47dJdPsVHMrL505TtOjvZlO7k6deQ7nnU3v4o0Nb+PzZ5yKgQP6d3sihzo7cf2ti/CHPXuT744eMQyLZs3EV85ubrwztnn7DsxauAhPPvu8dV8LJ/aVp9yZ2PWwfvxj5h92bGkP26VqBzzus19aieTPmLD35PhrXeTXE7mnVtXEwJRzvoAJp5yE/v36InMDVi7Wrt+IR3690o73rrniUhwzcrjL5d7sM7LTW6EJXtQnL/9Tye2l19/AU8+/KG827XGZlg9VgqSRujRSj0tGG1ix5dVnch/AqQqw+JlJRdFSeAXe+3LuRRvz/hwxeHZ78Ois/wyeLrOHX/mNo+w0vgMogixtl0JvMdesZqAMlkFj9vpW5hLNJJHY254oUTplRPHplfY1lTxOVV937fhga8fQEeMPypO6kDuvvRFkzf30ZEbW5lQVB70e7u+mrvI/3mQFvHEYcy0wQMJC8IYe2kVF7IPMXGH42dbtL+J/3rx2TRlVrNv3hTt2blkzZPi4oRLYJDYRksIKtOs9+GCuX8mBhAfSLUU1gBYehwUfYsyXImd77C7LkFUdV6SnPKtkLNz62rPz0I31+Mb60DEnrEFX14VSiaMztyF4nMpVmwZLsDCI8qDpNhDnKM+dmHNJXzHeNLvNpExlQazjFwsu3jGQSFy3fcvaZ3t88LBHgElWHjZGvfY+VajnaIhlYmEgpSsOB5v6TsxNg7nt5jsBTAYqMwNitpnZktgHKgJImVgXM3B6jEdMsQ6eqEQRvtKxY2uPf8iRUKMlSSWilYKoGD6M7t5SB0sU5o/y8IQCbyl4UNW7JID5zfJEvSls+7vpdbNklQjjpKdScAUiV8HSQxS8KdWSRsMAsxAZHA4JDpzLzAygGUDaD3mwBFliOb1zedgC82Kl/i92MEUOUHuPJ2ZloZVXqB1ebhd7shQiVspJnaIB4D/VD6tMmNcFkB3OJJg4RL2bt0zKIoiqwluY+GshWfcH/IwtdCjmsQ42LJB6yuCQhLe+dnhhV2u2BGKBlstjT8wAMxEyT3XgEOGAg7LwyMXTrIkMQD549tQGwM/mPuh0sEDtUZe4pF54vLsN2fhTvqhmb6YjT3lAVoG6COS4M5CvwIyxoVGyDNxXr4ugPlScFXJMC1v29b25UmnsL//2CqCycadOmiZjx3zpj62+4hgNW+3q0/cv3C5uSTm9YyoUQUG4bYIr0HNlOHB6XR69Q84lzH339ecWoBfWa4DKdHKZL2dVpnpuag5RFaarznTFW81xYyZD302Z+my98BUr7/8UOunKRlw2tKYANJaoUYg5slhEbnwLfJR4tV+XZwYXH9mIMKl42Zl/Mb0ZLrP83C2vr1mCJllTARobe8qkm6WLfJM0SEFcZIE6e+iNCDZltMjVxmGyeuWuMgTKWDdgQaOxrpodFoDKlFt3FVBCokhRDORmi34crKU7ottVnnFl+4cNnLHDBpDbuAlfmIpOeSlI+CbDl6/E7nok9HYvDbNtMNCojIgWbl1XfRalWXZEABorFkutXYP3lRRMeabnikSZeZ2wlKqsO9NMK0JQG7WIcmH3gPLhUlueHVGAoSmgnYMOTJQTASU5YjxOzvkVpXJaVewUwStoClL6dx/UXyOP5AevikjeJTvCwEL7I6IVG2Tw6vcCAAAAAElFTkSuQmCC";
3434
- //#endregion
3435
- //#region src/connect/components/ens-avatar/ens-avatar.tsx
3436
- function ENSAvatar(props) {
3437
- const { avatarUrl = powerhouse_rounded_default, size = "14px" } = props;
3438
- return /* @__PURE__ */ jsx("img", {
3439
- alt: "ENS Avatar",
3440
- className: "flex-none rounded-full object-contain",
3441
- src: avatarUrl,
3442
- style: {
3443
- width: size,
3444
- height: size
3445
- }
3433
+ //#region src/connect/components/branding/connect-branding.tsx
3434
+ /**
3435
+ * Connect's branding as the components see it: the host app provides it once
3436
+ * at its root (images already resolved to data URIs) and the components read
3437
+ * it from here instead of reaching into configuration. `icons` are the drive
3438
+ * explorer's, which the generic plugin owns; `appName`, `icon` and
3439
+ * `homeBackground` are Connect's identity (`connect.branding`). Without a
3440
+ * provider every built-in icon renders.
3441
+ */
3442
+ const ConnectBrandingContext = /*#__PURE__*/ createContext({});
3443
+ function ConnectBrandingProvider(props) {
3444
+ return /* @__PURE__ */ jsx(ConnectBrandingContext.Provider, {
3445
+ value: props.branding ?? {},
3446
+ children: props.children
3446
3447
  });
3447
3448
  }
3449
+ /** The provided branding; `{}` (built-in look) without a provider. */
3450
+ function useConnectBranding() {
3451
+ return useContext(ConnectBrandingContext);
3452
+ }
3453
+ /** The icon for a document of `documentType`: the explorer's icon for that
3454
+ * type, else its default document icon, else undefined (the icon the package
3455
+ * ships, or the built-in one). */
3456
+ function brandedDocumentIcon(branding, documentType) {
3457
+ return branding.icons?.documents?.[documentType] ?? branding.icons?.document ?? void 0;
3458
+ }
3448
3459
  //#endregion
3449
3460
  //#region src/connect/constants/options.tsx
3450
3461
  const defaultDriveOptions = [
@@ -3675,6 +3686,11 @@ function getDriveSharingType$1(drive) {
3675
3686
  }
3676
3687
  function FileItem(props) {
3677
3688
  const { fileNode, className, customDocumentIconSrc } = props;
3689
+ const setSelectedNode = useSetSelectedNode();
3690
+ const preloadNode = usePreloadNode();
3691
+ const target = useNodeTarget(fileNode);
3692
+ const link = useLinkProps(target, () => setSelectedNode(fileNode));
3693
+ const href = props.href ?? (target ? link.href : void 0);
3678
3694
  const [mode, setMode] = useState("READ");
3679
3695
  const [isDropdownMenuOpen, setIsDropdownMenuOpen] = useState(false);
3680
3696
  const [selectedDrive] = useSelectedDriveSafe();
@@ -3685,9 +3701,12 @@ function FileItem(props) {
3685
3701
  });
3686
3702
  const { isAllowedToCreateDocuments } = useUserPermissions();
3687
3703
  const editorModules = useEditorModulesForDocumentType(fileNode.documentType);
3688
- const preloadEditors = () => editorModules?.forEach((editorModule) => {
3689
- preloadEditorModule(editorModule);
3690
- });
3704
+ const preload = () => {
3705
+ editorModules?.forEach((editorModule) => {
3706
+ preloadEditorModule(editorModule);
3707
+ });
3708
+ preloadNode(fileNode);
3709
+ };
3691
3710
  const { onRenameNode, onRenameDriveNodes, onDuplicateNode } = useNodeActions();
3692
3711
  const downloadDocument = useDownloadDocument(fileNode.id);
3693
3712
  const isReadMode = mode === "READ";
@@ -3718,13 +3737,15 @@ function FileItem(props) {
3718
3737
  handler();
3719
3738
  setIsDropdownMenuOpen(false);
3720
3739
  }
3740
+ const branding = useConnectBranding();
3741
+ const documentIconSrc = customDocumentIconSrc ?? brandedDocumentIcon(branding, fileNode.documentType);
3721
3742
  const iconNode = /* @__PURE__ */ jsxs("div", {
3722
3743
  className: "relative",
3723
- children: [customDocumentIconSrc ? /* @__PURE__ */ jsx("img", {
3744
+ children: [documentIconSrc ? /* @__PURE__ */ jsx("img", {
3724
3745
  alt: "file icon",
3725
- className: "max-w-none",
3746
+ className: "max-w-none object-contain",
3726
3747
  height: 34,
3727
- src: customDocumentIconSrc,
3748
+ src: documentIconSrc,
3728
3749
  width: 32,
3729
3750
  draggable: false
3730
3751
  }) : /* @__PURE__ */ jsx(DefaultFileIcon, {}), isReadMode && syncStatus && /* @__PURE__ */ jsx("div", {
@@ -3758,6 +3779,7 @@ function FileItem(props) {
3758
3779
  children: /* @__PURE__ */ jsx("button", {
3759
3780
  className: twMerge("hidden group-hover:block", isDropdownMenuOpen && "block"),
3760
3781
  onClick: (e) => {
3782
+ e.preventDefault();
3761
3783
  e.stopPropagation();
3762
3784
  setIsDropdownMenuOpen(true);
3763
3785
  },
@@ -3773,10 +3795,15 @@ function FileItem(props) {
3773
3795
  onCancel,
3774
3796
  onSubmit
3775
3797
  });
3776
- return /* @__PURE__ */ jsx("div", {
3777
- className: "relative w-64",
3778
- onClick: isReadMode ? () => setSelectedNode(fileNode) : void 0,
3779
- onMouseEnter: preloadEditors,
3798
+ const isLink = isReadMode && !!href;
3799
+ return /* @__PURE__ */ jsx(isLink ? "a" : "div", {
3800
+ href: isLink ? href : void 0,
3801
+ "aria-current": isLink ? link["aria-current"] : void 0,
3802
+ className: "relative block w-64",
3803
+ onClick: isLink ? link.onClick : isReadMode ? () => setSelectedNode(fileNode) : void 0,
3804
+ onMouseEnter: preload,
3805
+ onTouchStart: preload,
3806
+ onFocus: preload,
3780
3807
  ...dragProps,
3781
3808
  children: /* @__PURE__ */ jsx("div", {
3782
3809
  className: containerStyles,
@@ -3902,6 +3929,12 @@ function DefaultFileIcon() {
3902
3929
  //#region src/connect/components/folder-item/folder-item.tsx
3903
3930
  function FolderItem(props) {
3904
3931
  const { folderNode, className } = props;
3932
+ const folderIconSrc = useConnectBranding().icons?.folder;
3933
+ const setSelectedNode = useSetSelectedNode();
3934
+ const preloadNode = usePreloadNode();
3935
+ const target = useNodeTarget(folderNode);
3936
+ const link = useLinkProps(target, () => setSelectedNode(folderNode));
3937
+ const href = props.href ?? (target ? link.href : void 0);
3905
3938
  const { isAllowedToCreateDocuments } = useUserPermissions();
3906
3939
  const [mode, setMode] = useState("READ");
3907
3940
  const [isDropdownMenuOpen, setIsDropdownMenuOpen] = useState(false);
@@ -3949,9 +3982,15 @@ function FolderItem(props) {
3949
3982
  onSubmit
3950
3983
  });
3951
3984
  const containerStyles = twMerge("group flex h-12 cursor-pointer items-center rounded-lg bg-muted px-2 select-none", isDragging ? "opacity-60" : isDropTarget ? "bg-info/10" : "", className);
3952
- return /* @__PURE__ */ jsx("div", {
3953
- className: "relative w-64 hover:hover-effect",
3954
- onClick: isReadMode ? () => setSelectedNode(folderNode) : void 0,
3985
+ const isLink = isReadMode && !!href;
3986
+ return /* @__PURE__ */ jsx(isLink ? "a" : "div", {
3987
+ href: isLink ? href : void 0,
3988
+ "aria-current": isLink ? link["aria-current"] : void 0,
3989
+ className: "relative block w-64 hover:hover-effect",
3990
+ onClick: isLink ? link.onClick : isReadMode ? () => setSelectedNode(folderNode) : void 0,
3991
+ onMouseEnter: () => preloadNode(folderNode),
3992
+ onTouchStart: () => preloadNode(folderNode),
3993
+ onFocus: () => preloadNode(folderNode),
3955
3994
  children: /* @__PURE__ */ jsxs("div", {
3956
3995
  ...dragProps,
3957
3996
  ...dropProps,
@@ -3962,7 +4001,14 @@ function FolderItem(props) {
3962
4001
  className: "p-1",
3963
4002
  children: /* @__PURE__ */ jsx("div", {
3964
4003
  className: "relative text-foreground",
3965
- children: /* @__PURE__ */ jsx(Icon, {
4004
+ children: folderIconSrc ? /* @__PURE__ */ jsx("img", {
4005
+ alt: "folder icon",
4006
+ className: "object-contain",
4007
+ src: folderIconSrc,
4008
+ width: 24,
4009
+ height: 24,
4010
+ draggable: false
4011
+ }) : /* @__PURE__ */ jsx(Icon, {
3966
4012
  name: "FolderClose",
3967
4013
  size: 24
3968
4014
  })
@@ -3976,6 +4022,7 @@ function FolderItem(props) {
3976
4022
  children: /* @__PURE__ */ jsx("button", {
3977
4023
  className: twMerge("ml-auto hidden group-hover:block", isDropdownMenuOpen && "block"),
3978
4024
  onClick: (e) => {
4025
+ e.preventDefault();
3979
4026
  e.stopPropagation();
3980
4027
  setIsDropdownMenuOpen(true);
3981
4028
  },
@@ -4008,7 +4055,7 @@ const Footer = ({ children, className, ...props }) => {
4008
4055
  };
4009
4056
  //#endregion
4010
4057
  //#region src/connect/components/form-input/form-input.tsx
4011
- const FormInput = /* @__PURE__ */ forwardRef(function FormInput(props, ref) {
4058
+ const FormInput = /*#__PURE__*/ forwardRef(function FormInput(props, ref) {
4012
4059
  const { icon, errorMessage, isDirty, containerClassName, inputClassName, errorMessageClassName, hideErrors = false, ...delegatedProps } = props;
4013
4060
  const type = props.type ?? "text";
4014
4061
  const isError = !!errorMessage;
@@ -4029,296 +4076,67 @@ const FormInput = /* @__PURE__ */ forwardRef(function FormInput(props, ref) {
4029
4076
  })] });
4030
4077
  });
4031
4078
  //#endregion
4032
- //#region src/connect/components/form/inputs/app-form-input.tsx
4033
- function appToInputOption(app) {
4034
- return {
4035
- value: app.id,
4036
- displayValue: app.name,
4037
- icon: /* @__PURE__ */ jsx(Icon, { name: "PowerhouseLogoSmall" }),
4038
- description: "Built by Powerhouse"
4039
- };
4040
- }
4041
- function AppFormInput(props) {
4042
- const { control, appOptions, ...delegatedProps } = props;
4043
- const items = appOptions.map(appToInputOption);
4044
- return /* @__PURE__ */ jsx(Controller, {
4045
- control,
4046
- name: "id",
4047
- render: ({ field }) => /* @__PURE__ */ jsx(ConnectSelect, {
4048
- ...delegatedProps,
4049
- ...field,
4050
- id: "id",
4051
- items
4052
- })
4053
- });
4054
- }
4055
- //#endregion
4056
- //#region src/connect/components/form/inputs/label.tsx
4057
- function Label(props) {
4058
- const { children, className, ...labelProps } = props;
4059
- return /* @__PURE__ */ jsx("label", {
4060
- ...labelProps,
4061
- className: twMerge("block font-semibold text-muted-foreground", className),
4062
- children
4063
- });
4064
- }
4065
- //#endregion
4066
4079
  //#region src/connect/components/form/add-local-drive-form.tsx
4067
- function AddLocalDriveForm(props) {
4068
- const { register, handleSubmit, control, formState: { errors } } = useForm({ defaultValues: {
4069
- name: "",
4070
- sharingType: "LOCAL",
4071
- availableOffline: false,
4072
- id: props.appOptions[0].id
4073
- } });
4074
- return /* @__PURE__ */ jsx("form", {
4075
- name: "add-local-drive",
4076
- onSubmit: (e) => void handleSubmit(props.onSubmit)(e),
4077
- className: "flex flex-col gap-4",
4078
- children: /* @__PURE__ */ jsxs("div", {
4079
- className: "flex flex-col gap-4",
4080
- children: [
4081
- /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx(Label, {
4082
- htmlFor: "name",
4083
- className: "text-sm font-medium text-foreground",
4084
- children: "Drive Name"
4085
- }), /* @__PURE__ */ jsx(FormInput, {
4086
- ...register("name", { required: "Drive name is required" }),
4087
- errorMessage: errors.name?.message,
4088
- placeholder: "Drive name"
4089
- })] }),
4090
- /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx(Label, {
4091
- htmlFor: "driveApp",
4092
- className: "text-sm font-medium text-foreground",
4093
- children: "Drive App"
4094
- }), /* @__PURE__ */ jsx(AppFormInput, {
4095
- control,
4096
- appOptions: props.appOptions
4097
- })] }),
4098
- /* @__PURE__ */ jsx(PowerhouseButton, {
4099
- className: "mt-2 w-full",
4100
- type: "submit",
4101
- children: "Create new drive"
4102
- })
4103
- ]
4104
- })
4105
- });
4106
- }
4107
- //#endregion
4108
- //#region src/connect/components/toggle/toggle.tsx
4109
- const Toggle = /* @__PURE__ */ forwardRef(function Toggle(props, ref) {
4110
- return /* @__PURE__ */ jsxs("label", {
4111
- className: "relative cursor-pointer items-center",
4112
- htmlFor: props.id,
4113
- children: [/* @__PURE__ */ jsx("input", {
4114
- className: "peer sr-only",
4115
- ref,
4116
- type: "checkbox",
4117
- value: "",
4118
- ...props
4119
- }), /* @__PURE__ */ jsx("div", { className: "peer h-6 w-11 rounded-full bg-muted-foreground peer-checked:bg-info peer-focus:outline-none after:absolute after:inset-s-0.5 after:top-0.5 after:size-5 after:rounded-full after:border after:border-none after:bg-background after:transition-all peer-checked:after:translate-x-full" })]
4120
- });
4121
- });
4122
- //#endregion
4123
- //#region src/connect/components/form/inputs/available-offline-toggle.tsx
4124
- const AvailableOfflineToggle = /* @__PURE__ */ forwardRef(function AvailableOfflineToggle(props, ref) {
4125
- return /* @__PURE__ */ jsxs("div", {
4126
- className: "flex items-center rounded-md border border-border bg-background p-3 text-foreground",
4127
- children: [/* @__PURE__ */ jsxs("div", {
4128
- className: "flex-1",
4129
- children: [/* @__PURE__ */ jsx("label", {
4130
- className: "font-medium text-foreground",
4131
- htmlFor: "availableOffline",
4132
- children: "Make available offline"
4133
- }), /* @__PURE__ */ jsxs("p", {
4134
- className: "text-xs text-foreground",
4135
- children: [
4136
- "Check this options if you keep a local backup",
4137
- /* @__PURE__ */ jsx("br", {}),
4138
- "available at all times."
4139
- ]
4140
- })]
4141
- }), /* @__PURE__ */ jsx(Toggle, {
4142
- id: "availableOffline",
4143
- ref,
4144
- ...props
4145
- })]
4146
- });
4147
- });
4148
- //#endregion
4149
- //#region src/connect/components/form/inputs/drive-name.tsx
4150
- function DriveName(props) {
4151
- return /* @__PURE__ */ jsxs("div", {
4152
- className: "flex gap-2 rounded-xl bg-muted p-3 font-semibold text-muted-foreground",
4153
- children: [/* @__PURE__ */ jsx(Icon, {
4154
- className: "text-foreground",
4155
- name: "Drive"
4156
- }), props.driveName]
4157
- });
4158
- }
4159
- //#endregion
4160
- //#region src/connect/components/form/inputs/location-info.tsx
4161
- function LocationInfo(props) {
4162
- const { location, className, ...divProps } = props;
4163
- const locationInfo = locationInfoByLocation[location];
4164
- return /* @__PURE__ */ jsxs("div", {
4165
- ...divProps,
4166
- className: twMerge("my-3 flex items-center gap-2 rounded-xl border border-border bg-background p-3 text-foreground shadow-sm", className),
4167
- children: [locationInfo.icon, /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("p", { children: locationInfo.title }), /* @__PURE__ */ jsx("p", {
4168
- className: "text-xs text-foreground",
4169
- children: locationInfo.description
4170
- })] })]
4171
- });
4172
- }
4080
+ const AddLocalDriveForm = lazyComponent(() => import("../add-local-drive-form.impl-COIpcmgW.js").then((m) => m.AddLocalDriveForm));
4173
4081
  //#endregion
4174
4082
  //#region src/connect/components/form/add-remote-drive-form.tsx
4175
- function AddRemoteDriveForm(props) {
4176
- const { sharingType = "PUBLIC", requestPublicDrive } = props;
4177
- const [remoteDriveDetails, setPublicDriveDetails] = useState();
4178
- const [showLocationSettings, setShowLocationSettings] = useState(false);
4179
- const [isUrlValid, setIsUrlValid] = useState(true);
4180
- const [hasConfirmedUrl, setHasConfirmedUrl] = useState(false);
4181
- const [errorMessage, setErrorMessage] = useState("");
4182
- const [url, setUrl] = useState("");
4183
- const [debouncedUrl, setDebouncedUrl] = useDebounceValue(url, 500);
4184
- const { register, handleSubmit, setValue } = useForm({
4185
- mode: "onBlur",
4186
- defaultValues: { availableOffline: remoteDriveDetails?.availableOffline ?? false }
4187
- });
4188
- useEffect(() => {
4189
- setDebouncedUrl(url);
4190
- }, [url]);
4191
- useEffect(() => {
4192
- setHasConfirmedUrl(false);
4193
- if (debouncedUrl === "") return;
4194
- fetchPublicDrive().catch(console.error);
4195
- async function fetchPublicDrive() {
4196
- try {
4197
- const { id, name } = await requestPublicDrive(debouncedUrl);
4198
- setPublicDriveDetails({
4199
- id,
4200
- name,
4201
- sharingType,
4202
- location: "SWITCHBOARD",
4203
- availableOffline: true
4204
- });
4205
- setValue("availableOffline", true);
4206
- setIsUrlValid(true);
4207
- setErrorMessage("");
4208
- } catch (error) {
4209
- setPublicDriveDetails(void 0);
4210
- setIsUrlValid(false);
4211
- setErrorMessage(error.message);
4212
- }
4213
- }
4214
- }, [
4215
- debouncedUrl,
4216
- setValue,
4217
- sharingType
4218
- ]);
4219
- function onSubmit({ availableOffline }) {
4220
- if (!remoteDriveDetails) return;
4221
- props.onSubmit({
4222
- ...remoteDriveDetails,
4223
- availableOffline,
4224
- url: debouncedUrl
4225
- });
4226
- }
4227
- return /* @__PURE__ */ jsx("form", {
4228
- onSubmit: (e) => void handleSubmit(onSubmit)(e),
4229
- children: hasConfirmedUrl ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
4230
- /* @__PURE__ */ jsx(DriveName, { driveName: remoteDriveDetails?.name ?? "New drive" }),
4231
- /* @__PURE__ */ jsx(Divider, { className: "my-3" }),
4232
- /* @__PURE__ */ jsxs(Disclosure, {
4233
- isOpen: showLocationSettings,
4234
- onOpenChange: () => setShowLocationSettings(!showLocationSettings),
4235
- title: "Location",
4236
- children: [/* @__PURE__ */ jsx(LocationInfo, { location: "SWITCHBOARD" }), /* @__PURE__ */ jsx(AvailableOfflineToggle, { ...register("availableOffline") })]
4237
- }),
4238
- /* @__PURE__ */ jsx(PowerhouseButton, {
4239
- className: "mt-4 w-full",
4240
- color: "dark",
4241
- type: "submit",
4242
- children: "Add new drive"
4243
- })
4244
- ] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(FormInput, {
4245
- errorMessage,
4246
- onChange: (e) => setUrl(e.target.value),
4247
- placeholder: "Drive URL",
4248
- required: true,
4249
- type: "url",
4250
- value: url
4251
- }), /* @__PURE__ */ jsx(PowerhouseButton, {
4252
- className: "mt-4 w-full py-2 text-base",
4253
- color: "dark",
4254
- size: "small",
4255
- disabled: !isUrlValid || url === "",
4256
- onClick: (e) => {
4257
- e.preventDefault();
4258
- setHasConfirmedUrl(true);
4259
- },
4260
- type: "button",
4261
- children: "Add drive"
4262
- })] })
4263
- });
4264
- }
4083
+ const AddRemoteDriveForm = lazyComponent(() => import("../add-remote-drive-form.impl-_SqOzbSt.js").then((m) => m.AddRemoteDriveForm));
4265
4084
  //#endregion
4266
- //#region src/connect/components/formatted-json-viewer.tsx
4267
- function FormattedJsonViewer(props) {
4268
- const { theme } = useTheme();
4269
- return /* @__PURE__ */ jsxs(JsonView, {
4270
- displayDataTypes: false,
4271
- displayObjectSize: false,
4272
- style: theme === "light" ? lightTheme : darkTheme,
4273
- ...props,
4274
- children: [/* @__PURE__ */ jsx(JsonView.Copied, { render: ({ onClick, ...props }) => {
4275
- if (props["data-copied"]) return /* @__PURE__ */ jsx(Icon, {
4276
- ...props,
4277
- className: "inline-block text-success",
4278
- name: "FilesEarmark",
4279
- size: 16
4280
- });
4281
- return /* @__PURE__ */ jsx(Icon, {
4282
- ...props,
4283
- onClick,
4284
- className: "inline-block cursor-pointer text-foreground",
4285
- name: "FilesEarmark",
4286
- size: 16
4287
- });
4288
- } }), /* @__PURE__ */ jsx(JsonView.String, { render: ({ children, ...rest }, { value, keyName }) => {
4289
- if (isString(children) && isString(value) && isStrictEqual(children, value) && value.length > 30) return /* @__PURE__ */ jsx("span", {
4290
- ...rest,
4291
- className: "inline-grid",
4292
- children: /* @__PURE__ */ jsxs("span", {
4293
- className: "pl-[1ch] indent-[-1ch] wrap-anywhere hyphens-none",
4294
- style: { maxWidth: `${60 - keyName.toString().length}ch` },
4295
- children: [
4296
- "\"",
4297
- children,
4298
- "\""
4299
- ]
4300
- })
4301
- });
4302
- return /* @__PURE__ */ jsxs("span", {
4303
- ...rest,
4304
- children: [
4305
- "\"",
4306
- children,
4307
- "\""
4308
- ]
4309
- });
4310
- } })]
4311
- });
4085
+ //#region src/connect/components/branding/background-layers.tsx
4086
+ /**
4087
+ * A decorated pane: the configured page colour with the background's layers
4088
+ * painted over it, in order, and the children above them all. Each layer is
4089
+ * placed by the shared `layerStyle`, the same declarations the desktop
4090
+ * loading page emits as static CSS, so a background configured once looks
4091
+ * the same in both hosts. Images come resolved (data URIs or URLs); a
4092
+ * light/dark pair follows the `.dark` theme class, not the OS scheme.
4093
+ * Without a background the pane is the theme's page colour and nothing more.
4094
+ */
4095
+ function BackgroundLayers(props) {
4096
+ const background = normalizeBackground(props.background);
4097
+ const color = colorVariants(background?.color);
4098
+ const style = color ? {
4099
+ "--ph-pane-bg": color.light,
4100
+ "--ph-pane-bg-dark": color.dark ?? color.light
4101
+ } : void 0;
4102
+ return /* @__PURE__ */ jsxs("div", {
4103
+ className: twMerge("relative size-full overflow-hidden", color ? "bg-(--ph-pane-bg) dark:bg-(--ph-pane-bg-dark)" : "bg-background", props.className),
4104
+ style,
4105
+ children: [background?.layers.map((layer, index) => /* @__PURE__ */ jsx(BackgroundLayer, { layer }, index)), props.children]
4106
+ });
4107
+ }
4108
+ function BackgroundLayer({ layer }) {
4109
+ const { light, dark } = imageVariants(layer.src);
4110
+ const style = layerStyle(layer);
4111
+ if (!dark) return /* @__PURE__ */ jsx("img", {
4112
+ src: light,
4113
+ alt: "",
4114
+ style
4115
+ });
4116
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("img", {
4117
+ src: light,
4118
+ alt: "",
4119
+ style,
4120
+ className: "dark:hidden"
4121
+ }), /* @__PURE__ */ jsx("img", {
4122
+ src: dark,
4123
+ alt: "",
4124
+ style,
4125
+ className: "hidden dark:block"
4126
+ })] });
4312
4127
  }
4313
4128
  //#endregion
4314
4129
  //#region src/connect/components/home-screen/home-background-image.tsx
4130
+ /** The default home-screen gradient. A custom `src` is kept for callers that
4131
+ * still pass one, sized to its box; HomeScreen itself renders custom images
4132
+ * as a hero below the drive tiles instead. */
4315
4133
  const HomeBackgroundImage = ({ src } = {}) => {
4316
4134
  if (src) return /* @__PURE__ */ jsx("picture", {
4317
- className: "pointer-events-none absolute inset-8 z-0 size-[calc(100%-32px)] object-contain",
4135
+ className: "pointer-events-none absolute inset-8 z-0",
4318
4136
  children: /* @__PURE__ */ jsx("img", {
4319
4137
  src,
4320
- alt: "background",
4321
- className: "object-contain"
4138
+ alt: "",
4139
+ className: "size-full object-contain"
4322
4140
  })
4323
4141
  });
4324
4142
  return /* @__PURE__ */ jsx("div", {
@@ -4407,10 +4225,15 @@ const HomeBackgroundImage = ({ src } = {}) => {
4407
4225
  //#endregion
4408
4226
  //#region src/connect/components/home-screen/home-screen-item.tsx
4409
4227
  const HomeScreenItem = function HomeScreenItem(props) {
4410
- const { icon, title, description, containerClassName, shareable, onClick } = props;
4411
- return /* @__PURE__ */ jsxs("div", {
4228
+ const { icon, title, description, containerClassName, shareable, href, onClick, onPreload } = props;
4229
+ return /* @__PURE__ */ jsxs(href ? "a" : "div", {
4230
+ href,
4231
+ "aria-current": href ? props["aria-current"] : void 0,
4412
4232
  className: twMerge("relative flex h-24 w-40 cursor-pointer flex-col items-center justify-center overflow-hidden rounded-md p-2 text-center text-sm text-foreground hover:hover-effect", containerClassName, onClick && "cursor-pointer"),
4413
4233
  onClick,
4234
+ onMouseEnter: onPreload,
4235
+ onTouchStart: onPreload,
4236
+ onFocus: href ? onPreload : void 0,
4414
4237
  children: [
4415
4238
  /* @__PURE__ */ jsx("div", {
4416
4239
  className: "mx-auto pb-2",
@@ -4460,13 +4283,19 @@ const HomeScreenAddDriveItem = function HomeScreenAddDriveItem(props) {
4460
4283
  //#endregion
4461
4284
  //#region src/connect/components/home-screen/home-screen.tsx
4462
4285
  const HomeScreen = function HomeScreen(props) {
4463
- const { children, containerClassName, homeBackground } = props;
4464
- return /* @__PURE__ */ jsx("div", {
4465
- className: twMerge("relative container mx-auto flex h-full flex-col", containerClassName),
4466
- children: /* @__PURE__ */ jsxs("div", {
4467
- className: "m-8 flex flex-wrap justify-center gap-4 bg-background pt-12",
4468
- children: [/* @__PURE__ */ jsx(HomeBackgroundImage, { src: homeBackground ?? void 0 }), children]
4469
- })
4286
+ const { children, containerClassName } = props;
4287
+ const background = normalizeBackground(props.homeBackground);
4288
+ const content = /* @__PURE__ */ jsxs("div", {
4289
+ className: twMerge("relative isolate container mx-auto flex h-full flex-col", containerClassName),
4290
+ children: [!background && /* @__PURE__ */ jsx(HomeBackgroundImage, {}), /* @__PURE__ */ jsx("div", {
4291
+ className: twMerge("relative z-10 m-8 flex flex-wrap justify-center gap-4 pt-12", background && "rounded-2xl bg-background/75 px-6 pb-6 backdrop-blur-sm"),
4292
+ children
4293
+ })]
4294
+ });
4295
+ if (!background) return content;
4296
+ return /* @__PURE__ */ jsx(BackgroundLayers, {
4297
+ background,
4298
+ children: content
4470
4299
  });
4471
4300
  };
4472
4301
  //#endregion
@@ -4490,7 +4319,8 @@ function IntegrityInspector({ onValidate, onRebuildKeyframes, onRebuildSnapshots
4490
4319
  clearResults();
4491
4320
  setStatus("running");
4492
4321
  try {
4493
- setValidationResult(await onValidate(documentId.trim(), branch.trim() || void 0));
4322
+ const result = await onValidate(documentId.trim(), branch.trim() || void 0);
4323
+ setValidationResult(result);
4494
4324
  setStatus("done");
4495
4325
  } catch (err) {
4496
4326
  setError(err instanceof Error ? err.message : String(err));
@@ -4507,7 +4337,8 @@ function IntegrityInspector({ onValidate, onRebuildKeyframes, onRebuildSnapshots
4507
4337
  clearResults();
4508
4338
  setStatus("running");
4509
4339
  try {
4510
- setRebuildResult(await onRebuildKeyframes(documentId.trim(), branch.trim() || void 0));
4340
+ const result = await onRebuildKeyframes(documentId.trim(), branch.trim() || void 0);
4341
+ setRebuildResult(result);
4511
4342
  setStatus("done");
4512
4343
  } catch (err) {
4513
4344
  setError(err instanceof Error ? err.message : String(err));
@@ -4524,7 +4355,8 @@ function IntegrityInspector({ onValidate, onRebuildKeyframes, onRebuildSnapshots
4524
4355
  clearResults();
4525
4356
  setStatus("running");
4526
4357
  try {
4527
- setRebuildResult(await onRebuildSnapshots(documentId.trim(), branch.trim() || void 0));
4358
+ const result = await onRebuildSnapshots(documentId.trim(), branch.trim() || void 0);
4359
+ setRebuildResult(result);
4528
4360
  setStatus("done");
4529
4361
  } catch (err) {
4530
4362
  setError(err instanceof Error ? err.message : String(err));
@@ -4864,7 +4696,8 @@ function AddDriveModal(props) {
4864
4696
  //#region src/connect/components/modal/create-document-modal.tsx
4865
4697
  const CLOSE_ANIMATION_DURATION$1 = 300;
4866
4698
  function CreateDocumentModal(props) {
4867
- const { onOpenChange, onContinue, overlayProps, contentProps, ...restProps } = props;
4699
+ const { onOpenChange, onContinue, overlayProps, contentProps, drives, driveId, onDriveChange, onAddDrive, ...restProps } = props;
4700
+ const needsDrive = !!drives && !driveId;
4868
4701
  const [nodeName, setNodeName] = useState("");
4869
4702
  const [isValid, setIsValid] = useState(false);
4870
4703
  const handleCancel = () => {
@@ -4872,11 +4705,12 @@ function CreateDocumentModal(props) {
4872
4705
  setTimeout(() => setNodeName(""), CLOSE_ANIMATION_DURATION$1);
4873
4706
  };
4874
4707
  const handleCreate = useCallback(() => {
4875
- if (!isValid) return;
4708
+ if (!isValid || needsDrive) return;
4876
4709
  onContinue(nodeName);
4877
4710
  setTimeout(() => setNodeName(""), CLOSE_ANIMATION_DURATION$1);
4878
4711
  }, [
4879
4712
  isValid,
4713
+ needsDrive,
4880
4714
  nodeName,
4881
4715
  onContinue
4882
4716
  ]);
@@ -4903,20 +4737,51 @@ function CreateDocumentModal(props) {
4903
4737
  }),
4904
4738
  /* @__PURE__ */ jsxs("div", {
4905
4739
  className: "my-6",
4906
- children: [!isValid && nodeName && /* @__PURE__ */ jsx("div", {
4907
- className: "mb-2 text-destructive",
4908
- children: "Document name must not be empty or contain control characters."
4909
- }), /* @__PURE__ */ jsx(FormInput, {
4910
- icon: /* @__PURE__ */ jsx(Icon, { name: "BrickGlobe" }),
4911
- onChange: (e) => {
4912
- const name = e.target.value;
4913
- setNodeName(name);
4914
- setIsValid(isValidName(name));
4915
- },
4916
- placeholder: "Document name",
4917
- required: true,
4918
- value: nodeName
4919
- })]
4740
+ children: [
4741
+ !isValid && nodeName && /* @__PURE__ */ jsx("div", {
4742
+ className: "mb-2 text-destructive",
4743
+ children: "Document name must not be empty or contain control characters."
4744
+ }),
4745
+ /* @__PURE__ */ jsx(FormInput, {
4746
+ icon: /* @__PURE__ */ jsx(Icon, { name: "BrickGlobe" }),
4747
+ onChange: (e) => {
4748
+ const name = e.target.value;
4749
+ setNodeName(name);
4750
+ setIsValid(isValidName(name));
4751
+ },
4752
+ placeholder: "Document name",
4753
+ required: true,
4754
+ value: nodeName
4755
+ }),
4756
+ !!drives?.length && /* @__PURE__ */ jsxs("label", {
4757
+ className: "mt-4 flex flex-col gap-1 text-sm text-muted-foreground",
4758
+ children: ["Drive", /* @__PURE__ */ jsxs("select", {
4759
+ className: "rounded-md border border-border bg-background px-3 py-2 text-foreground",
4760
+ value: driveId ?? "",
4761
+ onChange: (e) => onDriveChange?.(e.target.value),
4762
+ children: [!driveId && /* @__PURE__ */ jsx("option", {
4763
+ value: "",
4764
+ children: "Choose a drive"
4765
+ }), drives.map((drive) => /* @__PURE__ */ jsx("option", {
4766
+ value: drive.id,
4767
+ children: drive.name
4768
+ }, drive.id))]
4769
+ })]
4770
+ }),
4771
+ drives?.length === 0 && /* @__PURE__ */ jsxs("p", {
4772
+ className: "mt-4 text-sm text-muted-foreground",
4773
+ children: [
4774
+ "There's no drive to create it in.",
4775
+ " ",
4776
+ onAddDrive && /* @__PURE__ */ jsx("button", {
4777
+ type: "button",
4778
+ className: "cursor-pointer text-foreground underline",
4779
+ onClick: onAddDrive,
4780
+ children: "Add a drive"
4781
+ })
4782
+ ]
4783
+ })
4784
+ ]
4920
4785
  }),
4921
4786
  /* @__PURE__ */ jsxs("div", {
4922
4787
  className: "mt-8 flex justify-between gap-3",
@@ -4928,7 +4793,7 @@ function CreateDocumentModal(props) {
4928
4793
  }), /* @__PURE__ */ jsx(ModalButton, {
4929
4794
  variant: "confirm",
4930
4795
  type: "submit",
4931
- disabled: !isValid,
4796
+ disabled: !isValid || needsDrive,
4932
4797
  children: "Create"
4933
4798
  })]
4934
4799
  })
@@ -5102,169 +4967,12 @@ function ConnectDeleteItemModal(props) {
5102
4967
  });
5103
4968
  }
5104
4969
  //#endregion
5105
- //#region src/connect/components/form/inputs/drive-name-input.tsx
5106
- const DriveNameInput = /* @__PURE__ */ forwardRef(function DriveNameInput(props, ref) {
5107
- return /* @__PURE__ */ jsx(FormInput, {
5108
- ...props,
5109
- icon: props.icon ?? /* @__PURE__ */ jsx(Icon, { name: "Drive" }),
5110
- id: "driveName",
5111
- placeholder: "Drive name",
5112
- ref
5113
- });
5114
- });
5115
- //#endregion
5116
- //#region src/connect/components/form/inputs/delete-drive.tsx
5117
- function DeleteDrive(props) {
5118
- const { drive, handleDeleteDrive, onCancel } = props;
5119
- const [driveNameInput, setDriveNameInput] = useState("");
5120
- const isAllowedToDelete = driveNameInput === drive.header.name;
5121
- function deleteDrive() {
5122
- if (isAllowedToDelete) handleDeleteDrive();
5123
- }
5124
- return /* @__PURE__ */ jsxs("div", { children: [
5125
- /* @__PURE__ */ jsx("p", {
5126
- className: "mb-2 rounded-md bg-background p-4 text-center text-foreground",
5127
- children: "Are you sure you want to delete this drive? All files and subfolders within it will be removed. Do you want to proceed?"
5128
- }),
5129
- /* @__PURE__ */ jsx(DriveNameInput, {
5130
- icon: /* @__PURE__ */ jsx(Icon, { name: "Lock" }),
5131
- onChange: (event) => setDriveNameInput(event.target.value),
5132
- placeholder: "Enter drive name...",
5133
- value: driveNameInput
5134
- }),
5135
- /* @__PURE__ */ jsxs("div", {
5136
- className: "flex gap-3",
5137
- children: [/* @__PURE__ */ jsx(PowerhouseButton, {
5138
- className: "w-full",
5139
- color: "light",
5140
- onClick: onCancel,
5141
- children: "Cancel"
5142
- }), /* @__PURE__ */ jsx(PowerhouseButton, {
5143
- className: "w-full",
5144
- color: "red",
5145
- disabled: !isAllowedToDelete,
5146
- onClick: deleteDrive,
5147
- children: "Delete"
5148
- })]
5149
- })
5150
- ] });
5151
- }
5152
- //#endregion
5153
- //#region src/connect/components/form/inputs/sharing-type-form-input.tsx
5154
- function SharingTypeFormInput(props) {
5155
- const { control, ...delegatedProps } = props;
5156
- return /* @__PURE__ */ jsx(Controller, {
5157
- control,
5158
- name: "sharingType",
5159
- render: ({ field }) => /* @__PURE__ */ jsx(ConnectSelect, {
5160
- ...delegatedProps,
5161
- ...field,
5162
- id: "sharingType",
5163
- items: sharingTypeOptions
5164
- })
5165
- });
5166
- }
5167
- //#endregion
5168
4970
  //#region src/connect/components/form/drive-settings-form.tsx
5169
- function DriveSettingsForm(props) {
5170
- const { drive, sharingType, availableOffline, systemInfo, onSubmit, handleDeleteDrive } = props;
5171
- const name = drive.header.name;
5172
- const [showLocationSettings, setShowLocationSettings] = useState(false);
5173
- const [showAbout, setShowAbout] = useState(false);
5174
- const [showDangerZone, setShowDangerZone] = useState(false);
5175
- const [showDeleteDrive, setShowDeleteDrive] = useState(false);
5176
- const { register, handleSubmit, control } = useForm({
5177
- mode: "onBlur",
5178
- defaultValues: {
5179
- name,
5180
- sharingType,
5181
- availableOffline
5182
- }
5183
- });
5184
- const location = sharingType === "PUBLIC" ? "SWITCHBOARD" : sharingType;
5185
- return /* @__PURE__ */ jsxs("form", {
5186
- onSubmit: (e) => void handleSubmit(onSubmit)(e),
5187
- children: [
5188
- /* @__PURE__ */ jsx(DriveNameInput, { ...register("name") }),
5189
- /* @__PURE__ */ jsx(Divider, { className: "my-4" }),
5190
- /* @__PURE__ */ jsx(Label, {
5191
- htmlFor: "sharingType",
5192
- children: "Sharing settings"
5193
- }),
5194
- /* @__PURE__ */ jsx(SharingTypeFormInput, { control }),
5195
- /* @__PURE__ */ jsx(Divider, { className: "my-3" }),
5196
- /* @__PURE__ */ jsxs(Disclosure, {
5197
- isOpen: showLocationSettings,
5198
- onOpenChange: () => setShowLocationSettings(!showLocationSettings),
5199
- title: "Location",
5200
- children: [/* @__PURE__ */ jsx(LocationInfo, { location }), /* @__PURE__ */ jsx(AvailableOfflineToggle, { ...register("availableOffline") })]
5201
- }),
5202
- /* @__PURE__ */ jsx(Divider, { className: "my-3" }),
5203
- /* @__PURE__ */ jsxs(Disclosure, {
5204
- isOpen: showAbout,
5205
- onOpenChange: () => setShowAbout(!showAbout),
5206
- title: "About this drive",
5207
- children: [
5208
- systemInfo.status === "local" && /* @__PURE__ */ jsx("p", {
5209
- className: "py-2 text-sm text-muted-foreground",
5210
- children: "Local drive — N/A"
5211
- }),
5212
- systemInfo.status === "loading" && /* @__PURE__ */ jsx("p", {
5213
- className: "py-2 text-sm text-muted-foreground",
5214
- children: "Loading…"
5215
- }),
5216
- systemInfo.status === "error" && /* @__PURE__ */ jsx("p", {
5217
- className: "py-2 text-sm text-destructive",
5218
- children: "Could not load system info"
5219
- }),
5220
- systemInfo.status === "ready" && /* @__PURE__ */ jsxs("div", {
5221
- className: "py-2 text-sm text-foreground",
5222
- children: [/* @__PURE__ */ jsxs("div", { children: [
5223
- /* @__PURE__ */ jsx("span", {
5224
- className: "font-medium",
5225
- children: "Version:"
5226
- }),
5227
- " ",
5228
- systemInfo.version
5229
- ] }), /* @__PURE__ */ jsxs("div", { children: [
5230
- /* @__PURE__ */ jsx("span", {
5231
- className: "font-medium",
5232
- children: "Git hash:"
5233
- }),
5234
- " ",
5235
- systemInfo.gitHash
5236
- ] })]
5237
- })
5238
- ]
5239
- }),
5240
- /* @__PURE__ */ jsx(Divider, { className: "my-3" }),
5241
- /* @__PURE__ */ jsx(Disclosure, {
5242
- isOpen: showDangerZone,
5243
- onOpenChange: () => setShowDangerZone(!showDangerZone),
5244
- title: "Danger zone",
5245
- children: /* @__PURE__ */ jsxs("button", {
5246
- className: "flex gap-2 py-3 font-semibold text-destructive transition hover:hover-effect",
5247
- onClick: () => setShowDeleteDrive(true),
5248
- type: "button",
5249
- children: [/* @__PURE__ */ jsx(Icon, { name: "Trash" }), "Delete drive"]
5250
- })
5251
- }),
5252
- showDeleteDrive && showDangerZone ? /* @__PURE__ */ jsx(DeleteDrive, {
5253
- drive,
5254
- handleDeleteDrive,
5255
- onCancel: () => setShowDeleteDrive(false)
5256
- }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Divider, { className: "my-3" }), /* @__PURE__ */ jsx(PowerhouseButton, {
5257
- className: "mb-4 w-full",
5258
- type: "submit",
5259
- children: "Confirm"
5260
- })] })
5261
- ]
5262
- });
5263
- }
4971
+ const DriveSettingsForm = lazyComponent(() => import("../drive-settings-form.impl-yV9u4h5c.js").then((m) => m.DriveSettingsForm));
5264
4972
  //#endregion
5265
4973
  //#region src/connect/components/modal/drive-settings-modal.tsx
5266
4974
  function DriveSettingsModal(props) {
5267
- const { drive, open, sharingType, availableOffline, systemInfo, onOpenChange, onDeleteDrive, onRenameDrive, onChangeSharingType, onChangeAvailableOffline, modalProps, containerProps } = props;
4975
+ const { drive, open, sharingType, availableOffline, systemInfo, onOpenChange, onDeleteDrive, onRenameDrive, onChangeSharingType, onChangeAvailableOffline, modalProps, containerProps, children } = props;
5268
4976
  const onSubmit = (data) => {
5269
4977
  if (data.name !== drive.header.name) onRenameDrive(drive, data.name);
5270
4978
  if (data.sharingType !== sharingType) onChangeSharingType(drive, data.sharingType);
@@ -5311,7 +5019,8 @@ function DriveSettingsModal(props) {
5311
5019
  drive,
5312
5020
  sharingType,
5313
5021
  availableOffline,
5314
- systemInfo
5022
+ systemInfo,
5023
+ children
5315
5024
  })
5316
5025
  ]
5317
5026
  })
@@ -5487,7 +5196,8 @@ function ProcessorsInspector({ getProcessors, onRetry }) {
5487
5196
  const [error, setError] = useState(null);
5488
5197
  const loadProcessors = useCallback(async () => {
5489
5198
  try {
5490
- setProcessors(await getProcessors());
5199
+ const result = await getProcessors();
5200
+ setProcessors(result);
5491
5201
  setError(null);
5492
5202
  } catch (e) {
5493
5203
  setError(e instanceof Error ? e.message : String(e));
@@ -5517,9 +5227,10 @@ function ProcessorsInspector({ getProcessors, onRetry }) {
5517
5227
  }
5518
5228
  }, [onRetry, loadProcessors]);
5519
5229
  const handleSort = (columnKey) => {
5230
+ const newDirection = sort?.column === columnKey && sort.direction === "asc" ? "desc" : "asc";
5520
5231
  setSort({
5521
5232
  column: columnKey,
5522
- direction: sort?.column === columnKey && sort.direction === "asc" ? "desc" : "asc"
5233
+ direction: newDirection
5523
5234
  });
5524
5235
  };
5525
5236
  const sortedProcessors = sortProcessors(processors, sort);
@@ -5841,7 +5552,8 @@ function QueueInspector({ getQueueState, onPause, onResume }) {
5841
5552
  const [actionInProgress, setActionInProgress] = useState(false);
5842
5553
  const [selectedJob, setSelectedJob] = useState(null);
5843
5554
  const loadState = useCallback(async () => {
5844
- setState(await getQueueState());
5555
+ const newState = await getQueueState();
5556
+ setState(newState);
5845
5557
  setLoading(false);
5846
5558
  }, [getQueueState]);
5847
5559
  useEffect(() => {
@@ -5868,9 +5580,10 @@ function QueueInspector({ getQueueState, onPause, onResume }) {
5868
5580
  loadState
5869
5581
  ]);
5870
5582
  const handleSort = (columnKey) => {
5583
+ const newDirection = sort?.column === columnKey && sort.direction === "asc" ? "desc" : "asc";
5871
5584
  setSort({
5872
5585
  column: columnKey,
5873
- direction: sort?.column === columnKey && sort.direction === "asc" ? "desc" : "asc"
5586
+ direction: newDirection
5874
5587
  });
5875
5588
  };
5876
5589
  const sortedJobs = sortJobs([...state.executingJobs.map((job) => ({
@@ -6071,8 +5784,9 @@ const stateStyles = {
6071
5784
  disconnected: "bg-muted text-foreground"
6072
5785
  };
6073
5786
  function ConnectionStateBadge({ state, failureCount }) {
5787
+ const style = stateStyles[state] ?? "bg-muted text-foreground";
6074
5788
  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"),
5789
+ className: twMerge("inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium", style),
6076
5790
  children: [state, failureCount > 0 && /* @__PURE__ */ jsxs("span", {
6077
5791
  className: "text-xs opacity-75",
6078
5792
  children: [
@@ -6722,6 +6436,175 @@ function ChannelInspector({ remoteName, channel, onBack, onRefresh, connectionSt
6722
6436
  });
6723
6437
  }
6724
6438
  //#endregion
6439
+ //#region src/connect/components/remotes-inspector/components/peer-agreement-panel.tsx
6440
+ const cell = "px-3 py-1.5 text-xs text-foreground";
6441
+ const head = "px-3 py-1.5 text-left text-xs font-medium text-foreground";
6442
+ function versions(list) {
6443
+ return list && list.length > 0 ? list.join(", ") : "none";
6444
+ }
6445
+ /** How a remote's peer announced itself. */
6446
+ function peerManifestLabel(peer) {
6447
+ if (peer === void 0) return "Not yet heard (baseline)";
6448
+ if (peer.manifest === null) return "Silent (baseline)";
6449
+ return `Announced, revision ${peer.manifest.revision.slice(0, 8)}`;
6450
+ }
6451
+ function PeerAgreementPanel({ remoteName, collectionId, peer, agreement, holds }) {
6452
+ const local = agreement.local();
6453
+ const theirs = agreement.peer(remoteName);
6454
+ const protocols = Object.keys(local.protocols).sort();
6455
+ const features = Object.keys(local.features).sort();
6456
+ return /* @__PURE__ */ jsxs("section", {
6457
+ "aria-label": "Peer agreement",
6458
+ className: "flex flex-col gap-2 rounded-lg border border-border p-3",
6459
+ children: [
6460
+ /* @__PURE__ */ jsxs("div", {
6461
+ className: "flex items-center justify-between",
6462
+ children: [/* @__PURE__ */ jsx("h3", {
6463
+ className: "text-sm font-semibold text-foreground",
6464
+ children: "Peer agreement"
6465
+ }), /* @__PURE__ */ jsx("span", {
6466
+ className: "text-xs text-muted-foreground",
6467
+ children: peerManifestLabel(peer)
6468
+ })]
6469
+ }),
6470
+ /* @__PURE__ */ jsxs("table", {
6471
+ className: "w-full border-collapse",
6472
+ children: [/* @__PURE__ */ jsx("thead", {
6473
+ className: "bg-muted",
6474
+ children: /* @__PURE__ */ jsxs("tr", { children: [
6475
+ /* @__PURE__ */ jsx("th", {
6476
+ className: head,
6477
+ children: "Protocol"
6478
+ }),
6479
+ /* @__PURE__ */ jsx("th", {
6480
+ className: head,
6481
+ children: "Local"
6482
+ }),
6483
+ /* @__PURE__ */ jsx("th", {
6484
+ className: head,
6485
+ children: "Peer"
6486
+ }),
6487
+ /* @__PURE__ */ jsx("th", {
6488
+ className: head,
6489
+ children: "Limits new documents"
6490
+ })
6491
+ ] })
6492
+ }), /* @__PURE__ */ jsxs("tbody", { children: [protocols.map((protocol) => {
6493
+ const limits = agreement.limitedBy(collectionId, protocol).includes(remoteName);
6494
+ return /* @__PURE__ */ jsxs("tr", {
6495
+ className: "odd:bg-card even:bg-background",
6496
+ children: [
6497
+ /* @__PURE__ */ jsx("td", {
6498
+ className: cell,
6499
+ children: protocol
6500
+ }),
6501
+ /* @__PURE__ */ jsx("td", {
6502
+ className: cell,
6503
+ children: versions(local.protocols[protocol])
6504
+ }),
6505
+ /* @__PURE__ */ jsx("td", {
6506
+ className: cell,
6507
+ children: versions(theirs.protocols[protocol])
6508
+ }),
6509
+ /* @__PURE__ */ jsx("td", {
6510
+ className: twMerge(cell, limits && "text-warning"),
6511
+ children: limits ? "Yes" : "No"
6512
+ })
6513
+ ]
6514
+ }, protocol);
6515
+ }), features.map((feature) => /* @__PURE__ */ jsxs("tr", {
6516
+ className: "odd:bg-card even:bg-background",
6517
+ children: [
6518
+ /* @__PURE__ */ jsxs("td", {
6519
+ className: cell,
6520
+ children: [feature, " (feature)"]
6521
+ }),
6522
+ /* @__PURE__ */ jsx("td", {
6523
+ className: cell,
6524
+ children: versions(local.features[feature])
6525
+ }),
6526
+ /* @__PURE__ */ jsx("td", {
6527
+ className: cell,
6528
+ children: versions(theirs.features[feature])
6529
+ }),
6530
+ /* @__PURE__ */ jsx("td", {
6531
+ className: cell,
6532
+ children: "-"
6533
+ })
6534
+ ]
6535
+ }, feature))] })]
6536
+ }),
6537
+ /* @__PURE__ */ jsxs("h4", {
6538
+ className: "text-xs font-semibold text-foreground",
6539
+ children: [
6540
+ "Held documents (",
6541
+ holds.length,
6542
+ ")"
6543
+ ]
6544
+ }),
6545
+ holds.length === 0 ? /* @__PURE__ */ jsx("p", {
6546
+ className: "text-xs text-muted-foreground",
6547
+ children: "No documents held"
6548
+ }) : /* @__PURE__ */ jsxs("table", {
6549
+ className: "w-full border-collapse",
6550
+ children: [/* @__PURE__ */ jsx("thead", {
6551
+ className: "bg-muted",
6552
+ children: /* @__PURE__ */ jsxs("tr", { children: [
6553
+ /* @__PURE__ */ jsx("th", {
6554
+ className: head,
6555
+ children: "Document"
6556
+ }),
6557
+ /* @__PURE__ */ jsx("th", {
6558
+ className: head,
6559
+ children: "Branch"
6560
+ }),
6561
+ /* @__PURE__ */ jsx("th", {
6562
+ className: head,
6563
+ children: "Requires"
6564
+ }),
6565
+ /* @__PURE__ */ jsx("th", {
6566
+ className: head,
6567
+ children: "Peer runs"
6568
+ }),
6569
+ /* @__PURE__ */ jsx("th", {
6570
+ className: head,
6571
+ children: "Held since"
6572
+ })
6573
+ ] })
6574
+ }), /* @__PURE__ */ jsx("tbody", { children: holds.map((hold) => /* @__PURE__ */ jsxs("tr", {
6575
+ className: "odd:bg-card even:bg-background",
6576
+ children: [
6577
+ /* @__PURE__ */ jsx("td", {
6578
+ className: cell,
6579
+ children: hold.documentId
6580
+ }),
6581
+ /* @__PURE__ */ jsx("td", {
6582
+ className: cell,
6583
+ children: hold.branch
6584
+ }),
6585
+ /* @__PURE__ */ jsxs("td", {
6586
+ className: cell,
6587
+ children: [
6588
+ hold.reason.protocol,
6589
+ " ",
6590
+ hold.reason.version
6591
+ ]
6592
+ }),
6593
+ /* @__PURE__ */ jsx("td", {
6594
+ className: cell,
6595
+ children: versions(hold.reason.peerSupports)
6596
+ }),
6597
+ /* @__PURE__ */ jsx("td", {
6598
+ className: cell,
6599
+ children: new Date(hold.heldAtUtcMs).toLocaleString()
6600
+ })
6601
+ ]
6602
+ }, `${hold.documentId}:${hold.branch}`)) })]
6603
+ })
6604
+ ]
6605
+ });
6606
+ }
6607
+ //#endregion
6725
6608
  //#region src/connect/components/remotes-inspector/remotes-inspector.tsx
6726
6609
  const BASE_COLUMNS = [
6727
6610
  {
@@ -6749,6 +6632,11 @@ const BASE_COLUMNS = [
6749
6632
  label: "Filter",
6750
6633
  width: "200px"
6751
6634
  },
6635
+ {
6636
+ key: "peer",
6637
+ label: "Peer",
6638
+ width: "160px"
6639
+ },
6752
6640
  {
6753
6641
  key: "channel",
6754
6642
  label: "Channel",
@@ -6795,7 +6683,7 @@ function sortRemotes(remotes, sort) {
6795
6683
  return sort.direction === "asc" ? comparison : -comparison;
6796
6684
  });
6797
6685
  }
6798
- function RemotesInspector({ getRemotes, removeRemote, addRemoteManual, triggerPull, connectionStates }) {
6686
+ function RemotesInspector({ getRemotes, removeRemote, addRemoteManual, triggerPull, connectionStates, getAgreement, getHolds }) {
6799
6687
  const [remotes, setRemotes] = useState([]);
6800
6688
  const [loading, setLoading] = useState(true);
6801
6689
  const [sort, setSort] = useState();
@@ -6803,29 +6691,47 @@ function RemotesInspector({ getRemotes, removeRemote, addRemoteManual, triggerPu
6803
6691
  const [manualUrl, setManualUrl] = useState("");
6804
6692
  const [adding, setAdding] = useState(false);
6805
6693
  const [addError, setAddError] = useState();
6694
+ const [holds, setHolds] = useState([]);
6806
6695
  const hasRowActions = !!removeRemote || !!triggerPull;
6807
6696
  const columns = useMemo(() => hasRowActions ? [...BASE_COLUMNS, ACTIONS_COLUMN] : BASE_COLUMNS, [hasRowActions]);
6808
6697
  const loadRemotes = useCallback(async () => {
6809
6698
  setLoading(true);
6810
- setRemotes(await getRemotes());
6699
+ const data = await getRemotes();
6700
+ setRemotes(data);
6811
6701
  setLoading(false);
6812
6702
  }, [getRemotes]);
6813
6703
  useEffect(() => {
6814
6704
  loadRemotes();
6815
6705
  }, [loadRemotes]);
6706
+ useEffect(() => {
6707
+ if (!selectedRemote || !getHolds) return;
6708
+ let current = true;
6709
+ getHolds(selectedRemote.meta.name).then((loaded) => {
6710
+ if (current) setHolds(loaded);
6711
+ }).catch(() => {
6712
+ if (current) setHolds([]);
6713
+ });
6714
+ return () => {
6715
+ current = false;
6716
+ };
6717
+ }, [selectedRemote, getHolds]);
6816
6718
  const handleRefresh = useCallback(async () => {
6817
6719
  await loadRemotes();
6818
- if (selectedRemote) setSelectedRemote(remotes.find((r) => r.meta.id === selectedRemote.meta.id));
6720
+ if (selectedRemote) {
6721
+ const updated = remotes.find((r) => r.meta.id === selectedRemote.meta.id);
6722
+ setSelectedRemote(updated);
6723
+ }
6819
6724
  }, [
6820
6725
  loadRemotes,
6821
6726
  selectedRemote,
6822
6727
  remotes
6823
6728
  ]);
6824
6729
  const handleSort = (columnKey) => {
6825
- if (columnKey === "channel" || columnKey === "actions" || columnKey === "status") return;
6730
+ if (columnKey === "channel" || columnKey === "actions" || columnKey === "status" || columnKey === "peer") return;
6731
+ const newDirection = sort?.column === columnKey && sort.direction === "asc" ? "desc" : "asc";
6826
6732
  setSort({
6827
6733
  column: columnKey,
6828
- direction: sort?.column === columnKey && sort.direction === "asc" ? "desc" : "asc"
6734
+ direction: newDirection
6829
6735
  });
6830
6736
  };
6831
6737
  const handleViewChannel = (remote) => {
@@ -6867,13 +6773,30 @@ function RemotesInspector({ getRemotes, removeRemote, addRemoteManual, triggerPu
6867
6773
  const handlePull = useCallback((remote) => {
6868
6774
  triggerPull?.(remote.meta.name);
6869
6775
  }, [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
- });
6776
+ if (selectedRemote) {
6777
+ let agreement;
6778
+ try {
6779
+ agreement = getAgreement?.();
6780
+ } catch {
6781
+ agreement = void 0;
6782
+ }
6783
+ return /* @__PURE__ */ jsxs("div", {
6784
+ className: "flex h-full flex-col gap-2 overflow-auto",
6785
+ children: [agreement && /* @__PURE__ */ jsx(PeerAgreementPanel, {
6786
+ agreement,
6787
+ collectionId: selectedRemote.meta.collectionId.key,
6788
+ holds,
6789
+ peer: selectedRemote.meta.peer,
6790
+ remoteName: selectedRemote.meta.name
6791
+ }), /* @__PURE__ */ jsx(ChannelInspector, {
6792
+ channel: selectedRemote.channel,
6793
+ connectionState: connectionStates?.get(selectedRemote.meta.name),
6794
+ onBack: handleBack,
6795
+ onRefresh: () => void handleRefresh(),
6796
+ remoteName: selectedRemote.meta.name
6797
+ })]
6798
+ });
6799
+ }
6877
6800
  const sortedRemotes = sortRemotes(remotes, sort);
6878
6801
  return /* @__PURE__ */ jsxs("div", {
6879
6802
  className: "flex h-full flex-col gap-2",
@@ -6930,7 +6853,7 @@ function RemotesInspector({ getRemotes, removeRemote, addRemoteManual, triggerPu
6930
6853
  children: /* @__PURE__ */ jsx("tr", { children: columns.map((column, index) => {
6931
6854
  const isActive = sort?.column === column.key;
6932
6855
  const sortDirection = isActive ? sort.direction : "asc";
6933
- const isSortable = column.key !== "channel" && column.key !== "actions" && column.key !== "status";
6856
+ const isSortable = column.key !== "channel" && column.key !== "actions" && column.key !== "status" && column.key !== "peer";
6934
6857
  return /* @__PURE__ */ jsx("th", {
6935
6858
  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
6859
  onClick: () => isSortable && handleSort(column.key),
@@ -7000,6 +6923,13 @@ function RemotesInspector({ getRemotes, removeRemote, addRemoteManual, triggerPu
7000
6923
  children: formatFilter(remote.meta.filter)
7001
6924
  })
7002
6925
  }),
6926
+ /* @__PURE__ */ jsx("td", {
6927
+ className: "border-l border-border px-3 py-2 text-xs text-foreground",
6928
+ children: /* @__PURE__ */ jsx("span", {
6929
+ className: "block truncate",
6930
+ children: peerManifestLabel(remote.meta.peer)
6931
+ })
6932
+ }),
7003
6933
  /* @__PURE__ */ jsx("td", {
7004
6934
  className: "border-l border-border px-3 py-2",
7005
6935
  children: /* @__PURE__ */ jsxs("button", {
@@ -7077,7 +7007,8 @@ function WorkerInspector({ getInfo, onRestart }) {
7077
7007
  const [restarting, setRestarting] = useState(false);
7078
7008
  const loadInfo = useCallback(async () => {
7079
7009
  try {
7080
- setInfo(await getInfo());
7010
+ const next = await getInfo();
7011
+ setInfo(next);
7081
7012
  setError(null);
7082
7013
  } catch (e) {
7083
7014
  setError(e instanceof Error ? e.message : String(e));
@@ -7172,7 +7103,7 @@ function InspectorUnavailable({ message }) {
7172
7103
  })]
7173
7104
  });
7174
7105
  }
7175
- function InspectorModal({ open, onOpenChange, modalProps, containerProps, dbExplorerProps, remotesInspectorProps, queueInspectorProps, processorsInspectorProps, integrityInspectorProps, workerInspectorProps, unavailableTabs, defaultTab = "Database" }) {
7106
+ function InspectorModal({ open, onOpenChange, modalProps, containerProps, dbExplorerProps, remotesInspectorProps, queueInspectorProps, processorsInspectorProps, integrityInspectorProps, catchUpInspectorProps, workerInspectorProps, unavailableTabs, defaultTab = "Database" }) {
7176
7107
  return /* @__PURE__ */ jsx(Modal, {
7177
7108
  ...modalProps,
7178
7109
  contentProps: {
@@ -7257,6 +7188,20 @@ function InspectorModal({ open, onOpenChange, modalProps, containerProps, dbExpl
7257
7188
  label: "Integrity",
7258
7189
  children: /* @__PURE__ */ jsx(InspectorUnavailable, { message: unavailableTabs.Integrity })
7259
7190
  }) : null,
7191
+ catchUpInspectorProps ? /* @__PURE__ */ jsx(TabContent, {
7192
+ description: "Catch-up inspector",
7193
+ label: "Catch-up",
7194
+ value: "CatchUp",
7195
+ children: /* @__PURE__ */ jsx("div", {
7196
+ className: "h-full",
7197
+ children: /* @__PURE__ */ jsx(CatchUpInspector, { ...catchUpInspectorProps })
7198
+ })
7199
+ }) : unavailableTabs?.CatchUp ? /* @__PURE__ */ jsx(TabContent, {
7200
+ description: "Catch-up inspector",
7201
+ label: "Catch-up",
7202
+ value: "CatchUp",
7203
+ children: /* @__PURE__ */ jsx(InspectorUnavailable, { message: unavailableTabs.CatchUp })
7204
+ }) : null,
7260
7205
  workerInspectorProps && /* @__PURE__ */ jsx(TabContent, {
7261
7206
  description: "Worker inspector",
7262
7207
  label: "Worker",
@@ -7380,10 +7325,12 @@ function ReadRequiredModal(props) {
7380
7325
  useEffect(() => {
7381
7326
  const checkScroll = () => {
7382
7327
  const element = contentRef.current;
7383
- if (element) if (element.scrollHeight > element.clientHeight) {
7384
- setDisableClose(true);
7385
- element.addEventListener("scroll", handleScroll);
7386
- } else setDisableClose(false);
7328
+ if (element) {
7329
+ if (element.scrollHeight > element.clientHeight) {
7330
+ setDisableClose(true);
7331
+ element.addEventListener("scroll", handleScroll);
7332
+ } else setDisableClose(false);
7333
+ }
7387
7334
  };
7388
7335
  const handleScroll = () => {
7389
7336
  const element = contentRef.current;
@@ -7649,28 +7596,8 @@ function LocalStorage(props) {
7649
7596
  }
7650
7597
  //#endregion
7651
7598
  //#region src/connect/components/modal/settings-modal-v2/default-editor.tsx
7652
- function DefaultEditor(props) {
7653
- const { className, ...rest } = props;
7654
- return /* @__PURE__ */ jsx("div", {
7655
- className: twMerge("rounded-lg bg-background p-3", className),
7656
- children: /* @__PURE__ */ jsx(DefaultEditorSelect, { ...rest })
7657
- });
7658
- }
7659
- function DefaultEditorSelect(props) {
7660
- const { documentModelEditor, setDocumentModelEditor, documentModelEditorOptions, className } = props;
7661
- return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("h3", {
7662
- className: "mb-4 font-semibold text-foreground",
7663
- children: "Default Editor Selection"
7664
- }), /* @__PURE__ */ jsx(SelectFieldRaw, {
7665
- className: twMerge("max-w-fit min-w-36", className),
7666
- name: "default-editor",
7667
- required: true,
7668
- value: documentModelEditor,
7669
- options: documentModelEditorOptions,
7670
- multiple: false,
7671
- onChange: (value) => setDocumentModelEditor(value)
7672
- })] });
7673
- }
7599
+ const DefaultEditor = lazyComponent(() => import("../default-editor.impl-a6EOuEme.js").then((m) => m.DefaultEditor));
7600
+ const DefaultEditorSelect = lazyComponent(() => import("../default-editor.impl-a6EOuEme.js").then((m) => m.DefaultEditorSelect));
7674
7601
  //#endregion
7675
7602
  //#region src/connect/components/modal/settings-modal-v2/package-manager/parse-package-spec.ts
7676
7603
  /**
@@ -7896,6 +7823,7 @@ const VersionPicker = (props) => {
7896
7823
  className: "px-3 py-1 text-xs font-semibold tracking-wide text-muted-foreground uppercase",
7897
7824
  children: "Tags"
7898
7825
  }), filteredTags.map(([tag, ver]) => {
7826
+ const isSelected = selected.kind === "tag" && selected.value === tag;
7899
7827
  return /* @__PURE__ */ jsxs("button", {
7900
7828
  type: "button",
7901
7829
  onClick: () => {
@@ -7906,7 +7834,7 @@ const VersionPicker = (props) => {
7906
7834
  setOpen(false);
7907
7835
  setQuery("");
7908
7836
  },
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"),
7837
+ 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
7838
  children: [/* @__PURE__ */ jsx("span", {
7911
7839
  className: "truncate text-foreground",
7912
7840
  children: tag
@@ -7927,6 +7855,7 @@ const VersionPicker = (props) => {
7927
7855
  className: "px-3 py-1 text-xs font-semibold tracking-wide text-muted-foreground uppercase",
7928
7856
  children: "Versions"
7929
7857
  }), filteredVersions.map((ver) => {
7858
+ const isSelected = selected.kind === "version" && selected.value === ver;
7930
7859
  return /* @__PURE__ */ jsx("button", {
7931
7860
  type: "button",
7932
7861
  onClick: () => {
@@ -7937,7 +7866,7 @@ const VersionPicker = (props) => {
7937
7866
  setOpen(false);
7938
7867
  setQuery("");
7939
7868
  },
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"),
7869
+ 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
7870
  children: /* @__PURE__ */ jsxs("span", {
7942
7871
  className: "flex min-w-0 items-center gap-1.5 text-foreground",
7943
7872
  children: [/* @__PURE__ */ jsx("span", {
@@ -8086,6 +8015,14 @@ const PackageManagerListItem = (props) => {
8086
8015
  updateTarget
8087
8016
  ]
8088
8017
  }),
8018
+ registryPackage.sharedDepWarnings && registryPackage.sharedDepWarnings.length > 0 && /* @__PURE__ */ jsxs("span", {
8019
+ 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",
8020
+ title: registryPackage.sharedDepWarnings.join("\n"),
8021
+ children: [/* @__PURE__ */ jsx(Icon, {
8022
+ name: "Exclamation",
8023
+ size: 10
8024
+ }), "Shared deps out of date"]
8025
+ }),
8089
8026
  !(canPickVersion && hasVersionMetadata) && registryPackage.version && /* @__PURE__ */ jsxs("span", {
8090
8027
  className: "text-xs font-normal text-muted-foreground",
8091
8028
  children: ["v", registryPackage.version]
@@ -8129,7 +8066,8 @@ const PackageManagerListItem = (props) => {
8129
8066
  items: dropdownItems,
8130
8067
  onItemClick: (id) => {
8131
8068
  if (id === "install") {
8132
- onInstall(canPickVersion && hasVersionMetadata ? buildPackageSpec(registryPackage.name, selected.value) : registryPackage.name).catch(console.error);
8069
+ const spec = canPickVersion && hasVersionMetadata ? buildPackageSpec(registryPackage.name, selected.value) : registryPackage.name;
8070
+ onInstall(spec).catch(console.error);
8133
8071
  return;
8134
8072
  }
8135
8073
  if (id === "update") {
@@ -8597,619 +8535,8 @@ function ConnectUpgradeDriveModal(props) {
8597
8535
  });
8598
8536
  }
8599
8537
  //#endregion
8600
- //#region src/connect/components/revision-history/header/branch.tsx
8601
- function Branch(props) {
8602
- const { branch = "main" } = props;
8603
- return /* @__PURE__ */ jsxs("button", {
8604
- className: "flex h-8 w-fit items-center gap-1 rounded-lg bg-background pr-2 pl-1 text-xs text-foreground",
8605
- children: [
8606
- /* @__PURE__ */ jsx(Icon, { name: "Branch" }),
8607
- /* @__PURE__ */ jsx("span", { children: "BRANCH" }),
8608
- /* @__PURE__ */ jsx("span", {
8609
- className: "text-foreground",
8610
- children: branch
8611
- })
8612
- ]
8613
- });
8614
- }
8615
- //#endregion
8616
- //#region src/connect/components/revision-history/header/doc-id.tsx
8617
- function DocId(props) {
8618
- const { docId, onCopy } = props;
8619
- const [, copy] = useCopyToClipboard();
8620
- function handleCopy(text) {
8621
- return () => {
8622
- copy(text).then(() => {
8623
- onCopy?.();
8624
- }).catch((error) => {
8625
- console.error("Failed to copy!", error);
8626
- });
8627
- };
8628
- }
8629
- return /* @__PURE__ */ jsxs("button", {
8630
- className: "flex h-8 w-fit items-center gap-1 rounded-lg bg-background pr-2 pl-1 text-xs text-foreground",
8631
- onClick: handleCopy(docId),
8632
- children: [
8633
- /* @__PURE__ */ jsx(Icon, { name: "Link" }),
8634
- "DOC ID",
8635
- /* @__PURE__ */ jsx("span", {
8636
- className: "text-foreground",
8637
- children: docId
8638
- })
8639
- ]
8640
- });
8641
- }
8642
- //#endregion
8643
- //#region src/connect/components/revision-history/header/document-state.tsx
8644
- const DocumentState = (props) => {
8645
- const { documentState, onCopyState } = props;
8646
- const [, copy] = useCopyToClipboard();
8647
- function handleCopy() {
8648
- copy(JSON.stringify(documentState, null, 2)).then(() => {
8649
- onCopyState?.();
8650
- }).catch((error) => {
8651
- console.error("Failed to copy document state!", error);
8652
- });
8653
- }
8654
- return /* @__PURE__ */ jsx("button", {
8655
- className: "rounded-lg bg-background p-1 text-foreground",
8656
- onClick: handleCopy,
8657
- children: /* @__PURE__ */ jsx(Icon, { name: "CurlyBrackets" })
8658
- });
8659
- };
8660
- //#endregion
8661
- //#region src/connect/components/revision-history/header/scope.tsx
8662
- function Scope(props) {
8663
- const { value, onChange } = props;
8664
- return /* @__PURE__ */ jsx(ConnectSelect, {
8665
- absolutePositionMenu: true,
8666
- containerClassName: "z-10 w-fit rounded-lg bg-background text-xs text-muted-foreground",
8667
- id: "scope select",
8668
- 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
- }],
8676
- menuClassName: "min-w-0 text-muted-foreground",
8677
- onChange,
8678
- value
8679
- });
8680
- }
8681
- //#endregion
8682
- //#region src/connect/components/revision-history/header/header.tsx
8683
- function Header(props) {
8684
- const { title, docId, scope, onChangeScope, onClose, className, documentState, onCopyState, onCopyDocId, ...divProps } = props;
8685
- return /* @__PURE__ */ jsxs("header", {
8686
- className: twMerge("flex items-center justify-between bg-transparent", className),
8687
- ...divProps,
8688
- children: [/* @__PURE__ */ jsxs("div", {
8689
- className: "flex items-center gap-3",
8690
- children: [/* @__PURE__ */ jsx("button", {
8691
- name: "close-revision-history",
8692
- className: "rounded-lg bg-background p-1 text-foreground shadow-button",
8693
- onClick: onClose,
8694
- children: /* @__PURE__ */ jsx(Icon, { name: "VariantArrowLeft" })
8695
- }), /* @__PURE__ */ jsx("h1", {
8696
- className: "text-xs text-foreground",
8697
- children: title
8698
- })]
8699
- }), /* @__PURE__ */ jsxs("div", {
8700
- className: "flex items-center gap-2",
8701
- children: [
8702
- /* @__PURE__ */ jsx(DocId, {
8703
- docId,
8704
- onCopy: onCopyDocId
8705
- }),
8706
- documentState && /* @__PURE__ */ jsx(DocumentState, {
8707
- documentState,
8708
- onCopyState
8709
- }),
8710
- /* @__PURE__ */ jsx(Branch, {}),
8711
- /* @__PURE__ */ jsx(Scope, {
8712
- onChange: onChangeScope,
8713
- value: scope
8714
- })
8715
- ]
8716
- })]
8717
- });
8718
- }
8719
- //#endregion
8720
- //#region src/connect/hooks/use-ens.ts
8721
- const ensCache = /* @__PURE__ */ new Map();
8722
- function fetchEns(address) {
8723
- const cached = ensCache.get(address);
8724
- if (cached) return cached;
8725
- const promise = fetch(`https://api.ensdata.net/${address}`).then((res) => {
8726
- if (!res.ok) throw new Error(`ENS lookup failed: ${res.status}`);
8727
- return res.json();
8728
- }).catch((err) => {
8729
- ensCache.delete(address);
8730
- throw err instanceof Error ? err : /* @__PURE__ */ new Error("ENS lookup failed");
8731
- });
8732
- ensCache.set(address, promise);
8733
- return promise;
8734
- }
8735
- function useEns(address) {
8736
- const [data, setData] = useState();
8737
- const [isLoading, setIsLoading] = useState(false);
8738
- const [error, setError] = useState();
8739
- useEffect(() => {
8740
- if (!address) {
8741
- setData(void 0);
8742
- setError(void 0);
8743
- return;
8744
- }
8745
- let cancelled = false;
8746
- setIsLoading(true);
8747
- setError(void 0);
8748
- fetchEns(address).then((json) => {
8749
- if (cancelled) return;
8750
- setData(json);
8751
- }).catch((err) => {
8752
- if (cancelled) return;
8753
- setError(err instanceof Error ? err : /* @__PURE__ */ new Error("ENS lookup failed"));
8754
- }).finally(() => {
8755
- if (cancelled) return;
8756
- setIsLoading(false);
8757
- });
8758
- return () => {
8759
- cancelled = true;
8760
- };
8761
- }, [address]);
8762
- return {
8763
- data,
8764
- isLoading,
8765
- error
8766
- };
8767
- }
8768
- //#endregion
8769
- //#region src/connect/utils/address.ts
8770
- function formatEthAddress(address) {
8771
- return `${address.slice(0, 7)}...${address.slice(-5)}`;
8772
- }
8773
- //#endregion
8774
- //#region src/connect/components/code-popover.tsx
8775
- function CodePopover(props) {
8776
- const { content, trigger, anchor } = props;
8777
- const [isOpen, setIsOpen] = useState(false);
8778
- const opener = funnel(() => setIsOpen(true), {
8779
- triggerAt: "start",
8780
- minQuietPeriodMs: 300
8781
- });
8782
- const closer = funnel(() => setIsOpen(false), {
8783
- triggerAt: "start",
8784
- minQuietPeriodMs: 100
8785
- });
8786
- function open() {
8787
- closer.cancel();
8788
- opener.call();
8789
- }
8790
- function close() {
8791
- opener.cancel();
8792
- closer.call();
8793
- }
8794
- return /* @__PURE__ */ jsxs(Root$1, {
8795
- open: isOpen,
8796
- onOpenChange: (changedIsOpen) => changedIsOpen ? open() : close(),
8797
- children: [
8798
- /* @__PURE__ */ jsx(Trigger$1, {
8799
- onMouseEnter: open,
8800
- children: trigger
8801
- }),
8802
- !!anchor && /* @__PURE__ */ jsx(Anchor, {
8803
- asChild: true,
8804
- children: anchor
8805
- }),
8806
- /* @__PURE__ */ jsx(Portal$1, { children: /* @__PURE__ */ jsx(Content$1, {
8807
- forceMount: true,
8808
- onMouseLeave: close,
8809
- sideOffset: -28,
8810
- onCloseAutoFocus: (e) => e.preventDefault(),
8811
- collisionPadding: {
8812
- top: 24,
8813
- right: 24,
8814
- bottom: -1e4,
8815
- left: 24
8816
- },
8817
- className: "z-50 rounded-lg border border-border bg-popover p-2 text-xs text-popover-foreground shadow-tooltip outline-none",
8818
- children: content
8819
- }) })
8820
- ]
8821
- });
8822
- }
8823
- //#endregion
8824
- //#region src/connect/components/revision-history/revision/address.tsx
8825
- function Address(props) {
8826
- const { address, chainId } = props;
8827
- const { data: ensData } = useEns(address);
8828
- if (!address) return null;
8829
- const shortenedAddress = formatEthAddress(address);
8830
- return /* @__PURE__ */ jsx(CodePopover, {
8831
- content: /* @__PURE__ */ jsx(FormattedJsonViewer, { value: { address } }),
8832
- trigger: /* @__PURE__ */ jsxs("span", {
8833
- className: "flex w-fit cursor-pointer items-center gap-1 rounded-lg bg-muted p-1 text-xs text-muted-foreground",
8834
- children: [/* @__PURE__ */ jsx(ENSAvatar, {
8835
- address,
8836
- chainId,
8837
- avatarUrl: ensData?.avatar_url ?? void 0
8838
- }), shortenedAddress]
8839
- })
8840
- });
8841
- }
8842
- //#endregion
8843
- //#region src/connect/components/revision-history/revision/errors.tsx
8844
- function Errors(props) {
8845
- const { errors } = props;
8846
- const hasErrors = !!errors?.length;
8847
- const color = hasErrors ? "text-destructive" : "text-success";
8848
- const icon = hasErrors ? /* @__PURE__ */ jsx(Icon, {
8849
- name: "Exclamation",
8850
- size: 16
8851
- }) : /* @__PURE__ */ jsx(Icon, {
8852
- name: "Check",
8853
- size: 16
8854
- });
8855
- const text = hasErrors ? `Error: ${errors[0]}` : "No errors";
8856
- const content = /* @__PURE__ */ jsxs("span", {
8857
- className: twMerge("flex w-fit items-center rounded-lg border border-border bg-background px-2 py-1 text-xs", color, hasErrors && "cursor-pointer"),
8858
- children: [icon, /* @__PURE__ */ jsx("span", {
8859
- className: twMerge("inline-block max-w-36 truncate"),
8860
- children: text
8861
- })]
8862
- });
8863
- if (hasErrors) return /* @__PURE__ */ jsx(CodePopover, {
8864
- content: /* @__PURE__ */ jsx(FormattedJsonViewer, { value: errors }),
8865
- trigger: content
8866
- });
8867
- return content;
8868
- }
8869
- //#endregion
8870
- //#region src/connect/components/revision-history/revision/operation.tsx
8871
- function Operation$1(props) {
8872
- const { operationType, operationInput } = props;
8873
- return /* @__PURE__ */ jsx(CodePopover, {
8874
- content: /* @__PURE__ */ jsx(FormattedJsonViewer, { value: operationInput }),
8875
- trigger: /* @__PURE__ */ jsxs("span", {
8876
- className: "flex cursor-pointer items-center gap-2 text-xs text-foreground",
8877
- children: [operationType, /* @__PURE__ */ jsx(Icon, {
8878
- className: "text-foreground",
8879
- name: "Braces",
8880
- size: 16
8881
- })]
8882
- })
8883
- });
8884
- }
8885
- //#endregion
8886
- //#region src/connect/components/revision-history/revision/revision-number.tsx
8887
- function RevisionNumber(props) {
8888
- const { operationIndex, eventId, stateHash } = props;
8889
- const revisionNumber = operationIndex + 1;
8890
- return /* @__PURE__ */ jsx(CodePopover, {
8891
- content: /* @__PURE__ */ jsx(FormattedJsonViewer, { value: {
8892
- revisionNumber,
8893
- eventId,
8894
- stateHash
8895
- } }),
8896
- trigger: /* @__PURE__ */ jsxs("span", {
8897
- className: "flex cursor-pointer items-center gap-2 text-xs text-foreground",
8898
- children: [
8899
- "Revision ",
8900
- revisionNumber,
8901
- ".",
8902
- /* @__PURE__ */ jsx("a", { children: /* @__PURE__ */ jsx(Icon, {
8903
- className: "cursor-pointer text-foreground",
8904
- name: "Ellipsis",
8905
- size: 14
8906
- }) })
8907
- ]
8908
- })
8909
- });
8910
- }
8911
- //#endregion
8912
- //#region src/connect/components/revision-history/revision/signature.tsx
8913
- function Signature(props) {
8914
- const { signatures } = props;
8915
- if (!signatures?.length) return null;
8916
- return /* @__PURE__ */ jsx(CodePopover, {
8917
- trigger: /* @__PURE__ */ jsxs("span", {
8918
- className: "flex w-fit cursor-pointer items-center gap-1 rounded-lg border border-border bg-background px-2 py-1",
8919
- children: [
8920
- /* @__PURE__ */ jsx(VerificationStatus, { signatures }),
8921
- " ",
8922
- /* @__PURE__ */ jsx(Icon, {
8923
- className: "text-foreground",
8924
- name: "InfoSquare",
8925
- size: 16
8926
- })
8927
- ]
8928
- }),
8929
- content: /* @__PURE__ */ jsx(FormattedJsonViewer, {
8930
- value: signatures,
8931
- collapsed: 1
8932
- })
8933
- });
8934
- }
8935
- function VerificationStatus(props) {
8936
- const { signatures } = props;
8937
- if (!signatures?.length) return null;
8938
- const signatureCount = signatures.length;
8939
- const verifiedSignaturesCount = signatures.filter((signature) => signature.isVerified).length;
8940
- const verificationStatusText = `${verifiedSignaturesCount}/${signatureCount} ${signatureCount === 1 ? "signature" : "signatures"} verified`;
8941
- return /* @__PURE__ */ jsx("span", {
8942
- className: twMerge(`text-xs`, verifiedSignaturesCount === 0 ? "text-destructive" : verifiedSignaturesCount === signatureCount ? "text-success" : "text-warning"),
8943
- children: verificationStatusText
8944
- });
8945
- }
8946
- //#endregion
8947
- //#region src/connect/components/revision-history/revision/timestamp.tsx
8948
- function Timestamp(props) {
8949
- const { timestampUtcMs: timestamp } = props;
8950
- const timestampNumber = typeof timestamp === "string" && !timestamp.includes("-") ? parseInt(timestamp) : timestamp;
8951
- const date = new Date(timestampNumber);
8952
- const shortDate = format(date, "HH:mm 'UTC'");
8953
- return /* @__PURE__ */ jsx(CodePopover, {
8954
- content: /* @__PURE__ */ jsx(FormattedJsonViewer, { value: {
8955
- timestampFormatted: format(date, "eee, dd MMM yyyy HH:mm:ss 'UTC'"),
8956
- timestampUtcMs: timestamp
8957
- } }),
8958
- trigger: /* @__PURE__ */ jsxs("span", {
8959
- className: "cursor-pointer text-xs text-foreground",
8960
- children: ["committed at ", shortDate]
8961
- })
8962
- });
8963
- }
8964
- //#endregion
8965
- //#region src/connect/components/revision-history/revision/revision.tsx
8966
- function _Revision(props) {
8967
- return /* @__PURE__ */ jsxs("article", {
8968
- className: "flex items-center justify-between rounded-xl border border-border bg-background px-4 py-2",
8969
- children: [/* @__PURE__ */ jsxs("div", {
8970
- className: "flex items-center gap-2",
8971
- children: [
8972
- /* @__PURE__ */ jsx(RevisionNumber, { ...props }),
8973
- /* @__PURE__ */ jsx(Operation$1, { ...props }),
8974
- /* @__PURE__ */ jsx(Address, { ...props }),
8975
- /* @__PURE__ */ jsx(Timestamp, { ...props })
8976
- ]
8977
- }), /* @__PURE__ */ jsxs("div", {
8978
- className: "flex items-center gap-1",
8979
- children: [/* @__PURE__ */ jsx(Signature, { ...props }), /* @__PURE__ */ jsx(Errors, { ...props })]
8980
- })]
8981
- });
8982
- }
8983
- const Revision = /* @__PURE__ */ memo(_Revision);
8984
- //#endregion
8985
- //#region src/connect/components/revision-history/skip/skip.tsx
8986
- function Skip(props) {
8987
- const { operationIndex, skipCount } = props;
8988
- const revisionNumber = operationIndex;
8989
- const skippedRevisions = skipCount === 1 ? `${revisionNumber}` : `${revisionNumber} - ${revisionNumber + 1 - skipCount}`;
8990
- return /* @__PURE__ */ jsxs("article", {
8991
- className: "grid grid-cols-[1fr,auto,1fr] items-center py-2",
8992
- children: [
8993
- /* @__PURE__ */ jsx("div", { className: "h-px rounded-full bg-muted" }),
8994
- /* @__PURE__ */ jsxs("div", {
8995
- className: "mx-3 text-xs text-foreground",
8996
- children: [
8997
- "[Skipped Revision ",
8998
- skippedRevisions,
8999
- "]"
9000
- ]
9001
- }),
9002
- /* @__PURE__ */ jsx("div", { className: "h-px rounded-full bg-muted" })
9003
- ]
9004
- });
9005
- }
9006
- //#endregion
9007
- //#region src/connect/components/revision-history/utils.ts
9008
- function makeRows(operations) {
9009
- const revisionsAndSkips = [];
9010
- const seenDays = /* @__PURE__ */ new Set();
9011
- for (const operation of operations) {
9012
- if (!operation.timestampUtcMs) continue;
9013
- const day = operation.timestampUtcMs.split("T")[0];
9014
- if (!seenDays.has(day)) {
9015
- seenDays.add(day);
9016
- revisionsAndSkips.push({
9017
- type: "day",
9018
- height: 32,
9019
- timestampUtcMs: day
9020
- });
9021
- }
9022
- revisionsAndSkips.push({
9023
- type: "revision",
9024
- height: 46,
9025
- operationIndex: operation.index,
9026
- eventId: operation.id ?? "EVENT_ID_NOT_FOUND",
9027
- stateHash: operation.hash,
9028
- operationType: operation.action.type,
9029
- operationInput: operation.action.input ?? {},
9030
- address: operation.action?.context?.signer?.user.address,
9031
- chainId: operation.action?.context?.signer?.user.chainId,
9032
- timestampUtcMs: operation.timestampUtcMs,
9033
- signatures: makeSignatures(operation.action?.context?.signer?.signatures ?? []),
9034
- errors: operation.error ? [operation.error] : void 0
9035
- });
9036
- if (operation.skip > 0) revisionsAndSkips.push({
9037
- type: "skip",
9038
- height: 34,
9039
- operationIndex: operation.index,
9040
- skipCount: operation.skip,
9041
- timestampUtcMs: operation.timestampUtcMs
9042
- });
9043
- }
9044
- return revisionsAndSkips;
9045
- }
9046
- function makeSignatureFromSignatureArray(signatureArray) {
9047
- const [signerAddress, hash, prevStateHash, signatureBytes] = signatureArray;
9048
- return {
9049
- signerAddress,
9050
- hash,
9051
- prevStateHash,
9052
- signatureBytes,
9053
- isVerified: true
9054
- };
9055
- }
9056
- function makeSignatures(signaturesArray) {
9057
- return signaturesArray?.map(makeSignatureFromSignatureArray);
9058
- }
9059
- //#endregion
9060
- //#region src/connect/components/revision-history/timeline/day.tsx
9061
- function Day(props) {
9062
- const { timestampUtcMs: timestamp } = props;
9063
- const formattedDate = format(timestamp, "MMM dd, yyyy");
9064
- return /* @__PURE__ */ jsxs("h2", {
9065
- className: "-ml-6 flex items-center gap-1 bg-background py-2 text-xs text-foreground",
9066
- children: [
9067
- /* @__PURE__ */ jsx(Icon, {
9068
- name: "Ring",
9069
- size: 16
9070
- }),
9071
- " Changes on ",
9072
- formattedDate
9073
- ]
9074
- });
9075
- }
9076
- //#endregion
9077
- //#region src/connect/components/revision-history/timeline/timeline.tsx
9078
- 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));
9086
- const parentRef = useRef(null);
9087
- const hasNextPage = rows.length < allRows.length;
9088
- const rowVirtualizer = useVirtualizer({
9089
- count: rows.length,
9090
- getScrollElement: () => parentRef.current,
9091
- estimateSize: (i) => allRows[i].height,
9092
- gap: 8
9093
- });
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
- return /* @__PURE__ */ jsx("div", {
9116
- className: "border-l border-border dark:border-none",
9117
- ref: parentRef,
9118
- style: {
9119
- height: `${rowVirtualizer.getTotalSize()}px`,
9120
- width: "100%",
9121
- position: "relative"
9122
- },
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);
9143
- })
9144
- });
9145
- }
9146
- //#endregion
9147
8538
  //#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);
9153
- }, [
9154
- globalOperations,
9155
- localOperations,
9156
- scope
9157
- ]);
9158
- const { pageItems, pages, goToPage, goToNextPage, goToPreviousPage, goToFirstPage, goToLastPage, hiddenNextPages, isNextPageAvailable, isPreviousPageAvailable } = usePagination(visibleOperations, { itemsPerPage });
9159
- function onChangeScope(scope) {
9160
- goToFirstPage();
9161
- setScope(scope);
9162
- }
9163
- const PaginationComponent = visibleOperations.length > itemsPerPage ? /* @__PURE__ */ jsx("div", {
9164
- className: "mt-4 flex w-full justify-end",
9165
- children: /* @__PURE__ */ jsx(Pagination, {
9166
- firstPageLabel: "First Page",
9167
- goToFirstPage,
9168
- goToLastPage,
9169
- goToNextPage,
9170
- goToPage,
9171
- goToPreviousPage,
9172
- hiddenNextPages,
9173
- isNextPageAvailable,
9174
- isPreviousPageAvailable,
9175
- lastPageLabel: "Last Page",
9176
- nextPageLabel: "Next",
9177
- pages,
9178
- previousPageLabel: "Previous"
9179
- })
9180
- }) : /* @__PURE__ */ jsx("hr", { className: "h-12 border-none" });
9181
- return /* @__PURE__ */ jsx(ConnectTooltipProvider, { children: /* @__PURE__ */ jsxs("div", {
9182
- 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
- }),
9194
- 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", {
9198
- 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", {
9205
- className: "my-40 text-foreground",
9206
- children: "This document has no recorded operations yet."
9207
- })
9208
- }),
9209
- PaginationComponent
9210
- ]
9211
- }) });
9212
- }
8539
+ const RevisionHistory = lazyComponent(() => import("../revision-history.impl-DRbeai2m.js").then((m) => m.RevisionHistory));
9213
8540
  //#endregion
9214
8541
  //#region src/connect/components/search-bar/filter-item.tsx
9215
8542
  const FilterItem = (props) => {
@@ -9275,27 +8602,70 @@ const ConnectSearchBar = (props) => {
9275
8602
  });
9276
8603
  };
9277
8604
  //#endregion
8605
+ //#region src/connect/components/tooltip/tooltip.tsx
8606
+ function ConnectTooltip(props) {
8607
+ const { children, content, open, defaultOpen, onOpenChange, className, side = "top", sideOffset = 5, delayDuration, ...rest } = props;
8608
+ return /* @__PURE__ */ jsxs(Root, {
8609
+ defaultOpen,
8610
+ delayDuration,
8611
+ onOpenChange,
8612
+ open,
8613
+ children: [/* @__PURE__ */ jsx(Trigger, {
8614
+ asChild: true,
8615
+ children
8616
+ }), /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(Content, {
8617
+ ...rest,
8618
+ side,
8619
+ sideOffset,
8620
+ className: twMerge("z-50 rounded-lg border border-border bg-popover p-2 text-xs text-popover-foreground shadow-tooltip", className),
8621
+ children: content
8622
+ }) })]
8623
+ });
8624
+ }
8625
+ const ConnectTooltipProvider = Provider;
8626
+ //#endregion
9278
8627
  //#region src/connect/components/sidebar/sidebar-item.tsx
9279
8628
  const SidebarItem = function SidebarItem(props) {
9280
- const { icon, title, description: _description, containerClassName, active, onClick } = props;
8629
+ const { icon, title, description, containerClassName, active, href, onClick, onPreload } = props;
8630
+ const Element = href ? "a" : onClick ? "button" : "div";
8631
+ const current = href ? props["aria-current"] : void 0;
9281
8632
  return /* @__PURE__ */ jsx(ConnectTooltip, {
9282
- content: title,
8633
+ content: description ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("span", {
8634
+ className: "block font-medium",
8635
+ children: title
8636
+ }), /* @__PURE__ */ jsx("span", {
8637
+ className: "block opacity-80",
8638
+ children: description
8639
+ })] }) : title,
9283
8640
  side: "right",
9284
8641
  sideOffset: 12,
9285
8642
  className: "border-none bg-primary px-3 py-2 text-sm text-primary-foreground",
9286
- children: /* @__PURE__ */ jsxs("div", {
9287
- className: twMerge("group/sidebar-item relative flex cursor-pointer flex-col items-center justify-center text-center text-sm text-foreground", containerClassName, active && "bg-sidebar-accent text-sidebar-accent-foreground", onClick && "cursor-pointer"),
8643
+ children: /* @__PURE__ */ jsxs(Element, {
8644
+ href,
8645
+ type: Element === "button" ? "button" : void 0,
8646
+ "aria-label": title,
8647
+ "aria-description": description,
8648
+ "aria-current": current,
8649
+ className: twMerge("group/sidebar-item relative flex cursor-pointer flex-col items-center justify-center text-center text-sm text-foreground", containerClassName, "aria-[current=page]:bg-sidebar-accent aria-[current=page]:text-sidebar-accent-foreground", active && "bg-sidebar-accent text-sidebar-accent-foreground", onClick && "cursor-pointer"),
9288
8650
  onClick,
9289
- children: [active ? /* @__PURE__ */ jsx("div", { className: "absolute top-1/2 left-0 h-10 w-1 -translate-y-1/2 rounded-r-sm bg-info" }) : /* @__PURE__ */ jsx("div", { className: "absolute top-1/2 left-0 h-6 w-1 -translate-y-1/2 rounded-r-sm bg-secondary opacity-0 transition-opacity group-hover/sidebar-item:opacity-100" }), /* @__PURE__ */ jsx("div", {
9290
- className: "mx-auto py-4",
9291
- children: icon || /* @__PURE__ */ jsx("div", {
9292
- className: "flex size-8 items-center justify-center rounded-lg bg-primary",
9293
- children: /* @__PURE__ */ jsx("span", {
9294
- className: "text-sm font-medium text-primary-foreground",
9295
- children: title.slice(0, 1).toUpperCase()
8651
+ onMouseEnter: onPreload,
8652
+ onTouchStart: onPreload,
8653
+ onFocus: href ? onPreload : void 0,
8654
+ children: [
8655
+ /* @__PURE__ */ jsx("div", { className: twMerge("absolute top-1/2 left-0 hidden h-10 w-1 -translate-y-1/2 rounded-r-sm bg-info group-aria-[current=page]/sidebar-item:block max-sm:hidden!", active && "block") }),
8656
+ /* @__PURE__ */ jsx("div", { className: twMerge("absolute top-1/2 left-0 h-6 w-1 -translate-y-1/2 rounded-r-sm bg-secondary opacity-0 transition-opacity group-hover/sidebar-item:opacity-100 group-aria-[current=page]/sidebar-item:hidden max-sm:hidden", active && "hidden") }),
8657
+ /* @__PURE__ */ jsx("div", {
8658
+ className: "mx-auto py-4 max-sm:px-3 max-sm:py-2",
8659
+ children: icon || /* @__PURE__ */ jsx("div", {
8660
+ "aria-hidden": true,
8661
+ className: "flex size-8 items-center justify-center rounded-lg bg-primary",
8662
+ children: /* @__PURE__ */ jsx("span", {
8663
+ className: "text-sm font-medium text-primary-foreground",
8664
+ children: title.slice(0, 1).toUpperCase()
8665
+ })
9296
8666
  })
9297
8667
  })
9298
- })]
8668
+ ]
9299
8669
  })
9300
8670
  });
9301
8671
  };
@@ -9460,17 +8830,32 @@ const SidebarUser = ({ address, ensName, avatarUrl, etherscanUrl, onDisconnect }
9460
8830
  };
9461
8831
  //#endregion
9462
8832
  //#region src/connect/components/sidebar/sidebar-footer.tsx
9463
- const ConnectSidebarFooter = ({ address, ensName, avatarUrl, className, onLogin, onClickSettings, onDisconnect, onHomeClick, showDebug, onDebugClick, etherscanUrl = "", ...props }) => {
8833
+ const ConnectSidebarFooter = ({ address, ensName, avatarUrl, className, onLogin, onClickSettings, settingsHref, settingsCurrent, onDisconnect, onHomeClick, showDebug, onDebugClick, etherscanUrl = "", ...props }) => {
8834
+ const appLogoSrc = useConnectBranding().icon;
8835
+ const settingsIcon = /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Settings, {
8836
+ className: "text-foreground",
8837
+ size: 24,
8838
+ strokeWidth: 2
8839
+ }), /* @__PURE__ */ jsx("span", {
8840
+ className: "hidden text-sm/6 font-semibold text-foreground",
8841
+ children: "Settings"
8842
+ })] });
9464
8843
  return /* @__PURE__ */ jsxs(SidebarFooter, {
9465
8844
  ...props,
9466
- className: twMerge("flex flex-col items-center gap-3 border-t border-sidebar-border px-2 py-4 dark:border-none", className),
8845
+ className: twMerge("flex flex-col items-center gap-3 border-t border-sidebar-border px-2 py-4 max-sm:flex-row max-sm:border-t-0 max-sm:border-l max-sm:py-2 dark:border-none", className),
9467
8846
  children: [
9468
8847
  onHomeClick && /* @__PURE__ */ jsx("button", {
9469
8848
  "aria-label": "Home",
9470
8849
  type: "button",
9471
8850
  className: "cursor-pointer",
9472
8851
  onClick: onHomeClick,
9473
- children: /* @__PURE__ */ jsx(Icon, {
8852
+ children: appLogoSrc ? /* @__PURE__ */ jsx("img", {
8853
+ alt: "",
8854
+ className: "object-contain",
8855
+ src: appLogoSrc,
8856
+ width: 24,
8857
+ height: 24
8858
+ }) : /* @__PURE__ */ jsx(Icon, {
9474
8859
  className: "text-muted-foreground",
9475
8860
  name: "ConnectSmall",
9476
8861
  size: 24
@@ -9488,7 +8873,7 @@ const ConnectSidebarFooter = ({ address, ensName, avatarUrl, className, onLogin,
9488
8873
  })
9489
8874
  }),
9490
8875
  /* @__PURE__ */ jsx("div", {
9491
- className: onHomeClick ? "mt-3" : "",
8876
+ className: onHomeClick ? "mt-3 max-sm:mt-0" : "",
9492
8877
  children: address ? /* @__PURE__ */ jsx(SidebarUser, {
9493
8878
  address,
9494
8879
  ensName,
@@ -9497,19 +8882,19 @@ const ConnectSidebarFooter = ({ address, ensName, avatarUrl, className, onLogin,
9497
8882
  etherscanUrl
9498
8883
  }) : /* @__PURE__ */ jsx(SidebarLogin, { onLogin })
9499
8884
  }),
9500
- /* @__PURE__ */ jsxs("button", {
8885
+ settingsHref ? /* @__PURE__ */ jsx("a", {
8886
+ "aria-label": "Settings",
8887
+ href: settingsHref,
8888
+ "aria-current": settingsCurrent,
8889
+ className: "cursor-pointer rounded-md aria-[current=page]:bg-sidebar-accent",
8890
+ onClick: onClickSettings,
8891
+ children: settingsIcon
8892
+ }) : /* @__PURE__ */ jsx("button", {
9501
8893
  "aria-label": "Settings",
9502
8894
  type: "button",
9503
8895
  className: twMerge(onClickSettings ? "cursor-pointer" : "cursor-wait"),
9504
8896
  onClick: onClickSettings,
9505
- children: [/* @__PURE__ */ jsx(Settings, {
9506
- className: "text-foreground",
9507
- size: 24,
9508
- strokeWidth: 2
9509
- }), /* @__PURE__ */ jsx("span", {
9510
- className: "hidden text-sm/6 font-semibold text-foreground",
9511
- children: "Settings"
9512
- })]
8897
+ children: settingsIcon
9513
8898
  })
9514
8899
  ]
9515
8900
  });
@@ -9526,19 +8911,29 @@ const ConnectSidebarHeader = ({ className, children, ...props }) => {
9526
8911
  };
9527
8912
  //#endregion
9528
8913
  //#region src/connect/components/sidebar/sidebar.tsx
9529
- const ConnectSidebar = ({ onClick, address, ensName, avatarUrl, headerContent, onClickSettings, maxWidth = "304px", minWidth = "58px", onLogin, onDisconnect, etherscanUrl, showDebug, onDebugClick, ...props }) => {
8914
+ const ConnectSidebar = ({ onClick, address, ensName, avatarUrl, headerContent, onClickSettings, settingsHref, settingsCurrent, maxWidth = "304px", minWidth = "58px", onLogin, onDisconnect, etherscanUrl, showDebug, onDebugClick, ...props }) => {
9530
8915
  return /* @__PURE__ */ jsxs(Sidebar, {
9531
8916
  ...props,
8917
+ "data-connect-sidebar": "",
9532
8918
  maxWidth,
9533
8919
  minWidth,
9534
- children: [/* @__PURE__ */ jsxs(SidebarPanel, { children: [/* @__PURE__ */ jsx(ConnectSidebarHeader, { children: headerContent }), /* @__PURE__ */ jsx("div", {
9535
- className: "flex flex-col",
9536
- children: props.children
9537
- })] }), /* @__PURE__ */ jsx(ConnectSidebarFooter, {
8920
+ children: [/* @__PURE__ */ jsxs(SidebarPanel, {
8921
+ className: "max-sm:flex max-sm:overflow-x-auto max-sm:overflow-y-hidden",
8922
+ children: [/* @__PURE__ */ jsx(ConnectSidebarHeader, {
8923
+ className: "max-sm:hidden",
8924
+ children: headerContent
8925
+ }), /* @__PURE__ */ jsx("nav", {
8926
+ "aria-label": "Drives and pages",
8927
+ className: "flex flex-col max-sm:flex-row",
8928
+ children: props.children
8929
+ })]
8930
+ }), /* @__PURE__ */ jsx(ConnectSidebarFooter, {
9538
8931
  address,
9539
8932
  ensName,
9540
8933
  avatarUrl,
9541
8934
  onClickSettings,
8935
+ settingsHref,
8936
+ settingsCurrent,
9542
8937
  onLogin,
9543
8938
  onDisconnect,
9544
8939
  etherscanUrl,
@@ -9617,6 +9012,21 @@ function ThemeSwitch({ horizontal = false }) {
9617
9012
  });
9618
9013
  }
9619
9014
  //#endregion
9015
+ //#region src/connect/components/toggle/toggle.tsx
9016
+ const Toggle = /*#__PURE__*/ forwardRef(function Toggle(props, ref) {
9017
+ return /* @__PURE__ */ jsxs("label", {
9018
+ className: "relative cursor-pointer items-center",
9019
+ htmlFor: props.id,
9020
+ children: [/* @__PURE__ */ jsx("input", {
9021
+ className: "peer sr-only",
9022
+ ref,
9023
+ type: "checkbox",
9024
+ value: "",
9025
+ ...props
9026
+ }), /* @__PURE__ */ jsx("div", { className: "peer h-6 w-11 rounded-full bg-muted-foreground peer-checked:bg-info peer-focus:outline-none after:absolute after:inset-s-0.5 after:top-0.5 after:size-5 after:rounded-full after:border after:border-none after:bg-background after:transition-all peer-checked:after:translate-x-full" })]
9027
+ });
9028
+ });
9029
+ //#endregion
9620
9030
  //#region src/connect/utils/get-folder-status.ts
9621
9031
  /**
9622
9032
  * Retrieves the sync status of a folder based on its path and their children files.
@@ -9663,6 +9073,6 @@ const removeSuccessFiles = (files) => {
9663
9073
  return files.filter((file) => file.status !== "SUCCESS");
9664
9074
  };
9665
9075
  //#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 };
9076
+ export { About, AccountPopover, AccountPopoverLogin, AddDriveModal, AddLocalDriveForm, AddRemoteDriveForm, AnimatedLoader, AvailablePackagesPanel, BackgroundLayers, Breadcrumb, Breadcrumbs, CONFLICT, CatchUpInspector, ChannelInspector, Checkbox, Combobox, ConnectBrandingProvider, 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, Icon, InspectorModal, InstalledPackagesPanel, IntegrityInspector, LoadingScreen, LogoAnimation, MISSING, Modal, ModalButton, NodeInput, ObjectInspectorModal, PackageInstallModal, PackageList, PackageManager, PackageManagerListItem, PackagePanelScrollArea, PackageRegistryError, PackageSubSection, PeerAgreementPanel, PowerhouseButton, ProcessorsInspector, ProjectLoaderImage, 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, brandedDocumentIcon, debugNodeOptions, debugNodeOptionsMap, defaultDriveOptions, defaultNodeOptions, fileNodeDropdownOptions, folderNodeDropdownOptions, formatEthAddress, formatFileSize, generateId, getFolderStatus, getProjectLoader, locationInfoByLocation, mapProgressStageToStatus, mapUploadsToFileItems, nodeOptions, normalNodeOptions, peerManifestLabel, removeSuccessFiles, sharingTypeOptions, sortFilesByStatus, syncStatuses, useConnectBranding, useEns, useWindowSize, verifyPackageJsonFields };
9667
9077
 
9668
9078
  //# sourceMappingURL=index.js.map