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.
- package/README.md +126 -8
- 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-LRHHUJFZ.js +703 -0
- package/dist/chunk-LRHHUJFZ.js.map +1 -0
- package/dist/{chunk-E456YKAJ.js → chunk-O3BT2O42.js} +69 -10
- package/dist/chunk-O3BT2O42.js.map +1 -0
- package/dist/{chunk-L5CYESBI.js → chunk-Q6DVTCXD.js} +9 -24
- package/dist/chunk-Q6DVTCXD.js.map +1 -0
- package/dist/{chunk-5RRRE2GF.js → chunk-RWPGGWO5.js} +9 -28
- package/dist/chunk-RWPGGWO5.js.map +1 -0
- package/dist/chunk-ZBDABVIO.js +252 -0
- package/dist/chunk-ZBDABVIO.js.map +1 -0
- package/dist/core/index.cjs +74 -7
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +33 -29
- package/dist/core/index.d.ts +33 -29
- package/dist/core/index.js +1 -1
- package/dist/ecomap/index.cjs +43 -28
- package/dist/ecomap/index.cjs.map +1 -1
- package/dist/ecomap/index.js +2 -2
- package/dist/fault-tree/index.cjs +782 -0
- package/dist/fault-tree/index.cjs.map +1 -0
- package/dist/fault-tree/index.d.cts +148 -0
- package/dist/fault-tree/index.d.ts +148 -0
- package/dist/fault-tree/index.js +4 -0
- package/dist/fault-tree/index.js.map +1 -0
- package/dist/fishbone/index.cjs +314 -0
- package/dist/fishbone/index.cjs.map +1 -0
- package/dist/fishbone/index.d.cts +91 -0
- package/dist/fishbone/index.d.ts +91 -0
- package/dist/fishbone/index.js +4 -0
- package/dist/fishbone/index.js.map +1 -0
- package/dist/genogram/index.cjs +47 -32
- package/dist/genogram/index.cjs.map +1 -1
- package/dist/genogram/index.d.cts +7 -4
- package/dist/genogram/index.d.ts +7 -4
- package/dist/genogram/index.js +2 -2
- package/dist/index.cjs +2622 -55
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -2
- package/dist/index.d.ts +12 -2
- package/dist/index.js +7 -3
- 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-CYbM5XV7.d.cts +83 -0
- package/dist/labels-CYbM5XV7.d.ts +83 -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 +94 -0
- package/dist/locales/pt-br.cjs.map +1 -1
- package/dist/locales/pt-br.d.cts +14 -2
- package/dist/locales/pt-br.d.ts +14 -2
- package/dist/locales/pt-br.js +88 -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/text-DuO_PwYw.d.cts +45 -0
- package/dist/text-DuO_PwYw.d.ts +45 -0
- package/dist/types-BnMG7TCd.d.cts +66 -0
- package/dist/types-BnMG7TCd.d.ts +66 -0
- package/dist/xml-DDae1eUr.d.cts +4 -0
- package/dist/xml-DDae1eUr.d.ts +4 -0
- package/package.json +100 -26
- package/dist/chunk-5RRRE2GF.js.map +0 -1
- package/dist/chunk-E456YKAJ.js.map +0 -1
- package/dist/chunk-L5CYESBI.js.map +0 -1
- package/dist/kinship-BARO5-qz.d.cts +0 -115
- package/dist/kinship-Bkf87Jhu.d.ts +0 -115
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import { a as EdgeLineStyle } from './stroke-MQ427drt.js';
|
|
2
|
-
|
|
3
|
-
/** Sex marker for a genogram node (standard notation: square/circle/diamond). */
|
|
4
|
-
type PersonSex = "male" | "female" | "unknown";
|
|
5
|
-
/** A genogram node. `generation` is relative (0 = index person; negative = older). */
|
|
6
|
-
interface Person {
|
|
7
|
-
id: number;
|
|
8
|
-
label: string;
|
|
9
|
-
sex: PersonSex;
|
|
10
|
-
deceased: boolean;
|
|
11
|
-
generation: number | null;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* CLOSED status vocabulary for a declared union. Notable semantics:
|
|
15
|
-
* - "coparental": the two were NEVER a couple and have child(ren) together;
|
|
16
|
-
* - "unknown": a union was declared, but its type was not;
|
|
17
|
-
* - widowhood is NOT a status — death lives on Person.deceased and never
|
|
18
|
-
* alters the declared status;
|
|
19
|
-
* - no value for "not stated": the union simply is not passed in.
|
|
20
|
-
*/
|
|
21
|
-
declare const UNION_STATUSES: readonly ["married", "cohabiting", "dating", "separated", "divorced", "coparental", "unknown"];
|
|
22
|
-
type UnionStatus = (typeof UNION_STATUSES)[number];
|
|
23
|
-
/**
|
|
24
|
-
* A declared couple bond between two people. The pair is unordered and expected
|
|
25
|
-
* normalized to personAId < personBId with ONE union per pair (duplicates are the
|
|
26
|
-
* caller's to resolve). `quality` is the author's verbatim wording about the bond.
|
|
27
|
-
*/
|
|
28
|
-
interface Union {
|
|
29
|
-
id: number;
|
|
30
|
-
/** Always the smaller person id (normalized pair). */
|
|
31
|
-
personAId: number;
|
|
32
|
-
personBId: number;
|
|
33
|
-
status: UnionStatus;
|
|
34
|
-
quality: string | null;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* A declared parentage link: parent → child, one row PER DECLARED genitor (two
|
|
38
|
-
* genitors = two links, each individually stated — never promoted from a union).
|
|
39
|
-
*/
|
|
40
|
-
interface ParentLink {
|
|
41
|
-
id: number;
|
|
42
|
-
parentId: number;
|
|
43
|
-
childId: number;
|
|
44
|
-
quality: string | null;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* A typed free-text edge between two people. `type` and `quality` are verbatim
|
|
48
|
-
* labels. This carries NON-STRUCTURAL ties only (closeness, conflict…) — unions
|
|
49
|
-
* and parentage are first-class above.
|
|
50
|
-
*/
|
|
51
|
-
interface Relationship {
|
|
52
|
-
id: number;
|
|
53
|
-
fromPersonId: number;
|
|
54
|
-
toPersonId: number;
|
|
55
|
-
type: string;
|
|
56
|
-
quality: string | null;
|
|
57
|
-
}
|
|
58
|
-
/** Input to the genogram render pipeline. */
|
|
59
|
-
interface GenogramInput {
|
|
60
|
-
people: Person[];
|
|
61
|
-
unions: Union[];
|
|
62
|
-
parentLinks: ParentLink[];
|
|
63
|
-
relationships: Relationship[];
|
|
64
|
-
}
|
|
65
|
-
/** Node glyph shapes (standard notation: square = male, circle = female, diamond = unknown). */
|
|
66
|
-
type NodeShape = "square" | "circle" | "diamond";
|
|
67
|
-
|
|
68
|
-
/** Labels woven into element <title>s by the LAYOUT (verbatim-preserving). */
|
|
69
|
-
interface GenogramTitleLabels {
|
|
70
|
-
unionStatus: Record<UnionStatus, string>;
|
|
71
|
-
/** Title prefix for a parent→child descent ("parent of"). */
|
|
72
|
-
parentage: string;
|
|
73
|
-
}
|
|
74
|
-
declare const GENOGRAM_TITLE_LABELS_EN: GenogramTitleLabels;
|
|
75
|
-
/** Labels drawn by the SVG EMITTER (legend entries, accessibility text). */
|
|
76
|
-
interface GenogramSvgLabels {
|
|
77
|
-
shapes: Record<NodeShape, string>;
|
|
78
|
-
deceased: string;
|
|
79
|
-
bondStyles: Record<Exclude<EdgeLineStyle, "plain">, string>;
|
|
80
|
-
/** Legend label for the group of people with no drawn connection. */
|
|
81
|
-
isolated: string;
|
|
82
|
-
ariaLabel: string;
|
|
83
|
-
}
|
|
84
|
-
declare const GENOGRAM_SVG_LABELS_EN: GenogramSvgLabels;
|
|
85
|
-
|
|
86
|
-
type RelationshipMapClass = "derived" | "parentage" | "bond";
|
|
87
|
-
/**
|
|
88
|
-
* A pluggable kinship vocabulary. Tokens are diacritic-free, lowercase, matched WHOLE
|
|
89
|
-
* (so a token never matches inside another word) after splitting the type on
|
|
90
|
-
* non-alphanumerics ("half-brother" → ["half","brother"]). Checked DERIVED-first, so
|
|
91
|
-
* "brother on my father's side" reads as a sibling, never as a parent. These lists are
|
|
92
|
-
* closed and conservative — an unrecognized word stays a non-structural bond (the
|
|
93
|
-
* honest default). Locale packs (e.g. `compasso/locales/pt-br`) ship alternates.
|
|
94
|
-
*/
|
|
95
|
-
interface KinshipLexicon {
|
|
96
|
-
/** Kinship read from the tree (sibling/grandparent/uncle/cousin…): never a line. */
|
|
97
|
-
derived: ReadonlySet<string>;
|
|
98
|
-
/** Direct parentage words (mother/father/son…): promotable to a descent. */
|
|
99
|
-
parentage: ReadonlySet<string>;
|
|
100
|
-
/** Parentage words whose FROM endpoint is the CHILD — used only to orient a
|
|
101
|
-
* promotion when declared generations do not decide it. */
|
|
102
|
-
childWords: ReadonlySet<string>;
|
|
103
|
-
}
|
|
104
|
-
declare const KINSHIP_EN: KinshipLexicon;
|
|
105
|
-
/** Lowercase + accent-stripped tokens of a free-text relationship type. */
|
|
106
|
-
declare function relationshipTypeTokens(type: string): string[];
|
|
107
|
-
/**
|
|
108
|
-
* Classifies a free-text relationship `type` for the MAP. Pure + deterministic.
|
|
109
|
-
* Derived kinship is checked first so a compound like "brother on my father's side"
|
|
110
|
-
* is read as a sibling (derived), never promoted as a parent. The verbatim word is
|
|
111
|
-
* unaffected — this decides only whether the tie becomes a line, and which kind.
|
|
112
|
-
*/
|
|
113
|
-
declare function classifyRelationshipType(type: string, kinship?: KinshipLexicon): RelationshipMapClass;
|
|
114
|
-
|
|
115
|
-
export { GENOGRAM_SVG_LABELS_EN as G, KINSHIP_EN as K, type NodeShape as N, type ParentLink as P, type Relationship as R, UNION_STATUSES as U, GENOGRAM_TITLE_LABELS_EN as a, type GenogramInput as b, type GenogramSvgLabels as c, type GenogramTitleLabels as d, type KinshipLexicon as e, type Person as f, type PersonSex as g, type RelationshipMapClass as h, type Union as i, type UnionStatus as j, classifyRelationshipType as k, relationshipTypeTokens as r };
|