@edugis-org/webmapx 0.1.7 → 0.1.8

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.
Files changed (60) hide show
  1. package/dist-lib/{decorate-CWgUV1hU.js → decorate-DnZTfaod.js} +6 -6
  2. package/dist-lib/dist-BIbq3o-p.js +213 -0
  3. package/dist-lib/{dist-Dm6b7XCs.js → dist-CKAaoSoW.js} +2743 -2491
  4. package/dist-lib/{dist-kKlmcBXq.js → dist-CWCNMXMK.js} +1 -1
  5. package/dist-lib/{dist-Ha9LQCut.js → dist-D-5Gmgwo.js} +1 -1
  6. package/dist-lib/{layer-discovery-afWzu5hY.js → layer-discovery-DFP-WHAh.js} +1 -1
  7. package/dist-lib/{leaflet-adapter-D9djjrKv.js → leaflet-adapter-A0rte-c7.js} +1 -1
  8. package/dist-lib/{maplibre-adapter-TFc3e0G9.js → maplibre-adapter-Cy6yX6o7.js} +1 -1
  9. package/dist-lib/ol-tilegrid-Ct4my3IN.js +24 -0
  10. package/dist-lib/openlayers-adapter-B8WtV1tn.js +1462 -0
  11. package/dist-lib/{toast-Cm28o9U6.js → toast-BsoXOdeA.js} +1 -1
  12. package/dist-lib/{webmapx-3d-tool-D4CTD2gB.js → webmapx-3d-tool-CLppA7mK.js} +13 -13
  13. package/dist-lib/{webmapx-base-tool-Dm9NAWLD.js → webmapx-base-tool-DfRa7TlD.js} +1 -1
  14. package/dist-lib/{webmapx-config-edit-tool-BgcSkmmg.js → webmapx-config-edit-tool-BztWspia.js} +21 -21
  15. package/dist-lib/{webmapx-coordinates-tool-GMfztOzE.js → webmapx-coordinates-tool-EOqZodjr.js} +20 -20
  16. package/dist-lib/{webmapx-core-bundle-BDImi1RE.js → webmapx-core-bundle-CH-5vYXU.js} +607 -1519
  17. package/dist-lib/webmapx-draw-tool-DxQgUF1Q.js +2117 -0
  18. package/dist-lib/{webmapx-geolocation-tool-Rw3-Iad1.js → webmapx-geolocation-tool-DIMh2kIr.js} +26 -25
  19. package/dist-lib/{webmapx-import-layer-tool-DRYviHd5.js → webmapx-import-layer-tool-DMiC1TpU.js} +16 -16
  20. package/dist-lib/{webmapx-info-tool-BJA157cy.js → webmapx-info-tool-D-XbAU9J.js} +56 -56
  21. package/dist-lib/{webmapx-language-osmvector-M5y_lwOg.js → webmapx-language-osmvector-BAw9TR-M.js} +12 -11
  22. package/dist-lib/{webmapx-measure-tool-BXhMJFC6.js → webmapx-measure-tool-CXlg11s8.js} +34 -34
  23. package/dist-lib/{webmapx-modal-tool-eF6Naluv.js → webmapx-modal-tool-Cs7LRrgW.js} +3 -3
  24. package/dist-lib/{webmapx-plugin-tool-D2Hghf9n.js → webmapx-plugin-tool-qe2yTrWB.js} +7 -7
  25. package/dist-lib/{webmapx-print-tool-ob1bOsR5.js → webmapx-print-tool-DrK9sLC7.js} +27 -26
  26. package/dist-lib/{webmapx-search-tool-Cv8BrYvY.js → webmapx-search-tool-H7NisgWH.js} +11 -11
  27. package/dist-lib/webmapx-settings-EHSm-AGU.js +167 -0
  28. package/dist-lib/{webmapx-truearea-tool-CMB4Orm-.js → webmapx-truearea-tool-CSU9mE1D.js} +26 -26
  29. package/dist-lib/{webmapx-view-mode-tool-CUpLNjOj.js → webmapx-view-mode-tool-D1QyQfq8.js} +9 -9
  30. package/dist-lib/webmapx.css +1 -1
  31. package/dist-lib/webmapx.js +21 -21
  32. package/package.json +1 -1
  33. package/dist-lib/WMTS-DCN4zX0-.js +0 -1169
  34. package/dist-lib/alert-GeHlqlN8.js +0 -310
  35. package/dist-lib/button-DFdGkRPQ.js +0 -741
  36. package/dist-lib/checkbox-QoR4S8tV.js +0 -284
  37. package/dist-lib/chunk.36O46B5H-B6ZL7Sm1.js +0 -77
  38. package/dist-lib/chunk.3RPBFEDE-BFO1fHVm.js +0 -138
  39. package/dist-lib/chunk.5JY5FUCG-DTXsslmx.js +0 -1090
  40. package/dist-lib/chunk.6CTB5ZDJ-DjZrBd6Y.js +0 -99
  41. package/dist-lib/chunk.AJ3ENQ5C-Ci7Gm2b6.js +0 -175
  42. package/dist-lib/chunk.LD4M4QGE-CiCfhE8r.js +0 -8
  43. package/dist-lib/chunk.NYIIDP5N-BikXIStD.js +0 -99
  44. package/dist-lib/chunk.RWUUFNUL-DFztA4uV.js +0 -43
  45. package/dist-lib/chunk.SI4ACBFK-CLb9VfMG.js +0 -61
  46. package/dist-lib/chunk.YHLNUJ7P-D-kanrCf.js +0 -503
  47. package/dist-lib/decorators-B35AgiCU.js +0 -351
  48. package/dist-lib/dist-c1PlDAd1.js +0 -2359
  49. package/dist-lib/divider-CPm675yY.js +0 -41
  50. package/dist-lib/icon-CEOgWlro.js +0 -9
  51. package/dist-lib/icon-button-Da_nBTy3.js +0 -408
  52. package/dist-lib/input-CeGntPlT.js +0 -590
  53. package/dist-lib/ol-tilegrid-9VtyxaLG.js +0 -64
  54. package/dist-lib/openlayers-adapter-DVW1KCRv.js +0 -13307
  55. package/dist-lib/option-CBxl1mZP.js +0 -1106
  56. package/dist-lib/rbush-C8k41T4z.js +0 -254
  57. package/dist-lib/spinner-DysxdNG9.js +0 -6
  58. package/dist-lib/tooltip-Cucn1SiD.js +0 -197
  59. package/dist-lib/webmapx-draw-tool-DooAV8cF.js +0 -4336
  60. package/dist-lib/webmapx-settings-DDEJ8aoV.js +0 -479
