@edugis-org/webmapx 0.1.9 → 0.1.11

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 (45) hide show
  1. package/dist-lib/alert-C_G5X6J8.js +311 -0
  2. package/dist-lib/button-BlZd3WPH.js +744 -0
  3. package/dist-lib/checkbox-DB4oPyyw.js +287 -0
  4. package/dist-lib/chunk.36O46B5H-km1dakSW.js +77 -0
  5. package/dist-lib/chunk.3RPBFEDE-Cxq6VVR6.js +138 -0
  6. package/dist-lib/chunk.3Y6SB6QS-DUJ8Ickw.js +18 -0
  7. package/dist-lib/chunk.5JY5FUCG-CYkzbQXS.js +1071 -0
  8. package/dist-lib/chunk.6CTB5ZDJ-DjZrBd6Y.js +99 -0
  9. package/dist-lib/chunk.AJ3ENQ5C-DXVGX5Dn.js +177 -0
  10. package/dist-lib/chunk.LD4M4QGE-CiCfhE8r.js +8 -0
  11. package/dist-lib/chunk.NYIIDP5N-B4UCI-rQ.js +34 -0
  12. package/dist-lib/chunk.RWUUFNUL-DFztA4uV.js +43 -0
  13. package/dist-lib/chunk.SI4ACBFK-CLb9VfMG.js +61 -0
  14. package/dist-lib/chunk.YHLNUJ7P-ByKy0MKm.js +251 -0
  15. package/dist-lib/{decorate-DnZTfaod.js → decorate-CKr8yG1g.js} +1 -1
  16. package/dist-lib/divider-BOFbR_Ny.js +41 -0
  17. package/dist-lib/icon-CBNpO1lq.js +9 -0
  18. package/dist-lib/icon-button-B5rXu3Gg.js +410 -0
  19. package/dist-lib/input-B212BH6L.js +575 -0
  20. package/dist-lib/option-BQN9Zz_8.js +1108 -0
  21. package/dist-lib/spinner-DdcBaa3z.js +6 -0
  22. package/dist-lib/{toast-BsoXOdeA.js → toast-Bq2PmEpm.js} +1 -1
  23. package/dist-lib/tooltip-CBGOiZwJ.js +197 -0
  24. package/dist-lib/{webmapx-3d-tool-CLppA7mK.js → webmapx-3d-tool-CKoLGMpk.js} +2 -2
  25. package/dist-lib/{webmapx-base-tool-DfRa7TlD.js → webmapx-base-tool-Bc9Wz0yA.js} +1 -1
  26. package/dist-lib/{webmapx-config-edit-tool-BztWspia.js → webmapx-config-edit-tool-7265_DNz.js} +7 -7
  27. package/dist-lib/{webmapx-coordinates-tool-DnTSkrRG.js → webmapx-coordinates-tool-C964bdEG.js} +3 -3
  28. package/dist-lib/{webmapx-core-bundle-CH-5vYXU.js → webmapx-core-bundle-Q6mWOib1.js} +1579 -671
  29. package/dist-lib/webmapx-draw-tool-6QRr5Gip.js +4315 -0
  30. package/dist-lib/{webmapx-geolocation-tool-DIMh2kIr.js → webmapx-geolocation-tool-qxN5aaVB.js} +6 -7
  31. package/dist-lib/{webmapx-import-layer-tool-DMiC1TpU.js → webmapx-import-layer-tool-tJ374qHR.js} +2 -2
  32. package/dist-lib/{webmapx-info-tool-D-XbAU9J.js → webmapx-info-tool-C3txgv3v.js} +4 -4
  33. package/dist-lib/{webmapx-language-osmvector-BAw9TR-M.js → webmapx-language-osmvector-jQzTOPU1.js} +3 -4
  34. package/dist-lib/{webmapx-measure-tool-CXlg11s8.js → webmapx-measure-tool-Cxxrzgdf.js} +4 -4
  35. package/dist-lib/{webmapx-modal-tool-Cs7LRrgW.js → webmapx-modal-tool-DQVHNXqX.js} +2 -2
  36. package/dist-lib/{webmapx-plugin-tool-qe2yTrWB.js → webmapx-plugin-tool-BNZ61x6s.js} +1 -1
  37. package/dist-lib/{webmapx-print-tool-DrK9sLC7.js → webmapx-print-tool-BDOTbS6u.js} +7 -8
  38. package/dist-lib/{webmapx-search-tool-H7NisgWH.js → webmapx-search-tool-CHlsE2Wx.js} +2 -2
  39. package/dist-lib/webmapx-settings-B0AT9Vjn.js +482 -0
  40. package/dist-lib/{webmapx-truearea-tool-CSU9mE1D.js → webmapx-truearea-tool-dxSgcbOj.js} +2 -2
  41. package/dist-lib/{webmapx-view-mode-tool-D1QyQfq8.js → webmapx-view-mode-tool-DVSMakdh.js} +2 -2
  42. package/dist-lib/webmapx.js +312 -311
  43. package/package.json +1 -1
  44. package/dist-lib/webmapx-draw-tool-DxQgUF1Q.js +0 -2117
  45. package/dist-lib/webmapx-settings-EHSm-AGU.js +0 -167
@@ -1,167 +0,0 @@
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 };