pub(crate) const MERMAID_TITLE: &str = "Mermaid Diagram Studio";
pub(crate) const MERMAID_SUBTITLE: &str = "Eleven native vector Mermaid families with category filters, 2D scroll, source inspector & fullscreen zoom.";
pub(crate) const MERMAID_EXPLORER_TITLE: &str = "Diagram Family Explorer";
pub(crate) const MERMAID_EXPLORER_SUB: &str =
"Filter by category or jump directly to any of the 11 pure-Rust Mermaid diagram families.";
pub(crate) const MERMAID_CANVAS_TITLE: &str = "Interactive Vector Diagram";
pub(crate) const MERMAID_CANVAS_SUB: &str =
"Scroll in 2D inline or launch the edge-to-edge Fullscreen modal for interactive zoom.";
pub(crate) const MERMAID_SOURCE_TITLE: &str = "Mermaid Source Preview";
pub(crate) const MERMAID_SOURCE_SUB: &str =
"Live syntax source rendered alongside the vector canvas with one-click clipboard copy.";
pub(crate) const MERMAID_TIPS_TITLE: &str = "Vector Renderer Telemetry";
pub(crate) const MERMAID_TIPS_SUB: &str =
"Intrinsic diagram dimensions, parser family, and clipboard status.";
pub(crate) const MERMAID_CAT_ALL: &str = "All (11)";
pub(crate) const MERMAID_CAT_FLOW: &str = "Flow & State";
pub(crate) const MERMAID_CAT_MODEL: &str = "Modeling";
pub(crate) const MERMAID_CAT_PLAN: &str = "Data & Planning";
pub(crate) const MERMAID_BTN_PREV: &str = "Previous";
pub(crate) const MERMAID_BTN_NEXT: &str = "Next Family";
pub(crate) const MERMAID_COPY_READY: &str = "Click Copy on the diagram or source preview.";
pub(crate) const MERMAID_CODE_LANG: &str = "mermaid";
pub(crate) const MERMAID_INLINE_MAX_HEIGHT: f32 = 520.0;
pub(crate) const MERMAID_SOURCE_MAX_HEIGHT: f32 = 340.0;
pub(crate) const MERMAID_FAMILY_COUNT: usize = 11;
pub(crate) const MERMAID_FAM_FLOWCHART: &str = "Flowchart";
pub(crate) const MERMAID_FAM_SEQUENCE: &str = "Sequence";
pub(crate) const MERMAID_FAM_STATE: &str = "State";
pub(crate) const MERMAID_FAM_CLASS: &str = "Class";
pub(crate) const MERMAID_FAM_ER: &str = "ER";
pub(crate) const MERMAID_FAM_GANTT: &str = "Gantt";
pub(crate) const MERMAID_FAM_PIE: &str = "Pie";
pub(crate) const MERMAID_FAM_TIMELINE: &str = "Timeline";
pub(crate) const MERMAID_FAM_MINDMAP: &str = "Mindmap";
pub(crate) const MERMAID_FAM_XYCHART: &str = "XYChart";
pub(crate) const MERMAID_FAM_GITGRAPH: &str = "GitGraph";
pub(crate) const MERMAID_FAMILY_LABELS: [&str; MERMAID_FAMILY_COUNT] = [
MERMAID_FAM_FLOWCHART,
MERMAID_FAM_SEQUENCE,
MERMAID_FAM_STATE,
MERMAID_FAM_CLASS,
MERMAID_FAM_ER,
MERMAID_FAM_GANTT,
MERMAID_FAM_PIE,
MERMAID_FAM_TIMELINE,
MERMAID_FAM_MINDMAP,
MERMAID_FAM_XYCHART,
MERMAID_FAM_GITGRAPH,
];
pub(crate) const MERMAID_FAMILY_FILES: [&str; MERMAID_FAMILY_COUNT] = [
"flowchart.mmd",
"sequence.mmd",
"state.mmd",
"class.mmd",
"er-schema.mmd",
"gantt-roadmap.mmd",
"pie-budget.mmd",
"timeline-releases.mmd",
"mindmap-euv.mmd",
"xychart-latency.mmd",
"gitgraph-release.mmd",
];
pub(crate) const MERMAID_FAMILY_SUMMARIES: [&str; MERMAID_FAMILY_COUNT] = [
"Directed subgraphs, multi-shape nodes, decision diamonds, and labeled connectors.",
"Ordered participants, actors, autonumbered arrows, notes, and alt/else control frames.",
"Finite state machine with start/end terminals and PageRetention::Freeze transitions.",
"UML class stereotypes, visibility members, inheritance, realization, and composition.",
"Entity-relationship tables with PK/FK/UK attributes and identifying/non-identifying edges.",
"Sectioned delivery schedule with done, active, critical path, and milestone markers.",
"Proportional native vector slices with automatic percentage legend readout.",
"Chronological release periods grouped by section along a horizontal milestone track.",
"Multi-depth architectural mindmap branching cleanly from a central root node.",
"Cartesian bar and line series with categorical X-axis ticks and scaled Y-axis bounds.",
"Multi-lane branch, checkout, tag, highlight, and merge commit topology.",
];
pub(crate) const MERMAID_SRC_FLOWCHART: &str = r##"flowchart LR
subgraph Reactive
A[Signals Arena] --> B(SceneTree SoA)
end
B --> C{Render Target}
C -->|Hardware| D([Metal / Vulkan / WebGPU])
C -->|Fallback| E([Software Rasterizer])
D --> F((240Hz Frame))
E --> F
"##;
pub(crate) const MERMAID_SRC_SEQUENCE: &str = r##"sequenceDiagram
autonumber
actor User
participant Shell as EuvAppShell
participant Router as EuvRouterOutlet
User->>Shell: Swipe or Tap Route
Shell->>Router: Coupled 1:1 Transition
alt Cached Page
Router-->>Shell: Resume Frozen Scope
else First Visit
Router-->>Shell: Mount Lazy Subtree
end
Note over Shell,Router: EaseOutCubic zero-gap present
Router-->>User: Present Frame
"##;
pub(crate) const MERMAID_SRC_STATE: &str = r##"stateDiagram-v2
[*] --> Active
Active --> Frozen: Leave Route
Frozen --> Active: Resume Coalesced
Active --> Background: System Background
Background --> Active: System Foreground
Active --> [*]: Destroy
"##;
pub(crate) const MERMAID_SRC_CLASS: &str = r##"classDiagram
class Renderer {
<<interface>>
+render(frame)
+resize(size)
-flush()
}
class GpuRenderer {
#device
~queue
+submit_uber_batch()
}
class SoftwareRenderer {
-tile_pool
+rasterize_dirty()
}
Renderer <|.. GpuRenderer : implements
Renderer <|.. SoftwareRenderer : implements
GpuRenderer *-- CommandPool : owns
GpuRenderer o-- GlyphAtlas : caches
"##;
pub(crate) const MERMAID_SRC_ER: &str = r##"erDiagram
WORKSPACE ||--o{ CRATE : contains
CRATE ||--o{ COMPONENT : exports
COMPONENT }|..|{ THEME_TOKEN : reads
WORKSPACE {
string name PK
string edition
string version
}
CRATE {
string id PK
string path
string kind
}
COMPONENT {
string id PK
string crate_id FK
string retention
}
THEME_TOKEN {
string role PK
string hex_value
}
"##;
pub(crate) const MERMAID_SRC_GANTT: &str = r##"gantt
title Euv Engine Release Milestones
section Core
Retained Scene Graph :done, 2026-01-01, 18d
Zero-Alloc Frame Arena :active, 2026-01-19, 14d
section UI
Eleven Mermaid Families :crit, 2026-02-02, 12d
Twenty ECharts Series :2026-02-14, 10d
section Release
GA Signoff :milestone, 2026-02-25, 1d
"##;
pub(crate) const MERMAID_SRC_PIE: &str = r##"pie title Native 240Hz Frame Budget
"Layout Cache" : 12
"DisplayList Paint" : 26
"GPU Uber-Shader" : 44
"Idle Headroom" : 18
"##;
pub(crate) const MERMAID_SRC_TIMELINE: &str = r##"timeline
title Euv Architecture Evolution
section Foundation
Q1 : Reactive Arena : SplitLayoutCache
Q2 : 64B Uber-Shader : Dual-Kawase Blur
section Rich Content
Q3 : Eva Bold CodeBlock : 11 Mermaid Families
Q4 : 20 ECharts Series : Pure-Rust Media Studio
"##;
pub(crate) const MERMAID_SRC_MINDMAP: &str = r##"mindmap
root((euv))
Core
Signals
SceneTree
LayoutCache
UI
17 Themes
Markdown
Mermaid
ECharts
Engines
2D Physics
3D BVH RT
"##;
pub(crate) const MERMAID_SRC_XYCHART: &str = r##"xychart-beta
title Frame P99 Latency (us)
x-axis [Scroll, Idle, Pointer, Virtual, Partial]
y-axis "microseconds" 0 --> 150
bar [127, 39, 65, 74, 42]
line [96, 31, 12, 68, 20]
"##;
pub(crate) const MERMAID_SRC_GITGRAPH: &str = r##"gitGraph
commit id: "init"
branch feat-mermaid
checkout feat-mermaid
commit id: "parser"
commit id: "11-families" tag: "v0.47" type: HIGHLIGHT
checkout main
merge feat-mermaid
commit id: "release"
"##;
pub(crate) const MERMAID_FAMILY_SOURCES: [&str; MERMAID_FAMILY_COUNT] = [
MERMAID_SRC_FLOWCHART,
MERMAID_SRC_SEQUENCE,
MERMAID_SRC_STATE,
MERMAID_SRC_CLASS,
MERMAID_SRC_ER,
MERMAID_SRC_GANTT,
MERMAID_SRC_PIE,
MERMAID_SRC_TIMELINE,
MERMAID_SRC_MINDMAP,
MERMAID_SRC_XYCHART,
MERMAID_SRC_GITGRAPH,
];