hoekens-anchor-alarm 2.2.0 → 2.3.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hoekens-anchor-alarm",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "Anchor alarm with various shapes, scope calculator, scribble tracks, engine override, and physically accurate icons.",
5
5
  "main": "src/index.cjs",
6
6
  "type": "module",
@@ -18,6 +18,7 @@
18
18
  "files": [
19
19
  "src",
20
20
  "shared",
21
+ "screenshots",
21
22
  "public"
22
23
  ],
23
24
  "lint-staged": {
@@ -26,11 +27,23 @@
26
27
  },
27
28
  "keywords": [
28
29
  "signalk-node-server-plugin",
29
- "signalk-webapp"
30
+ "signalk-webapp",
31
+ "signalk-category-utility",
32
+ "signalk-category-notifications"
30
33
  ],
31
34
  "signalk": {
32
35
  "appIcon": "anchoralarm.png",
33
- "displayName": "Hoeken's Anchor Alarm"
36
+ "displayName": "Hoeken's Anchor Alarm",
37
+ "screenshots": [
38
+ "./screenshots/circle.png",
39
+ "./screenshots/sector.png",
40
+ "./screenshots/polygon.png",
41
+ "./screenshots/satellite.png",
42
+ "./screenshots/config.png"
43
+ ],
44
+ "recommends": [
45
+ "signalk-tides"
46
+ ]
34
47
  },
35
48
  "author": {
36
49
  "name": "Zach Hoeken",
@@ -44,6 +57,7 @@
44
57
  "@signalk/client": "^2.4.0",
45
58
  "@signalk/tracks-plugin": "^2.0.2",
46
59
  "@turf/turf": "^7.3.5",
60
+ "d3": "^7.9.0",
47
61
  "mathjs": "^15.2.0",
48
62
  "simplify-js": "^1.2.4"
49
63
  },
@@ -38,7 +38,7 @@ body,
38
38
  display: flex;
39
39
  flex-direction: column;
40
40
  gap: 6px;
41
- font-size: 23px;
41
+ font-size: 22px;
42
42
  }
43
43
 
44
44
  #controlToolbar button {
@@ -48,15 +48,20 @@ body,
48
48
  -webkit-appearance: none;
49
49
  appearance: none;
50
50
  border-radius: 5px;
51
- border: 1px solid #888;
52
- background-color: #f0f0f0;
51
+ border: 2px solid rgba(0, 0, 0, 0.2);
52
+ background-clip: padding-box;
53
+ background-color: white;
53
54
  color: black;
54
55
  font-size: inherit;
55
56
  }
56
57
 
58
+ #zoneShapeSelect {
59
+ font-size: 20px;
60
+ }
61
+
57
62
  .info {
58
63
  padding: 5px;
59
- width: 200px;
64
+ width: 150px;
60
65
  font-size: 11pt;
61
66
  line-height: 1.1;
62
67
  background-color: white;
@@ -133,18 +138,26 @@ body,
133
138
  color: red;
134
139
  }
135
140
 
141
+ #loginPrompt,
136
142
  #anchorDown,
137
143
  #anchorUp,
138
144
  #zoneShapeSelect {
139
145
  display: none;
140
146
  }
141
147
 
148
+ #loginPrompt button,
142
149
  #anchorDown button,
143
150
  #anchorUp button {
144
151
  width: 100%;
145
152
  box-sizing: border-box;
146
153
  }
147
154
 
155
+ #loginPrompt button {
156
+ font-size: 18px;
157
+ width: 80px;
158
+ height: 30px;
159
+ }
160
+
148
161
  #zoneShapeSelect select {
149
162
  pointer-events: auto;
150
163
  width: 100%;
@@ -153,8 +166,9 @@ body,
153
166
  -webkit-appearance: none;
154
167
  appearance: none;
155
168
  border-radius: 5px;
156
- border: 1px solid #888;
157
- background-color: #f0f0f0;
169
+ border: 2px solid rgba(0, 0, 0, 0.2);
170
+ background-clip: padding-box;
171
+ background-color: white;
158
172
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'><path fill='black' d='M0 0l6 8 6-8z'/></svg>");
159
173
  background-repeat: no-repeat;
160
174
  background-position: right 10px center;
@@ -207,8 +221,9 @@ body,
207
221
  -webkit-appearance: none;
208
222
  appearance: none;
209
223
  border-radius: 5px;
210
- border: 1px solid #888;
211
- background-color: #f0f0f0;
224
+ border: 2px solid rgba(0, 0, 0, 0.2);
225
+ background-clip: padding-box;
226
+ background-color: white;
212
227
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'><path fill='black' d='M0 0l6 8 6-8z'/></svg>");
213
228
  background-repeat: no-repeat;
214
229
  background-position: right 10px center;
@@ -225,12 +240,151 @@ body,
225
240
  box-sizing: border-box;
226
241
  }
227
242
 
228
- .leaflet-control-home {
243
+ .leaflet-control-home,
244
+ .leaflet-control-config {
229
245
  display: flex !important;
230
246
  align-items: center;
231
247
  justify-content: center;
232
248
  }
233
249
 
250
+ .leaflet-control-config svg path {
251
+ stroke: currentColor;
252
+ stroke-width: 1;
253
+ }
254
+
255
+ #configDialogBackdrop {
256
+ position: absolute;
257
+ inset: 0;
258
+ z-index: 1000;
259
+ display: flex;
260
+ align-items: center;
261
+ justify-content: center;
262
+ background-color: rgba(0, 0, 0, 0.6);
263
+ pointer-events: auto;
264
+ }
265
+
266
+ #configDialog {
267
+ background-color: white;
268
+ border-radius: 6px;
269
+ box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
270
+ width: 280px;
271
+ max-width: calc(100% - 40px);
272
+ max-height: calc(100% - 40px);
273
+ overflow-y: auto;
274
+ padding: 12px 16px 16px;
275
+ font-size: 11pt;
276
+ box-sizing: border-box;
277
+ }
278
+
279
+ #configDialogHeader {
280
+ display: flex;
281
+ align-items: center;
282
+ justify-content: space-between;
283
+ font-weight: bold;
284
+ font-size: 13pt;
285
+ margin-bottom: 10px;
286
+ }
287
+
288
+ #configDialogClose {
289
+ -webkit-appearance: none;
290
+ appearance: none;
291
+ border: none;
292
+ background: transparent;
293
+ font-size: 20px;
294
+ line-height: 1;
295
+ cursor: pointer;
296
+ color: #555;
297
+ padding: 0 4px;
298
+ }
299
+
300
+ #configForm {
301
+ display: flex;
302
+ flex-direction: column;
303
+ gap: 10px;
304
+ }
305
+
306
+ .configRow {
307
+ display: flex;
308
+ flex-direction: column;
309
+ gap: 3px;
310
+ }
311
+
312
+ .configRow.configRowCheckbox {
313
+ flex-direction: row;
314
+ align-items: center;
315
+ gap: 8px;
316
+ }
317
+
318
+ .configLabel {
319
+ color: #333;
320
+ }
321
+
322
+ .configInput {
323
+ font-family: inherit;
324
+ font-size: inherit;
325
+ box-sizing: border-box;
326
+ }
327
+
328
+ .configRow:not(.configRowCheckbox) .configInput {
329
+ width: 100%;
330
+ height: 32px;
331
+ border-radius: 4px;
332
+ border: 1px solid #888;
333
+ background-color: #f7f7f7;
334
+ padding: 0 8px;
335
+ }
336
+
337
+ .configRowCheckbox .configInput {
338
+ width: 18px;
339
+ height: 18px;
340
+ }
341
+
342
+ .configReloadNote {
343
+ margin-top: 10px;
344
+ font-size: 9pt;
345
+ color: #777;
346
+ }
347
+
348
+ #configStatus {
349
+ display: none;
350
+ margin-top: 8px;
351
+ font-size: 10pt;
352
+ }
353
+
354
+ #configStatus.configStatusOk {
355
+ color: green;
356
+ }
357
+
358
+ #configStatus.configStatusError {
359
+ color: red;
360
+ }
361
+
362
+ #configVersion {
363
+ margin-top: 8px;
364
+ font-size: 8pt;
365
+ color: #999;
366
+ }
367
+
368
+ /* Map attribution pinned to the very bottom of the page, spanning full width
369
+ and sitting above the map (which fills #map_container). */
370
+ #mapAttribution {
371
+ position: absolute;
372
+ bottom: 0;
373
+ left: 0;
374
+ right: 0;
375
+ z-index: 1000;
376
+ padding: 2px 6px;
377
+ background: rgba(255, 255, 255, 0.7);
378
+ text-align: right;
379
+ font-size: 8pt;
380
+ line-height: 1.4;
381
+ color: #333;
382
+ }
383
+
384
+ #mapAttribution a {
385
+ color: #0078a8;
386
+ }
387
+
234
388
  .leaflet-touch .leaflet-control-layers-toggle {
235
389
  width: 30px !important;
236
390
  height: 30px !important;
@@ -308,6 +462,57 @@ body,
308
462
  width: 70px;
309
463
  }
310
464
 
465
+ .tides {
466
+ width: 160px;
467
+ height: 75px;
468
+ background-color: white;
469
+ overflow: hidden;
470
+ cursor: pointer;
471
+ }
472
+
473
+ .tides .tides-svg {
474
+ display: block;
475
+ width: 100%;
476
+ height: 100%;
477
+ font-size: 11px;
478
+ font-family: inherit;
479
+ }
480
+
481
+ .tides .tides-line {
482
+ stroke: #0066cc;
483
+ stroke-width: 1.25;
484
+ }
485
+
486
+ .tides .tides-gradient-stop1 {
487
+ stop-color: #0066cc;
488
+ stop-opacity: 0.55;
489
+ }
490
+
491
+ .tides .tides-gradient-stop2 {
492
+ stop-color: #0066cc;
493
+ stop-opacity: 0.05;
494
+ }
495
+
496
+ .tides .tides-now {
497
+ stroke: #000;
498
+ stroke-width: 1;
499
+ stroke-dasharray: 2 2;
500
+ }
501
+
502
+ .tides .tides-now-label {
503
+ fill: #000;
504
+ font-weight: bold;
505
+ }
506
+
507
+ .tides .tides-marker-dot {
508
+ fill: #003366;
509
+ }
510
+
511
+ .tides .tides-marker-height,
512
+ .tides .tides-marker-time {
513
+ fill: #003366;
514
+ }
515
+
311
516
  .statusBar {
312
517
  padding: 5px;
313
518
  max-width: 320px;
@@ -317,3 +522,10 @@ body,
317
522
  font-weight: bold;
318
523
  line-height: 1.2;
319
524
  }
525
+
526
+ /* Lift bottom controls above the attribution strip. --attributionHeight is
527
+ measured and set in JS (AnchorAlarm.updateAttribution) since the strip's
528
+ height varies with content wrapping. */
529
+ .leaflet-bottom {
530
+ bottom: var(--attributionHeight, 0px);
531
+ }