chore: rename tahuantinsuyu → cosmobiologia

Rename clean del proyecto astrológico antes de empezar el módulo
web (fase 2 = server axum, fase 3 = cliente WASM). Hacerlo ahora
ahorra refactor de URLs, package.json, paths de assets HTML y
deploy configs que aparecerían con el nombre en cuanto exista el
server.

Mecánica:
- `git mv` de los 10 crates de módulo + 2 apps:
  * `crates/modules/tahuantinsuyu/` → `cosmobiologia/`
  * `crates/modules/tahuantinsuyu/tahuantinsuyu-*` →
    `cosmobiologia/cosmobiologia-*`
  * `crates/apps/tahuantinsuyu` y `tahuantinsuyu-cli` análogos.
- Sed sobre todos los `.rs` y `.toml`: `tahuantinsuyu` →
  `cosmobiologia` (cubre crate names, deps paths, use
  statements, ProjectDirs literals, binary names).
- Workspace `Cargo.toml`: members con paths nuevos.
- Memoria del proyecto (`~/.claude/.../memory/project_*.md`)
  actualizada.

Cero leftovers: `grep -rn tahuantinsuyu --include="*.rs"
--include="*.toml" crates/` devuelve vacío.

DB & XDG: clean slate. La nueva app arranca con DB vacía en
`$XDG_DATA_HOME/cosmobiologia/charts.db`. Si tenías cartas
guardadas, viven todavía en `~/.local/share/tahuantinsuyu/` —
las podés migrar manualmente con un `cp`.

IDs UI inalterados: el prefijo `tts-` de gpui ElementIds queda
igual (cosmético, no afecta funcionalidad). Cambiarlo a `cb-`
ahora sería 3-4 líneas más de sed pero ningún beneficio
operativo.

