@mailwoman/codex 9.4.0 → 10.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 (198) hide show
  1. package/README.md +221 -75
  2. package/lib/address/format.ts +144 -0
  3. package/lib/address/key.ts +134 -0
  4. package/lib/address/layout.ts +189 -0
  5. package/lib/address/layouts/generated.ts +1576 -0
  6. package/lib/address/layouts/index.ts +213 -0
  7. package/lib/address/render.ts +176 -0
  8. package/lib/{address-system-conventions.ts → address/system-conventions.ts} +6 -5
  9. package/lib/component.ts +96 -0
  10. package/lib/country/index.ts +3 -2
  11. package/lib/country/{reference.ts → reference/index.ts} +1 -1
  12. package/lib/country/region-languages.ts +46 -0
  13. package/lib/es/co-official-languages.ts +62 -0
  14. package/lib/es/index.ts +1 -0
  15. package/lib/gb/index.ts +2 -2
  16. package/lib/index.ts +4 -2
  17. package/lib/placetype-map.ts +157 -0
  18. package/lib/postcode/shapes.json +80 -0
  19. package/lib/postcode/shapes.ts +56 -0
  20. package/lib/{postcode-systems.ts → postcode/systems.ts} +8 -1
  21. package/lib/us/index.ts +2 -2
  22. package/lib/us/po-box.ts +37 -10
  23. package/lib/us/{street-directional.ts → street/directional.ts} +1 -1
  24. package/lib/us/{street-suffix.ts → street/suffix.ts} +1 -1
  25. package/out/address/format.d.ts +87 -0
  26. package/out/address/format.d.ts.map +1 -0
  27. package/out/address/format.js +85 -0
  28. package/out/address/format.js.map +1 -0
  29. package/out/address/key.d.ts +67 -0
  30. package/out/address/key.d.ts.map +1 -0
  31. package/out/address/key.js +91 -0
  32. package/out/address/key.js.map +1 -0
  33. package/out/address/layout.d.ts +104 -0
  34. package/out/address/layout.d.ts.map +1 -0
  35. package/out/address/layout.js +123 -0
  36. package/out/address/layout.js.map +1 -0
  37. package/out/address/layouts/generated.d.ts +21 -0
  38. package/out/address/layouts/generated.d.ts.map +1 -0
  39. package/out/address/layouts/generated.js +1380 -0
  40. package/out/address/layouts/generated.js.map +1 -0
  41. package/out/address/layouts/index.d.ts +81 -0
  42. package/out/address/layouts/index.d.ts.map +1 -0
  43. package/out/address/layouts/index.js +184 -0
  44. package/out/address/layouts/index.js.map +1 -0
  45. package/out/address/render.d.ts +64 -0
  46. package/out/address/render.d.ts.map +1 -0
  47. package/out/address/render.js +115 -0
  48. package/out/address/render.js.map +1 -0
  49. package/out/{address-system-conventions.d.ts → address/system-conventions.d.ts} +6 -5
  50. package/out/address/system-conventions.d.ts.map +1 -0
  51. package/out/{address-system-conventions.js → address/system-conventions.js} +2 -2
  52. package/out/address/system-conventions.js.map +1 -0
  53. package/out/au/delivery-service.d.ts.map +1 -1
  54. package/out/au/level-designator.d.ts.map +1 -1
  55. package/out/au/state.d.ts.map +1 -1
  56. package/out/ca/province.d.ts.map +1 -1
  57. package/out/component.d.ts +50 -0
  58. package/out/component.d.ts.map +1 -0
  59. package/out/component.js +84 -0
  60. package/out/component.js.map +1 -0
  61. package/out/country/codes.d.ts +2 -2
  62. package/out/country/codes.d.ts.map +1 -1
  63. package/out/country/display-names.d.ts.map +1 -1
  64. package/out/country/display-names.js.map +1 -1
  65. package/out/country/index.d.ts +3 -2
  66. package/out/country/index.d.ts.map +1 -1
  67. package/out/country/index.js +3 -2
  68. package/out/country/index.js.map +1 -1
  69. package/out/country/{reference-data.d.ts → reference/data.d.ts} +1 -1
  70. package/out/country/reference/data.d.ts.map +1 -0
  71. package/out/country/{reference-data.js → reference/data.js} +1 -1
  72. package/out/country/reference/data.js.map +1 -0
  73. package/out/country/{reference.d.ts → reference/index.d.ts} +1 -1
  74. package/out/country/reference/index.d.ts.map +1 -0
  75. package/out/country/{reference.js → reference/index.js} +2 -2
  76. package/out/country/reference/index.js.map +1 -0
  77. package/out/country/region-languages.d.ts +25 -0
  78. package/out/country/region-languages.d.ts.map +1 -0
  79. package/out/country/region-languages.js +41 -0
  80. package/out/country/region-languages.js.map +1 -0
  81. package/out/de/bundesland.d.ts.map +1 -1
  82. package/out/de/postleitzahl.d.ts.map +1 -1
  83. package/out/de/street-type.d.ts.map +1 -1
  84. package/out/es/co-official-languages.d.ts +37 -0
  85. package/out/es/co-official-languages.d.ts.map +1 -0
  86. package/out/es/co-official-languages.js +61 -0
  87. package/out/es/co-official-languages.js.map +1 -0
  88. package/out/es/index.d.ts +1 -0
  89. package/out/es/index.d.ts.map +1 -1
  90. package/out/es/index.js +1 -0
  91. package/out/es/index.js.map +1 -1
  92. package/out/fr/departement.d.ts.map +1 -1
  93. package/out/fr/region.d.ts.map +1 -1
  94. package/out/gb/country.d.ts.map +1 -1
  95. package/out/gb/index.d.ts +2 -2
  96. package/out/gb/index.d.ts.map +1 -1
  97. package/out/gb/index.js +2 -2
  98. package/out/gb/index.js.map +1 -1
  99. package/out/gb/{postcode-area.d.ts → postcode/area.d.ts} +1 -1
  100. package/out/gb/postcode/area.d.ts.map +1 -0
  101. package/out/gb/{postcode-area.js → postcode/area.js} +1 -1
  102. package/out/gb/postcode/area.js.map +1 -0
  103. package/out/gb/{postcode.d.ts → postcode/index.d.ts} +1 -1
  104. package/out/gb/postcode/index.d.ts.map +1 -0
  105. package/out/gb/{postcode.js → postcode/index.js} +1 -1
  106. package/out/gb/postcode/index.js.map +1 -0
  107. package/out/gb/street-type.d.ts.map +1 -1
  108. package/out/index.d.ts +4 -2
  109. package/out/index.d.ts.map +1 -1
  110. package/out/index.js +4 -2
  111. package/out/index.js.map +1 -1
  112. package/out/jp/address-unit.d.ts.map +1 -1
  113. package/out/jp/prefecture.d.ts.map +1 -1
  114. package/out/level-semantics.d.ts.map +1 -1
  115. package/out/level-semantics.js.map +1 -1
  116. package/out/nz/delivery-service.d.ts.map +1 -1
  117. package/out/placetype-map.d.ts +83 -0
  118. package/out/placetype-map.d.ts.map +1 -0
  119. package/out/placetype-map.js +130 -0
  120. package/out/placetype-map.js.map +1 -0
  121. package/out/postcode/shapes.d.ts +47 -0
  122. package/out/postcode/shapes.d.ts.map +1 -0
  123. package/out/postcode/shapes.js +38 -0
  124. package/out/postcode/shapes.js.map +1 -0
  125. package/out/postcode/shapes.json +80 -0
  126. package/out/{postcode-systems.d.ts → postcode/systems.d.ts} +8 -1
  127. package/out/postcode/systems.d.ts.map +1 -0
  128. package/out/{postcode-systems.js → postcode/systems.js} +9 -2
  129. package/out/postcode/systems.js.map +1 -0
  130. package/out/us/floor-designator.d.ts.map +1 -1
  131. package/out/us/index.d.ts +2 -2
  132. package/out/us/index.js +2 -2
  133. package/out/us/military-address.d.ts.map +1 -1
  134. package/out/us/po-box.d.ts +6 -0
  135. package/out/us/po-box.d.ts.map +1 -1
  136. package/out/us/po-box.js +35 -10
  137. package/out/us/po-box.js.map +1 -1
  138. package/out/us/state.d.ts.map +1 -1
  139. package/out/us/{street-directional.d.ts → street/directional.d.ts} +1 -1
  140. package/out/us/street/directional.d.ts.map +1 -0
  141. package/out/us/{street-directional.js → street/directional.js} +2 -2
  142. package/out/us/street/directional.js.map +1 -0
  143. package/out/us/{street-suffix.d.ts → street/suffix.d.ts} +1 -1
  144. package/out/us/street/suffix.d.ts.map +1 -0
  145. package/out/us/{street-suffix.js → street/suffix.js} +2 -2
  146. package/out/us/street/suffix.js.map +1 -0
  147. package/out/us/zipcode.d.ts +1 -1
  148. package/out/us/zipcode.d.ts.map +1 -1
  149. package/package.json +110 -30
  150. package/lib/tools/build-country-surface-lexicon.ts +0 -177
  151. package/lib/tools/export-country-surfaces.ts +0 -48
  152. package/lib/tools/generate-country-population.ts +0 -142
  153. package/lib/tools/generate-country-reference.ts +0 -168
  154. package/lib/tools/generate-official-languages.ts +0 -210
  155. package/lib/tools/index.ts +0 -12
  156. package/out/address-system-conventions.d.ts.map +0 -1
  157. package/out/address-system-conventions.js.map +0 -1
  158. package/out/country/reference-data.d.ts.map +0 -1
  159. package/out/country/reference-data.js.map +0 -1
  160. package/out/country/reference.d.ts.map +0 -1
  161. package/out/country/reference.js.map +0 -1
  162. package/out/gb/postcode-area.d.ts.map +0 -1
  163. package/out/gb/postcode-area.js.map +0 -1
  164. package/out/gb/postcode.d.ts.map +0 -1
  165. package/out/gb/postcode.js.map +0 -1
  166. package/out/postcode-systems.d.ts.map +0 -1
  167. package/out/postcode-systems.js.map +0 -1
  168. package/out/tools/build-country-surface-lexicon.d.ts +0 -43
  169. package/out/tools/build-country-surface-lexicon.d.ts.map +0 -1
  170. package/out/tools/build-country-surface-lexicon.js +0 -149
  171. package/out/tools/build-country-surface-lexicon.js.map +0 -1
  172. package/out/tools/export-country-surfaces.d.ts +0 -15
  173. package/out/tools/export-country-surfaces.d.ts.map +0 -1
  174. package/out/tools/export-country-surfaces.js +0 -34
  175. package/out/tools/export-country-surfaces.js.map +0 -1
  176. package/out/tools/generate-country-population.d.ts +0 -42
  177. package/out/tools/generate-country-population.d.ts.map +0 -1
  178. package/out/tools/generate-country-population.js +0 -106
  179. package/out/tools/generate-country-population.js.map +0 -1
  180. package/out/tools/generate-country-reference.d.ts +0 -36
  181. package/out/tools/generate-country-reference.d.ts.map +0 -1
  182. package/out/tools/generate-country-reference.js +0 -107
  183. package/out/tools/generate-country-reference.js.map +0 -1
  184. package/out/tools/generate-official-languages.d.ts +0 -50
  185. package/out/tools/generate-official-languages.d.ts.map +0 -1
  186. package/out/tools/generate-official-languages.js +0 -149
  187. package/out/tools/generate-official-languages.js.map +0 -1
  188. package/out/tools/index.d.ts +0 -12
  189. package/out/tools/index.d.ts.map +0 -1
  190. package/out/tools/index.js +0 -12
  191. package/out/tools/index.js.map +0 -1
  192. package/out/us/street-directional.d.ts.map +0 -1
  193. package/out/us/street-directional.js.map +0 -1
  194. package/out/us/street-suffix.d.ts.map +0 -1
  195. package/out/us/street-suffix.js.map +0 -1
  196. /package/lib/country/{reference-data.ts → reference/data.ts} +0 -0
  197. /package/lib/gb/{postcode-area.ts → postcode/area.ts} +0 -0
  198. /package/lib/gb/{postcode.ts → postcode/index.ts} +0 -0
