gedcom-ts 2026.5.2 → 2026.5.4

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.
Files changed (105) hide show
  1. package/CHANGELOG.md +46 -2
  2. package/README.md +187 -3
  3. package/dist/booklet/booklet-date-en.d.ts +9 -0
  4. package/dist/booklet/booklet-date-factory.d.ts +21 -0
  5. package/dist/booklet/booklet-date-fr.d.ts +9 -0
  6. package/dist/booklet/booklet-date.d.ts +6 -0
  7. package/dist/booklet/booklet-estimate.d.ts +12 -0
  8. package/dist/booklet/booklet-gender-core.d.ts +3 -0
  9. package/dist/booklet/booklet-gender-data.d.ts +9 -0
  10. package/dist/booklet/booklet-gender.d.ts +22 -0
  11. package/dist/booklet/booklet-locale-helpers.d.ts +4 -0
  12. package/dist/booklet/booklet-locale-loader.d.ts +27 -0
  13. package/dist/booklet/booklet-locale-modules-source.d.ts +1 -0
  14. package/dist/booklet/booklet-locale-modules.d.ts +5 -0
  15. package/dist/booklet/booklet-locale.d.ts +15 -0
  16. package/dist/booklet/booklet-logo-loader.d.ts +8 -0
  17. package/dist/booklet/booklet-logo.d.ts +15 -0
  18. package/dist/booklet/booklet-messages-data.d.ts +15 -0
  19. package/dist/booklet/booklet-messages-types.d.ts +46 -0
  20. package/dist/booklet/booklet-messages.d.ts +7 -0
  21. package/dist/booklet/booklet-narrative-en.d.ts +10 -0
  22. package/dist/booklet/booklet-narrative-engine.d.ts +17 -0
  23. package/dist/booklet/booklet-narrative-fr.d.ts +10 -0
  24. package/dist/booklet/booklet-narrative-i18n.d.ts +44 -0
  25. package/dist/booklet/booklet-narrative-locales.d.ts +3 -0
  26. package/dist/booklet/booklet-narrative.d.ts +7 -0
  27. package/dist/booklet/booklet-pdf-bidi.d.ts +5 -0
  28. package/dist/booklet/booklet-pdf-content-text.d.ts +11 -0
  29. package/dist/booklet/booklet-pdf-font-runtime.d.ts +8 -0
  30. package/dist/booklet/booklet-pdf-font-runtime.node.d.ts +3 -0
  31. package/dist/booklet/booklet-pdf-font-sources.d.ts +6 -0
  32. package/dist/booklet/booklet-pdf-font.d.ts +14 -0
  33. package/dist/booklet/booklet-pdf-fontkit.d.ts +6 -0
  34. package/dist/booklet/booklet-pdf-text.d.ts +24 -0
  35. package/dist/booklet/booklet-pdf.d.ts +35 -0
  36. package/dist/booklet/booklet-person.d.ts +51 -0
  37. package/dist/booklet/booklet-place-en.d.ts +16 -0
  38. package/dist/booklet/booklet-place-factory.d.ts +28 -0
  39. package/dist/booklet/booklet-place-fr.d.ts +24 -0
  40. package/dist/booklet/booklet-place.d.ts +13 -0
  41. package/dist/booklet/booklet-structure.d.ts +24 -0
  42. package/dist/booklet/booklet-timeline-canvas.d.ts +2 -0
  43. package/dist/booklet/booklet-timeline-loader.d.ts +6 -0
  44. package/dist/booklet/booklet-timeline-metrics.d.ts +8 -0
  45. package/dist/booklet/booklet-timeline.d.ts +31 -0
  46. package/dist/booklet/feature-chunks/booklet-logo-draw.d.ts +15 -0
  47. package/dist/booklet/feature-chunks/booklet-timeline-raster.d.ts +3 -0
  48. package/dist/booklet/font-chunks/booklet-font-subset-chars.d.ts +2 -0
  49. package/dist/booklet/font-chunks/booklet-pdf-font-bytes-ar.d.ts +2 -0
  50. package/dist/booklet/font-chunks/booklet-pdf-font-bytes-he.d.ts +2 -0
  51. package/dist/booklet/font-chunks/booklet-pdf-font-bytes-zh-ext.d.ts +2 -0
  52. package/dist/booklet/font-chunks/booklet-pdf-font-bytes-zh.d.ts +2 -0
  53. package/dist/booklet/gedcom-ts-logo.paths.d.ts +3 -0
  54. package/dist/booklet/index.d.ts +17 -0
  55. package/dist/booklet/locale-chunks/booklet-locale-ar.d.ts +3 -0
  56. package/dist/booklet/locale-chunks/booklet-locale-de.d.ts +3 -0
  57. package/dist/booklet/locale-chunks/booklet-locale-en.d.ts +3 -0
  58. package/dist/booklet/locale-chunks/booklet-locale-es.d.ts +3 -0
  59. package/dist/booklet/locale-chunks/booklet-locale-fr.d.ts +3 -0
  60. package/dist/booklet/locale-chunks/booklet-locale-he.d.ts +3 -0
  61. package/dist/booklet/locale-chunks/booklet-locale-it.d.ts +3 -0
  62. package/dist/booklet/locale-chunks/booklet-locale-nl.d.ts +3 -0
  63. package/dist/booklet/locale-chunks/booklet-locale-pl.d.ts +3 -0
  64. package/dist/booklet/locale-chunks/booklet-locale-pt.d.ts +3 -0
  65. package/dist/booklet/locale-chunks/booklet-locale-zh.d.ts +3 -0
  66. package/dist/booklet.cjs +1 -0
  67. package/dist/booklet.mjs +1 -0
  68. package/dist/feature-chunks/booklet-logo-draw.cjs +1 -0
  69. package/dist/feature-chunks/booklet-logo-draw.mjs +1 -0
  70. package/dist/feature-chunks/booklet-timeline-raster.cjs +1 -0
  71. package/dist/feature-chunks/booklet-timeline-raster.mjs +1 -0
  72. package/dist/font-chunks/booklet-pdf-font-bytes-ar.cjs +1 -0
  73. package/dist/font-chunks/booklet-pdf-font-bytes-ar.mjs +1 -0
  74. package/dist/font-chunks/booklet-pdf-font-bytes-he.cjs +1 -0
  75. package/dist/font-chunks/booklet-pdf-font-bytes-he.mjs +1 -0
  76. package/dist/font-chunks/booklet-pdf-font-bytes-zh-ext.cjs +1 -0
  77. package/dist/font-chunks/booklet-pdf-font-bytes-zh-ext.mjs +1 -0
  78. package/dist/font-chunks/booklet-pdf-font-bytes-zh.cjs +1 -0
  79. package/dist/font-chunks/booklet-pdf-font-bytes-zh.mjs +1 -0
  80. package/dist/index.cjs +1 -1
  81. package/dist/index.mjs +1 -1
  82. package/dist/locale-chunks/booklet-locale-ar.cjs +1 -0
  83. package/dist/locale-chunks/booklet-locale-ar.mjs +1 -0
  84. package/dist/locale-chunks/booklet-locale-de.cjs +1 -0
  85. package/dist/locale-chunks/booklet-locale-de.mjs +1 -0
  86. package/dist/locale-chunks/booklet-locale-en.cjs +1 -0
  87. package/dist/locale-chunks/booklet-locale-en.mjs +1 -0
  88. package/dist/locale-chunks/booklet-locale-es.cjs +1 -0
  89. package/dist/locale-chunks/booklet-locale-es.mjs +1 -0
  90. package/dist/locale-chunks/booklet-locale-fr.cjs +1 -0
  91. package/dist/locale-chunks/booklet-locale-fr.mjs +1 -0
  92. package/dist/locale-chunks/booklet-locale-he.cjs +1 -0
  93. package/dist/locale-chunks/booklet-locale-he.mjs +1 -0
  94. package/dist/locale-chunks/booklet-locale-it.cjs +1 -0
  95. package/dist/locale-chunks/booklet-locale-it.mjs +1 -0
  96. package/dist/locale-chunks/booklet-locale-nl.cjs +1 -0
  97. package/dist/locale-chunks/booklet-locale-nl.mjs +1 -0
  98. package/dist/locale-chunks/booklet-locale-pl.cjs +1 -0
  99. package/dist/locale-chunks/booklet-locale-pl.mjs +1 -0
  100. package/dist/locale-chunks/booklet-locale-pt.cjs +1 -0
  101. package/dist/locale-chunks/booklet-locale-pt.mjs +1 -0
  102. package/dist/locale-chunks/booklet-locale-zh.cjs +1 -0
  103. package/dist/locale-chunks/booklet-locale-zh.mjs +1 -0
  104. package/dist/version.d.ts +1 -1
  105. package/package.json +111 -4
