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
//! Email-template builder primitives — block-based composer
//! similar to a stripped-down Elementor for email. Operator
//! authors templates from a fixed set of email-safe blocks
//! (heading, paragraph, button, image, divider, spacer,
//! two-column, list); the renderer emits 600-px-wide
//! table-based HTML with inline CSS that survives the lowest
//! common denominator email client (Outlook's Word renderer +
//! Gmail's mobile webview).
//!
//! Compose flow picks a template, renders with the recipient's
//! variables substituted, and uses the result as the outbound
//! body — same OutboundPublisher path as a manual compose.
//!
//! Module hierarchy:
//! - [`blocks`] — `EmailBlock` enum + table-based renderer
//! - [`sanitize`] — email-safe HTML sanitiser for rich-text
//! fields (Heading/Paragraph)
//! - [`store`] — per-tenant SQLite store of saved templates
//! - [`asset_store`] — SHA-256 content-addressed blob store
//! for inline images (de-dups + caches forever)
//!
//! Lifted from the agent-creator-microapp's marketing
//! extension; nothing in here is marketing-specific. Any
//! microapp that builds outbound emails (notifications,
//! recibos, onboarding, transactional templates) consumes
//! this module via the `email-template` feature.
// The lifted modules predate the SDK's missing-docs lint;
// every field is self-evident from the block-schema names
// (`Heading.text`, `Image.url`, …). Allow at the module level
// rather than scattering doc comments on enum variants —
// keeps the schema readable.
pub use ;
pub use ;
// Image optimisation lifted to `nexo_media` — re-export under
// the same names so existing callers (admin/template_assets.rs)
// don't need a path change.
pub use ;
pub use email_safe_html;
pub use ;