compasso 0.1.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/README.md +126 -8
  2. package/dist/chunk-F47C6ZEB.js +1041 -0
  3. package/dist/chunk-F47C6ZEB.js.map +1 -0
  4. package/dist/chunk-JP4N42AY.js +497 -0
  5. package/dist/chunk-JP4N42AY.js.map +1 -0
  6. package/dist/chunk-LRHHUJFZ.js +703 -0
  7. package/dist/chunk-LRHHUJFZ.js.map +1 -0
  8. package/dist/{chunk-E456YKAJ.js → chunk-O3BT2O42.js} +69 -10
  9. package/dist/chunk-O3BT2O42.js.map +1 -0
  10. package/dist/{chunk-L5CYESBI.js → chunk-Q6DVTCXD.js} +9 -24
  11. package/dist/chunk-Q6DVTCXD.js.map +1 -0
  12. package/dist/{chunk-5RRRE2GF.js → chunk-RWPGGWO5.js} +9 -28
  13. package/dist/chunk-RWPGGWO5.js.map +1 -0
  14. package/dist/chunk-ZBDABVIO.js +252 -0
  15. package/dist/chunk-ZBDABVIO.js.map +1 -0
  16. package/dist/core/index.cjs +74 -7
  17. package/dist/core/index.cjs.map +1 -1
  18. package/dist/core/index.d.cts +33 -29
  19. package/dist/core/index.d.ts +33 -29
  20. package/dist/core/index.js +1 -1
  21. package/dist/ecomap/index.cjs +43 -28
  22. package/dist/ecomap/index.cjs.map +1 -1
  23. package/dist/ecomap/index.js +2 -2
  24. package/dist/fault-tree/index.cjs +782 -0
  25. package/dist/fault-tree/index.cjs.map +1 -0
  26. package/dist/fault-tree/index.d.cts +148 -0
  27. package/dist/fault-tree/index.d.ts +148 -0
  28. package/dist/fault-tree/index.js +4 -0
  29. package/dist/fault-tree/index.js.map +1 -0
  30. package/dist/fishbone/index.cjs +314 -0
  31. package/dist/fishbone/index.cjs.map +1 -0
  32. package/dist/fishbone/index.d.cts +91 -0
  33. package/dist/fishbone/index.d.ts +91 -0
  34. package/dist/fishbone/index.js +4 -0
  35. package/dist/fishbone/index.js.map +1 -0
  36. package/dist/genogram/index.cjs +47 -32
  37. package/dist/genogram/index.cjs.map +1 -1
  38. package/dist/genogram/index.d.cts +7 -4
  39. package/dist/genogram/index.d.ts +7 -4
  40. package/dist/genogram/index.js +2 -2
  41. package/dist/index.cjs +2622 -55
  42. package/dist/index.cjs.map +1 -1
  43. package/dist/index.d.cts +12 -2
  44. package/dist/index.d.ts +12 -2
  45. package/dist/index.js +7 -3
  46. package/dist/kinship-DqEklrDN.d.ts +51 -0
  47. package/dist/kinship-Dy_ijjJV.d.cts +51 -0
  48. package/dist/labels-CBQ_3Ec9.d.cts +123 -0
  49. package/dist/labels-CYbM5XV7.d.cts +83 -0
  50. package/dist/labels-CYbM5XV7.d.ts +83 -0
  51. package/dist/labels-DNqRkWuI.d.ts +123 -0
  52. package/dist/labels-iZjijjtK.d.cts +64 -0
  53. package/dist/labels-iZjijjtK.d.ts +64 -0
  54. package/dist/locales/pt-br.cjs +94 -0
  55. package/dist/locales/pt-br.cjs.map +1 -1
  56. package/dist/locales/pt-br.d.cts +14 -2
  57. package/dist/locales/pt-br.d.ts +14 -2
  58. package/dist/locales/pt-br.js +88 -1
  59. package/dist/locales/pt-br.js.map +1 -1
  60. package/dist/pedigree/index.cjs +1151 -0
  61. package/dist/pedigree/index.cjs.map +1 -0
  62. package/dist/pedigree/index.d.cts +155 -0
  63. package/dist/pedigree/index.d.ts +155 -0
  64. package/dist/pedigree/index.js +4 -0
  65. package/dist/pedigree/index.js.map +1 -0
  66. package/dist/phylo/index.cjs +553 -0
  67. package/dist/phylo/index.cjs.map +1 -0
  68. package/dist/phylo/index.d.cts +158 -0
  69. package/dist/phylo/index.d.ts +158 -0
  70. package/dist/phylo/index.js +4 -0
  71. package/dist/phylo/index.js.map +1 -0
  72. package/dist/text-DuO_PwYw.d.cts +45 -0
  73. package/dist/text-DuO_PwYw.d.ts +45 -0
  74. package/dist/types-BnMG7TCd.d.cts +66 -0
  75. package/dist/types-BnMG7TCd.d.ts +66 -0
  76. package/dist/xml-DDae1eUr.d.cts +4 -0
  77. package/dist/xml-DDae1eUr.d.ts +4 -0
  78. package/package.json +100 -26
  79. package/dist/chunk-5RRRE2GF.js.map +0 -1
  80. package/dist/chunk-E456YKAJ.js.map +0 -1
  81. package/dist/chunk-L5CYESBI.js.map +0 -1
  82. package/dist/kinship-BARO5-qz.d.cts +0 -115
  83. package/dist/kinship-Bkf87Jhu.d.ts +0 -115
package/dist/index.d.cts CHANGED
@@ -1,5 +1,15 @@
1
- export { CHAR_W, FONT_FAMILY, Point, clampLabel, estimateTextWidth, pathData, wrapLabel, xmlEscape } from './core/index.cjs';
1
+ export { x as xmlEscape } from './xml-DDae1eUr.cjs';
2
+ export { LEGEND_FONT, LEGEND_GAP, LEGEND_PAD, LEGEND_ROW_H, LEGEND_SWATCH_W, LegendBlock, LegendEntry, legendBlock, romanNumeral } from './core/index.cjs';
3
+ export { C as CHAR_W, F as FONT_FAMILY, P as Point, c as clampLabel, e as estimateTextWidth, p as pathData, w as wrapLabel, a as wrapLabelBalanced } from './text-DuO_PwYw.cjs';
2
4
  export { E as EDGE_STROKE, a as EdgeLineStyle, b as EdgeStroke, Q as QUALITY_LEXICON_EN, c as QualityLexicon, n as normalizeText, q as qualityLineStyle } from './stroke-MQ427drt.cjs';
