1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
//! Content blocks and text representation.
//!
//! The content layer represents document content as a tree of semantic blocks.
//! This module provides types for all content blocks defined in the Codex specification.
//!
//! # Content Structure
//!
//! Content files have a root structure with a version and array of blocks:
//!
//! ```rust
//! use cdx_core::content::{Content, Block, Text};
//!
//! let content = Content {
//! version: "0.1".to_string(),
//! blocks: vec![
//! Block::heading(1, vec![Text::plain("Hello World")]),
//! Block::paragraph(vec![Text::plain("This is a paragraph.")]),
//! ],
//! };
//! ```
//!
//! # Block Types
//!
//! - [`Block::Paragraph`] - Standard paragraph
//! - [`Block::Heading`] - Section heading (levels 1-6)
//! - [`Block::List`] - Ordered or unordered list
//! - [`Block::ListItem`] - Item within a list
//! - [`Block::Blockquote`] - Quoted content
//! - [`Block::CodeBlock`] - Source code or preformatted text
//! - [`Block::HorizontalRule`] - Thematic break
//! - [`Block::Image`] - Embedded or referenced image
//! - [`Block::Table`] - Tabular data
//! - [`Block::TableRow`] - Row within a table
//! - [`Block::TableCell`] - Cell within a row
//! - [`Block::Math`] - Mathematical content
//! - [`Block::Break`] - Line break
//!
//! # Text and Marks
//!
//! Text content is represented as [`Text`] nodes with optional [`Mark`]s for formatting:
//!
//! ```rust
//! use cdx_core::content::{Text, Mark};
//!
//! let bold_text = Text {
//! value: "Important".to_string(),
//! marks: vec![Mark::Bold],
//! };
//!
//! let link = Text {
//! value: "Click here".to_string(),
//! marks: vec![Mark::Link {
//! href: "https://example.com".to_string(),
//! title: Some("Example".to_string()),
//! }],
//! };
//! ```
pub use ;
pub use ;
pub use ;