@geolonia/maps-core 0.5.0 → 0.6.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 +107 -2
- package/dist/npm/index.d.ts +9 -1
- package/dist/npm/index.js +62 -18
- package/package.json +12 -13
- package/src/assets/style.css +74 -3
- package/dist/npm/index.cjs +0 -2075
- package/dist/npm/index.d.cts +0 -872
package/README.md
CHANGED
|
@@ -10,7 +10,93 @@ Designed to be side-effect-free and DOM-independent, serving as the shared found
|
|
|
10
10
|
npm install @geolonia/maps-core maplibre-gl
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
`maplibre-gl` is a peer dependency.
|
|
13
|
+
`maplibre-gl` is a peer dependency. v6.x is required (`^6.0.0`).
|
|
14
|
+
|
|
15
|
+
This package is ESM-only, following MapLibre GL JS v6. There is no `require()`
|
|
16
|
+
entry point. If you need a script-tag build, use the UMD bundle attached to each
|
|
17
|
+
[GitHub Release](https://github.com/geolonia/maps-core/releases) — it is
|
|
18
|
+
self-contained and needs no worker setup. It does run its worker from a Blob
|
|
19
|
+
URL, so a page with a Content-Security-Policy needs `worker-src blob:`.
|
|
20
|
+
|
|
21
|
+
### Worker setup
|
|
22
|
+
|
|
23
|
+
MapLibre GL JS v6 ships ESM-only and loads its worker from a real URL resolved
|
|
24
|
+
against `import.meta.url`. Most bundlers do not carry that file over on their
|
|
25
|
+
own, so the map silently never finishes loading unless you point MapLibre at
|
|
26
|
+
the worker yourself. Do this once, before the first map is created.
|
|
27
|
+
|
|
28
|
+
Two files are involved, not one: `maplibre-gl-worker.mjs` is a small shim that
|
|
29
|
+
imports `./maplibre-gl-shared.mjs` as a sibling. That splits the setups in two.
|
|
30
|
+
Run the worker through the bundler's own worker pipeline and it comes out as a
|
|
31
|
+
self-contained chunk, with nothing else to place. Copy or serve the shim
|
|
32
|
+
verbatim instead, and the sibling has to sit next to it in the output — miss it
|
|
33
|
+
and the worker dies on its first import, with no exception and no console error.
|
|
34
|
+
|
|
35
|
+
Vite has such a pipeline, and `?worker&url` is what routes the file through it:
|
|
36
|
+
|
|
37
|
+
```typescript
|
|
38
|
+
// Vite
|
|
39
|
+
import workerUrl from 'maplibre-gl/dist/maplibre-gl-worker.mjs?worker&url';
|
|
40
|
+
import { setWorkerUrl } from 'maplibre-gl';
|
|
41
|
+
|
|
42
|
+
setWorkerUrl(workerUrl);
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Plain `?url` is not enough — it emits the shim verbatim, which puts you in the
|
|
46
|
+
second case without the sibling.
|
|
47
|
+
|
|
48
|
+
webpack is in that second case: copy both files into the output and point at the
|
|
49
|
+
copy. Note that `new URL('maplibre-gl/dist/maplibre-gl-worker.mjs', import.meta.url)`
|
|
50
|
+
does *not* work — webpack emits the shim on its own, leaving the sibling import
|
|
51
|
+
to 404.
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
npm install --save-dev copy-webpack-plugin
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
```js
|
|
58
|
+
// webpack.config.js
|
|
59
|
+
const CopyPlugin = require('copy-webpack-plugin');
|
|
60
|
+
|
|
61
|
+
module.exports = {
|
|
62
|
+
plugins: [
|
|
63
|
+
new CopyPlugin({
|
|
64
|
+
patterns: [
|
|
65
|
+
{
|
|
66
|
+
from: require.resolve('maplibre-gl/dist/maplibre-gl-worker.mjs'),
|
|
67
|
+
to: 'maplibre-gl-worker.mjs',
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
from: require.resolve('maplibre-gl/dist/maplibre-gl-shared.mjs'),
|
|
71
|
+
to: 'maplibre-gl-shared.mjs',
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
}),
|
|
75
|
+
],
|
|
76
|
+
};
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
```typescript
|
|
80
|
+
import { setWorkerUrl } from 'maplibre-gl';
|
|
81
|
+
|
|
82
|
+
setWorkerUrl('maplibre-gl-worker.mjs');
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
For esbuild, Rollup and Turbopack, see
|
|
86
|
+
[the MapLibre docs](https://maplibre.org/maplibre-gl-js/docs/) — and work out
|
|
87
|
+
which of the two cases above your setup lands in.
|
|
88
|
+
|
|
89
|
+
Loading MapLibre from a CDN as an ES module needs no setup: the worker URL is
|
|
90
|
+
derived from the module's own URL. Cross-origin, MapLibre starts that worker
|
|
91
|
+
from a same-origin Blob URL, so the page needs `worker-src blob:`. If your CSP
|
|
92
|
+
cannot allow that, host the two worker files yourself and name the worker
|
|
93
|
+
explicitly before creating a map:
|
|
94
|
+
|
|
95
|
+
```typescript
|
|
96
|
+
import { setWorkerUrl } from 'maplibre-gl';
|
|
97
|
+
|
|
98
|
+
setWorkerUrl('/path/to/maplibre-gl-worker.mjs');
|
|
99
|
+
```
|
|
14
100
|
|
|
15
101
|
## Usage
|
|
16
102
|
|
|
@@ -75,9 +161,28 @@ const map = new GeoloniaMap({
|
|
|
75
161
|
clusterColor: '#ff0000',
|
|
76
162
|
simpleVector: 'my-tileset', // Vector tile URL or tileset ID
|
|
77
163
|
'3d': false,
|
|
164
|
+
errorMessage: undefined, // Message shown when the map fails to initialize
|
|
78
165
|
});
|
|
79
166
|
```
|
|
80
167
|
|
|
168
|
+
#### `errorMessage`
|
|
169
|
+
|
|
170
|
+
When the map cannot be initialized (typically because WebGL is unavailable on the
|
|
171
|
+
device), the container is replaced with a message telling the visitor what to try:
|
|
172
|
+
restart the browser, restart the device, try another browser, update the graphics
|
|
173
|
+
driver, and contact the site owner if it still fails. The message is shortened, and
|
|
174
|
+
finally reduced to the headline alone, as the map container gets smaller.
|
|
175
|
+
|
|
176
|
+
Pass `errorMessage` to take that over:
|
|
177
|
+
|
|
178
|
+
```typescript
|
|
179
|
+
// Replace the wording. The value is rendered as plain text, not as HTML.
|
|
180
|
+
new GeoloniaMap({ container: '#map', errorMessage: 'Sorry, the map is unavailable.' });
|
|
181
|
+
|
|
182
|
+
// Show nothing at all, e.g. when the page renders its own fallback.
|
|
183
|
+
new GeoloniaMap({ container: '#map', errorMessage: false });
|
|
184
|
+
```
|
|
185
|
+
|
|
81
186
|
### `GeoloniaMarker`
|
|
82
187
|
|
|
83
188
|
Extends `maplibregl.Marker` with Geolonia's default marker style.
|
|
@@ -123,7 +228,7 @@ keyring.setStage('v1');
|
|
|
123
228
|
|
|
124
229
|
```bash
|
|
125
230
|
npm install
|
|
126
|
-
npm run build # ESM +
|
|
231
|
+
npm run build # ESM + DTS
|
|
127
232
|
npm run test # Vitest unit tests
|
|
128
233
|
npm run e2e # Playwright E2E tests
|
|
129
234
|
npm run lint # Biome
|
package/dist/npm/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as maplibregl from 'maplibre-gl';
|
|
2
|
+
import { IControl, ControlPosition, Map, MapOptions, ExpiryData, StyleSpecification, StyleSwapOptions, StyleOptions, GetResourceResponse, MarkerOptions } from 'maplibre-gl';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Shadow DOM を用いたカスタム帰属表示コントロールの実装です。
|
|
@@ -248,6 +249,13 @@ type GeoloniaMapOptions = MapOptions & {
|
|
|
248
249
|
* @defaultValue `false`
|
|
249
250
|
*/
|
|
250
251
|
"3d"?: boolean;
|
|
252
|
+
/**
|
|
253
|
+
* 地図の初期化に失敗したときに表示する文言。
|
|
254
|
+
* 文字列を指定するとその文言に差し替える(HTML としては解釈しない)。
|
|
255
|
+
* `false` または `'off'` を指定するとエラー表示自体を行わない。
|
|
256
|
+
* 未指定のときは、原因と利用者が試せる復旧手順を示す既定の案内を表示する。
|
|
257
|
+
*/
|
|
258
|
+
errorMessage?: string | false;
|
|
251
259
|
};
|
|
252
260
|
|
|
253
261
|
type GetImageCallback = (error?: Error | null, image?: HTMLImageElement | ImageBitmap | null, expiry?: ExpiryData | null) => void;
|
package/dist/npm/index.js
CHANGED
|
@@ -7,7 +7,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
7
7
|
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
|
|
8
8
|
|
|
9
9
|
// src/lib/maplibre-util.ts
|
|
10
|
-
import maplibregl from "maplibre-gl";
|
|
10
|
+
import * as maplibregl from "maplibre-gl";
|
|
11
11
|
var _docStyle, _userSelect, _selectProp, _transformProp;
|
|
12
12
|
var _DOM = class _DOM {
|
|
13
13
|
static testProp(props) {
|
|
@@ -365,11 +365,11 @@ var CustomAttributionControl = class {
|
|
|
365
365
|
attributions.push(this.options.customAttribution);
|
|
366
366
|
}
|
|
367
367
|
}
|
|
368
|
-
const
|
|
369
|
-
for (const id in
|
|
370
|
-
const
|
|
371
|
-
if (
|
|
372
|
-
const source =
|
|
368
|
+
const tileManagers = this._map.style.tileManagers ?? this._map.style.sourceCaches ?? {};
|
|
369
|
+
for (const id in tileManagers) {
|
|
370
|
+
const tileManager = tileManagers[id];
|
|
371
|
+
if (tileManager.used || tileManager.usedForTerrain) {
|
|
372
|
+
const source = tileManager.getSource();
|
|
373
373
|
if (source.attribution && attributions.indexOf(source.attribution) < 0) {
|
|
374
374
|
attributions.push(source.attribution);
|
|
375
375
|
}
|
|
@@ -481,11 +481,11 @@ var GeoloniaControl = class {
|
|
|
481
481
|
};
|
|
482
482
|
|
|
483
483
|
// src/lib/geolonia-map.ts
|
|
484
|
-
import maplibregl5 from "maplibre-gl";
|
|
484
|
+
import * as maplibregl5 from "maplibre-gl";
|
|
485
485
|
import { Protocol } from "pmtiles";
|
|
486
486
|
|
|
487
487
|
// src/lib/geolonia-marker.ts
|
|
488
|
-
import maplibregl2 from "maplibre-gl";
|
|
488
|
+
import * as maplibregl2 from "maplibre-gl";
|
|
489
489
|
import tinycolor from "tinycolor2";
|
|
490
490
|
var MARKER_SVG = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 52 67">
|
|
491
491
|
<path class="left" d="M26 0C11.664 0 0 11.663 0 26c0 22.14 26 41 26 41V26h0C26 11.663 26 0 26 0z" fill="#E4402F"/>
|
|
@@ -536,7 +536,7 @@ var GeoloniaMarker = class extends maplibregl2.Marker {
|
|
|
536
536
|
// src/lib/simplestyle.ts
|
|
537
537
|
import bbox from "@turf/bbox";
|
|
538
538
|
import turfCenter from "@turf/center";
|
|
539
|
-
import maplibregl3 from "maplibre-gl";
|
|
539
|
+
import * as maplibregl3 from "maplibre-gl";
|
|
540
540
|
|
|
541
541
|
// src/lib/keyring.ts
|
|
542
542
|
var DEFAULT_STAGE = "v1";
|
|
@@ -743,15 +743,57 @@ function handleRestrictedMode(map) {
|
|
|
743
743
|
container.classList.add("geolonia__restricted-mode-image-container");
|
|
744
744
|
}
|
|
745
745
|
}
|
|
746
|
-
function handleErrorMode(container) {
|
|
746
|
+
function handleErrorMode(container, options = {}) {
|
|
747
|
+
if (options.message === false) {
|
|
748
|
+
return;
|
|
749
|
+
}
|
|
750
|
+
const message = (options.message ?? "").trim();
|
|
751
|
+
if (message.toLowerCase() === "off") {
|
|
752
|
+
return;
|
|
753
|
+
}
|
|
754
|
+
container.classList.add("geolonia__error-host");
|
|
747
755
|
const errorContainer = document.createElement("div");
|
|
748
756
|
errorContainer.classList.add("geolonia__error-container");
|
|
749
757
|
const div = document.createElement("div");
|
|
750
|
-
const h2 = document.createElement("h2");
|
|
751
|
-
h2.textContent = "Geolonia Maps";
|
|
752
|
-
div.appendChild(h2);
|
|
753
758
|
div.classList.add("geolonia__error-message");
|
|
754
|
-
div.
|
|
759
|
+
div.setAttribute("role", "alert");
|
|
760
|
+
const description = document.createElement("div");
|
|
761
|
+
description.classList.add("geolonia__error-message-description");
|
|
762
|
+
if (message) {
|
|
763
|
+
description.textContent = message;
|
|
764
|
+
div.appendChild(description);
|
|
765
|
+
} else {
|
|
766
|
+
const title = document.createElement("h2");
|
|
767
|
+
title.classList.add("geolonia__error-message-title");
|
|
768
|
+
title.textContent = "\u5730\u56F3\u3092\u8868\u793A\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F";
|
|
769
|
+
div.appendChild(title);
|
|
770
|
+
const lead = document.createElement("p");
|
|
771
|
+
lead.classList.add("geolonia__error-message-lead");
|
|
772
|
+
lead.textContent = "\u304A\u4F7F\u3044\u306E\u74B0\u5883\u3067\u5730\u56F3\u306E\u63CF\u753B\u6A5F\u80FD\uFF08WebGL\uFF09\u304C\u5229\u7528\u3067\u304D\u306A\u3044\u72B6\u614B\u306B\u306A\u3063\u3066\u3044\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002\u6B21\u306E\u9806\u306B\u304A\u8A66\u3057\u304F\u3060\u3055\u3044\u3002";
|
|
773
|
+
description.appendChild(lead);
|
|
774
|
+
const steps = document.createElement("ol");
|
|
775
|
+
steps.classList.add("geolonia__error-message-steps");
|
|
776
|
+
for (const step of [
|
|
777
|
+
"\u30D6\u30E9\u30A6\u30B6\u3092\u3059\u3079\u3066\u9589\u3058\u3066\u3001\u958B\u304D\u76F4\u3059",
|
|
778
|
+
"\u30D1\u30BD\u30B3\u30F3\u3084\u30B9\u30DE\u30FC\u30C8\u30D5\u30A9\u30F3\u3092\u518D\u8D77\u52D5\u3059\u308B",
|
|
779
|
+
"\u5225\u306E\u30D6\u30E9\u30A6\u30B6\u3067\u958B\u304F",
|
|
780
|
+
"\u30D1\u30BD\u30B3\u30F3\u306E\u5834\u5408\u306F\u3001\u30B0\u30E9\u30D5\u30A3\u30C3\u30AF\u30C9\u30E9\u30A4\u30D0\u3092\u66F4\u65B0\u3059\u308B"
|
|
781
|
+
]) {
|
|
782
|
+
const li = document.createElement("li");
|
|
783
|
+
li.textContent = step;
|
|
784
|
+
steps.appendChild(li);
|
|
785
|
+
}
|
|
786
|
+
description.appendChild(steps);
|
|
787
|
+
const contact = document.createElement("p");
|
|
788
|
+
contact.classList.add("geolonia__error-message-contact");
|
|
789
|
+
contact.textContent = "\u89E3\u6C7A\u3057\u306A\u3044\u5834\u5408\u306F\u3001\u3053\u306E\u30B5\u30A4\u30C8\u306E\u7A93\u53E3\u307E\u3067\u3054\u9023\u7D61\u304F\u3060\u3055\u3044\u3002";
|
|
790
|
+
description.appendChild(contact);
|
|
791
|
+
const brief = document.createElement("p");
|
|
792
|
+
brief.classList.add("geolonia__error-message-brief");
|
|
793
|
+
brief.textContent = "\u30D6\u30E9\u30A6\u30B6\u3084\u7AEF\u672B\u3092\u518D\u8D77\u52D5\u3059\u308B\u3068\u89E3\u6D88\u3059\u308B\u5834\u5408\u304C\u3042\u308A\u307E\u3059\u3002";
|
|
794
|
+
description.appendChild(brief);
|
|
795
|
+
div.appendChild(description);
|
|
796
|
+
}
|
|
755
797
|
errorContainer.appendChild(div);
|
|
756
798
|
container.appendChild(errorContainer);
|
|
757
799
|
}
|
|
@@ -1267,7 +1309,7 @@ var SimpleStyle = class {
|
|
|
1267
1309
|
|
|
1268
1310
|
// src/lib/simplestyle-vector.ts
|
|
1269
1311
|
import turfCenter2 from "@turf/center";
|
|
1270
|
-
import maplibregl4 from "maplibre-gl";
|
|
1312
|
+
import * as maplibregl4 from "maplibre-gl";
|
|
1271
1313
|
var textColor2 = "#000000";
|
|
1272
1314
|
var textHaloColor2 = "#FFFFFF";
|
|
1273
1315
|
var backgroundColor2 = "rgba(255, 0, 0, 0.4)";
|
|
@@ -1790,14 +1832,16 @@ var GeoloniaMap = class extends maplibregl5.Map {
|
|
|
1790
1832
|
"cluster",
|
|
1791
1833
|
"clusterColor",
|
|
1792
1834
|
"simpleVector",
|
|
1793
|
-
"3d"
|
|
1835
|
+
"3d",
|
|
1836
|
+
"errorMessage"
|
|
1794
1837
|
]) {
|
|
1795
1838
|
delete mapOptions[key];
|
|
1796
1839
|
}
|
|
1797
1840
|
try {
|
|
1798
1841
|
super(mapOptions);
|
|
1799
1842
|
} catch (error) {
|
|
1800
|
-
|
|
1843
|
+
container.querySelector(".loading-geolonia-map")?.remove();
|
|
1844
|
+
handleErrorMode(container, { message: options.errorMessage });
|
|
1801
1845
|
throw error;
|
|
1802
1846
|
}
|
|
1803
1847
|
this.geoloniaSourcesUrl = sourcesUrl;
|
|
@@ -2011,7 +2055,7 @@ var GeoloniaMap = class extends maplibregl5.Map {
|
|
|
2011
2055
|
};
|
|
2012
2056
|
|
|
2013
2057
|
// src/version.ts
|
|
2014
|
-
var VERSION = "0.
|
|
2058
|
+
var VERSION = "0.6.0";
|
|
2015
2059
|
export {
|
|
2016
2060
|
attribution_default as CustomAttributionControl,
|
|
2017
2061
|
DEFAULT_STAGE,
|
package/package.json
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geolonia/maps-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"main": "dist/npm/index.cjs",
|
|
6
5
|
"module": "dist/npm/index.js",
|
|
7
6
|
"types": "dist/npm/index.d.ts",
|
|
8
7
|
"exports": {
|
|
9
8
|
".": {
|
|
10
9
|
"types": "./dist/npm/index.d.ts",
|
|
11
|
-
"import": "./dist/npm/index.js"
|
|
12
|
-
"require": "./dist/npm/index.cjs"
|
|
10
|
+
"import": "./dist/npm/index.js"
|
|
13
11
|
},
|
|
14
12
|
"./css": "./src/assets/style.css"
|
|
15
13
|
},
|
|
@@ -19,29 +17,30 @@
|
|
|
19
17
|
],
|
|
20
18
|
"dependencies": {
|
|
21
19
|
"@geolonia/maplibre-gesture-handling": "^3.0.0",
|
|
22
|
-
"@turf/bbox": "^7.
|
|
23
|
-
"@turf/center": "^7.
|
|
24
|
-
"pmtiles": "^4.
|
|
25
|
-
"sanitize-html": "^2.17.
|
|
20
|
+
"@turf/bbox": "^7.4.0",
|
|
21
|
+
"@turf/center": "^7.4.0",
|
|
22
|
+
"pmtiles": "^4.5.0",
|
|
23
|
+
"sanitize-html": "^2.17.7",
|
|
26
24
|
"tinycolor2": "^1.4.1"
|
|
27
25
|
},
|
|
28
26
|
"peerDependencies": {
|
|
29
|
-
"maplibre-gl": "^
|
|
27
|
+
"maplibre-gl": "^6.0.0"
|
|
30
28
|
},
|
|
31
29
|
"devDependencies": {
|
|
32
30
|
"@biomejs/biome": "^2.0.0",
|
|
33
31
|
"@playwright/test": "^1.58.2",
|
|
34
32
|
"@types/sanitize-html": "^2.16.1",
|
|
35
33
|
"@types/tinycolor2": "^1.4.6",
|
|
36
|
-
"@vitest/coverage-v8": "^
|
|
34
|
+
"@vitest/coverage-v8": "^5.0.1",
|
|
35
|
+
"esbuild": "^0.28.1",
|
|
37
36
|
"jsdom": "^29.0.1",
|
|
38
|
-
"maplibre-gl": "
|
|
37
|
+
"maplibre-gl": "6.10.0",
|
|
39
38
|
"tsup": "^8",
|
|
40
39
|
"typedoc": "^0.28.20",
|
|
41
40
|
"typedoc-plugin-markdown": "^4.12.0",
|
|
42
41
|
"typescript": "^5.8",
|
|
43
|
-
"vite": "^8.
|
|
44
|
-
"vitest": "^
|
|
42
|
+
"vite": "^8.1.2",
|
|
43
|
+
"vitest": "^5.0.2"
|
|
45
44
|
},
|
|
46
45
|
"scripts": {
|
|
47
46
|
"build": "tsup",
|
package/src/assets/style.css
CHANGED
|
@@ -112,6 +112,17 @@
|
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
/* Style for error message */
|
|
115
|
+
|
|
116
|
+
/* エラー表示の絶対配置が地図コンテナ基準になるようにする。 */
|
|
117
|
+
.geolonia__error-host {
|
|
118
|
+
position: relative;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/*
|
|
122
|
+
* 文言は「手順を書き切った版」と「短縮版」の両方が DOM にあり、
|
|
123
|
+
* どちらを見せるかは地図コンテナの広さで切り替える。
|
|
124
|
+
* コンテナクエリ非対応のブラウザでは手順を書き切った版が出る(情報が減る側に倒さない)。
|
|
125
|
+
*/
|
|
115
126
|
.geolonia__error-container {
|
|
116
127
|
display: flex;
|
|
117
128
|
justify-content: center;
|
|
@@ -121,22 +132,82 @@
|
|
|
121
132
|
background-color: #dedede;
|
|
122
133
|
z-index: 9999;
|
|
123
134
|
position: absolute;
|
|
135
|
+
container-type: size;
|
|
136
|
+
container-name: geolonia-error;
|
|
124
137
|
}
|
|
125
138
|
|
|
126
139
|
.geolonia__error-message {
|
|
127
|
-
max-width:
|
|
140
|
+
max-width: 360px;
|
|
141
|
+
max-height: calc(100% - 20px);
|
|
142
|
+
overflow: auto;
|
|
128
143
|
background-color: #ffffff;
|
|
129
144
|
margin: 10px;
|
|
130
145
|
padding: 0.75rem 1.25rem;
|
|
131
146
|
border-radius: 6px;
|
|
132
|
-
position: absolute;
|
|
133
147
|
z-index: 99999;
|
|
134
148
|
word-wrap: break-word;
|
|
135
149
|
box-shadow: 0 4px 10px #0000001a;
|
|
150
|
+
font-size: 14px;
|
|
151
|
+
line-height: 1.6;
|
|
152
|
+
color: #333333;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.geolonia__error-message-title {
|
|
156
|
+
margin: 0 0 0.5em;
|
|
157
|
+
font-size: 16px;
|
|
158
|
+
line-height: 1.4;
|
|
136
159
|
}
|
|
137
160
|
|
|
138
161
|
.geolonia__error-message-description {
|
|
139
|
-
margin:
|
|
162
|
+
margin: 0;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.geolonia__error-message-lead {
|
|
166
|
+
margin: 0 0 0.5em;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.geolonia__error-message-steps {
|
|
170
|
+
margin: 0 0 0.5em;
|
|
171
|
+
padding-left: 1.4em;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.geolonia__error-message-contact {
|
|
175
|
+
margin: 0;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.geolonia__error-message-brief {
|
|
179
|
+
display: none;
|
|
180
|
+
margin: 0;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/* 中くらいの地図:手順リストは収まらないので 1 行の短縮版に切り替える */
|
|
184
|
+
@container geolonia-error ((max-width: 379px) or (max-height: 259px)) {
|
|
185
|
+
.geolonia__error-message-lead,
|
|
186
|
+
.geolonia__error-message-steps,
|
|
187
|
+
.geolonia__error-message-contact {
|
|
188
|
+
display: none;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.geolonia__error-message-brief {
|
|
192
|
+
display: block;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/* 小さい地図:見出しだけにする */
|
|
197
|
+
@container geolonia-error ((max-width: 239px) or (max-height: 139px)) {
|
|
198
|
+
.geolonia__error-message {
|
|
199
|
+
padding: 0.5rem 0.75rem;
|
|
200
|
+
font-size: 13px;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.geolonia__error-message-title {
|
|
204
|
+
margin: 0;
|
|
205
|
+
font-size: 14px;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.geolonia__error-message-brief {
|
|
209
|
+
display: none;
|
|
210
|
+
}
|
|
140
211
|
}
|
|
141
212
|
|
|
142
213
|
/* CSS for Attribution */
|