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