/* app-smartdocs.jsx — "Smart Documents": Confluence macros that pull live Jira data. */
const SDOC_FEATS = [
{
icon: 'Code',
title: 'Confluence macros with dedicated layouts included',
body: 'Macros sit inside your templates and pull formatted Jira content such as requirements, risks and tests onto the page.'
},
{
icon: 'Lock',
title: 'Pull on demand, locked on release',
body: 'Macros pull only when you ask. If Jira has newer content, the document flags it as outdated; released versions stay locked.'
},
{
icon: 'Sparkles',
title: 'Rovo agents draft and review',
body: 'Qity\u2019s Rovo agents help write the rest of the document and review it against your standards.'
}];
const SDOC_REFS = [
{ id: 'DOC-564', title: 'Baby monitor \u2014 intended use' },
{ id: 'DOC-595', title: 'IEC 62304' },
{ id: 'DOC-1323', title: 'ISO 14971' }];
function SDocAva({ src, badge }) {
return (
{badge && }
);
}
function ConfluenceDoc() {
return (
Product Requirements — Baby monitor
{/* ---- Document Control macro ---- */}
DC-23 DOC-2 · Version 2
QA approval
{/* ---- Purpose ---- */}
Purpose
This document lists the requirements for the Baby Monitor product.
{/* ---- References (Table of References macro) ---- */}
References
Doc IDTitle
{SDOC_REFS.map((r) =>
{r.id}{r.title}
)}
Find document…
Cancel
{/* ---- Training requirements (Training app macro) ---- */}
Product requirements
BM-112Rechargeable battery
BM-118WiFi connectivity
);
}
function AbstractDoc() {
return (
{/* Document Control macro */}
QA approval
{/* Table of References macro */}
{/* Requirements macro */}
);
}
function AnimatedDoc() {
const ref = React.useRef(null);
const [play, setPlay] = React.useState(false);
React.useEffect(() => {
const el = ref.current;if (!el) return;
if (window.matchMedia('(prefers-reduced-motion: reduce)').matches) {setPlay(true);return;}
if (!('IntersectionObserver' in window)) {setPlay(true);return;}
const io = new IntersectionObserver((entries) => {
entries.forEach((en) => {if (en.isIntersecting) {setPlay(true);io.disconnect();}});
}, { threshold: 0.35 });
io.observe(el);
return () => io.disconnect();
}, []);
const blocks = [
{ c: 'b', label: 'Table of references', icon: 'jira-document', rows: 3 },
{ c: 'p', label: 'Equipment', icon: 'jira-equipment', rows: 2 },
{ c: 'g', label: 'Tests', icon: 'jira-test', rows: 3 },
{ c: 'r', label: 'Defects', icon: 'jira-defect', rows: 2 }];
return (
Test Report
{/* Document Control macro stays pinned at the top */}
DOC-352
Approval
Draft
Released
{/* content streaming in from Jira */}
{blocks.map((b, i) =>
{b.label}
{Array.from({ length: b.rows }).map((_, r) =>
)}
)}
);
}
function SmartDocs({ tweaks }) {
const docStyle = tweaks && tweaks.docStyle || 'Detailed';
const DocVisual = docStyle === 'Abstract' ? AbstractDoc : docStyle === 'Animated' ? AnimatedDoc : ConfluenceDoc;
return (
Document templates, wired into Jira
Confluence macros pull Jira content into professionally crafted document templates. Every document is built straight from the quality data behind it.
{SDOC_FEATS.map((f, i) =>
)}
);
}
Object.assign(window, { SmartDocs, ConfluenceDoc, AbstractDoc, AnimatedDoc });