@mailwoman/react 10.2.2 → 10.4.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/lib/common/About.tsx +1 -1
- package/lib/common/useDebouncedValue.ts +1 -1
- package/lib/map/MapCompass.tsx +4 -4
- package/lib/map/types.ts +3 -2
- package/lib/map/useMapBearing.ts +4 -4
- package/lib/poi/types.ts +1 -1
- package/lib/search/types.ts +7 -1
- package/out/common/About.d.ts +1 -1
- package/out/common/useDebouncedValue.d.ts +1 -1
- package/out/common/useDebouncedValue.js +1 -1
- package/out/map/MapCompass.d.ts +3 -3
- package/out/map/MapCompass.js +1 -1
- package/out/map/types.d.ts +3 -2
- package/out/map/types.d.ts.map +1 -1
- package/out/map/useMapBearing.d.ts +2 -2
- package/out/map/useMapBearing.js +3 -3
- package/out/map/useMapBearing.js.map +1 -1
- package/out/poi/types.d.ts +1 -1
- package/out/search/types.d.ts +6 -1
- package/out/search/types.d.ts.map +1 -1
- package/out/search/types.js +5 -0
- package/out/search/types.js.map +1 -1
- package/package.json +6 -6
package/lib/common/About.tsx
CHANGED
|
@@ -13,7 +13,7 @@ export interface AboutProps {
|
|
|
13
13
|
* Wraps the prose in its own `<details>` disclosure.
|
|
14
14
|
*
|
|
15
15
|
* Set false where the host is already the disclosure, because a summary repeating
|
|
16
|
-
* an About button's words
|
|
16
|
+
* an About button's words adds a control with no new content.
|
|
17
17
|
*
|
|
18
18
|
* @defaultValue `true`
|
|
19
19
|
*/
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
5
|
*
|
|
6
6
|
* `useDebouncedValue` — returns a copy of `value` that only updates after `delayMs` of quiet. Used by
|
|
7
|
-
* the POI explorer to avoid re-classifying on every keystroke. The timer is
|
|
7
|
+
* the POI explorer to avoid re-classifying on every keystroke. The timer is an external-sync
|
|
8
8
|
* effect (a scheduled clock), so it belongs in an effect.
|
|
9
9
|
*/
|
|
10
10
|
|
package/lib/map/MapCompass.tsx
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
5
|
*
|
|
6
|
-
* Shows a compass that rotates with the map
|
|
7
|
-
*
|
|
6
|
+
* Shows a compass that rotates with the map's rotation angle and hides when the map faces north.
|
|
7
|
+
* A press asks the host to rotate the map back to north.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import type { ReactNode } from "react"
|
|
@@ -12,7 +12,7 @@ import type { ReactNode } from "react"
|
|
|
12
12
|
import { cx } from "#common/cx"
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
|
-
* The compass counts as facing north below this
|
|
15
|
+
* The compass counts as facing north below this rotation angle.
|
|
16
16
|
* It fades out below the same threshold.
|
|
17
17
|
*/
|
|
18
18
|
const HIDE_BELOW_DEGREES = 0.5
|
|
@@ -22,7 +22,7 @@ const HIDE_BELOW_DEGREES = 0.5
|
|
|
22
22
|
*/
|
|
23
23
|
export interface MapCompassProps {
|
|
24
24
|
/**
|
|
25
|
-
* The map's
|
|
25
|
+
* The map's rotation in degrees as MapLibre's `getBearing` reports it, where 0 is north.
|
|
26
26
|
*/
|
|
27
27
|
bearing: number
|
|
28
28
|
/**
|
package/lib/map/types.ts
CHANGED
|
@@ -209,8 +209,9 @@ export interface GeocoderPanels {
|
|
|
209
209
|
*/
|
|
210
210
|
extras?: (result: ParseResult) => ReactNode
|
|
211
211
|
/**
|
|
212
|
-
* Rendered
|
|
213
|
-
*
|
|
212
|
+
* Rendered directly above the result block for content that reads on this answer.
|
|
213
|
+
*
|
|
214
|
+
* A control that reads on the model belongs in {@link developerExtras}.
|
|
214
215
|
*/
|
|
215
216
|
aboveResult?: (context: { result: ParseResult | null }) => ReactNode
|
|
216
217
|
/**
|
package/lib/map/useMapBearing.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { useCallback, useSyncExternalStore } from "react"
|
|
|
10
10
|
import type { MapInstance } from "react-map-gl/maplibre"
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
|
-
* The map's
|
|
13
|
+
* The map's rotation angle and a callback that returns the map to north.
|
|
14
14
|
*/
|
|
15
15
|
export interface UseMapBearing {
|
|
16
16
|
/**
|
|
@@ -26,7 +26,7 @@ export interface UseMapBearing {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
|
-
* Reads the live map
|
|
29
|
+
* Reads the live map rotation angle and exposes `resetNorth`.
|
|
30
30
|
*/
|
|
31
31
|
export function useMapBearing(map: MapInstance | null): UseMapBearing {
|
|
32
32
|
const subscribe = useCallback(
|
|
@@ -44,8 +44,8 @@ export function useMapBearing(map: MapInstance | null): UseMapBearing {
|
|
|
44
44
|
[map]
|
|
45
45
|
)
|
|
46
46
|
|
|
47
|
-
// The server snapshot is the same reading: the server renders no map
|
|
48
|
-
//
|
|
47
|
+
// The server snapshot is the same reading: the server renders no map, and north
|
|
48
|
+
// is what a compass shows with no rotation angle to report.
|
|
49
49
|
const readBearing = useCallback(() => map?.getBearing() ?? 0, [map])
|
|
50
50
|
|
|
51
51
|
const bearing = useSyncExternalStore(subscribe, readBearing, () => 0)
|
package/lib/poi/types.ts
CHANGED
|
@@ -38,7 +38,7 @@ export interface POISubjectBase {
|
|
|
38
38
|
matchedPhrase: string
|
|
39
39
|
confidence: number
|
|
40
40
|
/**
|
|
41
|
-
* The rest of the query after the subject,
|
|
41
|
+
* The rest of the query after the subject, such as the location anchor "near Springfield".
|
|
42
42
|
*/
|
|
43
43
|
remainder: string
|
|
44
44
|
}
|
package/lib/search/types.ts
CHANGED
|
@@ -12,6 +12,12 @@
|
|
|
12
12
|
*/
|
|
13
13
|
export const HIERARCHY_DEPTH = 7
|
|
14
14
|
|
|
15
|
+
/**
|
|
16
|
+
* The hierarchy level a table-row record is written at.
|
|
17
|
+
* The indexer writes it and the ranker reads it.
|
|
18
|
+
*/
|
|
19
|
+
export const TABLE_ROW_LEVEL = 5
|
|
20
|
+
|
|
15
21
|
export interface SearchRecord {
|
|
16
22
|
/**
|
|
17
23
|
* The first 32 hex characters of `sha256(url + "#" + anchor + "\n" + position)`.
|
|
@@ -60,7 +66,7 @@ export interface SearchHit {
|
|
|
60
66
|
export interface SearchResponse {
|
|
61
67
|
query: string
|
|
62
68
|
/**
|
|
63
|
-
* The text
|
|
69
|
+
* The text the search ran on when a token was corrected against the vocabulary.
|
|
64
70
|
* It is `null` when no token was.
|
|
65
71
|
*/
|
|
66
72
|
corrected: string | null
|
package/out/common/About.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export interface AboutProps {
|
|
|
11
11
|
* Wraps the prose in its own `<details>` disclosure.
|
|
12
12
|
*
|
|
13
13
|
* Set false where the host is already the disclosure, because a summary repeating
|
|
14
|
-
* an About button's words
|
|
14
|
+
* an About button's words adds a control with no new content.
|
|
15
15
|
*
|
|
16
16
|
* @defaultValue `true`
|
|
17
17
|
*/
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
5
|
*
|
|
6
6
|
* `useDebouncedValue` — returns a copy of `value` that only updates after `delayMs` of quiet. Used by
|
|
7
|
-
* the POI explorer to avoid re-classifying on every keystroke. The timer is
|
|
7
|
+
* the POI explorer to avoid re-classifying on every keystroke. The timer is an external-sync
|
|
8
8
|
* effect (a scheduled clock), so it belongs in an effect.
|
|
9
9
|
*/
|
|
10
10
|
export declare function useDebouncedValue<T>(value: T, delayMs: number): T;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
5
|
*
|
|
6
6
|
* `useDebouncedValue` — returns a copy of `value` that only updates after `delayMs` of quiet. Used by
|
|
7
|
-
* the POI explorer to avoid re-classifying on every keystroke. The timer is
|
|
7
|
+
* the POI explorer to avoid re-classifying on every keystroke. The timer is an external-sync
|
|
8
8
|
* effect (a scheduled clock), so it belongs in an effect.
|
|
9
9
|
*/
|
|
10
10
|
import { useEffect, useState } from "react";
|
package/out/map/MapCompass.d.ts
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
5
|
*
|
|
6
|
-
* Shows a compass that rotates with the map
|
|
7
|
-
*
|
|
6
|
+
* Shows a compass that rotates with the map's rotation angle and hides when the map faces north.
|
|
7
|
+
* A press asks the host to rotate the map back to north.
|
|
8
8
|
*/
|
|
9
9
|
import type { ReactNode } from "react";
|
|
10
10
|
/**
|
|
@@ -12,7 +12,7 @@ import type { ReactNode } from "react";
|
|
|
12
12
|
*/
|
|
13
13
|
export interface MapCompassProps {
|
|
14
14
|
/**
|
|
15
|
-
* The map's
|
|
15
|
+
* The map's rotation in degrees as MapLibre's `getBearing` reports it, where 0 is north.
|
|
16
16
|
*/
|
|
17
17
|
bearing: number;
|
|
18
18
|
/**
|
package/out/map/MapCompass.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { cx } from "#common/cx";
|
|
3
3
|
/**
|
|
4
|
-
* The compass counts as facing north below this
|
|
4
|
+
* The compass counts as facing north below this rotation angle.
|
|
5
5
|
* It fades out below the same threshold.
|
|
6
6
|
*/
|
|
7
7
|
const HIDE_BELOW_DEGREES = 0.5;
|
package/out/map/types.d.ts
CHANGED
|
@@ -192,8 +192,9 @@ export interface GeocoderPanels {
|
|
|
192
192
|
*/
|
|
193
193
|
extras?: (result: ParseResult) => ReactNode;
|
|
194
194
|
/**
|
|
195
|
-
* Rendered
|
|
196
|
-
*
|
|
195
|
+
* Rendered directly above the result block for content that reads on this answer.
|
|
196
|
+
*
|
|
197
|
+
* A control that reads on the model belongs in {@link developerExtras}.
|
|
197
198
|
*/
|
|
198
199
|
aboveResult?: (context: {
|
|
199
200
|
result: ParseResult | null;
|
package/out/map/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types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,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,SAAS,CAAA;IAC5C;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,SAAS,CAAA;IAChD;;;OAGG;IACH,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE;QAAE,MAAM,EAAE,WAAW,GAAG,IAAI,CAAA;KAAE,KAAK,SAAS,CAAA;IACpE;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB;;;OAGG;IACH,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE;QAAE,GAAG,EAAE,WAAW,GAAG,IAAI,CAAA;KAAE,KAAK,SAAS,CAAA;IAC5D;;OAEG;IACH,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,SAAS,CAAA;CACvC"}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import type { MapInstance } from "react-map-gl/maplibre";
|
|
9
9
|
/**
|
|
10
|
-
* The map's
|
|
10
|
+
* The map's rotation angle and a callback that returns the map to north.
|
|
11
11
|
*/
|
|
12
12
|
export interface UseMapBearing {
|
|
13
13
|
/**
|
|
@@ -22,7 +22,7 @@ export interface UseMapBearing {
|
|
|
22
22
|
resetNorth: () => void;
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
|
-
* Reads the live map
|
|
25
|
+
* Reads the live map rotation angle and exposes `resetNorth`.
|
|
26
26
|
*/
|
|
27
27
|
export declare function useMapBearing(map: MapInstance | null): UseMapBearing;
|
|
28
28
|
//# sourceMappingURL=useMapBearing.d.ts.map
|
package/out/map/useMapBearing.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { useCallback, useSyncExternalStore } from "react";
|
|
9
9
|
/**
|
|
10
|
-
* Reads the live map
|
|
10
|
+
* Reads the live map rotation angle and exposes `resetNorth`.
|
|
11
11
|
*/
|
|
12
12
|
export function useMapBearing(map) {
|
|
13
13
|
const subscribe = useCallback((onChange) => {
|
|
@@ -20,8 +20,8 @@ export function useMapBearing(map) {
|
|
|
20
20
|
map.off("move", onChange);
|
|
21
21
|
};
|
|
22
22
|
}, [map]);
|
|
23
|
-
// The server snapshot is the same reading: the server renders no map
|
|
24
|
-
//
|
|
23
|
+
// The server snapshot is the same reading: the server renders no map, and north
|
|
24
|
+
// is what a compass shows with no rotation angle to report.
|
|
25
25
|
const readBearing = useCallback(() => map?.getBearing() ?? 0, [map]);
|
|
26
26
|
const bearing = useSyncExternalStore(subscribe, readBearing, () => 0);
|
|
27
27
|
const resetNorth = useCallback(() => map?.easeTo({ bearing: 0, pitch: 0 }), [map]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMapBearing.js","sourceRoot":"","sources":["../../lib/map/useMapBearing.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAA;AAmBzD;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,GAAuB;IACpD,MAAM,SAAS,GAAG,WAAW,CAC5B,CAAC,QAAoB,EAAE,EAAE;QACxB,IAAI,CAAC,GAAG;YAAE,OAAO,GAAG,EAAE,CAAC,SAAS,CAAA;QAEhC,GAAG,CAAC,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAA;QAC1B,GAAG,CAAC,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;QAExB,OAAO,GAAG,EAAE;YACX,GAAG,CAAC,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAA;YAC3B,GAAG,CAAC,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;QAC1B,CAAC,CAAA;IACF,CAAC,EACD,CAAC,GAAG,CAAC,CACL,CAAA;IAED,
|
|
1
|
+
{"version":3,"file":"useMapBearing.js","sourceRoot":"","sources":["../../lib/map/useMapBearing.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAA;AAmBzD;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,GAAuB;IACpD,MAAM,SAAS,GAAG,WAAW,CAC5B,CAAC,QAAoB,EAAE,EAAE;QACxB,IAAI,CAAC,GAAG;YAAE,OAAO,GAAG,EAAE,CAAC,SAAS,CAAA;QAEhC,GAAG,CAAC,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAA;QAC1B,GAAG,CAAC,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;QAExB,OAAO,GAAG,EAAE;YACX,GAAG,CAAC,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAA;YAC3B,GAAG,CAAC,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;QAC1B,CAAC,CAAA;IACF,CAAC,EACD,CAAC,GAAG,CAAC,CACL,CAAA;IAED,gFAAgF;IAChF,4DAA4D;IAC5D,MAAM,WAAW,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,UAAU,EAAE,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAA;IAEpE,MAAM,OAAO,GAAG,oBAAoB,CAAC,SAAS,EAAE,WAAW,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,CAAA;IAErE,MAAM,UAAU,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAA;IAElF,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,CAAA;AAC/B,CAAC"}
|
package/out/poi/types.d.ts
CHANGED
|
@@ -33,7 +33,7 @@ export interface POISubjectBase {
|
|
|
33
33
|
matchedPhrase: string;
|
|
34
34
|
confidence: number;
|
|
35
35
|
/**
|
|
36
|
-
* The rest of the query after the subject,
|
|
36
|
+
* The rest of the query after the subject, such as the location anchor "near Springfield".
|
|
37
37
|
*/
|
|
38
38
|
remainder: string;
|
|
39
39
|
}
|
package/out/search/types.d.ts
CHANGED
|
@@ -10,6 +10,11 @@
|
|
|
10
10
|
* The number of hierarchy entries: the sidebar category, then `h1` through `h6`.
|
|
11
11
|
*/
|
|
12
12
|
export declare const HIERARCHY_DEPTH = 7;
|
|
13
|
+
/**
|
|
14
|
+
* The hierarchy level a table-row record is written at.
|
|
15
|
+
* The indexer writes it and the ranker reads it.
|
|
16
|
+
*/
|
|
17
|
+
export declare const TABLE_ROW_LEVEL = 5;
|
|
13
18
|
export interface SearchRecord {
|
|
14
19
|
/**
|
|
15
20
|
* The first 32 hex characters of `sha256(url + "#" + anchor + "\n" + position)`.
|
|
@@ -56,7 +61,7 @@ export interface SearchHit {
|
|
|
56
61
|
export interface SearchResponse {
|
|
57
62
|
query: string;
|
|
58
63
|
/**
|
|
59
|
-
* The text
|
|
64
|
+
* The text the search ran on when a token was corrected against the vocabulary.
|
|
60
65
|
* It is `null` when no token was.
|
|
61
66
|
*/
|
|
62
67
|
corrected: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../lib/search/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;GAEG;AACH,eAAO,MAAM,eAAe,IAAI,CAAA;AAEhC,MAAM,WAAW,YAAY;IAC5B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;IACV;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,SAAS,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAA;IAC5B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,SAA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C,EAAE,CAAA;CAC1C;AAED,MAAM,WAAW,cAAc;IAC9B,KAAK,EAAE,MAAM,CAAA;IACb;;;OAGG;IACH,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,IAAI,EAAE,SAAS,EAAE,CAAA;CACjB"}
|
package/out/search/types.js
CHANGED
|
@@ -10,4 +10,9 @@
|
|
|
10
10
|
* The number of hierarchy entries: the sidebar category, then `h1` through `h6`.
|
|
11
11
|
*/
|
|
12
12
|
export const HIERARCHY_DEPTH = 7;
|
|
13
|
+
/**
|
|
14
|
+
* The hierarchy level a table-row record is written at.
|
|
15
|
+
* The indexer writes it and the ranker reads it.
|
|
16
|
+
*/
|
|
17
|
+
export const TABLE_ROW_LEVEL = 5;
|
|
13
18
|
//# sourceMappingURL=types.js.map
|
package/out/search/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../lib/search/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAA"}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../lib/search/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAA;AAEhC;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mailwoman/react",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.4.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": {
|
|
@@ -477,11 +477,11 @@
|
|
|
477
477
|
"test:node": "vitest run --config vitest.node.config.ts"
|
|
478
478
|
},
|
|
479
479
|
"dependencies": {
|
|
480
|
-
"@mailwoman/core": "10.
|
|
481
|
-
"@mailwoman/kind-classifier": "10.
|
|
482
|
-
"@mailwoman/poi-taxonomy": "10.
|
|
483
|
-
"@mailwoman/query-shape": "10.
|
|
484
|
-
"@mailwoman/spatial": "10.
|
|
480
|
+
"@mailwoman/core": "10.4.0",
|
|
481
|
+
"@mailwoman/kind-classifier": "10.4.0",
|
|
482
|
+
"@mailwoman/poi-taxonomy": "10.4.0",
|
|
483
|
+
"@mailwoman/query-shape": "10.4.0",
|
|
484
|
+
"@mailwoman/spatial": "10.4.0",
|
|
485
485
|
"@types/geojson": "^7946.0.16"
|
|
486
486
|
},
|
|
487
487
|
"devDependencies": {
|