@mailwoman/codex 4.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.
Files changed (113) hide show
  1. package/out/ca/index.d.ts +12 -0
  2. package/out/ca/index.d.ts.map +1 -0
  3. package/out/ca/index.js +12 -0
  4. package/out/ca/index.js.map +1 -0
  5. package/out/ca/postal-code.d.ts +74 -0
  6. package/out/ca/postal-code.d.ts.map +1 -0
  7. package/out/ca/postal-code.js +100 -0
  8. package/out/ca/postal-code.js.map +1 -0
  9. package/out/ca/province.d.ts +114 -0
  10. package/out/ca/province.d.ts.map +1 -0
  11. package/out/ca/province.js +79 -0
  12. package/out/ca/province.js.map +1 -0
  13. package/out/ca/street-type.d.ts +57 -0
  14. package/out/ca/street-type.d.ts.map +1 -0
  15. package/out/ca/street-type.js +156 -0
  16. package/out/ca/street-type.js.map +1 -0
  17. package/out/de/bundesland.d.ts +124 -0
  18. package/out/de/bundesland.d.ts.map +1 -0
  19. package/out/de/bundesland.js +81 -0
  20. package/out/de/bundesland.js.map +1 -0
  21. package/out/de/index.d.ts +12 -0
  22. package/out/de/index.d.ts.map +1 -0
  23. package/out/de/index.js +12 -0
  24. package/out/de/index.js.map +1 -0
  25. package/out/de/postleitzahl.d.ts +108 -0
  26. package/out/de/postleitzahl.d.ts.map +1 -0
  27. package/out/de/postleitzahl.js +63 -0
  28. package/out/de/postleitzahl.js.map +1 -0
  29. package/out/de/street-type.d.ts +58 -0
  30. package/out/de/street-type.d.ts.map +1 -0
  31. package/out/de/street-type.js +79 -0
  32. package/out/de/street-type.js.map +1 -0
  33. package/out/fr/code-postal.d.ts +68 -0
  34. package/out/fr/code-postal.d.ts.map +1 -0
  35. package/out/fr/code-postal.js +84 -0
  36. package/out/fr/code-postal.js.map +1 -0
  37. package/out/fr/departement.d.ts +538 -0
  38. package/out/fr/departement.d.ts.map +1 -0
  39. package/out/fr/departement.js +127 -0
  40. package/out/fr/departement.js.map +1 -0
  41. package/out/fr/index.d.ts +13 -0
  42. package/out/fr/index.d.ts.map +1 -0
  43. package/out/fr/index.js +13 -0
  44. package/out/fr/index.js.map +1 -0
  45. package/out/fr/region.d.ts +113 -0
  46. package/out/fr/region.d.ts.map +1 -0
  47. package/out/fr/region.js +76 -0
  48. package/out/fr/region.js.map +1 -0
  49. package/out/fr/voie.d.ts +64 -0
  50. package/out/fr/voie.d.ts.map +1 -0
  51. package/out/fr/voie.js +88 -0
  52. package/out/fr/voie.js.map +1 -0
  53. package/out/gb/country.d.ts +51 -0
  54. package/out/gb/country.d.ts.map +1 -0
  55. package/out/gb/country.js +56 -0
  56. package/out/gb/country.js.map +1 -0
  57. package/out/gb/index.d.ts +14 -0
  58. package/out/gb/index.d.ts.map +1 -0
  59. package/out/gb/index.js +14 -0
  60. package/out/gb/index.js.map +1 -0
  61. package/out/gb/postcode-area.d.ts +46 -0
  62. package/out/gb/postcode-area.d.ts.map +1 -0
  63. package/out/gb/postcode-area.js +101 -0
  64. package/out/gb/postcode-area.js.map +1 -0
  65. package/out/gb/postcode.d.ts +73 -0
  66. package/out/gb/postcode.d.ts.map +1 -0
  67. package/out/gb/postcode.js +88 -0
  68. package/out/gb/postcode.js.map +1 -0
  69. package/out/gb/street-type.d.ts +36 -0
  70. package/out/gb/street-type.d.ts.map +1 -0
  71. package/out/gb/street-type.js +86 -0
  72. package/out/gb/street-type.js.map +1 -0
  73. package/out/index.d.ts +27 -0
  74. package/out/index.d.ts.map +1 -0
  75. package/out/index.js +27 -0
  76. package/out/index.js.map +1 -0
  77. package/out/jp/address-unit.d.ts +72 -0
  78. package/out/jp/address-unit.d.ts.map +1 -0
  79. package/out/jp/address-unit.js +78 -0
  80. package/out/jp/address-unit.js.map +1 -0
  81. package/out/jp/index.d.ts +13 -0
  82. package/out/jp/index.d.ts.map +1 -0
  83. package/out/jp/index.js +13 -0
  84. package/out/jp/index.js.map +1 -0
  85. package/out/jp/postal-code.d.ts +63 -0
  86. package/out/jp/postal-code.d.ts.map +1 -0
  87. package/out/jp/postal-code.js +77 -0
  88. package/out/jp/postal-code.js.map +1 -0
  89. package/out/jp/prefecture.d.ts +347 -0
  90. package/out/jp/prefecture.d.ts.map +1 -0
  91. package/out/jp/prefecture.js +147 -0
  92. package/out/jp/prefecture.js.map +1 -0
  93. package/out/postcode-systems.d.ts +31 -0
  94. package/out/postcode-systems.d.ts.map +1 -0
  95. package/out/postcode-systems.js +58 -0
  96. package/out/postcode-systems.js.map +1 -0
  97. package/out/us/index.d.ts +12 -0
  98. package/out/us/index.d.ts.map +1 -0
  99. package/out/us/index.js +12 -0
  100. package/out/us/index.js.map +1 -0
  101. package/out/us/state.d.ts +26 -0
  102. package/out/us/state.d.ts.map +1 -0
  103. package/out/us/state.js +84 -0
  104. package/out/us/state.js.map +1 -0
  105. package/out/us/street-suffix.d.ts +499 -0
  106. package/out/us/street-suffix.d.ts.map +1 -0
  107. package/out/us/street-suffix.js +313 -0
  108. package/out/us/street-suffix.js.map +1 -0
  109. package/out/us/zipcode.d.ts +184 -0
  110. package/out/us/zipcode.d.ts.map +1 -0
  111. package/out/us/zipcode.js +127 -0
  112. package/out/us/zipcode.js.map +1 -0
  113. package/package.json +34 -0