package/CHANGELOG.md CHANGED
@@ -2,6 +2,50 @@
2
2
 
3
3
  All notable changes of gedcom-ts
4
4
 
5
+ ## [2026.5.4] - 2026-05-24
6
+
7
+ ### Added
8
+
9
+ - **Livret multilingue** : traductions dédiées pour les 11 langues du site (`en`, `fr`, `de`, `nl`, `es`, `zh`, `it`, `pt`, `pl`, `ar`, `he`) — messages PDF, dates, lieux, accords de genre et récits narratifs.
10
+ - **RTL arabe / hébreu** : `isBookletLocaleRtl`, `bookletTextDirection`, mise en page PDF miroir ; **`bidi-js`** (réordonnancement visuel) et **`naqqash`** (formes contextuelles arabes).
11
+ - **Polices PDF intégrées** : Noto Sans Hebrew, Noto Sans Arabic et Noto Sans SC (subset, SIL OFL) en chunks lazy (`dist/font-chunks/`) ; chunk **`booklet-pdf-font-bytes-zh-ext`** (~1,4 MiB) si le GEDCOM contient des hanzi hors subset de base.
12
+ - **Rendu bi-police** : Helvetica pour le latin + Noto pour arabe / hébreu / chinois.
13
+ - **Architecture lazy du livret** : locales (`dist/locale-chunks/`), polices, logo SVG et frise canvas (`dist/feature-chunks/`) via `import()` — cœur `gedcom-ts/booklet` ~75 KiB minifié (~100 KiB obfusqué).
14
+ - **Exports TypeScript des chunks** : chaque sous-chemin `gedcom-ts/booklet/locale-chunks/*`, `font-chunks/*` et `feature-chunks/*` expose `types` + `import` / `require`.
15
+ - **Manifeste unique** : `scripts/booklet-chunk-manifest.mjs` alimente `build.js` et `package.json` (`npm run sync:exports` ou fin de `build:js`).
16
+ - **API hôte** : `registerBookletPdfFontBytes`, `registerPdfFontkit`, `ensureBookletLocale` — preload explicite des chunks (recommandé Vite/Angular).
17
+ - **Scripts** : `prepare:locales`, `prepare:fonts`, `sync:exports`.
18
+ - **Exports** : `BOOKLET_LOCALES`, `BOOKLET_RTL_LOCALES`, `isBookletLocale`, `preparePdfText`, `PdfTextOptions`, `loadBookletPdfFontBytes`, `localeNeedsUnicodePdfFont`, …
19
+ - **Tests** : `tests/booklet/` (i18n, RTL, polices ar/zh, bidi, chunk exports, dist imports).
20
+
21
+ ### Changed
22
+
23
+ - **`pdf-lib` externalisé** : peer dependency ; `@pdf-lib/fontkit` chargé à la demande pour `zh` / `ar` / `he`.
24
+ - **Pipeline build livret** : esbuild → réécriture `./…-chunks/` → `gedcom-ts/booklet/…-chunks/` → obfuscation avec `reservedStrings` sur les chemins d’import dynamiques (analyse statique Vite).
25
+ - **`resolveBookletLocale`** : retourne la locale demandée (plus de repli silencieux vers l’anglais).
26
+ - **`drawGedcomTsLogoOnPage`** : async ; logo lazy (`getGedcomTsLogoPaths()`).
27
+ - **`ensureBookletLocale(locale)`** requis avant les APIs sync.
28
+ - **Frise chronologique** : titre et libellé « dates inconnues » localisés.
29
+ - **README** : tableau des tailles, guide d’intégration Vite/Angular.
30
+
31
+ ### Fixed
32
+
33
+ - **Vite / Angular dev** : imports dynamiques relatifs pré-bundleés dans le cache deps — chemins package explicites dans `dist/booklet.mjs` + `exports` complets.
34
+
35
+ ## [2026.5.3] - 2026-05-16
36
+
37
+ ### Added
38
+
39
+ - **Module `gedcom-ts/booklet`** : génération de livrets généalogiques en PDF (collecte des personnes, récits en français, frises chronologiques, estimation de taille, `generateGenealogyBookletPdf`, `downloadBookletPdf`). Dépendance `pdf-lib` incluse dans ce sous-paquet.
40
+ - **Logo couverture** : chemins SVG `GEDCOM_TS_LOGO_PATHS` / `GEDCOM_TS_LOGO_VIEWBOX` et `drawGedcomTsLogoOnPage` exportés ; logo gedcom-ts sur la couverture par défaut (`coverLogo` dans `BookletPdfOptions`).
41
+ - **Tests** : `tests/booklet/` (date/lieu/genre, logo, PDF smoke).
42
+ - **README** : guide `gedcom-ts/booklet`, double point d’entrée npm.
43
+
44
+ ### Changed
45
+
46
+ - **`findHarmonizationClustersFromActs`** : si plusieurs libellés similaires partagent une seule position GPS et que tous les actes ont des coordonnées, unifie automatiquement le libellé (libellé le plus long) sans cluster d’harmonisation manuel.
47
+ - Critère d’harmonisation : ne signale plus les seules variantes d’orthographe lorsque les coordonnées sont déjà identiques.
48
+
5
49
  ## [2026.5.2] - 2026-05-16