@@ -0,0 +1,67 @@
1
+ /**
2
+ * @copyright Sister Software
3
+ * @license AGPL-3.0
4
+ * @author Teffen Ellis, et al.
5
+ *
6
+ * The canonical match key — a normalized, deterministic string derived from address components,
7
+ * distinct from the human-readable formatted string.
8
+ *
9
+ * Where `format.ts` produces something for a person to read, this produces something for a
10
+ * _machine_ to collide on: lowercased, diacritic-stripped, punctuation-flattened, whitespace-
11
+ * collapsed, fields in a fixed canonical order. Two records for the same address that differ only
12
+ * in spelling, case, or punctuation produce the same key — which is exactly what the matcher's
13
+ * blocking stage wants as one cheap, high-precision candidate signal (alongside geographic
14
+ * proximity, which carries the real weight — see the geocode-first record-matching concept doc).
15
+ *
16
+ * Deliberately NOT done yet (follow-ups, all conditioned on `@mailwoman/codex`): expanding street
17
+ * suffixes (`Ave` → `avenue`) and directionals (`N` → `north`) to a canonical form, and
18
+ * USPS-style standardization. This first version is pure normalization with no dictionary expansion,
19
+ * so the key is stable and explainable; expansion is an additive refinement, not a rewrite.
20
+ */
21
+ import type { ComponentDict } from "#address/format";
22
+ /**
23
+ * Options accepted by {@linkcode canonicalKey}.
24
+ */
25
+ export interface CanonicalKeyOptions {
26
+ /**
27
+ * Field separator in the emitted key. Default `"|"` — preserves field boundaries for blocking.
28
+ */
29
+ separator?: string;
30
+ }
31
+ /**
32
+ * Options for {@linkcode foldForKey} — the two points where the formatter's address-token fold and the record package's
33
+ * fragment fold legitimately differ.
34
+ */
35
+ export interface FoldForKeyOptions {
36
+ /**
37
+ * How connective punctuation folds. `"space"` turns `&`, `+`, and `/` into word boundaries (`"A&B"` → `"a b"`);
38
+ * `"and"` spells `&` and `+` out as the word `and` (`"AT&T"` → `"at and t"`), leaving `/` to the punctuation
39
+ * catch-all (still a word boundary).
40
+ */
41
+ ampersand: "space" | "and";
42
+ /**
43
+ * Intra-token deletion set. When true, periods join the apostrophes as intra-token noise and are deleted (`"S.A."` →
44
+ * `"sa"`), while a backtick falls to the punctuation catch-all. When false or omitted, backticks are deleted
45
+ * alongside the apostrophes and periods become word boundaries (`"S.A."` → `"s a"`).
46
+ */
47
+ dropPeriods?: boolean;
48
+ }
49
+ /**
50
+ * The shared fold behind every match key: NFKD-decompose and strip combining marks (so `é` → `e`), lowercase, delete
51
+ * intra-token punctuation, expand or flatten connective punctuation per {@linkcode FoldForKeyOptions}, space every
52
+ * remaining non-alphanumeric, and collapse whitespace. Deterministic — the same input and options always yield the same
53
+ * output.
54
+ */
55
+ export declare function foldForKey(input: string, options: FoldForKeyOptions): string;
56
+ /**
57
+ * Normalize a single token for matching: {@linkcode foldForKey} with connective punctuation flattened to spaces (so
58
+ * `"A&B"` → `"a b"`, not `"ab"`). Deterministic and reversible-free — the same input always yields the same output.
59
+ */
60
+ export declare function normalizeAddressToken(input: string): string;
61
+ /**
62
+ * Derive the canonical match key from an address component dict: each present, address-identifying field normalized via
63
+ * {@linkcode normalizeAddressToken}, in fixed order, joined by the separator. Empty / whitespace-only fields are
64
+ * skipped. Returns an empty string if nothing identifying remains.
65
+ */
66
+ export declare function canonicalKey(components: ComponentDict, opts?: CanonicalKeyOptions): string;
67
+ //# sourceMappingURL=key.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"key.d.ts","sourceRoot":"","sources":["../../lib/address/key.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAyBpD;;GAEG;AACH,MAAM,WAAW,mBAAmB;IACnC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;CAClB;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IACjC;;;;OAIG;IACH,SAAS,EAAE,OAAO,GAAG,KAAK,CAAA;IAC1B;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;CACrB;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB,GAAG,MAAM,CAqB5E;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE3D;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,UAAU,EAAE,aAAa,EAAE,IAAI,GAAE,mBAAwB,GAAG,MAAM,CAgB9F"}
@@ -0,0 +1,91 @@
1
+ /**
2
+ * @copyright Sister Software
3
+ * @license AGPL-3.0
4
+ * @author Teffen Ellis, et al.
5
+ *
6
+ * The canonical match key — a normalized, deterministic string derived from address components,
7
+ * distinct from the human-readable formatted string.
8
+ *
9
+ * Where `format.ts` produces something for a person to read, this produces something for a
10
+ * _machine_ to collide on: lowercased, diacritic-stripped, punctuation-flattened, whitespace-
11
+ * collapsed, fields in a fixed canonical order. Two records for the same address that differ only
12
+ * in spelling, case, or punctuation produce the same key — which is exactly what the matcher's
13
+ * blocking stage wants as one cheap, high-precision candidate signal (alongside geographic
14
+ * proximity, which carries the real weight — see the geocode-first record-matching concept doc).
15
+ *
16
+ * Deliberately NOT done yet (follow-ups, all conditioned on `@mailwoman/codex`): expanding street
17
+ * suffixes (`Ave` → `avenue`) and directionals (`N` → `north`) to a canonical form, and
18
+ * USPS-style standardization. This first version is pure normalization with no dictionary expansion,
19
+ * so the key is stable and explainable; expansion is an additive refinement, not a rewrite.
20
+ */
21
+ /**
22
+ * The address-identifying components, in canonical key order. Venue / attention are intentionally excluded — those
23
+ * carry organization identity, which the record layer keys separately.
24
+ */
25
+ const KEY_FIELD_ORDER = [
26
+ "po_box",
27
+ "house_number",
28
+ "street_prefix",
29
+ "street_prefix_particle",
30
+ "street",
31
+ "street_suffix",
32
+ "intersection_a",
33
+ "intersection_b",
34
+ "unit",
35
+ "dependent_locality",
36
+ "locality",
37
+ "subregion",
38
+ "region",
39
+ "postcode",
40
+ "country",
41
+ ];
42
+ /**
43
+ * The shared fold behind every match key: NFKD-decompose and strip combining marks (so `é` → `e`), lowercase, delete
44
+ * intra-token punctuation, expand or flatten connective punctuation per {@linkcode FoldForKeyOptions}, space every
45
+ * remaining non-alphanumeric, and collapse whitespace. Deterministic — the same input and options always yield the same
46
+ * output.
47
+ */
48
+ export function foldForKey(input, options) {
49
+ const folded = input
50
+ .normalize("NFKD")
51
+ // strip combining marks (U+0300–U+036F) left by NFKD decomposition, so "é" → "e"
52
+ .replaceAll(/[\u0300-\u036F]/g, "")
53
+ .toLowerCase()
54
+ // apostrophes are intra-word (possessives, "O'Brien") — delete so the token stays whole
55
+ .replaceAll(options.dropPeriods ? /[.'’]/g : /['’`]/g, "");
56
+ const connected = options.ampersand === "and"
57
+ ? folded.replaceAll("&", " and ").replaceAll("+", " and ")
58
+ : folded.replaceAll(/[&+/]/g, " ");
59
+ return (connected
60
+ // everything else non-alphanumeric (keep spaces) is noise
61
+ .replaceAll(/[^a-z0-9\s]/g, " ")
62
+ .replaceAll(/\s+/g, " ")
63
+ .trim());
64
+ }
65
+ /**
66
+ * Normalize a single token for matching: {@linkcode foldForKey} with connective punctuation flattened to spaces (so
67
+ * `"A&B"` → `"a b"`, not `"ab"`). Deterministic and reversible-free — the same input always yields the same output.
68
+ */
69
+ export function normalizeAddressToken(input) {
70
+ return foldForKey(input, { ampersand: "space" });
71
+ }
72
+ /**
73
+ * Derive the canonical match key from an address component dict: each present, address-identifying field normalized via
74
+ * {@linkcode normalizeAddressToken}, in fixed order, joined by the separator. Empty / whitespace-only fields are
75
+ * skipped. Returns an empty string if nothing identifying remains.
76
+ */
77
+ export function canonicalKey(components, opts = {}) {
78
+ const separator = opts.separator ?? "|";
79
+ const parts = [];
80
+ for (const tag of KEY_FIELD_ORDER) {
81
+ const value = components[tag];
82
+ if (!value)
83
+ continue;
84
+ const normalized = normalizeAddressToken(value);
85
+ if (normalized) {
86
+ parts.push(normalized);
87
+ }
88
+ }
89
+ return parts.join(separator);
90
+ }
91
+ //# sourceMappingURL=key.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"key.js","sourceRoot":"","sources":["../../lib/address/key.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAKH;;;GAGG;AACH,MAAM,eAAe,GAAG;IACvB,QAAQ;IACR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MAAM,GAAG,IAAI,eAAe,EAAE,CAAC;QACnC,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,CAAC,CAAA;QAE7B,IAAI,CAAC,KAAK;YAAE,SAAQ;QACpB,MAAM,UAAU,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAA;QAE/C,IAAI,UAAU,EAAE,CAAC;YAChB,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;QACvB,CAAC;IACF,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;AAC7B,CAAC"}
@@ -0,0 +1,104 @@
1
+ /**
2
+ * @copyright Sister Software
3
+ * @license AGPL-3.0
4
+ * @author Teffen Ellis, et al.
5
+ *
6
+ * Per-address-system LAYOUTS: the order a system prints its components in, as data.
7
+ *
8
+ * A layout is written as a tagged template that reads in the order it prints, so reviewing one means looking at the
9
+ * shape of the address it produces rather than at a nested function call. The interpolations are slots; the literal
10
+ * text between them are connectors.
11
+ *
12
+ * ONE RULE governs rendering, and it replaces four mechanisms that each did part of the job elsewhere — the
13
+ * `filter(isPresent).join(…)` written by hand in 28 files, a pass that stripped a connector a template wrote between
14
+ * two slots when one was empty, a pass that spliced a missing line back in, and a chain of `if (x) parts.push(x)`:
15
+ *
16
+ * > A node that renders nothing removes itself, and its connector goes with it.
17
+ *
18
+ * A connector between two slots renders when a slot rendered on each side of it. A connector at the edge of a line
19
+ * has only one side, so it binds to the single slot it touches — which is how Japan's postal mark 〒 disappears with
20
+ * an absent postcode while an interior space does not.
21
+ *
22
+ * WHY A TEMPLATE RATHER THAN NESTED CALLS. The order has to be readable by someone checking whether a country is
23
+ * right, and the check is "does this look like an address from there". A nested `seq(", ", locality, seq(" ", region,
24
+ * postcode))` encodes the same thing and reads like a parser. The template also needs no nesting for the common case:
25
+ * treating every separator as a connector makes each line flat, and the four outcomes of a partially-filled tail
26
+ * (`New York, NY 10118` / `New York, NY` / `New York, 10118` / `NY 10118`) fall out of the one rule.
27
+ *
28
+ * The RENDERER is the sibling `render.ts`, and the public surface over it is `format.ts`. They are separate modules
29
+ * rather than one so a consumer that only wants the table — a conformance check, a documentation build — imports
30
+ * `#address/layouts` and loads no evaluator.
31
+ */
32
+ import { type ComponentTag } from "#component";
33
+ /**
34
+ * A slot: one component tag's value, or nothing when the dict has no value for it.
35
+ */
36
+ export interface AddressSlot {
37
+ readonly tag: ComponentTag;
38
+ }
39
+ /**
40
+ * A connector: literal text that renders only between neighbours that rendered. Written as the text BETWEEN
41
+ * interpolations, never constructed by hand.
42
+ */
43
+ export interface AddressConnector {
44
+ readonly connector: string;
45
+ }
46
+ /**
47
+ * First alternative that renders. The street line needs it and nothing else does: an intersection prints as `<a> & <b>`
48
+ * where a street prints as its own family of tags.
49
+ */
50
+ export interface AddressAlternation {
51
+ readonly alternatives: readonly AddressLayout[];
52
+ }
53
+ export type AddressAtom = AddressSlot | AddressConnector | AddressAlternation | AddressLayout;
54
+ /**
55
+ * A layout: lines of atoms, in print order. A line break in the template starts a new line; how lines are joined for
56
+ * single-line output is the caller's choice, and per-system for the systems that join on nothing.
57
+ */
58
+ export interface AddressLayout {
59
+ readonly lines: ReadonlyArray<readonly AddressAtom[]>;
60
+ }
61
+ export declare function isSlot(atom: AddressAtom): atom is AddressSlot;
62
+ export declare function isConnector(atom: AddressAtom): atom is AddressConnector;
63
+ export declare function isAlternation(atom: AddressAtom): atom is AddressAlternation;
64
+ export declare function isLayout(atom: AddressAtom): atom is AddressLayout;
65
+ /**
66
+ * Every {@linkcode ComponentTag} as a slot, so a layout names a tag by destructuring rather than by quoting it. A
67
+ * misspelled slot is then an unresolved identifier at compile time, and the spelling stays the tag's own —
68
+ * `dependent_locality`, never a parallel camelCase vocabulary.
69
+ */
70
+ export declare const SLOTS: Readonly<Record<ComponentTag, AddressSlot>>;
71
+ /**
72
+ * The first alternative that renders wins. Used for the street line, where an intersection and a street name are two
73
+ * ways of saying where, not two things to print.
74
+ */
75
+ export declare function either(...alternatives: readonly AddressLayout[]): AddressAlternation;
76
+ /**
77
+ * The street line where the number leads: the anglophone order, and France's.
78
+ *
79
+ * An intersection is an ALTERNATIVE to the street name because it is a different way of saying where, not a second
80
+ * thing to print — the shape the old `composeRoad` drew in its own docstring before hand-compiling it into a chain of
81
+ * `if` statements. The box is not an alternative, so it sits outside the choice.
82
+ */
83
+ export declare const numberFirstStreet: AddressLayout;
84
+ /**
85
+ * The number-first line where a comma separates the number from the name — India's order.
86
+ */
87
+ export declare const numberFirstCommaStreet: AddressLayout;
88
+ /**
89
+ * The street line where the number follows the name: the German-order systems, and Italy.
90
+ */
91
+ export declare const numberLastStreet: AddressLayout;
92
+ /**
93
+ * The number-last line where a comma separates the name from the number — `Calle Mayor, 12`, and Brazil's order.
94
+ *
95
+ * The separator is not cosmetic. Spain's corpus recipe renders both this form and the space form on purpose, because
96
+ * both occur in what a person types; collapsing one into the other would remove half the signal.
97
+ */
98
+ export declare const numberLastCommaStreet: AddressLayout;
99
+ /**
100
+ * Build a layout from a tagged template. A newline in the literal text starts a line; other literal text is a
101
+ * connector; an interpolation is a slot, an alternation, or another layout.
102
+ */
103
+ export declare function addr(strings: TemplateStringsArray, ...values: readonly AddressAtom[]): AddressLayout;
104
+ //# sourceMappingURL=layout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../lib/address/layout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAkB,KAAK,YAAY,EAAE,MAAM,YAAY,CAAA;AAE9D;;GAEG;AACH,MAAM,WAAW,WAAW;IAC3B,QAAQ,CAAC,GAAG,EAAE,YAAY,CAAA;CAC1B;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAChC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;CAC1B;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IAClC,QAAQ,CAAC,YAAY,EAAE,SAAS,aAAa,EAAE,CAAA;CAC/C;AAED,MAAM,MAAM,WAAW,GAAG,WAAW,GAAG,gBAAgB,GAAG,kBAAkB,GAAG,aAAa,CAAA;AAE7F;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC7B,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC,SAAS,WAAW,EAAE,CAAC,CAAA;CACrD;AAED,wBAAgB,MAAM,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,IAAI,WAAW,CAE7D;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,IAAI,gBAAgB,CAEvE;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,IAAI,kBAAkB,CAE3E;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,IAAI,aAAa,CAEjE;AAED;;;;GAIG;AACH,eAAO,MAAM,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,YAAY,EAAE,WAAW,CAAC,CAE7D,CAAA;AAED;;;GAGG;AACH,wBAAgB,MAAM,CAAC,GAAG,YAAY,EAAE,SAAS,aAAa,EAAE,GAAG,kBAAkB,CAEpF;AAYD;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,EAAE,aAI7B,CAAA;AAEH;;GAEG;AACH,eAAO,MAAM,sBAAsB,EAAE,aAIlC,CAAA;AAEH;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,aAI5B,CAAA;AAEH;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,EAAE,aAIjC,CAAA;AAEH;;;GAGG;AACH,wBAAgB,IAAI,CAAC,OAAO,EAAE,oBAAoB,EAAE,GAAG,MAAM,EAAE,SAAS,WAAW,EAAE,GAAG,aAAa,CA+BpG"}
@@ -0,0 +1,123 @@
1
+ /**
2
+ * @copyright Sister Software
3
+ * @license AGPL-3.0
4
+ * @author Teffen Ellis, et al.
5
+ *
6
+ * Per-address-system LAYOUTS: the order a system prints its components in, as data.
7
+ *
8
+ * A layout is written as a tagged template that reads in the order it prints, so reviewing one means looking at the
9
+ * shape of the address it produces rather than at a nested function call. The interpolations are slots; the literal
10
+ * text between them are connectors.
11
+ *
12
+ * ONE RULE governs rendering, and it replaces four mechanisms that each did part of the job elsewhere — the
13
+ * `filter(isPresent).join(…)` written by hand in 28 files, a pass that stripped a connector a template wrote between
14
+ * two slots when one was empty, a pass that spliced a missing line back in, and a chain of `if (x) parts.push(x)`:
15
+ *
16
+ * > A node that renders nothing removes itself, and its connector goes with it.
17
+ *
18
+ * A connector between two slots renders when a slot rendered on each side of it. A connector at the edge of a line
19
+ * has only one side, so it binds to the single slot it touches — which is how Japan's postal mark 〒 disappears with
20
+ * an absent postcode while an interior space does not.
21
+ *
22
+ * WHY A TEMPLATE RATHER THAN NESTED CALLS. The order has to be readable by someone checking whether a country is
23
+ * right, and the check is "does this look like an address from there". A nested `seq(", ", locality, seq(" ", region,
24
+ * postcode))` encodes the same thing and reads like a parser. The template also needs no nesting for the common case:
25
+ * treating every separator as a connector makes each line flat, and the four outcomes of a partially-filled tail
26
+ * (`New York, NY 10118` / `New York, NY` / `New York, 10118` / `NY 10118`) fall out of the one rule.
27
+ *
28
+ * The RENDERER is the sibling `render.ts`, and the public surface over it is `format.ts`. They are separate modules
29
+ * rather than one so a consumer that only wants the table — a conformance check, a documentation build — imports
30
+ * `#address/layouts` and loads no evaluator.
31
+ */
32
+ import { COMPONENT_TAGS } from "#component";
33
+ export function isSlot(atom) {
34
+ return "tag" in atom;
35
+ }
36
+ export function isConnector(atom) {
37
+ return "connector" in atom;
38
+ }
39
+ export function isAlternation(atom) {
40
+ return "alternatives" in atom;
41
+ }
42
+ export function isLayout(atom) {
43
+ return "lines" in atom;
44
+ }
45
+ /**
46
+ * Every {@linkcode ComponentTag} as a slot, so a layout names a tag by destructuring rather than by quoting it. A
47
+ * misspelled slot is then an unresolved identifier at compile time, and the spelling stays the tag's own —
48
+ * `dependent_locality`, never a parallel camelCase vocabulary.
49
+ */
50
+ export const SLOTS = Object.freeze(Object.fromEntries(COMPONENT_TAGS.map((tag) => [tag, Object.freeze({ tag })])));
51
+ /**
52
+ * The first alternative that renders wins. Used for the street line, where an intersection and a street name are two
53
+ * ways of saying where, not two things to print.
54
+ */
55
+ export function either(...alternatives) {
56
+ return { alternatives };
57
+ }
58
+ /**
59
+ * A post-office box takes a line of its own directly above the street line, and coexists with one: a record may carry
60
+ * both a box and a street address, and printing the box alone would lose the half a courier needs.
61
+ *
62
+ * That placement is measured, not assumed. The engine this table replaces rendered `P.O. Box 5` + `100 Main St` +
63
+ * `Portland, OR 97214` as three lines in that order, and the same shape for Germany, Australia and Great Britain.
64
+ * libaddressinput models no box at all, which is why the slot is authored here rather than transcribed.
65
+ */
66
+ const poBoxLine = SLOTS.po_box;
67
+ /**
68
+ * The street line where the number leads: the anglophone order, and France's.
69
+ *
70
+ * An intersection is an ALTERNATIVE to the street name because it is a different way of saying where, not a second
71
+ * thing to print — the shape the old `composeRoad` drew in its own docstring before hand-compiling it into a chain of
72
+ * `if` statements. The box is not an alternative, so it sits outside the choice.
73
+ */
74
+ export const numberFirstStreet = addr `${poBoxLine}
75
+ ${either(addr `${SLOTS.intersection_a} & ${SLOTS.intersection_b}`, addr `${SLOTS.house_number} ${SLOTS.street_prefix} ${SLOTS.street_prefix_particle} ${SLOTS.street} ${SLOTS.street_suffix} ${SLOTS.unit}`)}`;
76
+ /**
77
+ * The number-first line where a comma separates the number from the name — India's order.
78
+ */
79
+ export const numberFirstCommaStreet = addr `${poBoxLine}
80
+ ${either(addr `${SLOTS.intersection_a} & ${SLOTS.intersection_b}`, addr `${SLOTS.house_number}, ${SLOTS.street_prefix} ${SLOTS.street_prefix_particle} ${SLOTS.street} ${SLOTS.street_suffix} ${SLOTS.unit}`)}`;
81
+ /**
82
+ * The street line where the number follows the name: the German-order systems, and Italy.
83
+ */
84
+ export const numberLastStreet = addr `${poBoxLine}
85
+ ${either(addr `${SLOTS.intersection_a} & ${SLOTS.intersection_b}`, addr `${SLOTS.street_prefix} ${SLOTS.street_prefix_particle} ${SLOTS.street} ${SLOTS.street_suffix} ${SLOTS.house_number} ${SLOTS.unit}`)}`;
86
+ /**
87
+ * The number-last line where a comma separates the name from the number — `Calle Mayor, 12`, and Brazil's order.
88
+ *
89
+ * The separator is not cosmetic. Spain's corpus recipe renders both this form and the space form on purpose, because
90
+ * both occur in what a person types; collapsing one into the other would remove half the signal.
91
+ */
92
+ export const numberLastCommaStreet = addr `${poBoxLine}
93
+ ${either(addr `${SLOTS.intersection_a} & ${SLOTS.intersection_b}`, addr `${SLOTS.street_prefix} ${SLOTS.street_prefix_particle} ${SLOTS.street} ${SLOTS.street_suffix}, ${SLOTS.house_number} ${SLOTS.unit}`)}`;
94
+ /**
95
+ * Build a layout from a tagged template. A newline in the literal text starts a line; other literal text is a
96
+ * connector; an interpolation is a slot, an alternation, or another layout.
97
+ */
98
+ export function addr(strings, ...values) {
99
+ const lines = [[]];
100
+ const push = (atom) => {
101
+ lines.at(-1).push(atom);
102
+ };
103
+ for (const [index, raw] of strings.entries()) {
104
+ // A template's literal segment is bounded by the source text that spells it — one address line at most, and a
105
+ // layout cannot grow at runtime.
106
+ // oxlint-disable-next-line mailwoman/prefer-spliterator -- bounded by the source text, see above
107
+ const segments = raw.split("\n");
108
+ for (const [segmentIndex, segment] of segments.entries()) {
109
+ if (segmentIndex > 0) {
110
+ lines.push([]);
111
+ }
112
+ if (segment) {
113
+ push({ connector: segment });
114
+ }
115
+ }
116
+ const value = values[index];
117
+ if (value) {
118
+ push(value);
119
+ }
120
+ }
121
+ return { lines: lines.filter((line) => line.length > 0) };
122
+ }
123
+ //# sourceMappingURL=layout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout.js","sourceRoot":"","sources":["../../lib/address/layout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAE,cAAc,EAAqB,MAAM,YAAY,CAAA;AAmC9D,MAAM,UAAU,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CAAC,IAAI,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC;QAC9C,8GAA8G;QAC9G,iCAAiC;QACjC,iGAAiG;QACjG,MAAM,QAAQ,GAAG,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;QAEhC,KAAK,MAAM,CAAC,YAAY,EAAE,OAAO,CAAC,IAAI,QAAQ,CAAC,OAAO,EAAE,EAAE,CAAC;YAC1D,IAAI,YAAY,GAAG,CAAC,EAAE,CAAC;gBACtB,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;YACf,CAAC;YAED,IAAI,OAAO,EAAE,CAAC;gBACb,IAAI,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,CAAA;YAC7B,CAAC;QACF,CAAC;QAED,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA;QAE3B,IAAI,KAAK,EAAE,CAAC;YACX,IAAI,CAAC,KAAK,CAAC,CAAA;QACZ,CAAC;IACF,CAAC;IAED,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,CAAA;AAC1D,CAAC"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @copyright Sister Software
3
+ * @license AGPL-3.0
4
+ * @author Teffen Ellis, et al.
5
+ * @generated
6
+ *
7
+ * GENERATED — run `node packages/mailwoman/lib/dev-tools/codex/address-layouts.ts` to refresh. Do not edit by hand.
8
+ *
9
+ * One layout per country, derived from libaddressinput's `fmt` skeleton (which fields print, in what order) and the
10
+ * street order read once from the OpenCage templates (which slot leads). The `fmt` each was derived from is quoted
11
+ * above it, so a reader can compare the two without opening the dataset.
12
+ *
13
+ * The locales this project publishes weights for are NOT here: those are hand-authored in the sibling `index.ts` and
14
+ * checked against real addresses on a board, because a generated skeleton is a starting point rather than a verdict.
15
+ */
16
+ import { type AddressLayout } from "#address/layout";
17
+ /**
18
+ * Generated layouts, keyed by ISO 3166-1 alpha-2.
19
+ */
20
+ export declare const GENERATED_ADDRESS_LAYOUTS: Readonly<Record<string, AddressLayout>>;
21
+ //# sourceMappingURL=generated.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated.d.ts","sourceRoot":"","sources":["../../../lib/address/layouts/generated.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EAON,KAAK,aAAa,EAClB,MAAM,iBAAiB,CAAA;AAIxB;;GAEG;AACH,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAsgD7E,CAAA"}