flower_core/lib.rs
1//! flower-core — the frontend-neutral structural editing model for config files.
2//!
3//! Given a config document's bytes and format, it exposes a navigable tree of
4//! [`Row`]s (a projection of fig's `Value`) plus structural navigation and
5//! path-addressed edits routed through fig's lossless editor. It knows nothing
6//! about terminals, GUIs, or the filesystem — a frontend (flower-ratatui,
7//! a future flower-gpui, …) renders [`Model::rows`] and drives the model's
8//! methods; the embedder owns file I/O.
9
10pub mod backend;
11pub mod format;
12pub mod model;
13pub mod schema;
14pub mod tree;
15
16pub use backend::{Backend, BackendError, EditOp, FigBackend};
17pub use format::detect;
18pub use model::{Mode, Model};
19pub use schema::{Constraint, FieldRule, FieldRuleExt, Schema};
20pub use tree::{Row, VKind};
21
22// The generic, prov-agnostic pieces (path matching, field type, controlled
23// vocabulary, presentation hints) live in fig-schema now; re-exported here so
24// existing callers importing them from flower_core keep working.
25pub use fig_schema::{
26 Cardinality, FieldType, Icon, PathPat, Presentation, Seg, SegPat, Term, Tint, Validation,
27};