@fieldia/map 0.16.0 → 0.17.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/README.md +43 -8
- package/package.json +4 -4
- package/src/index.d.mts +1 -1
- package/src/index.d.ts +1 -1
- package/src/index.js.map +1 -1
- package/src/index.mjs.map +1 -1
- package/src/lib/area.js +2 -1
- package/src/lib/area.js.map +1 -1
- package/src/lib/area.mjs +3 -2
- package/src/lib/area.mjs.map +1 -1
- package/src/lib/form-map.d.mts +3 -1
- package/src/lib/form-map.d.ts +3 -1
- package/src/lib/form-map.js +63 -2
- package/src/lib/form-map.js.map +1 -1
- package/src/lib/form-map.mjs +63 -2
- package/src/lib/form-map.mjs.map +1 -1
- package/src/lib/heat.d.mts +25 -0
- package/src/lib/heat.d.ts +25 -0
- package/src/lib/heat.js +111 -0
- package/src/lib/heat.js.map +1 -0
- package/src/lib/heat.mjs +108 -0
- package/src/lib/heat.mjs.map +1 -0
- package/src/lib/labels.d.mts +20 -0
- package/src/lib/labels.d.ts +20 -0
- package/src/lib/labels.js +48 -0
- package/src/lib/labels.js.map +1 -1
- package/src/lib/labels.mjs +48 -0
- package/src/lib/labels.mjs.map +1 -1
- package/src/lib/list-view.js +120 -5
- package/src/lib/list-view.js.map +1 -1
- package/src/lib/list-view.mjs +120 -5
- package/src/lib/list-view.mjs.map +1 -1
- package/src/lib/map-core.d.mts +8 -0
- package/src/lib/map-core.d.ts +8 -0
- package/src/lib/map-core.js +35 -2
- package/src/lib/map-core.js.map +1 -1
- package/src/lib/map-core.mjs +34 -2
- package/src/lib/map-core.mjs.map +1 -1
- package/src/lib/measure.d.mts +15 -0
- package/src/lib/measure.d.ts +15 -0
- package/src/lib/measure.js +157 -0
- package/src/lib/measure.js.map +1 -0
- package/src/lib/measure.mjs +153 -0
- package/src/lib/measure.mjs.map +1 -0
- package/src/lib/place.js +3 -1
- package/src/lib/place.js.map +1 -1
- package/src/lib/place.mjs +4 -2
- package/src/lib/place.mjs.map +1 -1
- package/src/lib/providers.d.mts +16 -0
- package/src/lib/providers.d.ts +16 -0
- package/src/lib/providers.js +7 -0
- package/src/lib/providers.js.map +1 -1
- package/src/lib/providers.mjs +7 -0
- package/src/lib/providers.mjs.map +1 -1
- package/src/lib/reach.d.mts +25 -0
- package/src/lib/reach.d.ts +25 -0
- package/src/lib/reach.js +158 -0
- package/src/lib/reach.js.map +1 -0
- package/src/lib/reach.mjs +153 -0
- package/src/lib/reach.mjs.map +1 -0
- package/src/lib/regions.d.mts +137 -0
- package/src/lib/regions.d.ts +137 -0
- package/src/lib/regions.js +456 -0
- package/src/lib/regions.js.map +1 -0
- package/src/lib/regions.mjs +445 -0
- package/src/lib/regions.mjs.map +1 -0
- package/src/lib/routes.d.mts +16 -4
- package/src/lib/routes.d.ts +16 -4
- package/src/lib/routes.js +40 -3
- package/src/lib/routes.js.map +1 -1
- package/src/lib/routes.mjs +38 -3
- package/src/lib/routes.mjs.map +1 -1
- package/src/lib/settings.d.mts +9 -1
- package/src/lib/settings.d.ts +9 -1
- package/src/lib/styles.d.mts +2 -2
- package/src/lib/styles.d.ts +2 -2
- package/src/lib/styles.js +10 -0
- package/src/lib/styles.js.map +1 -1
- package/src/lib/styles.mjs +10 -0
- package/src/lib/styles.mjs.map +1 -1
- package/src/lib/tools.d.mts +27 -0
- package/src/lib/tools.d.ts +27 -0
- package/src/lib/tools.js +84 -0
- package/src/lib/tools.js.map +1 -0
- package/src/lib/tools.mjs +81 -0
- package/src/lib/tools.mjs.map +1 -0
package/src/lib/routes.mjs
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { getJson, pathOf } from './answers.mjs';
|
|
2
2
|
/**
|
|
3
|
-
* The providers' routes along the roads, loaded the
|
|
4
|
-
* for one: a form with only a place or an area never
|
|
5
|
-
* reads its provider's answer into one line, its metres
|
|
3
|
+
* The providers' routes along the roads and reachable areas, loaded the
|
|
4
|
+
* first time a map asks for one: a form with only a place or an area never
|
|
5
|
+
* carries them. Each reads its provider's answer into one line, its metres
|
|
6
|
+
* and its seconds; or an area's rings.
|
|
6
7
|
*/
|
|
7
8
|
/** Google's encoded polyline, as its Routes API sends a line: five decimals, each number a run of five-bit groups. */
|
|
8
9
|
export function decodePolyline(encoded) {
|
|
@@ -102,4 +103,38 @@ export async function mapboxRoute(ask, { points, mode, signal }) {
|
|
|
102
103
|
const route = pathOf(found, 'routes')?.[0];
|
|
103
104
|
return routed({ line: lineOf(pathOf(route, 'geometry', 'coordinates')), metres: Number(pathOf(route, 'distance')), seconds: Number(pathOf(route, 'duration')) }, 'Mapbox');
|
|
104
105
|
}
|
|
106
|
+
/** The outer rings of a GeoJSON Polygon's or MultiPolygon's, as places. */
|
|
107
|
+
function ringsOf(geometry) {
|
|
108
|
+
const type = pathOf(geometry, 'type');
|
|
109
|
+
const coordinates = pathOf(geometry, 'coordinates');
|
|
110
|
+
const polygons = type === 'Polygon' ? [coordinates] : type === 'MultiPolygon' && Array.isArray(coordinates) ? coordinates : [];
|
|
111
|
+
return polygons.flatMap((polygon) => (Array.isArray(polygon) ? [lineOf(polygon[0])] : [])).filter((ring) => ring.length > 2);
|
|
112
|
+
}
|
|
113
|
+
/** An area that is no area: refused in words a developer can act on. */
|
|
114
|
+
function reached(found, provider) {
|
|
115
|
+
if (!found.rings.length)
|
|
116
|
+
throw new Error(`${provider} found no reachable area`);
|
|
117
|
+
return found;
|
|
118
|
+
}
|
|
119
|
+
/** Azure Maps' Route Range of 2025: the area within a time from a point, by car (or truck) alone. */
|
|
120
|
+
export async function azureReach(ask, { at, minutes, mode, signal }) {
|
|
121
|
+
if (mode !== 'car')
|
|
122
|
+
throw new Error('Azure Maps works out reachable areas by car, not by bike or on foot');
|
|
123
|
+
const found = await getJson(ask.fetchWith, `https://atlas.microsoft.com/route/range?api-version=2025-01-01${ask.auth}`, {
|
|
124
|
+
method: 'POST',
|
|
125
|
+
signal,
|
|
126
|
+
headers: { 'Content-Type': 'application/geo+json', ...(await ask.headers()) },
|
|
127
|
+
body: JSON.stringify({ type: 'Feature', geometry: { type: 'Point', coordinates: [at.lng, at.lat] }, properties: { timeBudgetInSec: Math.round(minutes * 60), travelMode: 'driving' } }),
|
|
128
|
+
});
|
|
129
|
+
const features = pathOf(found, 'features');
|
|
130
|
+
const boundary = Array.isArray(features) ? features.find((f) => pathOf(f, 'properties', 'type') === 'boundary') : undefined;
|
|
131
|
+
return reached({ rings: ringsOf(pathOf(boundary, 'geometry')) }, 'Azure Maps');
|
|
132
|
+
}
|
|
133
|
+
/** Mapbox Isochrone: the area within some minutes, by its profile, as polygons. */
|
|
134
|
+
export async function mapboxReach(ask, { at, minutes, mode, signal }) {
|
|
135
|
+
const profile = mode === 'bike' ? 'cycling' : mode === 'foot' ? 'walking' : 'driving';
|
|
136
|
+
const found = await getJson(ask.fetchWith, `https://api.mapbox.com/isochrone/v1/mapbox/${profile}/${at.lng},${at.lat}?contours_minutes=${Math.round(minutes)}&polygons=true&access_token=${ask.token}`, { signal });
|
|
137
|
+
const features = pathOf(found, 'features');
|
|
138
|
+
return reached({ rings: Array.isArray(features) ? features.flatMap((f) => ringsOf(pathOf(f, 'geometry'))) : [] }, 'Mapbox');
|
|
139
|
+
}
|
|
105
140
|
//# sourceMappingURL=routes.mjs.map
|
package/src/lib/routes.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.mjs","sourceRoot":"","sources":["../../../../../libs/map/src/lib/routes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAc,MAAM,WAAW,CAAC;AAGxD
|
|
1
|
+
{"version":3,"file":"routes.mjs","sourceRoot":"","sources":["../../../../../libs/map/src/lib/routes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAc,MAAM,WAAW,CAAC;AAGxD;;;;;GAKG;AAEH,sHAAsH;AACtH,MAAM,UAAU,cAAc,CAAC,OAAe;IAC5C,MAAM,IAAI,GAAa,EAA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AS,CAAC,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;IACtF,MAAM,KAAK,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,8CAA8C,OAAO,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,GAAG,qBAAqB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,+BAA+B,GAAG,CAAC,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IACpN,MAAM,QAAQ,GAAG,MAAM,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;IAC3C,OAAO,OAAO,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,QAAQ,CAAC,CAAC;AAC9H,CAAC"}
|
package/src/lib/settings.d.mts
CHANGED
|
@@ -2,7 +2,7 @@ import type { Locale } from '@fieldia/core';
|
|
|
2
2
|
import type { LatLng } from './geo.mjs';
|
|
3
3
|
import type { FormMapLabels, ListMapLabels, MapLabels } from './labels.mjs';
|
|
4
4
|
import type { PinDrawer } from './pins.mjs';
|
|
5
|
-
import type { AddressSearch, MapProvider, ReverseSearch, RouteFinder } from './providers.mjs';
|
|
5
|
+
import type { AddressSearch, MapProvider, ReachFinder, ReverseSearch, RouteFinder } from './providers.mjs';
|
|
6
6
|
/** What every map of an app shares: given once to `mapWidgets`. */
|
|
7
7
|
export interface MapSettings {
|
|
8
8
|
provider: MapProvider;
|
|
@@ -17,6 +17,14 @@ export interface MapSettings {
|
|
|
17
17
|
zoom?: number;
|
|
18
18
|
/** The app's own routes, instead of the provider's. */
|
|
19
19
|
route?: RouteFinder;
|
|
20
|
+
/** The app's own reachable areas, instead of the provider's. */
|
|
21
|
+
reach?: ReachFinder;
|
|
22
|
+
/**
|
|
23
|
+
* The app's sets of borders, by the name a page's `regions.from` gives: each
|
|
24
|
+
* a GeoJSON FeatureCollection of polygons, or a function that loads one
|
|
25
|
+
* (`() => fetch('/geo/districts.json').then((r) => r.json())`), asked once.
|
|
26
|
+
*/
|
|
27
|
+
regions?: Record<string, unknown | (() => unknown)>;
|
|
20
28
|
/** The app's own pins for a list's map, by the name a page's `pin.widget` gives. */
|
|
21
29
|
pins?: Record<string, PinDrawer>;
|
|
22
30
|
/** The app's own words over the maps', by language. */
|
package/src/lib/settings.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { Locale } from '@fieldia/core';
|
|
|
2
2
|
import type { LatLng } from './geo';
|
|
3
3
|
import type { FormMapLabels, ListMapLabels, MapLabels } from './labels';
|
|
4
4
|
import type { PinDrawer } from './pins';
|
|
5
|
-
import type { AddressSearch, MapProvider, ReverseSearch, RouteFinder } from './providers';
|
|
5
|
+
import type { AddressSearch, MapProvider, ReachFinder, ReverseSearch, RouteFinder } from './providers';
|
|
6
6
|
/** What every map of an app shares: given once to `mapWidgets`. */
|
|
7
7
|
export interface MapSettings {
|
|
8
8
|
provider: MapProvider;
|
|
@@ -17,6 +17,14 @@ export interface MapSettings {
|
|
|
17
17
|
zoom?: number;
|
|
18
18
|
/** The app's own routes, instead of the provider's. */
|
|
19
19
|
route?: RouteFinder;
|
|
20
|
+
/** The app's own reachable areas, instead of the provider's. */
|
|
21
|
+
reach?: ReachFinder;
|
|
22
|
+
/**
|
|
23
|
+
* The app's sets of borders, by the name a page's `regions.from` gives: each
|
|
24
|
+
* a GeoJSON FeatureCollection of polygons, or a function that loads one
|
|
25
|
+
* (`() => fetch('/geo/districts.json').then((r) => r.json())`), asked once.
|
|
26
|
+
*/
|
|
27
|
+
regions?: Record<string, unknown | (() => unknown)>;
|
|
20
28
|
/** The app's own pins for a list's map, by the name a page's `pin.widget` gives. */
|
|
21
29
|
pins?: Record<string, PinDrawer>;
|
|
22
30
|
/** The app's own words over the maps', by language. */
|
package/src/lib/styles.d.mts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* grips. Fixed on purpose: the veil over the map that asks for two fingers
|
|
5
5
|
* or Ctrl (white words on a dark veil, as an image's caption has them).
|
|
6
6
|
*/
|
|
7
|
-
export declare const MAP_CSS = "\n.fd-map-field { display: grid; gap: 8px; min-width: 0; }\n.fd-map-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; }\n.fd-map-tools .fd-button { min-height: 32px; padding-inline: 10px; }\n.fd-map-tools .fd-button[aria-pressed=\"true\"] { background: var(--fd-accent-soft); border-color: var(--fd-accent); color: var(--fd-accent); }\n.fd-map-tools .fd-button svg { width: 16px; height: 16px; flex: none; }\n.fd-map-search { position: relative; flex: 1 1 220px; min-width: 0; }\n.fd-map-results {\n position: absolute; inset-inline: 0; top: calc(100% + 4px); z-index: 1100; margin: 0; padding: 4px; list-style: none;\n background: var(--fd-surface); color: var(--fd-text); border: 1px solid var(--fd-border); border-radius: var(--fd-control-radius);\n box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16); max-height: 240px; overflow: auto;\n}\n.fd-map-results [role=\"option\"] { padding: 6px 8px; border-radius: 4px; cursor: pointer; line-height: 1.35; display: grid; gap: 1px; }\n.fd-map-result-name { color: var(--fd-text); font-weight: 600; overflow-wrap: anywhere; }\n.fd-map-result-detail { color: var(--fd-muted); font-size: 12.5px; overflow-wrap: anywhere; }\n.fd-map-results [role=\"option\"][aria-selected=\"true\"], .fd-map-results [role=\"option\"]:hover { background: var(--fd-accent-soft); }\n.fd-map-results .fd-map-results-note { padding: 6px 8px; color: var(--fd-muted); cursor: default; }\n.fd-map-box {\n position: relative; height: var(--fd-map-height, 280px); min-height: 160px; overflow: hidden; isolation: isolate;\n border: 1px solid var(--fd-border); border-radius: var(--fd-control-radius); background: var(--fd-fill);\n}\n.fd-map-box.leaflet-container:focus { outline: none; }\n.fd-map-box.leaflet-container[data-keys]:focus { outline: 2px solid var(--fd-focus); outline-offset: 1px; }\n.fd-map-box.leaflet-container { font: inherit; background: var(--fd-fill); }\n.fd-map-zoom { position: absolute; top: 8px; z-index: 1000; display: grid; gap: 4px; }\n.fd-map-zoom[data-side=\"right\"] { right: 8px; }\n.fd-map-zoom[data-side=\"left\"] { left: 8px; }\n.fd-map-zoom button {\n width: 32px; height: 32px; display: grid; place-items: center; padding: 0; cursor: pointer; font: 600 18px/1 system-ui, sans-serif;\n background: var(--fd-surface); color: var(--fd-text); border: 1px solid var(--fd-border); border-radius: var(--fd-control-radius);\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);\n}\n.fd-map-zoom button:hover { color: var(--fd-accent); border-color: var(--fd-accent); }\n.fd-map-zoom button:focus-visible, .fd-map-hint button:focus-visible { outline: 2px solid var(--fd-focus); outline-offset: 1px; }\n.fd-map-credits {\n position: absolute; right: 0; bottom: 0; z-index: 1000; max-width: 72%; padding: 1px 6px; font-size: 11px; line-height: 1.5;\n background: color-mix(in srgb, var(--fd-surface) 88%, transparent); color: var(--fd-text); border-top-left-radius: 4px;\n}\n.fd-map-credits a { color: inherit; }\n.fd-map-logo { position: absolute; left: 6px; bottom: 4px; z-index: 1000; display: inline-flex; align-items: center; text-decoration: none; }\n.fd-map-logo img { height: 18px; width: auto; display: block; }\n.fd-map-logo span {\n font: 700 12px/1.4 system-ui, sans-serif; padding: 0 5px; border-radius: 3px;\n background: color-mix(in srgb, var(--fd-surface) 88%, transparent); color: var(--fd-text);\n}\n.fd-map-veil {\n position: absolute; inset: 0; z-index: 1001; display: grid; place-items: center; padding: 16px; text-align: center;\n background: rgba(0, 0, 0, 0.5); color: #fff; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity 0.2s;\n}\n.fd-map-veil[data-show] { opacity: 1; }\n.fd-map-crosshair { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; z-index: 900; pointer-events: none; display: none; }\n.fd-map-crosshair::before, .fd-map-crosshair::after { content: \"\"; position: absolute; background: var(--fd-accent); box-shadow: 0 0 0 1px var(--fd-surface); }\n.fd-map-crosshair::before { left: 10px; top: 0; width: 2px; height: 22px; }\n.fd-map-crosshair::after { top: 10px; left: 0; height: 2px; width: 22px; }\n.fd-map-box[data-keys]:focus .fd-map-crosshair { display: block; }\n.fd-map-hint {\n position: absolute; top: 8px; left: 8px; right: 52px; z-index: 1000; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center;\n padding: 6px 10px; font-size: 13px; line-height: 1.4; background: var(--fd-surface); color: var(--fd-text);\n border: 1px solid var(--fd-border); border-radius: var(--fd-control-radius); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);\n}\n.fd-map-box[data-side=\"left\"] .fd-map-hint { left: 52px; right: 8px; }\n.fd-map-hint p { margin: 0; flex: 1 1 180px; min-width: 0; }\n.fd-map-hint .fd-button { min-height: 28px; padding: 2px 10px; }\n.fd-map-coords { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }\n.fd-map-coords label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--fd-muted); }\n.fd-map-coords .fd-input { width: 12ch; font-variant-numeric: tabular-nums; }\n.fd-map-coords .fd-input[aria-invalid=\"true\"] { border-color: var(--fd-error); }\n.fd-map-note { margin: 0; font-size: 12.5px; color: var(--fd-muted); }\n.fd-map-note[data-tone=\"error\"] { color: var(--fd-error); }\n.fd-map-pin { width: 28px; height: 40px; }\n.fd-map-pin svg { display: block; width: 28px; height: 40px; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.3)); }\n.fd-map-pin .fd-map-pin-body { fill: var(--fd-accent); stroke: var(--fd-surface); stroke-width: 1.5; }\n.fd-map-pin .fd-map-pin-dot { fill: var(--fd-surface); }\n.fd-map-pin:focus-visible { outline: 2px solid var(--fd-focus); outline-offset: 2px; border-radius: 4px; }\npath.fd-map-shape { stroke: var(--fd-accent); fill: var(--fd-accent); stroke-width: 2; fill-opacity: 0.16; }\npath.fd-map-shape.fd-map-movable { cursor: move; }\npath.fd-map-accuracy { stroke: var(--fd-accent); fill: var(--fd-accent); stroke-width: 1; fill-opacity: 0.08; stroke-dasharray: 4 4; pointer-events: none; }\npath.fd-map-trace { stroke: var(--fd-accent); fill: var(--fd-accent); stroke-width: 2; fill-opacity: 0.08; stroke-dasharray: 6 5; pointer-events: none; }\n.fd-map-grip { width: 24px; height: 24px; display: grid; place-items: center; cursor: grab; }\n.fd-map-grip::after {\n content: \"\"; width: 12px; height: 12px; border-radius: 50%; box-sizing: border-box;\n background: var(--fd-surface); border: 2px solid var(--fd-accent); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);\n}\n.fd-map-grip[data-closes]::after { width: 18px; height: 18px; background: var(--fd-accent); border-color: var(--fd-surface); }\n.fd-map-grip:focus-visible { outline: none; }\n.fd-map-grip:focus-visible::after { box-shadow: 0 0 0 3px var(--fd-focus); }\n.fd-map-field select.fd-input { width: auto; max-width: 100%; }\n/* One finger scrolls the page past a map, as on any page; two move it. While a shape is drawn, the map takes every touch. */\n.fd-map-box.leaflet-container, .fd-map-box.leaflet-touch-drag.leaflet-touch-zoom { touch-action: pan-x pan-y; }\n.fd-map-box.leaflet-container[data-drawing] { touch-action: none; }\n.fd-map-box .leaflet-marker-draggable { touch-action: none; }\n.fd-map-grip-add::after { width: 10px; height: 10px; opacity: 0.7; }\n/* Each image overlaps the next by a pixel (leaflet.ts): drawn plainly over it, not added to it as Leaflet's own seam fix adds light. */\n.fd-map-box.leaflet-container img.leaflet-tile { mix-blend-mode: normal; }\n";
|
|
7
|
+
export declare const MAP_CSS = "\n.fd-map-field { display: grid; gap: 8px; min-width: 0; }\n.fd-map-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; }\n.fd-map-tools .fd-button { min-height: 32px; padding-inline: 10px; }\n.fd-map-tools .fd-button[aria-pressed=\"true\"] { background: var(--fd-accent-soft); border-color: var(--fd-accent); color: var(--fd-accent); }\n.fd-map-tools .fd-button svg { width: 16px; height: 16px; flex: none; }\n.fd-map-search { position: relative; flex: 1 1 220px; min-width: 0; }\n.fd-map-results {\n position: absolute; inset-inline: 0; top: calc(100% + 4px); z-index: 1100; margin: 0; padding: 4px; list-style: none;\n background: var(--fd-surface); color: var(--fd-text); border: 1px solid var(--fd-border); border-radius: var(--fd-control-radius);\n box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16); max-height: 240px; overflow: auto;\n}\n.fd-map-results [role=\"option\"] { padding: 6px 8px; border-radius: 4px; cursor: pointer; line-height: 1.35; display: grid; gap: 1px; }\n.fd-map-result-name { color: var(--fd-text); font-weight: 600; overflow-wrap: anywhere; }\n.fd-map-result-detail { color: var(--fd-muted); font-size: 12.5px; overflow-wrap: anywhere; }\n.fd-map-results [role=\"option\"][aria-selected=\"true\"], .fd-map-results [role=\"option\"]:hover { background: var(--fd-accent-soft); }\n.fd-map-results .fd-map-results-note { padding: 6px 8px; color: var(--fd-muted); cursor: default; }\n.fd-map-box {\n position: relative; height: var(--fd-map-height, 280px); min-height: 160px; overflow: hidden; isolation: isolate;\n border: 1px solid var(--fd-border); border-radius: var(--fd-control-radius); background: var(--fd-fill);\n}\n.fd-map-box.leaflet-container:focus { outline: none; }\n.fd-map-box.leaflet-container[data-keys]:focus { outline: 2px solid var(--fd-focus); outline-offset: 1px; }\n.fd-map-box.leaflet-container { font: inherit; background: var(--fd-fill); }\n.fd-map-zoom { position: absolute; top: 8px; z-index: 1000; display: grid; gap: 4px; }\n.fd-map-zoom[data-side=\"right\"] { right: 8px; }\n.fd-map-zoom[data-side=\"left\"] { left: 8px; }\n.fd-map-zoom button {\n width: 32px; height: 32px; display: grid; place-items: center; padding: 0; cursor: pointer; font: 600 18px/1 system-ui, sans-serif;\n background: var(--fd-surface); color: var(--fd-text); border: 1px solid var(--fd-border); border-radius: var(--fd-control-radius);\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);\n}\n.fd-map-zoom button:hover { color: var(--fd-accent); border-color: var(--fd-accent); }\n.fd-map-zoom button:focus-visible, .fd-map-hint button:focus-visible { outline: 2px solid var(--fd-focus); outline-offset: 1px; }\n.fd-map-credits {\n position: absolute; right: 0; bottom: 0; z-index: 1000; max-width: 72%; padding: 1px 6px; font-size: 11px; line-height: 1.5;\n background: color-mix(in srgb, var(--fd-surface) 88%, transparent); color: var(--fd-text); border-top-left-radius: 4px;\n}\n.fd-map-credits a { color: inherit; }\n.fd-map-logo { position: absolute; left: 6px; bottom: 4px; z-index: 1000; display: inline-flex; align-items: center; text-decoration: none; }\n.fd-map-logo img { height: 18px; width: auto; display: block; }\n.fd-map-logo span {\n font: 700 12px/1.4 system-ui, sans-serif; padding: 0 5px; border-radius: 3px;\n background: color-mix(in srgb, var(--fd-surface) 88%, transparent); color: var(--fd-text);\n}\n.fd-map-veil {\n position: absolute; inset: 0; z-index: 1001; display: grid; place-items: center; padding: 16px; text-align: center;\n background: rgba(0, 0, 0, 0.5); color: #fff; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity 0.2s;\n}\n.fd-map-veil[data-show] { opacity: 1; }\n.fd-map-crosshair { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; z-index: 900; pointer-events: none; display: none; }\n.fd-map-crosshair::before, .fd-map-crosshair::after { content: \"\"; position: absolute; background: var(--fd-accent); box-shadow: 0 0 0 1px var(--fd-surface); }\n.fd-map-crosshair::before { left: 10px; top: 0; width: 2px; height: 22px; }\n.fd-map-crosshair::after { top: 10px; left: 0; height: 2px; width: 22px; }\n.fd-map-box[data-keys]:focus .fd-map-crosshair { display: block; }\n.fd-map-hint {\n position: absolute; top: 8px; left: 8px; right: 52px; z-index: 1000; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center;\n padding: 6px 10px; font-size: 13px; line-height: 1.4; background: var(--fd-surface); color: var(--fd-text);\n border: 1px solid var(--fd-border); border-radius: var(--fd-control-radius); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);\n}\n.fd-map-box[data-side=\"left\"] .fd-map-hint { left: 52px; right: 8px; }\n.fd-map-hint p { margin: 0; flex: 1 1 180px; min-width: 0; }\n.fd-map-hint .fd-button { min-height: 28px; padding: 2px 10px; }\n.fd-map-coords { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }\n.fd-map-coords label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--fd-muted); }\n.fd-map-coords .fd-input { width: 12ch; font-variant-numeric: tabular-nums; }\n.fd-map-coords .fd-input[aria-invalid=\"true\"] { border-color: var(--fd-error); }\n.fd-map-note { margin: 0; font-size: 12.5px; color: var(--fd-muted); }\n.fd-map-note[data-tone=\"error\"] { color: var(--fd-error); }\n.fd-map-pin { width: 28px; height: 40px; }\n.fd-map-pin svg { display: block; width: 28px; height: 40px; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.3)); }\n.fd-map-pin .fd-map-pin-body { fill: var(--fd-accent); stroke: var(--fd-surface); stroke-width: 1.5; }\n.fd-map-pin .fd-map-pin-dot { fill: var(--fd-surface); }\n.fd-map-pin:focus-visible { outline: 2px solid var(--fd-focus); outline-offset: 2px; border-radius: 4px; }\npath.fd-map-shape { stroke: var(--fd-accent); fill: var(--fd-accent); stroke-width: 2; fill-opacity: 0.16; }\npath.fd-map-shape.fd-map-movable { cursor: move; }\npath.fd-map-accuracy { stroke: var(--fd-accent); fill: var(--fd-accent); stroke-width: 1; fill-opacity: 0.08; stroke-dasharray: 4 4; pointer-events: none; }\npath.fd-map-trace { stroke: var(--fd-accent); fill: var(--fd-accent); stroke-width: 2; fill-opacity: 0.08; stroke-dasharray: 6 5; pointer-events: none; }\n.fd-map-grip { width: 24px; height: 24px; display: grid; place-items: center; cursor: grab; }\n.fd-map-grip::after {\n content: \"\"; width: 12px; height: 12px; border-radius: 50%; box-sizing: border-box;\n background: var(--fd-surface); border: 2px solid var(--fd-accent); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);\n}\n.fd-map-grip[data-closes]::after { width: 18px; height: 18px; background: var(--fd-accent); border-color: var(--fd-surface); }\n.fd-map-grip:focus-visible { outline: none; }\n.fd-map-grip:focus-visible::after { box-shadow: 0 0 0 3px var(--fd-focus); }\n.fd-map-field select.fd-input { width: auto; max-width: 100%; }\n/* One finger scrolls the page past a map, as on any page; two move it. While a shape is drawn, the map takes every touch. */\n.fd-map-box.leaflet-container, .fd-map-box.leaflet-touch-drag.leaflet-touch-zoom { touch-action: pan-x pan-y; }\n.fd-map-box.leaflet-container[data-drawing] { touch-action: none; }\n.fd-map-box .leaflet-marker-draggable { touch-action: none; }\n.fd-map-grip-add::after { width: 10px; height: 10px; opacity: 0.7; }\n/* Each image overlaps the next by a pixel (leaflet.ts): drawn plainly over it, not added to it as Leaflet's own seam fix adds light. */\n.fd-map-box.leaflet-container img.leaflet-tile { mix-blend-mode: normal; }\n/* The tools under the zoom: drawn as its buttons are, pressed while on. */\n.fd-map-zoom .fd-map-tool { margin-top: 4px; }\n.fd-map-zoom .fd-map-tool svg { width: 18px; height: 18px; }\n.fd-map-zoom .fd-map-tool[aria-pressed=\"true\"] { color: var(--fd-accent); border-color: var(--fd-accent); background: var(--fd-accent-soft); }\n.fd-map-zoom .fd-map-tool[hidden] { display: none; }\n.fd-map-box.fd-map-fixed { position: fixed; inset: 0; z-index: 2147483000; height: auto; border-radius: 0; }\n.fd-map-box[data-full] { border-radius: 0; }\n.fd-map-box[data-measuring] .fd-map-mark { pointer-events: none; }\n";
|
|
8
8
|
/** The maps' own stylesheet, once per document: the tools, the search and the box are drawn before Leaflet has loaded. */
|
|
9
9
|
export declare function installMapStyles(doc: Document): void;
|
|
10
10
|
/** Leaflet's stylesheet, once per document, before the maps' own (which add to it): it comes with Leaflet. */
|
|
@@ -22,6 +22,6 @@ export declare function installListMapStyles(doc: Document): void;
|
|
|
22
22
|
* (the part travelled faded), a place whose news is old, the Follow button,
|
|
23
23
|
* and the reader's own place with its button.
|
|
24
24
|
*/
|
|
25
|
-
export declare const FORM_MAP_CSS = "\n.fd-map-form { display: grid; gap: 6px; min-width: 0; }\n.fd-map-form-label { margin: 0; font-weight: 600; color: var(--fd-text); }\npath.fd-map-route { stroke: var(--fd-accent); stroke-width: 5; stroke-opacity: 0.85; fill: none; stroke-linecap: round; stroke-linejoin: round; }\npath.fd-map-route-done { stroke: var(--fd-muted); stroke-width: 4; stroke-opacity: 0.55; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 8; }\n.fd-map-face[data-stale] { filter: grayscale(1); opacity: 0.75; }\n.fd-map-face-stale {\n position: absolute; top: calc(100% + 4px); left: 50%; translate: -50% 0; z-index: 1; padding: 1px 6px; border-radius: 999px; white-space: nowrap;\n font-size: 11.5px; font-weight: 600; background: var(--fd-surface); color: var(--fd-text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);\n}\n.fd-map-face[data-look=\"photo\"] .fd-map-face-stale { top: calc(100% + 26px); }\n.fd-map-here.fd-map-follow { top: auto; bottom: 28px; }\n.fd-map-locate {\n position: absolute; top: 8px; left: 8px; z-index: 1000; width: 32px; height: 32px; display: grid; place-items: center; padding: 0; cursor: pointer;\n background: var(--fd-surface); color: var(--fd-text); border: 1px solid var(--fd-border); border-radius: var(--fd-control-radius); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);\n}\n.fd-map-box[data-side=\"left\"] .fd-map-locate { left: auto; right: 8px; }\n.fd-map-locate svg { width: 18px; height: 18px; }\n.fd-map-locate:hover, .fd-map-locate[aria-pressed=\"true\"] { color: var(--fd-accent); border-color: var(--fd-accent); }\n.fd-map-locate[aria-pressed=\"true\"] { background: var(--fd-accent-soft); }\n.fd-map-locate:focus-visible { outline: 2px solid var(--fd-focus); outline-offset: 1px; }\n.fd-map-me { box-sizing: border-box; border-radius: 50%; background: var(--fd-info); border: 3px solid var(--fd-surface); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25), 0 1px 4px rgba(0, 0, 0, 0.3); }\n";
|
|
25
|
+
export declare const FORM_MAP_CSS = "\n.fd-map-form { display: grid; gap: 6px; min-width: 0; }\n.fd-map-form-label { margin: 0; font-weight: 600; color: var(--fd-text); }\npath.fd-map-route { stroke: var(--fd-accent); stroke-width: 5; stroke-opacity: 0.85; fill: none; stroke-linecap: round; stroke-linejoin: round; }\npath.fd-map-route-done { stroke: var(--fd-muted); stroke-width: 4; stroke-opacity: 0.55; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 8; }\npath.fd-map-reach { stroke: var(--fd-accent); stroke-width: 2; stroke-dasharray: 6 5; fill: var(--fd-accent); fill-opacity: 0.1; }\npath.fd-map-fence { stroke: var(--fd-warning); stroke-width: 2.5; stroke-dasharray: 2 5; stroke-linecap: round; fill: var(--fd-warning); fill-opacity: 0.12; }\n.fd-map-face[data-stale] { filter: grayscale(1); opacity: 0.75; }\n.fd-map-face-stale {\n position: absolute; top: calc(100% + 4px); left: 50%; translate: -50% 0; z-index: 1; padding: 1px 6px; border-radius: 999px; white-space: nowrap;\n font-size: 11.5px; font-weight: 600; background: var(--fd-surface); color: var(--fd-text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);\n}\n.fd-map-face[data-look=\"photo\"] .fd-map-face-stale { top: calc(100% + 26px); }\n.fd-map-here.fd-map-follow { top: auto; bottom: 28px; }\n.fd-map-locate {\n position: absolute; top: 8px; left: 8px; z-index: 1000; width: 32px; height: 32px; display: grid; place-items: center; padding: 0; cursor: pointer;\n background: var(--fd-surface); color: var(--fd-text); border: 1px solid var(--fd-border); border-radius: var(--fd-control-radius); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);\n}\n.fd-map-box[data-side=\"left\"] .fd-map-locate { left: auto; right: 8px; }\n.fd-map-locate svg { width: 18px; height: 18px; }\n.fd-map-locate:hover, .fd-map-locate[aria-pressed=\"true\"] { color: var(--fd-accent); border-color: var(--fd-accent); }\n.fd-map-locate[aria-pressed=\"true\"] { background: var(--fd-accent-soft); }\n.fd-map-locate:focus-visible { outline: 2px solid var(--fd-focus); outline-offset: 1px; }\n.fd-map-me { box-sizing: border-box; border-radius: 50%; background: var(--fd-info); border: 3px solid var(--fd-surface); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25), 0 1px 4px rgba(0, 0, 0, 0.3); }\n";
|
|
26
26
|
/** A form's map's stylesheet, once per document, after a list map's. */
|
|
27
27
|
export declare function installFormMapStyles(doc: Document): void;
|
package/src/lib/styles.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* grips. Fixed on purpose: the veil over the map that asks for two fingers
|
|
5
5
|
* or Ctrl (white words on a dark veil, as an image's caption has them).
|
|
6
6
|
*/
|
|
7
|
-
export declare const MAP_CSS = "\n.fd-map-field { display: grid; gap: 8px; min-width: 0; }\n.fd-map-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; }\n.fd-map-tools .fd-button { min-height: 32px; padding-inline: 10px; }\n.fd-map-tools .fd-button[aria-pressed=\"true\"] { background: var(--fd-accent-soft); border-color: var(--fd-accent); color: var(--fd-accent); }\n.fd-map-tools .fd-button svg { width: 16px; height: 16px; flex: none; }\n.fd-map-search { position: relative; flex: 1 1 220px; min-width: 0; }\n.fd-map-results {\n position: absolute; inset-inline: 0; top: calc(100% + 4px); z-index: 1100; margin: 0; padding: 4px; list-style: none;\n background: var(--fd-surface); color: var(--fd-text); border: 1px solid var(--fd-border); border-radius: var(--fd-control-radius);\n box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16); max-height: 240px; overflow: auto;\n}\n.fd-map-results [role=\"option\"] { padding: 6px 8px; border-radius: 4px; cursor: pointer; line-height: 1.35; display: grid; gap: 1px; }\n.fd-map-result-name { color: var(--fd-text); font-weight: 600; overflow-wrap: anywhere; }\n.fd-map-result-detail { color: var(--fd-muted); font-size: 12.5px; overflow-wrap: anywhere; }\n.fd-map-results [role=\"option\"][aria-selected=\"true\"], .fd-map-results [role=\"option\"]:hover { background: var(--fd-accent-soft); }\n.fd-map-results .fd-map-results-note { padding: 6px 8px; color: var(--fd-muted); cursor: default; }\n.fd-map-box {\n position: relative; height: var(--fd-map-height, 280px); min-height: 160px; overflow: hidden; isolation: isolate;\n border: 1px solid var(--fd-border); border-radius: var(--fd-control-radius); background: var(--fd-fill);\n}\n.fd-map-box.leaflet-container:focus { outline: none; }\n.fd-map-box.leaflet-container[data-keys]:focus { outline: 2px solid var(--fd-focus); outline-offset: 1px; }\n.fd-map-box.leaflet-container { font: inherit; background: var(--fd-fill); }\n.fd-map-zoom { position: absolute; top: 8px; z-index: 1000; display: grid; gap: 4px; }\n.fd-map-zoom[data-side=\"right\"] { right: 8px; }\n.fd-map-zoom[data-side=\"left\"] { left: 8px; }\n.fd-map-zoom button {\n width: 32px; height: 32px; display: grid; place-items: center; padding: 0; cursor: pointer; font: 600 18px/1 system-ui, sans-serif;\n background: var(--fd-surface); color: var(--fd-text); border: 1px solid var(--fd-border); border-radius: var(--fd-control-radius);\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);\n}\n.fd-map-zoom button:hover { color: var(--fd-accent); border-color: var(--fd-accent); }\n.fd-map-zoom button:focus-visible, .fd-map-hint button:focus-visible { outline: 2px solid var(--fd-focus); outline-offset: 1px; }\n.fd-map-credits {\n position: absolute; right: 0; bottom: 0; z-index: 1000; max-width: 72%; padding: 1px 6px; font-size: 11px; line-height: 1.5;\n background: color-mix(in srgb, var(--fd-surface) 88%, transparent); color: var(--fd-text); border-top-left-radius: 4px;\n}\n.fd-map-credits a { color: inherit; }\n.fd-map-logo { position: absolute; left: 6px; bottom: 4px; z-index: 1000; display: inline-flex; align-items: center; text-decoration: none; }\n.fd-map-logo img { height: 18px; width: auto; display: block; }\n.fd-map-logo span {\n font: 700 12px/1.4 system-ui, sans-serif; padding: 0 5px; border-radius: 3px;\n background: color-mix(in srgb, var(--fd-surface) 88%, transparent); color: var(--fd-text);\n}\n.fd-map-veil {\n position: absolute; inset: 0; z-index: 1001; display: grid; place-items: center; padding: 16px; text-align: center;\n background: rgba(0, 0, 0, 0.5); color: #fff; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity 0.2s;\n}\n.fd-map-veil[data-show] { opacity: 1; }\n.fd-map-crosshair { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; z-index: 900; pointer-events: none; display: none; }\n.fd-map-crosshair::before, .fd-map-crosshair::after { content: \"\"; position: absolute; background: var(--fd-accent); box-shadow: 0 0 0 1px var(--fd-surface); }\n.fd-map-crosshair::before { left: 10px; top: 0; width: 2px; height: 22px; }\n.fd-map-crosshair::after { top: 10px; left: 0; height: 2px; width: 22px; }\n.fd-map-box[data-keys]:focus .fd-map-crosshair { display: block; }\n.fd-map-hint {\n position: absolute; top: 8px; left: 8px; right: 52px; z-index: 1000; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center;\n padding: 6px 10px; font-size: 13px; line-height: 1.4; background: var(--fd-surface); color: var(--fd-text);\n border: 1px solid var(--fd-border); border-radius: var(--fd-control-radius); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);\n}\n.fd-map-box[data-side=\"left\"] .fd-map-hint { left: 52px; right: 8px; }\n.fd-map-hint p { margin: 0; flex: 1 1 180px; min-width: 0; }\n.fd-map-hint .fd-button { min-height: 28px; padding: 2px 10px; }\n.fd-map-coords { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }\n.fd-map-coords label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--fd-muted); }\n.fd-map-coords .fd-input { width: 12ch; font-variant-numeric: tabular-nums; }\n.fd-map-coords .fd-input[aria-invalid=\"true\"] { border-color: var(--fd-error); }\n.fd-map-note { margin: 0; font-size: 12.5px; color: var(--fd-muted); }\n.fd-map-note[data-tone=\"error\"] { color: var(--fd-error); }\n.fd-map-pin { width: 28px; height: 40px; }\n.fd-map-pin svg { display: block; width: 28px; height: 40px; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.3)); }\n.fd-map-pin .fd-map-pin-body { fill: var(--fd-accent); stroke: var(--fd-surface); stroke-width: 1.5; }\n.fd-map-pin .fd-map-pin-dot { fill: var(--fd-surface); }\n.fd-map-pin:focus-visible { outline: 2px solid var(--fd-focus); outline-offset: 2px; border-radius: 4px; }\npath.fd-map-shape { stroke: var(--fd-accent); fill: var(--fd-accent); stroke-width: 2; fill-opacity: 0.16; }\npath.fd-map-shape.fd-map-movable { cursor: move; }\npath.fd-map-accuracy { stroke: var(--fd-accent); fill: var(--fd-accent); stroke-width: 1; fill-opacity: 0.08; stroke-dasharray: 4 4; pointer-events: none; }\npath.fd-map-trace { stroke: var(--fd-accent); fill: var(--fd-accent); stroke-width: 2; fill-opacity: 0.08; stroke-dasharray: 6 5; pointer-events: none; }\n.fd-map-grip { width: 24px; height: 24px; display: grid; place-items: center; cursor: grab; }\n.fd-map-grip::after {\n content: \"\"; width: 12px; height: 12px; border-radius: 50%; box-sizing: border-box;\n background: var(--fd-surface); border: 2px solid var(--fd-accent); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);\n}\n.fd-map-grip[data-closes]::after { width: 18px; height: 18px; background: var(--fd-accent); border-color: var(--fd-surface); }\n.fd-map-grip:focus-visible { outline: none; }\n.fd-map-grip:focus-visible::after { box-shadow: 0 0 0 3px var(--fd-focus); }\n.fd-map-field select.fd-input { width: auto; max-width: 100%; }\n/* One finger scrolls the page past a map, as on any page; two move it. While a shape is drawn, the map takes every touch. */\n.fd-map-box.leaflet-container, .fd-map-box.leaflet-touch-drag.leaflet-touch-zoom { touch-action: pan-x pan-y; }\n.fd-map-box.leaflet-container[data-drawing] { touch-action: none; }\n.fd-map-box .leaflet-marker-draggable { touch-action: none; }\n.fd-map-grip-add::after { width: 10px; height: 10px; opacity: 0.7; }\n/* Each image overlaps the next by a pixel (leaflet.ts): drawn plainly over it, not added to it as Leaflet's own seam fix adds light. */\n.fd-map-box.leaflet-container img.leaflet-tile { mix-blend-mode: normal; }\n";
|
|
7
|
+
export declare const MAP_CSS = "\n.fd-map-field { display: grid; gap: 8px; min-width: 0; }\n.fd-map-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; }\n.fd-map-tools .fd-button { min-height: 32px; padding-inline: 10px; }\n.fd-map-tools .fd-button[aria-pressed=\"true\"] { background: var(--fd-accent-soft); border-color: var(--fd-accent); color: var(--fd-accent); }\n.fd-map-tools .fd-button svg { width: 16px; height: 16px; flex: none; }\n.fd-map-search { position: relative; flex: 1 1 220px; min-width: 0; }\n.fd-map-results {\n position: absolute; inset-inline: 0; top: calc(100% + 4px); z-index: 1100; margin: 0; padding: 4px; list-style: none;\n background: var(--fd-surface); color: var(--fd-text); border: 1px solid var(--fd-border); border-radius: var(--fd-control-radius);\n box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16); max-height: 240px; overflow: auto;\n}\n.fd-map-results [role=\"option\"] { padding: 6px 8px; border-radius: 4px; cursor: pointer; line-height: 1.35; display: grid; gap: 1px; }\n.fd-map-result-name { color: var(--fd-text); font-weight: 600; overflow-wrap: anywhere; }\n.fd-map-result-detail { color: var(--fd-muted); font-size: 12.5px; overflow-wrap: anywhere; }\n.fd-map-results [role=\"option\"][aria-selected=\"true\"], .fd-map-results [role=\"option\"]:hover { background: var(--fd-accent-soft); }\n.fd-map-results .fd-map-results-note { padding: 6px 8px; color: var(--fd-muted); cursor: default; }\n.fd-map-box {\n position: relative; height: var(--fd-map-height, 280px); min-height: 160px; overflow: hidden; isolation: isolate;\n border: 1px solid var(--fd-border); border-radius: var(--fd-control-radius); background: var(--fd-fill);\n}\n.fd-map-box.leaflet-container:focus { outline: none; }\n.fd-map-box.leaflet-container[data-keys]:focus { outline: 2px solid var(--fd-focus); outline-offset: 1px; }\n.fd-map-box.leaflet-container { font: inherit; background: var(--fd-fill); }\n.fd-map-zoom { position: absolute; top: 8px; z-index: 1000; display: grid; gap: 4px; }\n.fd-map-zoom[data-side=\"right\"] { right: 8px; }\n.fd-map-zoom[data-side=\"left\"] { left: 8px; }\n.fd-map-zoom button {\n width: 32px; height: 32px; display: grid; place-items: center; padding: 0; cursor: pointer; font: 600 18px/1 system-ui, sans-serif;\n background: var(--fd-surface); color: var(--fd-text); border: 1px solid var(--fd-border); border-radius: var(--fd-control-radius);\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);\n}\n.fd-map-zoom button:hover { color: var(--fd-accent); border-color: var(--fd-accent); }\n.fd-map-zoom button:focus-visible, .fd-map-hint button:focus-visible { outline: 2px solid var(--fd-focus); outline-offset: 1px; }\n.fd-map-credits {\n position: absolute; right: 0; bottom: 0; z-index: 1000; max-width: 72%; padding: 1px 6px; font-size: 11px; line-height: 1.5;\n background: color-mix(in srgb, var(--fd-surface) 88%, transparent); color: var(--fd-text); border-top-left-radius: 4px;\n}\n.fd-map-credits a { color: inherit; }\n.fd-map-logo { position: absolute; left: 6px; bottom: 4px; z-index: 1000; display: inline-flex; align-items: center; text-decoration: none; }\n.fd-map-logo img { height: 18px; width: auto; display: block; }\n.fd-map-logo span {\n font: 700 12px/1.4 system-ui, sans-serif; padding: 0 5px; border-radius: 3px;\n background: color-mix(in srgb, var(--fd-surface) 88%, transparent); color: var(--fd-text);\n}\n.fd-map-veil {\n position: absolute; inset: 0; z-index: 1001; display: grid; place-items: center; padding: 16px; text-align: center;\n background: rgba(0, 0, 0, 0.5); color: #fff; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity 0.2s;\n}\n.fd-map-veil[data-show] { opacity: 1; }\n.fd-map-crosshair { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; z-index: 900; pointer-events: none; display: none; }\n.fd-map-crosshair::before, .fd-map-crosshair::after { content: \"\"; position: absolute; background: var(--fd-accent); box-shadow: 0 0 0 1px var(--fd-surface); }\n.fd-map-crosshair::before { left: 10px; top: 0; width: 2px; height: 22px; }\n.fd-map-crosshair::after { top: 10px; left: 0; height: 2px; width: 22px; }\n.fd-map-box[data-keys]:focus .fd-map-crosshair { display: block; }\n.fd-map-hint {\n position: absolute; top: 8px; left: 8px; right: 52px; z-index: 1000; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center;\n padding: 6px 10px; font-size: 13px; line-height: 1.4; background: var(--fd-surface); color: var(--fd-text);\n border: 1px solid var(--fd-border); border-radius: var(--fd-control-radius); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);\n}\n.fd-map-box[data-side=\"left\"] .fd-map-hint { left: 52px; right: 8px; }\n.fd-map-hint p { margin: 0; flex: 1 1 180px; min-width: 0; }\n.fd-map-hint .fd-button { min-height: 28px; padding: 2px 10px; }\n.fd-map-coords { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }\n.fd-map-coords label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--fd-muted); }\n.fd-map-coords .fd-input { width: 12ch; font-variant-numeric: tabular-nums; }\n.fd-map-coords .fd-input[aria-invalid=\"true\"] { border-color: var(--fd-error); }\n.fd-map-note { margin: 0; font-size: 12.5px; color: var(--fd-muted); }\n.fd-map-note[data-tone=\"error\"] { color: var(--fd-error); }\n.fd-map-pin { width: 28px; height: 40px; }\n.fd-map-pin svg { display: block; width: 28px; height: 40px; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.3)); }\n.fd-map-pin .fd-map-pin-body { fill: var(--fd-accent); stroke: var(--fd-surface); stroke-width: 1.5; }\n.fd-map-pin .fd-map-pin-dot { fill: var(--fd-surface); }\n.fd-map-pin:focus-visible { outline: 2px solid var(--fd-focus); outline-offset: 2px; border-radius: 4px; }\npath.fd-map-shape { stroke: var(--fd-accent); fill: var(--fd-accent); stroke-width: 2; fill-opacity: 0.16; }\npath.fd-map-shape.fd-map-movable { cursor: move; }\npath.fd-map-accuracy { stroke: var(--fd-accent); fill: var(--fd-accent); stroke-width: 1; fill-opacity: 0.08; stroke-dasharray: 4 4; pointer-events: none; }\npath.fd-map-trace { stroke: var(--fd-accent); fill: var(--fd-accent); stroke-width: 2; fill-opacity: 0.08; stroke-dasharray: 6 5; pointer-events: none; }\n.fd-map-grip { width: 24px; height: 24px; display: grid; place-items: center; cursor: grab; }\n.fd-map-grip::after {\n content: \"\"; width: 12px; height: 12px; border-radius: 50%; box-sizing: border-box;\n background: var(--fd-surface); border: 2px solid var(--fd-accent); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);\n}\n.fd-map-grip[data-closes]::after { width: 18px; height: 18px; background: var(--fd-accent); border-color: var(--fd-surface); }\n.fd-map-grip:focus-visible { outline: none; }\n.fd-map-grip:focus-visible::after { box-shadow: 0 0 0 3px var(--fd-focus); }\n.fd-map-field select.fd-input { width: auto; max-width: 100%; }\n/* One finger scrolls the page past a map, as on any page; two move it. While a shape is drawn, the map takes every touch. */\n.fd-map-box.leaflet-container, .fd-map-box.leaflet-touch-drag.leaflet-touch-zoom { touch-action: pan-x pan-y; }\n.fd-map-box.leaflet-container[data-drawing] { touch-action: none; }\n.fd-map-box .leaflet-marker-draggable { touch-action: none; }\n.fd-map-grip-add::after { width: 10px; height: 10px; opacity: 0.7; }\n/* Each image overlaps the next by a pixel (leaflet.ts): drawn plainly over it, not added to it as Leaflet's own seam fix adds light. */\n.fd-map-box.leaflet-container img.leaflet-tile { mix-blend-mode: normal; }\n/* The tools under the zoom: drawn as its buttons are, pressed while on. */\n.fd-map-zoom .fd-map-tool { margin-top: 4px; }\n.fd-map-zoom .fd-map-tool svg { width: 18px; height: 18px; }\n.fd-map-zoom .fd-map-tool[aria-pressed=\"true\"] { color: var(--fd-accent); border-color: var(--fd-accent); background: var(--fd-accent-soft); }\n.fd-map-zoom .fd-map-tool[hidden] { display: none; }\n.fd-map-box.fd-map-fixed { position: fixed; inset: 0; z-index: 2147483000; height: auto; border-radius: 0; }\n.fd-map-box[data-full] { border-radius: 0; }\n.fd-map-box[data-measuring] .fd-map-mark { pointer-events: none; }\n";
|
|
8
8
|
/** The maps' own stylesheet, once per document: the tools, the search and the box are drawn before Leaflet has loaded. */
|
|
9
9
|
export declare function installMapStyles(doc: Document): void;
|
|
10
10
|
/** Leaflet's stylesheet, once per document, before the maps' own (which add to it): it comes with Leaflet. */
|
|
@@ -22,6 +22,6 @@ export declare function installListMapStyles(doc: Document): void;
|
|
|
22
22
|
* (the part travelled faded), a place whose news is old, the Follow button,
|
|
23
23
|
* and the reader's own place with its button.
|
|
24
24
|
*/
|
|
25
|
-
export declare const FORM_MAP_CSS = "\n.fd-map-form { display: grid; gap: 6px; min-width: 0; }\n.fd-map-form-label { margin: 0; font-weight: 600; color: var(--fd-text); }\npath.fd-map-route { stroke: var(--fd-accent); stroke-width: 5; stroke-opacity: 0.85; fill: none; stroke-linecap: round; stroke-linejoin: round; }\npath.fd-map-route-done { stroke: var(--fd-muted); stroke-width: 4; stroke-opacity: 0.55; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 8; }\n.fd-map-face[data-stale] { filter: grayscale(1); opacity: 0.75; }\n.fd-map-face-stale {\n position: absolute; top: calc(100% + 4px); left: 50%; translate: -50% 0; z-index: 1; padding: 1px 6px; border-radius: 999px; white-space: nowrap;\n font-size: 11.5px; font-weight: 600; background: var(--fd-surface); color: var(--fd-text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);\n}\n.fd-map-face[data-look=\"photo\"] .fd-map-face-stale { top: calc(100% + 26px); }\n.fd-map-here.fd-map-follow { top: auto; bottom: 28px; }\n.fd-map-locate {\n position: absolute; top: 8px; left: 8px; z-index: 1000; width: 32px; height: 32px; display: grid; place-items: center; padding: 0; cursor: pointer;\n background: var(--fd-surface); color: var(--fd-text); border: 1px solid var(--fd-border); border-radius: var(--fd-control-radius); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);\n}\n.fd-map-box[data-side=\"left\"] .fd-map-locate { left: auto; right: 8px; }\n.fd-map-locate svg { width: 18px; height: 18px; }\n.fd-map-locate:hover, .fd-map-locate[aria-pressed=\"true\"] { color: var(--fd-accent); border-color: var(--fd-accent); }\n.fd-map-locate[aria-pressed=\"true\"] { background: var(--fd-accent-soft); }\n.fd-map-locate:focus-visible { outline: 2px solid var(--fd-focus); outline-offset: 1px; }\n.fd-map-me { box-sizing: border-box; border-radius: 50%; background: var(--fd-info); border: 3px solid var(--fd-surface); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25), 0 1px 4px rgba(0, 0, 0, 0.3); }\n";
|
|
25
|
+
export declare const FORM_MAP_CSS = "\n.fd-map-form { display: grid; gap: 6px; min-width: 0; }\n.fd-map-form-label { margin: 0; font-weight: 600; color: var(--fd-text); }\npath.fd-map-route { stroke: var(--fd-accent); stroke-width: 5; stroke-opacity: 0.85; fill: none; stroke-linecap: round; stroke-linejoin: round; }\npath.fd-map-route-done { stroke: var(--fd-muted); stroke-width: 4; stroke-opacity: 0.55; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 8; }\npath.fd-map-reach { stroke: var(--fd-accent); stroke-width: 2; stroke-dasharray: 6 5; fill: var(--fd-accent); fill-opacity: 0.1; }\npath.fd-map-fence { stroke: var(--fd-warning); stroke-width: 2.5; stroke-dasharray: 2 5; stroke-linecap: round; fill: var(--fd-warning); fill-opacity: 0.12; }\n.fd-map-face[data-stale] { filter: grayscale(1); opacity: 0.75; }\n.fd-map-face-stale {\n position: absolute; top: calc(100% + 4px); left: 50%; translate: -50% 0; z-index: 1; padding: 1px 6px; border-radius: 999px; white-space: nowrap;\n font-size: 11.5px; font-weight: 600; background: var(--fd-surface); color: var(--fd-text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);\n}\n.fd-map-face[data-look=\"photo\"] .fd-map-face-stale { top: calc(100% + 26px); }\n.fd-map-here.fd-map-follow { top: auto; bottom: 28px; }\n.fd-map-locate {\n position: absolute; top: 8px; left: 8px; z-index: 1000; width: 32px; height: 32px; display: grid; place-items: center; padding: 0; cursor: pointer;\n background: var(--fd-surface); color: var(--fd-text); border: 1px solid var(--fd-border); border-radius: var(--fd-control-radius); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);\n}\n.fd-map-box[data-side=\"left\"] .fd-map-locate { left: auto; right: 8px; }\n.fd-map-locate svg { width: 18px; height: 18px; }\n.fd-map-locate:hover, .fd-map-locate[aria-pressed=\"true\"] { color: var(--fd-accent); border-color: var(--fd-accent); }\n.fd-map-locate[aria-pressed=\"true\"] { background: var(--fd-accent-soft); }\n.fd-map-locate:focus-visible { outline: 2px solid var(--fd-focus); outline-offset: 1px; }\n.fd-map-me { box-sizing: border-box; border-radius: 50%; background: var(--fd-info); border: 3px solid var(--fd-surface); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25), 0 1px 4px rgba(0, 0, 0, 0.3); }\n";
|
|
26
26
|
/** A form's map's stylesheet, once per document, after a list map's. */
|
|
27
27
|
export declare function installFormMapStyles(doc: Document): void;
|
package/src/lib/styles.js
CHANGED
|
@@ -105,6 +105,14 @@ path.fd-map-trace { stroke: var(--fd-accent); fill: var(--fd-accent); stroke-wid
|
|
|
105
105
|
.fd-map-grip-add::after { width: 10px; height: 10px; opacity: 0.7; }
|
|
106
106
|
/* Each image overlaps the next by a pixel (leaflet.ts): drawn plainly over it, not added to it as Leaflet's own seam fix adds light. */
|
|
107
107
|
.fd-map-box.leaflet-container img.leaflet-tile { mix-blend-mode: normal; }
|
|
108
|
+
/* The tools under the zoom: drawn as its buttons are, pressed while on. */
|
|
109
|
+
.fd-map-zoom .fd-map-tool { margin-top: 4px; }
|
|
110
|
+
.fd-map-zoom .fd-map-tool svg { width: 18px; height: 18px; }
|
|
111
|
+
.fd-map-zoom .fd-map-tool[aria-pressed="true"] { color: var(--fd-accent); border-color: var(--fd-accent); background: var(--fd-accent-soft); }
|
|
112
|
+
.fd-map-zoom .fd-map-tool[hidden] { display: none; }
|
|
113
|
+
.fd-map-box.fd-map-fixed { position: fixed; inset: 0; z-index: 2147483000; height: auto; border-radius: 0; }
|
|
114
|
+
.fd-map-box[data-full] { border-radius: 0; }
|
|
115
|
+
.fd-map-box[data-measuring] .fd-map-mark { pointer-events: none; }
|
|
108
116
|
`;
|
|
109
117
|
/** The maps' own stylesheet, once per document: the tools, the search and the box are drawn before Leaflet has loaded. */
|
|
110
118
|
function installMapStyles(doc) {
|
|
@@ -279,6 +287,8 @@ exports.FORM_MAP_CSS = `
|
|
|
279
287
|
.fd-map-form-label { margin: 0; font-weight: 600; color: var(--fd-text); }
|
|
280
288
|
path.fd-map-route { stroke: var(--fd-accent); stroke-width: 5; stroke-opacity: 0.85; fill: none; stroke-linecap: round; stroke-linejoin: round; }
|
|
281
289
|
path.fd-map-route-done { stroke: var(--fd-muted); stroke-width: 4; stroke-opacity: 0.55; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 8; }
|
|
290
|
+
path.fd-map-reach { stroke: var(--fd-accent); stroke-width: 2; stroke-dasharray: 6 5; fill: var(--fd-accent); fill-opacity: 0.1; }
|
|
291
|
+
path.fd-map-fence { stroke: var(--fd-warning); stroke-width: 2.5; stroke-dasharray: 2 5; stroke-linecap: round; fill: var(--fd-warning); fill-opacity: 0.12; }
|
|
282
292
|
.fd-map-face[data-stale] { filter: grayscale(1); opacity: 0.75; }
|
|
283
293
|
.fd-map-face-stale {
|
|
284
294
|
position: absolute; top: calc(100% + 4px); left: 50%; translate: -50% 0; z-index: 1; padding: 1px 6px; border-radius: 999px; white-space: nowrap;
|
package/src/lib/styles.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../../libs/map/src/lib/styles.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../../libs/map/src/lib/styles.ts"],"names":[],"mappings":";;;AA+GA,4CAOC;AAGD,oDAQC;AAsID,oDAOC;AAkCD,oDAOC;AAvTD;;;;;GAKG;AACU,QAAA,OAAO,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,GAAG,GAAG,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IACvC,GAAG,CAAC,EAAE,GAAG,yBAAyB,CAAC;IACnC,GAAG,CAAC,WAAW,GAAG,oBAAY,CAAC;IAC/B,GAAG,CAAC,cAAc,CAAC,oBAAoB,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;AACvD,CAAC;AAED;;;;GAIG;AACU,QAAA,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;CAwB3B,CAAC;AAEF,wEAAwE;AACxE,SAAgB,oBAAoB,CAAC,GAAa;IAChD,oBAAoB,CAAC,GAAG,CAAC,CAAC;IAC1B,IAAI,GAAG,CAAC,cAAc,CAAC,yBAAyB,CAAC;QAAE,OAAO;IAC1D,MAAM,GAAG,GAAG,GAAG,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IACvC,GAAG,CAAC,EAAE,GAAG,yBAAyB,CAAC;IACnC,GAAG,CAAC,WAAW,GAAG,oBAAY,CAAC;IAC/B,GAAG,CAAC,cAAc,CAAC,yBAAyB,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;AAC5D,CAAC"}
|
package/src/lib/styles.mjs
CHANGED
|
@@ -98,6 +98,14 @@ path.fd-map-trace { stroke: var(--fd-accent); fill: var(--fd-accent); stroke-wid
|
|
|
98
98
|
.fd-map-grip-add::after { width: 10px; height: 10px; opacity: 0.7; }
|
|
99
99
|
/* Each image overlaps the next by a pixel (leaflet.ts): drawn plainly over it, not added to it as Leaflet's own seam fix adds light. */
|
|
100
100
|
.fd-map-box.leaflet-container img.leaflet-tile { mix-blend-mode: normal; }
|
|
101
|
+
/* The tools under the zoom: drawn as its buttons are, pressed while on. */
|
|
102
|
+
.fd-map-zoom .fd-map-tool { margin-top: 4px; }
|
|
103
|
+
.fd-map-zoom .fd-map-tool svg { width: 18px; height: 18px; }
|
|
104
|
+
.fd-map-zoom .fd-map-tool[aria-pressed="true"] { color: var(--fd-accent); border-color: var(--fd-accent); background: var(--fd-accent-soft); }
|
|
105
|
+
.fd-map-zoom .fd-map-tool[hidden] { display: none; }
|
|
106
|
+
.fd-map-box.fd-map-fixed { position: fixed; inset: 0; z-index: 2147483000; height: auto; border-radius: 0; }
|
|
107
|
+
.fd-map-box[data-full] { border-radius: 0; }
|
|
108
|
+
.fd-map-box[data-measuring] .fd-map-mark { pointer-events: none; }
|
|
101
109
|
`;
|
|
102
110
|
/** The maps' own stylesheet, once per document: the tools, the search and the box are drawn before Leaflet has loaded. */
|
|
103
111
|
export function installMapStyles(doc) {
|
|
@@ -272,6 +280,8 @@ export const FORM_MAP_CSS = `
|
|
|
272
280
|
.fd-map-form-label { margin: 0; font-weight: 600; color: var(--fd-text); }
|
|
273
281
|
path.fd-map-route { stroke: var(--fd-accent); stroke-width: 5; stroke-opacity: 0.85; fill: none; stroke-linecap: round; stroke-linejoin: round; }
|
|
274
282
|
path.fd-map-route-done { stroke: var(--fd-muted); stroke-width: 4; stroke-opacity: 0.55; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 8; }
|
|
283
|
+
path.fd-map-reach { stroke: var(--fd-accent); stroke-width: 2; stroke-dasharray: 6 5; fill: var(--fd-accent); fill-opacity: 0.1; }
|
|
284
|
+
path.fd-map-fence { stroke: var(--fd-warning); stroke-width: 2.5; stroke-dasharray: 2 5; stroke-linecap: round; fill: var(--fd-warning); fill-opacity: 0.12; }
|
|
275
285
|
.fd-map-face[data-stale] { filter: grayscale(1); opacity: 0.75; }
|
|
276
286
|
.fd-map-face-stale {
|
|
277
287
|
position: absolute; top: calc(100% + 4px); left: 50%; translate: -50% 0; z-index: 1; padding: 1px 6px; border-radius: 999px; white-space: nowrap;
|
package/src/lib/styles.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.mjs","sourceRoot":"","sources":["../../../../../libs/map/src/lib/styles.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4H3B,CAAC;AAEF,yEAAyE;AACzE,MAAM,UAAU,oBAAoB,CAAC,GAAa;IAChD,gBAAgB,CAAC,GAAG,CAAC,CAAC;IACtB,IAAI,GAAG,CAAC,cAAc,CAAC,yBAAyB,CAAC;QAAE,OAAO;IAC1D,MAAM,GAAG,GAAG,GAAG,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IACvC,GAAG,CAAC,EAAE,GAAG,yBAAyB,CAAC;IACnC,GAAG,CAAC,WAAW,GAAG,YAAY,CAAC;IAC/B,GAAG,CAAC,cAAc,CAAC,oBAAoB,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;AACvD,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;CAwB3B,CAAC;AAEF,wEAAwE;AACxE,MAAM,UAAU,oBAAoB,CAAC,GAAa;IAChD,oBAAoB,CAAC,GAAG,CAAC,CAAC;IAC1B,IAAI,GAAG,CAAC,cAAc,CAAC,yBAAyB,CAAC;QAAE,OAAO;IAC1D,MAAM,GAAG,GAAG,GAAG,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IACvC,GAAG,CAAC,EAAE,GAAG,yBAAyB,CAAC;IACnC,GAAG,CAAC,WAAW,GAAG,YAAY,CAAC;IAC/B,GAAG,CAAC,cAAc,CAAC,yBAAyB,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;AAC5D,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type * as Leaflet from 'leaflet';
|
|
2
|
+
import type { Locale } from '@fieldia/core';
|
|
3
|
+
import type { MapLabels } from './labels.mjs';
|
|
4
|
+
import type { LeafletModule } from './leaflet.mjs';
|
|
5
|
+
import type { MapBox, MapTool } from './map-core.mjs';
|
|
6
|
+
import type { MapProvider } from './providers.mjs';
|
|
7
|
+
/**
|
|
8
|
+
* The tools under a map's zoom, those its page asks for: the satellite's
|
|
9
|
+
* images (no button where the provider has none), full screen (filling the
|
|
10
|
+
* window where the browser refuses the screen, as a frame may), and measuring
|
|
11
|
+
* a way (its drawing asked for as the tools come, so a key pressed straight
|
|
12
|
+
* after its press is not lost). Loaded with the first map that has any.
|
|
13
|
+
*/
|
|
14
|
+
export declare function wireTools(options: {
|
|
15
|
+
tools: ReadonlySet<MapTool>;
|
|
16
|
+
box: MapBox;
|
|
17
|
+
map: Leaflet.Map;
|
|
18
|
+
L: LeafletModule;
|
|
19
|
+
document: Document;
|
|
20
|
+
labels: MapLabels;
|
|
21
|
+
locale: Locale;
|
|
22
|
+
provider: MapProvider;
|
|
23
|
+
/** The satellite's images on or off: the map draws them. */
|
|
24
|
+
satellite(on: boolean): void;
|
|
25
|
+
/** What to undo when the map goes. */
|
|
26
|
+
cleanup(done: () => void): void;
|
|
27
|
+
}): void;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type * as Leaflet from 'leaflet';
|
|
2
|
+
import type { Locale } from '@fieldia/core';
|
|
3
|
+
import type { MapLabels } from './labels';
|
|
4
|
+
import type { LeafletModule } from './leaflet';
|
|
5
|
+
import type { MapBox, MapTool } from './map-core';
|
|
6
|
+
import type { MapProvider } from './providers';
|
|
7
|
+
/**
|
|
8
|
+
* The tools under a map's zoom, those its page asks for: the satellite's
|
|
9
|
+
* images (no button where the provider has none), full screen (filling the
|
|
10
|
+
* window where the browser refuses the screen, as a frame may), and measuring
|
|
11
|
+
* a way (its drawing asked for as the tools come, so a key pressed straight
|
|
12
|
+
* after its press is not lost). Loaded with the first map that has any.
|
|
13
|
+
*/
|
|
14
|
+
export declare function wireTools(options: {
|
|
15
|
+
tools: ReadonlySet<MapTool>;
|
|
16
|
+
box: MapBox;
|
|
17
|
+
map: Leaflet.Map;
|
|
18
|
+
L: LeafletModule;
|
|
19
|
+
document: Document;
|
|
20
|
+
labels: MapLabels;
|
|
21
|
+
locale: Locale;
|
|
22
|
+
provider: MapProvider;
|
|
23
|
+
/** The satellite's images on or off: the map draws them. */
|
|
24
|
+
satellite(on: boolean): void;
|
|
25
|
+
/** What to undo when the map goes. */
|
|
26
|
+
cleanup(done: () => void): void;
|
|
27
|
+
}): void;
|
package/src/lib/tools.js
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.wireTools = wireTools;
|
|
4
|
+
/**
|
|
5
|
+
* The tools under a map's zoom, those its page asks for: the satellite's
|
|
6
|
+
* images (no button where the provider has none), full screen (filling the
|
|
7
|
+
* window where the browser refuses the screen, as a frame may), and measuring
|
|
8
|
+
* a way (its drawing asked for as the tools come, so a key pressed straight
|
|
9
|
+
* after its press is not lost). Loaded with the first map that has any.
|
|
10
|
+
*/
|
|
11
|
+
function wireTools(options) {
|
|
12
|
+
const { tools, box, map, labels, locale, document: doc } = options;
|
|
13
|
+
const element = box.element;
|
|
14
|
+
if (tools.has('satellite')) {
|
|
15
|
+
const button = box.tool(labels.satellite, '<circle cx="12" cy="12" r="3"/><path d="M5 5l3 3M16 16l3 3M19 5l-3 3M8 16l-3 3"/><rect x="3" y="3" width="18" height="18" rx="3" stroke-dasharray="2 3"/>');
|
|
16
|
+
// A provider with no such images: no such button.
|
|
17
|
+
button.hidden = true;
|
|
18
|
+
void options.provider.tiles('satellite', locale).then((spec) => (button.hidden = !spec), () => (button.hidden = true));
|
|
19
|
+
let on = false;
|
|
20
|
+
button.addEventListener('click', () => {
|
|
21
|
+
on = !on;
|
|
22
|
+
button.setAttribute('aria-pressed', String(on));
|
|
23
|
+
options.satellite(on);
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
if (tools.has('fullscreen')) {
|
|
27
|
+
const button = box.tool(labels.fullScreen, '<path d="M4 9V4h5M15 4h5v5M20 15v5h-5M9 20H4v-5"/>');
|
|
28
|
+
const mark = (on) => {
|
|
29
|
+
element.toggleAttribute('data-full', on);
|
|
30
|
+
button.setAttribute('aria-pressed', String(on));
|
|
31
|
+
button.setAttribute('aria-label', on ? labels.leaveFullScreen : labels.fullScreen);
|
|
32
|
+
button.title = button.getAttribute('aria-label') ?? '';
|
|
33
|
+
setTimeout(() => map.invalidateSize({ pan: false }), 50);
|
|
34
|
+
};
|
|
35
|
+
// Where the browser refuses the screen (a frame that may not), the map fills the window instead.
|
|
36
|
+
const fill = (on) => {
|
|
37
|
+
element.classList.toggle('fd-map-fixed', on);
|
|
38
|
+
mark(on);
|
|
39
|
+
};
|
|
40
|
+
const change = () => mark(doc.fullscreenElement === element);
|
|
41
|
+
doc.addEventListener('fullscreenchange', change);
|
|
42
|
+
options.cleanup(() => doc.removeEventListener('fullscreenchange', change));
|
|
43
|
+
button.addEventListener('click', () => {
|
|
44
|
+
if (element.hasAttribute('data-full')) {
|
|
45
|
+
if (doc.fullscreenElement === element)
|
|
46
|
+
void doc.exitFullscreen();
|
|
47
|
+
else
|
|
48
|
+
fill(false);
|
|
49
|
+
}
|
|
50
|
+
else if (element.requestFullscreen)
|
|
51
|
+
element.requestFullscreen().catch(() => fill(true));
|
|
52
|
+
else
|
|
53
|
+
fill(true);
|
|
54
|
+
});
|
|
55
|
+
element.addEventListener('keydown', (event) => {
|
|
56
|
+
if (event.key === 'Escape' && element.classList.contains('fd-map-fixed'))
|
|
57
|
+
fill(false);
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
if (tools.has('measure')) {
|
|
61
|
+
const button = box.tool(labels.measure, '<path d="M3 17L17 3l4 4L7 21z"/><path d="M7 13l2 2M10 10l2 2M13 7l2 2"/>');
|
|
62
|
+
let stop = null;
|
|
63
|
+
const measuring = Promise.resolve().then(() => require('./measure'));
|
|
64
|
+
button.addEventListener('click', async () => {
|
|
65
|
+
if (stop)
|
|
66
|
+
return stop();
|
|
67
|
+
button.setAttribute('aria-pressed', 'true');
|
|
68
|
+
const { measure } = await measuring;
|
|
69
|
+
stop = measure({
|
|
70
|
+
box,
|
|
71
|
+
map,
|
|
72
|
+
L: options.L,
|
|
73
|
+
labels,
|
|
74
|
+
locale,
|
|
75
|
+
stopped: () => {
|
|
76
|
+
stop = null;
|
|
77
|
+
button.setAttribute('aria-pressed', 'false');
|
|
78
|
+
button.focus();
|
|
79
|
+
},
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../../../../../libs/map/src/lib/tools.ts"],"names":[],"mappings":";;AAcA,8BA8EC;AArFD;;;;;;GAMG;AACH,SAAgB,SAAS,CAAC,OAazB;IACC,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC;IACnE,MAAM,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC;IAC5B,IAAI,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,CAAC;QAC3B,MAAM,MAAM,GAAG,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,2JAA2J,CAAC,CAAC;QACvM,kDAAkD;QAClD,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC;QACrB,KAAK,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC;QACvH,IAAI,EAAE,GAAG,KAAK,CAAC;QACf,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,GAAG,EAAE;YACpC,EAAE,GAAG,C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OAAO,EAAE,GAAG,MAAM,SAAS,CAAC;YACpC,IAAI,GAAG,OAAO,CAAC;gBACb,GAAG;gBACH,GAAG;gBACH,CAAC,EAAE,OAAO,CAAC,CAAC;gBACZ,MAAM;gBACN,MAAM;gBACN,OAAO,EAAE,GAAG,EAAE;oBACZ,IAAI,GAAG,IAAI,CAAC;oBACZ,MAAM,CAAC,YAAY,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;oBAC7C,MAAM,CAAC,KAAK,EAAE,CAAC;gBACjB,CAAC;aACF,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The tools under a map's zoom, those its page asks for: the satellite's
|
|
3
|
+
* images (no button where the provider has none), full screen (filling the
|
|
4
|
+
* window where the browser refuses the screen, as a frame may), and measuring
|
|
5
|
+
* a way (its drawing asked for as the tools come, so a key pressed straight
|
|
6
|
+
* after its press is not lost). Loaded with the first map that has any.
|
|
7
|
+
*/
|
|
8
|
+
export function wireTools(options) {
|
|
9
|
+
const { tools, box, map, labels, locale, document: doc } = options;
|
|
10
|
+
const element = box.element;
|
|
11
|
+
if (tools.has('satellite')) {
|
|
12
|
+
const button = box.tool(labels.satellite, '<circle cx="12" cy="12" r="3"/><path d="M5 5l3 3M16 16l3 3M19 5l-3 3M8 16l-3 3"/><rect x="3" y="3" width="18" height="18" rx="3" stroke-dasharray="2 3"/>');
|
|
13
|
+
// A provider with no such images: no such button.
|
|
14
|
+
button.hidden = true;
|
|
15
|
+
void options.provider.tiles('satellite', locale).then((spec) => (button.hidden = !spec), () => (button.hidden = true));
|
|
16
|
+
let on = false;
|
|
17
|
+
button.addEventListener('click', () => {
|
|
18
|
+
on = !on;
|
|
19
|
+
button.setAttribute('aria-pressed', String(on));
|
|
20
|
+
options.satellite(on);
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
if (tools.has('fullscreen')) {
|
|
24
|
+
const button = box.tool(labels.fullScreen, '<path d="M4 9V4h5M15 4h5v5M20 15v5h-5M9 20H4v-5"/>');
|
|
25
|
+
const mark = (on) => {
|
|
26
|
+
element.toggleAttribute('data-full', on);
|
|
27
|
+
button.setAttribute('aria-pressed', String(on));
|
|
28
|
+
button.setAttribute('aria-label', on ? labels.leaveFullScreen : labels.fullScreen);
|
|
29
|
+
button.title = button.getAttribute('aria-label') ?? '';
|
|
30
|
+
setTimeout(() => map.invalidateSize({ pan: false }), 50);
|
|
31
|
+
};
|
|
32
|
+
// Where the browser refuses the screen (a frame that may not), the map fills the window instead.
|
|
33
|
+
const fill = (on) => {
|
|
34
|
+
element.classList.toggle('fd-map-fixed', on);
|
|
35
|
+
mark(on);
|
|
36
|
+
};
|
|
37
|
+
const change = () => mark(doc.fullscreenElement === element);
|
|
38
|
+
doc.addEventListener('fullscreenchange', change);
|
|
39
|
+
options.cleanup(() => doc.removeEventListener('fullscreenchange', change));
|
|
40
|
+
button.addEventListener('click', () => {
|
|
41
|
+
if (element.hasAttribute('data-full')) {
|
|
42
|
+
if (doc.fullscreenElement === element)
|
|
43
|
+
void doc.exitFullscreen();
|
|
44
|
+
else
|
|
45
|
+
fill(false);
|
|
46
|
+
}
|
|
47
|
+
else if (element.requestFullscreen)
|
|
48
|
+
element.requestFullscreen().catch(() => fill(true));
|
|
49
|
+
else
|
|
50
|
+
fill(true);
|
|
51
|
+
});
|
|
52
|
+
element.addEventListener('keydown', (event) => {
|
|
53
|
+
if (event.key === 'Escape' && element.classList.contains('fd-map-fixed'))
|
|
54
|
+
fill(false);
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
if (tools.has('measure')) {
|
|
58
|
+
const button = box.tool(labels.measure, '<path d="M3 17L17 3l4 4L7 21z"/><path d="M7 13l2 2M10 10l2 2M13 7l2 2"/>');
|
|
59
|
+
let stop = null;
|
|
60
|
+
const measuring = import('./measure.mjs');
|
|
61
|
+
button.addEventListener('click', async () => {
|
|
62
|
+
if (stop)
|
|
63
|
+
return stop();
|
|
64
|
+
button.setAttribute('aria-pressed', 'true');
|
|
65
|
+
const { measure } = await measuring;
|
|
66
|
+
stop = measure({
|
|
67
|
+
box,
|
|
68
|
+
map,
|
|
69
|
+
L: options.L,
|
|
70
|
+
labels,
|
|
71
|
+
locale,
|
|
72
|
+
stopped: () => {
|
|
73
|
+
stop = null;
|
|
74
|
+
button.setAttribute('aria-pressed', 'false');
|
|
75
|
+
button.focus();
|
|
76
|
+
},
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=tools.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.mjs","sourceRoot":"","sources":["../../../../../libs/map/src/lib/tools.ts"],"names":[],"mappings":"AAOA;;;;;;GAMG;AACH,MAAM,UAAU,SAAS,CAAC,OAazB;IACC,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC;IACnE,MAAM,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC;IAC5B,IAAI,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,CAAC;QAC3B,MAAM,MAAM,GAAG,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,2JAA2J,CAAC,CAAC;QACvM,kDAAkD;QAClD,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC;QACrB,KAAK,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC;QACvH,IAAI,EAAE,GAAG,KAAK,CAAC;QACf,MAAM,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