[package]
name = "rustelo_core_lib"
version = "0.1.0"
edition = "2021"
authors = ["Rustelo Contributors"]
license = "MIT"
description = "Core runtime types and utilities for Rustelo web application template"
documentation = "https://docs.rs/core"
repository = "https://github.com/yourusername/rustelo"
homepage = "https://jesusperez.pro"
readme = "../../README.md"
keywords = [
    "rust",
    "web",
    "leptos",
    "core",
    "types",
]
categories = ["web-programming"]

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

[dependencies]
rustelo_core_types = { workspace = true }
rustelo_utils = { workspace = true }
rustelo_language = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
# Runtime NCL: the consumer's routes are authored in NCL like everything else in this stack, and
# load_config dispatches by extension. Not a new dependency for the runtime — the htmx shell
# already loads routes.ncl and footer.ncl through it on every start.
rustelo_config = { workspace = true }
toml = { workspace = true }
fluent = { workspace = true }
fluent-bundle = { workspace = true }
fluent-syntax = { workspace = true }
unic-langid = { workspace = true }
fluent-templates = { workspace = true, optional = true, features = ["tera"] }
uuid = { workspace = true }
chrono = { workspace = true }
thiserror = { workspace = true }
once_cell = { workspace = true }
tracing = { workspace = true }
paste = { workspace = true }
cfg-if = { workspace = true }
anyhow = { workspace = true }
regex = { workspace = true }
pulldown-cmark = { workspace = true }
serde_yaml = { workspace = true }
unicode-normalization = { workspace = true }

# Leptos SSR/hydration stack — optional; enabled by leptos-hydration feature.
# Not needed for htmx-ssr server builds.
leptos      = { workspace = true, optional = true }
leptos_router = { workspace = true, optional = true }
leptos_meta = { workspace = true, optional = true }

[target.'cfg(target_arch = "wasm32")'.dependencies]
reqwasm = { workspace = true }
wasm-bindgen = { workspace = true }
wasm-bindgen-futures = { workspace = true }
web-sys = { workspace = true }
gloo-timers = { workspace = true }
gloo-net = { workspace = true }
serde-wasm-bindgen = { workspace = true }
js-sys = { workspace = true }

# Authentication & Authorization (shared types)
uuid = { workspace = true }
chrono = { workspace = true }
thiserror = { workspace = true }
once_cell =  { workspace = true }
tracing =  { workspace = true }
paste =  { workspace = true }
cfg-if =  { workspace = true }
# notify declared per-platform below
anyhow =  { workspace = true }
regex =  { workspace = true }

# Markdown processing
pulldown-cmark = { workspace = true }
serde_yaml = { workspace = true }
unicode-normalization = { workspace = true }

[target.'cfg(target_os = "macos")'.dependencies]
notify = { workspace = true, features = ["macos_fsevent"], optional = true }

[target.'cfg(not(target_os = "macos"))'.dependencies]
notify = { workspace = true, optional = true }

[build-dependencies]
rustelo_utils = { workspace = true }

[dev-dependencies]
tempfile = { workspace = true }


[features]
default = ["manifest"]
# Leptos SSR/hydration stack: leptos, leptos_router, leptos_meta.
# Disable for htmx-only server builds to avoid compiling the Leptos framework.
leptos-hydration = [
    "dep:leptos",
    "dep:leptos_router",
    "dep:leptos_meta",
]
ssr = []
hot-reload = ["notify"]
cache = []
content-static = ["fluent-templates"]
# PAP-compliant manifest system
manifest = ["rustelo_utils/manifest"]
# Console logging control
console-log = [] # Enable console logging (for development)
console-log-production = [] # Enable console logging in production builds

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

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(has_generated_resources)'] }
