schematex 0.5.2 → 0.6.1

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 (182) hide show
  1. package/README.md +75 -1
  2. package/dist/ai/ai-sdk.cjs +23 -23
  3. package/dist/ai/ai-sdk.d.cts +4 -4
  4. package/dist/ai/ai-sdk.d.ts +4 -4
  5. package/dist/ai/ai-sdk.js +18 -18
  6. package/dist/ai/index.cjs +35 -27
  7. package/dist/ai/index.d.cts +4 -4
  8. package/dist/ai/index.d.ts +4 -4
  9. package/dist/ai/index.js +18 -18
  10. package/dist/{api-Cr_MxttI.d.ts → api-BEJTXyBA.d.cts} +3 -40
  11. package/dist/{api-C5SECOxZ.d.cts → api-DFrSR3lw.d.ts} +3 -40
  12. package/dist/browser.cjs +24 -24
  13. package/dist/browser.d.cts +3 -3
  14. package/dist/browser.d.ts +3 -3
  15. package/dist/browser.js +18 -18
  16. package/dist/{chunk-N7W5KZK7.cjs → chunk-2L4YXZAZ.cjs} +4 -4
  17. package/dist/{chunk-N7W5KZK7.cjs.map → chunk-2L4YXZAZ.cjs.map} +1 -1
  18. package/dist/{chunk-ZYRCPSBU.js → chunk-3IE7KZY4.js} +4 -4
  19. package/dist/{chunk-ZYRCPSBU.js.map → chunk-3IE7KZY4.js.map} +1 -1
  20. package/dist/{chunk-ZX74KJPM.js → chunk-3VB5AT4R.js} +3 -3
  21. package/dist/{chunk-ZX74KJPM.js.map → chunk-3VB5AT4R.js.map} +1 -1
  22. package/dist/{chunk-S2KJRHDZ.cjs → chunk-4UFR2LB6.cjs} +13 -13
  23. package/dist/{chunk-S2KJRHDZ.cjs.map → chunk-4UFR2LB6.cjs.map} +1 -1
  24. package/dist/{chunk-4QPDZJAL.cjs → chunk-4XR7X7XW.cjs} +11569 -9045
  25. package/dist/chunk-4XR7X7XW.cjs.map +1 -0
  26. package/dist/{chunk-6OSUNBZY.js → chunk-522WB2EH.js} +135 -7
  27. package/dist/chunk-522WB2EH.js.map +1 -0
  28. package/dist/{chunk-QTNPMIO2.cjs → chunk-6JI6FWLZ.cjs} +341 -35
  29. package/dist/chunk-6JI6FWLZ.cjs.map +1 -0
  30. package/dist/{chunk-UFTYX73U.js → chunk-7F76AWOI.js} +339 -35
  31. package/dist/chunk-7F76AWOI.js.map +1 -0
  32. package/dist/{chunk-BW4KGTV7.cjs → chunk-C5C5EF3W.cjs} +4 -4
  33. package/dist/{chunk-BW4KGTV7.cjs.map → chunk-C5C5EF3W.cjs.map} +1 -1
  34. package/dist/{chunk-VJGMEGMR.js → chunk-DOK7LKLO.js} +125 -13
  35. package/dist/chunk-DOK7LKLO.js.map +1 -0
  36. package/dist/{chunk-L3CTXXVZ.js → chunk-FBS3PACU.js} +3 -3
  37. package/dist/{chunk-L3CTXXVZ.js.map → chunk-FBS3PACU.js.map} +1 -1
  38. package/dist/{chunk-QUKVGHN4.cjs → chunk-FKJBXGWP.cjs} +4 -4
  39. package/dist/{chunk-QUKVGHN4.cjs.map → chunk-FKJBXGWP.cjs.map} +1 -1
  40. package/dist/{chunk-SZK376QB.js → chunk-H4MT5TJP.js} +3 -3
  41. package/dist/{chunk-SZK376QB.js.map → chunk-H4MT5TJP.js.map} +1 -1
  42. package/dist/{chunk-3M6T7KB4.js → chunk-HAZALB7U.js} +3 -3
  43. package/dist/{chunk-3M6T7KB4.js.map → chunk-HAZALB7U.js.map} +1 -1
  44. package/dist/{chunk-VFZOPRQP.cjs → chunk-HWVBHU3O.cjs} +5 -5
  45. package/dist/{chunk-VFZOPRQP.cjs.map → chunk-HWVBHU3O.cjs.map} +1 -1
  46. package/dist/{chunk-OK5ZS3LU.js → chunk-I2GQYOZ5.js} +11586 -9069
  47. package/dist/chunk-I2GQYOZ5.js.map +1 -0
  48. package/dist/{chunk-D7EHZFK4.cjs → chunk-L7POWM5B.cjs} +138 -2
  49. package/dist/chunk-L7POWM5B.cjs.map +1 -0
  50. package/dist/{chunk-2VNMKOUO.js → chunk-LRI4RH2N.js} +135 -3
  51. package/dist/chunk-LRI4RH2N.js.map +1 -0
  52. package/dist/{chunk-EPKIJEH7.js → chunk-MFAMNFPA.js} +63 -6
  53. package/dist/chunk-MFAMNFPA.js.map +1 -0
  54. package/dist/{chunk-VDSYMSUY.js → chunk-MVIEIKOI.js} +3 -3
  55. package/dist/{chunk-VDSYMSUY.js.map → chunk-MVIEIKOI.js.map} +1 -1
  56. package/dist/{chunk-ZL5RB4UV.js → chunk-N5B242WY.js} +3 -3
  57. package/dist/{chunk-ZL5RB4UV.js.map → chunk-N5B242WY.js.map} +1 -1
  58. package/dist/{chunk-VKPCR7BG.js → chunk-OTSVMKII.js} +883 -12
  59. package/dist/chunk-OTSVMKII.js.map +1 -0
  60. package/dist/{chunk-YLEVMOK2.cjs → chunk-R66QG3XT.cjs} +5 -4
  61. package/dist/{chunk-YLEVMOK2.cjs.map → chunk-R66QG3XT.cjs.map} +1 -1
  62. package/dist/{chunk-3M6WB62Y.cjs → chunk-R6VX5YTJ.cjs} +139 -7
  63. package/dist/chunk-R6VX5YTJ.cjs.map +1 -0
  64. package/dist/{chunk-I55HO32M.js → chunk-RJMCWT7Z.js} +3 -3
  65. package/dist/{chunk-I55HO32M.js.map → chunk-RJMCWT7Z.js.map} +1 -1
  66. package/dist/{chunk-TZTCIAYW.cjs → chunk-S3RMAXH5.cjs} +137 -25
  67. package/dist/chunk-S3RMAXH5.cjs.map +1 -0
  68. package/dist/{chunk-HK56GQQP.cjs → chunk-SSLNPHCL.cjs} +886 -13
  69. package/dist/chunk-SSLNPHCL.cjs.map +1 -0
  70. package/dist/{chunk-IBRW3UOA.js → chunk-TWLKXV2O.js} +3 -3
  71. package/dist/{chunk-IBRW3UOA.js.map → chunk-TWLKXV2O.js.map} +1 -1
  72. package/dist/{chunk-VCH7RI5H.js → chunk-UWA5MWCI.js} +4 -4
  73. package/dist/chunk-UWA5MWCI.js.map +1 -0
  74. package/dist/{chunk-RYVV5UVI.cjs → chunk-V4GILQR6.cjs} +4 -4
  75. package/dist/{chunk-RYVV5UVI.cjs.map → chunk-V4GILQR6.cjs.map} +1 -1
  76. package/dist/{chunk-QMTWG6JL.cjs → chunk-V4RO5KYY.cjs} +6 -4
  77. package/dist/chunk-V4RO5KYY.cjs.map +1 -0
  78. package/dist/{chunk-VZ5LDNHK.cjs → chunk-VTSH4YPT.cjs} +12 -12
  79. package/dist/{chunk-VZ5LDNHK.cjs.map → chunk-VTSH4YPT.cjs.map} +1 -1
  80. package/dist/{chunk-UUBNQV2T.cjs → chunk-WQDIZH2Z.cjs} +12 -12
  81. package/dist/{chunk-UUBNQV2T.cjs.map → chunk-WQDIZH2Z.cjs.map} +1 -1
  82. package/dist/{chunk-SUIDD2C5.cjs → chunk-XNCOSVNG.cjs} +63 -6
  83. package/dist/chunk-XNCOSVNG.cjs.map +1 -0
  84. package/dist/{chunk-EGSUMHCS.cjs → chunk-YB4XJY5L.cjs} +12 -12
  85. package/dist/{chunk-EGSUMHCS.cjs.map → chunk-YB4XJY5L.cjs.map} +1 -1
  86. package/dist/{chunk-JHDR56XO.js → chunk-YS6CGUNH.js} +3 -3
  87. package/dist/{chunk-JHDR56XO.js.map → chunk-YS6CGUNH.js.map} +1 -1
  88. package/dist/{types-WTr9W5Ud.d.ts → diagnostics-B-ffSEhl.d.cts} +82 -2
  89. package/dist/{types-WTr9W5Ud.d.cts → diagnostics-B-ffSEhl.d.ts} +82 -2
  90. package/dist/diagrams/blockdiagram/index.cjs +5 -5
  91. package/dist/diagrams/blockdiagram/index.d.cts +1 -1
  92. package/dist/diagrams/blockdiagram/index.d.ts +1 -1
  93. package/dist/diagrams/blockdiagram/index.js +1 -1
  94. package/dist/diagrams/circuit/index.cjs +8 -8
  95. package/dist/diagrams/circuit/index.d.cts +1 -1
  96. package/dist/diagrams/circuit/index.d.ts +1 -1
  97. package/dist/diagrams/circuit/index.js +2 -2
  98. package/dist/diagrams/ecomap/index.cjs +7 -7
  99. package/dist/diagrams/ecomap/index.d.cts +1 -1
  100. package/dist/diagrams/ecomap/index.d.ts +1 -1
  101. package/dist/diagrams/ecomap/index.js +2 -2
  102. package/dist/diagrams/entity/index.cjs +6 -6
  103. package/dist/diagrams/entity/index.d.cts +1 -1
  104. package/dist/diagrams/entity/index.d.ts +1 -1
  105. package/dist/diagrams/entity/index.js +2 -2
  106. package/dist/diagrams/fishbone/index.cjs +8 -8
  107. package/dist/diagrams/fishbone/index.d.cts +1 -1
  108. package/dist/diagrams/fishbone/index.d.ts +1 -1
  109. package/dist/diagrams/fishbone/index.js +2 -2
  110. package/dist/diagrams/flowchart/index.cjs +8 -8
  111. package/dist/diagrams/flowchart/index.d.cts +2 -2
  112. package/dist/diagrams/flowchart/index.d.ts +2 -2
  113. package/dist/diagrams/flowchart/index.js +2 -2
  114. package/dist/diagrams/genogram/index.cjs +9 -9
  115. package/dist/diagrams/genogram/index.d.cts +1 -1
  116. package/dist/diagrams/genogram/index.d.ts +1 -1
  117. package/dist/diagrams/genogram/index.js +2 -2
  118. package/dist/diagrams/ladder/index.cjs +6 -6
  119. package/dist/diagrams/ladder/index.d.cts +1 -1
  120. package/dist/diagrams/ladder/index.d.ts +1 -1
  121. package/dist/diagrams/ladder/index.js +2 -2
  122. package/dist/diagrams/logic/index.cjs +6 -6
  123. package/dist/diagrams/logic/index.d.cts +1 -1
  124. package/dist/diagrams/logic/index.d.ts +1 -1
  125. package/dist/diagrams/logic/index.js +2 -2
  126. package/dist/diagrams/orgchart/index.cjs +7 -7
  127. package/dist/diagrams/orgchart/index.d.cts +1 -1
  128. package/dist/diagrams/orgchart/index.d.ts +1 -1
  129. package/dist/diagrams/orgchart/index.js +2 -2
  130. package/dist/diagrams/pedigree/index.cjs +7 -7
  131. package/dist/diagrams/pedigree/index.d.cts +1 -1
  132. package/dist/diagrams/pedigree/index.d.ts +1 -1
  133. package/dist/diagrams/pedigree/index.js +2 -2
  134. package/dist/diagrams/phylo/index.cjs +7 -7
  135. package/dist/diagrams/phylo/index.d.cts +1 -1
  136. package/dist/diagrams/phylo/index.d.ts +1 -1
  137. package/dist/diagrams/phylo/index.js +2 -2
  138. package/dist/diagrams/sld/index.cjs +14 -6
  139. package/dist/diagrams/sld/index.d.cts +14 -2
  140. package/dist/diagrams/sld/index.d.ts +14 -2
  141. package/dist/diagrams/sld/index.js +2 -2
  142. package/dist/diagrams/sociogram/index.cjs +6 -6
  143. package/dist/diagrams/sociogram/index.d.cts +1 -1
  144. package/dist/diagrams/sociogram/index.d.ts +1 -1
  145. package/dist/diagrams/sociogram/index.js +2 -2
  146. package/dist/diagrams/timing/index.d.cts +1 -1
  147. package/dist/diagrams/timing/index.d.ts +1 -1
  148. package/dist/diagrams/venn/index.cjs +9 -9
  149. package/dist/diagrams/venn/index.d.cts +1 -1
  150. package/dist/diagrams/venn/index.d.ts +1 -1
  151. package/dist/diagrams/venn/index.js +2 -2
  152. package/dist/{index-BD2yDfQM.d.cts → index-DPWdYfNx.d.ts} +60 -2
  153. package/dist/{index-C30zQWZI.d.ts → index-S0njakQ2.d.cts} +60 -2
  154. package/dist/index.cjs +344 -56
  155. package/dist/index.cjs.map +1 -1
  156. package/dist/index.d.cts +38 -4
  157. package/dist/index.d.ts +38 -4
  158. package/dist/index.js +284 -17
  159. package/dist/index.js.map +1 -1
  160. package/dist/react.cjs +18 -18
  161. package/dist/react.d.cts +2 -2
  162. package/dist/react.d.ts +2 -2
  163. package/dist/react.js +17 -17
  164. package/dist/{tools-DlpuE76u.d.cts → tools-CeGGMCs7.d.cts} +12 -4
  165. package/dist/{tools-BHWaJPOl.d.ts → tools-kK_enDwb.d.ts} +12 -4
  166. package/package.json +1 -1
  167. package/dist/chunk-2VNMKOUO.js.map +0 -1
  168. package/dist/chunk-3M6WB62Y.cjs.map +0 -1
  169. package/dist/chunk-4QPDZJAL.cjs.map +0 -1
  170. package/dist/chunk-6OSUNBZY.js.map +0 -1
  171. package/dist/chunk-D7EHZFK4.cjs.map +0 -1
  172. package/dist/chunk-EPKIJEH7.js.map +0 -1
  173. package/dist/chunk-HK56GQQP.cjs.map +0 -1
  174. package/dist/chunk-OK5ZS3LU.js.map +0 -1
  175. package/dist/chunk-QMTWG6JL.cjs.map +0 -1
  176. package/dist/chunk-QTNPMIO2.cjs.map +0 -1
  177. package/dist/chunk-SUIDD2C5.cjs.map +0 -1
  178. package/dist/chunk-TZTCIAYW.cjs.map +0 -1
  179. package/dist/chunk-UFTYX73U.js.map +0 -1
  180. package/dist/chunk-VCH7RI5H.js.map +0 -1
  181. package/dist/chunk-VJGMEGMR.js.map +0 -1
  182. package/dist/chunk-VKPCR7BG.js.map +0 -1
