@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.
- package/dist-lib/{decorate-CWgUV1hU.js → decorate-DnZTfaod.js} +6 -6
- package/dist-lib/dist-BIbq3o-p.js +213 -0
- package/dist-lib/{dist-Dm6b7XCs.js → dist-CKAaoSoW.js} +2743 -2491
- package/dist-lib/{dist-kKlmcBXq.js → dist-CWCNMXMK.js} +1 -1
- package/dist-lib/{dist-Ha9LQCut.js → dist-D-5Gmgwo.js} +1 -1
- package/dist-lib/{layer-discovery-afWzu5hY.js → layer-discovery-DFP-WHAh.js} +1 -1
- package/dist-lib/{leaflet-adapter-D9djjrKv.js → leaflet-adapter-A0rte-c7.js} +1 -1
- package/dist-lib/{maplibre-adapter-TFc3e0G9.js → maplibre-adapter-Cy6yX6o7.js} +1 -1
- package/dist-lib/ol-tilegrid-Ct4my3IN.js +24 -0
- package/dist-lib/openlayers-adapter-B8WtV1tn.js +1462 -0
- package/dist-lib/{toast-Cm28o9U6.js → toast-BsoXOdeA.js} +1 -1
- package/dist-lib/{webmapx-3d-tool-D4CTD2gB.js → webmapx-3d-tool-CLppA7mK.js} +13 -13
- package/dist-lib/{webmapx-base-tool-Dm9NAWLD.js → webmapx-base-tool-DfRa7TlD.js} +1 -1
- package/dist-lib/{webmapx-config-edit-tool-BgcSkmmg.js → webmapx-config-edit-tool-BztWspia.js} +21 -21
- package/dist-lib/{webmapx-coordinates-tool-GMfztOzE.js → webmapx-coordinates-tool-EOqZodjr.js} +20 -20
- package/dist-lib/{webmapx-core-bundle-BDImi1RE.js → webmapx-core-bundle-CH-5vYXU.js} +607 -1519
- package/dist-lib/webmapx-draw-tool-DxQgUF1Q.js +2117 -0
- package/dist-lib/{webmapx-geolocation-tool-Rw3-Iad1.js → webmapx-geolocation-tool-DIMh2kIr.js} +26 -25
- package/dist-lib/{webmapx-import-layer-tool-DRYviHd5.js → webmapx-import-layer-tool-DMiC1TpU.js} +16 -16
- package/dist-lib/{webmapx-info-tool-BJA157cy.js → webmapx-info-tool-D-XbAU9J.js} +56 -56
- package/dist-lib/{webmapx-language-osmvector-M5y_lwOg.js → webmapx-language-osmvector-BAw9TR-M.js} +12 -11
- package/dist-lib/{webmapx-measure-tool-BXhMJFC6.js → webmapx-measure-tool-CXlg11s8.js} +34 -34
- package/dist-lib/{webmapx-modal-tool-eF6Naluv.js → webmapx-modal-tool-Cs7LRrgW.js} +3 -3
- package/dist-lib/{webmapx-plugin-tool-D2Hghf9n.js → webmapx-plugin-tool-qe2yTrWB.js} +7 -7
- package/dist-lib/{webmapx-print-tool-ob1bOsR5.js → webmapx-print-tool-DrK9sLC7.js} +27 -26
- package/dist-lib/{webmapx-search-tool-Cv8BrYvY.js → webmapx-search-tool-H7NisgWH.js} +11 -11
- package/dist-lib/webmapx-settings-EHSm-AGU.js +167 -0
- package/dist-lib/{webmapx-truearea-tool-CMB4Orm-.js → webmapx-truearea-tool-CSU9mE1D.js} +26 -26
- package/dist-lib/{webmapx-view-mode-tool-CUpLNjOj.js → webmapx-view-mode-tool-D1QyQfq8.js} +9 -9
- package/dist-lib/webmapx.css +1 -1
- package/dist-lib/webmapx.js +21 -21
- package/package.json +1 -1
- package/dist-lib/WMTS-DCN4zX0-.js +0 -1169
- package/dist-lib/alert-GeHlqlN8.js +0 -310
- package/dist-lib/button-DFdGkRPQ.js +0 -741
- package/dist-lib/checkbox-QoR4S8tV.js +0 -284
- package/dist-lib/chunk.36O46B5H-B6ZL7Sm1.js +0 -77
- package/dist-lib/chunk.3RPBFEDE-BFO1fHVm.js +0 -138
- package/dist-lib/chunk.5JY5FUCG-DTXsslmx.js +0 -1090
- package/dist-lib/chunk.6CTB5ZDJ-DjZrBd6Y.js +0 -99
- package/dist-lib/chunk.AJ3ENQ5C-Ci7Gm2b6.js +0 -175
- package/dist-lib/chunk.LD4M4QGE-CiCfhE8r.js +0 -8
- package/dist-lib/chunk.NYIIDP5N-BikXIStD.js +0 -99
- package/dist-lib/chunk.RWUUFNUL-DFztA4uV.js +0 -43
- package/dist-lib/chunk.SI4ACBFK-CLb9VfMG.js +0 -61
- package/dist-lib/chunk.YHLNUJ7P-D-kanrCf.js +0 -503
- package/dist-lib/decorators-B35AgiCU.js +0 -351
- package/dist-lib/dist-c1PlDAd1.js +0 -2359
- package/dist-lib/divider-CPm675yY.js +0 -41
- package/dist-lib/icon-CEOgWlro.js +0 -9
- package/dist-lib/icon-button-Da_nBTy3.js +0 -408
- package/dist-lib/input-CeGntPlT.js +0 -590
- package/dist-lib/ol-tilegrid-9VtyxaLG.js +0 -64
- package/dist-lib/openlayers-adapter-DVW1KCRv.js +0 -13307
- package/dist-lib/option-CBxl1mZP.js +0 -1106
- package/dist-lib/rbush-C8k41T4z.js +0 -254
- package/dist-lib/spinner-DysxdNG9.js +0 -6
- package/dist-lib/tooltip-Cucn1SiD.js +0 -197
- package/dist-lib/webmapx-draw-tool-DooAV8cF.js +0 -4336
- package/dist-lib/webmapx-settings-DDEJ8aoV.js +0 -479
|
@@ -1,254 +0,0 @@
|
|
|
1
|
-
//#region node_modules/quickselect/index.js
|
|
2
|
-
function e(r, i, a = 0, o = r.length - 1, s = n) {
|
|
3
|
-
for (; o > a;) {
|
|
4
|
-
if (o - a > 600) {
|
|
5
|
-
let t = o - a + 1, n = i - a + 1, c = Math.log(t), l = .5 * Math.exp(2 * c / 3), u = .5 * Math.sqrt(c * l * (t - l) / t) * (n - t / 2 < 0 ? -1 : 1);
|
|
6
|
-
e(r, i, Math.max(a, Math.floor(i - n * l / t + u)), Math.min(o, Math.floor(i + (t - n) * l / t + u)), s);
|
|
7
|
-
}
|
|
8
|
-
let n = r[i], c = a, l = o;
|
|
9
|
-
for (t(r, a, i), s(r[o], n) > 0 && t(r, a, o); c < l;) {
|
|
10
|
-
for (t(r, c, l), c++, l--; s(r[c], n) < 0;) c++;
|
|
11
|
-
for (; s(r[l], n) > 0;) l--;
|
|
12
|
-
}
|
|
13
|
-
s(r[a], n) === 0 ? t(r, a, l) : (l++, t(r, l, o)), l <= i && (a = l + 1), i <= l && (o = l - 1);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
function t(e, t, n) {
|
|
17
|
-
let r = e[t];
|
|
18
|
-
e[t] = e[n], e[n] = r;
|
|
19
|
-
}
|
|
20
|
-
function n(e, t) {
|
|
21
|
-
return e < t ? -1 : +(e > t);
|
|
22
|
-
}
|
|
23
|
-
//#endregion
|
|
24
|
-
//#region node_modules/rbush/index.js
|
|
25
|
-
var r = class {
|
|
26
|
-
constructor(e = 9) {
|
|
27
|
-
this._maxEntries = Math.max(4, e), this._minEntries = Math.max(2, Math.ceil(this._maxEntries * .4)), this.clear();
|
|
28
|
-
}
|
|
29
|
-
all() {
|
|
30
|
-
return this._all(this.data, []);
|
|
31
|
-
}
|
|
32
|
-
search(e) {
|
|
33
|
-
let t = this.data, n = [];
|
|
34
|
-
if (!h(e, t)) return n;
|
|
35
|
-
let r = this.toBBox, i = [];
|
|
36
|
-
for (; t;) {
|
|
37
|
-
for (let a = 0; a < t.children.length; a++) {
|
|
38
|
-
let o = t.children[a], s = t.leaf ? r(o) : o;
|
|
39
|
-
h(e, s) && (t.leaf ? n.push(o) : m(e, s) ? this._all(o, n) : i.push(o));
|
|
40
|
-
}
|
|
41
|
-
t = i.pop();
|
|
42
|
-
}
|
|
43
|
-
return n;
|
|
44
|
-
}
|
|
45
|
-
collides(e) {
|
|
46
|
-
let t = this.data;
|
|
47
|
-
if (!h(e, t)) return !1;
|
|
48
|
-
let n = [];
|
|
49
|
-
for (; t;) {
|
|
50
|
-
for (let r = 0; r < t.children.length; r++) {
|
|
51
|
-
let i = t.children[r], a = t.leaf ? this.toBBox(i) : i;
|
|
52
|
-
if (h(e, a)) {
|
|
53
|
-
if (t.leaf || m(e, a)) return !0;
|
|
54
|
-
n.push(i);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
t = n.pop();
|
|
58
|
-
}
|
|
59
|
-
return !1;
|
|
60
|
-
}
|
|
61
|
-
load(e) {
|
|
62
|
-
if (!(e && e.length)) return this;
|
|
63
|
-
if (e.length < this._minEntries) {
|
|
64
|
-
for (let t = 0; t < e.length; t++) this.insert(e[t]);
|
|
65
|
-
return this;
|
|
66
|
-
}
|
|
67
|
-
let t = this._build(e.slice(), 0, e.length - 1, 0);
|
|
68
|
-
if (!this.data.children.length) this.data = t;
|
|
69
|
-
else if (this.data.height === t.height) this._splitRoot(this.data, t);
|
|
70
|
-
else {
|
|
71
|
-
if (this.data.height < t.height) {
|
|
72
|
-
let e = this.data;
|
|
73
|
-
this.data = t, t = e;
|
|
74
|
-
}
|
|
75
|
-
this._insert(t, this.data.height - t.height - 1, !0);
|
|
76
|
-
}
|
|
77
|
-
return this;
|
|
78
|
-
}
|
|
79
|
-
insert(e) {
|
|
80
|
-
return e && this._insert(e, this.data.height - 1), this;
|
|
81
|
-
}
|
|
82
|
-
clear() {
|
|
83
|
-
return this.data = g([]), this;
|
|
84
|
-
}
|
|
85
|
-
remove(e, t) {
|
|
86
|
-
if (!e) return this;
|
|
87
|
-
let n = this.data, r = this.toBBox(e), a = [], o = [], s, c, l;
|
|
88
|
-
for (; n || a.length;) {
|
|
89
|
-
if (n || (n = a.pop(), c = a[a.length - 1], s = o.pop(), l = !0), n.leaf) {
|
|
90
|
-
let r = i(e, n.children, t);
|
|
91
|
-
if (r !== -1) return n.children.splice(r, 1), a.push(n), this._condense(a), this;
|
|
92
|
-
}
|
|
93
|
-
!l && !n.leaf && m(n, r) ? (a.push(n), o.push(s), s = 0, c = n, n = n.children[0]) : c ? (s++, n = c.children[s], l = !1) : n = null;
|
|
94
|
-
}
|
|
95
|
-
return this;
|
|
96
|
-
}
|
|
97
|
-
toBBox(e) {
|
|
98
|
-
return e;
|
|
99
|
-
}
|
|
100
|
-
compareMinX(e, t) {
|
|
101
|
-
return e.minX - t.minX;
|
|
102
|
-
}
|
|
103
|
-
compareMinY(e, t) {
|
|
104
|
-
return e.minY - t.minY;
|
|
105
|
-
}
|
|
106
|
-
toJSON() {
|
|
107
|
-
return this.data;
|
|
108
|
-
}
|
|
109
|
-
fromJSON(e) {
|
|
110
|
-
return this.data = e, this;
|
|
111
|
-
}
|
|
112
|
-
_all(e, t) {
|
|
113
|
-
let n = [];
|
|
114
|
-
for (; e;) e.leaf ? t.push(...e.children) : n.push(...e.children), e = n.pop();
|
|
115
|
-
return t;
|
|
116
|
-
}
|
|
117
|
-
_build(e, t, n, r) {
|
|
118
|
-
let i = n - t + 1, o = this._maxEntries, s;
|
|
119
|
-
if (i <= o) return s = g(e.slice(t, n + 1)), a(s, this.toBBox), s;
|
|
120
|
-
r || (r = Math.ceil(Math.log(i) / Math.log(o)), o = Math.ceil(i / o ** (r - 1))), s = g([]), s.leaf = !1, s.height = r;
|
|
121
|
-
let c = Math.ceil(i / o), l = c * Math.ceil(Math.sqrt(o));
|
|
122
|
-
_(e, t, n, l, this.compareMinX);
|
|
123
|
-
for (let i = t; i <= n; i += l) {
|
|
124
|
-
let t = Math.min(i + l - 1, n);
|
|
125
|
-
_(e, i, t, c, this.compareMinY);
|
|
126
|
-
for (let n = i; n <= t; n += c) {
|
|
127
|
-
let i = Math.min(n + c - 1, t);
|
|
128
|
-
s.children.push(this._build(e, n, i, r - 1));
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
return a(s, this.toBBox), s;
|
|
132
|
-
}
|
|
133
|
-
_chooseSubtree(e, t, n, r) {
|
|
134
|
-
for (; r.push(t), !(t.leaf || r.length - 1 === n);) {
|
|
135
|
-
let n = Infinity, r = Infinity, i;
|
|
136
|
-
for (let a = 0; a < t.children.length; a++) {
|
|
137
|
-
let o = t.children[a], s = u(o), c = f(e, o) - s;
|
|
138
|
-
c < r ? (r = c, n = s < n ? s : n, i = o) : c === r && s < n && (n = s, i = o);
|
|
139
|
-
}
|
|
140
|
-
t = i || t.children[0];
|
|
141
|
-
}
|
|
142
|
-
return t;
|
|
143
|
-
}
|
|
144
|
-
_insert(e, t, n) {
|
|
145
|
-
let r = n ? e : this.toBBox(e), i = [], a = this._chooseSubtree(r, this.data, t, i);
|
|
146
|
-
for (a.children.push(e), s(a, r); t >= 0 && i[t].children.length > this._maxEntries;) this._split(i, t), t--;
|
|
147
|
-
this._adjustParentBBoxes(r, i, t);
|
|
148
|
-
}
|
|
149
|
-
_split(e, t) {
|
|
150
|
-
let n = e[t], r = n.children.length, i = this._minEntries;
|
|
151
|
-
this._chooseSplitAxis(n, i, r);
|
|
152
|
-
let o = this._chooseSplitIndex(n, i, r), s = g(n.children.splice(o, n.children.length - o));
|
|
153
|
-
s.height = n.height, s.leaf = n.leaf, a(n, this.toBBox), a(s, this.toBBox), t ? e[t - 1].children.push(s) : this._splitRoot(n, s);
|
|
154
|
-
}
|
|
155
|
-
_splitRoot(e, t) {
|
|
156
|
-
this.data = g([e, t]), this.data.height = e.height + 1, this.data.leaf = !1, a(this.data, this.toBBox);
|
|
157
|
-
}
|
|
158
|
-
_chooseSplitIndex(e, t, n) {
|
|
159
|
-
let r, i = Infinity, a = Infinity;
|
|
160
|
-
for (let s = t; s <= n - t; s++) {
|
|
161
|
-
let t = o(e, 0, s, this.toBBox), c = o(e, s, n, this.toBBox), l = p(t, c), d = u(t) + u(c);
|
|
162
|
-
l < i ? (i = l, r = s, a = d < a ? d : a) : l === i && d < a && (a = d, r = s);
|
|
163
|
-
}
|
|
164
|
-
return r || n - t;
|
|
165
|
-
}
|
|
166
|
-
_chooseSplitAxis(e, t, n) {
|
|
167
|
-
let r = e.leaf ? this.compareMinX : c, i = e.leaf ? this.compareMinY : l;
|
|
168
|
-
this._allDistMargin(e, t, n, r) < this._allDistMargin(e, t, n, i) && e.children.sort(r);
|
|
169
|
-
}
|
|
170
|
-
_allDistMargin(e, t, n, r) {
|
|
171
|
-
e.children.sort(r);
|
|
172
|
-
let i = this.toBBox, a = o(e, 0, t, i), c = o(e, n - t, n, i), l = d(a) + d(c);
|
|
173
|
-
for (let r = t; r < n - t; r++) {
|
|
174
|
-
let t = e.children[r];
|
|
175
|
-
s(a, e.leaf ? i(t) : t), l += d(a);
|
|
176
|
-
}
|
|
177
|
-
for (let r = n - t - 1; r >= t; r--) {
|
|
178
|
-
let t = e.children[r];
|
|
179
|
-
s(c, e.leaf ? i(t) : t), l += d(c);
|
|
180
|
-
}
|
|
181
|
-
return l;
|
|
182
|
-
}
|
|
183
|
-
_adjustParentBBoxes(e, t, n) {
|
|
184
|
-
for (let r = n; r >= 0; r--) s(t[r], e);
|
|
185
|
-
}
|
|
186
|
-
_condense(e) {
|
|
187
|
-
for (let t = e.length - 1, n; t >= 0; t--) e[t].children.length === 0 ? t > 0 ? (n = e[t - 1].children, n.splice(n.indexOf(e[t]), 1)) : this.clear() : a(e[t], this.toBBox);
|
|
188
|
-
}
|
|
189
|
-
};
|
|
190
|
-
function i(e, t, n) {
|
|
191
|
-
if (!n) return t.indexOf(e);
|
|
192
|
-
for (let r = 0; r < t.length; r++) if (n(e, t[r])) return r;
|
|
193
|
-
return -1;
|
|
194
|
-
}
|
|
195
|
-
function a(e, t) {
|
|
196
|
-
o(e, 0, e.children.length, t, e);
|
|
197
|
-
}
|
|
198
|
-
function o(e, t, n, r, i) {
|
|
199
|
-
i ||= g(null), i.minX = Infinity, i.minY = Infinity, i.maxX = -Infinity, i.maxY = -Infinity;
|
|
200
|
-
for (let a = t; a < n; a++) {
|
|
201
|
-
let t = e.children[a];
|
|
202
|
-
s(i, e.leaf ? r(t) : t);
|
|
203
|
-
}
|
|
204
|
-
return i;
|
|
205
|
-
}
|
|
206
|
-
function s(e, t) {
|
|
207
|
-
return e.minX = Math.min(e.minX, t.minX), e.minY = Math.min(e.minY, t.minY), e.maxX = Math.max(e.maxX, t.maxX), e.maxY = Math.max(e.maxY, t.maxY), e;
|
|
208
|
-
}
|
|
209
|
-
function c(e, t) {
|
|
210
|
-
return e.minX - t.minX;
|
|
211
|
-
}
|
|
212
|
-
function l(e, t) {
|
|
213
|
-
return e.minY - t.minY;
|
|
214
|
-
}
|
|
215
|
-
function u(e) {
|
|
216
|
-
return (e.maxX - e.minX) * (e.maxY - e.minY);
|
|
217
|
-
}
|
|
218
|
-
function d(e) {
|
|
219
|
-
return e.maxX - e.minX + (e.maxY - e.minY);
|
|
220
|
-
}
|
|
221
|
-
function f(e, t) {
|
|
222
|
-
return (Math.max(t.maxX, e.maxX) - Math.min(t.minX, e.minX)) * (Math.max(t.maxY, e.maxY) - Math.min(t.minY, e.minY));
|
|
223
|
-
}
|
|
224
|
-
function p(e, t) {
|
|
225
|
-
let n = Math.max(e.minX, t.minX), r = Math.max(e.minY, t.minY), i = Math.min(e.maxX, t.maxX), a = Math.min(e.maxY, t.maxY);
|
|
226
|
-
return Math.max(0, i - n) * Math.max(0, a - r);
|
|
227
|
-
}
|
|
228
|
-
function m(e, t) {
|
|
229
|
-
return e.minX <= t.minX && e.minY <= t.minY && t.maxX <= e.maxX && t.maxY <= e.maxY;
|
|
230
|
-
}
|
|
231
|
-
function h(e, t) {
|
|
232
|
-
return t.minX <= e.maxX && t.minY <= e.maxY && t.maxX >= e.minX && t.maxY >= e.minY;
|
|
233
|
-
}
|
|
234
|
-
function g(e) {
|
|
235
|
-
return {
|
|
236
|
-
children: e,
|
|
237
|
-
height: 1,
|
|
238
|
-
leaf: !0,
|
|
239
|
-
minX: Infinity,
|
|
240
|
-
minY: Infinity,
|
|
241
|
-
maxX: -Infinity,
|
|
242
|
-
maxY: -Infinity
|
|
243
|
-
};
|
|
244
|
-
}
|
|
245
|
-
function _(t, n, r, i, a) {
|
|
246
|
-
let o = [n, r];
|
|
247
|
-
for (; o.length;) {
|
|
248
|
-
if (r = o.pop(), n = o.pop(), r - n <= i) continue;
|
|
249
|
-
let s = n + Math.ceil((r - n) / i / 2) * i;
|
|
250
|
-
e(t, s, n, r, a), o.push(n, s, s, r);
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
//#endregion
|
|
254
|
-
export { r as t };
|
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
import { a as e, n as t } from "./decorators-B35AgiCU.js";
|
|
2
|
-
import { a as n, i as r, n as i, o as a, s as o, t as s } from "./chunk.AJ3ENQ5C-Ci7Gm2b6.js";
|
|
3
|
-
import { d as c, f as l, l as u, u as d } from "./chunk.YHLNUJ7P-D-kanrCf.js";
|
|
4
|
-
import { a as f } from "./chunk.NYIIDP5N-BikXIStD.js";
|
|
5
|
-
import { t as p } from "./chunk.6CTB5ZDJ-DjZrBd6Y.js";
|
|
6
|
-
import { t as m } from "./chunk.5JY5FUCG-DTXsslmx.js";
|
|
7
|
-
import { css as h, html as g } from "lit";
|
|
8
|
-
//#region node_modules/@shoelace-style/shoelace/dist/chunks/chunk.HF7GESMZ.js
|
|
9
|
-
function _(e, t, n) {
|
|
10
|
-
return ((e) => Object.is(e, -0) ? 0 : e)(e < t ? t : e > n ? n : e);
|
|
11
|
-
}
|
|
12
|
-
//#endregion
|
|
13
|
-
//#region node_modules/@shoelace-style/shoelace/dist/chunks/chunk.FW7UWQXB.js
|
|
14
|
-
var v = h`
|
|
15
|
-
:host {
|
|
16
|
-
--max-width: 20rem;
|
|
17
|
-
--hide-delay: 0ms;
|
|
18
|
-
--show-delay: 150ms;
|
|
19
|
-
|
|
20
|
-
display: contents;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.tooltip {
|
|
24
|
-
--arrow-size: var(--sl-tooltip-arrow-size);
|
|
25
|
-
--arrow-color: var(--sl-tooltip-background-color);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.tooltip::part(popup) {
|
|
29
|
-
z-index: var(--sl-z-index-tooltip);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.tooltip[placement^='top']::part(popup) {
|
|
33
|
-
transform-origin: bottom;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.tooltip[placement^='bottom']::part(popup) {
|
|
37
|
-
transform-origin: top;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.tooltip[placement^='left']::part(popup) {
|
|
41
|
-
transform-origin: right;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.tooltip[placement^='right']::part(popup) {
|
|
45
|
-
transform-origin: left;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.tooltip__body {
|
|
49
|
-
display: block;
|
|
50
|
-
width: max-content;
|
|
51
|
-
max-width: var(--max-width);
|
|
52
|
-
border-radius: var(--sl-tooltip-border-radius);
|
|
53
|
-
background-color: var(--sl-tooltip-background-color);
|
|
54
|
-
font-family: var(--sl-tooltip-font-family);
|
|
55
|
-
font-size: var(--sl-tooltip-font-size);
|
|
56
|
-
font-weight: var(--sl-tooltip-font-weight);
|
|
57
|
-
line-height: var(--sl-tooltip-line-height);
|
|
58
|
-
text-align: start;
|
|
59
|
-
white-space: normal;
|
|
60
|
-
color: var(--sl-tooltip-color);
|
|
61
|
-
padding: var(--sl-tooltip-padding);
|
|
62
|
-
pointer-events: none;
|
|
63
|
-
user-select: none;
|
|
64
|
-
-webkit-user-select: none;
|
|
65
|
-
}
|
|
66
|
-
`, y = class extends u {
|
|
67
|
-
constructor() {
|
|
68
|
-
super(), this.localize = new p(this), this.content = "", this.placement = "top", this.disabled = !1, this.distance = 8, this.open = !1, this.skidding = 0, this.trigger = "hover focus", this.hoist = !1, this.handleBlur = () => {
|
|
69
|
-
this.hasTrigger("focus") && this.hide();
|
|
70
|
-
}, this.handleClick = () => {
|
|
71
|
-
this.hasTrigger("click") && (this.open ? this.hide() : this.show());
|
|
72
|
-
}, this.handleFocus = () => {
|
|
73
|
-
this.hasTrigger("focus") && this.show();
|
|
74
|
-
}, this.handleDocumentKeyDown = (e) => {
|
|
75
|
-
e.key === "Escape" && (e.stopPropagation(), this.hide());
|
|
76
|
-
}, this.handleMouseOver = () => {
|
|
77
|
-
if (this.hasTrigger("hover")) {
|
|
78
|
-
let e = i(getComputedStyle(this).getPropertyValue("--show-delay"));
|
|
79
|
-
clearTimeout(this.hoverTimeout), this.hoverTimeout = window.setTimeout(() => this.show(), e);
|
|
80
|
-
}
|
|
81
|
-
}, this.handleMouseOut = () => {
|
|
82
|
-
if (this.hasTrigger("hover")) {
|
|
83
|
-
let e = i(getComputedStyle(this).getPropertyValue("--hide-delay"));
|
|
84
|
-
clearTimeout(this.hoverTimeout), this.hoverTimeout = window.setTimeout(() => this.hide(), e);
|
|
85
|
-
}
|
|
86
|
-
}, this.addEventListener("blur", this.handleBlur, !0), this.addEventListener("focus", this.handleFocus, !0), this.addEventListener("click", this.handleClick), this.addEventListener("mouseover", this.handleMouseOver), this.addEventListener("mouseout", this.handleMouseOut);
|
|
87
|
-
}
|
|
88
|
-
disconnectedCallback() {
|
|
89
|
-
var e;
|
|
90
|
-
super.disconnectedCallback(), (e = this.closeWatcher) == null || e.destroy(), document.removeEventListener("keydown", this.handleDocumentKeyDown);
|
|
91
|
-
}
|
|
92
|
-
firstUpdated() {
|
|
93
|
-
this.body.hidden = !this.open, this.open && (this.popup.active = !0, this.popup.reposition());
|
|
94
|
-
}
|
|
95
|
-
hasTrigger(e) {
|
|
96
|
-
return this.trigger.split(" ").includes(e);
|
|
97
|
-
}
|
|
98
|
-
async handleOpenChange() {
|
|
99
|
-
var e, t;
|
|
100
|
-
if (this.open) {
|
|
101
|
-
if (this.disabled) return;
|
|
102
|
-
this.emit("sl-show"), "CloseWatcher" in window ? ((e = this.closeWatcher) == null || e.destroy(), this.closeWatcher = new CloseWatcher(), this.closeWatcher.onclose = () => {
|
|
103
|
-
this.hide();
|
|
104
|
-
}) : document.addEventListener("keydown", this.handleDocumentKeyDown), await r(this.body), this.body.hidden = !1, this.popup.active = !0;
|
|
105
|
-
let { keyframes: t, options: n } = a(this, "tooltip.show", { dir: this.localize.dir() });
|
|
106
|
-
await s(this.popup.popup, t, n), this.popup.reposition(), this.emit("sl-after-show");
|
|
107
|
-
} else {
|
|
108
|
-
this.emit("sl-hide"), (t = this.closeWatcher) == null || t.destroy(), document.removeEventListener("keydown", this.handleDocumentKeyDown), await r(this.body);
|
|
109
|
-
let { keyframes: e, options: n } = a(this, "tooltip.hide", { dir: this.localize.dir() });
|
|
110
|
-
await s(this.popup.popup, e, n), this.popup.active = !1, this.body.hidden = !0, this.emit("sl-after-hide");
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
async handleOptionsChange() {
|
|
114
|
-
this.hasUpdated && (await this.updateComplete, this.popup.reposition());
|
|
115
|
-
}
|
|
116
|
-
handleDisabledChange() {
|
|
117
|
-
this.disabled && this.open && this.hide();
|
|
118
|
-
}
|
|
119
|
-
async show() {
|
|
120
|
-
if (!this.open) return this.open = !0, n(this, "sl-after-show");
|
|
121
|
-
}
|
|
122
|
-
async hide() {
|
|
123
|
-
if (this.open) return this.open = !1, n(this, "sl-after-hide");
|
|
124
|
-
}
|
|
125
|
-
render() {
|
|
126
|
-
return g`
|
|
127
|
-
<sl-popup
|
|
128
|
-
part="base"
|
|
129
|
-
exportparts="
|
|
130
|
-
popup:base__popup,
|
|
131
|
-
arrow:base__arrow
|
|
132
|
-
"
|
|
133
|
-
class=${f({
|
|
134
|
-
tooltip: !0,
|
|
135
|
-
"tooltip--open": this.open
|
|
136
|
-
})}
|
|
137
|
-
placement=${this.placement}
|
|
138
|
-
distance=${this.distance}
|
|
139
|
-
skidding=${this.skidding}
|
|
140
|
-
strategy=${this.hoist ? "fixed" : "absolute"}
|
|
141
|
-
flip
|
|
142
|
-
shift
|
|
143
|
-
arrow
|
|
144
|
-
hover-bridge
|
|
145
|
-
>
|
|
146
|
-
${""}
|
|
147
|
-
<slot slot="anchor" aria-describedby="tooltip"></slot>
|
|
148
|
-
|
|
149
|
-
${""}
|
|
150
|
-
<div part="body" id="tooltip" class="tooltip__body" role="tooltip" aria-live=${this.open ? "polite" : "off"}>
|
|
151
|
-
<slot name="content">${this.content}</slot>
|
|
152
|
-
</div>
|
|
153
|
-
</sl-popup>
|
|
154
|
-
`;
|
|
155
|
-
}
|
|
156
|
-
};
|
|
157
|
-
//#endregion
|
|
158
|
-
//#region node_modules/@shoelace-style/shoelace/dist/chunks/chunk.URTPIBTY.js
|
|
159
|
-
y.styles = [d, v], y.dependencies = { "sl-popup": m }, l([t("slot:not([name])")], y.prototype, "defaultSlot", 2), l([t(".tooltip__body")], y.prototype, "body", 2), l([t("sl-popup")], y.prototype, "popup", 2), l([e()], y.prototype, "content", 2), l([e()], y.prototype, "placement", 2), l([e({
|
|
160
|
-
type: Boolean,
|
|
161
|
-
reflect: !0
|
|
162
|
-
})], y.prototype, "disabled", 2), l([e({ type: Number })], y.prototype, "distance", 2), l([e({
|
|
163
|
-
type: Boolean,
|
|
164
|
-
reflect: !0
|
|
165
|
-
})], y.prototype, "open", 2), l([e({ type: Number })], y.prototype, "skidding", 2), l([e()], y.prototype, "trigger", 2), l([e({ type: Boolean })], y.prototype, "hoist", 2), l([c("open", { waitUntilFirstUpdate: !0 })], y.prototype, "handleOpenChange", 1), l([c([
|
|
166
|
-
"content",
|
|
167
|
-
"distance",
|
|
168
|
-
"hoist",
|
|
169
|
-
"placement",
|
|
170
|
-
"skidding"
|
|
171
|
-
])], y.prototype, "handleOptionsChange", 1), l([c("disabled")], y.prototype, "handleDisabledChange", 1), o("tooltip.show", {
|
|
172
|
-
keyframes: [{
|
|
173
|
-
opacity: 0,
|
|
174
|
-
scale: .8
|
|
175
|
-
}, {
|
|
176
|
-
opacity: 1,
|
|
177
|
-
scale: 1
|
|
178
|
-
}],
|
|
179
|
-
options: {
|
|
180
|
-
duration: 150,
|
|
181
|
-
easing: "ease"
|
|
182
|
-
}
|
|
183
|
-
}), o("tooltip.hide", {
|
|
184
|
-
keyframes: [{
|
|
185
|
-
opacity: 1,
|
|
186
|
-
scale: 1
|
|
187
|
-
}, {
|
|
188
|
-
opacity: 0,
|
|
189
|
-
scale: .8
|
|
190
|
-
}],
|
|
191
|
-
options: {
|
|
192
|
-
duration: 150,
|
|
193
|
-
easing: "ease"
|
|
194
|
-
}
|
|
195
|
-
}), y.define("sl-tooltip");
|
|
196
|
-
//#endregion
|
|
197
|
-
export { _ as t };
|