3
- export { G as GENOGRAM_SVG_LABELS_EN, a as GENOGRAM_TITLE_LABELS_EN, b as GenogramInput, c as GenogramSvgLabels, d as GenogramTitleLabels, K as KINSHIP_EN, e as KinshipLexicon, N as NodeShape, P as ParentLink, f as Person, g as PersonSex, R as Relationship, h as RelationshipMapClass, U as UNION_STATUSES, i as Union, j as UnionStatus, k as classifyRelationshipType, r as relationshipTypeTokens } from './kinship-BARO5-qz.cjs';
5
+ export { G as GenogramInput, N as NodeShape, P as ParentLink, a as Person, b as PersonSex, R as Relationship, U as UNION_STATUSES, c as Union, d as UnionStatus } from './types-BnMG7TCd.cjs';
6
+ export { G as GENOGRAM_SVG_LABELS_EN, a as GENOGRAM_TITLE_LABELS_EN, b as GenogramSvgLabels, c as GenogramTitleLabels, K as KINSHIP_EN, d as KinshipLexicon, R as RelationshipMapClass, e as classifyRelationshipType, r as relationshipTypeTokens } from './kinship-Dy_ijjJV.cjs';
4
7
  export { EDGE_FONT, GenogramElement, GenogramElementKind, GenogramLayout, GenogramLayoutOptions, GenogramNode, GenogramRenderOptions, GenogramRenderResult, GenogramSvgOptions, LABEL_FONT, LABEL_LINE_H, NODE_SIZE, PARENT_REL_ID_BASE, PROMOTED_REL_ID_BASE, UNION_NOTATION, UNION_REL_ID_BASE, UnionEdgeStyle, computeGenogramLayout, genogramLayoutSvg, genogramSvg, latestUnionPerPair } from './genogram/index.cjs';
5
8
  export { ECOMAP_LABELS_EN, EcomapDirection, EcomapInput, EcomapLabels, EcomapSvgOptions, EcomapTie, ecomapSvg } from './ecomap/index.cjs';
9
+ export { A as AndGate, F as FAULT_TREE_EVENT_KINDS, a as FAULT_TREE_SVG_LABELS_EN, b as FAULT_TREE_TITLE_LABELS_EN, c as FaultTreeEvent, d as FaultTreeEventKind, e as FaultTreeGate, f as FaultTreeInput, g as FaultTreeSvgLabels, h as FaultTreeTitleLabels, G as GATE_TYPES, i as GateType, I as InhibitGate, O as OrGate, V as VoteGate, X as XorGate } from './labels-CYbM5XV7.cjs';
10
+ export { CODE_FONT, FT_BUS_ID_BASE, FT_CONDITION_ID_BASE, FT_DROP_ID_BASE, FT_LABEL_FONT, FT_LABEL_LINE_H, FT_RISER_ID_BASE, FT_STEM_ID_BASE, FaultTreeElement, FaultTreeElementKind, FaultTreeGateNode, FaultTreeIssue, FaultTreeIssueCode, FaultTreeLayout, FaultTreeLayoutOptions, FaultTreeNode, FaultTreeRenderOptions, FaultTreeRenderResult, FaultTreeSvgOptions, FaultTreeValidationError, LABEL_GAP, computeFaultTreeLayout, faultTreeIssues, faultTreeLayoutSvg, faultTreeSvg, validateFaultTree } from './fault-tree/index.cjs';
11
+ export { FISHBONE_LABELS_EN, FishboneCategory, FishboneCause, FishboneInput, FishboneLabels, FishboneSubCause, FishboneSvgOptions, FishboneValidationCode, FishboneValidationError, FishboneValidationIssue, fishboneSvg } from './fishbone/index.cjs';
12
+ export { C as Condition, I as Individual, L as LIFE_STATUSES, a as LifeStatus, M as Mating, P as PEDIGREE_SVG_LABELS_EN, b as PEDIGREE_TITLE_LABELS_EN, c as PedigreeInput, d as PedigreeRole, e as PedigreeSvgLabels, f as PedigreeTitleLabels, S as Sibship, T as TwinGroup, Z as Zygosity } from './labels-CBQ_3Ec9.cjs';
13
+ export { MAX_CONDITIONS_PER_INDIVIDUAL, PED_ADDRESS_FONT, PED_CONDITION_FILLS, PED_DESCENT_ID_BASE, PED_GLYPH, PED_LABEL_FONT, PED_LABEL_GAP, PED_LABEL_LINE_H, PED_MATING_ID_BASE, PED_RISER_ID_BASE, PED_SIBBAR_ID_BASE, PED_TWINBAR_ID_BASE, PedigreeElement, PedigreeElementKind, PedigreeGenerationLabel, PedigreeIssue, PedigreeIssueCode, PedigreeLayout, PedigreeLayoutOptions, PedigreeNode, PedigreeRenderOptions, PedigreeRenderResult, PedigreeSvgOptions, PedigreeValidationError, computePedigreeLayout, pedigreeIssues, pedigreeLayoutSvg, pedigreeSvg, validatePedigree } from './pedigree/index.cjs';
14
+ export { P as PHYLO_SVG_LABELS_EN, a as PHYLO_TITLE_LABELS_EN, b as PhyloEdge, c as PhyloInput, d as PhyloMode, e as PhyloNode, f as PhyloSvgLabels, g as PhyloTitleLabels } from './labels-iZjijjtK.cjs';
15
+ export { PHYLO_BRANCH_ID_BASE, PHYLO_CLADEBAR_ID_BASE, PHYLO_EXTENSION_ID_BASE, PHYLO_LABEL_FONT, PHYLO_LABEL_GAP, PHYLO_ROOTSTUB_ID_BASE, PHYLO_ROW_SLOT, PHYLO_SCALEBAR_ID, PHYLO_SUPPORT_FONT, PhyloElement, PhyloElementKind, PhyloIssue, PhyloIssueCode, PhyloLayout, PhyloLayoutNode, PhyloLayoutOptions, PhyloRenderOptions, PhyloRenderResult, PhyloScaleBar, PhyloSvgOptions, PhyloValidationError, computePhyloLayout, niceScaleStep, phyloIssues, phyloLayoutSvg, phyloSvg, validatePhylo } from './phylo/index.cjs';
package/dist/index.d.ts CHANGED
@@ -1,5 +1,15 @@
1
- export { CHAR_W, FONT_FAMILY, Point, clampLabel, estimateTextWidth, pathData, wrapLabel, xmlEscape } from './core/index.js';
1
+ export { x as xmlEscape } from './xml-DDae1eUr.js';
2
+ export { LEGEND_FONT, LEGEND_GAP, LEGEND_PAD, LEGEND_ROW_H, LEGEND_SWATCH_W, LegendBlock, LegendEntry, legendBlock, romanNumeral } from './core/index.js';
3
+ export { C as CHAR_W, F as FONT_FAMILY, P as Point, c as clampLabel, e as estimateTextWidth, p as pathData, w as wrapLabel, a as wrapLabelBalanced } from './text-DuO_PwYw.js';
2
4
  export { E as EDGE_STROKE, a as EdgeLineStyle, b as EdgeStroke, Q as QUALITY_LEXICON_EN, c as QualityLexicon, n as normalizeText, q as qualityLineStyle } from './stroke-MQ427drt.js';
