@geolonia/maps-core 0.0.1

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/package.json ADDED
@@ -0,0 +1,54 @@
1
+ {
2
+ "name": "@geolonia/maps-core",
3
+ "version": "0.0.1",
4
+ "type": "module",
5
+ "main": "dist/index.cjs",
6
+ "module": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.js",
12
+ "require": "./dist/index.cjs"
13
+ },
14
+ "./css": "./src/assets/style.css"
15
+ },
16
+ "files": [
17
+ "dist",
18
+ "src/assets/style.css"
19
+ ],
20
+ "dependencies": {
21
+ "@geolonia/mbgl-gesture-handling": "^1.0.15",
22
+ "@mapbox/geojson-extent": "^1.0.0",
23
+ "@turf/center": "^6.0.1",
24
+ "pmtiles": "^4.4.0",
25
+ "sanitize-html": "^2.8.0",
26
+ "tinycolor2": "^1.4.1"
27
+ },
28
+ "peerDependencies": {
29
+ "maplibre-gl": "^5.0.0"
30
+ },
31
+ "devDependencies": {
32
+ "@biomejs/biome": "^2.0.0",
33
+ "@playwright/test": "^1.58.2",
34
+ "@types/sanitize-html": "^2.16.1",
35
+ "@types/tinycolor2": "^1.4.6",
36
+ "jsdom": "^29.0.1",
37
+ "maplibre-gl": "5.7.0",
38
+ "tsup": "^8",
39
+ "typescript": "^5.8",
40
+ "vite": "^7.3.1",
41
+ "vitest": "^3.2.0"
42
+ },
43
+ "scripts": {
44
+ "prepare": "tsup src/index.ts --format esm,cjs --dts --external maplibre-gl",
45
+ "build": "tsup src/index.ts --format esm,cjs --dts --external maplibre-gl",
46
+ "test": "vitest run",
47
+ "test:watch": "vitest",
48
+ "dev": "vite --config vite.config.ts",
49
+ "e2e": "playwright test",
50
+ "lint": "biome check src/ test/ e2e/ example/",
51
+ "lint:fix": "biome check --write src/ test/ e2e/ example/"
52
+ },
53
+ "license": "MIT"
54
+ }
@@ -0,0 +1,166 @@
1
+ .geolonia-clickable-marker {
2
+ cursor: pointer;
3
+ }
4
+
5
+ /* Make fullscreen mode works with ie11 */
6
+ .geolonia:-ms-fullscreen {
7
+ width: 100%;
8
+ height: 100%;
9
+ }
10
+
11
+ /**
12
+ * Styles for loading effect.
13
+ */
14
+ .loading-geolonia-map {
15
+ position: absolute;
16
+ top: 0;
17
+ left: 0;
18
+ width: 100%;
19
+ height: 100%;
20
+ background-color: rgba(255, 255, 255, 0.5);
21
+ z-index: 9999;
22
+ justify-content: center;
23
+ align-items: center;
24
+ display: flex;
25
+ }
26
+
27
+ .loading-geolonia-map .lds-grid {
28
+ display: inline-block;
29
+ position: relative;
30
+ width: 80px;
31
+ height: 80px;
32
+ }
33
+
34
+ .loading-geolonia-map .lds-grid div {
35
+ position: absolute;
36
+ width: 16px;
37
+ height: 16px;
38
+ border-radius: 50%;
39
+ background: #999999;
40
+ animation: lds-grid 1.2s linear infinite;
41
+ }
42
+
43
+ .loading-geolonia-map .lds-grid div:nth-child(1) {
44
+ top: 8px;
45
+ left: 8px;
46
+ animation-delay: 0s;
47
+ }
48
+
49
+ .loading-geolonia-map .lds-grid div:nth-child(2) {
50
+ top: 8px;
51
+ left: 32px;
52
+ animation-delay: -0.4s;
53
+ }
54
+
55
+ .loading-geolonia-map .lds-grid div:nth-child(3) {
56
+ top: 8px;
57
+ left: 56px;
58
+ animation-delay: -0.8s;
59
+ }
60
+
61
+ .loading-geolonia-map .lds-grid div:nth-child(4) {
62
+ top: 32px;
63
+ left: 8px;
64
+ animation-delay: -0.4s;
65
+ }
66
+
67
+ .loading-geolonia-map .lds-grid div:nth-child(5) {
68
+ top: 32px;
69
+ left: 32px;
70
+ animation-delay: -0.8s;
71
+ }
72
+
73
+ .loading-geolonia-map .lds-grid div:nth-child(6) {
74
+ top: 32px;
75
+ left: 56px;
76
+ animation-delay: -1.2s;
77
+ }
78
+
79
+ .loading-geolonia-map .lds-grid div:nth-child(7) {
80
+ top: 56px;
81
+ left: 8px;
82
+ animation-delay: -0.8s;
83
+ }
84
+
85
+ .loading-geolonia-map .lds-grid div:nth-child(8) {
86
+ top: 56px;
87
+ left: 32px;
88
+ animation-delay: -1.2s;
89
+ }
90
+
91
+ .loading-geolonia-map .lds-grid div:nth-child(9) {
92
+ top: 56px;
93
+ left: 56px;
94
+ animation-delay: -1.6s;
95
+ }
96
+
97
+ @keyframes lds-grid {
98
+ 0%,
99
+ 100% {
100
+ opacity: 1;
101
+ }
102
+ 50% {
103
+ opacity: 0.5;
104
+ }
105
+ }
106
+
107
+ /* Style for restricted mode */
108
+ .geolonia__restricted-mode-image-container {
109
+ background-image: url("https://geolonia.github.io/embed/restricted.jpg");
110
+ background-position: center center;
111
+ background-size: cover;
112
+ }
113
+
114
+ /* Style for error message */
115
+ .geolonia__error-container {
116
+ display: flex;
117
+ justify-content: center;
118
+ align-items: center;
119
+ height: 100%;
120
+ width: 100%;
121
+ background-color: #dedede;
122
+ z-index: 9999;
123
+ position: absolute;
124
+ }
125
+
126
+ .geolonia__error-message {
127
+ max-width: 300px;
128
+ background-color: #ffffff;
129
+ margin: 10px;
130
+ padding: 0.75rem 1.25rem;
131
+ border-radius: 6px;
132
+ position: absolute;
133
+ z-index: 99999;
134
+ word-wrap: break-word;
135
+ box-shadow: 0 4px 10px #0000001a;
136
+ }
137
+
138
+ .geolonia__error-message-description {
139
+ margin: 15px 0;
140
+ }
141
+
142
+ /* CSS for Attribution */
143
+ /* Fix: https://github.com/geolonia/embed/issues/291 */
144
+ .maplibregl-map {
145
+ display: block !important;
146
+ }
147
+
148
+ .maplibregl-ctrl-attrib-inner {
149
+ display: block !important;
150
+ }
151
+
152
+ .maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner {
153
+ display: none !important;
154
+ }
155
+
156
+ .maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner,
157
+ .maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button {
158
+ display: block !important;
159
+ }
160
+ /* End: CSS for Attribution */
161
+
162
+ @media print {
163
+ .maplibregl-control-container button {
164
+ display: none;
165
+ }
166
+ }