@treeviz/gedcom-parser 1.0.22 → 2.0.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.
@@ -855,8 +855,10 @@ declare class Indi extends Common<string, IndiKey> implements IIndi {
855
855
  getFamilySearchMatches(): FamilySearchMatch[];
856
856
  hasFamilySearchSources(): boolean;
857
857
  getFamilySearchSources(): FamilySearchSource[];
858
+ geniMedia(): MediaList;
859
+ universalMedia(): MediaList;
858
860
  multimedia(namespace?: string | number): Promise<MediaList | undefined>;
859
- getProfilePicture(namespace?: string | number): Promise<ProfilePicture | undefined>;
861
+ getProfilePicture(namespace?: string | number, onlyPrimary?: boolean): Promise<ProfilePicture | undefined>;
860
862
  link(poolId?: number): string;
861
863
  toFamilies(list?: List): Families;
862
864
  getFamilies(type: "FAMC" | "FAMS"): Families;
@@ -1409,6 +1411,8 @@ interface Tags {
1409
1411
  BAPT?: Common;
1410
1412
  CHRI?: Common;
1411
1413
  BURI?: Common;
1414
+ GEDC?: Common;
1415
+ RFN?: Common;
1412
1416
  }
1413
1417
  type Tag = keyof Tags | keyof NonStandard;
1414
1418
  type ListTag = `@@${keyof Tags}`;
@@ -1650,12 +1654,38 @@ declare class Common<T = string, I extends IdType = IdType> implements ICommon<T
1650
1654
  isGeni(): boolean;
1651
1655
  isAncestry(): boolean;
1652
1656
  isMyHeritage(): boolean;
1657
+ /**
1658
+ * Get the source type as a string (for prefixing tree IDs and names)
1659
+ * Returns the detected source type or undefined if unknown
1660
+ */
1661
+ getSourceType(): string | undefined;
1653
1662
  isFamilySearch(): boolean;
1663
+ isGNO2GED(): boolean;
1654
1664
  getAncestryTreeId(): string | undefined;
1655
1665
  getMyHeritageTreeId(): string | undefined;
1656
1666
  getTreeId(): string;
1657
1667
  getAncestryTreeName(): string | undefined;
1658
1668
  getMyHeritageTreeName(): string;
1669
+ getFamilySearchTreeId(): string;
1670
+ getFamilySearchTreeName(): string;
1671
+ getAhnenblattTreeId(): string;
1672
+ getAhnenblattTreeName(): string;
1673
+ getGeniTreeId(): string;
1674
+ getGeniTreeName(): string;
1675
+ getGenoProTreeId(): string;
1676
+ getGenoProTreeName(): string;
1677
+ getGNO2GEDTreeId(): string;
1678
+ getGNO2GEDTreeName(): string;
1679
+ /**
1680
+ * Universal tree ID getter for unknown/unrecognized GEDCOM sources
1681
+ * Tries to extract an ID from various common locations
1682
+ */
1683
+ getUniversalTreeId(): string;
1684
+ /**
1685
+ * Universal tree name getter for unknown/unrecognized GEDCOM sources
1686
+ * Tries to extract a name from various common locations
1687
+ */
1688
+ getUniversalTreeName(): string;
1659
1689
  getTreeName(): string;
1660
1690
  }
