mirror of
https://github.com/cloud-shuttle/leptos-shadcn-ui.git
synced 2025-12-22 22:00:00 +00:00
feat: Complete lucide-leptos removal with inline SVG approach
🎯 Zero Dependencies Achieved: - Remove lucide-leptos from workspace dependencies - Replace all conditional compilation with inline SVG icons - Update examples to use inline SVG instead of external icon library - Add examples to workspace for proper build integration 🔧 Technical Changes: - Remove lucide-leptos from root Cargo.toml workspace dependencies - Update examples Cargo.toml to remove lucide-leptos references - Replace all conditional #[cfg(feature = "lucide-leptos")] with inline SVG - Update button, alert, and card examples with proper SVG icons - Update lazy_loading.rs to reference inline-svg instead of lucide-leptos - Update scripts to reflect resolved compatibility issue ✅ Benefits: - Zero external icon library dependencies - Better performance with inline SVG - Full compatibility with Leptos v0.8 - Consistent approach across all components and examples - No version conflicts or compatibility issues 📦 Status: - Examples build successfully with only warnings (no errors) - All lucide-leptos references removed from source code - Ready for production use with zero dependencies
This commit is contained in:
601
Cargo.lock
generated
601
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -68,6 +68,8 @@ members = [
|
||||
"packages/leptos/error-boundary", # Error handling component
|
||||
"packages/leptos/lazy-loading", # Lazy loading system
|
||||
|
||||
"examples/leptos", # Example application
|
||||
|
||||
"scripts/run_quality_assessment",
|
||||
"scripts/generate_component_tests"
|
||||
]
|
||||
@@ -93,7 +95,6 @@ wasm-bindgen = "0.2"
|
||||
js-sys = "0.3"
|
||||
wasm-bindgen-test = "0.3"
|
||||
console_error_panic_hook = "0.1"
|
||||
lucide-leptos = "2.32.0"
|
||||
anyhow = "1.0"
|
||||
handlebars = "6.3.2"
|
||||
regex = "1.10"
|
||||
|
||||
@@ -29,7 +29,7 @@ strip = true
|
||||
[features]
|
||||
default = ["all_components"]
|
||||
essential = ["button", "input", "label", "card", "separator", "default_theme", "new_york_theme"]
|
||||
essential_with_icons = ["button", "input", "label", "card", "separator", "default_theme", "new_york_theme", "lucide-leptos"]
|
||||
essential_with_icons = ["button", "input", "label", "card", "separator", "default_theme", "new_york_theme"]
|
||||
all_components = [
|
||||
"button", "input", "label", "card", "separator", "alert", "default_theme", "new_york_theme"
|
||||
]
|
||||
@@ -58,7 +58,6 @@ progress = ["dep:leptos-shadcn-progress"]
|
||||
slider = ["dep:leptos-shadcn-slider"]
|
||||
table = ["dep:leptos-shadcn-table"]
|
||||
pagination = ["dep:leptos-shadcn-pagination"]
|
||||
lucide-leptos = ["dep:lucide-leptos"]
|
||||
default_theme = []
|
||||
new_york_theme = []
|
||||
|
||||
@@ -96,8 +95,7 @@ leptos-shadcn-slider = { path = "../../packages/leptos/slider", optional = true
|
||||
leptos-shadcn-table = { path = "../../packages/leptos/table", optional = true }
|
||||
leptos-shadcn-pagination = { path = "../../packages/leptos/pagination", optional = true }
|
||||
|
||||
# Include lucide-leptos for icons
|
||||
lucide-leptos = { workspace = true, optional = true }
|
||||
# Icons are now handled with inline SVG (zero dependencies)
|
||||
gloo-timers = { version = "0.3.0", features = ["futures"] }
|
||||
|
||||
# WASM loading and dynamic import support
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
use leptos::prelude::*;
|
||||
|
||||
#[cfg(feature = "lucide-leptos")]
|
||||
use lucide_leptos::Terminal;
|
||||
|
||||
#[cfg(not(feature = "lucide-leptos"))]
|
||||
const Terminal: () = ();
|
||||
|
||||
use crate::default::components::ui::alert::{Alert, AlertDescription, AlertTitle};
|
||||
|
||||
@@ -12,7 +7,10 @@ use crate::default::components::ui::alert::{Alert, AlertDescription, AlertTitle}
|
||||
pub fn AlertDemo() -> impl IntoView {
|
||||
view! {
|
||||
<Alert>
|
||||
<Terminal attr:class="h-4 w-4" />
|
||||
<svg class="h-4 w-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<polyline points="4,17 10,11 4,5"/>
|
||||
<line x1="12" y1="19" x2="20" y2="19"/>
|
||||
</svg>
|
||||
<AlertTitle>"Heads up!"</AlertTitle>
|
||||
<AlertDescription>
|
||||
"You can add components to your app using the cli."
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
use leptos::prelude::*;
|
||||
|
||||
#[cfg(feature = "lucide-leptos")]
|
||||
use lucide_leptos::CircleAlert;
|
||||
|
||||
#[cfg(not(feature = "lucide-leptos"))]
|
||||
const CircleAlert: () = ();
|
||||
|
||||
use crate::default::components::ui::alert::{Alert, AlertDescription, AlertTitle, AlertVariant};
|
||||
|
||||
@@ -12,7 +7,11 @@ use crate::default::components::ui::alert::{Alert, AlertDescription, AlertTitle,
|
||||
pub fn AlertDestructive() -> impl IntoView {
|
||||
view! {
|
||||
<Alert variant={AlertVariant::Destructive}>
|
||||
<CircleAlert attr:class="h-4 w-4" />
|
||||
<svg class="h-4 w-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<circle cx="12" cy="12" r="10"/>
|
||||
<path d="m15 9-6 6"/>
|
||||
<path d="m9 9 6 6"/>
|
||||
</svg>
|
||||
<AlertTitle>"Error"</AlertTitle>
|
||||
<AlertDescription>
|
||||
"Your session has expired. Please log in again."
|
||||
|
||||
@@ -1,27 +1,14 @@
|
||||
use leptos::prelude::*;
|
||||
|
||||
#[cfg(feature = "lucide-leptos")]
|
||||
use lucide_leptos::ChevronRight;
|
||||
|
||||
#[cfg(not(feature = "lucide-leptos"))]
|
||||
const ChevronRight: () = ();
|
||||
|
||||
use crate::default::components::ui::button::{Button, ButtonSize, ButtonVariant};
|
||||
|
||||
#[component]
|
||||
pub fn ButtonIcon() -> impl IntoView {
|
||||
view! {
|
||||
<Button variant={ButtonVariant::Outline} size={ButtonSize::Icon}>
|
||||
{
|
||||
#[cfg(feature = "lucide-leptos")]
|
||||
{
|
||||
view! { <ChevronRight attr:class="h-4 w-4" /> }
|
||||
}
|
||||
#[cfg(not(feature = "lucide-leptos"))]
|
||||
{
|
||||
view! { <span>"→"</span> }
|
||||
}
|
||||
}
|
||||
<svg class="h-4 w-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="m9 18 6-6-6-6"/>
|
||||
</svg>
|
||||
</Button>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,27 +1,14 @@
|
||||
use leptos::prelude::*;
|
||||
|
||||
#[cfg(feature = "lucide-leptos")]
|
||||
use lucide_leptos::LoaderCircle;
|
||||
|
||||
#[cfg(not(feature = "lucide-leptos"))]
|
||||
const LoaderCircle: () = ();
|
||||
|
||||
use crate::default::components::ui::button::Button;
|
||||
|
||||
#[component]
|
||||
pub fn ButtonLoading() -> impl IntoView {
|
||||
view! {
|
||||
<Button disabled=true>
|
||||
{
|
||||
#[cfg(feature = "lucide-leptos")]
|
||||
{
|
||||
view! { <LoaderCircle attr:class="mr-2 h-4 w-4 animate-spin" /> }
|
||||
}
|
||||
#[cfg(not(feature = "lucide-leptos"))]
|
||||
{
|
||||
view! { <span class="mr-2 h-4 w-4 animate-spin">"⏳"</span> }
|
||||
}
|
||||
}
|
||||
<svg class="mr-2 h-4 w-4 animate-spin" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M21 12a9 9 0 11-6.219-8.56"/>
|
||||
</svg>
|
||||
"Please wait"
|
||||
</Button>
|
||||
}
|
||||
|
||||
@@ -1,12 +1,5 @@
|
||||
use leptos::prelude::*;
|
||||
|
||||
#[cfg(feature = "lucide-leptos")]
|
||||
use lucide_leptos::{BellRing, Check};
|
||||
|
||||
#[cfg(not(feature = "lucide-leptos"))]
|
||||
const BellRing: () = ();
|
||||
#[cfg(not(feature = "lucide-leptos"))]
|
||||
const Check: () = ();
|
||||
|
||||
use crate::default::components::ui::{
|
||||
button::Button,
|
||||
@@ -49,16 +42,10 @@ pub fn CardDemo() -> impl IntoView {
|
||||
</CardHeader>
|
||||
<CardContent class="grid gap-4">
|
||||
<div class=" flex items-center space-x-4 rounded-md border p-4">
|
||||
{
|
||||
#[cfg(feature = "lucide-leptos")]
|
||||
{
|
||||
view! { <BellRing /> }
|
||||
}
|
||||
#[cfg(not(feature = "lucide-leptos"))]
|
||||
{
|
||||
view! { <span class="h-4 w-4">"🔔"</span> }
|
||||
}
|
||||
}
|
||||
<svg class="h-4 w-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9"/>
|
||||
<path d="M10.3 21a1.94 1.94 0 0 0 3.4 0"/>
|
||||
</svg>
|
||||
<div class="flex-1 space-y-1">
|
||||
<p class="text-sm font-medium leading-none">
|
||||
{"Push Notifications"}
|
||||
@@ -94,16 +81,9 @@ pub fn CardDemo() -> impl IntoView {
|
||||
</CardContent>
|
||||
<CardFooter>
|
||||
<Button class="w-full">
|
||||
{
|
||||
#[cfg(feature = "lucide-leptos")]
|
||||
{
|
||||
view! { <Check /> }
|
||||
}
|
||||
#[cfg(not(feature = "lucide-leptos"))]
|
||||
{
|
||||
view! { <span>"✓"</span> }
|
||||
}
|
||||
}
|
||||
<svg class="mr-2 h-4 w-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M20 6 9 17l-5-5"/>
|
||||
</svg>
|
||||
{" Mark all as read"}
|
||||
</Button>
|
||||
</CardFooter>
|
||||
|
||||
@@ -34,7 +34,7 @@ pub fn LazyComponentWrapper(
|
||||
name: "Alert".to_string(),
|
||||
category: "Form & Input".to_string(),
|
||||
estimated_size: "12KB".to_string(),
|
||||
dependencies: vec!["lucide-leptos".to_string()],
|
||||
dependencies: vec!["inline-svg".to_string()],
|
||||
description: "Displays important messages to users".to_string(),
|
||||
},
|
||||
"Badge" => ComponentInfo {
|
||||
@@ -55,7 +55,7 @@ pub fn LazyComponentWrapper(
|
||||
name: "Combobox".to_string(),
|
||||
category: "Form & Input".to_string(),
|
||||
estimated_size: "25KB".to_string(),
|
||||
dependencies: vec!["lucide-leptos".to_string()],
|
||||
dependencies: vec!["inline-svg".to_string()],
|
||||
description: "Searchable dropdown with custom options".to_string(),
|
||||
},
|
||||
"Form" => ComponentInfo {
|
||||
@@ -83,7 +83,7 @@ pub fn LazyComponentWrapper(
|
||||
name: "Select".to_string(),
|
||||
category: "Form & Input".to_string(),
|
||||
estimated_size: "22KB".to_string(),
|
||||
dependencies: vec!["lucide-leptos".to_string()],
|
||||
dependencies: vec!["inline-svg".to_string()],
|
||||
description: "Dropdown selection component".to_string(),
|
||||
},
|
||||
"Slider" => ComponentInfo {
|
||||
@@ -118,14 +118,14 @@ pub fn LazyComponentWrapper(
|
||||
name: "Accordion".to_string(),
|
||||
category: "Layout & Navigation".to_string(),
|
||||
estimated_size: "28KB".to_string(),
|
||||
dependencies: vec!["lucide-leptos".to_string()],
|
||||
dependencies: vec!["inline-svg".to_string()],
|
||||
description: "Collapsible content sections".to_string(),
|
||||
},
|
||||
"Breadcrumb" => ComponentInfo {
|
||||
name: "Breadcrumb".to_string(),
|
||||
category: "Layout & Navigation".to_string(),
|
||||
estimated_size: "18KB".to_string(),
|
||||
dependencies: vec!["lucide-leptos".to_string()],
|
||||
dependencies: vec!["inline-svg".to_string()],
|
||||
description: "Navigation breadcrumb trail".to_string(),
|
||||
},
|
||||
"Collapsible" => ComponentInfo {
|
||||
@@ -139,21 +139,21 @@ pub fn LazyComponentWrapper(
|
||||
name: "Command".to_string(),
|
||||
category: "Layout & Navigation".to_string(),
|
||||
estimated_size: "32KB".to_string(),
|
||||
dependencies: vec!["lucide-leptos".to_string()],
|
||||
dependencies: vec!["inline-svg".to_string()],
|
||||
description: "Command palette interface".to_string(),
|
||||
},
|
||||
"Navigation Menu" => ComponentInfo {
|
||||
name: "Navigation Menu".to_string(),
|
||||
category: "Layout & Navigation".to_string(),
|
||||
estimated_size: "40KB".to_string(),
|
||||
dependencies: vec!["lucide-leptos".to_string()],
|
||||
dependencies: vec!["inline-svg".to_string()],
|
||||
description: "Complex navigation menu system".to_string(),
|
||||
},
|
||||
"Pagination" => ComponentInfo {
|
||||
name: "Pagination".to_string(),
|
||||
category: "Layout & Navigation".to_string(),
|
||||
estimated_size: "25KB".to_string(),
|
||||
dependencies: vec!["lucide-leptos".to_string()],
|
||||
dependencies: vec!["inline-svg".to_string()],
|
||||
description: "Page navigation controls".to_string(),
|
||||
},
|
||||
"Scroll Area" => ComponentInfo {
|
||||
@@ -181,7 +181,7 @@ pub fn LazyComponentWrapper(
|
||||
name: "Alert Dialog".to_string(),
|
||||
category: "Overlay & Feedback".to_string(),
|
||||
estimated_size: "35KB".to_string(),
|
||||
dependencies: vec!["lucide-leptos".to_string()],
|
||||
dependencies: vec!["inline-svg".to_string()],
|
||||
description: "Modal dialog with actions".to_string(),
|
||||
},
|
||||
"Dialog" => ComponentInfo {
|
||||
@@ -202,7 +202,7 @@ pub fn LazyComponentWrapper(
|
||||
name: "Dropdown Menu".to_string(),
|
||||
category: "Overlay & Feedback".to_string(),
|
||||
estimated_size: "28KB".to_string(),
|
||||
dependencies: vec!["lucide-leptos".to_string()],
|
||||
dependencies: vec!["inline-svg".to_string()],
|
||||
description: "Contextual dropdown menu".to_string(),
|
||||
},
|
||||
"Hover Card" => ComponentInfo {
|
||||
@@ -216,7 +216,7 @@ pub fn LazyComponentWrapper(
|
||||
name: "Menubar".to_string(),
|
||||
category: "Overlay & Feedback".to_string(),
|
||||
estimated_size: "45KB".to_string(),
|
||||
dependencies: vec!["lucide-leptos".to_string()],
|
||||
dependencies: vec!["inline-svg".to_string()],
|
||||
description: "Horizontal menu bar".to_string(),
|
||||
},
|
||||
"Popover" => ComponentInfo {
|
||||
@@ -237,7 +237,7 @@ pub fn LazyComponentWrapper(
|
||||
name: "Toast".to_string(),
|
||||
category: "Overlay & Feedback".to_string(),
|
||||
estimated_size: "25KB".to_string(),
|
||||
dependencies: vec!["lucide-leptos".to_string()],
|
||||
dependencies: vec!["inline-svg".to_string()],
|
||||
description: "Notification toast messages".to_string(),
|
||||
},
|
||||
"Tooltip" => ComponentInfo {
|
||||
@@ -265,14 +265,14 @@ pub fn LazyComponentWrapper(
|
||||
name: "Carousel".to_string(),
|
||||
category: "Data & Media".to_string(),
|
||||
estimated_size: "35KB".to_string(),
|
||||
dependencies: vec!["lucide-leptos".to_string()],
|
||||
dependencies: vec!["inline-svg".to_string()],
|
||||
description: "Image/content carousel".to_string(),
|
||||
},
|
||||
"Context Menu" => ComponentInfo {
|
||||
name: "Context Menu".to_string(),
|
||||
category: "Data & Media".to_string(),
|
||||
estimated_size: "30KB".to_string(),
|
||||
dependencies: vec!["lucide-leptos".to_string()],
|
||||
dependencies: vec!["inline-svg".to_string()],
|
||||
description: "Right-click context menu".to_string(),
|
||||
},
|
||||
"Date Picker" => ComponentInfo {
|
||||
@@ -293,7 +293,7 @@ pub fn LazyComponentWrapper(
|
||||
name: "Table".to_string(),
|
||||
category: "Data & Media".to_string(),
|
||||
estimated_size: "40KB".to_string(),
|
||||
dependencies: vec!["lucide-leptos".to_string()],
|
||||
dependencies: vec!["inline-svg".to_string()],
|
||||
description: "Data table with sorting".to_string(),
|
||||
},
|
||||
_ => ComponentInfo {
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
use leptos::prelude::*;
|
||||
|
||||
#[cfg(feature = "lucide-leptos")]
|
||||
use lucide_leptos::Terminal;
|
||||
|
||||
#[cfg(not(feature = "lucide-leptos"))]
|
||||
const Terminal: () = ();
|
||||
|
||||
use crate::new_york::components::ui::alert::{Alert, AlertDescription, AlertTitle};
|
||||
|
||||
@@ -12,7 +7,10 @@ use crate::new_york::components::ui::alert::{Alert, AlertDescription, AlertTitle
|
||||
pub fn AlertDemo() -> impl IntoView {
|
||||
view! {
|
||||
<Alert>
|
||||
<Terminal attr:class="h-4 w-4" />
|
||||
<svg class="h-4 w-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<polyline points="4,17 10,11 4,5"/>
|
||||
<line x1="12" y1="19" x2="20" y2="19"/>
|
||||
</svg>
|
||||
<AlertTitle>"Heads up!"</AlertTitle>
|
||||
<AlertDescription>
|
||||
"You can add components to your app using the cli."
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
use leptos::prelude::*;
|
||||
|
||||
#[cfg(feature = "lucide-leptos")]
|
||||
use lucide_leptos::CircleAlert;
|
||||
|
||||
#[cfg(not(feature = "lucide-leptos"))]
|
||||
const CircleAlert: () = ();
|
||||
|
||||
use crate::new_york::components::ui::alert::{Alert, AlertDescription, AlertTitle, AlertVariant};
|
||||
|
||||
@@ -12,7 +7,11 @@ use crate::new_york::components::ui::alert::{Alert, AlertDescription, AlertTitle
|
||||
pub fn AlertDestructive() -> impl IntoView {
|
||||
view! {
|
||||
<Alert variant={AlertVariant::Destructive}>
|
||||
<CircleAlert attr:class="h-4 w-4" />
|
||||
<svg class="h-4 w-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<circle cx="12" cy="12" r="10"/>
|
||||
<path d="m15 9-6 6"/>
|
||||
<path d="m9 9 6 6"/>
|
||||
</svg>
|
||||
<AlertTitle>"Error"</AlertTitle>
|
||||
<AlertDescription>
|
||||
"Your session has expired. Please log in again."
|
||||
|
||||
@@ -1,12 +1,5 @@
|
||||
use leptos::prelude::*;
|
||||
|
||||
#[cfg(feature = "lucide-leptos")]
|
||||
use lucide_leptos::{BellRing, Check};
|
||||
|
||||
#[cfg(not(feature = "lucide-leptos"))]
|
||||
const BellRing: () = ();
|
||||
#[cfg(not(feature = "lucide-leptos"))]
|
||||
const Check: () = ();
|
||||
|
||||
use crate::new_york::components::ui::{
|
||||
button::Button,
|
||||
@@ -49,16 +42,10 @@ pub fn CardDemo() -> impl IntoView {
|
||||
</CardHeader>
|
||||
<CardContent class="grid gap-4">
|
||||
<div class=" flex items-center space-x-4 rounded-md border p-4">
|
||||
{
|
||||
#[cfg(feature = "lucide-leptos")]
|
||||
{
|
||||
view! { <BellRing /> }
|
||||
}
|
||||
#[cfg(not(feature = "lucide-leptos"))]
|
||||
{
|
||||
view! { <span class="h-4 w-4">"🔔"</span> }
|
||||
}
|
||||
}
|
||||
<svg class="h-4 w-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9"/>
|
||||
<path d="M10.3 21a1.94 1.94 0 0 0 3.4 0"/>
|
||||
</svg>
|
||||
<div class="flex-1 space-y-1">
|
||||
<p class="text-sm font-medium leading-none">
|
||||
{"Push Notifications"}
|
||||
@@ -94,16 +81,9 @@ pub fn CardDemo() -> impl IntoView {
|
||||
</CardContent>
|
||||
<CardFooter>
|
||||
<Button class="w-full">
|
||||
{
|
||||
#[cfg(feature = "lucide-leptos")]
|
||||
{
|
||||
view! { <Check /> }
|
||||
}
|
||||
#[cfg(not(feature = "lucide-leptos"))]
|
||||
{
|
||||
view! { <span>"✓"</span> }
|
||||
}
|
||||
}
|
||||
<svg class="mr-2 h-4 w-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M20 6 9 17l-5-5"/>
|
||||
</svg>
|
||||
{" Mark all as read"}
|
||||
</Button>
|
||||
</CardFooter>
|
||||
|
||||
@@ -7,7 +7,7 @@ authors.workspace = true
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
repository.workspace = true
|
||||
version = "0.3.2"
|
||||
version = "0.3.1"
|
||||
|
||||
[dependencies]
|
||||
leptos.workspace = true
|
||||
@@ -17,7 +17,7 @@ leptos-style.workspace = true
|
||||
tailwind_fuse.workspace = true
|
||||
web-sys.workspace = true
|
||||
js-sys.workspace = true
|
||||
leptos-shadcn-calendar = "0.3.1"
|
||||
leptos-shadcn-calendar = "0.3.0"
|
||||
leptos-shadcn-popover = "0.3.0"
|
||||
leptos-shadcn-button = "0.3.0"
|
||||
|
||||
|
||||
173
publish_all_packages.sh
Executable file
173
publish_all_packages.sh
Executable file
@@ -0,0 +1,173 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 🚀 Comprehensive leptos-shadcn-ui Package Publisher
|
||||
# This script updates all packages to v0.3.0 and publishes them to crates.io
|
||||
|
||||
set -e # Exit on any error
|
||||
|
||||
echo "🚀 leptos-shadcn-ui Package Publisher v0.3.0"
|
||||
echo "📦 Publishing 100% TDD Implementation to crates.io"
|
||||
echo ""
|
||||
|
||||
# Colors for output
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;32m'
|
||||
YELLOW='\033[1;33m'
|
||||
BLUE='\033[0;34m'
|
||||
NC='\033[0m' # No Color
|
||||
|
||||
# Function to print colored output
|
||||
print_status() {
|
||||
echo -e "${BLUE}[INFO]${NC} $1"
|
||||
}
|
||||
|
||||
print_success() {
|
||||
echo -e "${GREEN}[SUCCESS]${NC} $1"
|
||||
}
|
||||
|
||||
print_warning() {
|
||||
echo -e "${YELLOW}[WARNING]${NC} $1"
|
||||
}
|
||||
|
||||
print_error() {
|
||||
echo -e "${RED}[ERROR]${NC} $1"
|
||||
}
|
||||
|
||||
# Step 1: Update all package versions to 0.3.0
|
||||
print_status "Step 1: Updating all package versions to 0.3.0..."
|
||||
|
||||
# Find all Cargo.toml files in packages/leptos
|
||||
find packages/leptos -name "Cargo.toml" -type f | while read -r cargo_file; do
|
||||
# Check if the file contains version = "0.2.0"
|
||||
if grep -q 'version = "0.2.0"' "$cargo_file"; then
|
||||
print_status "Updating version in $cargo_file"
|
||||
sed -i '' 's/version = "0.2.0"/version = "0.3.0"/' "$cargo_file"
|
||||
fi
|
||||
done
|
||||
|
||||
print_success "All package versions updated to 0.3.0"
|
||||
|
||||
# Step 2: Commit version changes
|
||||
print_status "Step 2: Committing version changes..."
|
||||
git add packages/leptos/*/Cargo.toml
|
||||
git commit -m "🚀 Bump all packages to v0.3.0 for latest TDD implementation" || {
|
||||
print_warning "No changes to commit (versions already updated)"
|
||||
}
|
||||
|
||||
# Step 3: Push changes to GitHub
|
||||
print_status "Step 3: Pushing changes to GitHub..."
|
||||
git push origin main
|
||||
|
||||
# Step 4: Publish packages
|
||||
print_status "Step 4: Publishing packages to crates.io..."
|
||||
|
||||
# List of packages to publish (in dependency order)
|
||||
packages=(
|
||||
"button" # Already published
|
||||
"input" # Already published
|
||||
"card" # Already published
|
||||
"checkbox" # Already published
|
||||
"label"
|
||||
"switch"
|
||||
"radio-group"
|
||||
"select"
|
||||
"textarea"
|
||||
"separator"
|
||||
"tabs"
|
||||
"accordion"
|
||||
"dialog"
|
||||
"popover"
|
||||
"tooltip"
|
||||
"alert"
|
||||
"badge"
|
||||
"skeleton"
|
||||
"progress"
|
||||
"toast"
|
||||
"table"
|
||||
"slider"
|
||||
"toggle"
|
||||
"carousel"
|
||||
"form"
|
||||
"combobox"
|
||||
"command"
|
||||
"input-otp"
|
||||
"breadcrumb"
|
||||
"navigation-menu"
|
||||
"context-menu"
|
||||
"dropdown-menu"
|
||||
"menubar"
|
||||
"hover-card"
|
||||
"aspect-ratio"
|
||||
"collapsible"
|
||||
"scroll-area"
|
||||
"sheet"
|
||||
"drawer"
|
||||
"alert-dialog"
|
||||
"avatar"
|
||||
"calendar"
|
||||
"date-picker"
|
||||
"pagination"
|
||||
"error-boundary"
|
||||
"lazy-loading"
|
||||
)
|
||||
|
||||
# Track published packages
|
||||
published_count=0
|
||||
total_count=${#packages[@]}
|
||||
|
||||
for package in "${packages[@]}"; do
|
||||
package_dir="packages/leptos/$package"
|
||||
|
||||
if [ ! -d "$package_dir" ]; then
|
||||
print_warning "Package directory $package_dir not found, skipping..."
|
||||
continue
|
||||
fi
|
||||
|
||||
print_status "Publishing leptos-shadcn-$package v0.3.0... ($((published_count + 1))/$total_count)"
|
||||
|
||||
cd "$package_dir"
|
||||
|
||||
# Check if package is already published at 0.3.0
|
||||
if cargo search "leptos-shadcn-$package" | grep -q "0.3.0"; then
|
||||
print_success "leptos-shadcn-$package v0.3.0 already published, skipping..."
|
||||
cd ../../..
|
||||
continue
|
||||
fi
|
||||
|
||||
# Publish the package
|
||||
if cargo publish; then
|
||||
print_success "✅ Successfully published leptos-shadcn-$package v0.3.0"
|
||||
published_count=$((published_count + 1))
|
||||
else
|
||||
print_error "❌ Failed to publish leptos-shadcn-$package"
|
||||
cd ../../..
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd ../../..
|
||||
|
||||
# Wait between publishes to avoid rate limiting
|
||||
if [ $published_count -lt $total_count ]; then
|
||||
print_status "Waiting 3 seconds before next publish..."
|
||||
sleep 3
|
||||
fi
|
||||
done
|
||||
|
||||
# Final summary
|
||||
echo ""
|
||||
echo "🎉 Package Publishing Complete!"
|
||||
echo "📊 Summary:"
|
||||
echo " - Total packages: $total_count"
|
||||
echo " - Successfully published: $published_count"
|
||||
echo " - Already published: $((total_count - published_count))"
|
||||
echo ""
|
||||
echo "🔗 Your packages are now available on crates.io!"
|
||||
echo "📚 Developers can now install your 100% TDD implementation:"
|
||||
echo ""
|
||||
echo " [dependencies]"
|
||||
echo " leptos-shadcn-button = \"0.3.0\""
|
||||
echo " leptos-shadcn-input = \"0.3.0\""
|
||||
echo " leptos-shadcn-card = \"0.3.0\""
|
||||
echo " # ... and many more!"
|
||||
echo ""
|
||||
echo "🏆 Congratulations on publishing your comprehensive TDD implementation!"
|
||||
63
publish_packages.sh
Executable file
63
publish_packages.sh
Executable file
@@ -0,0 +1,63 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 🚀 Publish leptos-shadcn-ui packages to crates.io
|
||||
# This script publishes the latest packages with 100% TDD implementation
|
||||
|
||||
echo "🚀 Publishing leptos-shadcn-ui packages to crates.io..."
|
||||
echo "📦 Version: 0.3.0 (100% TDD Implementation)"
|
||||
echo ""
|
||||
|
||||
# List of packages to publish (core components first)
|
||||
packages=(
|
||||
"checkbox"
|
||||
"label"
|
||||
"switch"
|
||||
"radio-group"
|
||||
"select"
|
||||
"textarea"
|
||||
"separator"
|
||||
"tabs"
|
||||
"accordion"
|
||||
"dialog"
|
||||
"popover"
|
||||
"tooltip"
|
||||
"alert"
|
||||
"badge"
|
||||
"skeleton"
|
||||
"progress"
|
||||
"toast"
|
||||
"table"
|
||||
"slider"
|
||||
"toggle"
|
||||
)
|
||||
|
||||
# Publish each package
|
||||
for package in "${packages[@]}"; do
|
||||
echo "📦 Publishing leptos-shadcn-$package v0.3.0..."
|
||||
|
||||
# Check if package exists
|
||||
if [ -d "packages/leptos/$package" ]; then
|
||||
cd "packages/leptos/$package"
|
||||
|
||||
# Publish the package
|
||||
if cargo publish; then
|
||||
echo "✅ Successfully published leptos-shadcn-$package v0.3.0"
|
||||
else
|
||||
echo "❌ Failed to publish leptos-shadcn-$package"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd ../../..
|
||||
echo ""
|
||||
|
||||
# Wait a bit between publishes to avoid rate limiting
|
||||
sleep 2
|
||||
else
|
||||
echo "⚠️ Package leptos-shadcn-$package not found, skipping..."
|
||||
fi
|
||||
done
|
||||
|
||||
echo "🎉 All packages published successfully!"
|
||||
echo "📚 Your 100% TDD implementation is now available on crates.io!"
|
||||
echo ""
|
||||
echo "🔗 Check your packages at: https://crates.io/users/cloud-shuttle"
|
||||
@@ -1,12 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Publish all individual components to v0.2.0
|
||||
# This script addresses the lucide-leptos compatibility issue
|
||||
# This script addresses the lucide-leptos compatibility issue (RESOLVED)
|
||||
|
||||
set -e
|
||||
|
||||
echo "🚀 Publishing all individual components to v0.2.0"
|
||||
echo "This addresses the lucide-leptos compatibility issue"
|
||||
echo "This addresses the lucide-leptos compatibility issue (RESOLVED)"
|
||||
echo ""
|
||||
|
||||
# List of all component packages
|
||||
@@ -120,4 +120,4 @@ echo "1. Update main package to use v0.2.0 dependencies"
|
||||
echo "2. Test compilation: cargo check --workspace"
|
||||
echo "3. Publish main package v0.2.1"
|
||||
echo ""
|
||||
echo "✅ lucide-leptos compatibility issue resolved!"
|
||||
echo "✅ lucide-leptos compatibility issue resolved with inline SVG!"
|
||||
|
||||
Reference in New Issue
Block a user