@edugis-org/webmapx 0.1.8 → 0.1.10
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/dist-lib/alert-C_G5X6J8.js +311 -0
- package/dist-lib/button-BlZd3WPH.js +744 -0
- package/dist-lib/checkbox-DB4oPyyw.js +287 -0
- package/dist-lib/chunk.36O46B5H-km1dakSW.js +77 -0
- package/dist-lib/chunk.3RPBFEDE-Cxq6VVR6.js +138 -0
- package/dist-lib/chunk.3Y6SB6QS-DUJ8Ickw.js +18 -0
- package/dist-lib/chunk.5JY5FUCG-CYkzbQXS.js +1071 -0
- package/dist-lib/chunk.6CTB5ZDJ-DjZrBd6Y.js +99 -0
- package/dist-lib/chunk.AJ3ENQ5C-DXVGX5Dn.js +177 -0
- package/dist-lib/chunk.LD4M4QGE-CiCfhE8r.js +8 -0
- package/dist-lib/chunk.NYIIDP5N-B4UCI-rQ.js +34 -0
- package/dist-lib/chunk.RWUUFNUL-DFztA4uV.js +43 -0
- package/dist-lib/chunk.SI4ACBFK-CLb9VfMG.js +61 -0
- package/dist-lib/chunk.YHLNUJ7P-ByKy0MKm.js +251 -0
- package/dist-lib/{decorate-DnZTfaod.js → decorate-CKr8yG1g.js} +1 -1
- package/dist-lib/divider-BOFbR_Ny.js +41 -0
- package/dist-lib/icon-CBNpO1lq.js +9 -0
- package/dist-lib/icon-button-B5rXu3Gg.js +410 -0
- package/dist-lib/input-B212BH6L.js +575 -0
- package/dist-lib/option-BQN9Zz_8.js +1108 -0
- package/dist-lib/spinner-DdcBaa3z.js +6 -0
- package/dist-lib/{toast-BsoXOdeA.js → toast-Bq2PmEpm.js} +1 -1
- package/dist-lib/tooltip-CBGOiZwJ.js +197 -0
- package/dist-lib/{webmapx-3d-tool-CLppA7mK.js → webmapx-3d-tool-CKoLGMpk.js} +2 -2
- package/dist-lib/{webmapx-base-tool-DfRa7TlD.js → webmapx-base-tool-Bc9Wz0yA.js} +1 -1
- package/dist-lib/{webmapx-config-edit-tool-BztWspia.js → webmapx-config-edit-tool-7265_DNz.js} +7 -7
- package/dist-lib/{webmapx-coordinates-tool-EOqZodjr.js → webmapx-coordinates-tool-nwlckVn6.js} +3 -3
- package/dist-lib/{webmapx-core-bundle-CH-5vYXU.js → webmapx-core-bundle-Q6mWOib1.js} +1579 -671
- package/dist-lib/webmapx-draw-tool-6QRr5Gip.js +4315 -0
- package/dist-lib/{webmapx-geolocation-tool-DIMh2kIr.js → webmapx-geolocation-tool-qxN5aaVB.js} +6 -7
- package/dist-lib/{webmapx-import-layer-tool-DMiC1TpU.js → webmapx-import-layer-tool-tJ374qHR.js} +2 -2
- package/dist-lib/{webmapx-info-tool-D-XbAU9J.js → webmapx-info-tool-C3txgv3v.js} +4 -4
- package/dist-lib/{webmapx-language-osmvector-BAw9TR-M.js → webmapx-language-osmvector-jQzTOPU1.js} +3 -4
- package/dist-lib/{webmapx-measure-tool-CXlg11s8.js → webmapx-measure-tool-Cxxrzgdf.js} +4 -4
- package/dist-lib/{webmapx-modal-tool-Cs7LRrgW.js → webmapx-modal-tool-DQVHNXqX.js} +2 -2
- package/dist-lib/{webmapx-plugin-tool-qe2yTrWB.js → webmapx-plugin-tool-BNZ61x6s.js} +1 -1
- package/dist-lib/{webmapx-print-tool-DrK9sLC7.js → webmapx-print-tool-BDOTbS6u.js} +7 -8
- package/dist-lib/{webmapx-search-tool-H7NisgWH.js → webmapx-search-tool-CHlsE2Wx.js} +2 -2
- package/dist-lib/webmapx-settings-B0AT9Vjn.js +482 -0
- package/dist-lib/{webmapx-truearea-tool-CSU9mE1D.js → webmapx-truearea-tool-dxSgcbOj.js} +2 -2
- package/dist-lib/{webmapx-view-mode-tool-D1QyQfq8.js → webmapx-view-mode-tool-DVSMakdh.js} +2 -2
- package/dist-lib/webmapx.js +312 -310
- package/package.json +1 -1
- package/dist-lib/webmapx-draw-tool-DxQgUF1Q.js +0 -2117
- package/dist-lib/webmapx-settings-EHSm-AGU.js +0 -167
package/dist-lib/{webmapx-geolocation-tool-DIMh2kIr.js → webmapx-geolocation-tool-qxN5aaVB.js}
RENAMED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { r as e, t } from "./decorate-
|
|
2
|
-
import { t as n } from "./webmapx-base-tool-
|
|
1
|
+
import { r as e, t } from "./decorate-CKr8yG1g.js";
|
|
2
|
+
import { t as n } from "./webmapx-base-tool-Bc9Wz0yA.js";
|
|
3
|
+
import "./button-BlZd3WPH.js";
|
|
4
|
+
import "./input-B212BH6L.js";
|
|
5
|
+
import "./spinner-DdcBaa3z.js";
|
|
6
|
+
import "./icon-button-B5rXu3Gg.js";
|
|
3
7
|
import { a as r, i, t as a } from "./zip.js-DVhmtjxZ.js";
|
|
4
8
|
import { css as o, html as s } from "lit";
|
|
5
9
|
import { customElement as c, property as l, state as u } from "lit/decorators.js";
|
|
6
|
-
import "@shoelace-style/shoelace/dist/components/button/button.js";
|
|
7
|
-
import "@shoelace-style/shoelace/dist/components/spinner/spinner.js";
|
|
8
|
-
import "@shoelace-style/shoelace/dist/components/dialog/dialog.js";
|
|
9
|
-
import "@shoelace-style/shoelace/dist/components/input/input.js";
|
|
10
|
-
import "@shoelace-style/shoelace/dist/components/icon-button/icon-button.js";
|
|
11
10
|
//#region src/components/webmapx-geolocation-tool.ts
|
|
12
11
|
var d, f = "webmapx-geolocation-tracks", p = "webmapx-geolocation-track-last-id";
|
|
13
12
|
function m() {
|
package/dist-lib/{webmapx-import-layer-tool-DMiC1TpU.js → webmapx-import-layer-tool-tJ374qHR.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as e, t } from "./decorate-
|
|
2
|
-
import { t as n } from "./webmapx-base-tool-
|
|
1
|
+
import { r as e, t } from "./decorate-CKr8yG1g.js";
|
|
2
|
+
import { t as n } from "./webmapx-base-tool-Bc9Wz0yA.js";
|
|
3
3
|
import { discoverLayers as r } from "./layer-discovery-DFP-WHAh.js";
|
|
4
4
|
import { css as i, html as a } from "lit";
|
|
5
5
|
import { customElement as o, state as s } from "lit/decorators.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { t as e } from "./decorate-
|
|
2
|
-
import { t } from "./webmapx-base-tool-
|
|
1
|
+
import { t as e } from "./decorate-CKr8yG1g.js";
|
|
2
|
+
import { t } from "./webmapx-base-tool-Bc9Wz0yA.js";
|
|
3
|
+
import "./icon-CBNpO1lq.js";
|
|
4
|
+
import "./spinner-DdcBaa3z.js";
|
|
3
5
|
import { t as n } from "./throttle-BeneRNYK.js";
|
|
4
6
|
import { t as r } from "./wms-feature-info-C0RVMEQC.js";
|
|
5
7
|
import { css as i, html as a, nothing as o } from "lit";
|
|
6
8
|
import { customElement as s, state as c } from "lit/decorators.js";
|
|
7
|
-
import "@shoelace-style/shoelace/dist/components/icon/icon.js";
|
|
8
|
-
import "@shoelace-style/shoelace/dist/components/spinner/spinner.js";
|
|
9
9
|
//#region src/components/webmapx-info-tool.ts
|
|
10
10
|
var l = "webmapx-info-pin", u = 8, d = 120, f = 4, p = 6, m = class extends t {
|
|
11
11
|
constructor(...e) {
|
package/dist-lib/{webmapx-language-osmvector-BAw9TR-M.js → webmapx-language-osmvector-jQzTOPU1.js}
RENAMED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { t as e } from "./decorate-
|
|
2
|
-
import { t } from "./webmapx-modal-tool-
|
|
1
|
+
import { t as e } from "./decorate-CKr8yG1g.js";
|
|
2
|
+
import { t } from "./webmapx-modal-tool-DQVHNXqX.js";
|
|
3
|
+
import "./option-BQN9Zz_8.js";
|
|
3
4
|
import { css as n, html as r } from "lit";
|
|
4
5
|
import { customElement as i, property as a } from "lit/decorators.js";
|
|
5
|
-
import "@shoelace-style/shoelace/dist/components/select/select.js";
|
|
6
|
-
import "@shoelace-style/shoelace/dist/components/option/option.js";
|
|
7
6
|
//#region src/components/webmapx-language-osmvector.ts
|
|
8
7
|
var o = "webmapx-language-osmvector", s = "webmapx-language-osmvector-change", c = /* @__PURE__ */ new WeakMap(), l = [
|
|
9
8
|
{
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { t as e } from "./decorate-
|
|
1
|
+
import { t as e } from "./decorate-CKr8yG1g.js";
|
|
2
|
+
import "./icon-CBNpO1lq.js";
|
|
3
|
+
import "./button-BlZd3WPH.js";
|
|
2
4
|
import { i as t, n, r, t as i } from "./geo-calculations-DbFJAUoI.js";
|
|
3
5
|
import { t as a } from "./throttle-BeneRNYK.js";
|
|
4
|
-
import { t as o } from "./webmapx-modal-tool-
|
|
6
|
+
import { t as o } from "./webmapx-modal-tool-DQVHNXqX.js";
|
|
5
7
|
import { css as s, html as c, nothing as l } from "lit";
|
|
6
8
|
import { customElement as u, property as d, state as f } from "lit/decorators.js";
|
|
7
|
-
import "@shoelace-style/shoelace/dist/components/button/button.js";
|
|
8
|
-
import "@shoelace-style/shoelace/dist/components/icon/icon.js";
|
|
9
9
|
//#region src/components/webmapx-measure-tool.ts
|
|
10
10
|
var p = "webmapx-measure-static-source", m = "webmapx-measure-points", h = "webmapx-measure-lines", g = "webmapx-measure-polygon", _ = "webmapx-measure-segment-labels", v = "webmapx-measure-rubberband-source", y = "webmapx-measure-rubberband-layer", b = class extends o {
|
|
11
11
|
constructor(...e) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as e, t } from "./decorate-
|
|
2
|
-
import { t as n } from "./webmapx-base-tool-
|
|
1
|
+
import { r as e, t } from "./decorate-CKr8yG1g.js";
|
|
2
|
+
import { t as n } from "./webmapx-base-tool-Bc9Wz0yA.js";
|
|
3
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 {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "./decorate-
|
|
1
|
+
import { t as e } from "./decorate-CKr8yG1g.js";
|
|
2
2
|
import { LitElement as t, html as n } from "lit";
|
|
3
3
|
import { customElement as r, property as i } from "lit/decorators.js";
|
|
4
4
|
//#region src/components/webmapx-plugin-tool.ts
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { r as e, t } from "./decorate-
|
|
1
|
+
import { r as e, t } from "./decorate-CKr8yG1g.js";
|
|
2
|
+
import "./button-BlZd3WPH.js";
|
|
3
|
+
import "./checkbox-DB4oPyyw.js";
|
|
4
|
+
import "./input-B212BH6L.js";
|
|
5
|
+
import "./spinner-DdcBaa3z.js";
|
|
2
6
|
import { i as n, r, t as i } from "./attribution-format-B4f05_u0.js";
|
|
3
|
-
import { t as a } from "./webmapx-modal-tool-
|
|
7
|
+
import { t as a } from "./webmapx-modal-tool-DQVHNXqX.js";
|
|
8
|
+
import "./option-BQN9Zz_8.js";
|
|
4
9
|
import { css as o, html as s } from "lit";
|
|
5
10
|
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";
|
|
12
11
|
//#region src/components/webmapx-print-tool.ts
|
|
13
12
|
var u = 210, d = 297, f = 40, p = 10, m = 50, h = 12, g = 6, _ = 96 / 25.4;
|
|
14
13
|
function v(e) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as e, t } from "./decorate-
|
|
2
|
-
import { t as n } from "./webmapx-base-tool-
|
|
1
|
+
import { r as e, t } from "./decorate-CKr8yG1g.js";
|
|
2
|
+
import { t as n } from "./webmapx-base-tool-Bc9Wz0yA.js";
|
|
3
3
|
import { css as r, html as i } from "lit";
|
|
4
4
|
import { customElement as a, state as o } from "lit/decorators.js";
|
|
5
5
|
//#region src/components/webmapx-search-tool.ts
|
|
@@ -0,0 +1,482 @@
|
|
|
1
|
+
import { a as e, i as t, n, r } from "./chunk.YHLNUJ7P-ByKy0MKm.js";
|
|
2
|
+
import { c as i, d as a, l as o, r as s, s as c, t as l, u } from "./decorate-CKr8yG1g.js";
|
|
3
|
+
import { t as d } from "./chunk.NYIIDP5N-B4UCI-rQ.js";
|
|
4
|
+
import { t as f } from "./chunk.3RPBFEDE-Cxq6VVR6.js";
|
|
5
|
+
import { n as p } from "./input-B212BH6L.js";
|
|
6
|
+
import { t as m } from "./chunk.SI4ACBFK-CLb9VfMG.js";
|
|
7
|
+
import "./divider-BOFbR_Ny.js";
|
|
8
|
+
import "./option-BQN9Zz_8.js";
|
|
9
|
+
import { LitElement as h, css as g, html as _ } from "lit";
|
|
10
|
+
import { customElement as v, property as y, query as b, state as x } from "lit/decorators.js";
|
|
11
|
+
import { classMap as S } from "lit/directives/class-map.js";
|
|
12
|
+
import { ifDefined as C } from "lit/directives/if-defined.js";
|
|
13
|
+
import { live as w } from "lit/directives/live.js";
|
|
14
|
+
//#region node_modules/@shoelace-style/shoelace/dist/chunks/chunk.EU44RQUN.js
|
|
15
|
+
var T = g`
|
|
16
|
+
:host {
|
|
17
|
+
display: inline-block;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
:host([size='small']) {
|
|
21
|
+
--height: var(--sl-toggle-size-small);
|
|
22
|
+
--thumb-size: calc(var(--sl-toggle-size-small) + 4px);
|
|
23
|
+
--width: calc(var(--height) * 2);
|
|
24
|
+
|
|
25
|
+
font-size: var(--sl-input-font-size-small);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
:host([size='medium']) {
|
|
29
|
+
--height: var(--sl-toggle-size-medium);
|
|
30
|
+
--thumb-size: calc(var(--sl-toggle-size-medium) + 4px);
|
|
31
|
+
--width: calc(var(--height) * 2);
|
|
32
|
+
|
|
33
|
+
font-size: var(--sl-input-font-size-medium);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
:host([size='large']) {
|
|
37
|
+
--height: var(--sl-toggle-size-large);
|
|
38
|
+
--thumb-size: calc(var(--sl-toggle-size-large) + 4px);
|
|
39
|
+
--width: calc(var(--height) * 2);
|
|
40
|
+
|
|
41
|
+
font-size: var(--sl-input-font-size-large);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.switch {
|
|
45
|
+
position: relative;
|
|
46
|
+
display: inline-flex;
|
|
47
|
+
align-items: center;
|
|
48
|
+
font-family: var(--sl-input-font-family);
|
|
49
|
+
font-size: inherit;
|
|
50
|
+
font-weight: var(--sl-input-font-weight);
|
|
51
|
+
color: var(--sl-input-label-color);
|
|
52
|
+
vertical-align: middle;
|
|
53
|
+
cursor: pointer;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.switch__control {
|
|
57
|
+
flex: 0 0 auto;
|
|
58
|
+
position: relative;
|
|
59
|
+
display: inline-flex;
|
|
60
|
+
align-items: center;
|
|
61
|
+
justify-content: center;
|
|
62
|
+
width: var(--width);
|
|
63
|
+
height: var(--height);
|
|
64
|
+
background-color: var(--sl-color-neutral-400);
|
|
65
|
+
border: solid var(--sl-input-border-width) var(--sl-color-neutral-400);
|
|
66
|
+
border-radius: var(--height);
|
|
67
|
+
transition:
|
|
68
|
+
var(--sl-transition-fast) border-color,
|
|
69
|
+
var(--sl-transition-fast) background-color;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.switch__control .switch__thumb {
|
|
73
|
+
width: var(--thumb-size);
|
|
74
|
+
height: var(--thumb-size);
|
|
75
|
+
background-color: var(--sl-color-neutral-0);
|
|
76
|
+
border-radius: 50%;
|
|
77
|
+
border: solid var(--sl-input-border-width) var(--sl-color-neutral-400);
|
|
78
|
+
translate: calc((var(--width) - var(--height)) / -2);
|
|
79
|
+
transition:
|
|
80
|
+
var(--sl-transition-fast) translate ease,
|
|
81
|
+
var(--sl-transition-fast) background-color,
|
|
82
|
+
var(--sl-transition-fast) border-color,
|
|
83
|
+
var(--sl-transition-fast) box-shadow;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.switch__input {
|
|
87
|
+
position: absolute;
|
|
88
|
+
opacity: 0;
|
|
89
|
+
padding: 0;
|
|
90
|
+
margin: 0;
|
|
91
|
+
pointer-events: none;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/* Hover */
|
|
95
|
+
.switch:not(.switch--checked):not(.switch--disabled) .switch__control:hover {
|
|
96
|
+
background-color: var(--sl-color-neutral-400);
|
|
97
|
+
border-color: var(--sl-color-neutral-400);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.switch:not(.switch--checked):not(.switch--disabled) .switch__control:hover .switch__thumb {
|
|
101
|
+
background-color: var(--sl-color-neutral-0);
|
|
102
|
+
border-color: var(--sl-color-neutral-400);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/* Focus */
|
|
106
|
+
.switch:not(.switch--checked):not(.switch--disabled) .switch__input:focus-visible ~ .switch__control {
|
|
107
|
+
background-color: var(--sl-color-neutral-400);
|
|
108
|
+
border-color: var(--sl-color-neutral-400);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.switch:not(.switch--checked):not(.switch--disabled) .switch__input:focus-visible ~ .switch__control .switch__thumb {
|
|
112
|
+
background-color: var(--sl-color-neutral-0);
|
|
113
|
+
border-color: var(--sl-color-primary-600);
|
|
114
|
+
outline: var(--sl-focus-ring);
|
|
115
|
+
outline-offset: var(--sl-focus-ring-offset);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/* Checked */
|
|
119
|
+
.switch--checked .switch__control {
|
|
120
|
+
background-color: var(--sl-color-primary-600);
|
|
121
|
+
border-color: var(--sl-color-primary-600);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.switch--checked .switch__control .switch__thumb {
|
|
125
|
+
background-color: var(--sl-color-neutral-0);
|
|
126
|
+
border-color: var(--sl-color-primary-600);
|
|
127
|
+
translate: calc((var(--width) - var(--height)) / 2);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/* Checked + hover */
|
|
131
|
+
.switch.switch--checked:not(.switch--disabled) .switch__control:hover {
|
|
132
|
+
background-color: var(--sl-color-primary-600);
|
|
133
|
+
border-color: var(--sl-color-primary-600);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.switch.switch--checked:not(.switch--disabled) .switch__control:hover .switch__thumb {
|
|
137
|
+
background-color: var(--sl-color-neutral-0);
|
|
138
|
+
border-color: var(--sl-color-primary-600);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/* Checked + focus */
|
|
142
|
+
.switch.switch--checked:not(.switch--disabled) .switch__input:focus-visible ~ .switch__control {
|
|
143
|
+
background-color: var(--sl-color-primary-600);
|
|
144
|
+
border-color: var(--sl-color-primary-600);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.switch.switch--checked:not(.switch--disabled) .switch__input:focus-visible ~ .switch__control .switch__thumb {
|
|
148
|
+
background-color: var(--sl-color-neutral-0);
|
|
149
|
+
border-color: var(--sl-color-primary-600);
|
|
150
|
+
outline: var(--sl-focus-ring);
|
|
151
|
+
outline-offset: var(--sl-focus-ring-offset);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/* Disabled */
|
|
155
|
+
.switch--disabled {
|
|
156
|
+
opacity: 0.5;
|
|
157
|
+
cursor: not-allowed;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.switch__label {
|
|
161
|
+
display: inline-block;
|
|
162
|
+
line-height: var(--height);
|
|
163
|
+
margin-inline-start: 0.5em;
|
|
164
|
+
user-select: none;
|
|
165
|
+
-webkit-user-select: none;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
:host([required]) .switch__label::after {
|
|
169
|
+
content: var(--sl-input-required-content);
|
|
170
|
+
color: var(--sl-input-required-content-color);
|
|
171
|
+
margin-inline-start: var(--sl-input-required-content-offset);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
@media (forced-colors: active) {
|
|
175
|
+
.switch.switch--checked:not(.switch--disabled) .switch__control:hover .switch__thumb,
|
|
176
|
+
.switch--checked .switch__control .switch__thumb {
|
|
177
|
+
background-color: ButtonText;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
`, E = class extends n {
|
|
181
|
+
constructor() {
|
|
182
|
+
super(...arguments), this.formControlController = new f(this, {
|
|
183
|
+
value: (e) => e.checked ? e.value || "on" : void 0,
|
|
184
|
+
defaultValue: (e) => e.defaultChecked,
|
|
185
|
+
setValue: (e, t) => e.checked = t
|
|
186
|
+
}), this.hasSlotController = new d(this, "help-text"), this.hasFocus = !1, this.title = "", this.name = "", this.size = "medium", this.disabled = !1, this.checked = !1, this.defaultChecked = !1, this.form = "", this.required = !1, this.helpText = "";
|
|
187
|
+
}
|
|
188
|
+
get validity() {
|
|
189
|
+
return this.input.validity;
|
|
190
|
+
}
|
|
191
|
+
get validationMessage() {
|
|
192
|
+
return this.input.validationMessage;
|
|
193
|
+
}
|
|
194
|
+
firstUpdated() {
|
|
195
|
+
this.formControlController.updateValidity();
|
|
196
|
+
}
|
|
197
|
+
handleBlur() {
|
|
198
|
+
this.hasFocus = !1, this.emit("sl-blur");
|
|
199
|
+
}
|
|
200
|
+
handleInput() {
|
|
201
|
+
this.emit("sl-input");
|
|
202
|
+
}
|
|
203
|
+
handleInvalid(e) {
|
|
204
|
+
this.formControlController.setValidity(!1), this.formControlController.emitInvalidEvent(e);
|
|
205
|
+
}
|
|
206
|
+
handleClick() {
|
|
207
|
+
this.checked = !this.checked, this.emit("sl-change");
|
|
208
|
+
}
|
|
209
|
+
handleFocus() {
|
|
210
|
+
this.hasFocus = !0, this.emit("sl-focus");
|
|
211
|
+
}
|
|
212
|
+
handleKeyDown(e) {
|
|
213
|
+
e.key === "ArrowLeft" && (e.preventDefault(), this.checked = !1, this.emit("sl-change"), this.emit("sl-input")), e.key === "ArrowRight" && (e.preventDefault(), this.checked = !0, this.emit("sl-change"), this.emit("sl-input"));
|
|
214
|
+
}
|
|
215
|
+
handleCheckedChange() {
|
|
216
|
+
this.input.checked = this.checked, this.formControlController.updateValidity();
|
|
217
|
+
}
|
|
218
|
+
handleDisabledChange() {
|
|
219
|
+
this.formControlController.setValidity(!0);
|
|
220
|
+
}
|
|
221
|
+
click() {
|
|
222
|
+
this.input.click();
|
|
223
|
+
}
|
|
224
|
+
focus(e) {
|
|
225
|
+
this.input.focus(e);
|
|
226
|
+
}
|
|
227
|
+
blur() {
|
|
228
|
+
this.input.blur();
|
|
229
|
+
}
|
|
230
|
+
checkValidity() {
|
|
231
|
+
return this.input.checkValidity();
|
|
232
|
+
}
|
|
233
|
+
getForm() {
|
|
234
|
+
return this.formControlController.getForm();
|
|
235
|
+
}
|
|
236
|
+
reportValidity() {
|
|
237
|
+
return this.input.reportValidity();
|
|
238
|
+
}
|
|
239
|
+
setCustomValidity(e) {
|
|
240
|
+
this.input.setCustomValidity(e), this.formControlController.updateValidity();
|
|
241
|
+
}
|
|
242
|
+
render() {
|
|
243
|
+
let e = this.hasSlotController.test("help-text"), t = this.helpText ? !0 : !!e;
|
|
244
|
+
return _`
|
|
245
|
+
<div
|
|
246
|
+
class=${S({
|
|
247
|
+
"form-control": !0,
|
|
248
|
+
"form-control--small": this.size === "small",
|
|
249
|
+
"form-control--medium": this.size === "medium",
|
|
250
|
+
"form-control--large": this.size === "large",
|
|
251
|
+
"form-control--has-help-text": t
|
|
252
|
+
})}
|
|
253
|
+
>
|
|
254
|
+
<label
|
|
255
|
+
part="base"
|
|
256
|
+
class=${S({
|
|
257
|
+
switch: !0,
|
|
258
|
+
"switch--checked": this.checked,
|
|
259
|
+
"switch--disabled": this.disabled,
|
|
260
|
+
"switch--focused": this.hasFocus,
|
|
261
|
+
"switch--small": this.size === "small",
|
|
262
|
+
"switch--medium": this.size === "medium",
|
|
263
|
+
"switch--large": this.size === "large"
|
|
264
|
+
})}
|
|
265
|
+
>
|
|
266
|
+
<input
|
|
267
|
+
class="switch__input"
|
|
268
|
+
type="checkbox"
|
|
269
|
+
title=${this.title}
|
|
270
|
+
name=${this.name}
|
|
271
|
+
value=${C(this.value)}
|
|
272
|
+
.checked=${w(this.checked)}
|
|
273
|
+
.disabled=${this.disabled}
|
|
274
|
+
.required=${this.required}
|
|
275
|
+
role="switch"
|
|
276
|
+
aria-checked=${this.checked ? "true" : "false"}
|
|
277
|
+
aria-describedby="help-text"
|
|
278
|
+
@click=${this.handleClick}
|
|
279
|
+
@input=${this.handleInput}
|
|
280
|
+
@invalid=${this.handleInvalid}
|
|
281
|
+
@blur=${this.handleBlur}
|
|
282
|
+
@focus=${this.handleFocus}
|
|
283
|
+
@keydown=${this.handleKeyDown}
|
|
284
|
+
/>
|
|
285
|
+
|
|
286
|
+
<span part="control" class="switch__control">
|
|
287
|
+
<span part="thumb" class="switch__thumb"></span>
|
|
288
|
+
</span>
|
|
289
|
+
|
|
290
|
+
<div part="label" class="switch__label">
|
|
291
|
+
<slot></slot>
|
|
292
|
+
</div>
|
|
293
|
+
</label>
|
|
294
|
+
|
|
295
|
+
<div
|
|
296
|
+
aria-hidden=${t ? "false" : "true"}
|
|
297
|
+
class="form-control__help-text"
|
|
298
|
+
id="help-text"
|
|
299
|
+
part="form-control-help-text"
|
|
300
|
+
>
|
|
301
|
+
<slot name="help-text">${this.helpText}</slot>
|
|
302
|
+
</div>
|
|
303
|
+
</div>
|
|
304
|
+
`;
|
|
305
|
+
}
|
|
306
|
+
};
|
|
307
|
+
//#endregion
|
|
308
|
+
//#region node_modules/@shoelace-style/shoelace/dist/chunks/chunk.IADS735N.js
|
|
309
|
+
E.styles = [
|
|
310
|
+
r,
|
|
311
|
+
m,
|
|
312
|
+
T
|
|
313
|
+
], e([b("input[type=\"checkbox\"]")], E.prototype, "input", 2), e([x()], E.prototype, "hasFocus", 2), e([y()], E.prototype, "title", 2), e([y()], E.prototype, "name", 2), e([y()], E.prototype, "value", 2), e([y({ reflect: !0 })], E.prototype, "size", 2), e([y({
|
|
314
|
+
type: Boolean,
|
|
315
|
+
reflect: !0
|
|
316
|
+
})], E.prototype, "disabled", 2), e([y({
|
|
317
|
+
type: Boolean,
|
|
318
|
+
reflect: !0
|
|
319
|
+
})], E.prototype, "checked", 2), e([p("checked")], E.prototype, "defaultChecked", 2), e([y({ reflect: !0 })], E.prototype, "form", 2), e([y({
|
|
320
|
+
type: Boolean,
|
|
321
|
+
reflect: !0
|
|
322
|
+
})], E.prototype, "required", 2), e([y({ attribute: "help-text" })], E.prototype, "helpText", 2), e([t("checked", { waitUntilFirstUpdate: !0 })], E.prototype, "handleCheckedChange", 1), e([t("disabled", { waitUntilFirstUpdate: !0 })], E.prototype, "handleDisabledChange", 1), E.define("sl-switch");
|
|
323
|
+
//#endregion
|
|
324
|
+
//#region src/components/webmapx-settings.ts
|
|
325
|
+
var D = class extends h {
|
|
326
|
+
constructor(...e) {
|
|
327
|
+
super(...e), this.darkMode = !1, this.apiKey = "", this.currentAdapter = u, this.availableAdapters = [];
|
|
328
|
+
}
|
|
329
|
+
static {
|
|
330
|
+
this.styles = g`
|
|
331
|
+
:host {
|
|
332
|
+
display: block;
|
|
333
|
+
padding: 1rem;
|
|
334
|
+
box-sizing: border-box;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
.setting-group {
|
|
338
|
+
margin-bottom: 1.5rem;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
.setting-group:last-child {
|
|
342
|
+
margin-bottom: 0;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
h4 {
|
|
346
|
+
margin: 0 0 0.75rem 0;
|
|
347
|
+
font-size: 0.875rem;
|
|
348
|
+
font-weight: 600;
|
|
349
|
+
color: var(--color-text-secondary, #666);
|
|
350
|
+
text-transform: uppercase;
|
|
351
|
+
letter-spacing: 0.05em;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
sl-switch {
|
|
355
|
+
--sl-toggle-size-medium: 1.25rem;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
sl-input {
|
|
359
|
+
margin-top: 0.5rem;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
sl-select {
|
|
363
|
+
margin-top: 0.5rem;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
sl-select::part(combobox) {
|
|
367
|
+
min-height: 2.5rem;
|
|
368
|
+
}
|
|
369
|
+
`;
|
|
370
|
+
}
|
|
371
|
+
connectedCallback() {
|
|
372
|
+
super.connectedCallback(), this.loadSettings();
|
|
373
|
+
}
|
|
374
|
+
loadSettings() {
|
|
375
|
+
let e = localStorage.getItem("webmapx-theme");
|
|
376
|
+
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 = a().filter((e) => ![
|
|
377
|
+
"ol",
|
|
378
|
+
"l",
|
|
379
|
+
"c"
|
|
380
|
+
].includes(e)), this.currentAdapter = this.detectCurrentAdapter();
|
|
381
|
+
}
|
|
382
|
+
getMapStorageKey(e, t) {
|
|
383
|
+
return c(e.id, t);
|
|
384
|
+
}
|
|
385
|
+
detectCurrentAdapter() {
|
|
386
|
+
let e = s(this);
|
|
387
|
+
if (!e) return u;
|
|
388
|
+
let t = this.getMapStorageKey(e, "adapter"), n = o({
|
|
389
|
+
explicitAdapter: e.getAttribute("adapter") ?? e.getAttribute("type"),
|
|
390
|
+
savedAdapter: t ? localStorage.getItem(t) : null,
|
|
391
|
+
configuredAdapter: e.mapConfig?.type ?? null,
|
|
392
|
+
defaultAdapter: u
|
|
393
|
+
});
|
|
394
|
+
return this.availableAdapters.includes(n) ? n : u;
|
|
395
|
+
}
|
|
396
|
+
applyTheme() {
|
|
397
|
+
let e = document.documentElement;
|
|
398
|
+
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");
|
|
399
|
+
}
|
|
400
|
+
handleThemeChange(e) {
|
|
401
|
+
let t = e.target;
|
|
402
|
+
this.darkMode = t.checked, this.applyTheme(), this.dispatchEvent(new CustomEvent("theme-change", {
|
|
403
|
+
detail: { theme: this.darkMode ? "dark" : "light" },
|
|
404
|
+
bubbles: !0,
|
|
405
|
+
composed: !0
|
|
406
|
+
}));
|
|
407
|
+
}
|
|
408
|
+
handleApiKeyChange(e) {
|
|
409
|
+
let t = e.target;
|
|
410
|
+
this.apiKey = t.value, localStorage.setItem("webmapx-api-key", this.apiKey), this.dispatchEvent(new CustomEvent("apikey-change", {
|
|
411
|
+
detail: { apiKey: this.apiKey },
|
|
412
|
+
bubbles: !0,
|
|
413
|
+
composed: !0
|
|
414
|
+
}));
|
|
415
|
+
}
|
|
416
|
+
handleAdapterChange(e) {
|
|
417
|
+
let t = e.target, n = i(t.value);
|
|
418
|
+
if (!n || n === this.currentAdapter) return;
|
|
419
|
+
let r = s(this);
|
|
420
|
+
if (!r) {
|
|
421
|
+
console.error("[webmapx-settings] No <webmapx-map> found for adapter switching.");
|
|
422
|
+
return;
|
|
423
|
+
}
|
|
424
|
+
let a = this.getMapStorageKey(r, "adapter");
|
|
425
|
+
r.saveState?.(), a && localStorage.setItem(a, n), window.location.reload();
|
|
426
|
+
}
|
|
427
|
+
formatAdapterName(e) {
|
|
428
|
+
return {
|
|
429
|
+
maplibre: "MapLibre GL",
|
|
430
|
+
openlayers: "OpenLayers",
|
|
431
|
+
leaflet: "Leaflet",
|
|
432
|
+
cesium: "Cesium"
|
|
433
|
+
}[e] || e;
|
|
434
|
+
}
|
|
435
|
+
render() {
|
|
436
|
+
return _`
|
|
437
|
+
<div class="setting-group">
|
|
438
|
+
<h4>Map Engine</h4>
|
|
439
|
+
<sl-select
|
|
440
|
+
label="Adapter"
|
|
441
|
+
value=${this.currentAdapter}
|
|
442
|
+
@sl-change=${this.handleAdapterChange}
|
|
443
|
+
>
|
|
444
|
+
${this.availableAdapters.map((e) => _`
|
|
445
|
+
<sl-option value=${e}>
|
|
446
|
+
${this.formatAdapterName(e)}
|
|
447
|
+
</sl-option>
|
|
448
|
+
`)}
|
|
449
|
+
</sl-select>
|
|
450
|
+
</div>
|
|
451
|
+
|
|
452
|
+
<sl-divider></sl-divider>
|
|
453
|
+
|
|
454
|
+
<div class="setting-group">
|
|
455
|
+
<h4>Appearance</h4>
|
|
456
|
+
<sl-switch
|
|
457
|
+
?checked=${this.darkMode}
|
|
458
|
+
@sl-change=${this.handleThemeChange}
|
|
459
|
+
>
|
|
460
|
+
Dark Mode
|
|
461
|
+
</sl-switch>
|
|
462
|
+
</div>
|
|
463
|
+
|
|
464
|
+
<sl-divider></sl-divider>
|
|
465
|
+
|
|
466
|
+
<div class="setting-group">
|
|
467
|
+
<h4>API Configuration</h4>
|
|
468
|
+
<sl-input
|
|
469
|
+
label="API Key"
|
|
470
|
+
type="password"
|
|
471
|
+
password-toggle
|
|
472
|
+
value=${this.apiKey}
|
|
473
|
+
@sl-input=${this.handleApiKeyChange}
|
|
474
|
+
placeholder="Enter your API key"
|
|
475
|
+
></sl-input>
|
|
476
|
+
</div>
|
|
477
|
+
`;
|
|
478
|
+
}
|
|
479
|
+
};
|
|
480
|
+
l([x()], D.prototype, "darkMode", void 0), l([x()], D.prototype, "apiKey", void 0), l([x()], D.prototype, "currentAdapter", void 0), l([x()], D.prototype, "availableAdapters", void 0), D = l([v("webmapx-settings")], D);
|
|
481
|
+
//#endregion
|
|
482
|
+
export { D as WebmapxSettings };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as e, t } from "./decorate-
|
|
1
|
+
import { r as e, t } from "./decorate-CKr8yG1g.js";
|
|
2
2
|
import { t as n } from "./esm-CTuscnN5.js";
|
|
3
|
-
import { t as r } from "./webmapx-modal-tool-
|
|
3
|
+
import { t as r } from "./webmapx-modal-tool-DQVHNXqX.js";
|
|
4
4
|
import { css as i, html as a } from "lit";
|
|
5
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
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as e, t } from "./decorate-
|
|
2
|
-
import { t as n } from "./webmapx-base-tool-
|
|
1
|
+
import { r as e, t } from "./decorate-CKr8yG1g.js";
|
|
2
|
+
import { t as n } from "./webmapx-base-tool-Bc9Wz0yA.js";
|
|
3
3
|
import { css as r, html as i } from "lit";
|
|
4
4
|
import { customElement as a, state as o } from "lit/decorators.js";
|
|
5
5
|
//#region src/components/webmapx-view-mode-tool.ts
|