# Empty workspace to make this template standalone
[workspace]

[package]
name = "client-template"
version = "0.1.0"
edition = "2021"
authors = ["Rustelo Contributors"]
license = "MIT OR Apache-2.0"
description = "Client-side template using trait-based dependency injection"
documentation = "https://docs.rs/rustelo"
repository = "https://github.com/rustelo/rustelo"
homepage = "https://rustelo.dev"
readme = "README.md"
keywords = [
    "rust",
    "web",
    "leptos",
    "wasm",
    "template",
]
categories = [
    "web-programming",
    "wasm",
    "template-engine",
]

[package.metadata.docs.rs]
all-features = true
rustdoc-args = [
    "--cfg",
    "docsrs",
]

[lib]
crate-type = [
    "cdylib",
    "rlib",
]

[dependencies]
# Pure trait dependencies from Layer 1
rustelo-routing-traits = { path = "../../traits/routing-traits"}
rustelo-component-traits = { path = "../../traits/component-traits" }
rustelo-core-types = { path = "../../traits/core-types" }

# Core lib template
core-lib-template = { path = "../core-lib-template" }

# Essential Leptos dependencies
leptos = { workspace = true,  features = ["hydrate"] }

leptos_meta = { workspace = true }

# WASM-specific dependencies
wasm-bindgen =  { workspace = true }

wasm-bindgen-futures =  { workspace = true }

js-sys =  { workspace = true }

# HTTP client for WASM
reqwasm = { workspace = true }

# Gloo utilities
gloo-net = { workspace = true }

gloo-timers  = { workspace = true, features = ["futures"] }

# Error handling and panic hook
console_error_panic_hook = { workspace = true }

# Serialization
serde = { workspace = true, features = ["derive"] }

serde_json = { workspace = true }

# Utilities
regex = { workspace = true }
urlencoding = { workspace = true }
tracing = { workspace = true }

# Time handling
chrono = {workspace = true, features = ["serde", "wasm-bindgen"] }

# IDs
uuid = { workspace = true, features = ["v4", "serde", "js"] }

[dependencies.web-sys]
workspace = true,
features = [
    "console",
    "Window",
    "Document",
    "Element",
    "HtmlElement",
    "Event",
    "EventTarget",
    "Location",
    "History",
    "Storage",
    "Request",
    "Response",
    "Headers",
    "RequestInit",
    "RequestMode",
]

[features]
default = ["hydrate"]
hydrate = ["leptos/hydrate"]
ssr = ["leptos/ssr"]
development = []
production = []
