@powerhousedao/design-system 6.2.3-dev.7 → 6.2.3-dev.71
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/PinFilled-cSbUqZCA.js +41 -0
- package/dist/PinFilled-cSbUqZCA.js.map +1 -0
- 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/add-local-drive-form.impl-xsC6R634.js +75 -0
- package/dist/add-local-drive-form.impl-xsC6R634.js.map +1 -0
- package/dist/add-remote-drive-form.impl-B2DxdWGF.js +114 -0
- package/dist/add-remote-drive-form.impl-B2DxdWGF.js.map +1 -0
- package/dist/address-DfZqD6IM.js +92 -0
- package/dist/address-DfZqD6IM.js.map +1 -0
- 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-BIhO-KB2.d.ts} +4 -4
- package/dist/checkbox-BIhO-KB2.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/combobox.impl-EqgAawKJ.js +144 -0
- package/dist/combobox.impl-EqgAawKJ.js.map +1 -0
- package/dist/{command-tFzjgzge.d.ts → command-DHHTsHfH.d.ts} +5 -5
- 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 +514 -364
- package/dist/connect/index.d.ts.map +1 -1
- package/dist/connect/index.js +963 -1605
- package/dist/connect/index.js.map +1 -1
- package/dist/{content-BHWIqmio.d.ts → content-Ch3oDYCL.d.ts} +3 -3
- package/dist/content-Ch3oDYCL.d.ts.map +1 -0
- package/dist/default-editor.impl-a6EOuEme.js +30 -0
- package/dist/default-editor.impl-a6EOuEme.js.map +1 -0
- package/dist/document-timeline.impl-CCkyXpt5.js +254 -0
- package/dist/document-timeline.impl-CCkyXpt5.js.map +1 -0
- package/dist/drive-settings-form.impl-Bwam9-CG.js +171 -0
- package/dist/drive-settings-form.impl-Bwam9-CG.js.map +1 -0
- package/dist/{enum-field-CwZVs3Ux.d.ts → enum-field-DsyC0ml7.d.ts} +4 -4
- package/dist/enum-field-DsyC0ml7.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/formatted-json-viewer.impl-DadZ5uvb.js +58 -0
- package/dist/formatted-json-viewer.impl-DadZ5uvb.js.map +1 -0
- package/dist/icon-CHR45tj_.js +358 -0
- package/dist/icon-CHR45tj_.js.map +1 -0
- package/dist/{icon-C4QOpsdI.js → icon-components-CJ4I3Y6Y.js} +7 -481
- package/dist/icon-components-CJ4I3Y6Y.js.map +1 -0
- package/dist/{id-autocomplete-C-hwriS5.d.ts → id-autocomplete-Cr7p129s.d.ts} +3 -3
- package/dist/id-autocomplete-Cr7p129s.d.ts.map +1 -0
- package/dist/{id-autocomplete-input-container-DFEyPh5p.d.ts → id-autocomplete-input-container-iTw9wYZn.d.ts} +3 -3
- package/dist/id-autocomplete-input-container-iTw9wYZn.d.ts.map +1 -0
- package/dist/{id-autocomplete-list-EzLpF23C.d.ts → id-autocomplete-list-BIC3RxOp.d.ts} +3 -3
- package/dist/id-autocomplete-list-BIC3RxOp.d.ts.map +1 -0
- package/dist/{id-autocomplete-list-option-CB5B07Hi.d.ts → id-autocomplete-list-option-DlpZer-2.d.ts} +4 -3
- package/dist/id-autocomplete-list-option-DlpZer-2.d.ts.map +1 -0
- package/dist/index-C-Tup7Br.d.ts +4 -0
- package/dist/{index--hDSfvJT.d.ts → index-Ck34z7kD.d.ts} +23 -59
- package/dist/index-Ck34z7kD.d.ts.map +1 -0
- package/dist/index-D6Zk5OLV.d.ts +4 -0
- package/dist/index-Ds9-qjjC.d.ts +30 -0
- package/dist/index-jfVVOU-H.d.ts +2 -0
- package/dist/index.d.ts +5 -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/label-nH2HoKfI.js +15 -0
- package/dist/label-nH2HoKfI.js.map +1 -0
- package/dist/location-info-C3YbSsV0.js +47 -0
- package/dist/location-info-C3YbSsV0.js.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-wlqeiLN3.d.ts → radio-group-field-0-cC_e65.d.ts} +5 -6
- package/dist/radio-group-field-0-cC_e65.d.ts.map +1 -0
- package/dist/revision-history.impl-CrtSnhXQ.js +642 -0
- package/dist/revision-history.impl-CrtSnhXQ.js.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-VZPf666l.d.ts} +5 -5
- package/dist/select-field-VZPf666l.d.ts.map +1 -0
- package/dist/{selected-content-CGsK5PR4.d.ts → selected-content-D6NWiceG.d.ts} +3 -3
- package/dist/selected-content-D6NWiceG.d.ts.map +1 -0
- package/dist/{sidebar-DOoE4krt.d.ts → sidebar-DFqreKf1.d.ts} +3 -3
- package/dist/sidebar-DFqreKf1.d.ts.map +1 -0
- package/dist/{sidebar-provider-C2eyz9TL.d.ts → sidebar-provider-CZHhqW5n.d.ts} +4 -8
- package/dist/sidebar-provider-CZHhqW5n.d.ts.map +1 -0
- package/dist/splitted-input-diff-Bkoi0Odc.d.ts +11 -0
- package/dist/splitted-input-diff-Bkoi0Odc.d.ts.map +1 -0
- package/dist/{src-CVV6HzQZ.js → src-CohvVFnR.js} +178 -22
- package/dist/src-CohvVFnR.js.map +1 -0
- package/dist/style.css +3 -6
- package/dist/text-field-CDYSwanK.d.ts +9 -0
- package/dist/text-field-CDYSwanK.d.ts.map +1 -0
- package/dist/{text-input-8zXIWHLi.d.ts → text-input-CFRCPYq6.d.ts} +5 -6
- package/dist/text-input-CFRCPYq6.d.ts.map +1 -0
- package/dist/text-input-diff-BgJAxPQV.d.ts +12 -0
- package/dist/text-input-diff-BgJAxPQV.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-FTqFl5du.d.ts} +3 -3
- package/dist/types-FTqFl5du.d.ts.map +1 -0
- package/dist/types-TZijOYrE.d.ts +17 -0
- package/dist/types-TZijOYrE.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 +4 -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-WH2ROfQn.d.ts} +5 -16
- package/dist/use-id-autocomplete-WH2ROfQn.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-Cg5TEYP2.d.ts} +5 -7
- package/dist/value-transformer-Cg5TEYP2.d.ts.map +1 -0
- package/dist/{with-field-validation-Di5D8vU-.d.ts → with-field-validation-CObZoT4r.d.ts} +3 -3
- package/dist/with-field-validation-CObZoT4r.d.ts.map +1 -0
- package/package.json +17 -12
- package/plugins.css +6 -0
- package/tailwind.css +175 -0
- package/vendor.css +3 -0
- 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-tFzjgzge.d.ts.map +0 -1
- package/dist/content-BHWIqmio.d.ts.map +0 -1
- package/dist/enum-field-CwZVs3Ux.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/icon-C4QOpsdI.js.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-wlqeiLN3.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/src-CVV6HzQZ.js.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
|
@@ -0,0 +1,642 @@
|
|
|
1
|
+
import { n as usePagination, u as Pagination } from "./src-CohvVFnR.js";
|
|
2
|
+
import { t as Icon } from "./icon-CHR45tj_.js";
|
|
3
|
+
import { i as ENSAvatar, n as useEns, r as FormattedJsonViewer, t as formatEthAddress } from "./address-DfZqD6IM.js";
|
|
4
|
+
import { ConnectSelect, ConnectTooltipProvider } from "./connect/index.js";
|
|
5
|
+
import { memo, useEffect, useMemo, useRef, useState } from "react";
|
|
6
|
+
import { twMerge } from "tailwind-merge";
|
|
7
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
import { Anchor, Content, Portal, Root, Trigger } from "@radix-ui/react-popover";
|
|
9
|
+
import { format } from "date-fns";
|
|
10
|
+
import { useCopyToClipboard } from "usehooks-ts";
|
|
11
|
+
import { funnel } from "remeda";
|
|
12
|
+
import { garbageCollect, sortOperations } from "@powerhousedao/shared/document-model";
|
|
13
|
+
import { useVirtualizer } from "@tanstack/react-virtual";
|
|
14
|
+
//#region src/connect/components/revision-history/header/branch.tsx
|
|
15
|
+
function Branch(props) {
|
|
16
|
+
const { branch = "main" } = props;
|
|
17
|
+
return /* @__PURE__ */ jsxs("button", {
|
|
18
|
+
className: "flex h-8 w-fit items-center gap-1 rounded-lg bg-background pr-2 pl-1 text-xs text-foreground",
|
|
19
|
+
children: [
|
|
20
|
+
/* @__PURE__ */ jsx(Icon, { name: "Branch" }),
|
|
21
|
+
/* @__PURE__ */ jsx("span", { children: "BRANCH" }),
|
|
22
|
+
/* @__PURE__ */ jsx("span", {
|
|
23
|
+
className: "text-foreground",
|
|
24
|
+
children: branch
|
|
25
|
+
})
|
|
26
|
+
]
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
30
|
+
//#region src/connect/components/revision-history/header/doc-id.tsx
|
|
31
|
+
function DocId(props) {
|
|
32
|
+
const { docId, onCopy } = props;
|
|
33
|
+
const [, copy] = useCopyToClipboard();
|
|
34
|
+
function handleCopy(text) {
|
|
35
|
+
return () => {
|
|
36
|
+
copy(text).then(() => {
|
|
37
|
+
onCopy?.();
|
|
38
|
+
}).catch((error) => {
|
|
39
|
+
console.error("Failed to copy!", error);
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
return /* @__PURE__ */ jsxs("button", {
|
|
44
|
+
className: "flex h-8 w-fit items-center gap-1 rounded-lg bg-background pr-2 pl-1 text-xs text-foreground",
|
|
45
|
+
onClick: handleCopy(docId),
|
|
46
|
+
children: [
|
|
47
|
+
/* @__PURE__ */ jsx(Icon, { name: "Link" }),
|
|
48
|
+
"DOC ID",
|
|
49
|
+
/* @__PURE__ */ jsx("span", {
|
|
50
|
+
className: "text-foreground",
|
|
51
|
+
children: docId
|
|
52
|
+
})
|
|
53
|
+
]
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
//#endregion
|
|
57
|
+
//#region src/connect/components/revision-history/header/document-state.tsx
|
|
58
|
+
const DocumentState = (props) => {
|
|
59
|
+
const { documentState, onCopyState } = props;
|
|
60
|
+
const [, copy] = useCopyToClipboard();
|
|
61
|
+
function handleCopy() {
|
|
62
|
+
const jsonState = JSON.stringify(documentState, null, 2);
|
|
63
|
+
copy(jsonState).then(() => {
|
|
64
|
+
onCopyState?.();
|
|
65
|
+
}).catch((error) => {
|
|
66
|
+
console.error("Failed to copy document state!", error);
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
return /* @__PURE__ */ jsx("button", {
|
|
70
|
+
className: "rounded-lg bg-background p-1 text-foreground",
|
|
71
|
+
onClick: handleCopy,
|
|
72
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "CurlyBrackets" })
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
//#endregion
|
|
76
|
+
//#region src/connect/components/revision-history/header/scope.tsx
|
|
77
|
+
function labelFor(scope) {
|
|
78
|
+
return `${scope.charAt(0).toUpperCase()}${scope.slice(1)} scope`;
|
|
79
|
+
}
|
|
80
|
+
function Scope(props) {
|
|
81
|
+
const { scopes, value, onChange } = props;
|
|
82
|
+
const items = scopes.map((scope) => ({
|
|
83
|
+
displayValue: labelFor(scope),
|
|
84
|
+
value: scope
|
|
85
|
+
}));
|
|
86
|
+
return /* @__PURE__ */ jsx(ConnectSelect, {
|
|
87
|
+
absolutePositionMenu: true,
|
|
88
|
+
containerClassName: "z-10 w-fit rounded-lg bg-background text-xs text-muted-foreground",
|
|
89
|
+
id: "scope select",
|
|
90
|
+
itemClassName: "grid grid-cols-[auto,auto] gap-1 py-2 text-muted-foreground",
|
|
91
|
+
items,
|
|
92
|
+
menuClassName: "min-w-0 text-muted-foreground",
|
|
93
|
+
onChange,
|
|
94
|
+
value
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
//#endregion
|
|
98
|
+
//#region src/connect/components/revision-history/header/header.tsx
|
|
99
|
+
function Header(props) {
|
|
100
|
+
const { title, docId, scope, scopes, onChangeScope, onClose, className, documentState, onCopyState, onCopyDocId, ...divProps } = props;
|
|
101
|
+
return /* @__PURE__ */ jsxs("header", {
|
|
102
|
+
className: twMerge("flex items-center justify-between bg-transparent", className),
|
|
103
|
+
...divProps,
|
|
104
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
105
|
+
className: "flex items-center gap-3",
|
|
106
|
+
children: [/* @__PURE__ */ jsx("button", {
|
|
107
|
+
name: "close-revision-history",
|
|
108
|
+
className: "rounded-lg bg-background p-1 text-foreground shadow-button",
|
|
109
|
+
onClick: onClose,
|
|
110
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "VariantArrowLeft" })
|
|
111
|
+
}), /* @__PURE__ */ jsx("h1", {
|
|
112
|
+
className: "text-xs text-foreground",
|
|
113
|
+
children: title
|
|
114
|
+
})]
|
|
115
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
116
|
+
className: "flex items-center gap-2",
|
|
117
|
+
children: [
|
|
118
|
+
/* @__PURE__ */ jsx(DocId, {
|
|
119
|
+
docId,
|
|
120
|
+
onCopy: onCopyDocId
|
|
121
|
+
}),
|
|
122
|
+
documentState && /* @__PURE__ */ jsx(DocumentState, {
|
|
123
|
+
documentState,
|
|
124
|
+
onCopyState
|
|
125
|
+
}),
|
|
126
|
+
/* @__PURE__ */ jsx(Branch, {}),
|
|
127
|
+
/* @__PURE__ */ jsx(Scope, {
|
|
128
|
+
onChange: onChangeScope,
|
|
129
|
+
scopes,
|
|
130
|
+
value: scope
|
|
131
|
+
})
|
|
132
|
+
]
|
|
133
|
+
})]
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
//#endregion
|
|
137
|
+
//#region src/connect/components/code-popover.tsx
|
|
138
|
+
function CodePopover(props) {
|
|
139
|
+
const { content, trigger, anchor } = props;
|
|
140
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
141
|
+
const opener = funnel(() => setIsOpen(true), {
|
|
142
|
+
triggerAt: "start",
|
|
143
|
+
minQuietPeriodMs: 300
|
|
144
|
+
});
|
|
145
|
+
const closer = funnel(() => setIsOpen(false), {
|
|
146
|
+
triggerAt: "start",
|
|
147
|
+
minQuietPeriodMs: 100
|
|
148
|
+
});
|
|
149
|
+
function open() {
|
|
150
|
+
closer.cancel();
|
|
151
|
+
opener.call();
|
|
152
|
+
}
|
|
153
|
+
function close() {
|
|
154
|
+
opener.cancel();
|
|
155
|
+
closer.call();
|
|
156
|
+
}
|
|
157
|
+
return /* @__PURE__ */ jsxs(Root, {
|
|
158
|
+
open: isOpen,
|
|
159
|
+
onOpenChange: (changedIsOpen) => changedIsOpen ? open() : close(),
|
|
160
|
+
children: [
|
|
161
|
+
/* @__PURE__ */ jsx(Trigger, {
|
|
162
|
+
onMouseEnter: open,
|
|
163
|
+
children: trigger
|
|
164
|
+
}),
|
|
165
|
+
!!anchor && /* @__PURE__ */ jsx(Anchor, {
|
|
166
|
+
asChild: true,
|
|
167
|
+
children: anchor
|
|
168
|
+
}),
|
|
169
|
+
/* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(Content, {
|
|
170
|
+
forceMount: true,
|
|
171
|
+
onMouseLeave: close,
|
|
172
|
+
sideOffset: -28,
|
|
173
|
+
onCloseAutoFocus: (e) => e.preventDefault(),
|
|
174
|
+
collisionPadding: {
|
|
175
|
+
top: 24,
|
|
176
|
+
right: 24,
|
|
177
|
+
bottom: -1e4,
|
|
178
|
+
left: 24
|
|
179
|
+
},
|
|
180
|
+
className: "z-50 rounded-lg border border-border bg-popover p-2 text-xs text-popover-foreground shadow-tooltip outline-none",
|
|
181
|
+
children: content
|
|
182
|
+
}) })
|
|
183
|
+
]
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
//#endregion
|
|
187
|
+
//#region src/connect/components/revision-history/revision/address.tsx
|
|
188
|
+
function Address(props) {
|
|
189
|
+
const { address, chainId } = props;
|
|
190
|
+
const { data: ensData } = useEns(address);
|
|
191
|
+
if (!address) return null;
|
|
192
|
+
const shortenedAddress = formatEthAddress(address);
|
|
193
|
+
return /* @__PURE__ */ jsx(CodePopover, {
|
|
194
|
+
content: /* @__PURE__ */ jsx(FormattedJsonViewer, { value: { address } }),
|
|
195
|
+
trigger: /* @__PURE__ */ jsxs("span", {
|
|
196
|
+
className: "flex w-fit cursor-pointer items-center gap-1 rounded-lg bg-muted p-1 text-xs text-muted-foreground",
|
|
197
|
+
children: [/* @__PURE__ */ jsx(ENSAvatar, {
|
|
198
|
+
address,
|
|
199
|
+
chainId,
|
|
200
|
+
avatarUrl: ensData?.avatar_url ?? void 0
|
|
201
|
+
}), shortenedAddress]
|
|
202
|
+
})
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
//#endregion
|
|
206
|
+
//#region src/connect/components/revision-history/revision/errors.tsx
|
|
207
|
+
function Errors(props) {
|
|
208
|
+
const { errors } = props;
|
|
209
|
+
const hasErrors = !!errors?.length;
|
|
210
|
+
const color = hasErrors ? "text-destructive" : "text-success";
|
|
211
|
+
const icon = hasErrors ? /* @__PURE__ */ jsx(Icon, {
|
|
212
|
+
name: "Exclamation",
|
|
213
|
+
size: 16
|
|
214
|
+
}) : /* @__PURE__ */ jsx(Icon, {
|
|
215
|
+
name: "Check",
|
|
216
|
+
size: 16
|
|
217
|
+
});
|
|
218
|
+
const text = hasErrors ? `Error: ${errors[0]}` : "No errors";
|
|
219
|
+
const content = /* @__PURE__ */ jsxs("span", {
|
|
220
|
+
className: twMerge("flex w-fit items-center rounded-lg border border-border bg-background px-2 py-1 text-xs", color, hasErrors && "cursor-pointer"),
|
|
221
|
+
children: [icon, /* @__PURE__ */ jsx("span", {
|
|
222
|
+
className: twMerge("inline-block max-w-36 truncate"),
|
|
223
|
+
children: text
|
|
224
|
+
})]
|
|
225
|
+
});
|
|
226
|
+
if (hasErrors) return /* @__PURE__ */ jsx(CodePopover, {
|
|
227
|
+
content: /* @__PURE__ */ jsx(FormattedJsonViewer, { value: errors }),
|
|
228
|
+
trigger: content
|
|
229
|
+
});
|
|
230
|
+
return content;
|
|
231
|
+
}
|
|
232
|
+
//#endregion
|
|
233
|
+
//#region src/connect/components/revision-history/revision/operation.tsx
|
|
234
|
+
function Operation$1(props) {
|
|
235
|
+
const { operationType, operationInput } = props;
|
|
236
|
+
return /* @__PURE__ */ jsx(CodePopover, {
|
|
237
|
+
content: /* @__PURE__ */ jsx(FormattedJsonViewer, { value: operationInput }),
|
|
238
|
+
trigger: /* @__PURE__ */ jsxs("span", {
|
|
239
|
+
className: "flex cursor-pointer items-center gap-2 text-xs text-foreground",
|
|
240
|
+
children: [operationType, /* @__PURE__ */ jsx(Icon, {
|
|
241
|
+
className: "text-foreground",
|
|
242
|
+
name: "Braces",
|
|
243
|
+
size: 16
|
|
244
|
+
})]
|
|
245
|
+
})
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
//#endregion
|
|
249
|
+
//#region src/connect/components/revision-history/revision/revision-number.tsx
|
|
250
|
+
function RevisionNumber(props) {
|
|
251
|
+
const { operationIndex, eventId, stateHash } = props;
|
|
252
|
+
const revisionNumber = operationIndex + 1;
|
|
253
|
+
return /* @__PURE__ */ jsx(CodePopover, {
|
|
254
|
+
content: /* @__PURE__ */ jsx(FormattedJsonViewer, { value: {
|
|
255
|
+
revisionNumber,
|
|
256
|
+
eventId,
|
|
257
|
+
stateHash
|
|
258
|
+
} }),
|
|
259
|
+
trigger: /* @__PURE__ */ jsxs("span", {
|
|
260
|
+
className: "flex cursor-pointer items-center gap-2 text-xs text-foreground",
|
|
261
|
+
children: [
|
|
262
|
+
"Revision ",
|
|
263
|
+
revisionNumber,
|
|
264
|
+
".",
|
|
265
|
+
/* @__PURE__ */ jsx("a", { children: /* @__PURE__ */ jsx(Icon, {
|
|
266
|
+
className: "cursor-pointer text-foreground",
|
|
267
|
+
name: "Ellipsis",
|
|
268
|
+
size: 14
|
|
269
|
+
}) })
|
|
270
|
+
]
|
|
271
|
+
})
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
//#endregion
|
|
275
|
+
//#region src/connect/components/revision-history/revision/signature.tsx
|
|
276
|
+
function Signature(props) {
|
|
277
|
+
const { signatures } = props;
|
|
278
|
+
if (!signatures?.length) return null;
|
|
279
|
+
return /* @__PURE__ */ jsx(CodePopover, {
|
|
280
|
+
trigger: /* @__PURE__ */ jsxs("span", {
|
|
281
|
+
className: "flex w-fit cursor-pointer items-center gap-1 rounded-lg border border-border bg-background px-2 py-1",
|
|
282
|
+
children: [
|
|
283
|
+
/* @__PURE__ */ jsx(VerificationStatus, { signatures }),
|
|
284
|
+
" ",
|
|
285
|
+
/* @__PURE__ */ jsx(Icon, {
|
|
286
|
+
className: "text-foreground",
|
|
287
|
+
name: "InfoSquare",
|
|
288
|
+
size: 16
|
|
289
|
+
})
|
|
290
|
+
]
|
|
291
|
+
}),
|
|
292
|
+
content: /* @__PURE__ */ jsx(FormattedJsonViewer, {
|
|
293
|
+
value: signatures,
|
|
294
|
+
collapsed: 1
|
|
295
|
+
})
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
function VerificationStatus(props) {
|
|
299
|
+
const { signatures } = props;
|
|
300
|
+
if (!signatures?.length) return null;
|
|
301
|
+
const signatureCount = signatures.length;
|
|
302
|
+
const verifiedSignaturesCount = signatures.filter((signature) => signature.isVerified).length;
|
|
303
|
+
const verificationStatusText = `${verifiedSignaturesCount}/${signatureCount} ${signatureCount === 1 ? "signature" : "signatures"} verified`;
|
|
304
|
+
return /* @__PURE__ */ jsx("span", {
|
|
305
|
+
className: twMerge(`text-xs`, verifiedSignaturesCount === 0 ? "text-destructive" : verifiedSignaturesCount === signatureCount ? "text-success" : "text-warning"),
|
|
306
|
+
children: verificationStatusText
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
//#endregion
|
|
310
|
+
//#region src/connect/components/revision-history/revision/timestamp.tsx
|
|
311
|
+
function Timestamp(props) {
|
|
312
|
+
const { timestampUtcMs: timestamp } = props;
|
|
313
|
+
const timestampNumber = typeof timestamp === "string" && !timestamp.includes("-") ? parseInt(timestamp) : timestamp;
|
|
314
|
+
const date = new Date(timestampNumber);
|
|
315
|
+
const shortDate = format(date, "HH:mm 'UTC'");
|
|
316
|
+
const longDate = format(date, "eee, dd MMM yyyy HH:mm:ss 'UTC'");
|
|
317
|
+
return /* @__PURE__ */ jsx(CodePopover, {
|
|
318
|
+
content: /* @__PURE__ */ jsx(FormattedJsonViewer, { value: {
|
|
319
|
+
timestampFormatted: longDate,
|
|
320
|
+
timestampUtcMs: timestamp
|
|
321
|
+
} }),
|
|
322
|
+
trigger: /* @__PURE__ */ jsxs("span", {
|
|
323
|
+
className: "cursor-pointer text-xs text-foreground",
|
|
324
|
+
children: ["committed at ", shortDate]
|
|
325
|
+
})
|
|
326
|
+
});
|
|
327
|
+
}
|
|
328
|
+
//#endregion
|
|
329
|
+
//#region src/connect/components/revision-history/revision/revision.tsx
|
|
330
|
+
function _Revision(props) {
|
|
331
|
+
return /* @__PURE__ */ jsxs("article", {
|
|
332
|
+
className: "flex items-center justify-between rounded-xl border border-border bg-background px-4 py-2",
|
|
333
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
334
|
+
className: "flex items-center gap-2",
|
|
335
|
+
children: [
|
|
336
|
+
/* @__PURE__ */ jsx(RevisionNumber, { ...props }),
|
|
337
|
+
/* @__PURE__ */ jsx(Operation$1, { ...props }),
|
|
338
|
+
/* @__PURE__ */ jsx(Address, { ...props }),
|
|
339
|
+
/* @__PURE__ */ jsx(Timestamp, { ...props })
|
|
340
|
+
]
|
|
341
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
342
|
+
className: "flex items-center gap-1",
|
|
343
|
+
children: [/* @__PURE__ */ jsx(Signature, { ...props }), /* @__PURE__ */ jsx(Errors, { ...props })]
|
|
344
|
+
})]
|
|
345
|
+
});
|
|
346
|
+
}
|
|
347
|
+
const Revision = /*#__PURE__*/ memo(_Revision);
|
|
348
|
+
//#endregion
|
|
349
|
+
//#region src/connect/components/revision-history/skip/skip.tsx
|
|
350
|
+
function Skip(props) {
|
|
351
|
+
const { operationIndex, skipCount } = props;
|
|
352
|
+
const revisionNumber = operationIndex;
|
|
353
|
+
const skippedRevisions = skipCount === 1 ? `${revisionNumber}` : `${revisionNumber} - ${revisionNumber + 1 - skipCount}`;
|
|
354
|
+
return /* @__PURE__ */ jsxs("article", {
|
|
355
|
+
className: "grid grid-cols-[1fr,auto,1fr] items-center py-2",
|
|
356
|
+
children: [
|
|
357
|
+
/* @__PURE__ */ jsx("div", { className: "h-px rounded-full bg-muted" }),
|
|
358
|
+
/* @__PURE__ */ jsxs("div", {
|
|
359
|
+
className: "mx-3 text-xs text-foreground",
|
|
360
|
+
children: [
|
|
361
|
+
"[Skipped Revision ",
|
|
362
|
+
skippedRevisions,
|
|
363
|
+
"]"
|
|
364
|
+
]
|
|
365
|
+
}),
|
|
366
|
+
/* @__PURE__ */ jsx("div", { className: "h-px rounded-full bg-muted" })
|
|
367
|
+
]
|
|
368
|
+
});
|
|
369
|
+
}
|
|
370
|
+
//#endregion
|
|
371
|
+
//#region src/connect/components/revision-history/utils.ts
|
|
372
|
+
function makeRows(operations) {
|
|
373
|
+
const revisionsAndSkips = [];
|
|
374
|
+
const seenDays = /* @__PURE__ */ new Set();
|
|
375
|
+
for (const operation of operations) {
|
|
376
|
+
if (!operation.timestampUtcMs) continue;
|
|
377
|
+
const day = operation.timestampUtcMs.split("T")[0];
|
|
378
|
+
if (!seenDays.has(day)) {
|
|
379
|
+
seenDays.add(day);
|
|
380
|
+
revisionsAndSkips.push({
|
|
381
|
+
type: "day",
|
|
382
|
+
height: 32,
|
|
383
|
+
timestampUtcMs: day
|
|
384
|
+
});
|
|
385
|
+
}
|
|
386
|
+
revisionsAndSkips.push({
|
|
387
|
+
type: "revision",
|
|
388
|
+
height: 46,
|
|
389
|
+
operationIndex: operation.index,
|
|
390
|
+
eventId: operation.id ?? "EVENT_ID_NOT_FOUND",
|
|
391
|
+
stateHash: operation.hash,
|
|
392
|
+
operationType: operation.action.type,
|
|
393
|
+
operationInput: operation.action.input ?? {},
|
|
394
|
+
address: operation.action?.context?.signer?.user.address,
|
|
395
|
+
chainId: operation.action?.context?.signer?.user.chainId,
|
|
396
|
+
timestampUtcMs: operation.timestampUtcMs,
|
|
397
|
+
signatures: makeSignatures(operation.action?.context?.signer?.signatures ?? []),
|
|
398
|
+
errors: operation.error ? [operation.error] : void 0
|
|
399
|
+
});
|
|
400
|
+
if (operation.skip > 0) revisionsAndSkips.push({
|
|
401
|
+
type: "skip",
|
|
402
|
+
height: 34,
|
|
403
|
+
operationIndex: operation.index,
|
|
404
|
+
skipCount: operation.skip,
|
|
405
|
+
timestampUtcMs: operation.timestampUtcMs
|
|
406
|
+
});
|
|
407
|
+
}
|
|
408
|
+
return revisionsAndSkips;
|
|
409
|
+
}
|
|
410
|
+
function makeSignatureFromSignatureArray(signatureArray) {
|
|
411
|
+
const [signerAddress, hash, prevStateHash, signatureBytes] = signatureArray;
|
|
412
|
+
return {
|
|
413
|
+
signerAddress,
|
|
414
|
+
hash,
|
|
415
|
+
prevStateHash,
|
|
416
|
+
signatureBytes,
|
|
417
|
+
isVerified: true
|
|
418
|
+
};
|
|
419
|
+
}
|
|
420
|
+
function makeSignatures(signaturesArray) {
|
|
421
|
+
return signaturesArray?.map(makeSignatureFromSignatureArray);
|
|
422
|
+
}
|
|
423
|
+
//#endregion
|
|
424
|
+
//#region src/connect/components/revision-history/timeline/day.tsx
|
|
425
|
+
function Day(props) {
|
|
426
|
+
const { timestampUtcMs: timestamp } = props;
|
|
427
|
+
const formattedDate = format(timestamp, "MMM dd, yyyy");
|
|
428
|
+
return /* @__PURE__ */ jsxs("h2", {
|
|
429
|
+
className: "-ml-6 flex items-center gap-1 bg-background py-2 text-xs text-foreground",
|
|
430
|
+
children: [
|
|
431
|
+
/* @__PURE__ */ jsx(Icon, {
|
|
432
|
+
name: "Ring",
|
|
433
|
+
size: 16
|
|
434
|
+
}),
|
|
435
|
+
" Changes on ",
|
|
436
|
+
formattedDate
|
|
437
|
+
]
|
|
438
|
+
});
|
|
439
|
+
}
|
|
440
|
+
//#endregion
|
|
441
|
+
//#region src/connect/components/revision-history/timeline/timeline.tsx
|
|
442
|
+
/** How far each row is indented from the timeline's vertical line. */
|
|
443
|
+
const ROW_INSET = 16;
|
|
444
|
+
/**
|
|
445
|
+
* How far the line is inset from the scroll container's clip edge -- exactly
|
|
446
|
+
* the amount the day marker hangs past it (24 pulled back from a 16 inset
|
|
447
|
+
* leaves 8 on the wrong side of zero). Without this the ring is sliced in
|
|
448
|
+
* half, since a scrolling box clips on both axes.
|
|
449
|
+
*/
|
|
450
|
+
const DAY_MARKER_OVERHANG = 8;
|
|
451
|
+
/**
|
|
452
|
+
* The revision timeline, windowed by row.
|
|
453
|
+
*
|
|
454
|
+
* The scroll element and the content are deliberately two different
|
|
455
|
+
* elements. A virtualizer decides what is visible by comparing its scroll
|
|
456
|
+
* element's viewport against the total content size, so a scroll element
|
|
457
|
+
* sized to the content is a viewport that shows everything at once: it never
|
|
458
|
+
* scrolls, every row is "visible", and the whole page renders while still
|
|
459
|
+
* paying the virtualizer's bookkeeping. The outer element here is therefore
|
|
460
|
+
* bounded and scrollable, and the inner sizer carries the full height that
|
|
461
|
+
* the absolutely positioned rows are placed within.
|
|
462
|
+
*/
|
|
463
|
+
function Timeline(props) {
|
|
464
|
+
const { operations, maxHeight = "70vh" } = props;
|
|
465
|
+
const rows = useMemo(() => makeRows([...operations]), [operations]);
|
|
466
|
+
const parentRef = useRef(null);
|
|
467
|
+
const rowVirtualizer = useVirtualizer({
|
|
468
|
+
count: rows.length,
|
|
469
|
+
getScrollElement: () => parentRef.current,
|
|
470
|
+
estimateSize: (i) => rows[i]?.height ?? 0,
|
|
471
|
+
gap: 8,
|
|
472
|
+
overscan: 8
|
|
473
|
+
});
|
|
474
|
+
return /* @__PURE__ */ jsx("div", {
|
|
475
|
+
"data-testid": "revision-timeline",
|
|
476
|
+
ref: parentRef,
|
|
477
|
+
style: {
|
|
478
|
+
maxHeight,
|
|
479
|
+
overflowY: "auto",
|
|
480
|
+
width: "100%",
|
|
481
|
+
position: "relative"
|
|
482
|
+
},
|
|
483
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
484
|
+
className: "border-l border-border dark:border-none",
|
|
485
|
+
style: {
|
|
486
|
+
height: `${rowVirtualizer.getTotalSize()}px`,
|
|
487
|
+
marginLeft: DAY_MARKER_OVERHANG,
|
|
488
|
+
position: "relative"
|
|
489
|
+
},
|
|
490
|
+
children: rowVirtualizer.getVirtualItems().map((virtualRow) => {
|
|
491
|
+
const row = rows[virtualRow.index];
|
|
492
|
+
if (!row) return null;
|
|
493
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
494
|
+
style: {
|
|
495
|
+
position: "absolute",
|
|
496
|
+
top: 0,
|
|
497
|
+
left: ROW_INSET,
|
|
498
|
+
right: 0,
|
|
499
|
+
height: `${virtualRow.size}px`,
|
|
500
|
+
transform: `translateY(${virtualRow.start}px)`
|
|
501
|
+
},
|
|
502
|
+
children: [
|
|
503
|
+
row.type === "revision" && /* @__PURE__ */ jsx(Revision, { ...row }),
|
|
504
|
+
row.type === "skip" && /* @__PURE__ */ jsx(Skip, { ...row }),
|
|
505
|
+
row.type === "day" && /* @__PURE__ */ jsx(Day, { ...row })
|
|
506
|
+
]
|
|
507
|
+
}, virtualRow.key);
|
|
508
|
+
})
|
|
509
|
+
})
|
|
510
|
+
});
|
|
511
|
+
}
|
|
512
|
+
//#endregion
|
|
513
|
+
//#region src/connect/components/revision-history/revision-history.impl.tsx
|
|
514
|
+
/** The current, scoped props. */
|
|
515
|
+
/**
|
|
516
|
+
* Legacy props: the whole global and local history, toggled inside the
|
|
517
|
+
* component.
|
|
518
|
+
* @deprecated Pass one scope's `operations` with `scopes`/`scope`/`onScopeChange` and the loading props. Removed in the next major.
|
|
519
|
+
*/
|
|
520
|
+
/**
|
|
521
|
+
* The revision history panel. Pages arrive oldest first while the timeline
|
|
522
|
+
* renders newest first, so rendering progressively would show operations in
|
|
523
|
+
* the wrong order until the last page landed and would repaint the whole
|
|
524
|
+
* timeline on every page in between. Instead the component keeps asking for
|
|
525
|
+
* the next page, showing "Loading operations…" and a running count, until
|
|
526
|
+
* the walk completes, then renders the pagination and timeline once.
|
|
527
|
+
*/
|
|
528
|
+
function ScopedRevisionHistory(props) {
|
|
529
|
+
const { documentTitle, documentId, operations, isLoading, hasNextPage, onLoadNextPage, scopes, scope, onScopeChange, onClose, itemsPerPage = 100, documentState, onCopyState, onCopyDocId, error, page, onPageChange } = props;
|
|
530
|
+
useEffect(() => {
|
|
531
|
+
if (!hasNextPage || isLoading || error) return;
|
|
532
|
+
const handle = window.setTimeout(onLoadNextPage, 0);
|
|
533
|
+
return () => window.clearTimeout(handle);
|
|
534
|
+
}, [
|
|
535
|
+
hasNextPage,
|
|
536
|
+
isLoading,
|
|
537
|
+
onLoadNextPage,
|
|
538
|
+
error
|
|
539
|
+
]);
|
|
540
|
+
const isWalking = !error && (hasNextPage || isLoading && operations.length === 0);
|
|
541
|
+
const visibleOperations = useMemo(() => isWalking ? [] : garbageCollect(sortOperations([...operations])).sort((a, b) => b.index - a.index), [operations, isWalking]);
|
|
542
|
+
const { pageItems, pages, goToPage, goToNextPage, goToPreviousPage, goToFirstPage, goToLastPage, hiddenNextPages, isNextPageAvailable, isPreviousPageAvailable } = usePagination(visibleOperations, {
|
|
543
|
+
itemsPerPage,
|
|
544
|
+
page: page === void 0 ? void 0 : page - 1,
|
|
545
|
+
onPageChange: onPageChange && ((index) => onPageChange(index + 1))
|
|
546
|
+
});
|
|
547
|
+
function onChangeScope(nextScope) {
|
|
548
|
+
goToFirstPage();
|
|
549
|
+
onScopeChange(nextScope);
|
|
550
|
+
}
|
|
551
|
+
const PaginationComponent = visibleOperations.length > itemsPerPage ? /* @__PURE__ */ jsx("div", {
|
|
552
|
+
className: "mt-4 flex w-full justify-end",
|
|
553
|
+
children: /* @__PURE__ */ jsx(Pagination, {
|
|
554
|
+
firstPageLabel: "First Page",
|
|
555
|
+
goToFirstPage,
|
|
556
|
+
goToLastPage,
|
|
557
|
+
goToNextPage,
|
|
558
|
+
goToPage,
|
|
559
|
+
goToPreviousPage,
|
|
560
|
+
hiddenNextPages,
|
|
561
|
+
isNextPageAvailable,
|
|
562
|
+
isPreviousPageAvailable,
|
|
563
|
+
lastPageLabel: "Last Page",
|
|
564
|
+
nextPageLabel: "Next",
|
|
565
|
+
pages,
|
|
566
|
+
previousPageLabel: "Previous"
|
|
567
|
+
})
|
|
568
|
+
}) : /* @__PURE__ */ jsx("hr", { className: "h-12 border-none" });
|
|
569
|
+
const hasOperations = visibleOperations.length > 0;
|
|
570
|
+
return /* @__PURE__ */ jsx(ConnectTooltipProvider, { children: /* @__PURE__ */ jsxs("div", {
|
|
571
|
+
className: "p-6",
|
|
572
|
+
children: [/* @__PURE__ */ jsx(Header, {
|
|
573
|
+
docId: documentId,
|
|
574
|
+
onChangeScope,
|
|
575
|
+
onClose,
|
|
576
|
+
scope,
|
|
577
|
+
scopes,
|
|
578
|
+
title: documentTitle,
|
|
579
|
+
documentState,
|
|
580
|
+
onCopyState,
|
|
581
|
+
onCopyDocId
|
|
582
|
+
}), isWalking ? /* @__PURE__ */ jsxs("div", {
|
|
583
|
+
className: "mt-4 flex flex-col items-center rounded-md bg-background p-4",
|
|
584
|
+
children: [/* @__PURE__ */ jsx("h3", {
|
|
585
|
+
className: "my-40 text-foreground",
|
|
586
|
+
children: "Loading operations…"
|
|
587
|
+
}), operations.length > 0 && /* @__PURE__ */ jsxs("p", {
|
|
588
|
+
className: "text-xs text-muted-foreground",
|
|
589
|
+
children: [operations.length, " loaded so far"]
|
|
590
|
+
})]
|
|
591
|
+
}) : /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
592
|
+
PaginationComponent,
|
|
593
|
+
/* @__PURE__ */ jsxs("div", {
|
|
594
|
+
className: "mt-4 flex flex-col items-center rounded-md bg-background p-4",
|
|
595
|
+
children: [error && /* @__PURE__ */ jsxs("p", {
|
|
596
|
+
className: "mb-2 text-xs text-destructive",
|
|
597
|
+
children: ["Could not load the rest of the history: ", error.message]
|
|
598
|
+
}), hasOperations ? /* @__PURE__ */ jsx("div", {
|
|
599
|
+
className: "grid grid-cols-[minmax(min-content,1018px)]",
|
|
600
|
+
children: /* @__PURE__ */ jsx(Timeline, { operations: pageItems })
|
|
601
|
+
}) : error ? null : /* @__PURE__ */ jsx("h3", {
|
|
602
|
+
className: "my-40 text-foreground",
|
|
603
|
+
children: "This document has no recorded operations yet."
|
|
604
|
+
})]
|
|
605
|
+
}),
|
|
606
|
+
PaginationComponent
|
|
607
|
+
] })]
|
|
608
|
+
}) });
|
|
609
|
+
}
|
|
610
|
+
const LEGACY_SCOPES = ["global", "local"];
|
|
611
|
+
const noop = () => {};
|
|
612
|
+
/** Toggles between the whole global and local history loaded up front. */
|
|
613
|
+
function LegacyRevisionHistory(props) {
|
|
614
|
+
const { globalOperations, localOperations, ...common } = props;
|
|
615
|
+
const [scope, setScope] = useState("global");
|
|
616
|
+
return /* @__PURE__ */ jsx(ScopedRevisionHistory, {
|
|
617
|
+
...common,
|
|
618
|
+
operations: scope === "local" ? localOperations : globalOperations,
|
|
619
|
+
isLoading: false,
|
|
620
|
+
hasNextPage: false,
|
|
621
|
+
onLoadNextPage: noop,
|
|
622
|
+
scopes: LEGACY_SCOPES,
|
|
623
|
+
scope,
|
|
624
|
+
onScopeChange: setScope
|
|
625
|
+
});
|
|
626
|
+
}
|
|
627
|
+
/**
|
|
628
|
+
* The revision history panel. Pages arrive oldest first while the timeline
|
|
629
|
+
* renders newest first, so it waits for the whole history to load before
|
|
630
|
+
* rendering the timeline, showing "Loading operations…" and a running count
|
|
631
|
+
* in the meantime.
|
|
632
|
+
*
|
|
633
|
+
* Also accepts the deprecated `globalOperations`/`localOperations` pair
|
|
634
|
+
* (see `RevisionHistoryLegacyProps`), toggling between them internally.
|
|
635
|
+
*/
|
|
636
|
+
function RevisionHistory(props) {
|
|
637
|
+
return "globalOperations" in props ? /* @__PURE__ */ jsx(LegacyRevisionHistory, { ...props }) : /* @__PURE__ */ jsx(ScopedRevisionHistory, { ...props });
|
|
638
|
+
}
|
|
639
|
+
//#endregion
|
|
640
|
+
export { RevisionHistory };
|
|
641
|
+
|
|
642
|
+
//# sourceMappingURL=revision-history.impl-CrtSnhXQ.js.map
|