Extract vendored dioxus-primitives components into their own crate #10
37 changed files with 40 additions and 11 deletions
11
Cargo.lock
generated
11
Cargo.lock
generated
|
|
@ -1603,6 +1603,15 @@ dependencies = [
|
||||||
"uuid",
|
"uuid",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "feedsignal-dioxus-components"
|
||||||
|
version = "0.1.0"
|
||||||
|
dependencies = [
|
||||||
|
"dioxus",
|
||||||
|
"dioxus-icons",
|
||||||
|
"dioxus-primitives",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "feedsignal-feeds"
|
name = "feedsignal-feeds"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
|
|
@ -1633,10 +1642,10 @@ dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"chrono",
|
"chrono",
|
||||||
"dioxus",
|
"dioxus",
|
||||||
"dioxus-icons",
|
|
||||||
"dioxus-primitives",
|
"dioxus-primitives",
|
||||||
"feedsignal-core",
|
"feedsignal-core",
|
||||||
"feedsignal-db",
|
"feedsignal-db",
|
||||||
|
"feedsignal-dioxus-components",
|
||||||
"feedsignal-feeds",
|
"feedsignal-feeds",
|
||||||
"feedsignal-llm",
|
"feedsignal-llm",
|
||||||
"serde",
|
"serde",
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ resolver = "2"
|
||||||
members = [
|
members = [
|
||||||
"crates/core",
|
"crates/core",
|
||||||
"crates/db",
|
"crates/db",
|
||||||
|
"crates/dioxus-components",
|
||||||
"crates/feeds",
|
"crates/feeds",
|
||||||
"crates/llm",
|
"crates/llm",
|
||||||
"crates/web",
|
"crates/web",
|
||||||
|
|
@ -31,5 +32,6 @@ libsqlite3-sys = { version = "0.30", features = ["bundled"] }
|
||||||
|
|
||||||
feedsignal-core = { path = "crates/core" }
|
feedsignal-core = { path = "crates/core" }
|
||||||
feedsignal-db = { path = "crates/db" }
|
feedsignal-db = { path = "crates/db" }
|
||||||
|
feedsignal-dioxus-components = { path = "crates/dioxus-components" }
|
||||||
feedsignal-feeds = { path = "crates/feeds" }
|
feedsignal-feeds = { path = "crates/feeds" }
|
||||||
feedsignal-llm = { path = "crates/llm" }
|
feedsignal-llm = { path = "crates/llm" }
|
||||||
|
|
|
||||||
10
crates/dioxus-components/Cargo.toml
Normal file
10
crates/dioxus-components/Cargo.toml
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
[package]
|
||||||
|
name = "feedsignal-dioxus-components"
|
||||||
|
version.workspace = true
|
||||||
|
edition.workspace = true
|
||||||
|
license.workspace = true
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
dioxus = "0.7"
|
||||||
|
dioxus-primitives = { git = "https://github.com/DioxusLabs/components", version = "0.0.1", default-features = false }
|
||||||
|
dioxus-icons = { version = "0.1.0", default-features = false }
|
||||||
9
crates/dioxus-components/src/lib.rs
Normal file
9
crates/dioxus-components/src/lib.rs
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
// Vendored copies of the dioxus-primitives component registry
|
||||||
|
// (https://github.com/DioxusLabs/components, preview/src/components).
|
||||||
|
// That registry is a "copy this source into your project" style
|
||||||
|
// collection, not a published crate — so these files are pulled in
|
||||||
|
// verbatim rather than depended on directly. Don't edit component
|
||||||
|
// internals for app-specific needs; layer overrides on via the `class`/
|
||||||
|
// `attributes` props each component already accepts.
|
||||||
|
mod components;
|
||||||
|
pub use components::*;
|
||||||
|
|
@ -24,7 +24,7 @@ chrono = { workspace = true, optional = true }
|
||||||
serde_json = { workspace = true, optional = true }
|
serde_json = { workspace = true, optional = true }
|
||||||
tokio-cron-scheduler = { version = "0.13", optional = true }
|
tokio-cron-scheduler = { version = "0.13", optional = true }
|
||||||
dioxus-primitives = { git = "https://github.com/DioxusLabs/components", version = "0.0.1", default-features = false }
|
dioxus-primitives = { git = "https://github.com/DioxusLabs/components", version = "0.0.1", default-features = false }
|
||||||
dioxus-icons = { version = "0.1.0", default-features = false }
|
feedsignal-dioxus-components.workspace = true
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["web"]
|
default = ["web"]
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
use super::handlers::score_percent;
|
use super::handlers::score_percent;
|
||||||
use crate::api;
|
use crate::api;
|
||||||
use crate::api::ArticleView;
|
use crate::api::ArticleView;
|
||||||
use crate::components::badge::{Badge, BadgeVariant};
|
|
||||||
use crate::components::button::{Button, ButtonSize, ButtonVariant};
|
|
||||||
use dioxus::prelude::*;
|
use dioxus::prelude::*;
|
||||||
|
use feedsignal_dioxus_components::badge::{Badge, BadgeVariant};
|
||||||
|
use feedsignal_dioxus_components::button::{Button, ButtonSize, ButtonVariant};
|
||||||
|
|
||||||
#[component]
|
#[component]
|
||||||
pub fn ArticleRow(article: ArticleView) -> Element {
|
pub fn ArticleRow(article: ArticleView) -> Element {
|
||||||
|
|
|
||||||
|
|
@ -3,13 +3,13 @@ mod handlers;
|
||||||
mod subscribe_form;
|
mod subscribe_form;
|
||||||
|
|
||||||
use crate::api;
|
use crate::api;
|
||||||
use crate::components::scroll_area::ScrollArea;
|
use article_row::ArticleRow;
|
||||||
use crate::components::sidebar::{
|
use dioxus::prelude::*;
|
||||||
|
use feedsignal_dioxus_components::scroll_area::ScrollArea;
|
||||||
|
use feedsignal_dioxus_components::sidebar::{
|
||||||
Sidebar, SidebarContent, SidebarGroup, SidebarGroupContent, SidebarGroupLabel, SidebarHeader,
|
Sidebar, SidebarContent, SidebarGroup, SidebarGroupContent, SidebarGroupLabel, SidebarHeader,
|
||||||
SidebarInset, SidebarMenu, SidebarMenuButton, SidebarMenuItem, SidebarProvider, SidebarTrigger,
|
SidebarInset, SidebarMenu, SidebarMenuButton, SidebarMenuItem, SidebarProvider, SidebarTrigger,
|
||||||
};
|
};
|
||||||
use article_row::ArticleRow;
|
|
||||||
use dioxus::prelude::*;
|
|
||||||
use subscribe_form::SubscribeForm;
|
use subscribe_form::SubscribeForm;
|
||||||
|
|
||||||
#[component]
|
#[component]
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
use super::handlers::{normalize_feed_url, resolve_submit_outcome, SubmitOutcome};
|
use super::handlers::{normalize_feed_url, resolve_submit_outcome, SubmitOutcome};
|
||||||
use crate::api;
|
use crate::api;
|
||||||
use crate::components::button::{Button, ButtonVariant};
|
|
||||||
use crate::components::input::Input;
|
|
||||||
use dioxus::prelude::*;
|
use dioxus::prelude::*;
|
||||||
|
use feedsignal_dioxus_components::button::{Button, ButtonVariant};
|
||||||
|
use feedsignal_dioxus_components::input::Input;
|
||||||
|
|
||||||
/// Form for manually subscribing to a feed by URL. Fetches the feed
|
/// Form for manually subscribing to a feed by URL. Fetches the feed
|
||||||
/// immediately on submit (rather than waiting for the next scheduled poll)
|
/// immediately on submit (rather than waiting for the next scheduled poll)
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
mod api;
|
mod api;
|
||||||
mod app;
|
mod app;
|
||||||
mod components;
|
|
||||||
|
|
||||||
#[cfg(feature = "server")]
|
#[cfg(feature = "server")]
|
||||||
mod server;
|
mod server;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue