@open-document/core 0.11.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{build-BHFGY8eF.js → build-DfUfpeTR.js} +1 -1
- package/dist/{check-UEBmDfT_.js → check-CHxiOkQG.js} +3 -3
- package/dist/cli/bin.js +20 -33
- package/dist/{config-B_pdNbYg.js → config-9IdbhVuT.js} +1402 -675
- package/dist/{context-BM9_-u9P.js → context-BLI1-64_.js} +2 -2
- package/dist/{dev-DX3QMIRi.js → dev-yNYKv5mm.js} +1 -1
- package/dist/{diff-DayvbXfX.js → diff-Bs205mOx.js} +2 -2
- package/dist/{export-BPsXj1i6.js → export-tkquS5O5.js} +11 -4
- package/dist/{import-71wlAsrd.js → import-D1hIKIr3.js} +3 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +63 -28
- package/dist/ops/index.d.ts +111 -2
- package/dist/ops/index.js +3 -3
- package/dist/{ops-BUo67DaP.js → ops-Dgqujq5a.js} +85 -164
- package/dist/package-version-C89gtYSk.js +36 -0
- package/dist/{preview-D3m1-gUL.js → preview-BImdTH6K.js} +1 -1
- package/dist/{sdk-CpDEGRIo.d.ts → sdk-CHEGeINh.d.ts} +46 -1
- package/dist/templates-DT5zzqHq.js +34 -0
- package/dist/vite/index.js +1 -1
- package/package.json +2 -1
- package/skills/apply-comments/SKILL.md +3 -1
- package/skills/create-doc/SKILL.md +2 -0
- package/skills/doc-authoring/SKILL.md +2 -0
- package/src/app/components/browser/browser-ui.tsx +21 -0
- package/src/app/components/browser/new-document-dialog.tsx +208 -0
- package/src/app/components/changes/changes-overlay.tsx +68 -0
- package/src/app/components/changes/changes-panel.tsx +341 -0
- package/src/app/components/changes/use-changes.ts +85 -0
- package/src/app/components/comments/comments-overlay.tsx +50 -0
- package/src/app/components/comments/comments-panel.tsx +272 -0
- package/src/app/components/comments/use-comments.ts +61 -0
- package/src/app/components/doc-sidebar.tsx +32 -2
- package/src/app/components/inspector/field-source.tsx +41 -0
- package/src/app/components/inspector/inspector.tsx +64 -65
- package/src/app/components/overlay-frame.tsx +79 -0
- package/src/app/components/page-frame.tsx +4 -0
- package/src/app/components/page-placement.ts +68 -0
- package/src/app/components/record-picker.tsx +79 -0
- package/src/app/components/themes/theme-preview.tsx +5 -4
- package/src/app/lib/agent-bridge.ts +29 -1
- package/src/app/lib/docx/ooxml.test.ts +24 -1
- package/src/app/lib/docx/ooxml.ts +27 -1
- package/src/app/lib/export-docx.ts +3 -1
- package/src/app/lib/export-dom.ts +2 -1
- package/src/app/lib/export-html.ts +4 -2
- package/src/app/lib/export-image.ts +2 -1
- package/src/app/lib/flow-measure.test.ts +30 -0
- package/src/app/lib/flow-measure.ts +35 -10
- package/src/app/lib/i18n-ja/browser.ts +10 -0
- package/src/app/lib/i18n-ja/doc.ts +4 -0
- package/src/app/lib/i18n-ja/panels.ts +40 -0
- package/src/app/lib/i18n-ko/browser.ts +10 -0
- package/src/app/lib/i18n-ko/doc.ts +4 -0
- package/src/app/lib/i18n-ko/panels.ts +39 -0
- package/src/app/lib/i18n-zh-cn/browser.ts +10 -0
- package/src/app/lib/i18n-zh-cn/doc.ts +4 -0
- package/src/app/lib/i18n-zh-cn/panels.ts +38 -0
- package/src/app/lib/i18n-zh-tw/browser.ts +10 -0
- package/src/app/lib/i18n-zh-tw/doc.ts +4 -0
- package/src/app/lib/i18n-zh-tw/panels.ts +38 -0
- package/src/app/lib/records.test.ts +38 -0
- package/src/app/lib/records.ts +127 -0
- package/src/app/lib/sdk.ts +29 -0
- package/src/app/lib/use-doc-module.ts +7 -0
- package/src/app/lib/use-doc-pages.ts +15 -9
- package/src/app/routes/doc.tsx +274 -13
- package/src/app/routes/home.tsx +30 -5
- package/src/app/styles.css +23 -0
- package/templates/blank/index.tsx +63 -0
- package/templates/blank/template.json +6 -0
- package/templates/certificate/data/recipients.csv +4 -0
- package/templates/certificate/index.tsx +128 -0
- package/templates/certificate/template.json +6 -0
- package/templates/letter/index.tsx +106 -0
- package/templates/letter/template.json +5 -0
- package/templates/meeting-notes/index.tsx +194 -0
- package/templates/meeting-notes/template.json +6 -0
- package/templates/proposal/index.tsx +264 -0
- package/templates/proposal/template.json +6 -0
- package/templates/report/data/metrics.csv +5 -0
- package/templates/report/index.tsx +224 -0
- package/templates/report/template.json +6 -0
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type DesignSystem,
|
|
3
|
+
type DocEntry,
|
|
4
|
+
type DocMeta,
|
|
5
|
+
type DocPage,
|
|
6
|
+
flow,
|
|
7
|
+
useDocPageCount,
|
|
8
|
+
useDocPageNumber,
|
|
9
|
+
} from '@open-document/core';
|
|
10
|
+
import type { CSSProperties, ReactNode } from 'react';
|
|
11
|
+
|
|
12
|
+
export const meta: DocMeta = {
|
|
13
|
+
title: 'Project proposal',
|
|
14
|
+
subtitle: 'What we propose, what it costs, and when it lands',
|
|
15
|
+
author: 'Your team',
|
|
16
|
+
createdAt: '2026-01-01T00:00:00.000Z',
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export const design: DesignSystem = {
|
|
20
|
+
palette: {
|
|
21
|
+
bg: '#ffffff',
|
|
22
|
+
text: '#17161a',
|
|
23
|
+
muted: '#6b6873',
|
|
24
|
+
accent: '#6d28d9',
|
|
25
|
+
rule: '#e7e5ec',
|
|
26
|
+
},
|
|
27
|
+
fonts: {
|
|
28
|
+
heading: 'Georgia, "Times New Roman", serif',
|
|
29
|
+
body: '-apple-system, BlinkMacSystemFont, "Inter", system-ui, sans-serif',
|
|
30
|
+
mono: 'ui-monospace, "SF Mono", Menlo, monospace',
|
|
31
|
+
},
|
|
32
|
+
typeScale: { title: 44, h1: 24, h2: 16, h3: 13.5, body: 12.5, caption: 9.5 },
|
|
33
|
+
margin: 72,
|
|
34
|
+
leading: 1.6,
|
|
35
|
+
radius: 4,
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
const page: CSSProperties = {
|
|
39
|
+
width: '100%',
|
|
40
|
+
height: '100%',
|
|
41
|
+
boxSizing: 'border-box',
|
|
42
|
+
padding: 'var(--od-margin)',
|
|
43
|
+
position: 'relative',
|
|
44
|
+
};
|
|
45
|
+
const h1: CSSProperties = {
|
|
46
|
+
fontFamily: 'var(--od-font-heading)',
|
|
47
|
+
fontSize: 'var(--od-size-h1)',
|
|
48
|
+
fontWeight: 600,
|
|
49
|
+
margin: '10px 0 12px',
|
|
50
|
+
};
|
|
51
|
+
const h2: CSSProperties = { fontSize: 'var(--od-size-h2)', fontWeight: 600, margin: '16px 0 8px' };
|
|
52
|
+
const p: CSSProperties = { margin: '0 0 10px' };
|
|
53
|
+
const list: CSSProperties = { margin: '0 0 10px', paddingLeft: 18 };
|
|
54
|
+
const cell: CSSProperties = {
|
|
55
|
+
borderBottom: '1px solid var(--od-rule)',
|
|
56
|
+
padding: '6px 8px',
|
|
57
|
+
textAlign: 'left',
|
|
58
|
+
verticalAlign: 'top',
|
|
59
|
+
fontSize: 11.5,
|
|
60
|
+
};
|
|
61
|
+
const head: CSSProperties = { ...cell, fontWeight: 600, color: 'var(--od-muted)', fontSize: 10.5 };
|
|
62
|
+
|
|
63
|
+
const Table = ({
|
|
64
|
+
columns,
|
|
65
|
+
rows,
|
|
66
|
+
align = [],
|
|
67
|
+
}: {
|
|
68
|
+
columns: string[];
|
|
69
|
+
rows: ReactNode[][];
|
|
70
|
+
align?: Array<'left' | 'right'>;
|
|
71
|
+
}) => (
|
|
72
|
+
<table style={{ width: '100%', borderCollapse: 'collapse', margin: '6px 0 14px' }}>
|
|
73
|
+
<thead>
|
|
74
|
+
<tr>
|
|
75
|
+
{columns.map((column, at) => (
|
|
76
|
+
<th key={column} style={{ ...head, textAlign: align[at] ?? 'left' }}>
|
|
77
|
+
{column}
|
|
78
|
+
</th>
|
|
79
|
+
))}
|
|
80
|
+
</tr>
|
|
81
|
+
</thead>
|
|
82
|
+
<tbody>
|
|
83
|
+
{rows.map((row, r) => (
|
|
84
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: rows are positional
|
|
85
|
+
<tr key={r}>
|
|
86
|
+
{row.map((value, c) => (
|
|
87
|
+
<td
|
|
88
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: cells are positional
|
|
89
|
+
key={c}
|
|
90
|
+
style={{
|
|
91
|
+
...cell,
|
|
92
|
+
textAlign: align[c] ?? 'left',
|
|
93
|
+
fontVariantNumeric: 'tabular-nums',
|
|
94
|
+
}}
|
|
95
|
+
>
|
|
96
|
+
{value}
|
|
97
|
+
</td>
|
|
98
|
+
))}
|
|
99
|
+
</tr>
|
|
100
|
+
))}
|
|
101
|
+
</tbody>
|
|
102
|
+
</table>
|
|
103
|
+
);
|
|
104
|
+
|
|
105
|
+
const SectionNo = ({ n }: { n: string }) => (
|
|
106
|
+
<span style={{ color: 'var(--od-accent)', marginRight: 10 }}>{n}</span>
|
|
107
|
+
);
|
|
108
|
+
|
|
109
|
+
const Footer = () => (
|
|
110
|
+
<div
|
|
111
|
+
style={{
|
|
112
|
+
position: 'absolute',
|
|
113
|
+
left: 'var(--od-margin)',
|
|
114
|
+
right: 'var(--od-margin)',
|
|
115
|
+
bottom: 36,
|
|
116
|
+
display: 'flex',
|
|
117
|
+
justifyContent: 'space-between',
|
|
118
|
+
fontSize: 'var(--od-size-caption)',
|
|
119
|
+
color: 'var(--od-muted)',
|
|
120
|
+
}}
|
|
121
|
+
>
|
|
122
|
+
<span>Project proposal · Prepared for Client name</span>
|
|
123
|
+
<span style={{ fontVariantNumeric: 'tabular-nums' }}>
|
|
124
|
+
{useDocPageNumber()} / {useDocPageCount()}
|
|
125
|
+
</span>
|
|
126
|
+
</div>
|
|
127
|
+
);
|
|
128
|
+
|
|
129
|
+
const Cover: DocPage = () => (
|
|
130
|
+
<div
|
|
131
|
+
style={{
|
|
132
|
+
...page,
|
|
133
|
+
display: 'flex',
|
|
134
|
+
flexDirection: 'column',
|
|
135
|
+
justifyContent: 'center',
|
|
136
|
+
borderLeft: '10px solid var(--od-accent)',
|
|
137
|
+
}}
|
|
138
|
+
>
|
|
139
|
+
<p style={{ ...p, fontSize: 11, letterSpacing: '0.16em', textTransform: 'uppercase' }}>
|
|
140
|
+
Proposal for Client name
|
|
141
|
+
</p>
|
|
142
|
+
<h1
|
|
143
|
+
data-od-outline="skip"
|
|
144
|
+
style={{ ...h1, fontSize: 'var(--od-size-title)', lineHeight: 1.1, margin: '6px 0 18px' }}
|
|
145
|
+
>
|
|
146
|
+
Project proposal
|
|
147
|
+
</h1>
|
|
148
|
+
<p style={{ ...p, fontSize: 15, color: 'var(--od-muted)', maxWidth: 420 }}>
|
|
149
|
+
What we propose, what it costs, and when it lands.
|
|
150
|
+
</p>
|
|
151
|
+
<dl
|
|
152
|
+
style={{
|
|
153
|
+
display: 'grid',
|
|
154
|
+
gridTemplateColumns: 'auto 1fr',
|
|
155
|
+
gap: '4px 18px',
|
|
156
|
+
marginTop: 56,
|
|
157
|
+
fontSize: 11.5,
|
|
158
|
+
}}
|
|
159
|
+
>
|
|
160
|
+
<dt style={{ color: 'var(--od-muted)' }}>Prepared by</dt>
|
|
161
|
+
<dd style={{ margin: 0 }}>Your name, Your company</dd>
|
|
162
|
+
<dt style={{ color: 'var(--od-muted)' }}>Date</dt>
|
|
163
|
+
<dd style={{ margin: 0 }}>January 2026</dd>
|
|
164
|
+
<dt style={{ color: 'var(--od-muted)' }}>Valid until</dt>
|
|
165
|
+
<dd style={{ margin: 0 }}>31 March 2026</dd>
|
|
166
|
+
</dl>
|
|
167
|
+
</div>
|
|
168
|
+
);
|
|
169
|
+
|
|
170
|
+
const Body = flow(
|
|
171
|
+
<>
|
|
172
|
+
<h1 style={h1}>
|
|
173
|
+
<SectionNo n="01" />
|
|
174
|
+
The problem
|
|
175
|
+
</h1>
|
|
176
|
+
<p style={p}>
|
|
177
|
+
Describe the situation in the client's own terms: what is not working, what it costs them, and
|
|
178
|
+
why it matters now.
|
|
179
|
+
</p>
|
|
180
|
+
|
|
181
|
+
<h1 style={h1}>
|
|
182
|
+
<SectionNo n="02" />
|
|
183
|
+
Our approach
|
|
184
|
+
</h1>
|
|
185
|
+
<p style={p}>Explain the solution in a paragraph, then the parts it is made of.</p>
|
|
186
|
+
<ul style={list}>
|
|
187
|
+
<li>The first part, and the result it produces.</li>
|
|
188
|
+
<li>The second part, and how it builds on the first.</li>
|
|
189
|
+
<li>How you will know it worked.</li>
|
|
190
|
+
</ul>
|
|
191
|
+
|
|
192
|
+
<h1 style={h1}>
|
|
193
|
+
<SectionNo n="03" />
|
|
194
|
+
Scope
|
|
195
|
+
</h1>
|
|
196
|
+
<h2 style={h2}>Included</h2>
|
|
197
|
+
<ul style={list}>
|
|
198
|
+
<li>Deliverable one</li>
|
|
199
|
+
<li>Deliverable two</li>
|
|
200
|
+
</ul>
|
|
201
|
+
<h2 style={h2}>Not included</h2>
|
|
202
|
+
<ul style={list}>
|
|
203
|
+
<li>What the client should not expect, said plainly.</li>
|
|
204
|
+
</ul>
|
|
205
|
+
|
|
206
|
+
<h1 style={h1}>
|
|
207
|
+
<SectionNo n="04" />
|
|
208
|
+
Timeline
|
|
209
|
+
</h1>
|
|
210
|
+
<Table
|
|
211
|
+
columns={['Phase', 'What happens', 'Weeks']}
|
|
212
|
+
align={['left', 'left', 'right']}
|
|
213
|
+
rows={[
|
|
214
|
+
['Discovery', 'Interviews, audit, agreed plan', '2'],
|
|
215
|
+
['Build', 'The work itself, reviewed every week', '6'],
|
|
216
|
+
['Handover', 'Training, documentation, sign-off', '1'],
|
|
217
|
+
]}
|
|
218
|
+
/>
|
|
219
|
+
|
|
220
|
+
<h1 style={h1}>
|
|
221
|
+
<SectionNo n="05" />
|
|
222
|
+
Investment
|
|
223
|
+
</h1>
|
|
224
|
+
<Table
|
|
225
|
+
columns={['Item', 'Amount (USD)']}
|
|
226
|
+
align={['left', 'right']}
|
|
227
|
+
rows={[
|
|
228
|
+
['Discovery', '8,000'],
|
|
229
|
+
['Build', '36,000'],
|
|
230
|
+
['Handover', '4,000'],
|
|
231
|
+
[<strong key="t">Total</strong>, <strong key="v">48,000</strong>],
|
|
232
|
+
]}
|
|
233
|
+
/>
|
|
234
|
+
<p style={{ ...p, fontSize: 'var(--od-size-caption)', color: 'var(--od-muted)' }}>
|
|
235
|
+
Invoiced at the start of each phase. Prices exclude tax.
|
|
236
|
+
</p>
|
|
237
|
+
|
|
238
|
+
<h1 style={h1}>
|
|
239
|
+
<SectionNo n="06" />
|
|
240
|
+
Next steps
|
|
241
|
+
</h1>
|
|
242
|
+
<p style={p}>Sign below to accept, and we will schedule the first workshop within a week.</p>
|
|
243
|
+
<div
|
|
244
|
+
style={{
|
|
245
|
+
display: 'grid',
|
|
246
|
+
gridTemplateColumns: '1fr 1fr',
|
|
247
|
+
gap: 40,
|
|
248
|
+
marginTop: 36,
|
|
249
|
+
fontSize: 11,
|
|
250
|
+
color: 'var(--od-muted)',
|
|
251
|
+
}}
|
|
252
|
+
>
|
|
253
|
+
<div style={{ borderTop: '1px solid var(--od-text)', paddingTop: 6 }}>
|
|
254
|
+
For Client name — signature and date
|
|
255
|
+
</div>
|
|
256
|
+
<div style={{ borderTop: '1px solid var(--od-text)', paddingTop: 6 }}>
|
|
257
|
+
For Your company — signature and date
|
|
258
|
+
</div>
|
|
259
|
+
</div>
|
|
260
|
+
</>,
|
|
261
|
+
{ footer: Footer },
|
|
262
|
+
);
|
|
263
|
+
|
|
264
|
+
export default [Cover, Body] satisfies DocEntry[];
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DataTable,
|
|
3
|
+
type DesignSystem,
|
|
4
|
+
type DocEntry,
|
|
5
|
+
type DocMeta,
|
|
6
|
+
type DocPage,
|
|
7
|
+
Footnote,
|
|
8
|
+
flow,
|
|
9
|
+
TableOfContents,
|
|
10
|
+
useDocPageCount,
|
|
11
|
+
useDocPageNumber,
|
|
12
|
+
} from '@open-document/core';
|
|
13
|
+
import type { CSSProperties, ReactNode } from 'react';
|
|
14
|
+
import metrics from './data/metrics.csv';
|
|
15
|
+
|
|
16
|
+
export const meta: DocMeta = {
|
|
17
|
+
title: 'Annual report',
|
|
18
|
+
subtitle: 'Performance, findings and what we recommend next',
|
|
19
|
+
author: 'Your team',
|
|
20
|
+
createdAt: '2026-01-01T00:00:00.000Z',
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export const design: DesignSystem = {
|
|
24
|
+
palette: {
|
|
25
|
+
bg: '#ffffff',
|
|
26
|
+
text: '#14171c',
|
|
27
|
+
muted: '#667085',
|
|
28
|
+
accent: '#0f5b9e',
|
|
29
|
+
rule: '#e3e7ee',
|
|
30
|
+
},
|
|
31
|
+
fonts: {
|
|
32
|
+
heading: '-apple-system, BlinkMacSystemFont, "Inter", system-ui, sans-serif',
|
|
33
|
+
body: '-apple-system, BlinkMacSystemFont, "Inter", system-ui, sans-serif',
|
|
34
|
+
mono: 'ui-monospace, "SF Mono", Menlo, monospace',
|
|
35
|
+
},
|
|
36
|
+
typeScale: { title: 42, h1: 24, h2: 16, h3: 13.5, body: 12.5, caption: 9.5 },
|
|
37
|
+
margin: 72,
|
|
38
|
+
leading: 1.6,
|
|
39
|
+
radius: 4,
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
const page: CSSProperties = {
|
|
43
|
+
width: '100%',
|
|
44
|
+
height: '100%',
|
|
45
|
+
boxSizing: 'border-box',
|
|
46
|
+
padding: 'var(--od-margin)',
|
|
47
|
+
position: 'relative',
|
|
48
|
+
};
|
|
49
|
+
const h1: CSSProperties = {
|
|
50
|
+
fontSize: 'var(--od-size-h1)',
|
|
51
|
+
fontWeight: 650,
|
|
52
|
+
letterSpacing: '-0.01em',
|
|
53
|
+
margin: '8px 0 12px',
|
|
54
|
+
};
|
|
55
|
+
const h2: CSSProperties = { fontSize: 'var(--od-size-h2)', fontWeight: 600, margin: '18px 0 8px' };
|
|
56
|
+
const p: CSSProperties = { margin: '0 0 10px' };
|
|
57
|
+
const list: CSSProperties = { margin: '0 0 10px', paddingLeft: 18 };
|
|
58
|
+
|
|
59
|
+
const Eyebrow = ({ children }: { children: ReactNode }) => (
|
|
60
|
+
<p
|
|
61
|
+
style={{
|
|
62
|
+
margin: 0,
|
|
63
|
+
fontSize: 10.5,
|
|
64
|
+
fontWeight: 600,
|
|
65
|
+
letterSpacing: '0.16em',
|
|
66
|
+
textTransform: 'uppercase',
|
|
67
|
+
color: 'var(--od-accent)',
|
|
68
|
+
}}
|
|
69
|
+
>
|
|
70
|
+
{children}
|
|
71
|
+
</p>
|
|
72
|
+
);
|
|
73
|
+
|
|
74
|
+
/** One figure that matters, set large, with what it means underneath. */
|
|
75
|
+
const Stat = ({ value, label }: { value: string; label: string }) => (
|
|
76
|
+
<div style={{ borderTop: '2px solid var(--od-accent)', paddingTop: 8 }}>
|
|
77
|
+
<div style={{ fontSize: 22, fontWeight: 650, fontVariantNumeric: 'tabular-nums' }}>{value}</div>
|
|
78
|
+
<div style={{ fontSize: 'var(--od-size-caption)', color: 'var(--od-muted)' }}>{label}</div>
|
|
79
|
+
</div>
|
|
80
|
+
);
|
|
81
|
+
|
|
82
|
+
const Header = () => (
|
|
83
|
+
<div
|
|
84
|
+
style={{
|
|
85
|
+
position: 'absolute',
|
|
86
|
+
top: 34,
|
|
87
|
+
left: 'var(--od-margin)',
|
|
88
|
+
right: 'var(--od-margin)',
|
|
89
|
+
fontSize: 'var(--od-size-caption)',
|
|
90
|
+
color: 'var(--od-muted)',
|
|
91
|
+
letterSpacing: '0.08em',
|
|
92
|
+
textTransform: 'uppercase',
|
|
93
|
+
}}
|
|
94
|
+
>
|
|
95
|
+
Annual report
|
|
96
|
+
</div>
|
|
97
|
+
);
|
|
98
|
+
|
|
99
|
+
const Footer = () => (
|
|
100
|
+
<div
|
|
101
|
+
style={{
|
|
102
|
+
position: 'absolute',
|
|
103
|
+
left: 'var(--od-margin)',
|
|
104
|
+
right: 'var(--od-margin)',
|
|
105
|
+
bottom: 36,
|
|
106
|
+
display: 'flex',
|
|
107
|
+
justifyContent: 'space-between',
|
|
108
|
+
fontSize: 'var(--od-size-caption)',
|
|
109
|
+
color: 'var(--od-muted)',
|
|
110
|
+
borderTop: '1px solid var(--od-rule)',
|
|
111
|
+
paddingTop: 8,
|
|
112
|
+
}}
|
|
113
|
+
>
|
|
114
|
+
<span>Your organisation · Confidential</span>
|
|
115
|
+
<span style={{ fontVariantNumeric: 'tabular-nums' }}>
|
|
116
|
+
{useDocPageNumber()} / {useDocPageCount()}
|
|
117
|
+
</span>
|
|
118
|
+
</div>
|
|
119
|
+
);
|
|
120
|
+
|
|
121
|
+
const Cover: DocPage = () => (
|
|
122
|
+
<div style={{ ...page, display: 'flex', flexDirection: 'column' }}>
|
|
123
|
+
<div style={{ height: 6, width: 56, background: 'var(--od-accent)', marginBottom: 'auto' }} />
|
|
124
|
+
<Eyebrow>Report · 2026</Eyebrow>
|
|
125
|
+
<h1
|
|
126
|
+
data-od-outline="skip"
|
|
127
|
+
style={{ ...h1, fontSize: 'var(--od-size-title)', lineHeight: 1.1, margin: '14px 0 14px' }}
|
|
128
|
+
>
|
|
129
|
+
Annual report
|
|
130
|
+
</h1>
|
|
131
|
+
<p style={{ ...p, fontSize: 15, color: 'var(--od-muted)', maxWidth: 440 }}>
|
|
132
|
+
Performance, findings and what we recommend next.
|
|
133
|
+
</p>
|
|
134
|
+
<div
|
|
135
|
+
style={{
|
|
136
|
+
marginTop: 48,
|
|
137
|
+
paddingTop: 12,
|
|
138
|
+
borderTop: '1px solid var(--od-rule)',
|
|
139
|
+
display: 'flex',
|
|
140
|
+
gap: 40,
|
|
141
|
+
fontSize: 11,
|
|
142
|
+
color: 'var(--od-muted)',
|
|
143
|
+
}}
|
|
144
|
+
>
|
|
145
|
+
<span>Prepared by Your team</span>
|
|
146
|
+
<span>January 2026</span>
|
|
147
|
+
</div>
|
|
148
|
+
</div>
|
|
149
|
+
);
|
|
150
|
+
|
|
151
|
+
const Contents: DocPage = () => (
|
|
152
|
+
<div style={page}>
|
|
153
|
+
<h2 data-od-outline="skip" style={h1}>
|
|
154
|
+
Contents
|
|
155
|
+
</h2>
|
|
156
|
+
<TableOfContents maxLevel={1} />
|
|
157
|
+
</div>
|
|
158
|
+
);
|
|
159
|
+
|
|
160
|
+
const Body = flow(
|
|
161
|
+
<>
|
|
162
|
+
<Eyebrow>Summary</Eyebrow>
|
|
163
|
+
<h1 style={h1}>Executive summary</h1>
|
|
164
|
+
<p style={p}>
|
|
165
|
+
State the conclusion first, in two or three sentences: what happened this year, why it
|
|
166
|
+
matters, and the one decision you need from the reader.
|
|
167
|
+
</p>
|
|
168
|
+
<div
|
|
169
|
+
style={{
|
|
170
|
+
display: 'grid',
|
|
171
|
+
gridTemplateColumns: 'repeat(3, 1fr)',
|
|
172
|
+
gap: 20,
|
|
173
|
+
margin: '16px 0 20px',
|
|
174
|
+
}}
|
|
175
|
+
>
|
|
176
|
+
<Stat value="$5.8M" label="Revenue, up 37% on last year" />
|
|
177
|
+
<Stat value="531" label="Customers at year end" />
|
|
178
|
+
<Stat value="2.4%" label="Quarterly churn, down from 3.1%" />
|
|
179
|
+
</div>
|
|
180
|
+
|
|
181
|
+
<Eyebrow>Section 1</Eyebrow>
|
|
182
|
+
<h1 style={h1}>Background</h1>
|
|
183
|
+
<p style={p}>
|
|
184
|
+
Describe where things stood at the start of the period and what you set out to do. Keep it to
|
|
185
|
+
what the reader needs to follow the findings.
|
|
186
|
+
<Footnote>Source and method notes go in footnotes, not in the body.</Footnote>
|
|
187
|
+
</p>
|
|
188
|
+
|
|
189
|
+
<Eyebrow>Section 2</Eyebrow>
|
|
190
|
+
<h1 style={h1}>Findings</h1>
|
|
191
|
+
<h2 style={h2}>2.1 Growth by quarter</h2>
|
|
192
|
+
<p style={p}>
|
|
193
|
+
The table is printed from <code>data/metrics.csv</code>; replace the file and the numbers
|
|
194
|
+
follow.
|
|
195
|
+
</p>
|
|
196
|
+
<DataTable
|
|
197
|
+
caption="Revenue, customers and churn by quarter"
|
|
198
|
+
rows={metrics}
|
|
199
|
+
columns={[
|
|
200
|
+
{ key: 'quarter', label: 'Quarter' },
|
|
201
|
+
{ key: 'revenue', label: 'Revenue (USD)', format: 'integer' },
|
|
202
|
+
{ key: 'customers', label: 'Customers', format: 'integer' },
|
|
203
|
+
{ key: 'churn', label: 'Churn', format: 'percent' },
|
|
204
|
+
]}
|
|
205
|
+
/>
|
|
206
|
+
<h2 style={h2}>2.2 What drove it</h2>
|
|
207
|
+
<p style={p}>Explain the two or three causes behind the numbers, each with its evidence.</p>
|
|
208
|
+
|
|
209
|
+
<Eyebrow>Section 3</Eyebrow>
|
|
210
|
+
<h1 style={h1}>Recommendations</h1>
|
|
211
|
+
<ol style={list}>
|
|
212
|
+
<li>The first thing to do, who owns it, and by when.</li>
|
|
213
|
+
<li>The second, with the result you expect from it.</li>
|
|
214
|
+
<li>What to stop doing, and what that frees up.</li>
|
|
215
|
+
</ol>
|
|
216
|
+
|
|
217
|
+
<Eyebrow>Appendix</Eyebrow>
|
|
218
|
+
<h1 style={h1}>Appendix</h1>
|
|
219
|
+
<p style={p}>Definitions, detailed tables and anything a careful reader may want to check.</p>
|
|
220
|
+
</>,
|
|
221
|
+
{ header: Header, footer: Footer },
|
|
222
|
+
);
|
|
223
|
+
|
|
224
|
+
export default [Cover, Contents, Body] satisfies DocEntry[];
|