compasso 0.2.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.
- package/README.md +70 -7
- package/dist/chunk-F47C6ZEB.js +1041 -0
- package/dist/chunk-F47C6ZEB.js.map +1 -0
- package/dist/chunk-JP4N42AY.js +497 -0
- package/dist/chunk-JP4N42AY.js.map +1 -0
- package/dist/{chunk-P2S7AUOL.js → chunk-LRHHUJFZ.js} +3 -3
- package/dist/{chunk-P2S7AUOL.js.map → chunk-LRHHUJFZ.js.map} +1 -1
- package/dist/{chunk-5B453C4P.js → chunk-O3BT2O42.js} +32 -3
- package/dist/chunk-O3BT2O42.js.map +1 -0
- package/dist/{chunk-EHQMKVDM.js → chunk-Q6DVTCXD.js} +9 -24
- package/dist/chunk-Q6DVTCXD.js.map +1 -0
- package/dist/{chunk-5PGOL2KR.js → chunk-RWPGGWO5.js} +9 -28
- package/dist/chunk-RWPGGWO5.js.map +1 -0
- package/dist/{chunk-TP3JOOJW.js → chunk-ZBDABVIO.js} +3 -3
- package/dist/{chunk-TP3JOOJW.js.map → chunk-ZBDABVIO.js.map} +1 -1
- package/dist/core/index.cjs +30 -0
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +5 -1
- package/dist/core/index.d.ts +5 -1
- package/dist/core/index.js +1 -1
- package/dist/ecomap/index.cjs +32 -21
- package/dist/ecomap/index.cjs.map +1 -1
- package/dist/ecomap/index.js +2 -2
- package/dist/fault-tree/index.js +2 -2
- package/dist/fishbone/index.js +2 -2
- package/dist/genogram/index.cjs +36 -25
- package/dist/genogram/index.cjs.map +1 -1
- package/dist/genogram/index.d.cts +4 -2
- package/dist/genogram/index.d.ts +4 -2
- package/dist/genogram/index.js +2 -2
- package/dist/index.cjs +1616 -53
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -2
- package/dist/index.d.ts +7 -2
- package/dist/index.js +7 -5
- package/dist/kinship-DqEklrDN.d.ts +51 -0
- package/dist/kinship-Dy_ijjJV.d.cts +51 -0
- package/dist/labels-CBQ_3Ec9.d.cts +123 -0
- package/dist/labels-DNqRkWuI.d.ts +123 -0
- package/dist/labels-iZjijjtK.d.cts +64 -0
- package/dist/labels-iZjijjtK.d.ts +64 -0
- package/dist/locales/pt-br.cjs +58 -0
- package/dist/locales/pt-br.cjs.map +1 -1
- package/dist/locales/pt-br.d.cts +9 -2
- package/dist/locales/pt-br.d.ts +9 -2
- package/dist/locales/pt-br.js +55 -1
- package/dist/locales/pt-br.js.map +1 -1
- package/dist/pedigree/index.cjs +1151 -0
- package/dist/pedigree/index.cjs.map +1 -0
- package/dist/pedigree/index.d.cts +155 -0
- package/dist/pedigree/index.d.ts +155 -0
- package/dist/pedigree/index.js +4 -0
- package/dist/pedigree/index.js.map +1 -0
- package/dist/phylo/index.cjs +553 -0
- package/dist/phylo/index.cjs.map +1 -0
- package/dist/phylo/index.d.cts +158 -0
- package/dist/phylo/index.d.ts +158 -0
- package/dist/phylo/index.js +4 -0
- package/dist/phylo/index.js.map +1 -0
- package/dist/types-BnMG7TCd.d.cts +66 -0
- package/dist/types-BnMG7TCd.d.ts +66 -0
- package/package.json +34 -12
- package/dist/chunk-5B453C4P.js.map +0 -1
- package/dist/chunk-5PGOL2KR.js.map +0 -1
- package/dist/chunk-EHQMKVDM.js.map +0 -1
- package/dist/kinship-BARO5-qz.d.cts +0 -115
- package/dist/kinship-Bkf87Jhu.d.ts +0 -115
package/dist/index.d.cts
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
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';
|
|
2
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';
|
|
3
|
-
export { LEGEND_FONT, LEGEND_GAP, LEGEND_PAD, LEGEND_ROW_H, LEGEND_SWATCH_W, LegendBlock, LegendEntry, legendBlock } from './core/index.cjs';
|
|
4
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';
|
|
5
|
-
export { G as
|
|
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';
|
|
6
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';
|
|
7
8
|
export { ECOMAP_LABELS_EN, EcomapDirection, EcomapInput, EcomapLabels, EcomapSvgOptions, EcomapTie, ecomapSvg } from './ecomap/index.cjs';
|
|
8
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';
|
|
9
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';
|
|
10
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,10 +1,15 @@
|
|
|
1
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';
|
|
2
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';
|
|
3
|
-
export { LEGEND_FONT, LEGEND_GAP, LEGEND_PAD, LEGEND_ROW_H, LEGEND_SWATCH_W, LegendBlock, LegendEntry, legendBlock } from './core/index.js';
|
|
4
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';
|
|
5
|
-
export { G as
|
|
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';
|
|
6
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';
|
|
7
8
|
export { ECOMAP_LABELS_EN, EcomapDirection, EcomapInput, EcomapLabels, EcomapSvgOptions, EcomapTie, ecomapSvg } from './ecomap/index.js';
|
|
8
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';
|
|
9
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';
|
|
10
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,7 +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-
|
|
2
|
-
export { ECOMAP_LABELS_EN, ecomapSvg } from './chunk-
|
|
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-
|
|
4
|
-
export { FISHBONE_LABELS_EN, FishboneValidationError, fishboneSvg } from './chunk-
|
|
5
|
-
export {
|
|
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';
|
|
6
8
|
//# sourceMappingURL=index.js.map
|
|
7
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,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 };
|
|
@@ -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 };
|
package/dist/locales/pt-br.cjs
CHANGED
|
@@ -146,6 +146,60 @@ var FISHBONE_LABELS_PT_BR = {
|
|
|
146
146
|
subCause: "Subcausa",
|
|
147
147
|
ariaLabel: "Diagrama de causa e efeito (Ishikawa)"
|
|
148
148
|
};
|
|
149
|
+
var PEDIGREE_TITLE_LABELS_PT_BR = {
|
|
150
|
+
affected: "afetado(a) por",
|
|
151
|
+
carrier: "portador(a)",
|
|
152
|
+
deceased: "falecido(a)",
|
|
153
|
+
proband: "probando",
|
|
154
|
+
consultand: "consulente",
|
|
155
|
+
consanguineous: "uni\xE3o consangu\xEDnea",
|
|
156
|
+
mating: "uni\xE3o",
|
|
157
|
+
sibship: "prole",
|
|
158
|
+
twins: {
|
|
159
|
+
mz: "g\xEAmeos monozig\xF3ticos",
|
|
160
|
+
dz: "g\xEAmeos dizig\xF3ticos",
|
|
161
|
+
unknown: "g\xEAmeos, zigosidade desconhecida"
|
|
162
|
+
},
|
|
163
|
+
stillbirth: "natimorto",
|
|
164
|
+
generation: "gera\xE7\xE3o"
|
|
165
|
+
};
|
|
166
|
+
var PEDIGREE_SVG_LABELS_PT_BR = {
|
|
167
|
+
shapes: {
|
|
168
|
+
square: "Homem",
|
|
169
|
+
circle: "Mulher",
|
|
170
|
+
diamond: "Sexo n\xE3o informado"
|
|
171
|
+
},
|
|
172
|
+
unaffected: "N\xE3o afetado(a)",
|
|
173
|
+
carrier: "Portador(a)",
|
|
174
|
+
deceased: "Falecido(a)",
|
|
175
|
+
proband: "Probando",
|
|
176
|
+
consultand: "Consulente",
|
|
177
|
+
consanguineous: "Uni\xE3o consangu\xEDnea",
|
|
178
|
+
twins: {
|
|
179
|
+
mz: "G\xEAmeos monozig\xF3ticos",
|
|
180
|
+
dz: "G\xEAmeos dizig\xF3ticos",
|
|
181
|
+
unknown: "G\xEAmeos (zigosidade desconhecida)"
|
|
182
|
+
},
|
|
183
|
+
stillbirth: "Natimorto",
|
|
184
|
+
isolated: "Sem parentes registrados",
|
|
185
|
+
ariaLabel: "Heredograma"
|
|
186
|
+
};
|
|
187
|
+
var PHYLO_TITLE_LABELS_PT_BR = {
|
|
188
|
+
branchLength: "comprimento do ramo",
|
|
189
|
+
support: "suporte",
|
|
190
|
+
clade: "clado",
|
|
191
|
+
tip: "ponta",
|
|
192
|
+
root: "raiz"
|
|
193
|
+
};
|
|
194
|
+
var PHYLO_SVG_LABELS_PT_BR = {
|
|
195
|
+
support: "Valor de suporte (bootstrap/posterior)",
|
|
196
|
+
scaleBar: "Escala: substitui\xE7\xF5es por s\xEDtio",
|
|
197
|
+
alignedTip: "Ponta alinhada (posi\xE7\xE3o real pontilhada)",
|
|
198
|
+
ariaLabel: {
|
|
199
|
+
cladogram: "\xC1rvore filogen\xE9tica (cladograma)",
|
|
200
|
+
phylogram: "\xC1rvore filogen\xE9tica (filograma)"
|
|
201
|
+
}
|
|
202
|
+
};
|
|
149
203
|
|
|
150
204
|
exports.ECOMAP_LABELS_PT_BR = ECOMAP_LABELS_PT_BR;
|
|
151
205
|
exports.FAULT_TREE_SVG_LABELS_PT_BR = FAULT_TREE_SVG_LABELS_PT_BR;
|
|
@@ -154,6 +208,10 @@ exports.FISHBONE_LABELS_PT_BR = FISHBONE_LABELS_PT_BR;
|
|
|
154
208
|
exports.GENOGRAM_SVG_LABELS_PT_BR = GENOGRAM_SVG_LABELS_PT_BR;
|
|
155
209
|
exports.GENOGRAM_TITLE_LABELS_PT_BR = GENOGRAM_TITLE_LABELS_PT_BR;
|
|
156
210
|
exports.KINSHIP_PT_BR = KINSHIP_PT_BR;
|
|
211
|
+
exports.PEDIGREE_SVG_LABELS_PT_BR = PEDIGREE_SVG_LABELS_PT_BR;
|
|
212
|
+
exports.PEDIGREE_TITLE_LABELS_PT_BR = PEDIGREE_TITLE_LABELS_PT_BR;
|
|
213
|
+
exports.PHYLO_SVG_LABELS_PT_BR = PHYLO_SVG_LABELS_PT_BR;
|
|
214
|
+
exports.PHYLO_TITLE_LABELS_PT_BR = PHYLO_TITLE_LABELS_PT_BR;
|
|
157
215
|
exports.QUALITY_LEXICON_PT_BR = QUALITY_LEXICON_PT_BR;
|
|
158
216
|
//# sourceMappingURL=pt-br.cjs.map
|
|
159
217
|
//# sourceMappingURL=pt-br.cjs.map
|