@@ -1,6 +1,6 @@
1
- import { r as e, t } from "./decorate-CWgUV1hU.js";
2
- import { t as n } from "./webmapx-base-tool-Dm9NAWLD.js";
3
- import { a as r } from "./decorators-B35AgiCU.js";
1
+ import { r as e, t } from "./decorate-DnZTfaod.js";
2
+ import { t as n } from "./webmapx-base-tool-DfRa7TlD.js";
3
+ import { property as r } from "lit/decorators.js";
4
4
  //#region src/components/webmapx-modal-tool.ts
5
5
  var i = class extends n {
6
6
  constructor(...e) {
@@ -1,8 +1,8 @@
1
- import { t as e } from "./decorate-CWgUV1hU.js";
2
- import { a as t, o as n } from "./decorators-B35AgiCU.js";
3
- import { LitElement as r, html as i } from "lit";
1
+ import { t as e } from "./decorate-DnZTfaod.js";
2
+ import { LitElement as t, html as n } from "lit";
3
+ import { customElement as r, property as i } from "lit/decorators.js";
4
4
  //#region src/components/webmapx-plugin-tool.ts
5
- var a = class extends r {
5
+ var a = class extends t {
6
6
  constructor(...e) {
7
7
  super(...e), this.toolId = "", this.pluginElement = null, this.configReadyHandler = (e) => this.handleConfigReady(e);
8
8
  }
@@ -31,15 +31,15 @@ var a = class extends r {
31
31
  this.pluginElement = t, this.requestUpdate();
32
32
  }
33
33
  render() {
34
- return this.pluginElement ? i`<slot></slot>` : i``;
34
+ return this.pluginElement ? n`<slot></slot>` : n``;
35
35
  }
36
36
  updated() {
37
37
  this.pluginElement && !this.contains(this.pluginElement) && this.appendChild(this.pluginElement);
38
38
  }
39
39
  };
40
- e([t({
40
+ e([i({
41
41
  type: String,
42
42
  attribute: "tool-id"
43
- })], a.prototype, "toolId", void 0), a = e([n("webmapx-plugin-tool")], a);
43
+ })], a.prototype, "toolId", void 0), a = e([r("webmapx-plugin-tool")], a);
44
44
  //#endregion
45
45
  export { a as t };
@@ -1,13 +1,14 @@
1
- import { r as e, t } from "./decorate-CWgUV1hU.js";
2
- import { i as n, o as r } from "./decorators-B35AgiCU.js";
3
- import "./button-DFdGkRPQ.js";
4
- import "./checkbox-QoR4S8tV.js";
5
- import "./input-CeGntPlT.js";
6
- import "./spinner-DysxdNG9.js";
7
- import { i, r as a, t as o } from "./attribution-format-B4f05_u0.js";
8
- import { t as s } from "./webmapx-modal-tool-eF6Naluv.js";
9
- import "./option-CBxl1mZP.js";
10
- import { css as c, html as l } from "lit";
1
+ import { r as e, t } from "./decorate-DnZTfaod.js";
2
+ import { i as n, r, t as i } from "./attribution-format-B4f05_u0.js";
3
+ import { t as a } from "./webmapx-modal-tool-Cs7LRrgW.js";
4
+ import { css as o, html as s } from "lit";
5
+ import { customElement as c, state as l } from "lit/decorators.js";
6
+ import "@shoelace-style/shoelace/dist/components/button/button.js";
7
+ import "@shoelace-style/shoelace/dist/components/checkbox/checkbox.js";
8
+ import "@shoelace-style/shoelace/dist/components/spinner/spinner.js";
9
+ import "@shoelace-style/shoelace/dist/components/input/input.js";
10
+ import "@shoelace-style/shoelace/dist/components/select/select.js";
11
+ import "@shoelace-style/shoelace/dist/components/option/option.js";
11
12
  //#region src/components/webmapx-print-tool.ts
12
13
  var u = 210, d = 297, f = 40, p = 10, m = 50, h = 12, g = 6, _ = 96 / 25.4;
13
14
  function v(e) {
@@ -25,12 +26,12 @@ function x(e) {
25
26
  h: (y(e) ? u : d) - 2 * p
26
27
  };
27
28
  }
28
- var S = class extends s {
29
+ var S = class extends a {
29
30
  constructor(...e) {
30
31
  super(...e), this.toolId = "print", this.mapTitle = "", this.format = "portrait", this.addLink = !1, this.printing = !1, this.errorMsg = "", this.zoomDelta = 0, this.printBoxEl = null, this.resizeObserver = null;
31
32
  }
32
33
  static {
33
- this.styles = c`
34
+ this.styles = o`
34
35
  :host { display: block; font-size: var(--sl-font-size-small); }
35
36
  .tool-content {
36
37
  padding: var(--webmapx-tool-panel-padding, 12px);
@@ -277,30 +278,30 @@ var S = class extends s {
277
278
  }, { once: !0 }), requestAnimationFrame(() => requestAnimationFrame(() => window.print()));
278
279
  }
279
280
  buildAttributionText() {
280
- let e = this.layerDataConfig, t = this.store?.getState()?.mapLayers ?? {}, n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
281
+ let e = this.layerDataConfig, t = this.store?.getState()?.mapLayers ?? {}, a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
281
282
  if (e) {
282
- for (let t of e.sources ?? []) n.set(t.id, t);
283
- for (let t of e.layers ?? []) r.set(t.id, t);
283
+ for (let t of e.sources ?? []) a.set(t.id, t);
284
+ for (let t of e.layers ?? []) o.set(t.id, t);
284
285
  }
285
286
  let s = /* @__PURE__ */ new Set(), c = [], l = (e) => {
286
287
  if (e) for (let t of e.split("|")) {
287
- let e = o(i(t)).trim();
288
+ let e = i(n(t)).trim();
288
289
  e && !s.has(e) && (s.add(e), c.push(e));
289
290
  }
290
291
  };
291
- for (let [e, i] of Object.entries(t)) {
292
- if (i.visible === !1) continue;
293
- let t = r.get(e);
294
- if (t) l(a(t, n));
292
+ for (let [e, n] of Object.entries(t)) {
293
+ if (n.visible === !1) continue;
294
+ let t = o.get(e);
295
+ if (t) l(r(t, a));
295
296
  else {
296
- let e = typeof i.sourceId == "string" ? i.sourceId : null;
297
+ let e = typeof n.sourceId == "string" ? n.sourceId : null;
297
298
  e && l(this.adapter?.getSourceAttribution?.(e));
298
299
  }
299
300
  }
300
301
  return c.join(" • ");
301
302
  }
302
303
  render() {
303
- return l`
304
+ return s`
304
305
  <div class="tool-content">
305
306
  <p class="description">Position the map inside the box, then click Print to save as PDF.</p>
306
307
  <div class="field">
@@ -331,18 +332,18 @@ var S = class extends s {
331
332
  this.addLink = e.target.checked, this.updateBox();
332
333
  }}
333
334
  >Add viewer link</sl-checkbox>
334
- ${Math.abs(this.zoomDelta) > .05 ? l`
335
+ ${Math.abs(this.zoomDelta) > .05 ? s`
335
336
  <p class="warning">
336
337
  <strong>Note:</strong> The print zoom differs from the screen zoom
337
338
  (${this.zoomDelta > 0 ? "+" : ""}${this.zoomDelta.toFixed(1)} levels).
338
339
  Labels and zoom-dependent layers may look different in the print.
339
340
  </p>` : ""}
340
- ${this.printing ? l`<div class="busy"><sl-spinner></sl-spinner> Rendering map…</div>` : l`<sl-button variant="primary" size="small" @click=${this.handlePrint}>Print</sl-button>`}
341
- ${this.errorMsg ? l`<p class="error">${this.errorMsg}</p>` : ""}
341
+ ${this.printing ? s`<div class="busy"><sl-spinner></sl-spinner> Rendering map…</div>` : s`<sl-button variant="primary" size="small" @click=${this.handlePrint}>Print</sl-button>`}
342
+ ${this.errorMsg ? s`<p class="error">${this.errorMsg}</p>` : ""}
342
343
  </div>
343
344
  `;
344
345
  }
345
346
  };
346
- t([n()], S.prototype, "mapTitle", void 0), t([n()], S.prototype, "format", void 0), t([n()], S.prototype, "addLink", void 0), t([n()], S.prototype, "printing", void 0), t([n()], S.prototype, "errorMsg", void 0), t([n()], S.prototype, "zoomDelta", void 0), S = t([r("webmapx-print-tool")], S);
347
+ t([l()], S.prototype, "mapTitle", void 0), t([l()], S.prototype, "format", void 0), t([l()], S.prototype, "addLink", void 0), t([l()], S.prototype, "printing", void 0), t([l()], S.prototype, "errorMsg", void 0), t([l()], S.prototype, "zoomDelta", void 0), S = t([c("webmapx-print-tool")], S);
347
348
  //#endregion
348
349
  export { S as WebmapxPrintTool };
@@ -1,7 +1,7 @@
1
- import { r as e, t } from "./decorate-CWgUV1hU.js";
2
- import { t as n } from "./webmapx-base-tool-Dm9NAWLD.js";
3
- import { i as r, o as i } from "./decorators-B35AgiCU.js";
4
- import { css as a, html as o } from "lit";
1
+ import { r as e, t } from "./decorate-DnZTfaod.js";
2
+ import { t as n } from "./webmapx-base-tool-DfRa7TlD.js";
3
+ import { css as r, html as i } from "lit";
4
+ import { customElement as a, state as o } from "lit/decorators.js";
5
5
  //#region src/components/webmapx-search-tool.ts
6
6
  var s, c = class extends n {
7
7
  static {
@@ -43,7 +43,7 @@ var s, c = class extends n {
43
43
  return s.KNOWN_PROVIDERS.has(e.toLowerCase());
44
44
  }
45
45
  static {
46
- this.styles = a`
46
+ this.styles = r`
47
47
  :host { display: block; width: 100%; pointer-events: auto; }
48
48
  :host([hidden]) { display: none !important; }
49
49
  .container { width: 100%; max-width: 100%; color: var(--webmapx-search-color, var(--color-text-primary)); box-sizing: border-box; padding: var(--webmapx-tool-padding, 0); }
@@ -380,7 +380,7 @@ var s, c = class extends n {
380
380
  r = n?.detail && typeof n.detail.checked == "boolean" ? n.detail.checked : !!t.target?.checked, r ? this.isPersisted(e) || (this.clearPreview(), this.addPersistedFeature(e), this.persistedChanged(e, !0)) : this.isPersisted(e) && (this.removePersistedFeature(e), this.persistedChanged(e, !1)), this.requestUpdate();
381
381
  }
382
382
  render() {
383
- return o`
383
+ return i`
384
384
  <div class="container tool-content">
385
385
  <div class="title">Search</div>
386
386
  <div class="searchbox">
@@ -402,14 +402,14 @@ var s, c = class extends n {
402
402
  </div>
403
403
 
404
404
  <div class="results">
405
- ${this.searching ? o`<div>Searching...</div>` : ""}
406
- ${this.results ? o`
405
+ ${this.searching ? i`<div>Searching...</div>` : ""}
406
+ ${this.results ? i`
407
407
  <div style="display:flex; align-items:center; gap:8px; padding:2px 6px; font-size:11px; color:var(--color-text-secondary); border-bottom:1px solid var(--color-border);">
408
408
  <span style="flex:0 0 auto; min-width:1.5rem; text-align:center;" title="Check to add result as a permanent layer on the map">📌</span>
409
409
  <span>hover to preview · click to zoom</span>
410
410
  </div>
411
411
  <ul>
412
- ${(this.results.features || []).map((e, t) => o`
412
+ ${(this.results.features || []).map((e, t) => i`
413
413
  <li class="result-item" ?selected=${t === this.selectedIndex}
414
414
  @mouseenter=${() => this.showPreviewForFeature(e)}
415
415
  @mouseleave=${() => this.clearPreview()}>
@@ -426,12 +426,12 @@ var s, c = class extends n {
426
426
  </li>
427
427
  `)}
428
428
  </ul>
429
- ` : o``}
429
+ ` : i``}
430
430
  </div>
431
431
  </div>
432
432
  `;
433
433
  }
434
434
  };
435
- t([r()], c.prototype, "query", void 0), t([r()], c.prototype, "results", void 0), t([r()], c.prototype, "searching", void 0), t([r()], c.prototype, "selectedIndex", void 0), c = s = t([i("webmapx-search-tool")], c);
435
+ t([o()], c.prototype, "query", void 0), t([o()], c.prototype, "results", void 0), t([o()], c.prototype, "searching", void 0), t([o()], c.prototype, "selectedIndex", void 0), c = s = t([a("webmapx-search-tool")], c);
436
436
  //#endregion
437
437
  export { c as WebmapxSearchTool };
@@ -0,0 +1,167 @@
1
+ import { c as e, d as t, l as n, r, s as i, t as a, u as o } from "./decorate-DnZTfaod.js";
2
+ import { LitElement as s, css as c, html as l } from "lit";
3
+ import { customElement as u, state as d } from "lit/decorators.js";
4
+ import "@shoelace-style/shoelace/dist/components/input/input.js";
5
+ import "@shoelace-style/shoelace/dist/components/divider/divider.js";
6
+ import "@shoelace-style/shoelace/dist/components/select/select.js";
7
+ import "@shoelace-style/shoelace/dist/components/option/option.js";
8
+ import "@shoelace-style/shoelace/dist/components/switch/switch.js";
9
+ //#region src/components/webmapx-settings.ts
10
+ var f = class extends s {
11
+ constructor(...e) {
12
+ super(...e), this.darkMode = !1, this.apiKey = "", this.currentAdapter = o, this.availableAdapters = [];
13
+ }
14
+ static {
15
+ this.styles = c`
16
+ :host {
17
+ display: block;
18
+ padding: 1rem;
19
+ box-sizing: border-box;
20
+ }
21
+
22
+ .setting-group {
23
+ margin-bottom: 1.5rem;
24
+ }
25
+
26
+ .setting-group:last-child {
27
+ margin-bottom: 0;
28
+ }
29
+
30
+ h4 {
31
+ margin: 0 0 0.75rem 0;
32
+ font-size: 0.875rem;
33
+ font-weight: 600;
34
+ color: var(--color-text-secondary, #666);
35
+ text-transform: uppercase;
36
+ letter-spacing: 0.05em;
37
+ }
38
+
39
+ sl-switch {
40
+ --sl-toggle-size-medium: 1.25rem;
41
+ }
42
+
43
+ sl-input {
44
+ margin-top: 0.5rem;
45
+ }
46
+
47
+ sl-select {
48
+ margin-top: 0.5rem;
49
+ }
50
+
51
+ sl-select::part(combobox) {
52
+ min-height: 2.5rem;
53
+ }
54
+ `;
55
+ }
56
+ connectedCallback() {
57
+ super.connectedCallback(), this.loadSettings();
58
+ }
59
+ loadSettings() {
60
+ let e = localStorage.getItem("webmapx-theme");
61
+ e ? this.darkMode = e === "dark" : this.darkMode = window.matchMedia("(prefers-color-scheme: dark)").matches, this.applyTheme(), this.apiKey = localStorage.getItem("webmapx-api-key") || "", this.availableAdapters = t().filter((e) => ![
62
+ "ol",
63
+ "l",
64
+ "c"
65
+ ].includes(e)), this.currentAdapter = this.detectCurrentAdapter();
66
+ }
67
+ getMapStorageKey(e, t) {
68
+ return i(e.id, t);
69
+ }
70
+ detectCurrentAdapter() {
71
+ let e = r(this);
72
+ if (!e) return o;
73
+ let t = this.getMapStorageKey(e, "adapter"), i = n({
74
+ explicitAdapter: e.getAttribute("adapter") ?? e.getAttribute("type"),
75
+ savedAdapter: t ? localStorage.getItem(t) : null,
76
+ configuredAdapter: e.mapConfig?.type ?? null,
77
+ defaultAdapter: o
78
+ });
79
+ return this.availableAdapters.includes(i) ? i : o;
80
+ }
81
+ applyTheme() {
82
+ let e = document.documentElement;
83
+ this.darkMode ? (e.setAttribute("data-theme", "dark"), e.classList.add("sl-theme-dark")) : (e.removeAttribute("data-theme"), e.classList.remove("sl-theme-dark")), localStorage.setItem("webmapx-theme", this.darkMode ? "dark" : "light");
84
+ }
85
+ handleThemeChange(e) {
86
+ let t = e.target;
87
+ this.darkMode = t.checked, this.applyTheme(), this.dispatchEvent(new CustomEvent("theme-change", {
88
+ detail: { theme: this.darkMode ? "dark" : "light" },
89
+ bubbles: !0,
90
+ composed: !0
91
+ }));
92
+ }
93
+ handleApiKeyChange(e) {
94
+ let t = e.target;
95
+ this.apiKey = t.value, localStorage.setItem("webmapx-api-key", this.apiKey), this.dispatchEvent(new CustomEvent("apikey-change", {
96
+ detail: { apiKey: this.apiKey },
97
+ bubbles: !0,
98
+ composed: !0
99
+ }));
100
+ }
101
+ handleAdapterChange(t) {
102
+ let n = t.target, i = e(n.value);
103
+ if (!i || i === this.currentAdapter) return;
104
+ let a = r(this);
105
+ if (!a) {
106
+ console.error("[webmapx-settings] No <webmapx-map> found for adapter switching.");
107
+ return;
108
+ }
109
+ let o = this.getMapStorageKey(a, "adapter");
110
+ a.saveState?.(), o && localStorage.setItem(o, i), window.location.reload();
111
+ }
112
+ formatAdapterName(e) {
113
+ return {
114
+ maplibre: "MapLibre GL",
115
+ openlayers: "OpenLayers",
116
+ leaflet: "Leaflet",
117
+ cesium: "Cesium"
118
+ }[e] || e;
119
+ }
120
+ render() {
121
+ return l`
122
+ <div class="setting-group">
123
+ <h4>Map Engine</h4>
124
+ <sl-select
125
+ label="Adapter"
126
+ value=${this.currentAdapter}
127
+ @sl-change=${this.handleAdapterChange}
128
+ >
129
+ ${this.availableAdapters.map((e) => l`
130
+ <sl-option value=${e}>
131
+ ${this.formatAdapterName(e)}
132
+ </sl-option>
133
+ `)}
134
+ </sl-select>
135
+ </div>
136
+
137
+ <sl-divider></sl-divider>
138
+
139
+ <div class="setting-group">
140
+ <h4>Appearance</h4>
141
+ <sl-switch
142
+ ?checked=${this.darkMode}
143
+ @sl-change=${this.handleThemeChange}
144
+ >
145
+ Dark Mode
146
+ </sl-switch>
147
+ </div>
148
+
149
+ <sl-divider></sl-divider>
150
+
151
+ <div class="setting-group">
152
+ <h4>API Configuration</h4>
153
+ <sl-input
154
+ label="API Key"
155
+ type="password"
156
+ password-toggle
157
+ value=${this.apiKey}
158
+ @sl-input=${this.handleApiKeyChange}
159
+ placeholder="Enter your API key"
160
+ ></sl-input>
161
+ </div>
162
+ `;
163
+ }
164
+ };
165
+ a([d()], f.prototype, "darkMode", void 0), a([d()], f.prototype, "apiKey", void 0), a([d()], f.prototype, "currentAdapter", void 0), a([d()], f.prototype, "availableAdapters", void 0), f = a([u("webmapx-settings")], f);
166
+ //#endregion
167
+ export { f as WebmapxSettings };
@@ -1,8 +1,8 @@
1
- import { r as e, t } from "./decorate-CWgUV1hU.js";
2
- import { i as n, o as r } from "./decorators-B35AgiCU.js";
3
- import { t as i } from "./esm-CTuscnN5.js";
4
- import { t as a } from "./webmapx-modal-tool-eF6Naluv.js";
5
- import { css as o, html as s } from "lit";
1
+ import { r as e, t } from "./decorate-DnZTfaod.js";
2
+ import { t as n } from "./esm-CTuscnN5.js";
3
+ import { t as r } from "./webmapx-modal-tool-Cs7LRrgW.js";
4
+ import { css as i, html as a } from "lit";
5
+ import { customElement as o, state as s } from "lit/decorators.js";
6
6
  //#region node_modules/@turf/bearing/node_modules/@turf/helpers/dist/esm/index.js
7
7
  var c = 6371008.8;
8
8
  c * 100, c * 100, 360 / (2 * Math.PI), c * 3.28084, c * 39.37, c / 1e3, c / 1e3, c / 1609.344, c * 1e3, c * 1e3, c / 1852, c * 1.0936;
@@ -138,24 +138,24 @@ function P(e, t) {
138
138
  }
139
139
  return j(t);
140
140
  }
141
- function F(e, t, n) {
142
- let r = {
141
+ function F(e, t, r) {
142
+ let i = {
143
143
  type: "Feature",
144
144
  geometry: {
145
145
  type: "Point",
146
- coordinates: n
146
+ coordinates: r
147
147
  },
148
148
  properties: {}
149
149
  }, a = (e) => {
150
- let n = {
150
+ let r = {
151
151
  type: "Feature",
152
152
  geometry: {
153
153
  type: "Point",
154
154
  coordinates: e
155
155
  },
156
156
  properties: {}
157
- }, a = m(r, n);
158
- return T(r, i(r, n, { units: "kilometers" }), a + t, { units: "kilometers" }).geometry.coordinates;
157
+ }, a = m(i, r);
158
+ return T(i, n(i, r, { units: "kilometers" }), a + t, { units: "kilometers" }).geometry.coordinates;
159
159
  }, o = (e) => e.map(a);
160
160
  return e.type === "Polygon" ? {
161
161
  type: "Polygon",
@@ -179,15 +179,15 @@ function I(e, t, n, r) {
179
179
  } : e;
180
180
  }
181
181
  function L(e, t) {
182
- let n = {
182
+ let r = {
183
183
  type: "Feature",
184
184
  geometry: {
185
185
  type: "Point",
186
186
  coordinates: t
187
187
  },
188
188
  properties: {}
189
- }, r = (e) => e.map((e) => ({
190
- bearing: m(n, {
189
+ }, i = (e) => e.map((e) => ({
190
+ bearing: m(r, {
191
191
  type: "Feature",
192
192
  geometry: {
193
193
  type: "Point",
@@ -195,7 +195,7 @@ function L(e, t) {
195
195
  },
196
196
  properties: {}
197
197
  }),
198
- distance: i(n, {
198
+ distance: n(r, {
199
199
  type: "Feature",
200
200
  geometry: {
201
201
  type: "Point",
@@ -204,7 +204,7 @@ function L(e, t) {
204
204
  properties: {}
205
205
  }, { units: "kilometers" })
206
206
  }));
207
- return e.type === "Polygon" ? e.coordinates.map(r) : e.type === "MultiPolygon" ? e.coordinates.flat().map(r) : [];
207
+ return e.type === "Polygon" ? e.coordinates.map(i) : e.type === "MultiPolygon" ? e.coordinates.flat().map(i) : [];
208
208
  }
209
209
  function R(e, t, n) {
210
210
  let r = {
@@ -223,7 +223,7 @@ function R(e, t, n) {
223
223
  coordinates: e.coordinates.map((e) => e.map(() => a()))
224
224
  } : e;
225
225
  }
226
- var z = class extends a {
226
+ var z = class extends r {
227
227
  constructor(...e) {
228
228
  super(...e), this.toolId = "truearea", this.mapElement = null, this.availableLayers = [], this.selectedLayerId = "", this.copies = [], this.dragging = !1, this.lastTouchedCopyId = null, this.rotationDeg = 0, this.geodesic = !0, this.copyMeta = /* @__PURE__ */ new Map(), this.features = [], this.colorIdx = 0, this.unsubEvents = [], this.dragState = null;
229
229
  }
@@ -234,7 +234,7 @@ var z = class extends a {
234
234
  this.cleanupEvents(), this.adapter && (this.adapter.setPanEnabled(!0), this.adapter.setTouchCaptureEnabled(!0)), this.dragState = null, this.dragging = !1, this.clearGhost(), this.copies.length === 0 && this.cleanupLayers();
235
235
  }
236
236
  static {
237
- this.styles = o`
237
+ this.styles = i`
238
238
  :host { display: none; padding: var(--webmapx-tool-padding, 0); font-size: 0.875rem; min-width: 200px; }
239
239
  :host([active]) { display: block; }
240
240
  label { display: block; font-weight: 600; margin-bottom: 0.25rem; }
@@ -566,22 +566,22 @@ var z = class extends a {
566
566
  });
567
567
  }
568
568
  render() {
569
- return s`
569
+ return a`
570
570
  <label>Source layer</label>
571
- ${this.availableLayers.length === 0 ? s`<div class="hint">No visible polygon layers on map.</div>` : s`
571
+ ${this.availableLayers.length === 0 ? a`<div class="hint">No visible polygon layers on map.</div>` : a`
572
572
  <select @change=${(e) => {
573
573
  this.selectedLayerId = e.target.value;
574
574
  }}>
575
- ${this.availableLayers.map((e) => s`
575
+ ${this.availableLayers.map((e) => a`
576
576
  <option value=${e.id} ?selected=${e.id === this.selectedLayerId}>${e.label}</option>
577
577
  `)}
578
578
  </select>
579
- ${this.dragging ? s`<div class="dragging-hint">Drag to target location, release to place.</div>` : s`<div class="hint">Click and drag a polygon to compare sizes.</div>`}
579
+ ${this.dragging ? a`<div class="dragging-hint">Drag to target location, release to place.</div>` : a`<div class="hint">Click and drag a polygon to compare sizes.</div>`}
580
580
  `}
581
581
 
582
582
  ${(() => {
583
583
  let e = this.copies.find((e) => e.id === this.lastTouchedCopyId);
584
- return !e && this.availableLayers.length === 0 ? "" : e ? s`
584
+ return !e && this.availableLayers.length === 0 ? "" : e ? a`
585
585
  <div class="copy-item">
586
586
  <div class="copy-swatch" style="background:${e.color}"></div>
587
587
  <span class="copy-label" title=${e.label}>${e.label}</span>
@@ -604,12 +604,12 @@ var z = class extends a {
604
604
  <label for="geodesic-toggle">Geodesic (shape-accurate, may rotate borders)</label>
605
605
  </div>
606
606
 
607
- ${this.copies.length > 0 ? s`<button class="clear-btn" @click=${() => this.clearAll()}>Clear all</button>` : ""}
608
- ` : s`<div class="no-copies">No copy selected. Click a polygon on the map.</div>`;
607
+ ${this.copies.length > 0 ? a`<button class="clear-btn" @click=${() => this.clearAll()}>Clear all</button>` : ""}
608
+ ` : a`<div class="no-copies">No copy selected. Click a polygon on the map.</div>`;
609
609
  })()}
610
610
  `;
611
611
  }
612
612
  };
613
- t([n()], z.prototype, "availableLayers", void 0), t([n()], z.prototype, "selectedLayerId", void 0), t([n()], z.prototype, "copies", void 0), t([n()], z.prototype, "dragging", void 0), t([n()], z.prototype, "lastTouchedCopyId", void 0), t([n()], z.prototype, "rotationDeg", void 0), t([n()], z.prototype, "geodesic", void 0), z = t([r("webmapx-truearea-tool")], z);
613
+ t([s()], z.prototype, "availableLayers", void 0), t([s()], z.prototype, "selectedLayerId", void 0), t([s()], z.prototype, "copies", void 0), t([s()], z.prototype, "dragging", void 0), t([s()], z.prototype, "lastTouchedCopyId", void 0), t([s()], z.prototype, "rotationDeg", void 0), t([s()], z.prototype, "geodesic", void 0), z = t([o("webmapx-truearea-tool")], z);
614
614
  //#endregion
615
615
  export { z as WebmapxTrueAreaTool };
@@ -1,7 +1,7 @@
1
- import { r as e, t } from "./decorate-CWgUV1hU.js";
2
- import { t as n } from "./webmapx-base-tool-Dm9NAWLD.js";
3
- import { i as r, o as i } from "./decorators-B35AgiCU.js";
4
- import { css as a, html as o } from "lit";
1
+ import { r as e, t } from "./decorate-DnZTfaod.js";
2
+ import { t as n } from "./webmapx-base-tool-DfRa7TlD.js";
3
+ import { css as r, html as i } from "lit";
4
+ import { customElement as a, state as o } from "lit/decorators.js";
5
5
  //#region src/components/webmapx-view-mode-tool.ts
6
6
  var s = [{
7
7
  id: "mercator",
@@ -18,7 +18,7 @@ var s = [{
18
18
  super(...e), this.viewModeName = "mercator", this.centerLng = 0, this.centerLat = 30, this.parallel1 = 29.5, this.parallel2 = 45.5, this.supported = !0;
19
19
  }
20
20
  static {
21
- this.styles = a`
21
+ this.styles = r`
22
22
  :host { display: block; padding: var(--webmapx-tool-padding, 0); font-size: 0.875rem; }
23
23
  .unsupported { color: var(--sl-color-neutral-500, #888); font-style: italic; }
24
24
  label { display: block; font-weight: 600; margin-bottom: 0.25rem; }
@@ -58,14 +58,14 @@ var s = [{
58
58
  }
59
59
  }
60
60
  render() {
61
- if (!this.supported) return o`<div class="unsupported">View modes are not supported by this engine.</div>`;
61
+ if (!this.supported) return i`<div class="unsupported">View modes are not supported by this engine.</div>`;
62
62
  let e = s.find((e) => e.id === this.viewModeName) ?? s[0], t = e.conic === !0;
63
- return o`
63
+ return i`
64
64
  <label>View mode</label>
65
65
  <select @change=${(e) => {
66
66
  this.viewModeName = e.target.value, this.applyViewMode();
67
67
  }}>
68
- ${s.map((e) => o`<option value=${e.id} ?selected=${e.id === this.viewModeName}>${e.name}</option>`)}
68
+ ${s.map((e) => i`<option value=${e.id} ?selected=${e.id === this.viewModeName}>${e.name}</option>`)}
69
69
  </select>
70
70
  <div class="mode-description">${e.description}</div>
71
71
  <img src=${e.image} alt=${e.description}>
@@ -101,6 +101,6 @@ var s = [{
101
101
  `;
102
102
  }
103
103
  };
104
- t([r()], c.prototype, "viewModeName", void 0), t([r()], c.prototype, "centerLng", void 0), t([r()], c.prototype, "centerLat", void 0), t([r()], c.prototype, "parallel1", void 0), t([r()], c.prototype, "parallel2", void 0), t([r()], c.prototype, "supported", void 0), c = t([i("webmapx-view-mode-tool")], c);
104
+ t([o()], c.prototype, "viewModeName", void 0), t([o()], c.prototype, "centerLng", void 0), t([o()], c.prototype, "centerLat", void 0), t([o()], c.prototype, "parallel1", void 0), t([o()], c.prototype, "parallel2", void 0), t([o()], c.prototype, "supported", void 0), c = t([a("webmapx-view-mode-tool")], c);
105
105
  //#endregion
106
106
  export { c as WebmapxViewModeTool };