@acms-subir/core 0.3.18 → 0.3.19
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @acms-subir/core
|
|
2
2
|
|
|
3
|
+
## 0.3.19
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 0817c0e: Preserve street numbers and street names in LocationIQ and Geoapify autocomplete results when saving event locations and reusable places.
|
|
8
|
+
|
|
9
|
+
Keep calendar event popups opaque when an embedded calendar uses a transparent background, with a separate theme customization token.
|
|
10
|
+
|
|
3
11
|
## 0.3.18
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,13 +1,22 @@
|
|
|
1
1
|
// Geoapify (OpenStreetMap data): autocomplete, reverse geocoding and static
|
|
2
2
|
// maps with one API key. https://apidocs.geoapify.com
|
|
3
3
|
import type { GeoResult } from '../types';
|
|
4
|
-
import { arr, geo, getImage, getJson, obj, qs, s, usable, type MapsProvider, type ProviderEnv } from './http';
|
|
4
|
+
import { arr, geo, getImage, getJson, joinParts, obj, qs, s, usable, type MapsProvider, type ProviderEnv } from './http';
|
|
5
5
|
|
|
6
6
|
export function geoapifyResults(json: unknown): GeoResult[] {
|
|
7
7
|
return arr(obj(json).results).map((raw) => {
|
|
8
8
|
const r = obj(raw);
|
|
9
9
|
const name = s(r.name);
|
|
10
|
-
|
|
10
|
+
const street = s(r.street);
|
|
11
|
+
const number = s(r.housenumber);
|
|
12
|
+
// A result's name can itself be the street address. Do not let geo()
|
|
13
|
+
// strip it as a duplicated venue name from the full address.
|
|
14
|
+
const isStreet = street && [street, `${number} ${street}`.trim(), `${street} ${number}`.trim()]
|
|
15
|
+
.some((part) => part.toLowerCase() === name.toLowerCase());
|
|
16
|
+
// address_line1 may hold the street even for a named place; line2 alone
|
|
17
|
+
// can be just the locality. Prefer the provider's locale-aware formatting.
|
|
18
|
+
const address = s(r.formatted) || joinParts(r.address_line1, r.address_line2);
|
|
19
|
+
return geo(isStreet ? '' : name, address, r.lat, r.lon);
|
|
11
20
|
});
|
|
12
21
|
}
|
|
13
22
|
|
|
@@ -1,13 +1,22 @@
|
|
|
1
1
|
// LocationIQ (OpenStreetMap data): autocomplete, reverse and static maps.
|
|
2
2
|
import type { GeoResult } from '../types';
|
|
3
|
-
import { arr, geo, getImage, getJson, obj, qs, s, usable, type MapsProvider, type ProviderEnv } from './http';
|
|
3
|
+
import { arr, geo, getImage, getJson, joinParts, obj, qs, s, usable, type MapsProvider, type ProviderEnv } from './http';
|
|
4
4
|
|
|
5
5
|
export function locationiqResults(json: unknown): GeoResult[] {
|
|
6
6
|
const rows = Array.isArray(json) ? json : [json];
|
|
7
7
|
return rows.map((raw) => {
|
|
8
8
|
const r = obj(raw);
|
|
9
9
|
const place = s(r.display_place);
|
|
10
|
-
|
|
10
|
+
const parts = obj(r.address);
|
|
11
|
+
const road = s(parts.road);
|
|
12
|
+
const number = s(parts.house_number);
|
|
13
|
+
const normalize = (value: string) => value.replace(/[,\s]+/g, ' ').trim().toLowerCase();
|
|
14
|
+
// display_place is not always a venue: it can be a house number + road,
|
|
15
|
+
// and display_address deliberately omits everything in display_place.
|
|
16
|
+
const isStreet = (r.class === 'highway' && !s(parts.name)) || r.type === 'house' || r.type === 'address'
|
|
17
|
+
|| (road && [road, `${number} ${road}`, `${road} ${number}`].some((part) => normalize(part) === normalize(place)));
|
|
18
|
+
const address = s(r.display_name) || joinParts(place, r.display_address);
|
|
19
|
+
return geo(isStreet ? '' : place, address, r.lat, r.lon);
|
|
11
20
|
}).filter((r) => r.lat !== null || r.address || r.name);
|
|
12
21
|
}
|
|
13
22
|
|
package/src/styles/site.css
CHANGED
|
@@ -584,6 +584,8 @@ li::marker { color: var(--muted); }
|
|
|
584
584
|
@layer base {
|
|
585
585
|
.pc-calendar {
|
|
586
586
|
--cal-bg: var(--panel);
|
|
587
|
+
/* The calendar canvas may be transparent; floating details need a surface. */
|
|
588
|
+
--cal-pop-bg: var(--panel);
|
|
587
589
|
--cal-ink: var(--ink);
|
|
588
590
|
--cal-muted: var(--muted);
|
|
589
591
|
--cal-line: var(--line);
|
|
@@ -675,7 +677,7 @@ li::marker { color: var(--muted); }
|
|
|
675
677
|
/* event details popover */
|
|
676
678
|
.pc-cal-pop {
|
|
677
679
|
position: absolute; z-index: 5; max-width: 300px; padding: 12px 14px 12px;
|
|
678
|
-
background: var(--cal-bg); border: 1px solid var(--cal-line); border-radius: var(--r-sm);
|
|
680
|
+
background: var(--cal-pop-bg); border: 1px solid var(--cal-line); border-radius: var(--r-sm);
|
|
679
681
|
box-shadow: var(--sh-3); font-size: 12.5px; color: var(--cal-ink);
|
|
680
682
|
}
|
|
681
683
|
.pc-cal-pop-title { display: block; font-size: 13.5px; padding-right: 20px; }
|