@mailwoman/react 7.8.0 → 8.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.
- package/common/PresetChips.tsx +7 -0
- package/out/common/PresetChips.d.ts +7 -0
- package/out/common/PresetChips.d.ts.map +1 -1
- package/out/common/PresetChips.js.map +1 -1
- package/out/pipeline/presets.d.ts.map +1 -1
- package/out/pipeline/presets.js +24 -9
- package/out/pipeline/presets.js.map +1 -1
- package/package.json +12 -11
- package/pipeline/presets.ts +24 -9
package/common/PresetChips.tsx
CHANGED
|
@@ -12,6 +12,13 @@ import type { ReactNode } from "react"
|
|
|
12
12
|
export interface Preset {
|
|
13
13
|
label: string
|
|
14
14
|
value: string
|
|
15
|
+
/**
|
|
16
|
+
* ISO country code for the placetype-pair country pin (#1278 phase 2's `{country}` override). Optional: a host that
|
|
17
|
+
* wires the pair prior hands this to `selectPairIndexForText` when the input still equals this preset's text, so a
|
|
18
|
+
* locale structural routing can't detect (NZ's 4-digit postcode isn't distinctive) still fires the dependent_locality
|
|
19
|
+
* prior. Purely descriptive to `PresetChips` itself (which only emits `value`).
|
|
20
|
+
*/
|
|
21
|
+
country?: string
|
|
15
22
|
}
|
|
16
23
|
|
|
17
24
|
export interface PresetChipsProps {
|
|
@@ -10,6 +10,13 @@ import type { ReactNode } from "react";
|
|
|
10
10
|
export interface Preset {
|
|
11
11
|
label: string;
|
|
12
12
|
value: string;
|
|
13
|
+
/**
|
|
14
|
+
* ISO country code for the placetype-pair country pin (#1278 phase 2's `{country}` override). Optional: a host that
|
|
15
|
+
* wires the pair prior hands this to `selectPairIndexForText` when the input still equals this preset's text, so a
|
|
16
|
+
* locale structural routing can't detect (NZ's 4-digit postcode isn't distinctive) still fires the dependent_locality
|
|
17
|
+
* prior. Purely descriptive to `PresetChips` itself (which only emits `value`).
|
|
18
|
+
*/
|
|
19
|
+
country?: string;
|
|
13
20
|
}
|
|
14
21
|
export interface PresetChipsProps {
|
|
15
22
|
presets: ReadonlyArray<Preset>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PresetChips.d.ts","sourceRoot":"","sources":["../../common/PresetChips.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,MAAM,WAAW,MAAM;IACtB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"PresetChips.d.ts","sourceRoot":"","sources":["../../common/PresetChips.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,MAAM,WAAW,MAAM;IACtB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,gBAAgB;IAChC,OAAO,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;IAC9B,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,qCAAqC;IACrC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,kHAAkH;IAClH,QAAQ,CAAC,EAAE,SAAS,CAAA;CACpB;AAED,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAgB,EAAE,QAAQ,EAAE,EAAE,gBAAgB,GAAG,SAAS,CAmBlH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PresetChips.js","sourceRoot":"","sources":["../../common/PresetChips.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"PresetChips.js","sourceRoot":"","sources":["../../common/PresetChips.tsx"],"names":[],"mappings":";AAiCA,MAAM,UAAU,WAAW,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,GAAG,MAAM,EAAE,QAAQ,EAAoB;IACtG,OAAO,CACN,eAAK,SAAS,EAAC,YAAY,aAC1B,eAAM,SAAS,EAAC,mBAAmB,YAAE,OAAO,GAAQ,EACnD,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CACxB,iBAEC,IAAI,EAAC,QAAQ,EACb,SAAS,EAAC,SAAS,EACnB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,EACnC,KAAK,EAAE,MAAM,CAAC,KAAK,YAElB,MAAM,CAAC,KAAK,IAPR,MAAM,CAAC,KAAK,CAQT,CACT,CAAC,EACD,QAAQ,IACJ,CACN,CAAA;AACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presets.d.ts","sourceRoot":"","sources":["../../pipeline/presets.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AAEvD,eAAO,MAAM,wBAAwB,mDAAmD,CAAA;
|
|
1
|
+
{"version":3,"file":"presets.d.ts","sourceRoot":"","sources":["../../pipeline/presets.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AAEvD,eAAO,MAAM,wBAAwB,mDAAmD,CAAA;AAKxF,eAAO,MAAM,gBAAgB,EAAE,aAAa,CAAC,MAAM,CAsBlD,CAAA"}
|
package/out/pipeline/presets.js
CHANGED
|
@@ -7,15 +7,30 @@
|
|
|
7
7
|
* mirror the docs demo's set so the extracted component looks identical out of the box.
|
|
8
8
|
*/
|
|
9
9
|
export const PIPELINE_DEFAULT_ADDRESS = "1600 Pennsylvania Ave NW, Washington, DC 20500";
|
|
10
|
+
// `country` mirrors the docs `EXAMPLE_ADDRESSES` set (kept in parity) — the placetype-pair country pin (#1278 phase 2's
|
|
11
|
+
// `{country}` override). A host that wires the pair prior pins the country while the input equals the preset text, so a
|
|
12
|
+
// locale structural routing can't detect (NZ) still fires; free-typed input drops to structural detection.
|
|
10
13
|
export const PIPELINE_PRESETS = [
|
|
11
|
-
{ label: "White House", value: "1600 Pennsylvania Ave NW, Washington, DC 20500" },
|
|
12
|
-
{ label: "Apple Park", value: "1 Apple Park Way, Cupertino, CA 95014" },
|
|
13
|
-
{ label: "30 Rockefeller Plaza", value: "30 Rockefeller Plaza, New York, NY 10112" },
|
|
14
|
-
{ label: "Pier 39 SF", value: "Pier 39, San Francisco, CA 94133" },
|
|
15
|
-
{ label: "Wrigley Field", value: "1060 W Addison St, Chicago, IL 60613" },
|
|
16
|
-
{ label: "Space Needle", value: "400 Broad St, Seattle, WA 98109" },
|
|
17
|
-
{ label: "ZIP only", value: "90210" },
|
|
18
|
-
{ label: "Berlin (native order)", value: "Straußstraße 27, 12623 Berlin" },
|
|
19
|
-
{ label: "Paris (street fall-through)", value: "181 Rue du Chevaleret, Paris" },
|
|
14
|
+
{ label: "White House", value: "1600 Pennsylvania Ave NW, Washington, DC 20500", country: "us" },
|
|
15
|
+
{ label: "Apple Park", value: "1 Apple Park Way, Cupertino, CA 95014", country: "us" },
|
|
16
|
+
{ label: "30 Rockefeller Plaza", value: "30 Rockefeller Plaza, New York, NY 10112", country: "us" },
|
|
17
|
+
{ label: "Pier 39 SF", value: "Pier 39, San Francisco, CA 94133", country: "us" },
|
|
18
|
+
{ label: "Wrigley Field", value: "1060 W Addison St, Chicago, IL 60613", country: "us" },
|
|
19
|
+
{ label: "Space Needle", value: "400 Broad St, Seattle, WA 98109", country: "us" },
|
|
20
|
+
{ label: "ZIP only", value: "90210", country: "us" },
|
|
21
|
+
{ label: "Berlin (native order)", value: "Straußstraße 27, 12623 Berlin", country: "de" },
|
|
22
|
+
{ label: "Paris (street fall-through)", value: "181 Rue du Chevaleret, Paris", country: "fr" },
|
|
23
|
+
// GB dependent_locality (placetype-pair-prior arc) — "Henbury" flips to dependent_locality via the en-gb pair-index
|
|
24
|
+
// prior; the UK postcode is also structurally detectable (parity with docs EXAMPLE_ADDRESSES).
|
|
25
|
+
{
|
|
26
|
+
label: "Macclesfield (GB dependent_locality)",
|
|
27
|
+
value: "41 Hightree Drive, Henbury, Macclesfield, SK11 9PD",
|
|
28
|
+
country: "gb",
|
|
29
|
+
},
|
|
30
|
+
// NZ dependent_locality (en-nz pair-prior arc) — Plimmerton is a suburb (dependent_locality) of Porirua. Postcode
|
|
31
|
+
// DELIBERATELY OMITTED: a trailing "Porirua 5026" folds "porirua 5026" in segment mode and misses the index's bare
|
|
32
|
+
// "porirua" key (tracked as #1308). The `country: "nz"` pin is load-bearing — locale-gate can't structurally detect
|
|
33
|
+
// NZ (4-digit postcode isn't distinctive), so only the pin selects the nz index; free-typed NZ stays unfired.
|
|
34
|
+
{ label: "Plimmerton (NZ dependent_locality)", value: "35 Steyne Avenue, Plimmerton, Porirua", country: "nz" },
|
|
20
35
|
];
|
|
21
36
|
//# sourceMappingURL=presets.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presets.js","sourceRoot":"","sources":["../../pipeline/presets.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,MAAM,CAAC,MAAM,wBAAwB,GAAG,gDAAgD,CAAA;AAExF,MAAM,CAAC,MAAM,gBAAgB,GAA0B;IACtD,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,gDAAgD,EAAE;
|
|
1
|
+
{"version":3,"file":"presets.js","sourceRoot":"","sources":["../../pipeline/presets.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,MAAM,CAAC,MAAM,wBAAwB,GAAG,gDAAgD,CAAA;AAExF,wHAAwH;AACxH,wHAAwH;AACxH,2GAA2G;AAC3G,MAAM,CAAC,MAAM,gBAAgB,GAA0B;IACtD,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,gDAAgD,EAAE,OAAO,EAAE,IAAI,EAAE;IAChG,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,uCAAuC,EAAE,OAAO,EAAE,IAAI,EAAE;IACtF,EAAE,KAAK,EAAE,sBAAsB,EAAE,KAAK,EAAE,0CAA0C,EAAE,OAAO,EAAE,IAAI,EAAE;IACnG,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,kCAAkC,EAAE,OAAO,EAAE,IAAI,EAAE;IACjF,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,sCAAsC,EAAE,OAAO,EAAE,IAAI,EAAE;IACxF,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,iCAAiC,EAAE,OAAO,EAAE,IAAI,EAAE;IAClF,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;IACpD,EAAE,KAAK,EAAE,uBAAuB,EAAE,KAAK,EAAE,+BAA+B,EAAE,OAAO,EAAE,IAAI,EAAE;IACzF,EAAE,KAAK,EAAE,6BAA6B,EAAE,KAAK,EAAE,8BAA8B,EAAE,OAAO,EAAE,IAAI,EAAE;IAC9F,oHAAoH;IACpH,+FAA+F;IAC/F;QACC,KAAK,EAAE,sCAAsC;QAC7C,KAAK,EAAE,oDAAoD;QAC3D,OAAO,EAAE,IAAI;KACb;IACD,kHAAkH;IAClH,mHAAmH;IACnH,oHAAoH;IACpH,8GAA8G;IAC9G,EAAE,KAAK,EAAE,oCAAoC,EAAE,KAAK,EAAE,uCAAuC,EAAE,OAAO,EAAE,IAAI,EAAE;CAC9G,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mailwoman/react",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0",
|
|
4
4
|
"description": "React components + headless hooks for mailwoman — parse/geocode/POI explorers, Storybook-tested, Docusaurus-independent.",
|
|
5
5
|
"license": "AGPL-3.0-only OR LicenseRef-Commercial",
|
|
6
6
|
"repository": {
|
|
@@ -67,24 +67,25 @@
|
|
|
67
67
|
"test:node": "vitest run --config vitest.node.config.ts"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@mailwoman/kind-classifier": "
|
|
71
|
-
"@mailwoman/poi-taxonomy": "
|
|
72
|
-
"@mailwoman/query-shape": "
|
|
70
|
+
"@mailwoman/kind-classifier": "8.0.0",
|
|
71
|
+
"@mailwoman/poi-taxonomy": "8.0.0",
|
|
72
|
+
"@mailwoman/query-shape": "8.0.0"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
|
-
"@storybook/addon-docs": "^10.5.
|
|
76
|
-
"@storybook/react-vite": "^10.5.
|
|
75
|
+
"@storybook/addon-docs": "^10.5.4",
|
|
76
|
+
"@storybook/react-vite": "^10.5.4",
|
|
77
77
|
"@types/react": "^19.2.17",
|
|
78
78
|
"@types/react-dom": "^19.2.3",
|
|
79
|
-
"@vitejs/plugin-react": "^6.0.
|
|
79
|
+
"@vitejs/plugin-react": "^6.0.4",
|
|
80
80
|
"@vitest/browser": "4.1.10",
|
|
81
81
|
"@vitest/browser-playwright": "4.1.10",
|
|
82
82
|
"maplibre-gl": "^5.24.0",
|
|
83
|
-
"playwright": "^1.
|
|
84
|
-
"react": "^19.2.
|
|
85
|
-
"react-dom": "^19.2.
|
|
83
|
+
"playwright": "^1.62.0",
|
|
84
|
+
"react": "^19.2.8",
|
|
85
|
+
"react-dom": "^19.2.8",
|
|
86
86
|
"react-map-gl": "^8.1.1",
|
|
87
|
-
"storybook": "^10.5.
|
|
87
|
+
"storybook": "^10.5.4",
|
|
88
|
+
"typescript": "^6.0.3",
|
|
88
89
|
"vite": "^8.1.5",
|
|
89
90
|
"vitest": "4.1.10"
|
|
90
91
|
},
|
package/pipeline/presets.ts
CHANGED
|
@@ -11,14 +11,29 @@ import type { Preset } from "../common/PresetChips.tsx"
|
|
|
11
11
|
|
|
12
12
|
export const PIPELINE_DEFAULT_ADDRESS = "1600 Pennsylvania Ave NW, Washington, DC 20500"
|
|
13
13
|
|
|
14
|
+
// `country` mirrors the docs `EXAMPLE_ADDRESSES` set (kept in parity) — the placetype-pair country pin (#1278 phase 2's
|
|
15
|
+
// `{country}` override). A host that wires the pair prior pins the country while the input equals the preset text, so a
|
|
16
|
+
// locale structural routing can't detect (NZ) still fires; free-typed input drops to structural detection.
|
|
14
17
|
export const PIPELINE_PRESETS: ReadonlyArray<Preset> = [
|
|
15
|
-
{ label: "White House", value: "1600 Pennsylvania Ave NW, Washington, DC 20500" },
|
|
16
|
-
{ label: "Apple Park", value: "1 Apple Park Way, Cupertino, CA 95014" },
|
|
17
|
-
{ label: "30 Rockefeller Plaza", value: "30 Rockefeller Plaza, New York, NY 10112" },
|
|
18
|
-
{ label: "Pier 39 SF", value: "Pier 39, San Francisco, CA 94133" },
|
|
19
|
-
{ label: "Wrigley Field", value: "1060 W Addison St, Chicago, IL 60613" },
|
|
20
|
-
{ label: "Space Needle", value: "400 Broad St, Seattle, WA 98109" },
|
|
21
|
-
{ label: "ZIP only", value: "90210" },
|
|
22
|
-
{ label: "Berlin (native order)", value: "Straußstraße 27, 12623 Berlin" },
|
|
23
|
-
{ label: "Paris (street fall-through)", value: "181 Rue du Chevaleret, Paris" },
|
|
18
|
+
{ label: "White House", value: "1600 Pennsylvania Ave NW, Washington, DC 20500", country: "us" },
|
|
19
|
+
{ label: "Apple Park", value: "1 Apple Park Way, Cupertino, CA 95014", country: "us" },
|
|
20
|
+
{ label: "30 Rockefeller Plaza", value: "30 Rockefeller Plaza, New York, NY 10112", country: "us" },
|
|
21
|
+
{ label: "Pier 39 SF", value: "Pier 39, San Francisco, CA 94133", country: "us" },
|
|
22
|
+
{ label: "Wrigley Field", value: "1060 W Addison St, Chicago, IL 60613", country: "us" },
|
|
23
|
+
{ label: "Space Needle", value: "400 Broad St, Seattle, WA 98109", country: "us" },
|
|
24
|
+
{ label: "ZIP only", value: "90210", country: "us" },
|
|
25
|
+
{ label: "Berlin (native order)", value: "Straußstraße 27, 12623 Berlin", country: "de" },
|
|
26
|
+
{ label: "Paris (street fall-through)", value: "181 Rue du Chevaleret, Paris", country: "fr" },
|
|
27
|
+
// GB dependent_locality (placetype-pair-prior arc) — "Henbury" flips to dependent_locality via the en-gb pair-index
|
|
28
|
+
// prior; the UK postcode is also structurally detectable (parity with docs EXAMPLE_ADDRESSES).
|
|
29
|
+
{
|
|
30
|
+
label: "Macclesfield (GB dependent_locality)",
|
|
31
|
+
value: "41 Hightree Drive, Henbury, Macclesfield, SK11 9PD",
|
|
32
|
+
country: "gb",
|
|
33
|
+
},
|
|
34
|
+
// NZ dependent_locality (en-nz pair-prior arc) — Plimmerton is a suburb (dependent_locality) of Porirua. Postcode
|
|
35
|
+
// DELIBERATELY OMITTED: a trailing "Porirua 5026" folds "porirua 5026" in segment mode and misses the index's bare
|
|
36
|
+
// "porirua" key (tracked as #1308). The `country: "nz"` pin is load-bearing — locale-gate can't structurally detect
|
|
37
|
+
// NZ (4-digit postcode isn't distinctive), so only the pin selects the nz index; free-typed NZ stays unfired.
|
|
38
|
+
{ label: "Plimmerton (NZ dependent_locality)", value: "35 Steyne Avenue, Plimmerton, Porirua", country: "nz" },
|
|
24
39
|
]
|