@mailwoman/codex 8.1.0 → 8.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/address-system-conventions.ts +7 -1
- package/au/delivery-service.ts +34 -12
- package/au/level-designator.ts +38 -14
- package/au/postcode.ts +9 -3
- package/au/state.ts +9 -3
- package/ca/postal-code.ts +10 -3
- package/ca/province.ts +23 -9
- package/ca/street-type.ts +9 -5
- package/country/country.ts +14 -8
- package/country/official-languages.ts +12 -4
- package/country/reference-data.ts +7 -3
- package/country/reference.ts +1 -1
- package/country/subdivision.ts +19 -8
- package/de/bundesland.ts +19 -6
- package/de/postleitzahl.ts +21 -7
- package/de/street-type.ts +14 -3
- package/fr/cedex.ts +15 -5
- package/fr/code-postal.ts +17 -4
- package/fr/departement.ts +18 -6
- package/fr/region.ts +23 -9
- package/fr/voie.ts +8 -4
- package/gb/country.ts +25 -9
- package/gb/postcode-area.ts +6 -2
- package/gb/postcode.ts +10 -3
- package/gb/street-type.ts +4 -2
- package/index.ts +1 -0
- package/jp/address-unit.ts +8 -4
- package/jp/postal-code.ts +7 -3
- package/jp/prefecture.ts +27 -10
- package/level-semantics.ts +55 -19
- package/nz/delivery-service.ts +43 -15
- package/nz/postcode.ts +9 -3
- package/out/address-system-conventions.d.ts +7 -1
- package/out/address-system-conventions.d.ts.map +1 -1
- package/out/address-system-conventions.js +7 -1
- package/out/address-system-conventions.js.map +1 -1
- package/out/au/delivery-service.d.ts +30 -10
- package/out/au/delivery-service.d.ts.map +1 -1
- package/out/au/delivery-service.js +7 -3
- package/out/au/delivery-service.js.map +1 -1
- package/out/au/level-designator.d.ts +27 -9
- package/out/au/level-designator.d.ts.map +1 -1
- package/out/au/level-designator.js +10 -6
- package/out/au/level-designator.js.map +1 -1
- package/out/au/postcode.d.ts +9 -3
- package/out/au/postcode.d.ts.map +1 -1
- package/out/au/postcode.js +9 -3
- package/out/au/postcode.js.map +1 -1
- package/out/au/state.d.ts +9 -3
- package/out/au/state.d.ts.map +1 -1
- package/out/au/state.js +6 -2
- package/out/au/state.js.map +1 -1
- package/out/ca/postal-code.d.ts +3 -1
- package/out/ca/postal-code.d.ts.map +1 -1
- package/out/ca/postal-code.js +9 -3
- package/out/ca/postal-code.js.map +1 -1
- package/out/ca/province.d.ts +18 -6
- package/out/ca/province.d.ts.map +1 -1
- package/out/ca/province.js +8 -4
- package/out/ca/province.js.map +1 -1
- package/out/ca/street-type.d.ts.map +1 -1
- package/out/ca/street-type.js +9 -5
- package/out/ca/street-type.js.map +1 -1
- package/out/country/country.d.ts +11 -7
- package/out/country/country.d.ts.map +1 -1
- package/out/country/country.js +7 -4
- package/out/country/country.js.map +1 -1
- package/out/country/official-languages.d.ts +12 -4
- package/out/country/official-languages.d.ts.map +1 -1
- package/out/country/official-languages.js +3 -1
- package/out/country/official-languages.js.map +1 -1
- package/out/country/reference-data.d.ts +6 -2
- package/out/country/reference-data.d.ts.map +1 -1
- package/out/country/reference-data.js +4 -2
- package/out/country/reference-data.js.map +1 -1
- package/out/country/reference.js +1 -1
- package/out/country/reference.js.map +1 -1
- package/out/country/subdivision.d.ts +12 -4
- package/out/country/subdivision.d.ts.map +1 -1
- package/out/country/subdivision.js +6 -4
- package/out/country/subdivision.js.map +1 -1
- package/out/de/bundesland.d.ts +18 -6
- package/out/de/bundesland.d.ts.map +1 -1
- package/out/de/bundesland.js +3 -1
- package/out/de/bundesland.js.map +1 -1
- package/out/de/postleitzahl.d.ts +21 -7
- package/out/de/postleitzahl.d.ts.map +1 -1
- package/out/de/postleitzahl.js +9 -3
- package/out/de/postleitzahl.js.map +1 -1
- package/out/de/street-type.d.ts +5 -4
- package/out/de/street-type.d.ts.map +1 -1
- package/out/de/street-type.js +10 -2
- package/out/de/street-type.js.map +1 -1
- package/out/fr/cedex.d.ts +15 -5
- package/out/fr/cedex.d.ts.map +1 -1
- package/out/fr/cedex.js +6 -2
- package/out/fr/cedex.js.map +1 -1
- package/out/fr/code-postal.d.ts +8 -11
- package/out/fr/code-postal.d.ts.map +1 -1
- package/out/fr/code-postal.js +24 -4
- package/out/fr/code-postal.js.map +1 -1
- package/out/fr/departement.d.ts +18 -6
- package/out/fr/departement.d.ts.map +1 -1
- package/out/fr/departement.js +3 -1
- package/out/fr/departement.js.map +1 -1
- package/out/fr/region.d.ts +18 -6
- package/out/fr/region.d.ts.map +1 -1
- package/out/fr/region.js +11 -5
- package/out/fr/region.js.map +1 -1
- package/out/fr/voie.d.ts +3 -1
- package/out/fr/voie.d.ts.map +1 -1
- package/out/fr/voie.js +3 -3
- package/out/fr/voie.js.map +1 -1
- package/out/gb/country.d.ts +18 -6
- package/out/gb/country.d.ts.map +1 -1
- package/out/gb/country.js +13 -5
- package/out/gb/country.js.map +1 -1
- package/out/gb/postcode-area.d.ts.map +1 -1
- package/out/gb/postcode-area.js +6 -2
- package/out/gb/postcode-area.js.map +1 -1
- package/out/gb/postcode.d.ts +3 -11
- package/out/gb/postcode.d.ts.map +1 -1
- package/out/gb/postcode.js +19 -3
- package/out/gb/postcode.js.map +1 -1
- package/out/gb/street-type.d.ts +3 -1
- package/out/gb/street-type.d.ts.map +1 -1
- package/out/gb/street-type.js +1 -1
- package/out/gb/street-type.js.map +1 -1
- package/out/index.d.ts.map +1 -1
- package/out/index.js.map +1 -1
- package/out/jp/address-unit.d.ts +6 -2
- package/out/jp/address-unit.d.ts.map +1 -1
- package/out/jp/address-unit.js +2 -2
- package/out/jp/address-unit.js.map +1 -1
- package/out/jp/postal-code.d.ts +6 -2
- package/out/jp/postal-code.d.ts.map +1 -1
- package/out/jp/postal-code.js +7 -3
- package/out/jp/postal-code.js.map +1 -1
- package/out/jp/prefecture.d.ts +24 -8
- package/out/jp/prefecture.d.ts.map +1 -1
- package/out/jp/prefecture.js +5 -3
- package/out/jp/prefecture.js.map +1 -1
- package/out/level-semantics.d.ts +48 -16
- package/out/level-semantics.d.ts.map +1 -1
- package/out/level-semantics.js +34 -12
- package/out/level-semantics.js.map +1 -1
- package/out/nz/delivery-service.d.ts +39 -13
- package/out/nz/delivery-service.d.ts.map +1 -1
- package/out/nz/delivery-service.js +16 -6
- package/out/nz/delivery-service.js.map +1 -1
- package/out/nz/postcode.d.ts +9 -3
- package/out/nz/postcode.d.ts.map +1 -1
- package/out/nz/postcode.js +9 -3
- package/out/nz/postcode.js.map +1 -1
- package/out/postcode-systems.d.ts +3 -1
- package/out/postcode-systems.d.ts.map +1 -1
- package/out/postcode-systems.js +1 -1
- package/out/postcode-systems.js.map +1 -1
- package/out/tools/build-country-surface-lexicon.js +26 -12
- package/out/tools/build-country-surface-lexicon.js.map +1 -1
- package/out/tools/export-country-surfaces.js.map +1 -1
- package/out/tools/generate-country-reference.d.ts +12 -4
- package/out/tools/generate-country-reference.d.ts.map +1 -1
- package/out/tools/generate-country-reference.js +10 -8
- package/out/tools/generate-country-reference.js.map +1 -1
- package/out/tools/generate-official-languages.d.ts +18 -6
- package/out/tools/generate-official-languages.d.ts.map +1 -1
- package/out/tools/generate-official-languages.js +9 -7
- package/out/tools/generate-official-languages.js.map +1 -1
- package/out/us/floor-designator.d.ts +15 -5
- package/out/us/floor-designator.d.ts.map +1 -1
- package/out/us/floor-designator.js +3 -1
- package/out/us/floor-designator.js.map +1 -1
- package/out/us/military-address.d.ts +36 -12
- package/out/us/military-address.d.ts.map +1 -1
- package/out/us/military-address.js +26 -15
- package/out/us/military-address.js.map +1 -1
- package/out/us/po-box.d.ts +9 -3
- package/out/us/po-box.d.ts.map +1 -1
- package/out/us/po-box.js +4 -2
- package/out/us/po-box.js.map +1 -1
- package/out/us/state.d.ts +6 -2
- package/out/us/state.d.ts.map +1 -1
- package/out/us/state.js +3 -1
- package/out/us/state.js.map +1 -1
- package/out/us/street-directional.d.ts +12 -3
- package/out/us/street-directional.d.ts.map +1 -1
- package/out/us/street-directional.js +8 -3
- package/out/us/street-directional.js.map +1 -1
- package/out/us/street-suffix.d.ts +24 -8
- package/out/us/street-suffix.d.ts.map +1 -1
- package/out/us/street-suffix.js +7 -3
- package/out/us/street-suffix.js.map +1 -1
- package/out/us/unit-designator.d.ts +24 -8
- package/out/us/unit-designator.d.ts.map +1 -1
- package/out/us/unit-designator.js +3 -1
- package/out/us/unit-designator.js.map +1 -1
- package/package.json +2 -2
- package/postcode-systems.ts +4 -2
- package/tools/build-country-surface-lexicon.ts +30 -12
- package/tools/export-country-surfaces.ts +2 -0
- package/tools/generate-country-reference.ts +27 -13
- package/tools/generate-official-languages.ts +27 -12
- package/us/floor-designator.ts +15 -5
- package/us/military-address.ts +53 -24
- package/us/po-box.ts +13 -5
- package/us/state.ts +6 -2
- package/us/street-directional.ts +14 -5
- package/us/street-suffix.ts +27 -9
- package/us/unit-designator.ts +25 -8
package/level-semantics.ts
CHANGED
|
@@ -91,17 +91,29 @@ export type LevelDesignatorKind =
|
|
|
91
91
|
| "special"
|
|
92
92
|
| "fixedOrdinal"
|
|
93
93
|
|
|
94
|
-
/**
|
|
94
|
+
/**
|
|
95
|
+
* One row of a per-language-family level-designator lexicon.
|
|
96
|
+
*/
|
|
95
97
|
export interface LevelDesignatorRow {
|
|
96
|
-
/**
|
|
98
|
+
/**
|
|
99
|
+
* Canonical designator key (the language's native canonical spelling, uppercase).
|
|
100
|
+
*/
|
|
97
101
|
code: string
|
|
98
|
-
/**
|
|
102
|
+
/**
|
|
103
|
+
* Human-readable name — the native word plus an English gloss in parentheses.
|
|
104
|
+
*/
|
|
99
105
|
name: string
|
|
100
|
-
/**
|
|
106
|
+
/**
|
|
107
|
+
* Recognized surface variants, including the canonical code itself and common ASCII-folded / abbreviated spellings.
|
|
108
|
+
*/
|
|
101
109
|
variants: readonly string[]
|
|
102
|
-
/**
|
|
110
|
+
/**
|
|
111
|
+
* How this designator maps to an ordinal — see {@link LevelDesignatorKind}.
|
|
112
|
+
*/
|
|
103
113
|
kind: LevelDesignatorKind
|
|
104
|
-
/**
|
|
114
|
+
/**
|
|
115
|
+
* True when a secondary number typically follows ("FL 3", "B 2"); false for standalone designators ("EG", "RDC").
|
|
116
|
+
*/
|
|
105
117
|
requiresNumber: boolean
|
|
106
118
|
/**
|
|
107
119
|
* Only present when `kind` is `"fixedOrdinal"` — the designator's own fixed ordinal, independent of any passed
|
|
@@ -158,7 +170,9 @@ export const EN_LEVEL_DESIGNATORS = [
|
|
|
158
170
|
{ code: "ROOF", name: "Roof", variants: ["ROOF", "RF"], kind: "special", requiresNumber: false },
|
|
159
171
|
] as const satisfies readonly LevelDesignatorRow[]
|
|
160
172
|
|
|
161
|
-
/**
|
|
173
|
+
/**
|
|
174
|
+
* French (France, and — for the vocabulary, not the numbering convention — Francophone Canada) floor/level vocabulary.
|
|
175
|
+
*/
|
|
162
176
|
export const FR_LEVEL_DESIGNATORS = [
|
|
163
177
|
{
|
|
164
178
|
code: "ÉTAGE",
|
|
@@ -190,7 +204,9 @@ export const FR_LEVEL_DESIGNATORS = [
|
|
|
190
204
|
},
|
|
191
205
|
] as const satisfies readonly LevelDesignatorRow[]
|
|
192
206
|
|
|
193
|
-
/**
|
|
207
|
+
/**
|
|
208
|
+
* German floor/level vocabulary (the -geschoss family).
|
|
209
|
+
*/
|
|
194
210
|
export const DE_LEVEL_DESIGNATORS = [
|
|
195
211
|
{
|
|
196
212
|
code: "OBERGESCHOSS",
|
|
@@ -273,7 +289,9 @@ export const ES_LEVEL_DESIGNATORS = [
|
|
|
273
289
|
},
|
|
274
290
|
] as const satisfies readonly LevelDesignatorRow[]
|
|
275
291
|
|
|
276
|
-
/**
|
|
292
|
+
/**
|
|
293
|
+
* Italian floor/level vocabulary.
|
|
294
|
+
*/
|
|
277
295
|
export const IT_LEVEL_DESIGNATORS = [
|
|
278
296
|
{ code: "PIANO", name: "Piano (Floor)", variants: ["PIANO"], kind: "numbered", requiresNumber: true },
|
|
279
297
|
{
|
|
@@ -299,7 +317,9 @@ export const IT_LEVEL_DESIGNATORS = [
|
|
|
299
317
|
},
|
|
300
318
|
] as const satisfies readonly LevelDesignatorRow[]
|
|
301
319
|
|
|
302
|
-
/**
|
|
320
|
+
/**
|
|
321
|
+
* Portuguese floor/level vocabulary.
|
|
322
|
+
*/
|
|
303
323
|
export const PT_LEVEL_DESIGNATORS = [
|
|
304
324
|
{ code: "ANDAR", name: "Andar (Floor)", variants: ["ANDAR"], kind: "numbered", requiresNumber: true },
|
|
305
325
|
{
|
|
@@ -312,7 +332,9 @@ export const PT_LEVEL_DESIGNATORS = [
|
|
|
312
332
|
{ code: "CAVE", name: "Cave (Basement)", variants: ["CAVE"], kind: "basement", requiresNumber: true },
|
|
313
333
|
] as const satisfies readonly LevelDesignatorRow[]
|
|
314
334
|
|
|
315
|
-
/**
|
|
335
|
+
/**
|
|
336
|
+
* Dutch floor/level vocabulary.
|
|
337
|
+
*/
|
|
316
338
|
export const NL_LEVEL_DESIGNATORS = [
|
|
317
339
|
{
|
|
318
340
|
code: "VERDIEPING",
|
|
@@ -344,7 +366,9 @@ export const JA_LEVEL_DESIGNATORS = [
|
|
|
344
366
|
{ code: "RF", name: "屋上 (Rooftop)", variants: ["RF", "屋上", "ROOFTOP"], kind: "special", requiresNumber: false },
|
|
345
367
|
] as const satisfies readonly LevelDesignatorRow[]
|
|
346
368
|
|
|
347
|
-
/**
|
|
369
|
+
/**
|
|
370
|
+
* Swedish floor/level vocabulary.
|
|
371
|
+
*/
|
|
348
372
|
export const SV_LEVEL_DESIGNATORS = [
|
|
349
373
|
{ code: "VÅNING", name: "Våning (Floor)", variants: ["VÅNING", "VANING"], kind: "numbered", requiresNumber: true },
|
|
350
374
|
{
|
|
@@ -379,7 +403,9 @@ export const NO_LEVEL_DESIGNATORS = [
|
|
|
379
403
|
{ code: "KJELLER", name: "Kjeller (Basement)", variants: ["KJELLER"], kind: "basement", requiresNumber: true },
|
|
380
404
|
] as const satisfies readonly LevelDesignatorRow[]
|
|
381
405
|
|
|
382
|
-
/**
|
|
406
|
+
/**
|
|
407
|
+
* Danish floor/level vocabulary. STUEN/STUEETAGE ("st.") is the standard ground-floor term seen on Danish addresses.
|
|
408
|
+
*/
|
|
383
409
|
export const DA_LEVEL_DESIGNATORS = [
|
|
384
410
|
{ code: "ETAGE", name: "Etage (Floor)", variants: ["ETAGE"], kind: "numbered", requiresNumber: true },
|
|
385
411
|
{
|
|
@@ -398,10 +424,14 @@ export const DA_LEVEL_DESIGNATORS = [
|
|
|
398
424
|
},
|
|
399
425
|
] as const satisfies readonly LevelDesignatorRow[]
|
|
400
426
|
|
|
401
|
-
/**
|
|
427
|
+
/**
|
|
428
|
+
* A bare language-family tag — the key into {@link LEVEL_DESIGNATORS_BY_FAMILY}.
|
|
429
|
+
*/
|
|
402
430
|
export type LevelLocaleFamily = "en" | "fr" | "de" | "es" | "it" | "pt" | "nl" | "ja" | "sv" | "no" | "da"
|
|
403
431
|
|
|
404
|
-
/**
|
|
432
|
+
/**
|
|
433
|
+
* Every language family's level-designator lexicon, keyed by bare language tag.
|
|
434
|
+
*/
|
|
405
435
|
export const LEVEL_DESIGNATORS_BY_FAMILY: Readonly<Record<LevelLocaleFamily, readonly LevelDesignatorRow[]>> = {
|
|
406
436
|
en: EN_LEVEL_DESIGNATORS,
|
|
407
437
|
fr: FR_LEVEL_DESIGNATORS,
|
|
@@ -434,7 +464,7 @@ const LEVEL_DESIGNATOR_LOOKUP_BY_FAMILY: ReadonlyMap<
|
|
|
434
464
|
const lookup = new Map<string, LevelDesignatorRow>()
|
|
435
465
|
|
|
436
466
|
for (const row of rows) {
|
|
437
|
-
if (row.variants.length
|
|
467
|
+
if (!row.variants.length) {
|
|
438
468
|
throw new Error(`[codex/level-semantics] family "${family}" designator "${row.code}" has no variants`)
|
|
439
469
|
}
|
|
440
470
|
|
|
@@ -468,7 +498,9 @@ const LEVEL_LOCALE_FAMILIES: ReadonlySet<LevelLocaleFamily> = new Set(
|
|
|
468
498
|
Object.keys(LEVEL_DESIGNATORS_BY_FAMILY) as LevelLocaleFamily[]
|
|
469
499
|
)
|
|
470
500
|
|
|
471
|
-
/**
|
|
501
|
+
/**
|
|
502
|
+
* BCP-47-ish language tags that fold into the Norwegian family (Bokmål, Nynorsk, and the deprecated macrolanguage tag).
|
|
503
|
+
*/
|
|
472
504
|
const NORWEGIAN_LANGUAGE_TAGS: ReadonlySet<string> = new Set(["no", "nb", "nn"])
|
|
473
505
|
|
|
474
506
|
/**
|
|
@@ -481,7 +513,9 @@ function splitLocaleTag(locale: string): { language: string; region: string | un
|
|
|
481
513
|
return { language: (language ?? "").toLowerCase(), region: region?.toUpperCase() }
|
|
482
514
|
}
|
|
483
515
|
|
|
484
|
-
/**
|
|
516
|
+
/**
|
|
517
|
+
* Resolve a BCP-47-ish locale tag to its {@link LevelLocaleFamily}, or `undefined` if this module has no lexicon for it.
|
|
518
|
+
*/
|
|
485
519
|
function localeFamily(locale: string): LevelLocaleFamily | undefined {
|
|
486
520
|
const { language } = splitLocaleTag(locale)
|
|
487
521
|
const family = NORWEGIAN_LANGUAGE_TAGS.has(language) ? "no" : language
|
|
@@ -568,7 +602,9 @@ export function lookupLevelDesignator(designator: string, locale: string): Level
|
|
|
568
602
|
return LEVEL_DESIGNATOR_LOOKUP_BY_FAMILY.get(family)?.get(designator.trim().toLowerCase())
|
|
569
603
|
}
|
|
570
604
|
|
|
571
|
-
/**
|
|
605
|
+
/**
|
|
606
|
+
* True when `input` is a recognized level designator (case-insensitive) in `locale`'s language family.
|
|
607
|
+
*/
|
|
572
608
|
export function isLevelDesignatorToken(input: unknown, locale: string): boolean {
|
|
573
609
|
return typeof input === "string" && lookupLevelDesignator(input, locale) !== undefined
|
|
574
610
|
}
|
package/nz/delivery-service.ts
CHANGED
|
@@ -42,14 +42,22 @@
|
|
|
42
42
|
* @see {@link https://www.nzpost.co.nz/personal/sending-in-nz/how-to-address-mail NZ Post — how to address mail}
|
|
43
43
|
*/
|
|
44
44
|
|
|
45
|
-
/**
|
|
45
|
+
/**
|
|
46
|
+
* Identifier requirement per ADV358's Delivery Service Elements rules.
|
|
47
|
+
*/
|
|
46
48
|
export type NzIdentifierRule = "required-if-allocated" | "optional" | "not-used"
|
|
47
49
|
|
|
48
|
-
/**
|
|
50
|
+
/**
|
|
51
|
+
* One Delivery Service Type row from ADV358.
|
|
52
|
+
*/
|
|
49
53
|
export interface NzDeliveryServiceType {
|
|
50
|
-
/**
|
|
54
|
+
/**
|
|
55
|
+
* The Delivery Service Type, verbatim casing per ADV358 ("PO Box", "Private Bag", "CMB").
|
|
56
|
+
*/
|
|
51
57
|
type: string
|
|
52
|
-
/**
|
|
58
|
+
/**
|
|
59
|
+
* The ADV358 description, verbatim.
|
|
60
|
+
*/
|
|
53
61
|
description: string
|
|
54
62
|
/**
|
|
55
63
|
* Identifier rule: PO Box/Response Bag/CMB identifiers are mandatory if allocated; Private Bag may legitimately have
|
|
@@ -59,7 +67,9 @@ export interface NzDeliveryServiceType {
|
|
|
59
67
|
identifier: NzIdentifierRule
|
|
60
68
|
}
|
|
61
69
|
|
|
62
|
-
/**
|
|
70
|
+
/**
|
|
71
|
+
* The six Delivery Service Types, verbatim from ADV358 (see the module header).
|
|
72
|
+
*/
|
|
63
73
|
export const NZ_DELIVERY_SERVICE_TYPES = [
|
|
64
74
|
{ type: "PO Box", description: "Post Box, PO Box", identifier: "required-if-allocated" },
|
|
65
75
|
{ type: "Private Bag", description: "Private Bag", identifier: "optional" },
|
|
@@ -81,7 +91,9 @@ export const NZ_DELIVERY_SERVICE_TYPES = [
|
|
|
81
91
|
},
|
|
82
92
|
] as const satisfies readonly NzDeliveryServiceType[]
|
|
83
93
|
|
|
84
|
-
/**
|
|
94
|
+
/**
|
|
95
|
+
* A canonical NZ Delivery Service Type.
|
|
96
|
+
*/
|
|
85
97
|
export type NzDeliveryServiceTypeName = (typeof NZ_DELIVERY_SERVICE_TYPES)[number]["type"]
|
|
86
98
|
|
|
87
99
|
/**
|
|
@@ -97,14 +109,18 @@ export type NzDeliveryServiceTypeName = (typeof NZ_DELIVERY_SERVICE_TYPES)[numbe
|
|
|
97
109
|
* treat it as a non-prescriptive form.
|
|
98
110
|
*/
|
|
99
111
|
export const NZ_PRIVATE_BOX_ALIAS = {
|
|
100
|
-
/**
|
|
112
|
+
/**
|
|
113
|
+
* The surface form as it appears on real mail and in postal-arena gold rows.
|
|
114
|
+
*/
|
|
101
115
|
type: "Private Box",
|
|
102
116
|
/**
|
|
103
117
|
* The description of validity status — NOT a valid ADV358 Delivery Service Type; a colloquial NZ synonym for a
|
|
104
118
|
* numbered PO Box (same format as "PO Box <number>").
|
|
105
119
|
*/
|
|
106
120
|
description: "Colloquial NZ synonym for a numbered PO Box — NOT a valid ADV358 Delivery Service Type",
|
|
107
|
-
/**
|
|
121
|
+
/**
|
|
122
|
+
* Identifier rule mirrors PO Box: a number is expected when the alias is used with one.
|
|
123
|
+
*/
|
|
108
124
|
identifier: "required-if-allocated" satisfies NzIdentifierRule,
|
|
109
125
|
/**
|
|
110
126
|
* True — this form is NOT valid per ADV358 or NZ Post's live standards pages (accessed 2026-06-11).
|
|
@@ -130,7 +146,9 @@ const TYPE_PATTERNS: ReadonlyArray<readonly [NzDeliveryServiceTypeName | "Privat
|
|
|
130
146
|
["Poste Restante", String.raw`poste\s+restante`],
|
|
131
147
|
]
|
|
132
148
|
|
|
133
|
-
/**
|
|
149
|
+
/**
|
|
150
|
+
* Extended type name union including the colloquial alias recognized for parsing.
|
|
151
|
+
*/
|
|
134
152
|
export type NzDeliveryServiceMatchTypeName = NzDeliveryServiceTypeName | "Private Box"
|
|
135
153
|
|
|
136
154
|
const IDENTIFIER_RULES = new Map<NzDeliveryServiceMatchTypeName, NzIdentifierRule>([
|
|
@@ -139,8 +157,10 @@ const IDENTIFIER_RULES = new Map<NzDeliveryServiceMatchTypeName, NzIdentifierRul
|
|
|
139
157
|
["Private Box", NZ_PRIVATE_BOX_ALIAS.identifier],
|
|
140
158
|
])
|
|
141
159
|
|
|
142
|
-
|
|
143
|
-
|
|
160
|
+
/**
|
|
161
|
+
* One anchored regex per type. The identifier shape follows ADV358 (alphanumeric, no spaces or separators — `24999`,
|
|
162
|
+
* `B99`); the identifier-less counter services take no tail at all.
|
|
163
|
+
*/
|
|
144
164
|
const MATCHERS: ReadonlyArray<{ type: NzDeliveryServiceMatchTypeName; re: RegExp }> = TYPE_PATTERNS.map(
|
|
145
165
|
([type, src]) => {
|
|
146
166
|
const rule = IDENTIFIER_RULES.get(type)!
|
|
@@ -150,9 +170,13 @@ const MATCHERS: ReadonlyArray<{ type: NzDeliveryServiceMatchTypeName; re: RegExp
|
|
|
150
170
|
}
|
|
151
171
|
)
|
|
152
172
|
|
|
153
|
-
/**
|
|
173
|
+
/**
|
|
174
|
+
* Result of an NZ delivery-service parse.
|
|
175
|
+
*/
|
|
154
176
|
export interface NzDeliveryServiceMatch {
|
|
155
|
-
/**
|
|
177
|
+
/**
|
|
178
|
+
* The designator phrase as it appeared ("PO Box", "private bag", "Private Box").
|
|
179
|
+
*/
|
|
156
180
|
matched: string
|
|
157
181
|
/**
|
|
158
182
|
* The canonical Delivery Service Type or recognized alias ("PO Box", "Private Bag", "CMB", …, "Private Box"). When
|
|
@@ -160,7 +184,9 @@ export interface NzDeliveryServiceMatch {
|
|
|
160
184
|
* type.
|
|
161
185
|
*/
|
|
162
186
|
type: NzDeliveryServiceMatchTypeName
|
|
163
|
-
/**
|
|
187
|
+
/**
|
|
188
|
+
* The Delivery Service Identifier when present ("24999", "B99").
|
|
189
|
+
*/
|
|
164
190
|
id?: string
|
|
165
191
|
/**
|
|
166
192
|
* True when the matched form is the colloquial "Private Box" alias — not a valid ADV358 Delivery Service Type. Absent
|
|
@@ -193,7 +219,9 @@ export function matchNzDeliveryService(input: unknown): NzDeliveryServiceMatch |
|
|
|
193
219
|
return null
|
|
194
220
|
}
|
|
195
221
|
|
|
196
|
-
/**
|
|
222
|
+
/**
|
|
223
|
+
* Type-predicate: does the input look like a standalone NZ delivery-service address line?
|
|
224
|
+
*/
|
|
197
225
|
export function isNzDeliveryService(input: unknown): boolean {
|
|
198
226
|
return matchNzDeliveryService(input) !== null
|
|
199
227
|
}
|
package/nz/postcode.ts
CHANGED
|
@@ -25,10 +25,14 @@ import type { Tagged } from "type-fest"
|
|
|
25
25
|
*/
|
|
26
26
|
export type NzPostcode = Tagged<string, "NzPostcode">
|
|
27
27
|
|
|
28
|
-
/**
|
|
28
|
+
/**
|
|
29
|
+
* The NZ postcode shape: exactly four digits.
|
|
30
|
+
*/
|
|
29
31
|
export const NZ_POSTCODE_PATTERN = /^\d{4}$/
|
|
30
32
|
|
|
31
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* Normalize a postcode surface form (trim only — NZ has no country-prefix courtesy form).
|
|
35
|
+
*/
|
|
32
36
|
export function normalizeNzPostcode(raw: unknown): NzPostcode | null {
|
|
33
37
|
if (typeof raw !== "string") return null
|
|
34
38
|
const s = raw.trim()
|
|
@@ -36,7 +40,9 @@ export function normalizeNzPostcode(raw: unknown): NzPostcode | null {
|
|
|
36
40
|
return NZ_POSTCODE_PATTERN.test(s) ? (s as NzPostcode) : null
|
|
37
41
|
}
|
|
38
42
|
|
|
39
|
-
/**
|
|
43
|
+
/**
|
|
44
|
+
* Type-predicate for a (normalized) New Zealand postcode.
|
|
45
|
+
*/
|
|
40
46
|
export function isNzPostcode(input: unknown): input is NzPostcode {
|
|
41
47
|
return typeof input === "string" && NZ_POSTCODE_PATTERN.test(input)
|
|
42
48
|
}
|
|
@@ -31,7 +31,13 @@ export interface AddressSystemConventions {
|
|
|
31
31
|
*/
|
|
32
32
|
readonly postcodePattern?: RegExp;
|
|
33
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* Per-address-system ordering and formatting conventions — which component leads a line, whether the postcode precedes
|
|
36
|
+
* the locality, and so on. Keyed by address system rather than country, since several share one.
|
|
37
|
+
*/
|
|
34
38
|
export declare const ADDRESS_SYSTEM_CONVENTIONS: Partial<Record<SystemCode, AddressSystemConventions>>;
|
|
35
|
-
/**
|
|
39
|
+
/**
|
|
40
|
+
* Look up conventions for a system. Absent row = no constraints KNOWN (parse unconstrained).
|
|
41
|
+
*/
|
|
36
42
|
export declare function conventionsForSystem(system: SystemCode | null | undefined): AddressSystemConventions | null;
|
|
37
43
|
//# sourceMappingURL=address-system-conventions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"address-system-conventions.d.ts","sourceRoot":"","sources":["../address-system-conventions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAEvD,MAAM,WAAW,wBAAwB;IACxC;;;OAGG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IAC1C;;;;OAIG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAA;CACjC;AAED,eAAO,MAAM,0BAA0B,EAAE,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,wBAAwB,CAAC,CAyC5F,CAAA;AAED
|
|
1
|
+
{"version":3,"file":"address-system-conventions.d.ts","sourceRoot":"","sources":["../address-system-conventions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAEvD,MAAM,WAAW,wBAAwB;IACxC;;;OAGG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IAC1C;;;;OAIG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAA;CACjC;AAED;;;GAGG;AACH,eAAO,MAAM,0BAA0B,EAAE,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,wBAAwB,CAAC,CAyC5F,CAAA;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,GAAG,SAAS,GAAG,wBAAwB,GAAG,IAAI,CAI3G"}
|
|
@@ -19,6 +19,10 @@
|
|
|
19
19
|
*/
|
|
20
20
|
import { CODE_POSTAL_PATTERN } from "./fr/code-postal.js";
|
|
21
21
|
import { UK_POSTCODE_PATTERN } from "./gb/postcode.js";
|
|
22
|
+
/**
|
|
23
|
+
* Per-address-system ordering and formatting conventions — which component leads a line, whether the postcode precedes
|
|
24
|
+
* the locality, and so on. Keyed by address system rather than country, since several share one.
|
|
25
|
+
*/
|
|
22
26
|
export const ADDRESS_SYSTEM_CONVENTIONS = {
|
|
23
27
|
/**
|
|
24
28
|
* France (La Poste / AFNOR NF Z 10-011): the street TYPE is a LEADING particle of the street name ("Rue de Rivoli",
|
|
@@ -60,7 +64,9 @@ export const ADDRESS_SYSTEM_CONVENTIONS = {
|
|
|
60
64
|
postcodePattern: UK_POSTCODE_PATTERN,
|
|
61
65
|
},
|
|
62
66
|
};
|
|
63
|
-
/**
|
|
67
|
+
/**
|
|
68
|
+
* Look up conventions for a system. Absent row = no constraints KNOWN (parse unconstrained).
|
|
69
|
+
*/
|
|
64
70
|
export function conventionsForSystem(system) {
|
|
65
71
|
if (!system)
|
|
66
72
|
return null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"address-system-conventions.js","sourceRoot":"","sources":["../address-system-conventions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AAiBtD,MAAM,CAAC,MAAM,0BAA0B,GAA0D;IAChG;;;;;;;;;;;;;;;;;OAiBG;IACH,EAAE,EAAE;QACH,aAAa,EAAE,CAAC,eAAe,CAAC;QAChC,eAAe,EAAE,mBAAmB;KACpC;IAED;;;;;;;;;;;;;OAaG;IACH,EAAE,EAAE;QACH,eAAe,EAAE,mBAAmB;KACpC;CACD,CAAA;AAED
|
|
1
|
+
{"version":3,"file":"address-system-conventions.js","sourceRoot":"","sources":["../address-system-conventions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AAiBtD;;;GAGG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAA0D;IAChG;;;;;;;;;;;;;;;;;OAiBG;IACH,EAAE,EAAE;QACH,aAAa,EAAE,CAAC,eAAe,CAAC;QAChC,eAAe,EAAE,mBAAmB;KACpC;IAED;;;;;;;;;;;;;OAaG;IACH,EAAE,EAAE;QACH,eAAe,EAAE,mBAAmB;KACpC;CACD,CAAA;AAED;;GAEG;AACH,MAAM,UAAU,oBAAoB,CAAC,MAAqC;IACzE,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,CAAA;IAExB,OAAO,0BAA0B,CAAC,MAAM,CAAC,IAAI,IAAI,CAAA;AAClD,CAAC"}
|
|
@@ -39,11 +39,17 @@
|
|
|
39
39
|
* @see {@link https://auspost.com.au/receiving/manage-your-mail/po-boxes-and-private-bags Australia Post — PO Boxes and Private Bags}
|
|
40
40
|
* @see {@link https://auspost.com.au/business/business-admin/po-boxes-and-locked-bags Australia Post — business PO Boxes, GPO Boxes and Locked Bags}
|
|
41
41
|
*/
|
|
42
|
-
/**
|
|
42
|
+
/**
|
|
43
|
+
* One Postal Delivery Type row from the Australia Post AMAS abbreviation table.
|
|
44
|
+
*/
|
|
43
45
|
export interface AuDeliveryServiceDesignator {
|
|
44
|
-
/**
|
|
46
|
+
/**
|
|
47
|
+
* The full Postal Delivery Type name, verbatim from the table (uppercase as published).
|
|
48
|
+
*/
|
|
45
49
|
name: string;
|
|
46
|
-
/**
|
|
50
|
+
/**
|
|
51
|
+
* The standard abbreviation — the surface form written on mail ("GPO BOX", "LOCKED BAG").
|
|
52
|
+
*/
|
|
47
53
|
abbreviation: string;
|
|
48
54
|
/**
|
|
49
55
|
* Whether the designator "must have an associated number for a match to occur" (AMAS rule; exceptions are Care of
|
|
@@ -133,17 +139,29 @@ export declare const AU_DELIVERY_SERVICE_DESIGNATORS: readonly [{
|
|
|
133
139
|
readonly requiresNumber: true;
|
|
134
140
|
readonly legacy: true;
|
|
135
141
|
}];
|
|
136
|
-
/**
|
|
142
|
+
/**
|
|
143
|
+
* A canonical Australia Post Postal Delivery Type abbreviation.
|
|
144
|
+
*/
|
|
137
145
|
export type AuDeliveryServiceAbbreviation = (typeof AU_DELIVERY_SERVICE_DESIGNATORS)[number]["abbreviation"];
|
|
138
|
-
/**
|
|
146
|
+
/**
|
|
147
|
+
* Result of an AU delivery-service parse.
|
|
148
|
+
*/
|
|
139
149
|
export interface AuDeliveryServiceMatch {
|
|
140
|
-
/**
|
|
150
|
+
/**
|
|
151
|
+
* The designator phrase as it appeared ("G.P.O. Box", "Locked Bag").
|
|
152
|
+
*/
|
|
141
153
|
matched: string;
|
|
142
|
-
/**
|
|
154
|
+
/**
|
|
155
|
+
* The canonical Postal Delivery Type abbreviation ("GPO BOX", "LOCKED BAG").
|
|
156
|
+
*/
|
|
143
157
|
designator: AuDeliveryServiceAbbreviation;
|
|
144
|
-
/**
|
|
158
|
+
/**
|
|
159
|
+
* The delivery-service number when present ("9999", "4600").
|
|
160
|
+
*/
|
|
145
161
|
id?: string;
|
|
146
|
-
/**
|
|
162
|
+
/**
|
|
163
|
+
* True when the designator is an AMAS-only legacy form (see the table).
|
|
164
|
+
*/
|
|
147
165
|
legacy: boolean;
|
|
148
166
|
}
|
|
149
167
|
/**
|
|
@@ -152,7 +170,9 @@ export interface AuDeliveryServiceMatch {
|
|
|
152
170
|
* Box", which Australia Post explicitly calls out as not a valid type.
|
|
153
171
|
*/
|
|
154
172
|
export declare function matchAuDeliveryService(input: unknown): AuDeliveryServiceMatch | null;
|
|
155
|
-
/**
|
|
173
|
+
/**
|
|
174
|
+
* Type-predicate: does the input look like a standalone AU delivery-service address line?
|
|
175
|
+
*/
|
|
156
176
|
export declare function isAuDeliveryService(input: unknown): boolean;
|
|
157
177
|
/**
|
|
158
178
|
* Normalize a recognized delivery-service phrase to the canonical AMAS form (`"g.p.o. box 123"` → `"GPO BOX 123"`).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delivery-service.d.ts","sourceRoot":"","sources":["../../au/delivery-service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH
|
|
1
|
+
{"version":3,"file":"delivery-service.d.ts","sourceRoot":"","sources":["../../au/delivery-service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC3C;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,YAAY,EAAE,MAAM,CAAA;IACpB;;;OAGG;IACH,cAAc,EAAE,OAAO,CAAA;IACvB;;;;;OAKG;IACH,MAAM,EAAE,OAAO,CAAA;CACf;AAED;;;GAGG;AACH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAee,CAAA;AAE3D;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,CAAC,OAAO,+BAA+B,CAAC,CAAC,MAAM,CAAC,CAAC,cAAc,CAAC,CAAA;AA4C5G;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACtC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,UAAU,EAAE,6BAA6B,CAAA;IACzC;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,MAAM,EAAE,OAAO,CAAA;CACf;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,sBAAsB,GAAG,IAAI,CAkBpF;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAE3D;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAMhE"}
|
|
@@ -83,8 +83,10 @@ const DESIGNATOR_PATTERNS = [
|
|
|
83
83
|
["MS", String.raw `mail\s+service|ms`],
|
|
84
84
|
];
|
|
85
85
|
const DESIGNATOR_INFO = new Map(AU_DELIVERY_SERVICE_DESIGNATORS.map((d) => [d.abbreviation, { requiresNumber: d.requiresNumber, legacy: d.legacy }]));
|
|
86
|
-
|
|
87
|
-
|
|
86
|
+
/**
|
|
87
|
+
* One anchored regex per designator: phrase + (required|optional) identifier. The id shape matches the US slice
|
|
88
|
+
* ([\dA-Za-z][\dA-Za-z-]*); MS additionally requires a digit-leading id (see above).
|
|
89
|
+
*/
|
|
88
90
|
const MATCHERS = DESIGNATOR_PATTERNS.map(([abbreviation, src]) => {
|
|
89
91
|
const { requiresNumber } = DESIGNATOR_INFO.get(abbreviation);
|
|
90
92
|
const id = abbreviation === "MS" ? String.raw `(\d[\dA-Za-z-]*)` : String.raw `([\dA-Za-z][\dA-Za-z-]*)`;
|
|
@@ -113,7 +115,9 @@ export function matchAuDeliveryService(input) {
|
|
|
113
115
|
}
|
|
114
116
|
return null;
|
|
115
117
|
}
|
|
116
|
-
/**
|
|
118
|
+
/**
|
|
119
|
+
* Type-predicate: does the input look like a standalone AU delivery-service address line?
|
|
120
|
+
*/
|
|
117
121
|
export function isAuDeliveryService(input) {
|
|
118
122
|
return matchAuDeliveryService(input) !== null;
|
|
119
123
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delivery-service.js","sourceRoot":"","sources":["../../au/delivery-service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;
|
|
1
|
+
{"version":3,"file":"delivery-service.js","sourceRoot":"","sources":["../../au/delivery-service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AA4BH;;;GAGG;AACH,MAAM,CAAC,MAAM,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AC,CAAC,CAAE,CAAC,IAAI,EAAE;YACrB,UAAU,EAAE,YAAY;YACxB,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAC7B,MAAM,EAAE,IAAI,CAAC,MAAM;SACnB,CAAA;IACF,CAAC;IAED,OAAO,IAAI,CAAA;AACZ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAAC,KAAc;IACjD,OAAO,sBAAsB,CAAC,KAAK,CAAC,KAAK,IAAI,CAAA;AAC9C,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,0BAA0B,CAAC,KAAa;IACvD,MAAM,CAAC,GAAG,sBAAsB,CAAC,KAAK,CAAC,CAAA;IAEvC,IAAI,CAAC,CAAC;QAAE,OAAO,KAAK,CAAA;IAEpB,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC,EAAE,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAA;AACrE,CAAC"}
|
|
@@ -44,11 +44,17 @@
|
|
|
44
44
|
* identifier from standalone ones.
|
|
45
45
|
*/
|
|
46
46
|
export interface AuLevelDesignator {
|
|
47
|
-
/**
|
|
47
|
+
/**
|
|
48
|
+
* AS 4590.1 LEVEL_TYPE_CODE (the GNAF / AMAS internal code).
|
|
49
|
+
*/
|
|
48
50
|
code: string;
|
|
49
|
-
/**
|
|
51
|
+
/**
|
|
52
|
+
* Full descriptive name (AMAS table label).
|
|
53
|
+
*/
|
|
50
54
|
name: string;
|
|
51
|
-
/**
|
|
55
|
+
/**
|
|
56
|
+
* The approved AMAS surface abbreviation written on mail ("L", "B", "M").
|
|
57
|
+
*/
|
|
52
58
|
abbreviation: string;
|
|
53
59
|
/**
|
|
54
60
|
* True when the designator takes a numeric or alphanumeric floor identifier after it (`LEVEL 3`, `BASEMENT 2`). False
|
|
@@ -106,7 +112,9 @@ export declare const AU_LEVEL_DESIGNATORS: readonly [{
|
|
|
106
112
|
readonly abbreviation: "RT";
|
|
107
113
|
readonly requiresNumber: false;
|
|
108
114
|
}];
|
|
109
|
-
/**
|
|
115
|
+
/**
|
|
116
|
+
* A canonical AS 4590.1 LEVEL_TYPE_CODE.
|
|
117
|
+
*/
|
|
110
118
|
export type AuLevelCode = (typeof AU_LEVEL_DESIGNATORS)[number]["code"];
|
|
111
119
|
/**
|
|
112
120
|
* Recognized surface variants for each AMAS level code — the canonical code/abbreviation pair PLUS additional forms
|
|
@@ -121,13 +129,21 @@ export declare const AU_LEVEL_DESIGNATOR_VARIANTS: Readonly<Record<AuLevelCode,
|
|
|
121
129
|
* case-insensitive matching (`"level"` → `"L"`, `"bsmt"` → `"B"`).
|
|
122
130
|
*/
|
|
123
131
|
export declare const AU_LEVEL_DESIGNATOR_LOOKUP: ReadonlyMap<string, AuLevelCode>;
|
|
124
|
-
/**
|
|
132
|
+
/**
|
|
133
|
+
* Result of an AU level designator parse.
|
|
134
|
+
*/
|
|
125
135
|
export interface AuLevelDesignatorMatch {
|
|
126
|
-
/**
|
|
136
|
+
/**
|
|
137
|
+
* The code as it appeared in the input ("Level", "L", "lvl").
|
|
138
|
+
*/
|
|
127
139
|
matched: string;
|
|
128
|
-
/**
|
|
140
|
+
/**
|
|
141
|
+
* The canonical AS 4590.1 LEVEL_TYPE_CODE ("L", "B", "M").
|
|
142
|
+
*/
|
|
129
143
|
code: AuLevelCode;
|
|
130
|
-
/**
|
|
144
|
+
/**
|
|
145
|
+
* The floor identifier when present ("3", "G", "B2").
|
|
146
|
+
*/
|
|
131
147
|
identifier?: string;
|
|
132
148
|
}
|
|
133
149
|
/**
|
|
@@ -137,7 +153,9 @@ export interface AuLevelDesignatorMatch {
|
|
|
137
153
|
* constraint.
|
|
138
154
|
*/
|
|
139
155
|
export declare function matchAuLevelDesignator(input: unknown): AuLevelDesignatorMatch | null;
|
|
140
|
-
/**
|
|
156
|
+
/**
|
|
157
|
+
* Type-predicate: does the input look like a standalone AU level designator phrase?
|
|
158
|
+
*/
|
|
141
159
|
export declare function isAuLevelDesignator(input: unknown): boolean;
|
|
142
160
|
/**
|
|
143
161
|
* Normalize a recognized level phrase to the AMAS canonical form (`"level 3"` → `"L 3"`, `"ground floor"` → `"G"`).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"level-designator.d.ts","sourceRoot":"","sources":["../../au/level-designator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH;;;;;;GAMG;AACH,MAAM,WAAW,iBAAiB;IACjC
|
|
1
|
+
{"version":3,"file":"level-designator.d.ts","sourceRoot":"","sources":["../../au/level-designator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH;;;;;;GAMG;AACH,MAAM,WAAW,iBAAiB;IACjC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,YAAY,EAAE,MAAM,CAAA;IACpB;;;OAGG;IACH,cAAc,EAAE,OAAO,CAAA;CACvB;AAED;;;GAGG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUgB,CAAA;AAEjD;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAA;AAEvE;;;;;;GAMG;AACH,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,MAAM,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC,CAUzF,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,0BAA0B,EAAE,WAAW,CAAC,MAAM,EAAE,WAAW,CAiCpE,CAAA;AAEJ;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACtC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,IAAI,EAAE,WAAW,CAAA;IACjB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;CACnB;AA2BD;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,sBAAsB,GAAG,IAAI,CAgBpF;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAE3D;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAOhE"}
|
|
@@ -79,7 +79,7 @@ export const AU_LEVEL_DESIGNATOR_LOOKUP = (() => {
|
|
|
79
79
|
// lexicon (the "builder must round-trip loud" rule from the task contract).
|
|
80
80
|
for (const { code } of AU_LEVEL_DESIGNATORS) {
|
|
81
81
|
const variants = AU_LEVEL_DESIGNATOR_VARIANTS[code];
|
|
82
|
-
if (!variants || variants.length
|
|
82
|
+
if (!variants || !variants.length) {
|
|
83
83
|
throw new Error(`[codex/au/level-designator] code "${code}" has no variants in AU_LEVEL_DESIGNATOR_VARIANTS`);
|
|
84
84
|
}
|
|
85
85
|
for (const v of variants) {
|
|
@@ -99,14 +99,16 @@ export const AU_LEVEL_DESIGNATOR_LOOKUP = (() => {
|
|
|
99
99
|
}
|
|
100
100
|
return out;
|
|
101
101
|
})();
|
|
102
|
-
|
|
103
|
-
|
|
102
|
+
/**
|
|
103
|
+
* One regex per level code. Multi-word variants ("LOWER GROUND", "GROUND FLOOR") are matched before their shorter
|
|
104
|
+
* constituents by ordering the variant list longest-first within each code.
|
|
105
|
+
*/
|
|
104
106
|
const LEVEL_MATCHERS = (() => {
|
|
105
107
|
const rows = [];
|
|
106
108
|
for (const { code, requiresNumber } of AU_LEVEL_DESIGNATORS) {
|
|
107
109
|
const variants = [...AU_LEVEL_DESIGNATOR_VARIANTS[code]]
|
|
108
|
-
.
|
|
109
|
-
.map((v) => v.
|
|
110
|
+
.toSorted((a, b) => b.length - a.length)
|
|
111
|
+
.map((v) => v.replaceAll(/[.*+?^${}()|[\]\\]/g, "\\$&").replaceAll(/\s+/g, String.raw `\s+`));
|
|
110
112
|
const alts = variants.join("|");
|
|
111
113
|
// Identifier: optional alphanumeric (B2, 12, G). requiresNumber=true → identifier required.
|
|
112
114
|
const tail = requiresNumber
|
|
@@ -137,7 +139,9 @@ export function matchAuLevelDesignator(input) {
|
|
|
137
139
|
}
|
|
138
140
|
return null;
|
|
139
141
|
}
|
|
140
|
-
/**
|
|
142
|
+
/**
|
|
143
|
+
* Type-predicate: does the input look like a standalone AU level designator phrase?
|
|
144
|
+
*/
|
|
141
145
|
export function isAuLevelDesignator(input) {
|
|
142
146
|
return matchAuLevelDesignator(input) !== null;
|
|
143
147
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"level-designator.js","sourceRoot":"","sources":["../../au/level-designator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;
|
|
1
|
+
{"version":3,"file":"level-designator.js","sourceRoot":"","sources":["../../au/level-designator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AA6BH;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IACnC,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,GAAG,EAAE,cAAc,EAAE,IAAI,EAAE;IACrE,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,YAAY,EAAE,GAAG,EAAE,cAAc,EAAE,KAAK,EAAE;IACvE,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,YAAY,EAAE,GAAG,EAAE,cAAc,EAAE,IAAI,E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