Tests: 20 verdes (10 shell + 10 render math). Compila full:
`cargo check -p cosmobiologia` OK.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
sergio
2026-05-19 00:45:48 +00:00
parent 9084cf4b79
commit 06a1ca11ce
34 changed files with 325 additions and 315 deletions
@@ -0,0 +1,15 @@
[package]
name = "cosmobiologia-canvas"
version = { workspace = true }
edition = { workspace = true }
license = { workspace = true }
description = "Tahuantinsuyu — widget GPUI del canvas astrológico. Capas modulares, jog-dial perimetral, estado unificado."
[dependencies]
cosmobiologia-engine = { path = "../cosmobiologia-engine" }
cosmobiologia-model = { path = "../cosmobiologia-model" }
cosmobiologia-modules = { path = "../cosmobiologia-modules" }
cosmobiologia-render = { path = "../cosmobiologia-render" }
cosmobiologia-theme = { path = "../cosmobiologia-theme" }
yahweh-theme = { workspace = true }
gpui = { workspace = true }
@@ -1,4 +1,4 @@
//! `tahuantinsuyu-canvas` — el widget GPUI del lienzo astrológico.
//! `cosmobiologia-canvas` — el widget GPUI del lienzo astrológico.
//!
//! Modela el cielo como un lienzo de **geometría reactiva**: un estado
//! unificado [`CanvasState`] guarda offsets de rotación, flags de
@@ -40,9 +40,9 @@ use gpui::{
Window, canvas, div, hsla, point, prelude::*, px,
};
use tahuantinsuyu_engine::{Geometry, Layer, LayerKind, OUTER_RING_MODULES, RenderModel};
use tahuantinsuyu_model::{ChartId, ContactId, GroupId};
use tahuantinsuyu_theme::{AspectKind as TAspectKind, AstroPalette, Element, Planet};
use cosmobiologia_engine::{Geometry, Layer, LayerKind, OUTER_RING_MODULES, RenderModel};
use cosmobiologia_model::{ChartId, ContactId, GroupId};
use cosmobiologia_theme::{AspectKind as TAspectKind, AstroPalette, Element, Planet};
use yahweh_theme::Theme;
// =====================================================================
@@ -1808,11 +1808,11 @@ fn format_offset(minutes: i64) -> String {
// Painting
// =====================================================================
// `Radii` + helpers migraron a `tahuantinsuyu-render` (crate
// `Radii` + helpers migraron a `cosmobiologia-render` (crate
// agnóstico de surface, compila a WASM y nativo). Re-export para
// que el código del canvas siga refiriendo `Radii` sin cambiar
// imports en cada call site.
use tahuantinsuyu_render::Radii;
use cosmobiologia_render::Radii;
#[allow(clippy::too_many_arguments)]
// `hover_focus`: symbol del planeta hovereado en este frame (si lo
@@ -2482,8 +2482,8 @@ fn dist_point_segment(px: f32, py: f32, ax: f32, ay: f32, bx: f32, by: f32) -> f
(dx2 * dx2 + dy2 * dy2).sqrt()
}
// `polar_to_screen` se importa desde `tahuantinsuyu-render`.
use tahuantinsuyu_render::polar_to_screen;
// `polar_to_screen` se importa desde `cosmobiologia-render`.
use cosmobiologia_render::polar_to_screen;
fn centered_glyph(
x: f32,
@@ -2558,14 +2558,14 @@ fn body_disk_base(module_id: &str, kind: LayerKind, view_scale: f32) -> f32 {
base * view_scale
}
// `spread_angles` y `find_clusters` migraron a `tahuantinsuyu-render`.
use tahuantinsuyu_render::{find_clusters, spread_angles};
// `spread_angles` y `find_clusters` migraron a `cosmobiologia-render`.
use cosmobiologia_render::{find_clusters, spread_angles};
// `format_coord_compact` migró a `tahuantinsuyu-render`.
use tahuantinsuyu_render::format_coord_compact;
// `format_coord_compact` migró a `cosmobiologia-render`.
use cosmobiologia_render::format_coord_compact;
// Los tests de `spread_angles`, `find_clusters` y
// `format_coord_compact` viven ahora en `tahuantinsuyu-render::math`
// `format_coord_compact` viven ahora en `cosmobiologia-render::math`
// junto a sus implementaciones.
/// Pill pequeña con un coord ("14°♈") junto al glyph de un planeta
@@ -1,5 +1,5 @@
[package]
name = "tahuantinsuyu-card"
name = "cosmobiologia-card"
version = { workspace = true }
edition = { workspace = true }
license = { workspace = true }
@@ -8,8 +8,8 @@ description = "Tahuantinsuyu — Tarjeta de Presentación brahman + spawn del si
[dependencies]
brahman-card = { path = "../../../core/brahman-card" }
brahman-sidecar = { path = "../../../shared/brahman-sidecar" }
tahuantinsuyu-engine = { path = "../tahuantinsuyu-engine" }
tahuantinsuyu-model = { path = "../tahuantinsuyu-model" }
cosmobiologia-engine = { path = "../cosmobiologia-engine" }
cosmobiologia-model = { path = "../cosmobiologia-model" }
ulid = { workspace = true }
serde = { workspace = true }
postcard = { workspace = true }
@@ -1,4 +1,4 @@
//! `tahuantinsuyu-card` — Tarjeta de Presentación + sidecar de la app.
//! `cosmobiologia-card` — Tarjeta de Presentación + sidecar de la app.
//!
//! Cualquier binario que levante Tahuantinsuyu llama [`spawn_sidecar`]
//! antes de abrir la ventana GPUI. La lógica de thread / tokio /
@@ -19,7 +19,7 @@ use brahman_card::{
use ulid::Ulid;
/// Label canónico — coincide con el binario y aparece en `ListEntes`.
pub const LABEL: &str = "brahman.tahuantinsuyu";
pub const LABEL: &str = "brahman.cosmobiologia";
/// Spawn fire-and-forget. Si el Init no está corriendo, el sidecar
/// loggea y termina; la app sigue ejecutándose standalone.
@@ -56,7 +56,7 @@ pub fn build_card() -> Card {
flow: Flows {
// Recibe peticiones de cómputo (carta natal, transit, etc.)
// serializadas como JSON. La forma exacta la define
// `tahuantinsuyu-engine`.
// `cosmobiologia-engine`.
input: vec![Flow {
name: "chart-request".into(),
ty: TypeRef::Primitive {
@@ -24,17 +24,17 @@
use std::path::{Path, PathBuf};
use serde::{Deserialize, Serialize};
use tahuantinsuyu_engine::{compose_with_options, NatalOptions, RenderModel};
use tahuantinsuyu_model::{Chart, ChartId, ChartKind, ContactId, StoredBirthData, StoredChartConfig};
use cosmobiologia_engine::{compose_with_options, NatalOptions, RenderModel};
use cosmobiologia_model::{Chart, ChartId, ChartKind, ContactId, StoredBirthData, StoredChartConfig};
use thiserror::Error;
use tokio::io::{AsyncReadExt, AsyncWriteExt};
use tokio::net::{UnixListener, UnixStream};
use tracing::{debug, error, info, warn};
/// Path canónico del service socket. Usa `XDG_RUNTIME_DIR` si está
/// (por usuario, no persistente), sino cae a `/tmp/tahuantinsuyu.sock`.
/// (por usuario, no persistente), sino cae a `/tmp/cosmobiologia.sock`.
pub fn default_service_socket() -> PathBuf {
if let Some(rt) = directories::ProjectDirs::from("net", "gioser", "tahuantinsuyu") {
if let Some(rt) = directories::ProjectDirs::from("net", "gioser", "cosmobiologia") {
// ProjectDirs no expone runtime_dir directo en todas las
// plataformas — usamos cache_dir como fallback estable.
let mut p = rt.cache_dir().to_path_buf();
@@ -42,7 +42,7 @@ pub fn default_service_socket() -> PathBuf {
p.push("service.sock");
return p;
}
PathBuf::from("/tmp/tahuantinsuyu.sock")
PathBuf::from("/tmp/cosmobiologia.sock")
}
// =====================================================================
@@ -107,7 +107,7 @@ pub async fn serve(socket_path: PathBuf) -> Result<(), ServiceError> {
let _ = std::fs::remove_file(&socket_path);
let listener = UnixListener::bind(&socket_path)?;
info!(socket = %socket_path.display(), "tahuantinsuyu service socket arriba");
info!(socket = %socket_path.display(), "cosmobiologia service socket arriba");
loop {
let (stream, _addr) = listener.accept().await?;
@@ -221,7 +221,7 @@ async fn read_frame<T: for<'de> Deserialize<'de>>(
/// thread termina. El binario GUI sigue funcionando standalone.
pub fn spawn_service_thread(socket_path: PathBuf) {
std::thread::Builder::new()
.name("tahuantinsuyu-service".into())
.name("cosmobiologia-service".into())
.spawn(move || {
let rt = match tokio::runtime::Builder::new_current_thread()
.enable_io()
@@ -1,13 +1,13 @@
[package]
name = "tahuantinsuyu-engine"
name = "cosmobiologia-engine"
version = { workspace = true }
edition = { workspace = true }
license = { workspace = true }
description = "Tahuantinsuyu — bridge entre el modelo agnóstico y eternal-astrology. Produce RenderModel agnóstico para el canvas."
[dependencies]
tahuantinsuyu-model = { path = "../tahuantinsuyu-model" }
tahuantinsuyu-render = { path = "../tahuantinsuyu-render" }
cosmobiologia-model = { path = "../cosmobiologia-model" }
cosmobiologia-render = { path = "../cosmobiologia-render" }
serde = { workspace = true }
thiserror = { workspace = true }
@@ -1,4 +1,4 @@
//! Bridge real: `tahuantinsuyu_model::Chart` → eternal_astrology → [`RenderModel`].
//! Bridge real: `cosmobiologia_model::Chart` → eternal_astrology → [`RenderModel`].
//!
//! La sesión de efemérides VSOP2013 es **compartida globalmente** vía
//! `OnceLock` — abrirla cuesta unos cuantos ms (carga de las series en
@@ -17,7 +17,7 @@ use eternal_astrology::{
};
use eternal_sky::{Ayanamsha, Body, EphemerisSession, Instant as ESInstant, Observer, SessionConfig};
use tahuantinsuyu_model::{Chart, HouseSystem, StoredChartConfig, Zodiac};
use cosmobiologia_model::{Chart, HouseSystem, StoredChartConfig, Zodiac};
use crate::dignity::essential_dignity;
use crate::{
@@ -1031,7 +1031,7 @@ pub fn compute_planetary_return_chart(
body_str: &str,
target_age_years: f64,
shift_days: i64,
) -> Result<(tahuantinsuyu_model::StoredBirthData, String), EngineError> {
) -> Result<(cosmobiologia_model::StoredBirthData, String), EngineError> {
let (birth_e, config_e, _observer) = build_eternal_inputs(chart, 0)?;
let session = session()?;
let natal = NatalChart::compute(&birth_e, &config_e, session)
@@ -1068,7 +1068,7 @@ pub fn compute_planetary_return_chart(
let (year, month, day, hour, minute, second) = parse_iso8601_components(&iso)
.ok_or_else(|| EngineError::Eternal(format!("iso8601 inválido: {}", iso)))?;
let stored = tahuantinsuyu_model::StoredBirthData {
let stored = cosmobiologia_model::StoredBirthData {
year,
month,
day,
@@ -1099,13 +1099,13 @@ pub fn compute_planetary_return_chart(
/// en este instante anclado al lugar de nacimiento del sujeto.
pub fn compute_transit_chart(
chart: &Chart,
) -> Result<(tahuantinsuyu_model::StoredBirthData, String), EngineError> {
) -> Result<(cosmobiologia_model::StoredBirthData, String), EngineError> {
let now_iso = ESInstant::now().utc().to_iso8601();
let (year, month, day, hour, minute, second) =
parse_iso8601_components(&now_iso).ok_or_else(|| {
EngineError::Eternal(format!("iso8601 inválido para now(): {}", now_iso))
})?;
let stored = tahuantinsuyu_model::StoredBirthData {
let stored = cosmobiologia_model::StoredBirthData {
year,
month,
day,
@@ -1133,7 +1133,7 @@ pub fn compute_transit_chart(
pub fn compute_progression_chart(
chart: &Chart,
target_age_years: f64,
) -> Result<(tahuantinsuyu_model::StoredBirthData, String), EngineError> {
) -> Result<(cosmobiologia_model::StoredBirthData, String), EngineError> {
let (birth_e, _config_e, _observer) = build_eternal_inputs(chart, 0)?;
let advance_seconds = target_age_years * 86400.0; // 1 día / año
let advanced_utc = birth_e.instant.utc().add_seconds(advance_seconds);
@@ -1142,7 +1142,7 @@ pub fn compute_progression_chart(
parse_iso8601_components(&iso).ok_or_else(|| {
EngineError::Eternal(format!("iso8601 inválido: {}", iso))
})?;
let stored = tahuantinsuyu_model::StoredBirthData {
let stored = cosmobiologia_model::StoredBirthData {
year,
month,
day,
@@ -1,4 +1,4 @@
//! `tahuantinsuyu-engine` — bridge entre el modelo agnóstico y
//! `cosmobiologia-engine` — bridge entre el modelo agnóstico y
//! `eternal-astrology`.
//!
//! Recibe un `Chart` del modelo + un `ChartKind` y devuelve un
@@ -27,15 +27,15 @@
use thiserror::Error;
pub use tahuantinsuyu_model::{Chart, ChartId, ChartKind};
pub use cosmobiologia_model::{Chart, ChartId, ChartKind};
// Los tipos del RenderModel viven en `tahuantinsuyu-render` (crate
// Los tipos del RenderModel viven en `cosmobiologia-render` (crate
// agnóstico de surface — compila a WASM, lo consumen tanto el canvas
// gpui como el cliente web). El engine los reexporta para mantener
// compatibilidad con todos los call sites históricos
// (`tahuantinsuyu_engine::Layer`, etc.) sin tener que cambiar
// (`cosmobiologia_engine::Layer`, etc.) sin tener que cambiar
// imports en el shell, canvas, modules, tree, panel...
pub use tahuantinsuyu_render::{
pub use cosmobiologia_render::{
AspectSummary, Geometry, Glyph, Layer, LayerKind, LineSeg, OverlayMeta, PointMark,
RenderModel, UranianGroup, OUTER_RING_MODULES,
};
@@ -62,7 +62,7 @@ pub enum EngineError {
#[error("bridge a eternal-astrology no disponible (recompilá con feature `eternal-bridge`)")]
BridgeDisabled,
#[error("model: {0}")]
Model(#[from] tahuantinsuyu_model::ModelError),
Model(#[from] cosmobiologia_model::ModelError),
#[error("eternal: {0}")]
Eternal(String),
#[error("kind {0:?} todavía no implementado")]
@@ -78,7 +78,7 @@ pub enum EngineError {
/// son **overlays adicionales**.
///
/// Cada variante mapea 1-a-1 con un Module declarado en
/// `tahuantinsuyu-modules` por id string. Esto deja la engine como
/// `cosmobiologia-modules` por id string. Esto deja la engine como
/// dueña única del cómputo (no depende del trait Module — los módulos
/// son sólo metadata + UI controls).
#[derive(Debug, Clone)]
@@ -262,7 +262,7 @@ pub fn compute_planetary_return_chart(
body: &str,
target_age_years: f64,
shift_days: i64,
) -> Result<(tahuantinsuyu_model::StoredBirthData, String), EngineError> {
) -> Result<(cosmobiologia_model::StoredBirthData, String), EngineError> {
bridge::compute_planetary_return_chart(chart, body, target_age_years, shift_days)
}
@@ -272,7 +272,7 @@ pub fn compute_planetary_return_chart(
#[cfg(feature = "eternal-bridge")]
pub fn compute_transit_chart(
chart: &Chart,
) -> Result<(tahuantinsuyu_model::StoredBirthData, String), EngineError> {
) -> Result<(cosmobiologia_model::StoredBirthData, String), EngineError> {
bridge::compute_transit_chart(chart)
}
@@ -282,7 +282,7 @@ pub fn compute_transit_chart(
pub fn compute_progression_chart(
chart: &Chart,
target_age_years: f64,
) -> Result<(tahuantinsuyu_model::StoredBirthData, String), EngineError> {
) -> Result<(cosmobiologia_model::StoredBirthData, String), EngineError> {
bridge::compute_progression_chart(chart, target_age_years)
}
@@ -361,7 +361,7 @@ const ZODIAC_GLYPHS: [&str; 12] = [
#[cfg(test)]
mod tests {
use super::*;
use tahuantinsuyu_model::{
use cosmobiologia_model::{
Chart, ChartKind, ContactId, StoredBirthData, StoredChartConfig,
};
@@ -17,7 +17,7 @@ use std::hash::{Hash, Hasher};
use std::sync::{Arc, Mutex, OnceLock};
use eternal_astrology::NatalChart;
use tahuantinsuyu_model::{StoredBirthData, StoredChartConfig};
use cosmobiologia_model::{StoredBirthData, StoredChartConfig};
const CAPACITY: usize = 8;
@@ -17,7 +17,7 @@ use crate::{Geometry, LayerKind, RenderModel};
const VIEWBOX: f64 = 800.0;
const MARGIN: f64 = 40.0;
/// Radios normalizados — espejan los de `tahuantinsuyu-canvas`.
/// Radios normalizados — espejan los de `cosmobiologia-canvas`.
const R_SIGN_OUTER: f64 = 1.00;
const R_SIGN_INNER: f64 = 0.88;
const R_TRANSITS: f64 = 0.82;
@@ -277,11 +277,11 @@ fn escape_xml(s: &str) -> String {
mod tests {
use super::*;
use crate::{compute_mock, ChartKind};
use tahuantinsuyu_model::{Chart, ContactId, StoredBirthData, StoredChartConfig};
use cosmobiologia_model::{Chart, ContactId, StoredBirthData, StoredChartConfig};
fn sample_chart() -> Chart {
Chart {
id: tahuantinsuyu_model::ChartId::new(),
id: cosmobiologia_model::ChartId::new(),
contact_id: ContactId::new(),
kind: ChartKind::Natal,
label: "Test".into(),
@@ -1,5 +1,5 @@
[package]
name = "tahuantinsuyu-model"
name = "cosmobiologia-model"
version = { workspace = true }
edition = { workspace = true }
license = { workspace = true }
@@ -1,4 +1,4 @@
//! `tahuantinsuyu-model` — tipos agnósticos del estudio astrológico.
//! `cosmobiologia-model` — tipos agnósticos del estudio astrológico.
//!
//! Esta es la capa de **datos puros**: no conoce GPUI, ni rusqlite, ni
//! `eternal-astrology`. Solo tipos `serde`-able que viajan entre la
@@ -1,12 +1,12 @@
[package]
name = "tahuantinsuyu-modules"
name = "cosmobiologia-modules"
version = { workspace = true }
edition = { workspace = true }
license = { workspace = true }
description = "Tahuantinsuyu — registry de módulos astrológicos (Natal, Transit, Synastry, Uranian, …)."
[dependencies]
tahuantinsuyu-model = { path = "../tahuantinsuyu-model" }
tahuantinsuyu-engine = { path = "../tahuantinsuyu-engine" }
cosmobiologia-model = { path = "../cosmobiologia-model" }
cosmobiologia-engine = { path = "../cosmobiologia-engine" }
serde = { workspace = true }
serde_json = { workspace = true }
@@ -1,4 +1,4 @@
//! `tahuantinsuyu-modules` — registry de módulos astrológicos.
//! `cosmobiologia-modules` — registry de módulos astrológicos.
//!
//! Cada tipo de astrología (natal, tránsito, progresión, sinastría,
//! Uraniano, …) es un **módulo** que declara:
@@ -22,8 +22,8 @@
use serde::{Deserialize, Serialize};
use tahuantinsuyu_engine::Layer;
use tahuantinsuyu_model::{Chart, ChartKind};
use cosmobiologia_engine::Layer;
use cosmobiologia_model::{Chart, ChartKind};
// =====================================================================
// Trait Module
@@ -185,7 +185,7 @@ impl Registry {
pub mod natal {
use super::*;
use tahuantinsuyu_engine::compute_mock;
use cosmobiologia_engine::compute_mock;
pub struct NatalModule;
@@ -1,14 +1,14 @@
[package]
name = "tahuantinsuyu-panel"
name = "cosmobiologia-panel"
version = { workspace = true }
edition = { workspace = true }
license = { workspace = true }
description = "Tahuantinsuyu — panel de control inferior. Toggles, sliders y selectores por módulo de astrología."
[dependencies]
tahuantinsuyu-model = { path = "../tahuantinsuyu-model" }
tahuantinsuyu-modules = { path = "../tahuantinsuyu-modules" }
tahuantinsuyu-theme = { path = "../tahuantinsuyu-theme" }
cosmobiologia-model = { path = "../cosmobiologia-model" }
cosmobiologia-modules = { path = "../cosmobiologia-modules" }
cosmobiologia-theme = { path = "../cosmobiologia-theme" }
yahweh-theme = { workspace = true }
gpui = { workspace = true }
serde_json = { workspace = true }
@@ -1,7 +1,7 @@
//! `tahuantinsuyu-panel` — control panel inferior de la app.
//! `cosmobiologia-panel` — control panel inferior de la app.
//!
//! Lee los módulos disponibles para la carta activa (vía
//! [`tahuantinsuyu_modules::Registry::for_kind`]) y pinta sus
//! [`cosmobiologia_modules::Registry::for_kind`]) y pinta sus
//! [`Control`]s como toggles / sliders / selects. Cada cambio emite
//! [`PanelEvent`] que la app traduce a mutaciones de visibilidad sobre
//! el canvas y al `module_configs` del shell.
@@ -29,8 +29,8 @@ use gpui::{
Window, canvas, div, prelude::*, px,
};
use tahuantinsuyu_model::ChartKind;
use tahuantinsuyu_modules::{Control, Registry, SelectOption};
use cosmobiologia_model::ChartKind;
use cosmobiologia_modules::{Control, Registry, SelectOption};
use yahweh_theme::Theme;
// =====================================================================
@@ -1,12 +1,12 @@
[package]
name = "tahuantinsuyu-render"
name = "cosmobiologia-render"
version = { workspace = true }
edition = { workspace = true }
license = { workspace = true }
description = "Tahuantinsuyu — modelo y matemática de render agnósticos de surface. Compila a WASM y a nativo; el canvas gpui y el cliente web lo consumen para emitir las primitivas comunes de la rueda."
[dependencies]
tahuantinsuyu-model = { path = "../tahuantinsuyu-model" }
cosmobiologia-model = { path = "../cosmobiologia-model" }
serde = { workspace = true }
[lib]
@@ -1,4 +1,4 @@
//! `tahuantinsuyu-render` — modelo y matemática de render
//! `cosmobiologia-render` — modelo y matemática de render
//! **agnósticos de surface**. Lo consumen tanto el canvas gpui
//! (nativo, render Vulkan/Metal) como el cliente web (WASM, render
//! SVG / Canvas2D). Cualquier mejora del layout / spread / cluster /
@@ -6,7 +6,7 @@
//!
//! ## Por qué un crate aparte
//!
//! `tahuantinsuyu-engine` arrastra `eternal-sky` (VSOP2013 + I/O de
//! `cosmobiologia-engine` arrastra `eternal-sky` (VSOP2013 + I/O de
//! tablas) que **no compila a WASM** sin empaquetar 30+ MB de
//! efemérides. Los tipos del `RenderModel` en sí son serde puro y
//! sí compilan a WASM — extraerlos a este crate libera al cliente
@@ -28,7 +28,7 @@
use serde::{Deserialize, Serialize};
pub use tahuantinsuyu_model::{Chart, ChartId, ChartKind};
pub use cosmobiologia_model::{Chart, ChartId, ChartKind};
pub mod math;
@@ -1,12 +1,12 @@
[package]
name = "tahuantinsuyu-store"
name = "cosmobiologia-store"
version = { workspace = true }
edition = { workspace = true }
license = { workspace = true }
description = "Tahuantinsuyu — persistencia SQLite de groups / contacts / charts / module_state."
[dependencies]
tahuantinsuyu-model = { path = "../tahuantinsuyu-model" }
cosmobiologia-model = { path = "../cosmobiologia-model" }
rusqlite = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
@@ -1,4 +1,4 @@
//! `tahuantinsuyu-store` — persistencia SQLite del estudio astrológico.
//! `cosmobiologia-store` — persistencia SQLite del estudio astrológico.
//!
//! Una sola conexión `rusqlite` envuelta en `Arc<Mutex>` para que la app
//! GPUI la comparta entre threads sin pelearse con el ownership. La
@@ -7,7 +7,7 @@
//!
//! Patrón inspirado en `yahweh_provider_sqlite::SqliteDataProvider` pero
//! con dominio propio (no extiende el `DataProvider` agnóstico — esa
//! integración viene en `tahuantinsuyu-tree` que envuelve este store
//! integración viene en `cosmobiologia-tree` que envuelve este store
//! detrás del trait de yahweh).
#![forbid(unsafe_code)]
@@ -20,7 +20,7 @@ use std::time::{SystemTime, UNIX_EPOCH};
use rusqlite::{Connection, OptionalExtension, params};
use thiserror::Error;
use tahuantinsuyu_model::{
use cosmobiologia_model::{
Chart, ChartId, ChartKind, Contact, ContactId, Group, GroupId, ModuleState, StoredBirthData,
StoredChartConfig,
};
@@ -38,7 +38,7 @@ pub enum StoreError {
#[error("ulid decode: {0}")]
UlidDecode(#[from] ulid::DecodeError),
#[error("model invariant: {0}")]
Model(#[from] tahuantinsuyu_model::ModelError),
Model(#[from] cosmobiologia_model::ModelError),
#[error("not found: {0}")]
NotFound(String),
}
@@ -622,7 +622,7 @@ fn now_ms() -> i64 {
#[cfg(test)]
mod tests {
use super::*;
use tahuantinsuyu_model::{ModuleState, StoredBirthData, StoredChartConfig};
use cosmobiologia_model::{ModuleState, StoredBirthData, StoredChartConfig};
#[test]
fn open_and_migrate() {
@@ -1,5 +1,5 @@
[package]
name = "tahuantinsuyu-theme"
name = "cosmobiologia-theme"
version = { workspace = true }
edition = { workspace = true }
license = { workspace = true }
@@ -1,4 +1,4 @@
//! `tahuantinsuyu-theme` — paleta simbólica + presets místicos.
//! `cosmobiologia-theme` — paleta simbólica + presets místicos.
//!
//! Una capa fina sobre [`yahweh_theme::Theme`]: el theme base aporta los
//! slots de panel/foreground/accent; nosotros agregamos paletas
@@ -1,13 +1,13 @@
[package]
name = "tahuantinsuyu-tree"
name = "cosmobiologia-tree"
version = { workspace = true }
edition = { workspace = true }
license = { workspace = true }
description = "Tahuantinsuyu — explorador izquierdo (Groups/Contacts/Charts) sobre yahweh-widget-tree."
[dependencies]
tahuantinsuyu-model = { path = "../tahuantinsuyu-model" }
tahuantinsuyu-store = { path = "../tahuantinsuyu-store" }
cosmobiologia-model = { path = "../cosmobiologia-model" }
cosmobiologia-store = { path = "../cosmobiologia-store" }
yahweh-theme = { workspace = true }
yahweh-widget-tree = { workspace = true }
yahweh-widget-text-input = { path = "../../ui_engine/widgets/text_input" }
@@ -1,4 +1,4 @@
//! `tahuantinsuyu-tree` — explorador jerárquico Groups → Contacts → Charts.
//! `cosmobiologia-tree` — explorador jerárquico Groups → Contacts → Charts.
//!
//! Envuelve [`yahweh_widget_tree::TreeView`] con la lógica de dominio
//! de Tahuantinsuyu. Los `RowId` codifican el tipo con prefijo:
@@ -29,11 +29,11 @@ use gpui::{
SharedString, Window, div, hsla, prelude::*, px,
};
use tahuantinsuyu_model::{
use cosmobiologia_model::{
ChartId, ChartKind, ContactId, FreeChartId, GroupId, StoredBirthData, StoredChartConfig,
TimeCertainty, TreeSelection,
};
use tahuantinsuyu_store::Store;
use cosmobiologia_store::Store;
use yahweh_theme::Theme;
use yahweh_widget_text_input::{TextInput, TextInputEvent};
use yahweh_widget_tree::{RowId, RowKind, TreeEvent as InnerTreeEvent, TreeRow, TreeView};
@@ -270,7 +270,7 @@ pub struct CityPreset {
/// Atlas hardcoded — 90 ciudades canónicas que cubren la mayoría de
/// casos de uso. El usuario puede sobrescribirlas pasando un atlas
/// custom vía [`TahuantinsuyuTree::set_city_atlas`] (típicamente
/// cargado desde `$XDG_DATA_HOME/tahuantinsuyu/atlas.tsv`).
/// cargado desde `$XDG_DATA_HOME/cosmobiologia/atlas.tsv`).
pub fn default_city_presets() -> Vec<CityPreset> {
vec![
// Latinoamérica
@@ -421,7 +421,7 @@ impl TahuantinsuyuTree {
pub fn new(store: Store, cx: &mut Context<'_, Self>) -> Self {
cx.observe_global::<Theme>(|_, cx| cx.notify()).detach();
let inner = cx.new(|cx| TreeView::new("tahuantinsuyu-tree", cx));
let inner = cx.new(|cx| TreeView::new("cosmobiologia-tree", cx));
cx.subscribe(&inner, |this: &mut Self, _, ev, cx| {
this.on_inner(ev, cx);
})
@@ -1507,7 +1507,7 @@ fn parse_field<T: std::str::FromStr>(s: &str, field: &str) -> Result<T, String>
// Lookups auxiliares (DFS por la jerarquía)
// =====================================================================
fn find_group_name(roots: &[tahuantinsuyu_model::Group], store: &Store, id: GroupId) -> Option<String> {
fn find_group_name(roots: &[cosmobiologia_model::Group], store: &Store, id: GroupId) -> Option<String> {
for g in roots {
if g.id == id {
return Some(g.name.clone());
@@ -1522,7 +1522,7 @@ fn find_group_name(roots: &[tahuantinsuyu_model::Group], store: &Store, id: Grou
}
fn find_contact_name(
in_group: &[tahuantinsuyu_model::Contact],
in_group: &[cosmobiologia_model::Contact],
store: &Store,
id: ContactId,
) -> Option<String> {
@@ -1541,7 +1541,7 @@ fn find_contact_name(
}
fn find_contact_in_groups(
groups: &[tahuantinsuyu_model::Group],
groups: &[cosmobiologia_model::Group],
store: &Store,
id: ContactId,
) -> Option<String> {
@@ -1602,7 +1602,7 @@ impl Render for TahuantinsuyuTree {
.child(self.search_input.clone());
let mut root = div()
.id("tahuantinsuyu-tree-root")
.id("cosmobiologia-tree-root")
.size_full()
.relative()
.bg(theme.bg_panel.clone())
@@ -1,15 +0,0 @@
[package]
name = "tahuantinsuyu-canvas"
version = { workspace = true }
edition = { workspace = true }
license = { workspace = true }
description = "Tahuantinsuyu — widget GPUI del canvas astrológico. Capas modulares, jog-dial perimetral, estado unificado."
[dependencies]
tahuantinsuyu-engine = { path = "../tahuantinsuyu-engine" }
tahuantinsuyu-model = { path = "../tahuantinsuyu-model" }
tahuantinsuyu-modules = { path = "../tahuantinsuyu-modules" }
tahuantinsuyu-render = { path = "../tahuantinsuyu-render" }
tahuantinsuyu-theme = { path = "../tahuantinsuyu-theme" }
yahweh-theme = { workspace = true }
gpui = { workspace = true }