3
- export { G as GENOGRAM_SVG_LABELS_EN, a as GENOGRAM_TITLE_LABELS_EN, b as GenogramInput, c as GenogramSvgLabels, d as GenogramTitleLabels, K as KINSHIP_EN, e as KinshipLexicon, N as NodeShape, P as ParentLink, f as Person, g as PersonSex, R as Relationship, h as RelationshipMapClass, U as UNION_STATUSES, i as Union, j as UnionStatus, k as classifyRelationshipType, r as relationshipTypeTokens } from './kinship-Bkf87Jhu.js';
5
+ export { G as GenogramInput, N as NodeShape, P as ParentLink, a as Person, b as PersonSex, R as Relationship, U as UNION_STATUSES, c as Union, d as UnionStatus } from './types-BnMG7TCd.js';
6
+ export { G as GENOGRAM_SVG_LABELS_EN, a as GENOGRAM_TITLE_LABELS_EN, b as GenogramSvgLabels, c as GenogramTitleLabels, K as KINSHIP_EN, d as KinshipLexicon, R as RelationshipMapClass, e as classifyRelationshipType, r as relationshipTypeTokens } from './kinship-DqEklrDN.js';
4
7
  export { EDGE_FONT, GenogramElement, GenogramElementKind, GenogramLayout, GenogramLayoutOptions, GenogramNode, GenogramRenderOptions, GenogramRenderResult, GenogramSvgOptions, LABEL_FONT, LABEL_LINE_H, NODE_SIZE, PARENT_REL_ID_BASE, PROMOTED_REL_ID_BASE, UNION_NOTATION, UNION_REL_ID_BASE, UnionEdgeStyle, computeGenogramLayout, genogramLayoutSvg, genogramSvg, latestUnionPerPair } from './genogram/index.js';
5
8
  export { ECOMAP_LABELS_EN, EcomapDirection, EcomapInput, EcomapLabels, EcomapSvgOptions, EcomapTie, ecomapSvg } from './ecomap/index.js';
9
+ export { A as AndGate, F as FAULT_TREE_EVENT_KINDS, a as FAULT_TREE_SVG_LABELS_EN, b as FAULT_TREE_TITLE_LABELS_EN, c as FaultTreeEvent, d as FaultTreeEventKind, e as FaultTreeGate, f as FaultTreeInput, g as FaultTreeSvgLabels, h as FaultTreeTitleLabels, G as GATE_TYPES, i as GateType, I as InhibitGate, O as OrGate, V as VoteGate, X as XorGate } from './labels-CYbM5XV7.js';
10
+ export { CODE_FONT, FT_BUS_ID_BASE, FT_CONDITION_ID_BASE, FT_DROP_ID_BASE, FT_LABEL_FONT, FT_LABEL_LINE_H, FT_RISER_ID_BASE, FT_STEM_ID_BASE, FaultTreeElement, FaultTreeElementKind, FaultTreeGateNode, FaultTreeIssue, FaultTreeIssueCode, FaultTreeLayout, FaultTreeLayoutOptions, FaultTreeNode, FaultTreeRenderOptions, FaultTreeRenderResult, FaultTreeSvgOptions, FaultTreeValidationError, LABEL_GAP, computeFaultTreeLayout, faultTreeIssues, faultTreeLayoutSvg, faultTreeSvg, validateFaultTree } from './fault-tree/index.js';
11
+ export { FISHBONE_LABELS_EN, FishboneCategory, FishboneCause, FishboneInput, FishboneLabels, FishboneSubCause, FishboneSvgOptions, FishboneValidationCode, FishboneValidationError, FishboneValidationIssue, fishboneSvg } from './fishbone/index.js';
12
+ export { C as Condition, I as Individual, L as LIFE_STATUSES, a as LifeStatus, M as Mating, P as PEDIGREE_SVG_LABELS_EN, b as PEDIGREE_TITLE_LABELS_EN, c as PedigreeInput, d as PedigreeRole, e as PedigreeSvgLabels, f as PedigreeTitleLabels, S as Sibship, T as TwinGroup, Z as Zygosity } from './labels-DNqRkWuI.js';
13
+ export { MAX_CONDITIONS_PER_INDIVIDUAL, PED_ADDRESS_FONT, PED_CONDITION_FILLS, PED_DESCENT_ID_BASE, PED_GLYPH, PED_LABEL_FONT, PED_LABEL_GAP, PED_LABEL_LINE_H, PED_MATING_ID_BASE, PED_RISER_ID_BASE, PED_SIBBAR_ID_BASE, PED_TWINBAR_ID_BASE, PedigreeElement, PedigreeElementKind, PedigreeGenerationLabel, PedigreeIssue, PedigreeIssueCode, PedigreeLayout, PedigreeLayoutOptions, PedigreeNode, PedigreeRenderOptions, PedigreeRenderResult, PedigreeSvgOptions, PedigreeValidationError, computePedigreeLayout, pedigreeIssues, pedigreeLayoutSvg, pedigreeSvg, validatePedigree } from './pedigree/index.js';
14
+ export { P as PHYLO_SVG_LABELS_EN, a as PHYLO_TITLE_LABELS_EN, b as PhyloEdge, c as PhyloInput, d as PhyloMode, e as PhyloNode, f as PhyloSvgLabels, g as PhyloTitleLabels } from './labels-iZjijjtK.js';
15
+ export { PHYLO_BRANCH_ID_BASE, PHYLO_CLADEBAR_ID_BASE, PHYLO_EXTENSION_ID_BASE, PHYLO_LABEL_FONT, PHYLO_LABEL_GAP, PHYLO_ROOTSTUB_ID_BASE, PHYLO_ROW_SLOT, PHYLO_SCALEBAR_ID, PHYLO_SUPPORT_FONT, PhyloElement, PhyloElementKind, PhyloIssue, PhyloIssueCode, PhyloLayout, PhyloLayoutNode, PhyloLayoutOptions, PhyloRenderOptions, PhyloRenderResult, PhyloScaleBar, PhyloSvgOptions, PhyloValidationError, computePhyloLayout, niceScaleStep, phyloIssues, phyloLayoutSvg, phyloSvg, validatePhylo } from './phylo/index.js';
package/dist/index.js CHANGED
@@ -1,5 +1,9 @@
1
- export { EDGE_FONT, GENOGRAM_SVG_LABELS_EN, GENOGRAM_TITLE_LABELS_EN, KINSHIP_EN, LABEL_FONT, LABEL_LINE_H, NODE_SIZE, PARENT_REL_ID_BASE, PROMOTED_REL_ID_BASE, UNION_NOTATION, UNION_REL_ID_BASE, UNION_STATUSES, classifyRelationshipType, computeGenogramLayout, genogramLayoutSvg, genogramSvg, latestUnionPerPair, relationshipTypeTokens } from './chunk-5RRRE2GF.js';
2
- export { ECOMAP_LABELS_EN, ecomapSvg } from './chunk-L5CYESBI.js';
3
- export { CHAR_W, EDGE_STROKE, FONT_FAMILY, QUALITY_LEXICON_EN, clampLabel, estimateTextWidth, normalizeText, pathData, qualityLineStyle, wrapLabel, xmlEscape } from './chunk-E456YKAJ.js';
1
+ export { EDGE_FONT, GENOGRAM_SVG_LABELS_EN, GENOGRAM_TITLE_LABELS_EN, KINSHIP_EN, LABEL_FONT, LABEL_LINE_H, NODE_SIZE, PARENT_REL_ID_BASE, PROMOTED_REL_ID_BASE, UNION_NOTATION, UNION_REL_ID_BASE, UNION_STATUSES, classifyRelationshipType, computeGenogramLayout, genogramLayoutSvg, genogramSvg, latestUnionPerPair, relationshipTypeTokens } from './chunk-RWPGGWO5.js';
2
+ export { ECOMAP_LABELS_EN, ecomapSvg } from './chunk-Q6DVTCXD.js';
3
+ export { CODE_FONT, FAULT_TREE_EVENT_KINDS, FAULT_TREE_SVG_LABELS_EN, FAULT_TREE_TITLE_LABELS_EN, FT_BUS_ID_BASE, FT_CONDITION_ID_BASE, FT_DROP_ID_BASE, FT_LABEL_FONT, FT_LABEL_LINE_H, FT_RISER_ID_BASE, FT_STEM_ID_BASE, FaultTreeValidationError, GATE_TYPES, LABEL_GAP, computeFaultTreeLayout, faultTreeIssues, faultTreeLayoutSvg, faultTreeSvg, validateFaultTree } from './chunk-LRHHUJFZ.js';
4
+ export { FISHBONE_LABELS_EN, FishboneValidationError, fishboneSvg } from './chunk-ZBDABVIO.js';
5
+ export { LIFE_STATUSES, MAX_CONDITIONS_PER_INDIVIDUAL, PEDIGREE_SVG_LABELS_EN, PEDIGREE_TITLE_LABELS_EN, PED_ADDRESS_FONT, PED_CONDITION_FILLS, PED_DESCENT_ID_BASE, PED_GLYPH, PED_LABEL_FONT, PED_LABEL_GAP, PED_LABEL_LINE_H, PED_MATING_ID_BASE, PED_RISER_ID_BASE, PED_SIBBAR_ID_BASE, PED_TWINBAR_ID_BASE, PedigreeValidationError, computePedigreeLayout, pedigreeIssues, pedigreeLayoutSvg, pedigreeSvg, validatePedigree } from './chunk-F47C6ZEB.js';
6
+ export { PHYLO_BRANCH_ID_BASE, PHYLO_CLADEBAR_ID_BASE, PHYLO_EXTENSION_ID_BASE, PHYLO_LABEL_FONT, PHYLO_LABEL_GAP, PHYLO_ROOTSTUB_ID_BASE, PHYLO_ROW_SLOT, PHYLO_SCALEBAR_ID, PHYLO_SUPPORT_FONT, PHYLO_SVG_LABELS_EN, PHYLO_TITLE_LABELS_EN, PhyloValidationError, computePhyloLayout, niceScaleStep, phyloIssues, phyloLayoutSvg, phyloSvg, validatePhylo } from './chunk-JP4N42AY.js';
7
+ export { CHAR_W, EDGE_STROKE, FONT_FAMILY, LEGEND_FONT, LEGEND_GAP, LEGEND_PAD, LEGEND_ROW_H, LEGEND_SWATCH_W, QUALITY_LEXICON_EN, clampLabel, estimateTextWidth, legendBlock, normalizeText, pathData, qualityLineStyle, romanNumeral, wrapLabel, wrapLabelBalanced, xmlEscape } from './chunk-O3BT2O42.js';
4
8
  //# sourceMappingURL=index.js.map