@@ -0,0 +1,127 @@
1
+ /**
2
+ * @copyright Sister Software
3
+ * @license AGPL-3.0
4
+ * @author Teffen Ellis, et al.
5
+ *
6
+ * The 101 French départements (96 metropolitan including Corsica's 2A/2B, plus the 5 overseas DOM),
7
+ * each mapped to its région.
8
+ *
9
+ * The département is the load-bearing admin unit for French postal geography: a code postal's first
10
+ * two digits ARE the département number (see `code-postal.ts`), and the région is derived from
11
+ * the département. This table is therefore the hinge between `code-postal.ts` and `region.ts`.
12
+ */
13
+ /** Département code → info. 96 metropolitan (incl. 2A/2B) + 5 overseas = 101. */
14
+ export const FR_DEPARTEMENTS = {
15
+ "01": { code: "01", name: "Ain", region: "ARA" },
16
+ "02": { code: "02", name: "Aisne", region: "HDF" },
17
+ "03": { code: "03", name: "Allier", region: "ARA" },
18
+ "04": { code: "04", name: "Alpes-de-Haute-Provence", region: "PAC" },
19
+ "05": { code: "05", name: "Hautes-Alpes", region: "PAC" },
20
+ "06": { code: "06", name: "Alpes-Maritimes", region: "PAC" },
21
+ "07": { code: "07", name: "Ardèche", region: "ARA" },
22
+ "08": { code: "08", name: "Ardennes", region: "GES" },
23
+ "09": { code: "09", name: "Ariège", region: "OCC" },
24
+ "10": { code: "10", name: "Aube", region: "GES" },
25
+ "11": { code: "11", name: "Aude", region: "OCC" },
26
+ "12": { code: "12", name: "Aveyron", region: "OCC" },
27
+ "13": { code: "13", name: "Bouches-du-Rhône", region: "PAC" },
28
+ "14": { code: "14", name: "Calvados", region: "NOR" },
29
+ "15": { code: "15", name: "Cantal", region: "ARA" },
30
+ "16": { code: "16", name: "Charente", region: "NAQ" },
31
+ "17": { code: "17", name: "Charente-Maritime", region: "NAQ" },
32
+ "18": { code: "18", name: "Cher", region: "CVL" },
33
+ "19": { code: "19", name: "Corrèze", region: "NAQ" },
34
+ "2A": { code: "2A", name: "Corse-du-Sud", region: "COR" },
35
+ "2B": { code: "2B", name: "Haute-Corse", region: "COR" },
36
+ "21": { code: "21", name: "Côte-d'Or", region: "BFC" },
37
+ "22": { code: "22", name: "Côtes-d'Armor", region: "BRE" },
38
+ "23": { code: "23", name: "Creuse", region: "NAQ" },
39
+ "24": { code: "24", name: "Dordogne", region: "NAQ" },
40
+ "25": { code: "25", name: "Doubs", region: "BFC" },
41
+ "26": { code: "26", name: "Drôme", region: "ARA" },
42
+ "27": { code: "27", name: "Eure", region: "NOR" },
43
+ "28": { code: "28", name: "Eure-et-Loir", region: "CVL" },
44
+ "29": { code: "29", name: "Finistère", region: "BRE" },
45
+ "30": { code: "30", name: "Gard", region: "OCC" },
46
+ "31": { code: "31", name: "Haute-Garonne", region: "OCC" },
47
+ "32": { code: "32", name: "Gers", region: "OCC" },
48
+ "33": { code: "33", name: "Gironde", region: "NAQ" },
49
+ "34": { code: "34", name: "Hérault", region: "OCC" },
50
+ "35": { code: "35", name: "Ille-et-Vilaine", region: "BRE" },
51
+ "36": { code: "36", name: "Indre", region: "CVL" },
52
+ "37": { code: "37", name: "Indre-et-Loire", region: "CVL" },
53
+ "38": { code: "38", name: "Isère", region: "ARA" },
54
+ "39": { code: "39", name: "Jura", region: "BFC" },
55
+ "40": { code: "40", name: "Landes", region: "NAQ" },
56
+ "41": { code: "41", name: "Loir-et-Cher", region: "CVL" },
57
+ "42": { code: "42", name: "Loire", region: "ARA" },
58
+ "43": { code: "43", name: "Haute-Loire", region: "ARA" },
59
+ "44": { code: "44", name: "Loire-Atlantique", region: "PDL" },
60
+ "45": { code: "45", name: "Loiret", region: "CVL" },
61
+ "46": { code: "46", name: "Lot", region: "OCC" },
62
+ "47": { code: "47", name: "Lot-et-Garonne", region: "NAQ" },
63
+ "48": { code: "48", name: "Lozère", region: "OCC" },
64
+ "49": { code: "49", name: "Maine-et-Loire", region: "PDL" },
65
+ "50": { code: "50", name: "Manche", region: "NOR" },
66
+ "51": { code: "51", name: "Marne", region: "GES" },
67
+ "52": { code: "52", name: "Haute-Marne", region: "GES" },
68
+ "53": { code: "53", name: "Mayenne", region: "PDL" },
69
+ "54": { code: "54", name: "Meurthe-et-Moselle", region: "GES" },
70
+ "55": { code: "55", name: "Meuse", region: "GES" },
71
+ "56": { code: "56", name: "Morbihan", region: "BRE" },
72
+ "57": { code: "57", name: "Moselle", region: "GES" },
73
+ "58": { code: "58", name: "Nièvre", region: "BFC" },
74
+ "59": { code: "59", name: "Nord", region: "HDF" },
75
+ "60": { code: "60", name: "Oise", region: "HDF" },
76
+ "61": { code: "61", name: "Orne", region: "NOR" },
77
+ "62": { code: "62", name: "Pas-de-Calais", region: "HDF" },
78
+ "63": { code: "63", name: "Puy-de-Dôme", region: "ARA" },
79
+ "64": { code: "64", name: "Pyrénées-Atlantiques", region: "NAQ" },
80
+ "65": { code: "65", name: "Hautes-Pyrénées", region: "OCC" },
81
+ "66": { code: "66", name: "Pyrénées-Orientales", region: "OCC" },
82
+ "67": { code: "67", name: "Bas-Rhin", region: "GES" },
83
+ "68": { code: "68", name: "Haut-Rhin", region: "GES" },
84
+ "69": { code: "69", name: "Rhône", region: "ARA" },
85
+ "70": { code: "70", name: "Haute-Saône", region: "BFC" },
86
+ "71": { code: "71", name: "Saône-et-Loire", region: "BFC" },
87
+ "72": { code: "72", name: "Sarthe", region: "PDL" },
88
+ "73": { code: "73", name: "Savoie", region: "ARA" },
89
+ "74": { code: "74", name: "Haute-Savoie", region: "ARA" },
90
+ "75": { code: "75", name: "Paris", region: "IDF" },
91
+ "76": { code: "76", name: "Seine-Maritime", region: "NOR" },
92
+ "77": { code: "77", name: "Seine-et-Marne", region: "IDF" },
93
+ "78": { code: "78", name: "Yvelines", region: "IDF" },
94
+ "79": { code: "79", name: "Deux-Sèvres", region: "NAQ" },
95
+ "80": { code: "80", name: "Somme", region: "HDF" },
96
+ "81": { code: "81", name: "Tarn", region: "OCC" },
97
+ "82": { code: "82", name: "Tarn-et-Garonne", region: "OCC" },
98
+ "83": { code: "83", name: "Var", region: "PAC" },
99
+ "84": { code: "84", name: "Vaucluse", region: "PAC" },
100
+ "85": { code: "85", name: "Vendée", region: "PDL" },
101
+ "86": { code: "86", name: "Vienne", region: "NAQ" },
102
+ "87": { code: "87", name: "Haute-Vienne", region: "NAQ" },
103
+ "88": { code: "88", name: "Vosges", region: "GES" },
104
+ "89": { code: "89", name: "Yonne", region: "BFC" },
105
+ "90": { code: "90", name: "Territoire de Belfort", region: "BFC" },
106
+ "91": { code: "91", name: "Essonne", region: "IDF" },
107
+ "92": { code: "92", name: "Hauts-de-Seine", region: "IDF" },
108
+ "93": { code: "93", name: "Seine-Saint-Denis", region: "IDF" },
109
+ "94": { code: "94", name: "Val-de-Marne", region: "IDF" },
110
+ "95": { code: "95", name: "Val-d'Oise", region: "IDF" },
111
+ "971": { code: "971", name: "Guadeloupe", region: "GUA" },
112
+ "972": { code: "972", name: "Martinique", region: "MTQ" },
113
+ "973": { code: "973", name: "Guyane", region: "GUF" },
114
+ "974": { code: "974", name: "La Réunion", region: "LRE" },
115
+ "976": { code: "976", name: "Mayotte", region: "MAY" },
116
+ };
117
+ /**
118
+ * Look up a département by code (case-insensitive for the Corsica `2A`/`2B` letters); null if
119
+ * unknown.
120
+ */
121
+ export function departementInfo(code) {
122
+ if (!code || typeof code !== "string")
123
+ return null;
124
+ const key = code.trim().toUpperCase();
125
+ return FR_DEPARTEMENTS[key] ?? null;
126
+ }
127
+ //# sourceMappingURL=departement.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"departement.js","sourceRoot":"","sources":["../../fr/departement.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAcH,iFAAiF;AACjF,MAAM,CAAC,MAAM,eAAe,GAAG;IAC9B,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE;IAChD,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE;IAClD,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE;IACnD,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,yBAAyB,EAAE,MAAM,EAAE,KAAK,EAAE;IACpE,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,EAAE,KAAK,EAAE;IACzD,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,iBAAiB,EAAE,MAAM,EAAE,KAAK,EAAE;IAC5D,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE;IACpD,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM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EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE;IACzD,KAAK,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE;IACzD,KAAK,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE;IACrD,KAAK,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE;IACzD,KAAK,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE;CACH,CAAA;AAKpD;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,IAA+B;IAC9D,IAAI,CAAC,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAA;IAClD,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAA;IACrC,OAAQ,eAAmD,CAAC,GAAG,CAAC,IAAI,IAAI,CAAA;AACzE,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @copyright Sister Software
3
+ * @license AGPL-3.0
4
+ * @author Teffen Ellis, et al.
5
+ *
6
+ * The French address system (La Poste / ISO 3166-2:FR): street types (voie), postal codes (code
7
+ * postal), and the admin hierarchy of départements and régions.
8
+ */
9
+ export * from "./code-postal.js";
10
+ export * from "./departement.js";
11
+ export * from "./region.js";
12
+ export * from "./voie.js";
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../fr/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,cAAc,kBAAkB,CAAA;AAChC,cAAc,kBAAkB,CAAA;AAChC,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @copyright Sister Software
3
+ * @license AGPL-3.0
4
+ * @author Teffen Ellis, et al.
5
+ *
6
+ * The French address system (La Poste / ISO 3166-2:FR): street types (voie), postal codes (code
7
+ * postal), and the admin hierarchy of départements and régions.
8
+ */
9
+ export * from "./code-postal.js";
10
+ export * from "./departement.js";
11
+ export * from "./region.js";
12
+ export * from "./voie.js";
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../fr/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,cAAc,kBAAkB,CAAA;AAChC,cAAc,kBAAkB,CAAA;AAChC,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA"}
@@ -0,0 +1,113 @@
1
+ /**
2
+ * @copyright Sister Software
3
+ * @license AGPL-3.0
4
+ * @author Teffen Ellis, et al.
5
+ *
6
+ * The 18 French régions (13 metropolitan + 5 overseas), keyed by their ISO 3166-2:FR code.
7
+ *
8
+ * The contrast with `de/bundesland.ts` and `us/state.ts`: France's regions were redrawn in the 2016
9
+ * reform that merged 22 metropolitan régions into 13 (Aquitaine + Limousin + Poitou-Charentes →
10
+ * Nouvelle-Aquitaine, etc.). So a French region is a large, recent amalgamation, and — like a
11
+ * German Bundesland — it is almost never written on an address line, which reads `code-postal
12
+ * commune`. The region is inferred from the département, which is inferred from the postcode (see
13
+ * `code-postal.ts`).
14
+ */
15
+ /** Per-region record: ISO 3166-2:FR code (sans `FR-` prefix) + French name. */
16
+ export interface FrenchRegionInfo {
17
+ /** ISO 3166-2:FR region code without the `FR-` prefix (e.g. `IDF` for `FR-IDF`). */
18
+ code: string;
19
+ /** French name (e.g. `Île-de-France`). */
20
+ name: string;
21
+ }
22
+ /** ISO 3166-2:FR region code → info, for all 18 régions (13 metropolitan + 5 overseas). */
23
+ export declare const FR_REGIONS: {
24
+ readonly ARA: {
25
+ readonly code: "ARA";
26
+ readonly name: "Auvergne-Rhône-Alpes";
27
+ };
28
+ readonly BFC: {
29
+ readonly code: "BFC";
30
+ readonly name: "Bourgogne-Franche-Comté";
31
+ };
32
+ readonly BRE: {
33
+ readonly code: "BRE";
34
+ readonly name: "Bretagne";
35
+ };
36
+ readonly CVL: {
37
+ readonly code: "CVL";
38
+ readonly name: "Centre-Val de Loire";
39
+ };
40
+ readonly COR: {
41
+ readonly code: "COR";
42
+ readonly name: "Corse";
43
+ };
44
+ readonly GES: {
45
+ readonly code: "GES";
46
+ readonly name: "Grand Est";
47
+ };
48
+ readonly HDF: {
49
+ readonly code: "HDF";
50
+ readonly name: "Hauts-de-France";
51
+ };
52
+ readonly IDF: {
53
+ readonly code: "IDF";
54
+ readonly name: "Île-de-France";
55
+ };
56
+ readonly NOR: {
57
+ readonly code: "NOR";
58
+ readonly name: "Normandie";
59
+ };
60
+ readonly NAQ: {
61
+ readonly code: "NAQ";
62
+ readonly name: "Nouvelle-Aquitaine";
63
+ };
64
+ readonly OCC: {
65
+ readonly code: "OCC";
66
+ readonly name: "Occitanie";
67
+ };
68
+ readonly PDL: {
69
+ readonly code: "PDL";
70
+ readonly name: "Pays de la Loire";
71
+ };
72
+ readonly PAC: {
73
+ readonly code: "PAC";
74
+ readonly name: "Provence-Alpes-Côte d'Azur";
75
+ };
76
+ readonly GUA: {
77
+ readonly code: "GUA";
78
+ readonly name: "Guadeloupe";
79
+ };
80
+ readonly MTQ: {
81
+ readonly code: "MTQ";
82
+ readonly name: "Martinique";
83
+ };
84
+ readonly GUF: {
85
+ readonly code: "GUF";
86
+ readonly name: "Guyane";
87
+ };
88
+ readonly LRE: {
89
+ readonly code: "LRE";
90
+ readonly name: "La Réunion";
91
+ };
92
+ readonly MAY: {
93
+ readonly code: "MAY";
94
+ readonly name: "Mayotte";
95
+ };
96
+ };
97
+ /** An ISO 3166-2:FR region code (`ARA`, `IDF`, `PAC`, …). */
98
+ export type FrenchRegionCode = keyof typeof FR_REGIONS;
99
+ /** Type-predicate for an ISO 3166-2:FR region code. Case-insensitive. */
100
+ export declare function isFrenchRegionCode(input: unknown): input is FrenchRegionCode;
101
+ /**
102
+ * Folded region name / code → ISO 3166-2:FR code. Built diacritic-insensitive so the resolver's
103
+ * surface form (`Île-de-France`, or an unaccented `Ile-de-France`) maps regardless of accents.
104
+ * Mirrors `de/bundesland.ts`'s `lookupGermanState`, the same role: fold a region surface form to
105
+ * one code so a resolver eval can compare like-for-like without a US-USPS-shaped matcher.
106
+ */
107
+ export declare const FR_REGION_NAME_TO_CODE: ReadonlyMap<string, FrenchRegionCode>;
108
+ /**
109
+ * Resolve a French region surface form (ISO code or name, accents optional) to its ISO code; null
110
+ * if unknown.
111
+ */
112
+ export declare function lookupFrenchRegion(input: string | null | undefined): FrenchRegionCode | null;
113
+ //# sourceMappingURL=region.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"region.d.ts","sourceRoot":"","sources":["../../fr/region.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,+EAA+E;AAC/E,MAAM,WAAW,gBAAgB;IAChC,oFAAoF;IACpF,IAAI,EAAE,MAAM,CAAA;IACZ,0CAA0C;IAC1C,IAAI,EAAE,MAAM,CAAA;CACZ;AAED,2FAA2F;AAC3F,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmB8B,CAAA;AAErD,6DAA6D;AAC7D,MAAM,MAAM,gBAAgB,GAAG,MAAM,OAAO,UAAU,CAAA;AAItD,yEAAyE;AACzE,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,gBAAgB,CAE5E;AAYD;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,EAAE,WAAW,CAAC,MAAM,EAAE,gBAAgB,CAOrE,CAAA;AAEJ;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,gBAAgB,GAAG,IAAI,CAK5F"}
@@ -0,0 +1,76 @@
1
+ /**
2
+ * @copyright Sister Software
3
+ * @license AGPL-3.0
4
+ * @author Teffen Ellis, et al.
5
+ *
6
+ * The 18 French régions (13 metropolitan + 5 overseas), keyed by their ISO 3166-2:FR code.
7
+ *
8
+ * The contrast with `de/bundesland.ts` and `us/state.ts`: France's regions were redrawn in the 2016
9
+ * reform that merged 22 metropolitan régions into 13 (Aquitaine + Limousin + Poitou-Charentes →
10
+ * Nouvelle-Aquitaine, etc.). So a French region is a large, recent amalgamation, and — like a
11
+ * German Bundesland — it is almost never written on an address line, which reads `code-postal
12
+ * commune`. The region is inferred from the département, which is inferred from the postcode (see
13
+ * `code-postal.ts`).
14
+ */
15
+ /** ISO 3166-2:FR region code → info, for all 18 régions (13 metropolitan + 5 overseas). */
16
+ export const FR_REGIONS = {
17
+ ARA: { code: "ARA", name: "Auvergne-Rhône-Alpes" },
18
+ BFC: { code: "BFC", name: "Bourgogne-Franche-Comté" },
19
+ BRE: { code: "BRE", name: "Bretagne" },
20
+ CVL: { code: "CVL", name: "Centre-Val de Loire" },
21
+ COR: { code: "COR", name: "Corse" },
22
+ GES: { code: "GES", name: "Grand Est" },
23
+ HDF: { code: "HDF", name: "Hauts-de-France" },
24
+ IDF: { code: "IDF", name: "Île-de-France" },
25
+ NOR: { code: "NOR", name: "Normandie" },
26
+ NAQ: { code: "NAQ", name: "Nouvelle-Aquitaine" },
27
+ OCC: { code: "OCC", name: "Occitanie" },
28
+ PDL: { code: "PDL", name: "Pays de la Loire" },
29
+ PAC: { code: "PAC", name: "Provence-Alpes-Côte d'Azur" },
30
+ GUA: { code: "GUA", name: "Guadeloupe" },
31
+ MTQ: { code: "MTQ", name: "Martinique" },
32
+ GUF: { code: "GUF", name: "Guyane" },
33
+ LRE: { code: "LRE", name: "La Réunion" },
34
+ MAY: { code: "MAY", name: "Mayotte" },
35
+ };
36
+ const REGION_CODE_SET = new Set(Object.keys(FR_REGIONS));
37
+ /** Type-predicate for an ISO 3166-2:FR region code. Case-insensitive. */
38
+ export function isFrenchRegionCode(input) {
39
+ return typeof input === "string" && REGION_CODE_SET.has(input.toUpperCase());
40
+ }
41
+ /** Strip diacritics + lowercase so `Île-de-France`, `ile-de-france`, `Ile de France` all key alike. */
42
+ function foldName(s) {
43
+ return s
44
+ .toLowerCase()
45
+ .normalize("NFD")
46
+ .replace(/[\u0300-\u036f]/g, "")
47
+ .replace(/[^a-z0-9]+/g, " ")
48
+ .trim();
49
+ }
50
+ /**
51
+ * Folded region name / code → ISO 3166-2:FR code. Built diacritic-insensitive so the resolver's
52
+ * surface form (`Île-de-France`, or an unaccented `Ile-de-France`) maps regardless of accents.
53
+ * Mirrors `de/bundesland.ts`'s `lookupGermanState`, the same role: fold a region surface form to
54
+ * one code so a resolver eval can compare like-for-like without a US-USPS-shaped matcher.
55
+ */
56
+ export const FR_REGION_NAME_TO_CODE = (() => {
57
+ const out = new Map();
58
+ for (const code of Object.keys(FR_REGIONS)) {
59
+ out.set(foldName(FR_REGIONS[code].name), code);
60
+ out.set(code.toLowerCase(), code);
61
+ }
62
+ return out;
63
+ })();
64
+ /**
65
+ * Resolve a French region surface form (ISO code or name, accents optional) to its ISO code; null
66
+ * if unknown.
67
+ */
68
+ export function lookupFrenchRegion(input) {
69
+ if (!input || typeof input !== "string")
70
+ return null;
71
+ const upper = input.trim().toUpperCase();
72
+ if (REGION_CODE_SET.has(upper))
73
+ return upper;
74
+ return FR_REGION_NAME_TO_CODE.get(foldName(input)) ?? null;
75
+ }
76
+ //# sourceMappingURL=region.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"region.js","sourceRoot":"","sources":["../../fr/region.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAUH,2FAA2F;AAC3F,MAAM,CAAC,MAAM,UAAU,GAAG;IACzB,GAAG,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,sBAAsB,EAAE;IAClD,GAAG,EAAE,EAAE,IA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ChE,OAAO,sBAAsB,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,IAAI,IAAI,CAAA;AAC3D,CAAC"}
@@ -0,0 +1,64 @@
1
+ /**
2
+ * @copyright Sister Software
3
+ * @license AGPL-3.0
4
+ * @author Teffen Ellis, et al.
5
+ *
6
+ * French street types (types de voie).
7
+ *
8
+ * The third point on the morphology spectrum the codex now spans:
9
+ *
10
+ * - US — the type is a TRAILING word with a standardized abbreviation (`Main Street` → `ST`).
11
+ * - German — the type is a fused TRAILING suffix (`Hauptstraße`).
12
+ * - French — the type is a LEADING standalone word (`Rue de la Paix`, `Avenue des Champs-Élysées`).
13
+ * It carries common abbreviations (`bd`, `av`, `pl`) but no single national standard like
14
+ * USPS Pub-28.
15
+ *
16
+ * So French detection is "is this token a known voie word", position-first — which is why
17
+ * {@link isFrenchStreetWord} matches a whole token rather than a suffix.
18
+ */
19
+ /**
20
+ * Canonical French voie type → common written abbreviations. The leading word of a French street
21
+ * name. The first entry of each list is the most common abbreviation where one exists.
22
+ */
23
+ export declare const FR_VOIE_TYPES: {
24
+ readonly rue: readonly ["r"];
25
+ readonly avenue: readonly ["av", "ave"];
26
+ readonly boulevard: readonly ["bd", "boul"];
27
+ readonly place: readonly ["pl"];
28
+ readonly impasse: readonly ["imp"];
29
+ readonly allée: readonly ["all"];
30
+ readonly allées: readonly [];
31
+ readonly chemin: readonly ["ch", "che"];
32
+ readonly quai: readonly [];
33
+ readonly cours: readonly ["crs"];
34
+ readonly passage: readonly ["pass", "psg"];
35
+ readonly square: readonly ["sq"];
36
+ readonly route: readonly ["rte"];
37
+ readonly sentier: readonly ["sen"];
38
+ readonly villa: readonly [];
39
+ readonly cité: readonly [];
40
+ readonly esplanade: readonly ["espl"];
41
+ readonly faubourg: readonly ["fbg", "fg"];
42
+ readonly mail: readonly [];
43
+ readonly promenade: readonly ["prom"];
44
+ readonly "rond-point": readonly ["rpt"];
45
+ readonly voie: readonly [];
46
+ readonly chaussée: readonly ["chée"];
47
+ readonly ruelle: readonly [];
48
+ readonly venelle: readonly [];
49
+ readonly traverse: readonly ["trav"];
50
+ readonly montée: readonly ["mtée"];
51
+ readonly clos: readonly [];
52
+ readonly hameau: readonly ["ham"];
53
+ readonly résidence: readonly ["rés"];
54
+ readonly lotissement: readonly ["lot"];
55
+ };
56
+ /** A canonical French voie type (e.g. `rue`, `avenue`, `boulevard`). */
57
+ export type FrenchVoieType = keyof typeof FR_VOIE_TYPES;
58
+ /**
59
+ * True when a token is a French voie type word or abbreviation (case- and accent-insensitive) —
60
+ * `Rue`, `BD`, `Allée`, `impasse`. Matches the WHOLE token (French types lead the street name, they
61
+ * are not fused suffixes), so a city or surname is not caught the way a suffix test might.
62
+ */
63
+ export declare function isFrenchStreetWord(token: unknown): boolean;
64
+ //# sourceMappingURL=voie.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"voie.d.ts","sourceRoot":"","sources":["../../fr/voie.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH;;;GAGG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgC4B,CAAA;AAEtD,wEAAwE;AACxE,MAAM,MAAM,cAAc,GAAG,MAAM,OAAO,aAAa,CAAA;AAoBvD;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAQ1D"}
package/out/fr/voie.js ADDED
@@ -0,0 +1,88 @@
1
+ /**
2
+ * @copyright Sister Software
3
+ * @license AGPL-3.0
4
+ * @author Teffen Ellis, et al.
5
+ *
6
+ * French street types (types de voie).
7
+ *
8
+ * The third point on the morphology spectrum the codex now spans:
9
+ *
10
+ * - US — the type is a TRAILING word with a standardized abbreviation (`Main Street` → `ST`).
11
+ * - German — the type is a fused TRAILING suffix (`Hauptstraße`).
12
+ * - French — the type is a LEADING standalone word (`Rue de la Paix`, `Avenue des Champs-Élysées`).
13
+ * It carries common abbreviations (`bd`, `av`, `pl`) but no single national standard like
14
+ * USPS Pub-28.
15
+ *
16
+ * So French detection is "is this token a known voie word", position-first — which is why
17
+ * {@link isFrenchStreetWord} matches a whole token rather than a suffix.
18
+ */
19
+ /**
20
+ * Canonical French voie type → common written abbreviations. The leading word of a French street
21
+ * name. The first entry of each list is the most common abbreviation where one exists.
22
+ */
23
+ export const FR_VOIE_TYPES = {
24
+ rue: ["r"],
25
+ avenue: ["av", "ave"],
26
+ boulevard: ["bd", "boul"],
27
+ place: ["pl"],
28
+ impasse: ["imp"],
29
+ allée: ["all"],
30
+ allées: [],
31
+ chemin: ["ch", "che"],
32
+ quai: [],
33
+ cours: ["crs"],
34
+ passage: ["pass", "psg"],
35
+ square: ["sq"],
36
+ route: ["rte"],
37
+ sentier: ["sen"],
38
+ villa: [],
39
+ cité: [],
40
+ esplanade: ["espl"],
41
+ faubourg: ["fbg", "fg"],
42
+ mail: [],
43
+ promenade: ["prom"],
44
+ "rond-point": ["rpt"],
45
+ voie: [],
46
+ chaussée: ["chée"],
47
+ ruelle: [],
48
+ venelle: [],
49
+ traverse: ["trav"],
50
+ montée: ["mtée"],
51
+ clos: [],
52
+ hameau: ["ham"],
53
+ résidence: ["rés"],
54
+ lotissement: ["lot"],
55
+ };
56
+ /**
57
+ * Set of every French voie token — each canonical type plus each abbreviation — folded to
58
+ * lowercase/diacritic-free for matching. `Allée`/`allee`/`all` all resolve here.
59
+ */
60
+ const VOIE_TOKEN_SET = (() => {
61
+ const fold = (s) => s
62
+ .toLowerCase()
63
+ .normalize("NFD")
64
+ .replace(/[\u0300-\u036f]/g, "");
65
+ const out = new Set();
66
+ for (const canonical of Object.keys(FR_VOIE_TYPES)) {
67
+ out.add(fold(canonical));
68
+ for (const abbr of FR_VOIE_TYPES[canonical])
69
+ out.add(fold(abbr));
70
+ }
71
+ return out;
72
+ })();
73
+ /**
74
+ * True when a token is a French voie type word or abbreviation (case- and accent-insensitive) —
75
+ * `Rue`, `BD`, `Allée`, `impasse`. Matches the WHOLE token (French types lead the street name, they
76
+ * are not fused suffixes), so a city or surname is not caught the way a suffix test might.
77
+ */
78
+ export function isFrenchStreetWord(token) {
79
+ if (typeof token !== "string")
80
+ return false;
81
+ const t = token
82
+ .toLowerCase()
83
+ .normalize("NFD")
84
+ .replace(/[\u0300-\u036f]/g, "")
85
+ .replace(/[^a-z-]/g, "");
86
+ return t.length > 0 && VOIE_TOKEN_SET.has(t);
87
+ }
88
+ //# sourceMappingURL=voie.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"voie.js","sourceRoot":"","sources":["../../fr/voie.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC5B,GAAG,EAAE,CAAC,GAAG,CAAC;IACV,MAAM,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC;IACrB,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC;IACzB,KAAK,EAAE,CAAC,IAAI,CAAC;IACb,OAAO,EAAE,CAAC,KAAK,CAAC;IAChB,KAAK,EAAE,CAAC,KAAK,CAAC;IACd,MAAM,EAAE,EAAE;IACV,MAAM,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC;IACrB,IAAI,EAAE,EAAE;IACR,KAAK,EAAE,CAAC,KAAK,CAAC;IACd,OAAO,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC;IACxB,MAAM,EAAE,CAAC,IAAI,CAAC;IACd,KAAK,EAAE,CAAC,KAAK,CAAC;IACd,OAAO,EAAE,CAAC,KAAK,CAAC;IAChB,KAAK,EAAE,EAAE;IACT,IAAI,EAAE,EAAE;IACR,SAAS,EAAE,CAAC,MAAM,CAAC;IACnB,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC;IACvB,IAAI,EAAE,EAAE;IACR,SAAS,EAAE,CAAC,MAAM,CAAC;IACnB,YAAY,EAAE,CAAC,KAAK,CAAC;IACrB,IAAI,EAAE,EAAE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CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;AAC7C,CAAC"}
@@ -0,0 +1,51 @@
1
+ /**
2
+ * @copyright Sister Software
3
+ * @license AGPL-3.0
4
+ * @author Teffen Ellis, et al.
5
+ *
6
+ * The four constituent countries of the United Kingdom, keyed by their ISO 3166-2:GB code: England
7
+ * (`ENG`), Scotland (`SCT`), Wales (`WLS`), Northern Ireland (`NIR`).
8
+ *
9
+ * The UK's top-level admin tier is itself the first oddity of this system. France has régions,
10
+ * Germany has Bundesländer, the US has states — a single flat layer. The UK has _countries_
11
+ * inside a country, and an address almost never names which one: a line reads `street, town,
12
+ * postcode`, and the constituent country is inferred — usually, but not always cleanly, from the
13
+ * postcode area (see `postcode-area.ts`). So this file is the coarse admin label, and the
14
+ * postcode is the thing that actually carries the geography.
15
+ */
16
+ /** Per-country record: ISO 3166-2:GB code (sans `GB-` prefix) + English name. */
17
+ export interface UkCountryInfo {
18
+ /** ISO 3166-2:GB country code without the `GB-` prefix (e.g. `ENG` for `GB-ENG`). */
19
+ code: string;
20
+ /** English name (e.g. `Scotland`). */
21
+ name: string;
22
+ }
23
+ /** ISO 3166-2:GB country code → info, for all four constituent countries. */
24
+ export declare const GB_COUNTRIES: {
25
+ readonly ENG: {
26
+ readonly code: "ENG";
27
+ readonly name: "England";
28
+ };
29
+ readonly SCT: {
30
+ readonly code: "SCT";
31
+ readonly name: "Scotland";
32
+ };
33
+ readonly WLS: {
34
+ readonly code: "WLS";
35
+ readonly name: "Wales";
36
+ };
37
+ readonly NIR: {
38
+ readonly code: "NIR";
39
+ readonly name: "Northern Ireland";
40
+ };
41
+ };
42
+ /** An ISO 3166-2:GB constituent-country code (`ENG`, `SCT`, `WLS`, `NIR`). */
43
+ export type UkCountryCode = keyof typeof GB_COUNTRIES;
44
+ /** Type-predicate for an ISO 3166-2:GB country code. Case-insensitive. */
45
+ export declare function isUkCountryCode(input: unknown): input is UkCountryCode;
46
+ /**
47
+ * Resolve a UK constituent-country surface form (ISO code or English name) to its ISO code; null if
48
+ * unknown. Accepts `ENG`, `England`, `Northern Ireland`, `scotland`, etc.
49
+ */
50
+ export declare function lookupUkCountry(input: string | null | undefined): UkCountryCode | null;
51
+ //# sourceMappingURL=country.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"country.d.ts","sourceRoot":"","sources":["../../gb/country.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,iFAAiF;AACjF,MAAM,WAAW,aAAa;IAC7B,qFAAqF;IACrF,IAAI,EAAE,MAAM,CAAA;IACZ,sCAAsC;IACtC,IAAI,EAAE,MAAM,CAAA;CACZ;AAED,6EAA6E;AAC7E,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;CAKyB,CAAA;AAElD,8EAA8E;AAC9E,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,YAAY,CAAA;AAIrD,0EAA0E;AAC1E,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,aAAa,CAEtE;AAoBD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,aAAa,GAAG,IAAI,CAKtF"}