Remove dioxus-lib, fix doc imports (#4438)
* remove dioxus lib * inline some doc items * fix tests * test docs * Fix doc tests * Pull out dioxus/lib feature * disable logger and devtools in library feature * fix cargo doc * fix cargo doc
This commit is contained in:
1 parent
4cb32d372b
commit
98f7667fb4
59 files changed
+216
-530
No files matched your search
@@ -1,8 +1,8 @@
|
||||
/// Components that allow the macro to add child routers. This component provides a context
|
||||
/// to the child router that maps child routes to root routes and vice versa.
|
||||
use dioxus_lib::prelude::*;
|
||||
|
||||
use crate::Routable;
|
||||
use dioxus_core::{provide_context, try_consume_context, use_hook, Element};
|
||||
use dioxus_core_macro::{component, Props};
|
||||
|
||||
/// Maps a child route into the root router and vice versa
|
||||
// NOTE: Currently child routers only support simple static prefixes, but this
|
||||
@@ -53,7 +53,7 @@ impl<R: Routable> PartialEq for ChildRouterProps<R> {
|
||||
}
|
||||
}
|
||||
|
||||
/// A component that provides a [`History`] to a child router. The `#[child]` attribute on the router macro will insert this automatically.
|
||||
/// A component that provides a [`History`](dioxus_history::History) to a child router. The `#[child]` attribute on the router macro will insert this automatically.
|
||||
#[component]
|
||||
#[allow(missing_docs)]
|
||||
pub fn ChildRouter<R: Routable>(props: ChildRouterProps<R>) -> Element {
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
use dioxus_core::Element;
|
||||
use dioxus_core_macro::rsx;
|
||||
use dioxus_html as dioxus_elements;
|
||||
use dioxus_signals::{GlobalSignal, Readable};
|
||||
|
||||
#[allow(deprecated)]
|
||||
use crate::hooks::use_router;
|
||||
use dioxus_lib::prelude::*;
|
||||
|
||||
/// The default component to render when an external navigation fails.
|
||||
#[allow(non_snake_case)]
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
use dioxus_lib::prelude::*;
|
||||
use dioxus_core::{Element, VNode};
|
||||
use dioxus_core_macro::{rsx, Props};
|
||||
use dioxus_html as dioxus_elements;
|
||||
use dioxus_signals::{GlobalSignal, Readable};
|
||||
|
||||
use tracing::error;
|
||||
|
||||
@@ -24,7 +27,6 @@ pub struct HistoryButtonProps {
|
||||
/// # Example
|
||||
/// ```rust
|
||||
/// # use dioxus::prelude::*;
|
||||
/// # use dioxus_router::prelude::*;
|
||||
/// #[derive(Clone, Routable)]
|
||||
/// enum Route {
|
||||
/// #[route("/")]
|
||||
@@ -97,7 +99,6 @@ pub fn GoBackButton(props: HistoryButtonProps) -> Element {
|
||||
/// # Example
|
||||
/// ```rust
|
||||
/// # use dioxus::prelude::*;
|
||||
/// # use dioxus_router::prelude::*;
|
||||
/// #[derive(Clone, Routable)]
|
||||
/// enum Route {
|
||||
/// #[route("/")]
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
use dioxus_core::{use_hook, Callback, Element};
|
||||
use dioxus_core_macro::{component, Props};
|
||||
use dioxus_history::{provide_history_context, History};
|
||||
use dioxus_lib::prelude::*;
|
||||
use dioxus_signals::Owner;
|
||||
|
||||
use std::rc::Rc;
|
||||
|
||||
|
||||
@@ -2,7 +2,12 @@
|
||||
|
||||
use std::fmt::Debug;
|
||||
|
||||
use dioxus_lib::prelude::*;
|
||||
use dioxus_core::{Attribute, Element, EventHandler, VNode};
|
||||
use dioxus_core_macro::{rsx, Props};
|
||||
use dioxus_html::{
|
||||
self as dioxus_elements, ModifiersInteraction, MountedEvent, MouseEvent, PointerInteraction,
|
||||
};
|
||||
use dioxus_signals::{GlobalSignal, Owner, Readable};
|
||||
|
||||
use tracing::error;
|
||||
|
||||
@@ -91,7 +96,6 @@ impl Debug for LinkProps {
|
||||
/// # Example
|
||||
/// ```rust
|
||||
/// # use dioxus::prelude::*;
|
||||
/// # use dioxus_router::prelude::*;
|
||||
///
|
||||
/// #[derive(Clone, Routable)]
|
||||
/// enum Route {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use crate::{outlet::OutletContext, *};
|
||||
use dioxus_lib::prelude::*;
|
||||
use dioxus_core::Element;
|
||||
|
||||
/// An outlet for the current content.
|
||||
///
|
||||
@@ -15,7 +15,6 @@ use dioxus_lib::prelude::*;
|
||||
/// # Example
|
||||
/// ```rust
|
||||
/// # use dioxus::prelude::*;
|
||||
/// # use dioxus_router::prelude::*;
|
||||
/// #[derive(Clone, Routable)]
|
||||
/// #[rustfmt::skip]
|
||||
/// enum Route {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
use dioxus_lib::prelude::*;
|
||||
|
||||
use crate::{provide_router_context, routable::Routable, router_cfg::RouterConfig, Outlet};
|
||||
use dioxus_core::{provide_context, use_hook, Callback, Element};
|
||||
use dioxus_core_macro::{rsx, Props};
|
||||
use dioxus_signals::{GlobalSignal, Owner, Readable};
|
||||
|
||||
/// The props for [`Router`].
|
||||
#[derive(Props)]
|
||||
@@ -41,7 +42,7 @@ pub fn Router<R: Routable + Clone>(props: RouterProps<R>) -> Element {
|
||||
});
|
||||
|
||||
#[cfg(feature = "streaming")]
|
||||
use_after_suspense_resolved(|| {
|
||||
dioxus_hooks::use_after_suspense_resolved(|| {
|
||||
dioxus_fullstack_hooks::commit_initial_chunk();
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user