examples.ts 37 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396
  1. import type { Spec } from "@json-render/core";
  2. export interface Example {
  3. name: string;
  4. label: string;
  5. description: string;
  6. spec: Spec;
  7. }
  8. export const examples: Example[] = [
  9. // =========================================================================
  10. // Invoice
  11. // =========================================================================
  12. {
  13. name: "invoice",
  14. label: "Invoice",
  15. description:
  16. "A professional invoice with company header, billing details, line items, and totals",
  17. spec: {
  18. root: "doc",
  19. elements: {
  20. doc: {
  21. type: "Document",
  22. props: { title: "Invoice #1042", author: "Acme Corp", subject: null },
  23. children: ["page"],
  24. },
  25. page: {
  26. type: "Page",
  27. props: {
  28. size: "A4",
  29. orientation: null,
  30. marginTop: 50,
  31. marginBottom: 50,
  32. marginLeft: 50,
  33. marginRight: 50,
  34. backgroundColor: null,
  35. },
  36. children: [
  37. "header",
  38. "spacer-1",
  39. "billing-row",
  40. "spacer-2",
  41. "items-table",
  42. "spacer-3",
  43. "totals",
  44. "spacer-4",
  45. "footer",
  46. "page-num",
  47. ],
  48. },
  49. // Header
  50. header: {
  51. type: "Row",
  52. props: {
  53. gap: null,
  54. alignItems: "flex-end",
  55. justifyContent: "space-between",
  56. padding: null,
  57. flex: null,
  58. wrap: null,
  59. },
  60. children: ["company-name", "invoice-info"],
  61. },
  62. "company-name": {
  63. type: "Heading",
  64. props: {
  65. text: "Acme Corp",
  66. level: "h1",
  67. color: "#1a202c",
  68. align: null,
  69. },
  70. },
  71. "invoice-info": {
  72. type: "Column",
  73. props: {
  74. gap: 2,
  75. alignItems: "flex-end",
  76. justifyContent: null,
  77. padding: null,
  78. flex: null,
  79. },
  80. children: ["inv-number", "inv-date", "inv-due"],
  81. },
  82. "inv-number": {
  83. type: "Text",
  84. props: {
  85. text: "Invoice #1042",
  86. fontSize: 12,
  87. color: "#4a5568",
  88. align: null,
  89. fontWeight: "bold",
  90. fontStyle: null,
  91. lineHeight: null,
  92. },
  93. },
  94. "inv-date": {
  95. type: "Text",
  96. props: {
  97. text: "Date: February 19, 2026",
  98. fontSize: 10,
  99. color: "#718096",
  100. align: null,
  101. fontWeight: null,
  102. fontStyle: null,
  103. lineHeight: null,
  104. },
  105. },
  106. "inv-due": {
  107. type: "Text",
  108. props: {
  109. text: "Due: March 19, 2026",
  110. fontSize: 10,
  111. color: "#718096",
  112. align: null,
  113. fontWeight: null,
  114. fontStyle: null,
  115. lineHeight: null,
  116. },
  117. },
  118. "spacer-1": { type: "Spacer", props: { height: 30 } },
  119. // Billing info
  120. "billing-row": {
  121. type: "Row",
  122. props: {
  123. gap: 40,
  124. alignItems: null,
  125. justifyContent: null,
  126. padding: null,
  127. flex: null,
  128. wrap: null,
  129. },
  130. children: ["bill-from", "bill-to"],
  131. },
  132. "bill-from": {
  133. type: "Column",
  134. props: {
  135. gap: 4,
  136. alignItems: null,
  137. justifyContent: null,
  138. padding: null,
  139. flex: 1,
  140. },
  141. children: ["from-label", "from-name", "from-addr", "from-email"],
  142. },
  143. "from-label": {
  144. type: "Text",
  145. props: {
  146. text: "From",
  147. fontSize: 10,
  148. color: "#718096",
  149. align: null,
  150. fontWeight: "bold",
  151. fontStyle: null,
  152. lineHeight: null,
  153. },
  154. },
  155. "from-name": {
  156. type: "Text",
  157. props: {
  158. text: "Acme Corp",
  159. fontSize: 11,
  160. color: null,
  161. align: null,
  162. fontWeight: "bold",
  163. fontStyle: null,
  164. lineHeight: null,
  165. },
  166. },
  167. "from-addr": {
  168. type: "Text",
  169. props: {
  170. text: "123 Business Ave, Suite 100\nSan Francisco, CA 94102",
  171. fontSize: 10,
  172. color: "#4a5568",
  173. align: null,
  174. fontWeight: null,
  175. fontStyle: null,
  176. lineHeight: 1.4,
  177. },
  178. },
  179. "from-email": {
  180. type: "Text",
  181. props: {
  182. text: "billing@acmecorp.com",
  183. fontSize: 10,
  184. color: "#4a5568",
  185. align: null,
  186. fontWeight: null,
  187. fontStyle: null,
  188. lineHeight: null,
  189. },
  190. },
  191. "bill-to": {
  192. type: "Column",
  193. props: {
  194. gap: 4,
  195. alignItems: null,
  196. justifyContent: null,
  197. padding: null,
  198. flex: 1,
  199. },
  200. children: ["to-label", "to-name", "to-addr", "to-email"],
  201. },
  202. "to-label": {
  203. type: "Text",
  204. props: {
  205. text: "Bill To",
  206. fontSize: 10,
  207. color: "#718096",
  208. align: null,
  209. fontWeight: "bold",
  210. fontStyle: null,
  211. lineHeight: null,
  212. },
  213. },
  214. "to-name": {
  215. type: "Text",
  216. props: {
  217. text: "Globex Corporation",
  218. fontSize: 11,
  219. color: null,
  220. align: null,
  221. fontWeight: "bold",
  222. fontStyle: null,
  223. lineHeight: null,
  224. },
  225. },
  226. "to-addr": {
  227. type: "Text",
  228. props: {
  229. text: "456 Client Road\nNew York, NY 10001",
  230. fontSize: 10,
  231. color: "#4a5568",
  232. align: null,
  233. fontWeight: null,
  234. fontStyle: null,
  235. lineHeight: 1.4,
  236. },
  237. },
  238. "to-email": {
  239. type: "Text",
  240. props: {
  241. text: "accounts@globex.com",
  242. fontSize: 10,
  243. color: "#4a5568",
  244. align: null,
  245. fontWeight: null,
  246. fontStyle: null,
  247. lineHeight: null,
  248. },
  249. },
  250. "spacer-2": { type: "Spacer", props: { height: 30 } },
  251. // Items table
  252. "items-table": {
  253. type: "Table",
  254. props: {
  255. columns: [
  256. { header: "Description", width: "45%", align: null },
  257. { header: "Qty", width: "10%", align: "center" },
  258. { header: "Unit Price", width: "20%", align: "right" },
  259. { header: "Amount", width: "25%", align: "right" },
  260. ],
  261. rows: [
  262. ["Website Redesign", "1", "$5,000.00", "$5,000.00"],
  263. ["SEO Optimization", "1", "$2,500.00", "$2,500.00"],
  264. ["Content Writing (per page)", "12", "$150.00", "$1,800.00"],
  265. ["Monthly Hosting", "6", "$50.00", "$300.00"],
  266. ],
  267. headerBackgroundColor: "#2d3748",
  268. headerTextColor: "#ffffff",
  269. borderColor: "#e2e8f0",
  270. fontSize: 10,
  271. striped: true,
  272. },
  273. },
  274. "spacer-3": { type: "Spacer", props: { height: 20 } },
  275. // Totals
  276. totals: {
  277. type: "Column",
  278. props: {
  279. gap: 4,
  280. alignItems: "flex-end",
  281. justifyContent: null,
  282. padding: null,
  283. flex: null,
  284. },
  285. children: ["subtotal", "tax", "divider-totals", "total"],
  286. },
  287. subtotal: {
  288. type: "Text",
  289. props: {
  290. text: "Subtotal: $9,600.00",
  291. fontSize: 10,
  292. color: "#4a5568",
  293. align: null,
  294. fontWeight: null,
  295. fontStyle: null,
  296. lineHeight: null,
  297. },
  298. },
  299. tax: {
  300. type: "Text",
  301. props: {
  302. text: "Tax (8.5%): $816.00",
  303. fontSize: 10,
  304. color: "#4a5568",
  305. align: null,
  306. fontWeight: null,
  307. fontStyle: null,
  308. lineHeight: null,
  309. },
  310. },
  311. "divider-totals": {
  312. type: "Divider",
  313. props: {
  314. color: "#2d3748",
  315. thickness: 2,
  316. marginTop: 4,
  317. marginBottom: 4,
  318. },
  319. },
  320. total: {
  321. type: "Text",
  322. props: {
  323. text: "Total Due: $10,416.00",
  324. fontSize: 14,
  325. color: "#1a202c",
  326. align: null,
  327. fontWeight: "bold",
  328. fontStyle: null,
  329. lineHeight: null,
  330. },
  331. },
  332. "spacer-4": { type: "Spacer", props: { height: 40 } },
  333. footer: {
  334. type: "Text",
  335. props: {
  336. text: "Payment is due within 30 days. Please make checks payable to Acme Corp or wire transfer to the account details provided separately.",
  337. fontSize: 9,
  338. color: "#a0aec0",
  339. align: "center",
  340. fontWeight: null,
  341. fontStyle: "italic",
  342. lineHeight: 1.4,
  343. },
  344. },
  345. "page-num": {
  346. type: "PageNumber",
  347. props: {
  348. format: null,
  349. fontSize: 8,
  350. color: "#cbd5e0",
  351. align: "center",
  352. },
  353. },
  354. },
  355. },
  356. },
  357. // =========================================================================
  358. // Report
  359. // =========================================================================
  360. {
  361. name: "report",
  362. label: "Quarterly Report",
  363. description:
  364. "A business report with summary data, tables, and key findings",
  365. spec: {
  366. root: "doc",
  367. elements: {
  368. doc: {
  369. type: "Document",
  370. props: {
  371. title: "Q4 2025 Report",
  372. author: "Analytics Team",
  373. subject: "Quarterly Performance",
  374. },
  375. children: ["page"],
  376. },
  377. page: {
  378. type: "Page",
  379. props: {
  380. size: "A4",
  381. orientation: null,
  382. marginTop: 50,
  383. marginBottom: 60,
  384. marginLeft: 50,
  385. marginRight: 50,
  386. backgroundColor: null,
  387. },
  388. children: [
  389. "title",
  390. "subtitle",
  391. "spacer-1",
  392. "summary-heading",
  393. "summary-text",
  394. "spacer-2",
  395. "metrics-table",
  396. "spacer-3",
  397. "findings-heading",
  398. "findings-list",
  399. "spacer-4",
  400. "divider-1",
  401. "recommendations-heading",
  402. "recommendations-text",
  403. "recommendations-list",
  404. "page-num",
  405. ],
  406. },
  407. title: {
  408. type: "Heading",
  409. props: {
  410. text: "Q4 2025 Performance Report",
  411. level: "h1",
  412. color: "#1a202c",
  413. align: "center",
  414. },
  415. },
  416. subtitle: {
  417. type: "Text",
  418. props: {
  419. text: "Analytics Division -- Prepared January 15, 2026",
  420. fontSize: 11,
  421. color: "#718096",
  422. align: "center",
  423. fontWeight: null,
  424. fontStyle: "italic",
  425. lineHeight: null,
  426. },
  427. },
  428. "spacer-1": { type: "Spacer", props: { height: 30 } },
  429. "summary-heading": {
  430. type: "Heading",
  431. props: {
  432. text: "Executive Summary",
  433. level: "h2",
  434. color: null,
  435. align: null,
  436. },
  437. },
  438. "summary-text": {
  439. type: "Text",
  440. props: {
  441. text: "Q4 2025 demonstrated strong growth across all key performance indicators. Revenue increased 23% year-over-year, driven primarily by enterprise client acquisitions and expansion of existing accounts. Customer retention remained above target at 94.2%, while new customer acquisition exceeded projections by 15%.",
  442. fontSize: 11,
  443. color: "#4a5568",
  444. align: null,
  445. fontWeight: null,
  446. fontStyle: null,
  447. lineHeight: 1.6,
  448. },
  449. },
  450. "spacer-2": { type: "Spacer", props: { height: 20 } },
  451. "metrics-table": {
  452. type: "Table",
  453. props: {
  454. columns: [
  455. { header: "Metric", width: "35%", align: null },
  456. { header: "Q3 2025", width: "20%", align: "right" },
  457. { header: "Q4 2025", width: "20%", align: "right" },
  458. { header: "Change", width: "25%", align: "right" },
  459. ],
  460. rows: [
  461. ["Revenue", "$4.2M", "$5.1M", "+21.4%"],
  462. ["New Customers", "142", "168", "+18.3%"],
  463. ["Customer Retention", "93.1%", "94.2%", "+1.1pp"],
  464. ["Avg. Deal Size", "$28,400", "$32,100", "+13.0%"],
  465. ["Support Tickets", "1,245", "1,089", "-12.5%"],
  466. ["NPS Score", "72", "78", "+6 pts"],
  467. ],
  468. headerBackgroundColor: "#3b82f6",
  469. headerTextColor: "#ffffff",
  470. borderColor: "#e2e8f0",
  471. fontSize: 10,
  472. striped: true,
  473. },
  474. },
  475. "spacer-3": { type: "Spacer", props: { height: 20 } },
  476. "findings-heading": {
  477. type: "Heading",
  478. props: {
  479. text: "Key Findings",
  480. level: "h2",
  481. color: null,
  482. align: null,
  483. },
  484. },
  485. "findings-list": {
  486. type: "List",
  487. props: {
  488. items: [
  489. "Enterprise segment grew 34%, accounting for 62% of total revenue",
  490. "Self-serve onboarding reduced time-to-value by 40%",
  491. "APAC region showed strongest growth at 45% QoQ",
  492. "Product usage increased 28% following the September feature release",
  493. "Customer support resolution time decreased from 4.2hrs to 2.8hrs",
  494. ],
  495. ordered: false,
  496. fontSize: 10,
  497. color: "#4a5568",
  498. spacing: 6,
  499. },
  500. },
  501. "spacer-4": { type: "Spacer", props: { height: 20 } },
  502. "divider-1": {
  503. type: "Divider",
  504. props: {
  505. color: "#e2e8f0",
  506. thickness: 1,
  507. marginTop: null,
  508. marginBottom: null,
  509. },
  510. },
  511. "recommendations-heading": {
  512. type: "Heading",
  513. props: {
  514. text: "Recommendations",
  515. level: "h2",
  516. color: null,
  517. align: null,
  518. },
  519. },
  520. "recommendations-text": {
  521. type: "Text",
  522. props: {
  523. text: "Based on Q4 performance data, we recommend the following strategic priorities for Q1 2026:",
  524. fontSize: 11,
  525. color: "#4a5568",
  526. align: null,
  527. fontWeight: null,
  528. fontStyle: null,
  529. lineHeight: 1.5,
  530. },
  531. },
  532. "recommendations-list": {
  533. type: "List",
  534. props: {
  535. items: [
  536. "Increase APAC sales team headcount by 30% to capitalize on regional momentum",
  537. "Invest in self-serve product analytics to further reduce onboarding friction",
  538. "Launch enterprise-tier support SLA to improve retention in top accounts",
  539. "Expand content marketing program targeting mid-market segment",
  540. ],
  541. ordered: true,
  542. fontSize: 10,
  543. color: "#4a5568",
  544. spacing: 6,
  545. },
  546. },
  547. "page-num": {
  548. type: "PageNumber",
  549. props: {
  550. format: "Page {pageNumber} of {totalPages}",
  551. fontSize: 9,
  552. color: "#a0aec0",
  553. align: "center",
  554. },
  555. },
  556. },
  557. },
  558. },
  559. // =========================================================================
  560. // Resume
  561. // =========================================================================
  562. {
  563. name: "resume",
  564. label: "Resume",
  565. description:
  566. "A professional resume with contact info, experience, education, and skills",
  567. spec: {
  568. root: "doc",
  569. elements: {
  570. doc: {
  571. type: "Document",
  572. props: {
  573. title: "Resume - Jane Cooper",
  574. author: "Jane Cooper",
  575. subject: null,
  576. },
  577. children: ["page"],
  578. },
  579. page: {
  580. type: "Page",
  581. props: {
  582. size: "LETTER",
  583. orientation: null,
  584. marginTop: 40,
  585. marginBottom: 40,
  586. marginLeft: 50,
  587. marginRight: 50,
  588. backgroundColor: null,
  589. },
  590. children: [
  591. "name",
  592. "title-text",
  593. "contact-row",
  594. "divider-top",
  595. "summary-heading",
  596. "summary-text",
  597. "divider-1",
  598. "experience-heading",
  599. "job-1-row",
  600. "job-1-desc",
  601. "job-1-highlights",
  602. "spacer-1",
  603. "job-2-row",
  604. "job-2-desc",
  605. "job-2-highlights",
  606. "divider-2",
  607. "education-heading",
  608. "edu-row",
  609. "divider-3",
  610. "skills-heading",
  611. "skills-row",
  612. ],
  613. },
  614. name: {
  615. type: "Heading",
  616. props: {
  617. text: "Jane Cooper",
  618. level: "h1",
  619. color: "#1a202c",
  620. align: "center",
  621. },
  622. },
  623. "title-text": {
  624. type: "Text",
  625. props: {
  626. text: "Senior Software Engineer",
  627. fontSize: 13,
  628. color: "#4a5568",
  629. align: "center",
  630. fontWeight: null,
  631. fontStyle: null,
  632. lineHeight: null,
  633. },
  634. },
  635. "contact-row": {
  636. type: "Row",
  637. props: {
  638. gap: 16,
  639. alignItems: null,
  640. justifyContent: "center",
  641. padding: 6,
  642. flex: null,
  643. wrap: null,
  644. },
  645. children: ["contact-email", "contact-phone", "contact-site"],
  646. },
  647. "contact-email": {
  648. type: "Link",
  649. props: {
  650. text: "jane@example.com",
  651. href: "mailto:jane@example.com",
  652. fontSize: 10,
  653. color: "#3b82f6",
  654. },
  655. },
  656. "contact-phone": {
  657. type: "Text",
  658. props: {
  659. text: "(555) 123-4567",
  660. fontSize: 10,
  661. color: "#718096",
  662. align: null,
  663. fontWeight: null,
  664. fontStyle: null,
  665. lineHeight: null,
  666. },
  667. },
  668. "contact-site": {
  669. type: "Link",
  670. props: {
  671. text: "janecooper.dev",
  672. href: "https://janecooper.dev",
  673. fontSize: 10,
  674. color: "#3b82f6",
  675. },
  676. },
  677. "divider-top": {
  678. type: "Divider",
  679. props: {
  680. color: "#2d3748",
  681. thickness: 2,
  682. marginTop: 8,
  683. marginBottom: 8,
  684. },
  685. },
  686. "summary-heading": {
  687. type: "Heading",
  688. props: {
  689. text: "Summary",
  690. level: "h3",
  691. color: "#2d3748",
  692. align: null,
  693. },
  694. },
  695. "summary-text": {
  696. type: "Text",
  697. props: {
  698. text: "Software engineer with 8+ years building high-performance web applications. Expertise in TypeScript, React, and distributed systems. Passionate about developer experience, accessibility, and mentoring engineering teams.",
  699. fontSize: 10,
  700. color: "#4a5568",
  701. align: null,
  702. fontWeight: null,
  703. fontStyle: null,
  704. lineHeight: 1.5,
  705. },
  706. },
  707. "divider-1": {
  708. type: "Divider",
  709. props: {
  710. color: "#e2e8f0",
  711. thickness: 1,
  712. marginTop: 10,
  713. marginBottom: 10,
  714. },
  715. },
  716. "experience-heading": {
  717. type: "Heading",
  718. props: {
  719. text: "Experience",
  720. level: "h3",
  721. color: "#2d3748",
  722. align: null,
  723. },
  724. },
  725. "job-1-row": {
  726. type: "Row",
  727. props: {
  728. gap: null,
  729. alignItems: null,
  730. justifyContent: "space-between",
  731. padding: null,
  732. flex: null,
  733. wrap: null,
  734. },
  735. children: ["job-1-title", "job-1-dates"],
  736. },
  737. "job-1-title": {
  738. type: "Text",
  739. props: {
  740. text: "Senior Software Engineer -- Vercel",
  741. fontSize: 11,
  742. color: null,
  743. align: null,
  744. fontWeight: "bold",
  745. fontStyle: null,
  746. lineHeight: null,
  747. },
  748. },
  749. "job-1-dates": {
  750. type: "Text",
  751. props: {
  752. text: "2022 -- Present",
  753. fontSize: 10,
  754. color: "#718096",
  755. align: null,
  756. fontWeight: null,
  757. fontStyle: "italic",
  758. lineHeight: null,
  759. },
  760. },
  761. "job-1-desc": {
  762. type: "Text",
  763. props: {
  764. text: "Led development of the Next.js deployment pipeline and developer tooling.",
  765. fontSize: 10,
  766. color: "#4a5568",
  767. align: null,
  768. fontWeight: null,
  769. fontStyle: null,
  770. lineHeight: null,
  771. },
  772. },
  773. "job-1-highlights": {
  774. type: "List",
  775. props: {
  776. items: [
  777. "Reduced build times by 45% through incremental compilation pipeline",
  778. "Designed and shipped real-time collaboration features used by 50K+ teams",
  779. "Mentored 4 junior engineers, 2 promoted to senior within 18 months",
  780. ],
  781. ordered: false,
  782. fontSize: 9,
  783. color: "#4a5568",
  784. spacing: 3,
  785. },
  786. },
  787. "spacer-1": { type: "Spacer", props: { height: 10 } },
  788. "job-2-row": {
  789. type: "Row",
  790. props: {
  791. gap: null,
  792. alignItems: null,
  793. justifyContent: "space-between",
  794. padding: null,
  795. flex: null,
  796. wrap: null,
  797. },
  798. children: ["job-2-title", "job-2-dates"],
  799. },
  800. "job-2-title": {
  801. type: "Text",
  802. props: {
  803. text: "Software Engineer -- Stripe",
  804. fontSize: 11,
  805. color: null,
  806. align: null,
  807. fontWeight: "bold",
  808. fontStyle: null,
  809. lineHeight: null,
  810. },
  811. },
  812. "job-2-dates": {
  813. type: "Text",
  814. props: {
  815. text: "2018 -- 2022",
  816. fontSize: 10,
  817. color: "#718096",
  818. align: null,
  819. fontWeight: null,
  820. fontStyle: "italic",
  821. lineHeight: null,
  822. },
  823. },
  824. "job-2-desc": {
  825. type: "Text",
  826. props: {
  827. text: "Full-stack development on the Payments Dashboard and Connect platform.",
  828. fontSize: 10,
  829. color: "#4a5568",
  830. align: null,
  831. fontWeight: null,
  832. fontStyle: null,
  833. lineHeight: null,
  834. },
  835. },
  836. "job-2-highlights": {
  837. type: "List",
  838. props: {
  839. items: [
  840. "Built the Connect Express onboarding flow, reducing merchant setup time by 60%",
  841. "Implemented real-time fraud detection UI processing 10M+ events/day",
  842. "Led migration from legacy REST APIs to GraphQL, improving data loading by 3x",
  843. ],
  844. ordered: false,
  845. fontSize: 9,
  846. color: "#4a5568",
  847. spacing: 3,
  848. },
  849. },
  850. "divider-2": {
  851. type: "Divider",
  852. props: {
  853. color: "#e2e8f0",
  854. thickness: 1,
  855. marginTop: 10,
  856. marginBottom: 10,
  857. },
  858. },
  859. "education-heading": {
  860. type: "Heading",
  861. props: {
  862. text: "Education",
  863. level: "h3",
  864. color: "#2d3748",
  865. align: null,
  866. },
  867. },
  868. "edu-row": {
  869. type: "Row",
  870. props: {
  871. gap: null,
  872. alignItems: null,
  873. justifyContent: "space-between",
  874. padding: null,
  875. flex: null,
  876. wrap: null,
  877. },
  878. children: ["edu-degree", "edu-year"],
  879. },
  880. "edu-degree": {
  881. type: "Text",
  882. props: {
  883. text: "B.S. Computer Science -- Stanford University",
  884. fontSize: 10,
  885. color: "#4a5568",
  886. align: null,
  887. fontWeight: "bold",
  888. fontStyle: null,
  889. lineHeight: null,
  890. },
  891. },
  892. "edu-year": {
  893. type: "Text",
  894. props: {
  895. text: "2014 -- 2018",
  896. fontSize: 10,
  897. color: "#718096",
  898. align: null,
  899. fontWeight: null,
  900. fontStyle: "italic",
  901. lineHeight: null,
  902. },
  903. },
  904. "divider-3": {
  905. type: "Divider",
  906. props: {
  907. color: "#e2e8f0",
  908. thickness: 1,
  909. marginTop: 10,
  910. marginBottom: 10,
  911. },
  912. },
  913. "skills-heading": {
  914. type: "Heading",
  915. props: { text: "Skills", level: "h3", color: "#2d3748", align: null },
  916. },
  917. "skills-row": {
  918. type: "Row",
  919. props: {
  920. gap: 20,
  921. alignItems: null,
  922. justifyContent: null,
  923. padding: null,
  924. flex: null,
  925. wrap: true,
  926. },
  927. children: ["skills-langs", "skills-frameworks", "skills-infra"],
  928. },
  929. "skills-langs": {
  930. type: "Column",
  931. props: {
  932. gap: 2,
  933. alignItems: null,
  934. justifyContent: null,
  935. padding: null,
  936. flex: 1,
  937. },
  938. children: ["skills-langs-label", "skills-langs-list"],
  939. },
  940. "skills-langs-label": {
  941. type: "Text",
  942. props: {
  943. text: "Languages",
  944. fontSize: 9,
  945. color: "#718096",
  946. align: null,
  947. fontWeight: "bold",
  948. fontStyle: null,
  949. lineHeight: null,
  950. },
  951. },
  952. "skills-langs-list": {
  953. type: "Text",
  954. props: {
  955. text: "TypeScript, JavaScript, Python, Go, Rust, SQL",
  956. fontSize: 9,
  957. color: "#4a5568",
  958. align: null,
  959. fontWeight: null,
  960. fontStyle: null,
  961. lineHeight: 1.4,
  962. },
  963. },
  964. "skills-frameworks": {
  965. type: "Column",
  966. props: {
  967. gap: 2,
  968. alignItems: null,
  969. justifyContent: null,
  970. padding: null,
  971. flex: 1,
  972. },
  973. children: ["skills-fw-label", "skills-fw-list"],
  974. },
  975. "skills-fw-label": {
  976. type: "Text",
  977. props: {
  978. text: "Frameworks",
  979. fontSize: 9,
  980. color: "#718096",
  981. align: null,
  982. fontWeight: "bold",
  983. fontStyle: null,
  984. lineHeight: null,
  985. },
  986. },
  987. "skills-fw-list": {
  988. type: "Text",
  989. props: {
  990. text: "React, Next.js, Node.js, Express, GraphQL, Prisma",
  991. fontSize: 9,
  992. color: "#4a5568",
  993. align: null,
  994. fontWeight: null,
  995. fontStyle: null,
  996. lineHeight: 1.4,
  997. },
  998. },
  999. "skills-infra": {
  1000. type: "Column",
  1001. props: {
  1002. gap: 2,
  1003. alignItems: null,
  1004. justifyContent: null,
  1005. padding: null,
  1006. flex: 1,
  1007. },
  1008. children: ["skills-infra-label", "skills-infra-list"],
  1009. },
  1010. "skills-infra-label": {
  1011. type: "Text",
  1012. props: {
  1013. text: "Infrastructure",
  1014. fontSize: 9,
  1015. color: "#718096",
  1016. align: null,
  1017. fontWeight: "bold",
  1018. fontStyle: null,
  1019. lineHeight: null,
  1020. },
  1021. },
  1022. "skills-infra-list": {
  1023. type: "Text",
  1024. props: {
  1025. text: "AWS, Vercel, Docker, Kubernetes, Terraform, PostgreSQL",
  1026. fontSize: 9,
  1027. color: "#4a5568",
  1028. align: null,
  1029. fontWeight: null,
  1030. fontStyle: null,
  1031. lineHeight: 1.4,
  1032. },
  1033. },
  1034. },
  1035. },
  1036. },
  1037. // =========================================================================
  1038. // Letter
  1039. // =========================================================================
  1040. {
  1041. name: "letter",
  1042. label: "Business Letter",
  1043. description:
  1044. "A formal business letter with letterhead, body paragraphs, and signature",
  1045. spec: {
  1046. root: "doc",
  1047. elements: {
  1048. doc: {
  1049. type: "Document",
  1050. props: {
  1051. title: "Business Letter",
  1052. author: "Acme Corp",
  1053. subject: null,
  1054. },
  1055. children: ["page"],
  1056. },
  1057. page: {
  1058. type: "Page",
  1059. props: {
  1060. size: "LETTER",
  1061. orientation: null,
  1062. marginTop: 60,
  1063. marginBottom: 60,
  1064. marginLeft: 70,
  1065. marginRight: 70,
  1066. backgroundColor: null,
  1067. },
  1068. children: [
  1069. "letterhead",
  1070. "divider-head",
  1071. "spacer-1",
  1072. "date",
  1073. "spacer-2",
  1074. "recipient",
  1075. "spacer-3",
  1076. "greeting",
  1077. "spacer-4",
  1078. "body-1",
  1079. "spacer-5",
  1080. "body-2",
  1081. "spacer-6",
  1082. "body-3",
  1083. "spacer-7",
  1084. "closing",
  1085. "spacer-8",
  1086. "signature",
  1087. "sender-title",
  1088. "page-num",
  1089. ],
  1090. },
  1091. letterhead: {
  1092. type: "Row",
  1093. props: {
  1094. gap: null,
  1095. alignItems: "center",
  1096. justifyContent: "space-between",
  1097. padding: null,
  1098. flex: null,
  1099. wrap: null,
  1100. },
  1101. children: ["lh-company", "lh-contact"],
  1102. },
  1103. "lh-company": {
  1104. type: "Heading",
  1105. props: {
  1106. text: "Acme Corp",
  1107. level: "h2",
  1108. color: "#2d3748",
  1109. align: null,
  1110. },
  1111. },
  1112. "lh-contact": {
  1113. type: "Column",
  1114. props: {
  1115. gap: 2,
  1116. alignItems: "flex-end",
  1117. justifyContent: null,
  1118. padding: null,
  1119. flex: null,
  1120. },
  1121. children: ["lh-addr", "lh-phone", "lh-web"],
  1122. },
  1123. "lh-addr": {
  1124. type: "Text",
  1125. props: {
  1126. text: "123 Business Ave, San Francisco, CA 94102",
  1127. fontSize: 9,
  1128. color: "#718096",
  1129. align: null,
  1130. fontWeight: null,
  1131. fontStyle: null,
  1132. lineHeight: null,
  1133. },
  1134. },
  1135. "lh-phone": {
  1136. type: "Text",
  1137. props: {
  1138. text: "(555) 987-6543",
  1139. fontSize: 9,
  1140. color: "#718096",
  1141. align: null,
  1142. fontWeight: null,
  1143. fontStyle: null,
  1144. lineHeight: null,
  1145. },
  1146. },
  1147. "lh-web": {
  1148. type: "Link",
  1149. props: {
  1150. text: "www.acmecorp.com",
  1151. href: "https://acmecorp.com",
  1152. fontSize: 9,
  1153. color: "#3b82f6",
  1154. },
  1155. },
  1156. "divider-head": {
  1157. type: "Divider",
  1158. props: {
  1159. color: "#2d3748",
  1160. thickness: 2,
  1161. marginTop: 12,
  1162. marginBottom: null,
  1163. },
  1164. },
  1165. "spacer-1": { type: "Spacer", props: { height: 30 } },
  1166. date: {
  1167. type: "Text",
  1168. props: {
  1169. text: "February 19, 2026",
  1170. fontSize: 11,
  1171. color: null,
  1172. align: null,
  1173. fontWeight: null,
  1174. fontStyle: null,
  1175. lineHeight: null,
  1176. },
  1177. },
  1178. "spacer-2": { type: "Spacer", props: { height: 20 } },
  1179. recipient: {
  1180. type: "Column",
  1181. props: {
  1182. gap: 2,
  1183. alignItems: null,
  1184. justifyContent: null,
  1185. padding: null,
  1186. flex: null,
  1187. },
  1188. children: ["rcpt-name", "rcpt-title", "rcpt-company", "rcpt-addr"],
  1189. },
  1190. "rcpt-name": {
  1191. type: "Text",
  1192. props: {
  1193. text: "Mr. John Smith",
  1194. fontSize: 11,
  1195. color: null,
  1196. align: null,
  1197. fontWeight: "bold",
  1198. fontStyle: null,
  1199. lineHeight: null,
  1200. },
  1201. },
  1202. "rcpt-title": {
  1203. type: "Text",
  1204. props: {
  1205. text: "Director of Partnerships",
  1206. fontSize: 11,
  1207. color: null,
  1208. align: null,
  1209. fontWeight: null,
  1210. fontStyle: null,
  1211. lineHeight: null,
  1212. },
  1213. },
  1214. "rcpt-company": {
  1215. type: "Text",
  1216. props: {
  1217. text: "Globex Corporation",
  1218. fontSize: 11,
  1219. color: null,
  1220. align: null,
  1221. fontWeight: null,
  1222. fontStyle: null,
  1223. lineHeight: null,
  1224. },
  1225. },
  1226. "rcpt-addr": {
  1227. type: "Text",
  1228. props: {
  1229. text: "456 Client Road, New York, NY 10001",
  1230. fontSize: 11,
  1231. color: null,
  1232. align: null,
  1233. fontWeight: null,
  1234. fontStyle: null,
  1235. lineHeight: null,
  1236. },
  1237. },
  1238. "spacer-3": { type: "Spacer", props: { height: 20 } },
  1239. greeting: {
  1240. type: "Text",
  1241. props: {
  1242. text: "Dear Mr. Smith,",
  1243. fontSize: 11,
  1244. color: null,
  1245. align: null,
  1246. fontWeight: null,
  1247. fontStyle: null,
  1248. lineHeight: null,
  1249. },
  1250. },
  1251. "spacer-4": { type: "Spacer", props: { height: 12 } },
  1252. "body-1": {
  1253. type: "Text",
  1254. props: {
  1255. text: "Thank you for taking the time to meet with our team last Thursday. We greatly enjoyed the conversation about potential collaboration opportunities between Acme Corp and Globex Corporation, and we are excited about the prospect of working together.",
  1256. fontSize: 11,
  1257. color: null,
  1258. align: null,
  1259. fontWeight: null,
  1260. fontStyle: null,
  1261. lineHeight: 1.6,
  1262. },
  1263. },
  1264. "spacer-5": { type: "Spacer", props: { height: 10 } },
  1265. "body-2": {
  1266. type: "Text",
  1267. props: {
  1268. text: "As discussed, we believe our enterprise platform can significantly streamline your operations while reducing costs by an estimated 25-30%. Our team has prepared a detailed proposal outlining the implementation timeline, resource requirements, and projected ROI. I have enclosed this document for your review.",
  1269. fontSize: 11,
  1270. color: null,
  1271. align: null,
  1272. fontWeight: null,
  1273. fontStyle: null,
  1274. lineHeight: 1.6,
  1275. },
  1276. },
  1277. "spacer-6": { type: "Spacer", props: { height: 10 } },
  1278. "body-3": {
  1279. type: "Text",
  1280. props: {
  1281. text: "We would welcome the opportunity to schedule a follow-up meeting to address any questions you may have and discuss next steps. Please do not hesitate to reach out at your convenience. We look forward to the possibility of a fruitful partnership.",
  1282. fontSize: 11,
  1283. color: null,
  1284. align: null,
  1285. fontWeight: null,
  1286. fontStyle: null,
  1287. lineHeight: 1.6,
  1288. },
  1289. },
  1290. "spacer-7": { type: "Spacer", props: { height: 24 } },
  1291. closing: {
  1292. type: "Text",
  1293. props: {
  1294. text: "Sincerely,",
  1295. fontSize: 11,
  1296. color: null,
  1297. align: null,
  1298. fontWeight: null,
  1299. fontStyle: null,
  1300. lineHeight: null,
  1301. },
  1302. },
  1303. "spacer-8": { type: "Spacer", props: { height: 30 } },
  1304. signature: {
  1305. type: "Text",
  1306. props: {
  1307. text: "Sarah Johnson",
  1308. fontSize: 11,
  1309. color: null,
  1310. align: null,
  1311. fontWeight: "bold",
  1312. fontStyle: null,
  1313. lineHeight: null,
  1314. },
  1315. },
  1316. "sender-title": {
  1317. type: "Text",
  1318. props: {
  1319. text: "VP of Business Development, Acme Corp",
  1320. fontSize: 10,
  1321. color: "#718096",
  1322. align: null,
  1323. fontWeight: null,
  1324. fontStyle: null,
  1325. lineHeight: null,
  1326. },
  1327. },
  1328. "page-num": {
  1329. type: "PageNumber",
  1330. props: {
  1331. format: null,
  1332. fontSize: 8,
  1333. color: "#cbd5e0",
  1334. align: "center",
  1335. },
  1336. },
  1337. },
  1338. },
  1339. },
  1340. ];