@@ -2,7 +2,7 @@
2
2
 
3
3
  var chunk3KRL2EGN_cjs = require('./chunk-3KRL2EGN.cjs');
4
4
  var chunk5UCXMYE7_cjs = require('./chunk-5UCXMYE7.cjs');
5
- var chunkD7EHZFK4_cjs = require('./chunk-D7EHZFK4.cjs');
5
+ var chunkL7POWM5B_cjs = require('./chunk-L7POWM5B.cjs');
6
6
  var chunk3WNW5Y7P_cjs = require('./chunk-3WNW5Y7P.cjs');
7
7
 
8
8
  // src/diagrams/genogram/parser.ts
@@ -418,6 +418,13 @@ function splitIdAndProps(trimmed) {
418
418
  function propsTokens(propsStr) {
419
419
  return splitProps(propsStr).map((t) => t.trim().toLowerCase());
420
420
  }
421
+ function unquote(value) {
422
+ return value.replace(/^["'“「『]|["'”」』]$/g, "").trim();
423
+ }
424
+ function yearOf(value) {
425
+ const m = value.match(/(\d{4})/);
426
+ return m ? parseInt(m[1], 10) : void 0;
427
+ }
421
428
  function splitProps(propsStr) {
422
429
  const result = [];
423
430
  let current = "";
@@ -482,6 +489,35 @@ function buildIndividual(id, propsStr, lineNum, lineText) {
482
489
  } else if (key === "death") {
483
490
  const deathNum = parseInt(value, 10);
484
491
  if (!isNaN(deathNum)) individual.deathYear = deathNum;
492
+ } else if (key === "dob") {
493
+ const v = unquote(value);
494
+ individual.dob = v;
495
+ const yr = yearOf(v);
496
+ if (yr !== void 0 && individual.birthYear === void 0) {
497
+ individual.birthYear = yr;
498
+ }
499
+ } else if (key === "dod") {
500
+ const v = unquote(value);
501
+ individual.dod = v;
502
+ const yr = yearOf(v);
503
+ if (yr !== void 0 && individual.deathYear === void 0) {
504
+ individual.deathYear = yr;
505
+ }
506
+ if (individual.status === "alive") individual.status = "deceased";
507
+ } else if (key === "note") {
508
+ individual.note = unquote(value);
509
+ } else if (key === "birth") {
510
+ const v = value.trim().toLowerCase();
511
+ if (v === "out-of-wedlock" || v === "adopted" || v === "legitimate") {
512
+ individual.birthStatus = v;
513
+ } else {
514
+ throw new ParseError(
515
+ `Invalid birth status '${value}'. Valid: legitimate, out-of-wedlock, adopted`,
516
+ lineNum,
517
+ 1,
518
+ lineText
519
+ );
520
+ }
485
521
  } else if (key === "label") {
486
522
  individual.label = value.replace(/^"|"$/g, "");
487
523
  } else if (key === "sibling-of") {
@@ -504,7 +540,7 @@ function buildIndividual(id, propsStr, lineNum, lineText) {
504
540
  }
505
541
  } else {
506
542
  throw new ParseError(
507
- `Unknown property '${token}'. Valid: male, female, unknown, deceased, stillborn, miscarriage, abortion, adopted, foster, guardian, twin-identical, twin-fraternal, index, unknown-siblings, a 4-digit year, conditions:..., age:N, death:YYYY, label:"...", sibling-of:ID, or key:value`,
543
+ `Unknown property '${token}'. Valid: male, female, unknown, deceased, stillborn, miscarriage, abortion, adopted, foster, guardian, twin-identical, twin-fraternal, index, unknown-siblings, a 4-digit year, conditions:..., age:N, death:YYYY, dob:"YYYY-MM-DD", dod:"YYYY-MM-DD", note:"...", birth:out-of-wedlock|adopted, label:"...", sibling-of:ID, or key:value`,
508
544
  lineNum,
509
545
  1,
510
546
  lineText
@@ -596,6 +632,10 @@ function mergeIndividual(existing, incoming, lineNum, lineText) {
596
632
  label: mergedLabel,
597
633
  birthYear: incoming.birthYear ?? existing.birthYear,
598
634
  deathYear: incoming.deathYear ?? existing.deathYear,
635
+ dob: incoming.dob ?? existing.dob,
636
+ dod: incoming.dod ?? existing.dod,
637
+ note: incoming.note ?? existing.note,
638
+ birthStatus: incoming.birthStatus ?? existing.birthStatus,
599
639
  age: incoming.age ?? existing.age,
600
640
  conditions: incoming.conditions ?? existing.conditions,
601
641
  heritage: incoming.heritage ?? existing.heritage,
@@ -868,13 +908,24 @@ function orderGeneration(nodeIds, _genIdx, graph, familyUnits) {
868
908
  }
869
909
  var LABEL_HEIGHT = 20;
870
910
  var LABEL_GAP = 6;
911
+ var CAPTION_LINE = 13;
912
+ function captionExtra(graph) {
913
+ let maxLines = 0;
914
+ for (const ind of graph.individuals.values()) {
915
+ let lines = 0;
916
+ if (ind.dob || ind.dod || ind.birthStatus) lines++;
917
+ if (ind.note) lines++;
918
+ if (lines > maxLines) maxLines = lines;
919
+ }
920
+ return maxLines * CAPTION_LINE;
921
+ }
871
922
  function assignPositions(orderedGens, graph, config) {
872
923
  const positions = /* @__PURE__ */ new Map();
873
924
  const { nodeWidth, nodeSpacingX } = config;
874
925
  const half = nodeWidth / 2;
875
926
  const coupleGap = nodeWidth + nodeSpacingX * 0.6;
876
927
  const familyGap = nodeWidth + nodeSpacingX * 1.5;
877
- const genStepY = config.nodeHeight + LABEL_HEIGHT + LABEL_GAP + config.nodeSpacingY;
928
+ const genStepY = config.nodeHeight + LABEL_HEIGHT + LABEL_GAP + config.nodeSpacingY + captionExtra(graph);
878
929
  for (const gen of orderedGens) {
879
930
  const y = gen.index * genStepY + half;
880
931
  const segments = buildSegments(gen.nodeIds, gen.index, graph);
@@ -1137,7 +1188,7 @@ function resolveOverlaps(positions, orderedGens, config, graph) {
1137
1188
  function computeEdges(graph, positions, config) {
1138
1189
  const edges = [];
1139
1190
  const half = config.nodeWidth / 2;
1140
- const dropY_offset = config.nodeHeight / 2 + LABEL_HEIGHT + LABEL_GAP + config.nodeSpacingY * 0.35;
1191
+ const dropY_offset = config.nodeHeight / 2 + LABEL_HEIGHT + LABEL_GAP + config.nodeSpacingY * 0.35 + captionExtra(graph);
1141
1192
  for (const fu of graph.familyUnits) {
1142
1193
  const posA = positions.get(fu.partners[0]);
1143
1194
  const posB = positions.get(fu.partners[1]);
@@ -1274,13 +1325,24 @@ function packageResult(positions, edges, graph, config) {
1274
1325
  }
1275
1326
  return {
1276
1327
  width: maxX + padding,
1277
- height: maxY + padding + LABEL_GAP + LABEL_HEIGHT + 10,
1328
+ height: maxY + padding + LABEL_GAP + LABEL_HEIGHT + 10 + captionExtra(graph),
1278
1329
  nodes,
1279
1330
  edges: shiftedEdges
1280
1331
  };
1281
1332
  }
1282
1333
  function estimateLabelText(ind) {
1283
1334
  const name = ind.label || ind.id;
1335
+ if (ind.dob || ind.dod || ind.birthStatus || ind.note) {
1336
+ const candidates = [name];
1337
+ const born = ind.dob ?? (ind.birthYear ? String(ind.birthYear) : void 0);
1338
+ const died = ind.dod ?? (ind.deathYear ? String(ind.deathYear) : void 0);
1339
+ const dateParts = [];
1340
+ if (born) dateParts.push(`[*] ${born}`);
1341
+ if (died || ind.status === "deceased") dateParts.push(`\u2020 ${died ?? ""}`);
1342
+ if (dateParts.length) candidates.push(dateParts.join(" "));
1343
+ if (ind.note) candidates.push(ind.note);
1344
+ return candidates.reduce((a, b) => b.length > a.length ? b : a, name);
1345
+ }
1284
1346
  if (ind.birthYear && ind.deathYear) return `${name} (${ind.birthYear}\u2013${ind.deathYear})`;
1285
1347
  if (ind.birthYear) return `${name} (b. ${ind.birthYear})`;
1286
1348
  return name;
@@ -2207,7 +2269,7 @@ function renderGenogram(layout, config, ast) {
2207
2269
  let finalHeight = totalHeight;
2208
2270
  let legendSvg = "";
2209
2271
  if (ast) {
2210
- const themeBase = chunkD7EHZFK4_cjs.resolveGenogramTheme(config.theme);
2272
+ const themeBase = chunkL7POWM5B_cjs.resolveGenogramTheme(config.theme);
2211
2273
  const autoSpec = buildGenogramLegend(ast, themeBase);
2212
2274
  const finalSpec = chunk5UCXMYE7_cjs.applyLegendOverrides(autoSpec, ast.legendOverrides);
2213
2275
  if (finalSpec.mode === "on" && finalSpec.items.length > 0) {
@@ -2250,33 +2312,35 @@ function renderGenogram(layout, config, ast) {
2250
2312
  );
2251
2313
  }
2252
2314
  function buildStyles(config) {
2253
- const t = chunkD7EHZFK4_cjs.resolveGenogramTheme(config.theme);
2315
+ const t = chunkL7POWM5B_cjs.resolveGenogramTheme(config.theme);
2254
2316
  const css = `
2255
- .schematex-genogram {${chunkD7EHZFK4_cjs.cssCustomProperties(t)}
2317
+ .schematex-genogram {${chunkL7POWM5B_cjs.cssCustomProperties(t)}
2256
2318
  }
2257
- .schematex-genogram-shape { fill: ${t.fill}; stroke: ${t.stroke}; stroke-width: ${chunkD7EHZFK4_cjs.STROKE_WIDTH.normal}; stroke-linejoin: round; }
2319
+ .schematex-genogram-shape { fill: ${t.fill}; stroke: ${t.stroke}; stroke-width: ${chunkL7POWM5B_cjs.STROKE_WIDTH.normal}; stroke-linejoin: round; }
2258
2320
  .schematex-genogram-male .schematex-genogram-shape { fill: ${t.maleFill}; }
2259
2321
  .schematex-genogram-female .schematex-genogram-shape { fill: ${t.femaleFill}; }
2260
2322
  .schematex-genogram-unknown .schematex-genogram-shape { fill: ${t.unknownFill}; }
2261
2323
  .schematex-genogram-label { font-family: ${config.fontFamily}; font-size: ${config.fontSize}px; text-anchor: middle; fill: ${t.text}; }
2262
- .schematex-genogram-edge { stroke: ${t.neutral}; stroke-width: ${chunkD7EHZFK4_cjs.STROKE_WIDTH.normal}; fill: none; stroke-linecap: round; stroke-linejoin: round; }
2324
+ .schematex-genogram-vitals { font-family: ${config.fontFamily}; font-size: ${Math.max(9, config.fontSize - 1)}px; text-anchor: middle; fill: ${t.textMuted}; }
2325
+ .schematex-genogram-note { font-family: ${config.fontFamily}; font-size: ${Math.max(9, config.fontSize - 1)}px; font-style: italic; text-anchor: middle; fill: ${t.textMuted}; }
2326
+ .schematex-genogram-edge { stroke: ${t.neutral}; stroke-width: ${chunkL7POWM5B_cjs.STROKE_WIDTH.normal}; fill: none; stroke-linecap: round; stroke-linejoin: round; }
2263
2327
  .schematex-genogram-edge-cohabiting path { stroke-dasharray: 6,4; }
2264
2328
  .schematex-genogram-edge-cohabiting-ended path { stroke-dasharray: 6,4; }
2265
- .schematex-genogram-edge-divorced .schematex-genogram-divorce-mark { stroke: ${t.neutral}; stroke-width: ${chunkD7EHZFK4_cjs.STROKE_WIDTH.normal}; }
2266
- .schematex-genogram-edge-separated .schematex-genogram-separation-mark { stroke: ${t.neutral}; stroke-width: ${chunkD7EHZFK4_cjs.STROKE_WIDTH.normal}; }
2267
- .schematex-genogram-edge-cohabiting-ended .schematex-genogram-separation-mark { stroke: ${t.neutral}; stroke-width: ${chunkD7EHZFK4_cjs.STROKE_WIDTH.normal}; }
2329
+ .schematex-genogram-edge-divorced .schematex-genogram-divorce-mark { stroke: ${t.neutral}; stroke-width: ${chunkL7POWM5B_cjs.STROKE_WIDTH.normal}; }
2330
+ .schematex-genogram-edge-separated .schematex-genogram-separation-mark { stroke: ${t.neutral}; stroke-width: ${chunkL7POWM5B_cjs.STROKE_WIDTH.normal}; }
2331
+ .schematex-genogram-edge-cohabiting-ended .schematex-genogram-separation-mark { stroke: ${t.neutral}; stroke-width: ${chunkL7POWM5B_cjs.STROKE_WIDTH.normal}; }
2268
2332
  /* Secondary parent-child link (foster/adopted "current caregiver") \u2014 dotted, muted */
2269
- .schematex-genogram-edge-secondary path { stroke: ${t.neutral}; stroke-width: ${chunkD7EHZFK4_cjs.STROKE_WIDTH.normal}; stroke-dasharray: 2,4; fill: none; opacity: 0.85; }
2333
+ .schematex-genogram-edge-secondary path { stroke: ${t.neutral}; stroke-width: ${chunkL7POWM5B_cjs.STROKE_WIDTH.normal}; stroke-dasharray: 2,4; fill: none; opacity: 0.85; }
2270
2334
  /* Sibling-of bracket (known relative, unknown ancestry) \u2014 dashed */
2271
- .schematex-genogram-sibling-of path { stroke: ${t.neutral}; stroke-width: ${chunkD7EHZFK4_cjs.STROKE_WIDTH.normal}; stroke-dasharray: 4,3; fill: none; opacity: 0.7; }
2335
+ .schematex-genogram-sibling-of path { stroke: ${t.neutral}; stroke-width: ${chunkL7POWM5B_cjs.STROKE_WIDTH.normal}; stroke-dasharray: 4,3; fill: none; opacity: 0.7; }
2272
2336
  .schematex-genogram-unknown-siblings-mark { fill: ${t.text}; pointer-events: none; }
2273
- .schematex-genogram-deceased-mark { stroke: ${t.deceasedMark}; stroke-width: ${chunkD7EHZFK4_cjs.STROKE_WIDTH.normal}; stroke-linecap: round; }
2337
+ .schematex-genogram-deceased-mark { stroke: ${t.deceasedMark}; stroke-width: ${chunkL7POWM5B_cjs.STROKE_WIDTH.normal}; stroke-linecap: round; }
2274
2338
  /* Inline fill on each .schematex-genogram-condition-fill element comes from cond.color. The CSS only sets a default for elements that did not receive an inline fill attribute. */
2275
2339
  .schematex-genogram-condition-fill:not([fill]) { fill: ${t.conditionFill}; }
2276
2340
  .schematex-genogram-age { font-family: ${config.fontFamily}; fill: ${t.text}; pointer-events: none; }
2277
2341
  .schematex-genogram-title { fill: ${t.text}; }
2278
2342
  .schematex-genogram-edge-label { font-family: ${config.fontFamily}; fill: ${t.text}; }
2279
- .schematex-genogram-index-border { stroke: ${t.warn}; stroke-width: ${chunkD7EHZFK4_cjs.STROKE_WIDTH.thick}; fill: none; }
2343
+ .schematex-genogram-index-border { stroke: ${t.warn}; stroke-width: ${chunkL7POWM5B_cjs.STROKE_WIDTH.thick}; fill: none; }
2280
2344
  `;
2281
2345
  return chunk3WNW5Y7P_cjs.el("style", {}, css);
2282
2346
  }
@@ -2565,16 +2629,22 @@ function renderSiblingOfBrackets(layout, ast) {
2565
2629
  }
2566
2630
  function renderLabels(nodes, config) {
2567
2631
  const labels = [];
2632
+ const captionStep = config.fontSize + 1;
2568
2633
  for (const node of nodes) {
2569
2634
  const ind = node.individual;
2570
2635
  const label = ind.label || ind.id;
2571
2636
  const cx = node.x + node.width / 2;
2572
2637
  const labelY = node.y + node.height + 6 + config.fontSize;
2573
- let labelText = label.charAt(0).toUpperCase() + label.slice(1);
2574
- if (ind.birthYear && ind.deathYear) {
2575
- labelText += ` (${ind.birthYear}\u2013${ind.deathYear})`;
2576
- } else if (ind.birthYear) {
2577
- labelText += ` (b. ${ind.birthYear})`;
2638
+ const nameText = label.charAt(0).toUpperCase() + label.slice(1);
2639
+ const datesLine = vitalDatesLine(ind);
2640
+ const usesGenealogy = datesLine !== null || !!ind.note;
2641
+ let nameLabel = nameText;
2642
+ if (!usesGenealogy) {
2643
+ if (ind.birthYear && ind.deathYear) {
2644
+ nameLabel += ` (${ind.birthYear}\u2013${ind.deathYear})`;
2645
+ } else if (ind.birthYear) {
2646
+ nameLabel += ` (b. ${ind.birthYear})`;
2647
+ }
2578
2648
  }
2579
2649
  labels.push(
2580
2650
  chunk3WNW5Y7P_cjs.text(
@@ -2584,12 +2654,54 @@ function renderLabels(nodes, config) {
2584
2654
  class: "schematex-genogram-label",
2585
2655
  "data-individual-id": ind.id
2586
2656
  },
2587
- labelText
2657
+ nameLabel
2588
2658
  )
2589
2659
  );
2660
+ let lineY = labelY;
2661
+ if (datesLine !== null) {
2662
+ lineY += captionStep;
2663
+ labels.push(
2664
+ chunk3WNW5Y7P_cjs.text(
2665
+ {
2666
+ x: cx,
2667
+ y: lineY,
2668
+ class: "schematex-genogram-vitals",
2669
+ "data-individual-id": ind.id
2670
+ },
2671
+ datesLine
2672
+ )
2673
+ );
2674
+ }
2675
+ if (ind.note) {
2676
+ lineY += captionStep;
2677
+ labels.push(
2678
+ chunk3WNW5Y7P_cjs.text(
2679
+ {
2680
+ x: cx,
2681
+ y: lineY,
2682
+ class: "schematex-genogram-note",
2683
+ "data-individual-id": ind.id
2684
+ },
2685
+ ind.note
2686
+ )
2687
+ );
2688
+ }
2590
2689
  }
2591
2690
  return chunk3WNW5Y7P_cjs.group({ class: "schematex-genogram-labels" }, labels);
2592
2691
  }
2692
+ function vitalDatesLine(ind) {
2693
+ const bornText = ind.dob ?? (ind.birthYear ? String(ind.birthYear) : void 0);
2694
+ const diedText = ind.dod ?? (ind.deathYear ? String(ind.deathYear) : void 0);
2695
+ const isDeceased = ind.status === "deceased" || diedText !== void 0;
2696
+ const hasFullDate = !!ind.dob || !!ind.dod;
2697
+ if (!hasFullDate && !ind.birthStatus) return null;
2698
+ const bornGlyph = ind.birthStatus === "adopted" ? "[*]" : ind.birthStatus === "out-of-wedlock" ? "(*)" : "*";
2699
+ const parts = [];
2700
+ if (bornText) parts.push(`${bornGlyph} ${bornText}`);
2701
+ else if (ind.birthStatus) parts.push(bornGlyph);
2702
+ if (isDeceased) parts.push(diedText ? `\u2020 ${diedText}` : "\u2020");
2703
+ return parts.length > 0 ? parts.join(" ") : null;
2704
+ }
2593
2705
 
2594
2706
  // src/diagrams/genogram/index.ts
2595
2707
  var genogram = {
@@ -2625,5 +2737,5 @@ exports.layoutGenogram = layoutGenogram;
2625
2737
  exports.parseGenogram = parseGenogram;
2626
2738
  exports.renderGenogram = renderGenogram;
2627
2739
  exports.renderIndividualSymbol = renderIndividualSymbol;
2628
- //# sourceMappingURL=chunk-TZTCIAYW.cjs.map
2629
- //# sourceMappingURL=chunk-TZTCIAYW.cjs.map
2740
+ //# sourceMappingURL=chunk-S3RMAXH5.cjs.map
2741
+ //# sourceMappingURL=chunk-S3RMAXH5.cjs.map