6
50
 
7
51
  ### Added
@@ -113,7 +157,7 @@ Les entrées historiques du changelog conservent leurs numéros semver d’origi
113
157
 
114
158
  - Major GEDCOM 7 coverage push: round-trip preservation (`preservedTopLevelRecords`, label-keyed FAM / NOTE xrefs, level-0 `OBJE`), richer `HEAD` export options, full P1.4 dates and places (INT/EST/CAL, `3 PHRASE`, `3 TIME`, `2 SDATE`, `2 PHRASE` event-level, ISO date input, verbatim fallback).
115
159
  - New **fluent edit layer** (`editPerson`, `editAct`, `editActs`, `editDateAct`, `editPlace`, `editNotes` + `*Edit` classes) for in-place model mutations with chainable APIs.
116
- - **README fully rewritten** with a complete public-API reference and a link to the live graphical demo at **[https://gedcomts.jaunet.me](https://gedcomts.jaunet.me)**.
160
+ - **README fully rewritten** with a complete public-API reference and a link to the live graphical demo at **[https://gedcomts.com](https://gedcomts.com)**.
117
161
 
118
162
  ### Added
119
163
 
@@ -174,7 +218,7 @@ Les entrées historiques du changelog conservent leurs numéros semver d’origi
174
218
  #### Documentation
175
219
 
176
220
  - **README intégralement réécrit** : référence complète de l’API publique (un sous-titre par export de `src/index.ts`), tables synthétiques pour `ReadGed`, `GedcomExportOptions` et la couche `*Edit`, exemples mis à jour pour chaque type / classe / fonction exposés.
177
- - Mention en tête du README du **site de démo graphique** : **[https://gedcomts.jaunet.me](https://gedcomts.jaunet.me)**.
221
+ - Mention en tête du README du **site de démo graphique** : **[https://gedcomts.com](https://gedcomts.com)**.
178
222
 
179
223
  ### Changed
180
224
 
package/README.md CHANGED
@@ -6,23 +6,29 @@
6
6
  - work with a typed JSON model (persons, acts, dates, places, notes, media, name variants, attributes)
7
7
  - edit the model in-place through a fluent, chainable API (`editPerson`, `editAct`, …)
8
8
  - export data back to GEDCOM (`.ged`) or GEDZIP (`.zip`)
9
+ - geocode event places (OpenStreetMap / Nominatim) and group similar city names
10
+ - generate a **genealogy booklet** as PDF (`gedcom-ts/booklet`, 11 locales including RTL Arabic/Hebrew)
9
11
 
10
12
  ## Live demo
11
13
 
12
- A graphical demo showcasing the public API (import a `.ged` / `.zip`, browse the typed model, export back) is available at **[https://gedcomts.jaunet.me](https://gedcomts.jaunet.me)**
14
+ A graphical demo showcasing the public API (import a `.ged` / `.zip`, browse the typed model, export back) is available at **[https://gedcomts.com](https://gedcomts.com)**
13
15
 
14
16
  ## Contents
15
17
 
16
18
  - [Installation](#installation)
17
19
  - [Quick start](#quick-start)
18
20
  - [Geocoding places](#geocoding-places)
21
+ - [Genealogy booklet (PDF)](#genealogy-booklet-pdf)
19
22
  - [API reference](#api-reference)
20
23
  - [Error handling](#error-handling)
21
24
 
22
25
  ## Package
23
26
 
24
27
  - NPM: [gedcom-ts](https://www.npmjs.com/package/gedcom-ts)
25
- - Version format **CalVer** `AAAA.M.micro` (e.g. `2026.5.2` = May 2026). See [CHANGELOG.md](CHANGELOG.md).
28
+ - Version format **CalVer** `AAAA.M.micro` (e.g. `2026.5.3` = May 2026). See [CHANGELOG.md](CHANGELOG.md).
29
+ - Entry points:
30
+ - **`gedcom-ts`** — import, model, edit layer, export, geocoding
31
+ - **`gedcom-ts/booklet`** — PDF livret (`pdf-lib` en peerDependency, chargé depuis `node_modules`)
26
32
 
27
33
  ## Installation
28
34
 
@@ -30,6 +36,14 @@ A graphical demo showcasing the public API (import a `.ged` / `.zip`, browse the
30
36
  npm install gedcom-ts
31
37
  ```
32
38
 
39
+ Both entry points come from the same package. For the PDF booklet, **`pdf-lib` is a peer dependency** — install it in your app if you use `gedcom-ts/booklet`:
40
+
41
+ ```bash
42
+ npm install pdf-lib
43
+ ```
44
+
45
+ For `zh` / `ar` / `he` PDF output, your bundler should also be able to resolve `@pdf-lib/fontkit` (included in `gedcom-ts` dependencies; the host app typically preloads it — see [Bundle layout](#bundle-layout) below).
46
+
33
47
  ## Runtime Requirements
34
48
 
35
49
  - modern browser runtime (`File`, `Blob`, `XMLHttpRequest`, `URL.createObjectURL`)
@@ -183,9 +197,179 @@ Network: `GET https://nominatim.openstreetmap.org/search?q=…&format=jsonv2` wi
183
197
 
184
198
  The legacy callback `getCityCoordinates` is deprecated — use the flow above.
185
199
 
200
+ ## Genealogy booklet (PDF)
201
+
202
+ The **`gedcom-ts/booklet`** subpath builds a printable family booklet: cover page, table of contents, chapters by generation (Sosa), family sheets, and narrative text from GEDCOM acts (birth, marriage, death, …). **English is the default locale** (`DEFAULT_BOOKLET_LOCALE`). Full copy is available for **`en`**, **`fr`**, **`de`**, **`nl`**, **`es`**, **`zh`**, **`it`**, **`pt`**, **`pl`**, **`ar`**, and **`he`** (aligned with [gedcomts.com](https://gedcomts.com) UI languages). Arabic and Hebrew use **RTL layout** in the PDF (`isBookletLocaleRtl`, `bookletTextDirection`).
203
+
204
+ ### Bundle layout
205
+
206
+ Code is split so the host app only downloads what it uses. Approximate sizes after minify (obfuscation adds ~25–30 KiB on `gedcom-ts/booklet`).
207
+
208
+ | Artifact | Size (typ.) | When loaded |
209
+ | --- | ---: | --- |
210
+ | `gedcom-ts` (`dist/index.mjs`) | ~180 KiB | GEDCOM import / edit / export |
211
+ | `gedcom-ts/booklet` (`dist/booklet.mjs`) | ~100 KiB | livret (collect, estimate, PDF) |
212
+ | `locale-chunks/booklet-locale-*` | 14–26 KiB | one UI language |
213
+ | `feature-chunks/booklet-logo-draw` | ~11 KiB | cover logo (`coverLogo !== false`) |
214
+ | `feature-chunks/booklet-timeline-raster` | ~3 KiB | `timelineStyle: "canvas"` |
215
+ | `font-chunks/booklet-pdf-font-bytes-ar` | ~43 KiB | Arabic PDF |
216
+ | `font-chunks/booklet-pdf-font-bytes-he` | ~13 KiB | Hebrew PDF |
217
+ | `font-chunks/booklet-pdf-font-bytes-zh` | ~190 KiB | Chinese PDF (base subset) |
218
+ | `font-chunks/booklet-pdf-font-bytes-zh-ext` | ~1.4 MiB | Chinese PDF when GEDCOM names need extra Han |
219
+ | `pdf-lib` (peer, not in gedcom-ts) | ~500 KiB+ | any PDF generation |
220
+
221
+ **Not bundled in gedcom-ts:** `fflate` (main entry, external), `pdf-lib` (booklet peer). **`bidi-js`** and **`naqqash`** (Arabic shaping / RTL reordering) ship inside `gedcom-ts/booklet` today.
222
+
223
+ Call **`await ensureBookletLocale(locale)`** before sync APIs. `generateGenealogyBookletPdf` preloads locale, logo, and timeline when needed.
224
+
225
+ **Lazy chunk subpaths** (for bundler preload or explicit `import()` — normal apps should use `ensureBookletLocale()` instead):
226
+
227
+ | Subpath | Role |
228
+ | --- | --- |
229
+ | `gedcom-ts/booklet/locale-chunks/booklet-locale-{en,fr,de,nl,es,zh,it,pt,pl,ar,he}` | Messages, narratives, date/place helpers per locale |
230
+ | `gedcom-ts/booklet/font-chunks/booklet-pdf-font-bytes-{ar,he,zh,zh-ext}` | Subset Noto font bytes |
231
+ | `gedcom-ts/booklet/feature-chunks/booklet-logo-draw` | Cover logo SVG paths |
232
+ | `gedcom-ts/booklet/feature-chunks/booklet-timeline-raster` | Canvas timeline PNG rasterizer |
233
+
234
+ Each subpath is listed in `package.json` **`exports`** with matching **`types`** (`.d.ts` under `dist/booklet/…`) and runtime (`.mjs` / `.cjs` under `dist/…`). TypeScript resolves them via `exports.types` (`moduleResolution: bundler` / `node16`). Adding a locale updates `scripts/booklet-chunk-manifest.mjs`; `npm run build:js` regenerates chunk files and syncs `exports`.
235
+
236
+ ### Vite / Angular integration
237
+
238
+ 1. **Lazy-load the booklet entry** — `import('gedcom-ts/booklet')` only when the user opens export / download (not on every tree page).
239
+ 2. **Preload the UI locale** — `import('gedcom-ts/booklet/locale-chunks/booklet-locale-fr')` (or your loader) before sync APIs; then `ensureBookletLocale('fr')`.
240
+ 3. **Unicode PDF (`zh` / `ar` / `he`)** — the host app should import font chunks explicitly and call `registerBookletPdfFontBytes` + `registerPdfFontkit` before `generateGenealogyBookletPdf` (see [gedcomts.com](https://gedcomts.com) `booklet-pdf-deps.loader.ts` for a reference pattern).
241
+ 4. **Dev server** — exclude the main booklet bundle from Vite pre-bundling so lazy subpaths resolve via `node_modules`:
242
+
243
+ ```ts
244
+ // vite.config.ts / angular.json (esbuild optimizeDeps)
245
+ optimizeDeps: {
246
+ exclude: ["gedcom-ts/booklet"],
247
+ },
248
+ ```
249
+
250
+ Published `dist/booklet.mjs` keeps **literal** dynamic `import('gedcom-ts/booklet/…')` strings (rewrite before obfuscation, paths reserved from string encoding) so Vite can statically analyze chunk loads.
251
+
252
+ ### Workflow
253
+
254
+ 1. Import with `importGedFile` (`gedcom-ts`).
255
+ 2. **`await ensureBookletLocale(locale)`** — load messages/narratives for the chosen language.
256
+ 3. Collect persons with `collectBookletPersons` (`gedcom-ts/booklet`).
257
+ 4. Optionally preview size with `estimateBookletSize` + `groupBookletIntoChapters`.
258
+ 5. Build bytes with `generateGenealogyBookletPdf`, then `downloadBookletPdf` (browser).
259
+
260
+ ```ts
261
+ import { importGedFile } from "gedcom-ts";
262
+ import {
263
+ collectBookletPersons,
264
+ ensureBookletLocale,
265
+ groupBookletIntoChapters,
266
+ estimateBookletSize,
267
+ generateGenealogyBookletPdf,
268
+ downloadBookletPdf,
269
+ personDisplayName,
270
+ } from "gedcom-ts/booklet";
271
+
272
+ async function exportBooklet(file: File) {
273
+ const ged = await importGedFile(file);
274
+ const root = ged.persons[0] ?? null;
275
+
276
+ const locale = "en" as const; // BookletLocale — align with your UI language (en, fr, de, nl, es, zh, it, pt, pl, ar, he)
277
+ await ensureBookletLocale(locale);
278
+
279
+ const entries = collectBookletPersons({
280
+ ged,
281
+ scope: "from-reference",
282
+ referencePerson: root,
283
+ maxGeneration: 6,
284
+ locale,
285
+ });
286
+
287
+ const chapters = groupBookletIntoChapters(entries, locale);
288
+ const families = chapters.reduce((n, ch) => n + ch.families.length, 0);
289
+ const size = estimateBookletSize(chapters, entries.length, families, "summary", "canvas", locale);
290
+ console.log(size.label);
291
+
292
+ const pdf = await generateGenealogyBookletPdf(
293
+ entries,
294
+ {
295
+ title: "Family booklet",
296
+ scopeLabel: "Ancestors and descendants",
297
+ personCount: entries.length,
298
+ referenceName: root ? personDisplayName(root) : undefined,
299
+ },
300
+ {
301
+ detailLevel: "summary",
302
+ timelineStyle: "canvas",
303
+ coverLogo: true,
304
+ locale,
305
+ },
306
+ );
307
+
308
+ downloadBookletPdf(pdf, "family-booklet.pdf");
309
+ }
310
+ ```
311
+
312
+ Use `scope: "all"` and `referencePerson: null` to include every individual in the file.
313
+
314
+ ### `collectBookletPersons` options
315
+
316
+ | Option | Role |
317
+ | --- | --- |
318
+ | `ged` | `ReadGed` after import |
319
+ | `scope` | `"all"` or `"from-reference"` (Sosa from `referencePerson`) |
320
+ | `referencePerson` | Root person for `"from-reference"`; `null` if scope is `"all"` |
321
+ | `maxGeneration` | Max Sosa generation (e.g. `6`); ignored when `scope === "all"` |
322
+ | `locale` | `BookletLocale` (default `"en"`) — `en`, `fr`, `de`, `nl`, `es`, `zh`, `it`, `pt`, `pl`, `ar`, `he` |
323
+
324
+ Helpers: `personDisplayName`, `buildBookletPersonEntry`, `sortBookletEntries`, `bookletSexFromPerson`, `DEFAULT_BOOKLET_LOCALE`, `BOOKLET_LOCALES`, `isBookletLocaleRtl`.
325
+
326
+ ### `generateGenealogyBookletPdf` options
327
+
328
+ | Option | Values | Effect |
329
+ | --- | --- | --- |
330
+ | `detailLevel` | `"summary"` \| `"detailed"` | Short prose per person vs longer biographies |
331
+ | `timelineStyle` | `"off"` \| `"canvas"` | Generation timeline pages per chapter |
332
+ | `coverLogo` | `true` (default), `false`, or `DrawGedcomTsLogoOptions` | gedcom-ts vector logo on the cover |
333
+ | `locale` | `BookletLocale` (default `"en"`) | Narrative, chapter titles, PDF chrome, timeline legend |
334
+ | `unicodeFont` | `Uint8Array` (optional) | Replace bundled Noto font for `zh` / `ar` / `he` |
335
+
336
+ `BookletPdfMeta`: `title`, `scopeLabel`, `personCount`, optional `referenceName` (usually translated in the host app).
337
+
338
+ ### Cover logo
339
+
340
+ The cover draws the **gedcom-ts logo** from lazy-loaded SVG paths (`ensureBookletLogo`, `getGedcomTsLogoPaths`, `getGedcomTsLogoViewbox`). Reuse on custom PDF pages:
341
+
342
+ ```ts
343
+ import { PDFDocument } from "pdf-lib";
344
+ import {
345
+ drawGedcomTsLogoOnPage,
346
+ defaultCoverLogoOptions,
347
+ ensureBookletLogo,
348
+ } from "gedcom-ts/booklet";
349
+
350
+ const doc = await PDFDocument.create();
351
+ const page = doc.addPage();
352
+ await ensureBookletLogo();
353
+ await drawGedcomTsLogoOnPage(page, defaultCoverLogoOptions());
354
+ ```
355
+
356
+ ### Booklet API cheat sheet
357
+
358
+ | Goal | Export |
359
+ | --- | --- |
360
+ | Persons for the booklet | `collectBookletPersons` |
361
+ | Chapters / families | `groupBookletIntoChapters`, `partnerNamesLabel` |
362
+ | Localized narratives (custom UI) | `buildPersonSummaryNarrative`, `buildPersonDetailedNarratives`, `buildFamilyNarrative`, `buildChapterIntroNarrative` |
363
+ | Page estimate | `estimateBookletSize`, `bookletSizeAdvice` |
364
+ | Timeline data / PNG | `buildGenerationTimeline`, `rasterizeGenerationTimelinePng` |
365
+ | PDF output | `generateGenealogyBookletPdf`, `downloadBookletPdf`, `toPdfText`, `preparePdfText` |
366
+ | Locale helpers | `resolveBookletLocale`, `bookletLocaleToBcp47`, `bookletTextDirection`, `BOOKLET_RTL_LOCALES`, `ensureBookletLocale` |
367
+ | Font preload (host) | `registerBookletPdfFontBytes`, `registerPdfFontkit`, `localeNeedsUnicodePdfFont` |
368
+ | Logo | `ensureBookletLogo`, `drawGedcomTsLogoOnPage`, `getGedcomTsLogoPaths`, `defaultCoverLogoOptions` |
369
+
186
370
  ## API reference
187
371
 
188
- Short description and a minimal snippet for each public export.
372
+ Short description and a minimal snippet for each export of **`gedcom-ts`**. For the PDF booklet, see [Genealogy booklet (PDF)](#genealogy-booklet-pdf) (`gedcom-ts/booklet`).
189
373
 
190
374
  ### Importing a file
191
375
 
@@ -0,0 +1,9 @@
1
+ export declare const BOOKLET_UNKNOWN_DATE_EN = "Unknown date";
2
+ /** Year-only date (optional GEDCOM qualifier). */
3
+ export declare function isYearOnlyDate(dateLabel: string): boolean;
4
+ /** "on 15 March 1991", "in 1991", "about 1700", "before 1800", etc. */
5
+ export declare function onDate(dateLabel: string): string;
6
+ /** "From 1700 to 1850" or "From 15 March 1700 to 3 January 1850". */
7
+ export declare function lifeDateRange(from: string, to: string): string;
8
+ /** "was born in 1991" or "was born on 15 March 1991". */
9
+ export declare function seesDayOn(dateLabel: string): string;
@@ -0,0 +1,21 @@
1
+ export interface BookletDateConfig {
2
+ readonly unknownDate: string;
3
+ readonly onUnknown: string;
4
+ readonly inYear: (year: string) => string;
5
+ readonly beforeYear: (year: string) => string;
6
+ readonly afterYear: (year: string) => string;
7
+ readonly aboutYear: (year: string) => string;
8
+ readonly onFullDate: (date: string) => string;
9
+ readonly lifeRange: (from: string, to: string, fromIsYearOnly: boolean) => string;
10
+ readonly seesDayInYear: (year: string) => string;
11
+ readonly seesDayOnPhrase: (phrase: string) => string;
12
+ readonly seesDayOnFullDate: (date: string) => string;
13
+ }
14
+ export interface BookletDateModule {
15
+ readonly BOOKLET_UNKNOWN_DATE: string;
16
+ isYearOnlyDate(dateLabel: string): boolean;
17
+ onDate(dateLabel: string): string;
18
+ lifeDateRange(from: string, to: string): string;
19
+ seesDayOn(dateLabel: string): string;
20
+ }
21
+ export declare function createBookletDateModule(config: BookletDateConfig): BookletDateModule;
@@ -0,0 +1,9 @@
1
+ export declare const BOOKLET_UNKNOWN_DATE_FR = "Date inconnue";
2
+ /** Date réduite à une année (éventuellement avec qualificateur GEDCOM). */
3
+ export declare function isYearOnlyDate(dateLabel: string): boolean;
4
+ /** « le 15 mars 1991 », « en 1991 », « vers 1700 », « avant 1800 »… */
5
+ export declare function onDate(dateLabel: string): string;
6
+ /** « De 1700 à 1850 » ou « Du 15 mars 1700 au 3 janvier 1850 ». */
7
+ export declare function lifeDateRange(from: string, to: string): string;
8
+ /** « voit le jour en 1991 » ou « voit le jour le 15 mars 1991 ». */
9
+ export declare function seesDayOn(dateLabel: string): string;
@@ -0,0 +1,6 @@
1
+ import type { BookletLocale } from "./booklet-locale";
2
+ export declare function unknownDateLabel(locale?: BookletLocale): string;
3
+ export declare function isYearOnlyDate(dateLabel: string, locale?: BookletLocale): boolean;
4
+ export declare function onDate(dateLabel: string, locale?: BookletLocale): string;
5
+ export declare function lifeDateRange(from: string, to: string, locale?: BookletLocale): string;
6
+ export declare function seesDayOn(dateLabel: string, locale?: BookletLocale): string;
@@ -0,0 +1,12 @@
1
+ import type { BookletTimelineStyle } from './booklet-timeline';
2
+ import type { BookletChapter, BookletDetailLevel } from './booklet-structure';
3
+ import type { BookletLocale } from './booklet-locale';
4
+ export interface BookletSizeEstimate {
5
+ readonly pages: number;
6
+ readonly label: string;
7
+ }
8
+ /** Nombre de pages frise estimé pour un chapitre (tranches dynamiques). */
9
+ export declare function estimateTimelineSliceCount(rowCount: number): number;
10
+ /** Estimation grossière du nombre de pages pour orienter l'utilisateur. */
11
+ export declare function estimateBookletSize(chapters: readonly BookletChapter[], personCount: number, familyCount: number, detailLevel: BookletDetailLevel, timelineStyle?: BookletTimelineStyle, locale?: BookletLocale): BookletSizeEstimate;
12
+ export declare function bookletSizeAdvice(personCount: number, detailLevel: BookletDetailLevel, locale?: BookletLocale): string | null;
@@ -0,0 +1,3 @@
1
+ import type { BookletSex, PersonGenderWords } from './booklet-gender';
2
+ export declare const WORDS_EN: Record<BookletSex, PersonGenderWords>;
3
+ export declare const WORDS_FR: Record<BookletSex, PersonGenderWords>;
@@ -0,0 +1,9 @@
1
+ import type { BookletLocale } from './booklet-locale';
2
+ import type { BookletSex, PersonGenderWords } from './booklet-gender';
3
+ export interface GenderPhraseBundle {
4
+ readonly recensedChildren: (count: number) => string;
5
+ readonly otherUnions: (count: number) => string;
6
+ readonly usesPluralS: boolean;
7
+ }
8
+ export declare const GENDER_WORDS: Partial<Record<BookletLocale, Record<BookletSex, PersonGenderWords>>>;
9
+ export declare const GENDER_PHRASES: Partial<Record<BookletLocale, GenderPhraseBundle>>;
@@ -0,0 +1,22 @@
1
+ import type { BookletLocale } from './booklet-locale';
2
+ /** Sexe GEDCOM exploité pour les accords du livret (M, F, U, X). */
3
+ export type BookletSex = 'M' | 'F' | 'U' | 'X';
4
+ export interface PersonGenderWords {
5
+ readonly born: string;
6
+ readonly died: string;
7
+ readonly baptized: string;
8
+ readonly present: string;
9
+ readonly linked: string;
10
+ readonly offspring: string;
11
+ readonly descendant: string;
12
+ readonly childOf: string;
13
+ readonly parentOf: string;
14
+ }
15
+ /** Participles / role words aligned with the person's sex. U and X use neutral forms. */
16
+ export declare function personGenderWords(sex: BookletSex, locale?: BookletLocale): PersonGenderWords;
17
+ /** Plural suffix (French-style locales: 0 or 1 → singular; English: unused). */
18
+ export declare function pluralS(count: number, locale?: BookletLocale): string;
19
+ /** Singular / plural pick. */
20
+ export declare function pluralPick<T>(count: number, one: T, many: T): T;
21
+ export declare function recensedChildrenPhrase(count: number, locale?: BookletLocale): string;
22
+ export declare function otherUnionsPhrase(count: number, locale?: BookletLocale): string;
@@ -0,0 +1,4 @@
1
+ /** Shared place-prefix helpers for locale date/place modules. */
2
+ export declare function hasCountryPrefix(core: string, prefixes: readonly string[]): boolean;
3
+ export declare function prefixedLocation(core: string, prefixes: readonly string[], elsePrefix: string): string;
4
+ export declare function commaPrefixedLocation(core: string, prefixes: readonly string[], elsePrefix: string): string;
@@ -0,0 +1,27 @@
1
+ import type { BookletDateModule } from './booklet-date-factory';
2
+ import type { BookletPlaceModule } from './booklet-place-factory';
3
+ import type { BookletSex, PersonGenderWords } from './booklet-gender';
4
+ import type { GenderPhraseBundle } from './booklet-gender-data';
5
+ import type { BookletLocale } from './booklet-locale';
6
+ import type { BookletMessages } from './booklet-messages-types';
7
+ import type { NarrativeModule } from './booklet-narrative-engine';
8
+ export interface BookletLocaleBundle {
9
+ readonly messages: BookletMessages;
10
+ readonly genderWords: Record<BookletSex, PersonGenderWords>;
11
+ readonly genderPhrases?: GenderPhraseBundle;
12
+ readonly dateModule: BookletDateModule;
13
+ readonly placeModule: BookletPlaceModule;
14
+ readonly narrativeModule: NarrativeModule;
15
+ }
16
+ export declare class BookletLocaleNotLoadedError extends Error {
17
+ constructor(locale: BookletLocale);
18
+ }
19
+ /** Clears cached locale bundles (tests). */
20
+ export declare function clearBookletLocaleCache(): void;
21
+ /**
22
+ * Lazy-loads messages, gender, date/place, and narrative modules for one locale.
23
+ * Required before sync APIs (`getBookletMessages`, `collectBookletPersons`, …).
24
+ */
25
+ export declare function ensureBookletLocale(locale?: BookletLocale): Promise<BookletLocale>;
26
+ export declare function getBookletLocaleBundle(locale: BookletLocale): BookletLocaleBundle;
27
+ export declare function isBookletLocaleLoaded(locale: BookletLocale): boolean;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ import type { BookletLocale } from './booklet-locale';
2
+ export declare function getBookletDateModule(locale: BookletLocale): import("./booklet-date-factory").BookletDateModule;
3
+ export declare function getBookletPlaceModule(locale: BookletLocale): import("./booklet-place-factory").BookletPlaceModule;
4
+ export declare function getBookletDateModuleIfLoaded(locale?: BookletLocale): import("./booklet-date-factory").BookletDateModule;
5
+ export declare function getBookletPlaceModuleIfLoaded(locale?: BookletLocale): import("./booklet-place-factory").BookletPlaceModule;
@@ -0,0 +1,15 @@
1
+ /** Booklet narrative / PDF locales (aligned with gedcomts.com site languages). */
2
+ export type BookletLocale = 'en' | 'fr' | 'de' | 'nl' | 'es' | 'zh' | 'it' | 'pt' | 'pl' | 'ar' | 'he';
3
+ export declare const DEFAULT_BOOKLET_LOCALE: BookletLocale;
4
+ export declare const BOOKLET_LOCALES: readonly BookletLocale[];
5
+ /** Locales with full booklet copy (messages, dates, places, gender, narratives). */
6
+ export declare const BOOKLET_LOCALES_IMPLEMENTED: readonly BookletLocale[];
7
+ export declare const BOOKLET_RTL_LOCALES: readonly BookletLocale[];
8
+ export declare function isBookletLocale(value: string | null | undefined): value is BookletLocale;
9
+ export declare function resolveBookletLocale(locale?: BookletLocale): BookletLocale;
10
+ export declare function isBookletLocaleRtl(locale?: BookletLocale): boolean;
11
+ export declare function bookletTextDirection(locale?: BookletLocale): 'ltr' | 'rtl';
12
+ /** BCP 47 tag for `toLocaleDateString` on the PDF cover. */
13
+ export declare function bookletLocaleToBcp47(locale: BookletLocale): string;
14
+ /** `Intl.Collator` / `localeCompare` tag for chapter name ordering. */
15
+ export declare function bookletLocaleCompareTag(locale: BookletLocale): string;
@@ -0,0 +1,8 @@
1
+ import type { PDFPage } from 'pdf-lib';
2
+ import type { DrawGedcomTsLogoOptions, GedcomTsLogoLayout } from './booklet-logo';
3
+ export declare function clearBookletLogoCache(): void;
4
+ /** Loads SVG logo paths and draw helper (only when the cover logo is shown). */
5
+ export declare function ensureBookletLogo(): Promise<void>;
6
+ export declare function drawGedcomTsLogoOnPage(page: PDFPage, options?: DrawGedcomTsLogoOptions): Promise<GedcomTsLogoLayout>;
7
+ export declare function getGedcomTsLogoPaths(): Promise<readonly string[]>;
8
+ export declare function getGedcomTsLogoViewbox(): Promise<string>;
@@ -0,0 +1,15 @@
1
+ import { type RGB } from 'pdf-lib';
2
+ /** Couleur de marque gedcom-ts (#19196f), pour pdf-lib `rgb(...)`. */
3
+ export declare const BOOKLET_BRAND_RGB: RGB;
4
+ export interface GedcomTsLogoLayout {
5
+ readonly bottomY: number;
6
+ readonly height: number;
7
+ }
8
+ export interface DrawGedcomTsLogoOptions {
9
+ readonly pageWidth?: number;
10
+ readonly maxWidth?: number;
11
+ readonly bottomY?: number;
12
+ readonly color?: RGB;
13
+ }
14
+ /** Options par défaut du logo sur une page A4 (couverture du livret). */
15
+ export declare function defaultCoverLogoOptions(pageWidth?: number, pageHeight?: number): DrawGedcomTsLogoOptions;
@@ -0,0 +1,15 @@
1
+ import type { BookletMessages } from './booklet-messages-types';
2
+ import type { BookletLocale } from './booklet-locale';
3
+ export declare const MESSAGES_EN: BookletMessages;
4
+ export declare const MESSAGES_FR: BookletMessages;
5
+ export declare const MESSAGES_DE: BookletMessages;
6
+ export declare const MESSAGES_NL: BookletMessages;
7
+ export declare const MESSAGES_ES: BookletMessages;
8
+ export declare const MESSAGES_ZH: BookletMessages;
9
+ export declare const MESSAGES_IT: BookletMessages;
10
+ export declare const MESSAGES_PT: BookletMessages;
11
+ export declare const MESSAGES_PL: BookletMessages;
12
+ export declare const MESSAGES_AR: BookletMessages;
13
+ export declare const MESSAGES_HE: BookletMessages;
14
+ export declare const BOOKLET_MESSAGES: Record<BookletLocale, BookletMessages>;
15
+ export declare function messagesForLocale(locale: BookletLocale): BookletMessages;
@@ -0,0 +1,46 @@
1
+ import type { BookletLocale } from './booklet-locale';
2
+ export interface BookletMessages {
3
+ readonly unknownDates: string;
4
+ readonly unknownDate: string;
5
+ readonly chapterUnknownDates: string;
6
+ readonly generation1Title: string;
7
+ readonly generationTitle: (gen: number) => string;
8
+ readonly letterTitle: (letter: string) => string;
9
+ readonly chapterSubtitle: (count: number, dateRange: string) => string;
10
+ readonly chapterDateAbout: string;
11
+ readonly childrenNone: string;
12
+ readonly childrenMore: (n: number) => string;
13
+ readonly pagesEstimate: (n: number) => string;
14
+ readonly pagesEmpty: string;
15
+ readonly adviceDetailed120: string;
16
+ readonly adviceDetailed50: string;
17
+ readonly adviceSummary25: string;
18
+ readonly actTypeLabels: Partial<Record<string, string>>;
19
+ readonly spouseUnknown: string;
20
+ readonly timelineTitle: (chapterTitle: string) => string;
21
+ readonly timelineUnknownDates: string;
22
+ readonly pdf: {
23
+ readonly coverSubtitle: string;
24
+ readonly referencePerson: (name: string) => string;
25
+ readonly personCount: (n: number) => string;
26
+ readonly localNote: string;
27
+ readonly tocTitle: string;
28
+ readonly modeSummary: string;
29
+ readonly modeDetailed: string;
30
+ readonly contentHeading: string;
31
+ readonly introSummary: string;
32
+ readonly introDetailed: string;
33
+ readonly introSosa: string;
34
+ readonly familyHeading: (names: string) => string;
35
+ readonly generationLabel: (gen: number) => string;
36
+ readonly pageFooter: (n: number) => string;
37
+ };
38
+ readonly timeline: {
39
+ readonly legendBirth: string;
40
+ readonly legendDeath: string;
41
+ readonly legendMarriage: string;
42
+ readonly overflow: (n: number) => string;
43
+ readonly continuation: string;
44
+ };
45
+ }
46
+ export type { BookletLocale };
@@ -0,0 +1,7 @@
1
+ import type { BookletLocale } from './booklet-locale';
2
+ export type { BookletMessages } from './booklet-messages-types';
3
+ export { ensureBookletLocale, clearBookletLocaleCache, isBookletLocaleLoaded } from './booklet-locale-loader';
4
+ export declare function getBookletMessages(locale?: BookletLocale): import("./booklet-messages-types").BookletMessages;
5
+ export declare function actTypeLabel(type: string, locale?: BookletLocale): string;
6
+ /** Loads locale data then returns messages (convenience for async call sites). */
7
+ export declare function loadBookletMessages(locale?: BookletLocale): Promise<import("./booklet-messages-types").BookletMessages>;
@@ -0,0 +1,10 @@
1
+ import type { BookletPersonEntry } from './booklet-person';
2
+ import type { BookletChapter, BookletDetailLevel, BookletFamilyUnit } from './booklet-structure';
3
+ /** Chapter: narrative opening sentence. */
4
+ export declare function buildChapterIntroNarrative(chapter: BookletChapter): string;
5
+ /** Family sheet as narrative. */
6
+ export declare function buildFamilyNarrative(family: BookletFamilyUnit, detailLevel: BookletDetailLevel): readonly string[];
7
+ /** Condensed portrait: one flowing paragraph, name cited once. */
8
+ export declare function buildPersonSummaryNarrative(entry: BookletPersonEntry): string;
9
+ /** Detailed portrait: a few paragraphs, without redundant birth/death. */
10
+ export declare function buildPersonDetailedNarratives(entry: BookletPersonEntry): readonly string[];
@@ -0,0 +1,17 @@
1
+ import type { BookletDateModule } from './booklet-date-factory';
2
+ import type { BookletPlaceModule } from './booklet-place-factory';
3
+ import type { BookletLocale } from './booklet-locale';
4
+ import type { NarrativeStrings } from './booklet-narrative-i18n';
5
+ import type { BookletPersonEntry } from './booklet-person';
6
+ import type { BookletChapter, BookletDetailLevel, BookletFamilyUnit } from './booklet-structure';
7
+ export interface NarrativeModule {
8
+ buildChapterIntroNarrative: (chapter: BookletChapter) => string;
9
+ buildFamilyNarrative: (family: BookletFamilyUnit, detailLevel: BookletDetailLevel) => readonly string[];
10
+ buildPersonSummaryNarrative: (entry: BookletPersonEntry) => string;
11
+ buildPersonDetailedNarratives: (entry: BookletPersonEntry) => readonly string[];
12
+ }
13
+ export declare function createNarrativeModule(locale: BookletLocale, strings: NarrativeStrings, deps: {
14
+ readonly dateModule: BookletDateModule;
15
+ readonly placeModule: BookletPlaceModule;
16
+ readonly unknownDates: string;
17
+ }): NarrativeModule;
@@ -0,0 +1,10 @@
1
+ import type { BookletPersonEntry } from './booklet-person';
2
+ import type { BookletChapter, BookletDetailLevel, BookletFamilyUnit } from './booklet-structure';
3
+ /** Chapitre : phrase d'ouverture narrative. */
4
+ export declare function buildChapterIntroNarrative(chapter: BookletChapter): string;
5
+ /** Fiche famille en récit. */
6
+ export declare function buildFamilyNarrative(family: BookletFamilyUnit, detailLevel: BookletDetailLevel): readonly string[];
7
+ /** Portrait condensé : un paragraphe fluide, nom cité une fois. */
8
+ export declare function buildPersonSummaryNarrative(entry: BookletPersonEntry): string;
9
+ /** Portrait détaillé : peu de paragraphes, sans redondance naissance/décès. */
10
+ export declare function buildPersonDetailedNarratives(entry: BookletPersonEntry): readonly string[];