migrate IPageWrapper and UiState to this project