5
9
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,51 @@
1
+ import { a as EdgeLineStyle } from './stroke-MQ427drt.js';
2
+ import { N as NodeShape, d as UnionStatus } from './types-BnMG7TCd.js';
3
+
4
+ /** Labels woven into element <title>s by the LAYOUT (verbatim-preserving). */
5
+ interface GenogramTitleLabels {
6
+ unionStatus: Record<UnionStatus, string>;
7
+ /** Title prefix for a parent→child descent ("parent of"). */
8
+ parentage: string;
9
+ }
10
+ declare const GENOGRAM_TITLE_LABELS_EN: GenogramTitleLabels;
11
+ /** Labels drawn by the SVG EMITTER (legend entries, accessibility text). */
12
+ interface GenogramSvgLabels {
13
+ shapes: Record<NodeShape, string>;
14
+ deceased: string;
15
+ bondStyles: Record<Exclude<EdgeLineStyle, "plain">, string>;
16
+ /** Legend label for the group of people with no drawn connection. */
17
+ isolated: string;
18
+ ariaLabel: string;
19
+ }
20
+ declare const GENOGRAM_SVG_LABELS_EN: GenogramSvgLabels;
21
+
22
+ type RelationshipMapClass = "derived" | "parentage" | "bond";
23
+ /**
24
+ * A pluggable kinship vocabulary. Tokens are diacritic-free, lowercase, matched WHOLE
25
+ * (so a token never matches inside another word) after splitting the type on
26
+ * non-alphanumerics ("half-brother" → ["half","brother"]). Checked DERIVED-first, so
27
+ * "brother on my father's side" reads as a sibling, never as a parent. These lists are
28
+ * closed and conservative — an unrecognized word stays a non-structural bond (the
29
+ * honest default). Locale packs (e.g. `compasso/locales/pt-br`) ship alternates.
30
+ */
31
+ interface KinshipLexicon {
32
+ /** Kinship read from the tree (sibling/grandparent/uncle/cousin…): never a line. */
33
+ derived: ReadonlySet<string>;
34
+ /** Direct parentage words (mother/father/son…): promotable to a descent. */
35
+ parentage: ReadonlySet<string>;
36
+ /** Parentage words whose FROM endpoint is the CHILD — used only to orient a
37
+ * promotion when declared generations do not decide it. */
38
+ childWords: ReadonlySet<string>;
39
+ }
40
+ declare const KINSHIP_EN: KinshipLexicon;
41
+ /** Lowercase + accent-stripped tokens of a free-text relationship type. */
42
+ declare function relationshipTypeTokens(type: string): string[];
43
+ /**
44
+ * Classifies a free-text relationship `type` for the MAP. Pure + deterministic.
45
+ * Derived kinship is checked first so a compound like "brother on my father's side"
46
+ * is read as a sibling (derived), never promoted as a parent. The verbatim word is
47
+ * unaffected — this decides only whether the tie becomes a line, and which kind.
48
+ */
49
+ declare function classifyRelationshipType(type: string, kinship?: KinshipLexicon): RelationshipMapClass;
50
+
51
+ export { GENOGRAM_SVG_LABELS_EN as G, KINSHIP_EN as K, type RelationshipMapClass as R, GENOGRAM_TITLE_LABELS_EN as a, type GenogramSvgLabels as b, type GenogramTitleLabels as c, type KinshipLexicon as d, classifyRelationshipType as e, relationshipTypeTokens as r };
@@ -0,0 +1,51 @@
1
+ import { a as EdgeLineStyle } from './stroke-MQ427drt.cjs';
2
+ import { N as NodeShape, d as UnionStatus } from './types-BnMG7TCd.cjs';
3
+
4
+ /** Labels woven into element <title>s by the LAYOUT (verbatim-preserving). */
5
+ interface GenogramTitleLabels {
6
+ unionStatus: Record<UnionStatus, string>;
7
+ /** Title prefix for a parent→child descent ("parent of"). */
8
+ parentage: string;
9
+ }
10
+ declare const GENOGRAM_TITLE_LABELS_EN: GenogramTitleLabels;
11
+ /** Labels drawn by the SVG EMITTER (legend entries, accessibility text). */
12
+ interface GenogramSvgLabels {
13
+ shapes: Record<NodeShape, string>;
14
+ deceased: string;
15
+ bondStyles: Record<Exclude<EdgeLineStyle, "plain">, string>;
16
+ /** Legend label for the group of people with no drawn connection. */
17
+ isolated: string;
18
+ ariaLabel: string;
19
+ }
20
+ declare const GENOGRAM_SVG_LABELS_EN: GenogramSvgLabels;
21
+
22
+ type RelationshipMapClass = "derived" | "parentage" | "bond";
23
+ /**
24
+ * A pluggable kinship vocabulary. Tokens are diacritic-free, lowercase, matched WHOLE
25
+ * (so a token never matches inside another word) after splitting the type on
26
+ * non-alphanumerics ("half-brother" → ["half","brother"]). Checked DERIVED-first, so
27
+ * "brother on my father's side" reads as a sibling, never as a parent. These lists are
28
+ * closed and conservative — an unrecognized word stays a non-structural bond (the
29
+ * honest default). Locale packs (e.g. `compasso/locales/pt-br`) ship alternates.
30
+ */
31
+ interface KinshipLexicon {
32
+ /** Kinship read from the tree (sibling/grandparent/uncle/cousin…): never a line. */
33
+ derived: ReadonlySet<string>;
34
+ /** Direct parentage words (mother/father/son…): promotable to a descent. */
35
+ parentage: ReadonlySet<string>;
36
+ /** Parentage words whose FROM endpoint is the CHILD — used only to orient a
37
+ * promotion when declared generations do not decide it. */
38
+ childWords: ReadonlySet<string>;
39
+ }
40
+ declare const KINSHIP_EN: KinshipLexicon;
41
+ /** Lowercase + accent-stripped tokens of a free-text relationship type. */
42
+ declare function relationshipTypeTokens(type: string): string[];
43
+ /**
44
+ * Classifies a free-text relationship `type` for the MAP. Pure + deterministic.
45
+ * Derived kinship is checked first so a compound like "brother on my father's side"
46
+ * is read as a sibling (derived), never promoted as a parent. The verbatim word is
47
+ * unaffected — this decides only whether the tie becomes a line, and which kind.
48
+ */
49
+ declare function classifyRelationshipType(type: string, kinship?: KinshipLexicon): RelationshipMapClass;
50
+
51
+ export { GENOGRAM_SVG_LABELS_EN as G, KINSHIP_EN as K, type RelationshipMapClass as R, GENOGRAM_TITLE_LABELS_EN as a, type GenogramSvgLabels as b, type GenogramTitleLabels as c, type KinshipLexicon as d, classifyRelationshipType as e, relationshipTypeTokens as r };
@@ -0,0 +1,123 @@
1
+ import { b as PersonSex, N as NodeShape } from './types-BnMG7TCd.cjs';
2
+
3
+ /** PSSC proband (filled arrow) / consultand (open arrow); null = neither. */
4
+ type PedigreeRole = "proband" | "consultand" | null;
5
+ /**
6
+ * CLOSED life-status vocabulary. "stillbirth" draws an "SB" annotation below a full-size
7
+ * glyph (uniform glyph metrics keep the overlap proof simple; the SB text + <title> carry
8
+ * the fact). Pregnancy / spontaneous-loss / termination glyphs are DEFERRED (they would
9
+ * introduce a non-square/circle/diamond glyph + gestational-age text) and are typed away
10
+ * here — an unsupported status is a compile error, never a silent fallback.
11
+ */
12
+ declare const LIFE_STATUSES: readonly ["alive", "stillbirth"];
13
+ type LifeStatus = (typeof LIFE_STATUSES)[number];
14
+ /** PSSC twin zygosity. mz = monozygotic (tie-bar), dz = dizygotic (no bar), unknown = "?". */
15
+ type Zygosity = "mz" | "dz" | "unknown";
16
+ /** A condition referenced by Individual.affectedBy; drives the filled-glyph partitions. */
17
+ interface Condition {
18
+ id: number;
19
+ /** Verbatim condition name (legend + <title>; escaped on emit). */
20
+ label: string;
21
+ }
22
+ /**
23
+ * A pedigree individual — declared clinical facts only; nothing inferred. Reuses the
24
+ * genogram's exact person grammar ({ id, label, sex, deceased }) but `generation` is
25
+ * MANDATORY and integer (a pedigree without generations is not a pedigree), and the
26
+ * clinical overlay (affectedBy, carrier, role, lifeStatus) is pedigree-specific.
27
+ */
28
+ interface Individual {
29
+ id: number;
30
+ label: string;
31
+ /** square/circle/diamond — re-exported genogram vocabulary. */
32
+ sex: PersonSex;
33
+ /** MANDATORY integer; smaller = older = higher row (validated, never derived here). */
34
+ generation: number;
35
+ /** Deceased slash (PSSC: top-left → bottom-right), reusing the genogram's exact line. */
36
+ deceased: boolean;
37
+ /** Asymptomatic-carrier center dot; PSSC puts it on UNAFFECTED carriers only. */
38
+ carrier: boolean;
39
+ /** PSSC proband (filled arrow) / consultand (open arrow); null = neither. */
40
+ role: PedigreeRole;
41
+ /** "stillbirth" → an "SB" annotation below the glyph. */
42
+ lifeStatus: LifeStatus;
43
+ /** Condition ids this individual is affected by (filled-glyph partitions, ≤4). [] = unaffected. */
44
+ affectedBy: number[];
45
+ /** Optional verbatim <title> override (defaults to "<address> · label[ · affected: …]"). */
46
+ title?: string;
47
+ }
48
+ /**
49
+ * A declared mating between two individuals. The pair is unordered (the layout normalizes
50
+ * a < b). `consanguineous` draws the PSSC DOUBLE mating line — the core distinguishing
51
+ * mark a genogram Union has no concept of (and the single biggest reason pedigree owns its
52
+ * relational layer instead of importing the genogram's). No status vocabulary: a pedigree
53
+ * does not draw McGoldrick divorce slashes.
54
+ */
55
+ interface Mating {
56
+ id: number;
57
+ partnerAId: number;
58
+ partnerBId: number;
59
+ /** PSSC double mating line. */
60
+ consanguineous: boolean;
61
+ }
62
+ /** A twin group within ONE sibship: ≥2 child ids of one zygosity, all in that sibship. */
63
+ interface TwinGroup {
64
+ /** ≥2 child ids from THIS sibship that are twins of one zygosity. */
65
+ childIds: number[];
66
+ zygosity: Zygosity;
67
+ }
68
+ /**
69
+ * The children of one mating, in declared left-to-right birth order (the fishbone "declared
70
+ * order is data" doctrine). The sibship is a FIRST-CLASS declared object — twin zygosity
71
+ * and birth order live here, not on the individual — so the layout draws one drop-bar per
72
+ * DECLARED sibship and never auto-attaches a child to a mating.
73
+ */
74
+ interface Sibship {
75
+ id: number;
76
+ matingId: number;
77
+ /** Child individual ids, left→right (declared order honored; PSSC birth order). */
78
+ childIds: number[];
79
+ /** Twin groupings among these children; [] = no twins. */
80
+ twinGroups: TwinGroup[];
81
+ }
82
+ /** Input to the pedigree render pipeline. */
83
+ interface PedigreeInput {
84
+ conditions: Condition[];
85
+ individuals: Individual[];
86
+ matings: Mating[];
87
+ sibships: Sibship[];
88
+ }
89
+
90
+ /** Labels woven into element/node <title>s by the LAYOUT (verbatim-preserving). */
91
+ interface PedigreeTitleLabels {
92
+ /** Prefix → "affected: <condition.label>, …". */
93
+ affected: string;
94
+ carrier: string;
95
+ deceased: string;
96
+ proband: string;
97
+ consultand: string;
98
+ consanguineous: string;
99
+ mating: string;
100
+ sibship: string;
101
+ twins: Record<Zygosity, string>;
102
+ stillbirth: string;
103
+ /** Used in the generation-gutter aria-style <title>, e.g. "generation I". */
104
+ generation: string;
105
+ }
106
+ declare const PEDIGREE_TITLE_LABELS_EN: PedigreeTitleLabels;
107
+ /** Labels drawn by the SVG EMITTER (legend entries, accessibility text). */
108
+ interface PedigreeSvgLabels {
109
+ shapes: Record<NodeShape, string>;
110
+ unaffected: string;
111
+ carrier: string;
112
+ deceased: string;
113
+ proband: string;
114
+ consultand: string;
115
+ consanguineous: string;
116
+ twins: Record<Zygosity, string>;
117
+ stillbirth: string;
118
+ isolated: string;
119
+ ariaLabel: string;
120
+ }
121
+ declare const PEDIGREE_SVG_LABELS_EN: PedigreeSvgLabels;
122
+
123
+ export { type Condition as C, type Individual as I, LIFE_STATUSES as L, type Mating as M, PEDIGREE_SVG_LABELS_EN as P, type Sibship as S, type TwinGroup as T, type Zygosity as Z, type LifeStatus as a, PEDIGREE_TITLE_LABELS_EN as b, type PedigreeInput as c, type PedigreeRole as d, type PedigreeSvgLabels as e, type PedigreeTitleLabels as f };
@@ -0,0 +1,83 @@
1
+ /**
2
+ * CLOSED event-kind vocabulary (NUREG-0492 Fig. IV-1):
3
+ * - "intermediate": fault event from a logic combination → rectangle (incl. the top);
4
+ * - "basic": basic initiating fault, no further development → circle;
5
+ * - "undeveloped": not developed further (insufficient consequence/info) → diamond;
6
+ * - "house": event normally expected to occur (external/boundary) → house;
7
+ * - "conditioning": condition/restriction on an INHIBIT gate → oval (never a tree node);
8
+ * - "transfer": transfer-in, subtree developed elsewhere → triangle (a leaf).
9
+ */
10
+ declare const FAULT_TREE_EVENT_KINDS: readonly ["intermediate", "basic", "undeveloped", "house", "conditioning", "transfer"];
11
+ type FaultTreeEventKind = (typeof FAULT_TREE_EVENT_KINDS)[number];
12
+ /**
13
+ * A declared fault-tree event. `label` is verbatim (always kept in the <title>);
14
+ * `code` is a short identifier drawn inside primary-event glyphs (null = none) —
15
+ * matching FTA practice, where primary-event symbols carry identifiers and the
16
+ * descriptions live beside them.
17
+ */
18
+ interface FaultTreeEvent {
19
+ id: number;
20
+ kind: FaultTreeEventKind;
21
+ label: string;
22
+ code: string | null;
23
+ /** Optional verbatim <title> override (defaults to "code · label"). */
24
+ title?: string;
25
+ }
26
+ /**
27
+ * CLOSED gate vocabulary. NOT/NAND/NOR and PRIORITY-AND are deliberately
28
+ * unrepresentable — an unsupported gate is a compile error, never a silent visual
29
+ * fallback (the NOT bubble-triangle would also collide with the transfer triangle).
30
+ */
31
+ declare const GATE_TYPES: readonly ["and", "or", "xor", "inhibit", "vote"];
32
+ type GateType = (typeof GATE_TYPES)[number];
33
+ interface FaultTreeGateBase {
34
+ id: number;
35
+ /** The intermediate event this gate resolves (drawn directly above the gate). */
36
+ eventId: number;
37
+ /** Declared left-to-right reading order — presentation data, honored as given. */
38
+ inputIds: number[];
39
+ }
40
+ interface AndGate extends FaultTreeGateBase {
41
+ type: "and";
42
+ }
43
+ interface OrGate extends FaultTreeGateBase {
44
+ type: "or";
45
+ }
46
+ interface XorGate extends FaultTreeGateBase {
47
+ type: "xor";
48
+ }
49
+ interface InhibitGate extends FaultTreeGateBase {
50
+ type: "inhibit";
51
+ /** Must reference a kind:"conditioning" event (drawn as the side oval). */
52
+ conditionId: number;
53
+ }
54
+ interface VoteGate extends FaultTreeGateBase {
55
+ type: "vote";
56
+ /** Output occurs if ≥ k of the n inputs occur; 1 ≤ k ≤ inputIds.length. */
57
+ k: number;
58
+ }
59
+ type FaultTreeGate = AndGate | OrGate | XorGate | InhibitGate | VoteGate;
60
+ /** Input to the fault-tree render pipeline. */
61
+ interface FaultTreeInput {
62
+ /** Declared top event (must be kind "intermediate", never a gate input). */
63
+ topId: number;
64
+ events: FaultTreeEvent[];
65
+ gates: FaultTreeGate[];
66
+ }
67
+
68
+ /** Labels woven into element <title>s by the LAYOUT (verbatim-preserving). */
69
+ interface FaultTreeTitleLabels {
70
+ gates: Record<GateType, string>;
71
+ /** Title of the inhibit-gate → conditioning-oval attachment line. */
72
+ condition: string;
73
+ }
74
+ declare const FAULT_TREE_TITLE_LABELS_EN: FaultTreeTitleLabels;
75
+ /** Labels drawn by the SVG EMITTER (legend entries, accessibility text). */
76
+ interface FaultTreeSvgLabels {
77
+ events: Record<FaultTreeEventKind, string>;
78
+ gates: Record<GateType, string>;
79
+ ariaLabel: string;
80
+ }
81
+ declare const FAULT_TREE_SVG_LABELS_EN: FaultTreeSvgLabels;
82
+
83
+ export { type AndGate as A, FAULT_TREE_EVENT_KINDS as F, GATE_TYPES as G, type InhibitGate as I, type OrGate as O, type VoteGate as V, type XorGate as X, FAULT_TREE_SVG_LABELS_EN as a, FAULT_TREE_TITLE_LABELS_EN as b, type FaultTreeEvent as c, type FaultTreeEventKind as d, type FaultTreeGate as e, type FaultTreeInput as f, type FaultTreeSvgLabels as g, type FaultTreeTitleLabels as h, type GateType as i };
@@ -0,0 +1,83 @@
1
+ /**
2
+ * CLOSED event-kind vocabulary (NUREG-0492 Fig. IV-1):
3
+ * - "intermediate": fault event from a logic combination → rectangle (incl. the top);
4
+ * - "basic": basic initiating fault, no further development → circle;
5
+ * - "undeveloped": not developed further (insufficient consequence/info) → diamond;
6
+ * - "house": event normally expected to occur (external/boundary) → house;
7
+ * - "conditioning": condition/restriction on an INHIBIT gate → oval (never a tree node);
8
+ * - "transfer": transfer-in, subtree developed elsewhere → triangle (a leaf).
9
+ */
10
+ declare const FAULT_TREE_EVENT_KINDS: readonly ["intermediate", "basic", "undeveloped", "house", "conditioning", "transfer"];
11
+ type FaultTreeEventKind = (typeof FAULT_TREE_EVENT_KINDS)[number];
12
+ /**
13
+ * A declared fault-tree event. `label` is verbatim (always kept in the <title>);
14
+ * `code` is a short identifier drawn inside primary-event glyphs (null = none) —
15
+ * matching FTA practice, where primary-event symbols carry identifiers and the
16
+ * descriptions live beside them.
17
+ */
18
+ interface FaultTreeEvent {
19
+ id: number;
20
+ kind: FaultTreeEventKind;
21
+ label: string;
22
+ code: string | null;
23
+ /** Optional verbatim <title> override (defaults to "code · label"). */
24
+ title?: string;
25
+ }
26
+ /**
27
+ * CLOSED gate vocabulary. NOT/NAND/NOR and PRIORITY-AND are deliberately
28
+ * unrepresentable — an unsupported gate is a compile error, never a silent visual
29
+ * fallback (the NOT bubble-triangle would also collide with the transfer triangle).
30
+ */
31
+ declare const GATE_TYPES: readonly ["and", "or", "xor", "inhibit", "vote"];
32
+ type GateType = (typeof GATE_TYPES)[number];
33
+ interface FaultTreeGateBase {
34
+ id: number;
35
+ /** The intermediate event this gate resolves (drawn directly above the gate). */
36
+ eventId: number;
37
+ /** Declared left-to-right reading order — presentation data, honored as given. */
38
+ inputIds: number[];
39
+ }
40
+ interface AndGate extends FaultTreeGateBase {
41
+ type: "and";
42
+ }
43
+ interface OrGate extends FaultTreeGateBase {
44
+ type: "or";
45
+ }
46
+ interface XorGate extends FaultTreeGateBase {
47
+ type: "xor";
48
+ }
49
+ interface InhibitGate extends FaultTreeGateBase {
50
+ type: "inhibit";
51
+ /** Must reference a kind:"conditioning" event (drawn as the side oval). */
52
+ conditionId: number;
53
+ }
54
+ interface VoteGate extends FaultTreeGateBase {
55
+ type: "vote";
56
+ /** Output occurs if ≥ k of the n inputs occur; 1 ≤ k ≤ inputIds.length. */
57
+ k: number;
58
+ }
59
+ type FaultTreeGate = AndGate | OrGate | XorGate | InhibitGate | VoteGate;
60
+ /** Input to the fault-tree render pipeline. */
61
+ interface FaultTreeInput {
62
+ /** Declared top event (must be kind "intermediate", never a gate input). */
63
+ topId: number;
64
+ events: FaultTreeEvent[];
65
+ gates: FaultTreeGate[];
66
+ }
67
+
68
+ /** Labels woven into element <title>s by the LAYOUT (verbatim-preserving). */
69
+ interface FaultTreeTitleLabels {
70
+ gates: Record<GateType, string>;
71
+ /** Title of the inhibit-gate → conditioning-oval attachment line. */
72
+ condition: string;
73
+ }
74
+ declare const FAULT_TREE_TITLE_LABELS_EN: FaultTreeTitleLabels;
75
+ /** Labels drawn by the SVG EMITTER (legend entries, accessibility text). */
76
+ interface FaultTreeSvgLabels {
77
+ events: Record<FaultTreeEventKind, string>;
78
+ gates: Record<GateType, string>;
79
+ ariaLabel: string;
80
+ }
81
+ declare const FAULT_TREE_SVG_LABELS_EN: FaultTreeSvgLabels;
82
+
83
+ export { type AndGate as A, FAULT_TREE_EVENT_KINDS as F, GATE_TYPES as G, type InhibitGate as I, type OrGate as O, type VoteGate as V, type XorGate as X, FAULT_TREE_SVG_LABELS_EN as a, FAULT_TREE_TITLE_LABELS_EN as b, type FaultTreeEvent as c, type FaultTreeEventKind as d, type FaultTreeGate as e, type FaultTreeInput as f, type FaultTreeSvgLabels as g, type FaultTreeTitleLabels as h, type GateType as i };
@@ -0,0 +1,123 @@
1
+ import { b as PersonSex, N as NodeShape } from './types-BnMG7TCd.js';
2
+
3
+ /** PSSC proband (filled arrow) / consultand (open arrow); null = neither. */
4
+ type PedigreeRole = "proband" | "consultand" | null;
5
+ /**
6
+ * CLOSED life-status vocabulary. "stillbirth" draws an "SB" annotation below a full-size
7
+ * glyph (uniform glyph metrics keep the overlap proof simple; the SB text + <title> carry
8
+ * the fact). Pregnancy / spontaneous-loss / termination glyphs are DEFERRED (they would
9
+ * introduce a non-square/circle/diamond glyph + gestational-age text) and are typed away
10
+ * here — an unsupported status is a compile error, never a silent fallback.
11
+ */
12
+ declare const LIFE_STATUSES: readonly ["alive", "stillbirth"];
13
+ type LifeStatus = (typeof LIFE_STATUSES)[number];
14
+ /** PSSC twin zygosity. mz = monozygotic (tie-bar), dz = dizygotic (no bar), unknown = "?". */
15
+ type Zygosity = "mz" | "dz" | "unknown";
16
+ /** A condition referenced by Individual.affectedBy; drives the filled-glyph partitions. */
17
+ interface Condition {
18
+ id: number;
19
+ /** Verbatim condition name (legend + <title>; escaped on emit). */
20
+ label: string;
21
+ }
22
+ /**
23
+ * A pedigree individual — declared clinical facts only; nothing inferred. Reuses the
24
+ * genogram's exact person grammar ({ id, label, sex, deceased }) but `generation` is
25
+ * MANDATORY and integer (a pedigree without generations is not a pedigree), and the
26
+ * clinical overlay (affectedBy, carrier, role, lifeStatus) is pedigree-specific.
27
+ */
28
+ interface Individual {
29
+ id: number;
30
+ label: string;
31
+ /** square/circle/diamond — re-exported genogram vocabulary. */
32
+ sex: PersonSex;
33
+ /** MANDATORY integer; smaller = older = higher row (validated, never derived here). */
34
+ generation: number;
35
+ /** Deceased slash (PSSC: top-left → bottom-right), reusing the genogram's exact line. */
36
+ deceased: boolean;
37
+ /** Asymptomatic-carrier center dot; PSSC puts it on UNAFFECTED carriers only. */
38
+ carrier: boolean;
39
+ /** PSSC proband (filled arrow) / consultand (open arrow); null = neither. */
40
+ role: PedigreeRole;
41
+ /** "stillbirth" → an "SB" annotation below the glyph. */
42
+ lifeStatus: LifeStatus;
43
+ /** Condition ids this individual is affected by (filled-glyph partitions, ≤4). [] = unaffected. */
44
+ affectedBy: number[];
45
+ /** Optional verbatim <title> override (defaults to "<address> · label[ · affected: …]"). */
46
+ title?: string;
47
+ }
48
+ /**
49
+ * A declared mating between two individuals. The pair is unordered (the layout normalizes
50
+ * a < b). `consanguineous` draws the PSSC DOUBLE mating line — the core distinguishing
51
+ * mark a genogram Union has no concept of (and the single biggest reason pedigree owns its
52
+ * relational layer instead of importing the genogram's). No status vocabulary: a pedigree
53
+ * does not draw McGoldrick divorce slashes.
54
+ */
55
+ interface Mating {
56
+ id: number;
57
+ partnerAId: number;
58
+ partnerBId: number;
59
+ /** PSSC double mating line. */
60
+ consanguineous: boolean;
61
+ }
62
+ /** A twin group within ONE sibship: ≥2 child ids of one zygosity, all in that sibship. */
63
+ interface TwinGroup {
64
+ /** ≥2 child ids from THIS sibship that are twins of one zygosity. */
65
+ childIds: number[];
66
+ zygosity: Zygosity;
67
+ }
68
+ /**
69
+ * The children of one mating, in declared left-to-right birth order (the fishbone "declared
70
+ * order is data" doctrine). The sibship is a FIRST-CLASS declared object — twin zygosity
71
+ * and birth order live here, not on the individual — so the layout draws one drop-bar per
72
+ * DECLARED sibship and never auto-attaches a child to a mating.
73
+ */
74
+ interface Sibship {
75
+ id: number;
76
+ matingId: number;
77
+ /** Child individual ids, left→right (declared order honored; PSSC birth order). */
78
+ childIds: number[];
79
+ /** Twin groupings among these children; [] = no twins. */
80
+ twinGroups: TwinGroup[];
81
+ }
82
+ /** Input to the pedigree render pipeline. */
83
+ interface PedigreeInput {
84
+ conditions: Condition[];
85
+ individuals: Individual[];
86
+ matings: Mating[];
87
+ sibships: Sibship[];
88
+ }
89
+
90
+ /** Labels woven into element/node <title>s by the LAYOUT (verbatim-preserving). */
91
+ interface PedigreeTitleLabels {
92
+ /** Prefix → "affected: <condition.label>, …". */
93
+ affected: string;
94
+ carrier: string;
95
+ deceased: string;
96
+ proband: string;
97
+ consultand: string;
98
+ consanguineous: string;
99
+ mating: string;
100
+ sibship: string;
101
+ twins: Record<Zygosity, string>;
102
+ stillbirth: string;
103
+ /** Used in the generation-gutter aria-style <title>, e.g. "generation I". */
104
+ generation: string;
105
+ }
106
+ declare const PEDIGREE_TITLE_LABELS_EN: PedigreeTitleLabels;
107
+ /** Labels drawn by the SVG EMITTER (legend entries, accessibility text). */
108
+ interface PedigreeSvgLabels {
109
+ shapes: Record<NodeShape, string>;
110
+ unaffected: string;
111
+ carrier: string;
112
+ deceased: string;
113
+ proband: string;
114
+ consultand: string;
115
+ consanguineous: string;
116
+ twins: Record<Zygosity, string>;
117
+ stillbirth: string;
118
+ isolated: string;
119
+ ariaLabel: string;
120
+ }
121
+ declare const PEDIGREE_SVG_LABELS_EN: PedigreeSvgLabels;
122
+
123
+ export { type Condition as C, type Individual as I, LIFE_STATUSES as L, type Mating as M, PEDIGREE_SVG_LABELS_EN as P, type Sibship as S, type TwinGroup as T, type Zygosity as Z, type LifeStatus as a, PEDIGREE_TITLE_LABELS_EN as b, type PedigreeInput as c, type PedigreeRole as d, type PedigreeSvgLabels as e, type PedigreeTitleLabels as f };
@@ -0,0 +1,64 @@
1
+ /**
2
+ * A declared node. `label` is verbatim (always kept in the <title>); `isTip` is a
3
+ * DECLARED flag reconciled against topology in validation (a contradiction →
4
+ * "tip-with-children"), never a source of truth. `support` is a bootstrap %/posterior
5
+ * at an internal clade; null/absent on tips and unsupported clades.
6
+ */
7
+ interface PhyloNode {
8
+ id: number;
9
+ label: string;
10
+ /** Declared tip flag; reconciled against topology in validation. */
11
+ isTip?: boolean;
12
+ /** Bootstrap/posterior; null/absent on tips and unsupported clades. */
13
+ support?: number | null;
14
+ /** Optional verbatim <title> override (defaults to label + branch-length/support). */
15
+ title?: string;
16
+ }
17
+ /**
18
+ * A declared branch (parent → child). The branch length belongs to the edge leading
19
+ * INTO the child (Newick attaches length to the branch, which is the edge); `null` =
20
+ * unspecified → contributes 0 in a phylogram.
21
+ */
22
+ interface PhyloEdge {
23
+ id: number;
24
+ parentId: number;
25
+ childId: number;
26
+ /** Branch length (phylogram x); null = unspecified → 0 in phylogram. */
27
+ length: number | null;
28
+ }
29
+ /** Input to the phylo render pipeline. */
30
+ interface PhyloInput {
31
+ rootId: number;
32
+ nodes: PhyloNode[];
33
+ edges: PhyloEdge[];
34
+ }
35
+ /**
36
+ * CLOSED render-mode vocabulary:
37
+ * - "cladogram": topology only; x = depth; tips right-aligned (branch lengths ignored);
38
+ * - "phylogram": x = cumulative branch length from root; tips NOT aligned (the x is the
39
+ * data) unless alignTips explicitly requests dotted extensions.
40
+ */
41
+ type PhyloMode = "cladogram" | "phylogram";
42
+
43
+ /** Labels woven into <title>s by the LAYOUT (verbatim-preserving). */
44
+ interface PhyloTitleLabels {
45
+ /** "branch length" → "branch length: 0.123" when a length is present. */
46
+ branchLength: string;
47
+ /** "support" → "support: 95" when a support value is present. */
48
+ support: string;
49
+ clade: string;
50
+ tip: string;
51
+ root: string;
52
+ }
53
+ declare const PHYLO_TITLE_LABELS_EN: PhyloTitleLabels;
54
+ /** Labels drawn by the SVG EMITTER (legend entries, accessibility text). */
55
+ interface PhyloSvgLabels {
56
+ support: string;
57
+ scaleBar: string;
58
+ alignedTip: string;
59
+ /** Aria label switches on the layout's render mode. */
60
+ ariaLabel: Record<PhyloMode, string>;
61
+ }
62
+ declare const PHYLO_SVG_LABELS_EN: PhyloSvgLabels;
63
+
64
+ export { PHYLO_SVG_LABELS_EN as P, PHYLO_TITLE_LABELS_EN as a, type PhyloEdge as b, type PhyloInput as c, type PhyloMode as d, type PhyloNode as e, type PhyloSvgLabels as f, type PhyloTitleLabels as g };