@treeviz/gedcom-parser 1.0.11 → 1.0.12
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/dist/classes/index.d.ts +9 -0
- package/dist/classes/index.d.ts.map +1 -1
- package/dist/classes/index.js +2 -0
- package/dist/factories/index.d.ts +8 -0
- package/dist/factories/index.d.ts.map +1 -1
- package/dist/factories/index.js +3 -0
- package/dist/index.d.ts +18 -68
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +24 -33
- package/dist/interfaces/index.d.ts +1 -1
- package/dist/interfaces/index.d.ts.map +1 -1
- package/dist/kinship-translator/index.d.ts +1 -1
- package/dist/kinship-translator/index.d.ts.map +1 -1
- package/dist/kinship-translator/index.js +0 -1
- package/dist/structures/index.d.ts +2 -0
- package/dist/structures/index.d.ts.map +1 -1
- package/dist/types/index.d.ts +4 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +2 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +0 -1
- package/package.json +1 -1
- package/dist/init.d.ts +0 -91
- package/dist/init.d.ts.map +0 -1
- package/dist/init.js +0 -94
package/dist/classes/index.d.ts
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
export type { ProxyOriginal } from "./common";
|
|
2
|
+
export type { SourType } from "./sour";
|
|
3
|
+
export type { RepoType } from "./repo";
|
|
4
|
+
export type { SubmType } from "./subm";
|
|
5
|
+
export type { IndiType, TreeMember, GenealogyMember, IndiTree, IndiGenealogy, IndiMarker, MemberSide, MemberMain, GenerationSpouseType, GenerationIndiType, IndiGenealogyGenerations, IndiGenealogyResult, NonNullIndiGenealogyResult, PathItem, Path, ReducedPath, QueueItem, Queue, } from "./indi";
|
|
6
|
+
export type { FamType } from "./fam";
|
|
7
|
+
export type { GedComType } from "./gedcom";
|
|
8
|
+
export type { ObjeType } from "./obje";
|
|
9
|
+
export { Existed, CustomTags } from "./indi";
|
|
1
10
|
export * from "./common";
|
|
2
11
|
export * from "./date";
|
|
3
12
|
export * from "./fam";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/classes/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/classes/index.ts"],"names":[],"mappings":"AAGA,YAAY,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC9C,YAAY,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AACvC,YAAY,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AACvC,YAAY,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AACvC,YAAY,EACX,QAAQ,EACR,UAAU,EACV,eAAe,EACf,QAAQ,EACR,aAAa,EACb,UAAU,EACV,UAAU,EACV,UAAU,EACV,oBAAoB,EACpB,kBAAkB,EAClB,wBAAwB,EACxB,mBAAmB,EACnB,0BAA0B,EAC1B,QAAQ,EACR,IAAI,EACJ,WAAW,EACX,SAAS,EACT,KAAK,GACL,MAAM,QAAQ,CAAC;AAChB,YAAY,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACrC,YAAY,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,YAAY,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAG7C,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC"}
|
package/dist/classes/index.js
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
|
+
export type { CacheManagerFactory } from "./cache-factory";
|
|
2
|
+
export type { DateLocaleProvider } from "./date-locale-factory";
|
|
3
|
+
export type { I18nProvider } from "./i18n-factory";
|
|
4
|
+
export type { KinshipTranslatorConstructor } from "./kinship-factory";
|
|
5
|
+
export type { PlaceParserFunction } from "./place-parser-provider";
|
|
6
|
+
export type { PlaceTranslatorFunction } from "./place-translator-provider";
|
|
1
7
|
export * from "./cache-factory";
|
|
2
8
|
export * from "./date-locale-factory";
|
|
3
9
|
export * from "./i18n-factory";
|
|
4
10
|
export * from "./kinship-factory";
|
|
11
|
+
export * from "./place-parser-provider";
|
|
12
|
+
export * from "./place-translator-provider";
|
|
5
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/factories/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/factories/index.ts"],"names":[],"mappings":"AAGA,YAAY,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,YAAY,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAChE,YAAY,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,YAAY,EAAE,4BAA4B,EAAE,MAAM,mBAAmB,CAAC;AACtE,YAAY,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACnE,YAAY,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAG3E,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC"}
|
package/dist/factories/index.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
// Factories exports - barrel file for easier imports
|
|
2
|
+
// Export all factory functions
|
|
2
3
|
export * from "./cache-factory.js";
|
|
3
4
|
export * from "./date-locale-factory.js";
|
|
4
5
|
export * from "./i18n-factory.js";
|
|
5
6
|
export * from "./kinship-factory.js";
|
|
7
|
+
export * from "./place-parser-provider.js";
|
|
8
|
+
export * from "./place-translator-provider.js";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,78 +1,28 @@
|
|
|
1
1
|
export * from "./utils/parser";
|
|
2
2
|
export { default } from "./utils/parser";
|
|
3
3
|
export { default as GedcomTree } from "./utils/parser";
|
|
4
|
-
export
|
|
5
|
-
export { setKinshipTranslatorClass, getKinshipTranslatorClass, resetKinshipTranslatorClass, type KinshipTranslatorConstructor, } from "./factories/kinship-factory";
|
|
6
|
-
export { setDateLocaleProvider, getDateLocale, resetDateLocaleProvider, type DateLocaleProvider, } from "./factories/date-locale-factory";
|
|
7
|
-
export { setI18nProvider, getI18n, resetI18nProvider, type I18nProvider, } from "./factories/i18n-factory";
|
|
8
|
-
export { setPlaceParserProvider, getPlaceParserProvider, resetPlaceParserProvider, type PlaceParserFunction, } from "./factories/place-parser-provider";
|
|
9
|
-
export { setPlaceTranslatorProvider, getPlaceTranslatorProvider, resetPlaceTranslatorProvider, type PlaceTranslatorFunction, } from "./factories/place-translator-provider";
|
|
4
|
+
export * from "./factories";
|
|
10
5
|
export type { ICacheManager } from "./utils/cache";
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export * from "./
|
|
15
|
-
export * from "./
|
|
16
|
-
export * from "./
|
|
17
|
-
export
|
|
18
|
-
export
|
|
19
|
-
export * from "./classes/fams";
|
|
20
|
-
export * from "./classes/sour";
|
|
21
|
-
export * from "./classes/sours";
|
|
22
|
-
export * from "./classes/repo";
|
|
23
|
-
export * from "./classes/repos";
|
|
24
|
-
export * from "./classes/subm";
|
|
25
|
-
export * from "./classes/subms";
|
|
26
|
-
export * from "./classes/note";
|
|
27
|
-
export * from "./classes/name";
|
|
28
|
-
export * from "./classes/date";
|
|
29
|
-
export * from "./classes/indi";
|
|
30
|
-
export * from "./classes/obje";
|
|
31
|
-
export * from "./classes/objes";
|
|
32
|
-
export * from "./classes/list";
|
|
33
|
-
export type { default as GedComInterface } from "./interfaces/gedcom";
|
|
34
|
-
export type { default as FamInterface } from "./interfaces/fam";
|
|
35
|
-
export type { IFamilies as FamsInterface } from "./interfaces/fams";
|
|
36
|
-
export type { default as RepoInterface } from "./interfaces/repo";
|
|
37
|
-
export type { default as SubmInterface } from "./interfaces/subm";
|
|
38
|
-
export type { default as ObjeInterface } from "./interfaces/obje";
|
|
39
|
-
export type { IIndividuals as IndisInterface } from "./interfaces/indis";
|
|
40
|
-
export type { default as IndiInterface } from "./interfaces/indi";
|
|
41
|
-
export type { default as CommonInterface } from "./interfaces/common";
|
|
42
|
-
export type { IList as ListInterface } from "./interfaces/list";
|
|
43
|
-
export type { default as SourInterface } from "./interfaces/sour";
|
|
44
|
-
export type * from "./structures/gedcom";
|
|
45
|
-
export type * from "./structures/individual";
|
|
46
|
-
export type * from "./structures/family";
|
|
47
|
-
export type * from "./structures/source";
|
|
48
|
-
export type * from "./structures/repository";
|
|
49
|
-
export type * from "./structures/note";
|
|
50
|
-
export type * from "./structures/date";
|
|
51
|
-
export type { default as IDateStructure } from "./structures/date";
|
|
52
|
-
export type * from "./structures/place";
|
|
53
|
-
export type * from "./structures/address";
|
|
54
|
-
export type * from "./structures/personal-name";
|
|
55
|
-
export type * from "./structures/personal-name-pieces";
|
|
56
|
-
export type * from "./structures/source-citation";
|
|
57
|
-
export type * from "./structures/event-detail-structure";
|
|
58
|
-
export type { default as IEventDetailStructure } from "./structures/event-detail-structure";
|
|
59
|
-
export type * from "./structures/individual-event-structure";
|
|
60
|
-
export type * from "./structures/individual-event-detail-structure";
|
|
61
|
-
export type * from "./structures/association";
|
|
62
|
-
export type * from "./structures/change-date";
|
|
63
|
-
export type * from "./structures/creation-date";
|
|
64
|
-
export type * from "./structures/multimedia-link";
|
|
65
|
-
export type * from "./structures/non-event";
|
|
66
|
-
export type * from "./structures/marriage-date";
|
|
67
|
-
export type * from "./structures/lds-ordinance-detail";
|
|
68
|
-
export type * from "./structures/lds-spouse-sealing";
|
|
69
|
-
export type * from "./structures/source-repository-citation";
|
|
6
|
+
export * from "./kinship-translator";
|
|
7
|
+
export * from "./types";
|
|
8
|
+
export * from "./constants";
|
|
9
|
+
export * from "./classes";
|
|
10
|
+
export * from "./interfaces";
|
|
11
|
+
export * from "./structures";
|
|
12
|
+
export type { PrimitiveRange, Range as RangeType, SplitResult, } from "./utils/range";
|
|
13
|
+
export { fromTuple, inRange, isIntersectedRange, splitRange, parseRangeBounds, isRangeContained, extractSplitPoints, generateSplitRanges, splitOverlappingRanges, findMatchingRangeForSplitRange, extractSeparationYears, } from "./utils/range";
|
|
70
14
|
export * from "./utils/cache";
|
|
71
|
-
export
|
|
15
|
+
export * from "./utils/common-creator";
|
|
72
16
|
export * from "./utils/date-formatter";
|
|
17
|
+
export * from "./utils/get-all-prop";
|
|
18
|
+
export * from "./utils/get-family-with";
|
|
19
|
+
export * from "./utils/get-places";
|
|
20
|
+
export * from "./utils/get-product-details";
|
|
21
|
+
export { getRawSize } from "./utils/get-raw-size";
|
|
22
|
+
export * from "./utils/logger";
|
|
73
23
|
export * from "./utils/name-formatter";
|
|
24
|
+
export * from "./utils/nested-group";
|
|
25
|
+
export * from "./utils/ordinalize";
|
|
74
26
|
export * from "./utils/place-parser";
|
|
75
|
-
export * from "./utils/get-places";
|
|
76
27
|
export * from "./utils/place-translator";
|
|
77
|
-
export { inRange, isIntersectedRange, splitRange, fromTuple, parseRangeBounds, isRangeContained, extractSplitPoints, generateSplitRanges, splitOverlappingRanges, findMatchingRangeForSplitRange, extractSeparationYears, } from "./utils/range";
|
|
78
28
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAGvD,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAGvD,cAAc,aAAa,CAAC;AAG5B,YAAY,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAGnD,cAAc,sBAAsB,CAAC;AAGrC,cAAc,SAAS,CAAC;AAGxB,cAAc,aAAa,CAAC;AAG5B,cAAc,WAAW,CAAC;AAG1B,cAAc,cAAc,CAAC;AAG7B,cAAc,cAAc,CAAC;AAI7B,YAAY,EACX,cAAc,EACd,KAAK,IAAI,SAAS,EAClB,WAAW,GACX,MAAM,eAAe,CAAC;AAGvB,OAAO,EACN,SAAS,EACT,OAAO,EACP,kBAAkB,EAClB,UAAU,EACV,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACnB,sBAAsB,EACtB,8BAA8B,EAC9B,sBAAsB,GACtB,MAAM,eAAe,CAAC;AAGvB,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -3,42 +3,33 @@ export * from "./utils/parser.js";
|
|
|
3
3
|
export { default } from "./utils/parser.js";
|
|
4
4
|
export { default as GedcomTree } from "./utils/parser.js";
|
|
5
5
|
// Factories - Pluggable dependencies
|
|
6
|
-
export
|
|
7
|
-
export { setKinshipTranslatorClass, getKinshipTranslatorClass, resetKinshipTranslatorClass, } from "./factories/kinship-factory.js";
|
|
8
|
-
export { setDateLocaleProvider, getDateLocale, resetDateLocaleProvider, } from "./factories/date-locale-factory.js";
|
|
9
|
-
export { setI18nProvider, getI18n, resetI18nProvider, } from "./factories/i18n-factory.js";
|
|
10
|
-
export { setPlaceParserProvider, getPlaceParserProvider, resetPlaceParserProvider, } from "./factories/place-parser-provider.js";
|
|
11
|
-
export { setPlaceTranslatorProvider, getPlaceTranslatorProvider, resetPlaceTranslatorProvider, } from "./factories/place-translator-provider.js";
|
|
6
|
+
export * from "./factories/index.js";
|
|
12
7
|
// Kinship translator
|
|
13
|
-
export
|
|
14
|
-
// Settings
|
|
15
|
-
export * from "./types/
|
|
16
|
-
//
|
|
17
|
-
export * from "./
|
|
18
|
-
|
|
19
|
-
export * from "./classes/
|
|
20
|
-
|
|
21
|
-
export * from "./
|
|
22
|
-
|
|
23
|
-
export * from "./
|
|
24
|
-
|
|
25
|
-
export
|
|
26
|
-
|
|
27
|
-
export * from "./classes/subms.js";
|
|
28
|
-
export * from "./classes/note.js";
|
|
29
|
-
export * from "./classes/name.js";
|
|
30
|
-
export * from "./classes/date.js";
|
|
31
|
-
export * from "./classes/indi.js";
|
|
32
|
-
export * from "./classes/obje.js";
|
|
33
|
-
export * from "./classes/objes.js";
|
|
34
|
-
export * from "./classes/list.js";
|
|
35
|
-
// Utils - commonly used utilities
|
|
8
|
+
export * from "./kinship-translator/index.js";
|
|
9
|
+
// Settings and types - exports enum Range
|
|
10
|
+
export * from "./types/index.js";
|
|
11
|
+
// Constants - sorting, filtering, etc.
|
|
12
|
+
export * from "./constants/index.js";
|
|
13
|
+
// Classes - export everything
|
|
14
|
+
export * from "./classes/index.js";
|
|
15
|
+
// Class interfaces
|
|
16
|
+
export * from "./interfaces/index.js";
|
|
17
|
+
// Type structures
|
|
18
|
+
export * from "./structures/index.js";
|
|
19
|
+
// Export range functions explicitly to avoid type Range conflict
|
|
20
|
+
export { fromTuple, inRange, isIntersectedRange, splitRange, parseRangeBounds, isRangeContained, extractSplitPoints, generateSplitRanges, splitOverlappingRanges, findMatchingRangeForSplitRange, extractSeparationYears, } from "./utils/range.js";
|
|
21
|
+
// Export rest of utils (functions and other exports)
|
|
36
22
|
export * from "./utils/cache.js";
|
|
37
|
-
export
|
|
23
|
+
export * from "./utils/common-creator.js";
|
|
38
24
|
export * from "./utils/date-formatter.js";
|
|
25
|
+
export * from "./utils/get-all-prop.js";
|
|
26
|
+
export * from "./utils/get-family-with.js";
|
|
27
|
+
export * from "./utils/get-places.js";
|
|
28
|
+
export * from "./utils/get-product-details.js";
|
|
29
|
+
export { getRawSize } from "./utils/get-raw-size.js";
|
|
30
|
+
export * from "./utils/logger.js";
|
|
39
31
|
export * from "./utils/name-formatter.js";
|
|
32
|
+
export * from "./utils/nested-group.js";
|
|
33
|
+
export * from "./utils/ordinalize.js";
|
|
40
34
|
export * from "./utils/place-parser.js";
|
|
41
|
-
export * from "./utils/get-places.js";
|
|
42
35
|
export * from "./utils/place-translator.js";
|
|
43
|
-
// Range utilities are already exported from types/types
|
|
44
|
-
export { inRange, isIntersectedRange, splitRange, fromTuple, parseRangeBounds, isRangeContained, extractSplitPoints, generateSplitRanges, splitOverlappingRanges, findMatchingRangeForSplitRange, extractSeparationYears, } from "./utils/range.js";
|
|
@@ -2,7 +2,7 @@ export type { default as ICommon } from "./common";
|
|
|
2
2
|
export type { default as IFam } from "./fam";
|
|
3
3
|
export type { IFamilies } from "./fams";
|
|
4
4
|
export type { default as IGedCom } from "./gedcom";
|
|
5
|
-
export type { default as IIndi } from "./indi";
|
|
5
|
+
export type { default as IIndi, GeneratedIndiMethods } from "./indi";
|
|
6
6
|
export type { IIndividuals } from "./indis";
|
|
7
7
|
export type { IList } from "./list";
|
|
8
8
|
export type { default as IObje } from "./obje";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,UAAU,CAAC;AACnD,YAAY,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,OAAO,CAAC;AAC7C,YAAY,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACxC,YAAY,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,UAAU,CAAC;AACnD,YAAY,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,UAAU,CAAC;AACnD,YAAY,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,OAAO,CAAC;AAC7C,YAAY,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACxC,YAAY,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,UAAU,CAAC;AACnD,YAAY,EAAE,OAAO,IAAI,KAAK,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAC;AACrE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,YAAY,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AACpC,YAAY,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/C,YAAY,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/C,YAAY,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/C,YAAY,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,QAAQ,CAAC"}
|
|
@@ -6,6 +6,6 @@ export { default as KinshipTranslatorFR } from "./kinship-translator.fr";
|
|
|
6
6
|
export { default as KinshipTranslatorHU } from "./kinship-translator.hu";
|
|
7
7
|
export type { default as KinshipTranslatorInterface } from "./kinship-translator.interface";
|
|
8
8
|
export { default as KinshipTranslator } from "./kinship-translator";
|
|
9
|
-
export
|
|
9
|
+
export type { Language, Cases, CrossCase, CrossCases } from "./types";
|
|
10
10
|
export * as translators from "./translators";
|
|
11
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/kinship-translator/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACzE,YAAY,EAAE,OAAO,IAAI,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAC5F,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/kinship-translator/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACzE,YAAY,EAAE,OAAO,IAAI,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAC5F,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAGpE,YAAY,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAEtE,OAAO,KAAK,WAAW,MAAM,eAAe,CAAC"}
|
|
@@ -6,5 +6,4 @@ export { default as KinshipTranslatorES } from "./kinship-translator.es.js";
|
|
|
6
6
|
export { default as KinshipTranslatorFR } from "./kinship-translator.fr.js";
|
|
7
7
|
export { default as KinshipTranslatorHU } from "./kinship-translator.hu.js";
|
|
8
8
|
export { default as KinshipTranslator } from "./kinship-translator.js";
|
|
9
|
-
export * from "./types.js";
|
|
10
9
|
export * as translators from "./translators.js";
|
|
@@ -4,11 +4,13 @@ export type { default as IChangeDate } from "./change-date";
|
|
|
4
4
|
export type { default as ICreationDate } from "./creation-date";
|
|
5
5
|
export type { default as IDate } from "./date";
|
|
6
6
|
export type { default as IEventDetail } from "./event-detail-structure";
|
|
7
|
+
export type { default as IEventDetailStructure } from "./event-detail-structure";
|
|
7
8
|
export type { default as IFamily } from "./family";
|
|
8
9
|
export type { default as IGedcomStructure } from "./gedcom";
|
|
9
10
|
export type { default as IIndividualEventDetail } from "./individual-event-detail-structure";
|
|
10
11
|
export type { default as IIndividualEvent } from "./individual-event-structure";
|
|
11
12
|
export type { default as IIndividual } from "./individual";
|
|
13
|
+
export type { default as IIndividualStructure } from "./individual";
|
|
12
14
|
export type { default as ILdsOrdinanceDetail } from "./lds-ordinance-detail";
|
|
13
15
|
export type { default as ILdsSpouseSealing } from "./lds-spouse-sealing";
|
|
14
16
|
export type { default as IMarriageDate } from "./marriage-date";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/structures/index.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrD,YAAY,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7D,YAAY,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5D,YAAY,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChE,YAAY,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/C,YAAY,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxE,YAAY,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,UAAU,CAAC;AACnD,YAAY,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5D,YAAY,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAC7F,YAAY,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChF,YAAY,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3D,YAAY,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7E,YAAY,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzE,YAAY,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChE,YAAY,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpE,YAAY,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACxD,YAAY,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/C,YAAY,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7E,YAAY,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChE,YAAY,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,SAAS,CAAC;AACjD,YAAY,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3D,YAAY,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpE,YAAY,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AACzF,YAAY,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/structures/index.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrD,YAAY,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7D,YAAY,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5D,YAAY,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChE,YAAY,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/C,YAAY,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxE,YAAY,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjF,YAAY,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,UAAU,CAAC;AACnD,YAAY,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5D,YAAY,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAC7F,YAAY,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChF,YAAY,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3D,YAAY,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACpE,YAAY,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7E,YAAY,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzE,YAAY,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChE,YAAY,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpE,YAAY,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACxD,YAAY,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/C,YAAY,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7E,YAAY,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChE,YAAY,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,SAAS,CAAC;AACjD,YAAY,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3D,YAAY,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpE,YAAY,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AACzF,YAAY,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,UAAU,CAAC"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
export type { AncestryMedia } from "./ancestry-media";
|
|
2
|
+
export type { Settings } from "./settings";
|
|
3
|
+
export type { ConvertType, IndiKey, FamKey, ObjeKey, RepoKey, SourKey, SubmKey, TagKey, UnknownKey, IdType, NonStandard, Tag, ListTag, MultiTag, FilterIterator, Filter, RequiredFilter, OrderDefinition, Order, OrderIterator, GroupDefinition, Group, GroupMarker, GroupIterator, NestedGroup, NameOrder, PlaceOrder, LinkedPersons, } from "./types";
|
|
4
|
+
export { RelationType, PartnerType, Range } from "./types";
|
|
1
5
|
export * from "./ancestry-media";
|
|
2
6
|
export * from "./settings";
|
|
3
7
|
export * from "./types";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAGA,YAAY,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,YAAY,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,YAAY,EACX,WAAW,EACX,OAAO,EACP,MAAM,EACN,OAAO,EACP,OAAO,EACP,OAAO,EACP,OAAO,EACP,MAAM,EACN,UAAU,EACV,MAAM,EACN,WAAW,EACX,GAAG,EACH,OAAO,EACP,QAAQ,EACR,cAAc,EACd,MAAM,EACN,cAAc,EACd,eAAe,EACf,KAAK,EACL,aAAa,EACb,eAAe,EACf,KAAK,EACL,WAAW,EACX,aAAa,EACb,WAAW,EACX,SAAS,EACT,UAAU,EACV,aAAa,GACb,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAG3D,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC"}
|
package/dist/types/index.js
CHANGED
package/dist/utils/index.d.ts
CHANGED
|
@@ -13,5 +13,6 @@ export * from "./ordinalize";
|
|
|
13
13
|
export { default as GedcomTree } from "./parser";
|
|
14
14
|
export * from "./place-parser";
|
|
15
15
|
export * from "./place-translator";
|
|
16
|
+
export type { PrimitiveRange, Range, SplitResult } from "./range";
|
|
16
17
|
export * from "./range";
|
|
17
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AACA,cAAc,SAAS,CAAC;AACxB,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,UAAU,CAAC;AACjD,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AACA,cAAc,SAAS,CAAC;AACxB,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,UAAU,CAAC;AACjD,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AAInC,YAAY,EAAE,cAAc,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAClE,cAAc,SAAS,CAAC"}
|
package/dist/utils/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@treeviz/gedcom-parser",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.12",
|
|
4
4
|
"description": "Lightweight, pluggable GEDCOM parser for JavaScript/TypeScript with optional caching and place matching. Zero browser dependencies.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
package/dist/init.d.ts
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Initialize gedcom-parser with custom factories
|
|
3
|
-
* This provides a unified initialization function instead of calling multiple setters
|
|
4
|
-
*/
|
|
5
|
-
import { type CacheManagerFactory, type DateLocaleProvider, type I18nProvider, type KinshipTranslatorConstructor, type PlaceParserFunction, type PlaceTranslatorFunction } from "./index";
|
|
6
|
-
/**
|
|
7
|
-
* Factory configuration options for gedcom-parser initialization
|
|
8
|
-
*/
|
|
9
|
-
export interface GedcomParserFactories {
|
|
10
|
-
/**
|
|
11
|
-
* Date locale provider - returns date-fns Locale for formatting
|
|
12
|
-
* @example () => enUS
|
|
13
|
-
*/
|
|
14
|
-
dateLocaleProvider?: DateLocaleProvider;
|
|
15
|
-
/**
|
|
16
|
-
* i18n translation provider
|
|
17
|
-
* @example (key, options) => i18n.t(key, options)
|
|
18
|
-
*/
|
|
19
|
-
i18nProvider?: I18nProvider;
|
|
20
|
-
/**
|
|
21
|
-
* Cache manager factory for kinship/path caching
|
|
22
|
-
* @example (name, store, type, encrypted) => ({ getItem, setItem })
|
|
23
|
-
*/
|
|
24
|
-
cacheManagerFactory?: CacheManagerFactory;
|
|
25
|
-
/**
|
|
26
|
-
* Kinship translator class (optional override)
|
|
27
|
-
* Uses default KinshipTranslator if not provided
|
|
28
|
-
*/
|
|
29
|
-
kinshipTranslatorClass?: KinshipTranslatorConstructor;
|
|
30
|
-
/**
|
|
31
|
-
* Place parser provider - parses place strings into structured parts
|
|
32
|
-
* @example (place) => [{ parts, town, county, country }]
|
|
33
|
-
*/
|
|
34
|
-
placeParserProvider?: PlaceParserFunction;
|
|
35
|
-
/**
|
|
36
|
-
* Place translator provider - translates place strings with country/city recognition
|
|
37
|
-
* @example (place, level, toReversed) => "Budapest, Hungary"
|
|
38
|
-
*/
|
|
39
|
-
placeTranslatorProvider?: PlaceTranslatorFunction;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Initialize gedcom-parser with custom factory providers
|
|
43
|
-
*
|
|
44
|
-
* This is the recommended way to set up gedcom-parser with your application's
|
|
45
|
-
* dependencies. It replaces the need to call multiple individual setter functions.
|
|
46
|
-
*
|
|
47
|
-
* @param factories - Optional factory providers
|
|
48
|
-
*
|
|
49
|
-
* @example
|
|
50
|
-
* ```typescript
|
|
51
|
-
* import { initGedcomParser } from '@treeviz/gedcom-parser';
|
|
52
|
-
* import { enUS } from 'date-fns/locale';
|
|
53
|
-
* import i18n from './i18n';
|
|
54
|
-
*
|
|
55
|
-
* initGedcomParser({
|
|
56
|
-
* dateLocaleProvider: () => enUS,
|
|
57
|
-
* i18nProvider: (key, options) => i18n.t(key, options),
|
|
58
|
-
* cacheManagerFactory: (name, store, type, encrypted) => ({
|
|
59
|
-
* getItem: async () => localStorage.getItem(name),
|
|
60
|
-
* setItem: async (value) => localStorage.setItem(name, JSON.stringify(value))
|
|
61
|
-
* })
|
|
62
|
-
* });
|
|
63
|
-
* ```
|
|
64
|
-
*
|
|
65
|
-
* @example Minimal initialization (uses defaults)
|
|
66
|
-
* ```typescript
|
|
67
|
-
* initGedcomParser(); // Uses built-in defaults
|
|
68
|
-
* ```
|
|
69
|
-
*
|
|
70
|
-
* @example With custom place parser
|
|
71
|
-
* ```typescript
|
|
72
|
-
* initGedcomParser({
|
|
73
|
-
* placeParserProvider: (place) => {
|
|
74
|
-
* // Custom place parsing logic
|
|
75
|
-
* return [{ parts: place.split(','), town: '', county: '', country: '' }];
|
|
76
|
-
* }
|
|
77
|
-
* });
|
|
78
|
-
* ```
|
|
79
|
-
*/
|
|
80
|
-
export declare const initGedcomParser: (factories?: GedcomParserFactories) => void;
|
|
81
|
-
/**
|
|
82
|
-
* Check if gedcom-parser has been initialized with custom factories
|
|
83
|
-
* @returns true if any factory has been customized
|
|
84
|
-
*/
|
|
85
|
-
export declare const isGedcomParserInitialized: () => boolean;
|
|
86
|
-
/**
|
|
87
|
-
* Get current factory configuration
|
|
88
|
-
* Useful for debugging or verifying initialization
|
|
89
|
-
*/
|
|
90
|
-
export declare const getGedcomParserFactories: () => Partial<GedcomParserFactories>;
|
|
91
|
-
//# sourceMappingURL=init.d.ts.map
|
package/dist/init.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../src/init.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAON,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,YAAY,EACjB,KAAK,4BAA4B,EACjC,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,MAAM,SAAS,CAAC;AAEjB;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACrC;;;OAGG;IACH,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IAExC;;;OAGG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;IAE5B;;;OAGG;IACH,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAE1C;;;OAGG;IACH,sBAAsB,CAAC,EAAE,4BAA4B,CAAC;IAEtD;;;OAGG;IACH,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAE1C;;;OAGG;IACH,uBAAuB,CAAC,EAAE,uBAAuB,CAAC;CAClD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,eAAO,MAAM,gBAAgB,GAAI,YAAY,qBAAqB,KAAG,IAoCpE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,yBAAyB,QAAO,OAI5C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,wBAAwB,QAAO,OAAO,CAAC,qBAAqB,CAKxE,CAAC"}
|
package/dist/init.js
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Initialize gedcom-parser with custom factories
|
|
3
|
-
* This provides a unified initialization function instead of calling multiple setters
|
|
4
|
-
*/
|
|
5
|
-
import { setCacheManagerFactory, setDateLocaleProvider, setI18nProvider, setKinshipTranslatorClass, setPlaceParserProvider, setPlaceTranslatorProvider, } from "./index.js";
|
|
6
|
-
/**
|
|
7
|
-
* Initialize gedcom-parser with custom factory providers
|
|
8
|
-
*
|
|
9
|
-
* This is the recommended way to set up gedcom-parser with your application's
|
|
10
|
-
* dependencies. It replaces the need to call multiple individual setter functions.
|
|
11
|
-
*
|
|
12
|
-
* @param factories - Optional factory providers
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* ```typescript
|
|
16
|
-
* import { initGedcomParser } from '@treeviz/gedcom-parser';
|
|
17
|
-
* import { enUS } from 'date-fns/locale';
|
|
18
|
-
* import i18n from './i18n.js';
|
|
19
|
-
*
|
|
20
|
-
* initGedcomParser({
|
|
21
|
-
* dateLocaleProvider: () => enUS,
|
|
22
|
-
* i18nProvider: (key, options) => i18n.t(key, options),
|
|
23
|
-
* cacheManagerFactory: (name, store, type, encrypted) => ({
|
|
24
|
-
* getItem: async () => localStorage.getItem(name),
|
|
25
|
-
* setItem: async (value) => localStorage.setItem(name, JSON.stringify(value))
|
|
26
|
-
* })
|
|
27
|
-
* });
|
|
28
|
-
* ```
|
|
29
|
-
*
|
|
30
|
-
* @example Minimal initialization (uses defaults)
|
|
31
|
-
* ```typescript
|
|
32
|
-
* initGedcomParser(); // Uses built-in defaults
|
|
33
|
-
* ```
|
|
34
|
-
*
|
|
35
|
-
* @example With custom place parser
|
|
36
|
-
* ```typescript
|
|
37
|
-
* initGedcomParser({
|
|
38
|
-
* placeParserProvider: (place) => {
|
|
39
|
-
* // Custom place parsing logic
|
|
40
|
-
* return [{ parts: place.split(','), town: '', county: '', country: '' }];
|
|
41
|
-
* }
|
|
42
|
-
* });
|
|
43
|
-
* ```
|
|
44
|
-
*/
|
|
45
|
-
export const initGedcomParser = (factories) => {
|
|
46
|
-
if (!factories) {
|
|
47
|
-
// No factories provided - use built-in defaults
|
|
48
|
-
// The parser will work with default implementations
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
// Set date locale provider if provided
|
|
52
|
-
if (factories.dateLocaleProvider) {
|
|
53
|
-
setDateLocaleProvider(factories.dateLocaleProvider);
|
|
54
|
-
}
|
|
55
|
-
// Set i18n provider if provided
|
|
56
|
-
if (factories.i18nProvider) {
|
|
57
|
-
setI18nProvider(factories.i18nProvider);
|
|
58
|
-
}
|
|
59
|
-
// Set cache manager factory if provided
|
|
60
|
-
if (factories.cacheManagerFactory) {
|
|
61
|
-
setCacheManagerFactory(factories.cacheManagerFactory);
|
|
62
|
-
}
|
|
63
|
-
// Set kinship translator class if provided
|
|
64
|
-
if (factories.kinshipTranslatorClass) {
|
|
65
|
-
setKinshipTranslatorClass(factories.kinshipTranslatorClass);
|
|
66
|
-
}
|
|
67
|
-
// Set place parser provider if provided
|
|
68
|
-
if (factories.placeParserProvider) {
|
|
69
|
-
setPlaceParserProvider(factories.placeParserProvider);
|
|
70
|
-
}
|
|
71
|
-
// Set place translator provider if provided
|
|
72
|
-
if (factories.placeTranslatorProvider) {
|
|
73
|
-
setPlaceTranslatorProvider(factories.placeTranslatorProvider);
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
/**
|
|
77
|
-
* Check if gedcom-parser has been initialized with custom factories
|
|
78
|
-
* @returns true if any factory has been customized
|
|
79
|
-
*/
|
|
80
|
-
export const isGedcomParserInitialized = () => {
|
|
81
|
-
// Check if any factory has been set (non-default)
|
|
82
|
-
// This is a simple check - in practice, the factories might have defaults
|
|
83
|
-
return true; // Always returns true as defaults are acceptable
|
|
84
|
-
};
|
|
85
|
-
/**
|
|
86
|
-
* Get current factory configuration
|
|
87
|
-
* Useful for debugging or verifying initialization
|
|
88
|
-
*/
|
|
89
|
-
export const getGedcomParserFactories = () => {
|
|
90
|
-
return {
|
|
91
|
-
// Return the current factories (if we want to expose them)
|
|
92
|
-
// For now, this is a placeholder as factories are internal
|
|
93
|
-
};
|
|
94
|
-
};
|