The containment view displays the physical organization of the model using interactive D3.js visualizations. This serves as the main entry point (index.html) for HTML documentation, providing a complete navigable view of the model structure including elements and their attachments.
Two visualization types are available:
Users can switch between views using toggle buttons at the top of the page.
The containment hierarchy extraction must:
Hierarchy Structure:
Element Information:
Data Structure:
Folder -> [Subfolders, Files]File -> [Elements]Ordering:
The Sunburst visualization displays the hierarchy as concentric rings:
Structure:
Interactive Features:
Navigation:
The Icicle/Partition visualization displays the hierarchy as horizontal rectangular bars:
Structure:
Interactive Features:
Navigation:
Both visualizations use consistent colors matching Mermaid diagrams:
| Type | Color | Description |
|---|---|---|
| folder | #9E9E9E | Gray for directories |
| file | #B8860B | Dark goldenrod for files |
| design-document | #607D8B | Blue-gray for design docs |
| user-requirement | #7E57C2 | Purple for user requirements |
| system-requirement | #673AB7 | Deep purple for system requirements |
| verification | #4CAF50 | Green for verifications |
| test-verification | #4CAF50 | Green for test verifications |
| refinement | #FF9800 | Orange for refinements |
| attachment-element | #8D6E63 | Brown for element attachments |
| attachment-file | #8D6E63 | Brown for file attachments |
The page includes a toggle mechanism:
Toggle Buttons:
View Instructions:
Technical Implementation:
Both visualizations consume JSON data in this format:
{
"name": "Reqvire root",
"type": "folder",
"children": [
{
"name": "requirements",
"type": "folder",
"children": [
{
"name": "UserStories.md",
"type": "file",
"link": "requirements/UserStories.html",
"children": [
{
"name": "User Authentication",
"type": "user-requirement",
"link": "requirements/UserStories.html#user-authentication",
"children": [
{
"name": "auth-design",
"type": "attachment-element",
"link": "requirements/Design.html#auth-design"
},
{
"name": "AuthSpec.pdf",
"type": "attachment-file",
"link": "docs/AuthSpec.pdf"
}
]
}
]
}
]
}
]
}
Field Descriptions:
name: Display name for the node (files keep .md extension for display)type: Node type determining color and behaviorlink: Optional navigation link for clickable nodes (uses .html extension)children: Array of child nodes (empty array omitted in serialization)Attachment Node Types:
attachment-element: Element identifier (navigable to element definition)attachment-file: File name only, link contains the full pathThe D3.js visualizations are embedded in markdown using code blocks:
Sunburst:
Icicle:
Processing:
HTML export integration must:
Index Page:
containment.md containing both D3.js visualizationsindex.html during exportIntegration with Existing Export:
Requirements:
reqvire export command