1661
1691
  type ProxyOriginal<T extends Common> = T & {
@@ -1672,4 +1702,4 @@ declare const getValidKey: (tag: string, id: string) => string;
1672
1702
  declare const isId: (string: string) => string is IdType;
1673
1703
  declare const idGetter: <T extends IdType>(id?: T) => T;
1674
1704
 
1675
- export { type RepoType as $, type Order as A, type OrderIterator as B, type Cases as C, type Group as D, type GroupMarker as E, type FamKey as F, type GroupDefinition as G, type GroupIterator as H, type IKinshipTranslator as I, type NestedGroup as J, type NameOrder as K, type Language as L, type MultiTag as M, type NonStandard as N, type ObjeKey as O, type PrimitiveRange as P, type PlaceOrder as Q, type Range$1 as R, type SplitResult as S, type TagKey as T, type UnknownKey as U, type LinkedPersons as V, RelationType as W, PartnerType as X, Range as Y, type ProxyOriginal as Z, type SourType as _, isIntersectedRange as a, Sour as a$, type SubmType as a0, type IndiType as a1, type TreeMember as a2, type GenealogyMember as a3, type IndiTree as a4, type IndiGenealogy as a5, type IndiMarker as a6, type MemberSide as a7, type MemberMain as a8, type GenerationSpouseType as a9, createCommonDate as aA, isCommonDate as aB, Fam as aC, createFam as aD, Families as aE, GedCom as aF, createGedCom as aG, isGedcomString as aH, validateGedcomContent as aI, mergeGedcoms as aJ, Indi as aK, type FamilySearchMatch as aL, type FamilySearchSource as aM, type ProfilePicture as aN, createIndi as aO, Individuals as aP, List as aQ, CommonName as aR, createCommonName as aS, CommonNote as aT, createCommonNote as aU, Obje as aV, createObje as aW, Objects as aX, Repo as aY, createRepo as aZ, Repositories as a_, type GenerationIndiType as aa, type IndiGenealogyGenerations as ab, type IndiGenealogyResult as ac, type NonNullIndiGenealogyResult as ad, type PathItem as ae, type Path as af, type ReducedPath as ag, type QueueItem as ah, type Queue as ai, type FamType as aj, type GedComType as ak, type ObjeType as al, Existed as am, CustomTags as an, Common as ao, createProxy as ap, createCommon as aq, isOnlyMainProp as ar, isValidKey as as, getValidKeys as at, getValidTag as au, getListTag as av, getValidKey as aw, isId as ax, idGetter as ay, CommonDate as az, isRangeContained as b, createSour as b0, Sources as b1, Subm as b2, createSubm as b3, Submitters as b4, type ICommon as b5, type IFam as b6, type IFamilies as b7, type IGedcom as b8, type IIndi as b9, type ISourceCitationStructure as bA, type ISourceRepositoryCitationStructure as bB, type ISourceStructure as bC, type Place as bD, PlaceType as bE, getPlaces as bF, type GeneratedIndiMethods as ba, type IIndividuals as bb, type IList as bc, type IObje as bd, type IRepo as be, type ISour as bf, type ISubm as bg, type IAddressStructure as bh, type IAssociationStructure as bi, type IChangeDateStructure as bj, type ICreationDateStructure as bk, type IDateStructure as bl, type IEventDetailStructure as bm, type IFamilyStructure as bn, type IGedComStructure as bo, type IIndividualEventDetailStructure as bp, type IIndividualEventStructure as bq, type IIndividualStructure as br, type ILdsOrdinanceDetailStructure as bs, type ILdsSpouseSealingStructure as bt, type IMarriageDateStructure as bu, type IMultimediaLinkStructure as bv, type INonEventStructure as bw, type INoteStructure as bx, type IPlaceStructure as by, type IRepositoryStructure as bz, splitOverlappingRanges as c, findMatchingRangeForSplitRange as d, extractSplitPoints as e, fromTuple as f, generateSplitRanges as g, extractSeparationYears as h, inRange as i, type CrossCase as j, type CrossCases as k, type Settings as l, type ConvertType as m, type IndiKey as n, type RepoKey as o, parseRangeBounds as p, type SourKey as q, type SubmKey as r, splitRange as s, type IdType as t, type Tag as u, type ListTag as v, type FilterIterator as w, type Filter as x, type RequiredFilter as y, type OrderDefinition as z };
1705
+ export { type IPlaceStructure as $, type ICommon as A, type ICreationDateStructure as B, type Cases as C, type IDateStructure as D, Existed as E, Fam as F, GedCom as G, type IEventDetailStructure as H, type IAddressStructure as I, type IFam as J, type IFamilies as K, type IFamilyStructure as L, type IGedcom as M, type IGedComStructure as N, type IIndi as O, type IIndividualStructure as P, type IIndividualEventStructure as Q, type IIndividualEventDetailStructure as R, type IIndividuals as S, type ILdsOrdinanceDetailStructure as T, type ILdsSpouseSealingStructure as U, type IList as V, type IMarriageDateStructure as W, type IMultimediaLinkStructure as X, type INonEventStructure as Y, type INoteStructure as Z, type IObje as _, Common as a, type SubmKey as a$, type IRepo as a0, type IRepositoryStructure as a1, type ISour as a2, type ISourceStructure as a3, type ISourceCitationStructure as a4, type ISourceRepositoryCitationStructure as a5, type ISubm as a6, type IdType as a7, Indi as a8, type IndiGenealogy as a9, PartnerType as aA, type Path as aB, type PathItem as aC, type Place as aD, type PlaceOrder as aE, PlaceType as aF, type PrimitiveRange as aG, type ProfilePicture as aH, type ProxyOriginal as aI, type Queue as aJ, type QueueItem as aK, Range as aL, type Range$1 as aM, type ReducedPath as aN, RelationType as aO, Repo as aP, type RepoKey as aQ, type RepoType as aR, Repositories as aS, type RequiredFilter as aT, type Settings as aU, Sour as aV, type SourKey as aW, type SourType as aX, Sources as aY, type SplitResult as aZ, Subm as a_, type IndiGenealogyGenerations as aa, type IndiGenealogyResult as ab, type IndiKey as ac, type IndiMarker as ad, type IndiTree as ae, type IndiType as af, Individuals as ag, type IKinshipTranslator as ah, type Language as ai, type LinkedPersons as aj, List as ak, type ListTag as al, type MemberMain as am, type MemberSide as an, type MultiTag as ao, type NameOrder as ap, type NestedGroup as aq, type NonNullIndiGenealogyResult as ar, type NonStandard as as, Obje as at, type ObjeKey as au, type ObjeType as av, Objects as aw, type Order as ax, type OrderDefinition as ay, type OrderIterator as az, CommonDate as b, type SubmType as b0, Submitters as b1, type Tag as b2, type TagKey as b3, type TreeMember as b4, type UnknownKey as b5, createCommon as b6, createCommonDate as b7, createCommonName as b8, createCommonNote as b9, isValidKey as bA, mergeGedcoms as bB, parseRangeBounds as bC, splitOverlappingRanges as bD, splitRange as bE, validateGedcomContent as bF, createFam as ba, createGedCom as bb, createIndi as bc, createObje as bd, createProxy as be, createRepo as bf, createSour as bg, createSubm as bh, extractSeparationYears as bi, extractSplitPoints as bj, findMatchingRangeForSplitRange as bk, fromTuple as bl, generateSplitRanges as bm, getListTag as bn, getPlaces as bo, getValidKey as bp, getValidKeys as bq, getValidTag as br, idGetter as bs, inRange as bt, isCommonDate as bu, isGedcomString as bv, isId as bw, isIntersectedRange as bx, isOnlyMainProp as by, isRangeContained as bz, CommonName as c, CommonNote as d, type ConvertType as e, type CrossCase as f, type CrossCases as g, CustomTags as h, type FamKey as i, type FamType as j, Families as k, type FamilySearchMatch as l, type FamilySearchSource as m, type Filter as n, type FilterIterator as o, type GedComType as p, type GenealogyMember as q, type GeneratedIndiMethods as r, type GenerationIndiType as s, type GenerationSpouseType as t, type Group as u, type GroupDefinition as v, type GroupIterator as w, type GroupMarker as x, type IAssociationStructure as y, type IChangeDateStructure as z };
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- export { A as ACCEPTED_DATE_FORMATS, a as ACCEPTED_DATE_FORMATS_REGEX, G as GedcomTree, b as commonDateFormatter, c as create, d as dateFormatter, G as default, e as getAllProp, f as getFamilyWith, j as getName, g as getRawSize, h as getVersion, q as hungarianOrdinalize, k as implemented, i as isDevelopment, m as marriageDateFormatter, o as nameFormatter, l as notImplemented, n as noteDateFormatter, p as ordinalize, r as placeTranslator, s as setNestedGroup } from './place-translator-CRiaOO9v.js';
1
+ export { A as ACCEPTED_DATE_FORMATS, a as ACCEPTED_DATE_FORMATS_REGEX, G as GedcomTree, c as commonDateFormatter, b as create, d as dateFormatter, G as default, g as getAllProp, e as getFamilyWith, f as getName, h as getRawSize, i as getVersion, j as hungarianOrdinalize, k as implemented, l as isDevelopment, m as marriageDateFormatter, n as nameFormatter, o as notImplemented, p as noteDateFormatter, q as ordinalize, r as placeTranslator, s as setNestedGroup } from './place-translator-Ci5rEY6p.js';
2
2
  export { CacheManagerFactory, DateLocaleProvider, I18nProvider, KinshipTranslatorConstructor, PlaceParserFunction, PlaceTranslatorFunction, getCacheManagerFactory, getDateLocale, getI18n, getKinshipTranslatorClass, getPlaceParserProvider, getPlaceTranslatorProvider, i18n, resetCacheManagerFactory, resetDateLocaleProvider, resetI18nProvider, resetKinshipTranslatorClass, resetPlaceParserProvider, resetPlaceTranslatorProvider, setCacheManagerFactory, setDateLocaleProvider, setI18nProvider, setKinshipTranslatorClass, setPlaceParserProvider, setPlaceTranslatorProvider } from './factories/index.js';
3
- export { C as CacheRelatives, I as ICacheManager, P as PlaceParts, g as getPlaceParts, p as pathCache, a as relativesCache, r as resetRelativesCache } from './place-parser-CM0TJFj8.js';
3
+ export { C as CacheRelatives, I as ICacheManager, P as PlaceParts, g as getPlaceParts, i as initializeCache, p as pathCache, a as profilePictureCache, r as relativesCache, b as resetRelativesCache } from './place-parser-CJ3EbFmb.js';
4
4
  export { KinshipTranslator, KinshipTranslatorBasic, KinshipTranslatorDE, KinshipTranslatorEN, KinshipTranslatorES, KinshipTranslatorFR, KinshipTranslatorHU, translators } from './kinship-translator/index.js';
5
- export { C as Cases, ao as Common, az as CommonDate, aR as CommonName, aT as CommonNote, m as ConvertType, j as CrossCase, k as CrossCases, an as CustomTags, am as Existed, aC as Fam, F as FamKey, aj as FamType, aE as Families, aL as FamilySearchMatch, aM as FamilySearchSource, x as Filter, w as FilterIterator, aF as GedCom, ak as GedComType, a3 as GenealogyMember, ba as GeneratedIndiMethods, aa as GenerationIndiType, a9 as GenerationSpouseType, D as Group, G as GroupDefinition, H as GroupIterator, E as GroupMarker, bh as IAddress, bi as IAssociation, bj as IChangeDate, b5 as ICommon, bk as ICreationDate, bl as IDate, bm as IEventDetail, bm as IEventDetailStructure, b6 as IFam, b7 as IFamilies, bn as IFamily, b8 as IGedCom, bo as IGedcomStructure, b9 as IIndi, br as IIndividual, bq as IIndividualEvent, bp as IIndividualEventDetail, br as IIndividualStructure, bb as IIndividuals, bs as ILdsOrdinanceDetail, bt as ILdsSpouseSealing, bc as IList, bu as IMarriageDate, bv as IMultimediaLink, bw as INonEvent, bx as INote, bd as IObje, by as IPlace, be as IRepo, bz as IRepository, bf as ISour, bC as ISource, bA as ISourceCitation, bB as ISourceRepositoryCitation, bg as ISubm, t as IdType, aK as Indi, a5 as IndiGenealogy, ab as IndiGenealogyGenerations, ac as IndiGenealogyResult, n as IndiKey, a6 as IndiMarker, a4 as IndiTree, a1 as IndiType, aP as Individuals, I as KinshipTranslatorInterface, L as Language, V as LinkedPersons, aQ as List, v as ListTag, a8 as MemberMain, a7 as MemberSide, M as MultiTag, K as NameOrder, J as NestedGroup, ad as NonNullIndiGenealogyResult, N as NonStandard, aV as Obje, O as ObjeKey, al as ObjeType, aX as Objects, A as Order, z as OrderDefinition, B as OrderIterator, X as PartnerType, af as Path, ae as PathItem, bD as Place, Q as PlaceOrder, bE as PlaceType, P as PrimitiveRange, aN as ProfilePicture, Z as ProxyOriginal, ai as Queue, ah as QueueItem, Y as Range, R as RangeType, ag as ReducedPath, W as RelationType, aY as Repo, o as RepoKey, $ as RepoType, a_ as Repositories, y as RequiredFilter, l as Settings, a$ as Sour, q as SourKey, _ as SourType, b1 as Sources, S as SplitResult, b2 as Subm, r as SubmKey, a0 as SubmType, b4 as Submitters, u as Tag, T as TagKey, a2 as TreeMember, U as UnknownKey, aq as createCommon, aA as createCommonDate, aS as createCommonName, aU as createCommonNote, aD as createFam, aG as createGedCom, aO as createIndi, aW as createObje, ap as createProxy, aZ as createRepo, b0 as createSour, b3 as createSubm, h as extractSeparationYears, e as extractSplitPoints, d as findMatchingRangeForSplitRange, f as fromTuple, g as generateSplitRanges, av as getListTag, bF as getPlaces, aw as getValidKey, at as getValidKeys, au as getValidTag, ay as idGetter, i as inRange, aB as isCommonDate, aH as isGedcomString, ax as isId, a as isIntersectedRange, ar as isOnlyMainProp, b as isRangeContained, as as isValidKey, aJ as mergeGedcoms, p as parseRangeBounds, c as splitOverlappingRanges, s as splitRange, aI as validateGedcomContent } from './index-BPEVN_DY.js';
5
+ export { C as Cases, a as Common, b as CommonDate, c as CommonName, d as CommonNote, e as ConvertType, f as CrossCase, g as CrossCases, h as CustomTags, E as Existed, F as Fam, i as FamKey, j as FamType, k as Families, l as FamilySearchMatch, m as FamilySearchSource, n as Filter, o as FilterIterator, G as GedCom, p as GedComType, q as GenealogyMember, r as GeneratedIndiMethods, s as GenerationIndiType, t as GenerationSpouseType, u as Group, v as GroupDefinition, w as GroupIterator, x as GroupMarker, I as IAddress, y as IAssociation, z as IChangeDate, A as ICommon, B as ICreationDate, D as IDate, H as IEventDetail, H as IEventDetailStructure, J as IFam, K as IFamilies, L as IFamily, M as IGedCom, N as IGedcomStructure, O as IIndi, P as IIndividual, Q as IIndividualEvent, R as IIndividualEventDetail, P as IIndividualStructure, S as IIndividuals, T as ILdsOrdinanceDetail, U as ILdsSpouseSealing, V as IList, W as IMarriageDate, X as IMultimediaLink, Y as INonEvent, Z as INote, _ as IObje, $ as IPlace, a0 as IRepo, a1 as IRepository, a2 as ISour, a3 as ISource, a4 as ISourceCitation, a5 as ISourceRepositoryCitation, a6 as ISubm, a7 as IdType, a8 as Indi, a9 as IndiGenealogy, aa as IndiGenealogyGenerations, ab as IndiGenealogyResult, ac as IndiKey, ad as IndiMarker, ae as IndiTree, af as IndiType, ag as Individuals, ah as KinshipTranslatorInterface, ai as Language, aj as LinkedPersons, ak as List, al as ListTag, am as MemberMain, an as MemberSide, ao as MultiTag, ap as NameOrder, aq as NestedGroup, ar as NonNullIndiGenealogyResult, as as NonStandard, at as Obje, au as ObjeKey, av as ObjeType, aw as Objects, ax as Order, ay as OrderDefinition, az as OrderIterator, aA as PartnerType, aB as Path, aC as PathItem, aD as Place, aE as PlaceOrder, aF as PlaceType, aG as PrimitiveRange, aH as ProfilePicture, aI as ProxyOriginal, aJ as Queue, aK as QueueItem, aL as Range, aM as RangeType, aN as ReducedPath, aO as RelationType, aP as Repo, aQ as RepoKey, aR as RepoType, aS as Repositories, aT as RequiredFilter, aU as Settings, aV as Sour, aW as SourKey, aX as SourType, aY as Sources, aZ as SplitResult, a_ as Subm, a$ as SubmKey, b0 as SubmType, b1 as Submitters, b2 as Tag, b3 as TagKey, b4 as TreeMember, b5 as UnknownKey, b6 as createCommon, b7 as createCommonDate, b8 as createCommonName, b9 as createCommonNote, ba as createFam, bb as createGedCom, bc as createIndi, bd as createObje, be as createProxy, bf as createRepo, bg as createSour, bh as createSubm, bi as extractSeparationYears, bj as extractSplitPoints, bk as findMatchingRangeForSplitRange, bl as fromTuple, bm as generateSplitRanges, bn as getListTag, bo as getPlaces, bp as getValidKey, bq as getValidKeys, br as getValidTag, bs as idGetter, bt as inRange, bu as isCommonDate, bv as isGedcomString, bw as isId, bx as isIntersectedRange, by as isOnlyMainProp, bz as isRangeContained, bA as isValidKey, bB as mergeGedcoms, bC as parseRangeBounds, bD as splitOverlappingRanges, bE as splitRange, bF as validateGedcomContent } from './index-CzYZg44D.js';
6
6
  export { AncestryMedia } from './types/index.js';
7
7
  export { ADOPTED, BIOLOGICAL, BIRTH, BIRTH_ASC, BIRTH_DESC, DATE_ASC, DATE_DESC, DEATH_ASC, DEATH_DESC, DEFAULT, EVERY, FEMALE, FOSTER, FRIEND, ID_GETTER_REG, ID_REG, ID_SPLIT_REG, LINE_REG, MALE, MAX_FILE_SIZE_TO_SYNC, OTHER, PARTNER, REF_LINE_REG, SEALING, SINGLE, SPOUSE, STEP, UNKOWN, getBirthAsc, getMarriageAsc, getMarriageAscAndBirth, getMarriageAscAndChildBirth, getNameAsc, getNameAscAndBirth, getNameDesc } from './constants/index.js';
8
8
  export { IPersonalName, IPersonalNamePieces } from './structures/index.js';