wox-gui 0.1.8 → 0.1.9
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/wox-gui.cdn.js +358 -340
- package/dist/wox-gui.js +349 -331
- package/package.json +1 -1
package/dist/wox-gui.cdn.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var s = (p, c, t) =>
|
|
4
|
-
const
|
|
1
|
+
var $t = Object.defineProperty;
|
|
2
|
+
var Et = (p, c, t) => c in p ? $t(p, c, { enumerable: !0, configurable: !0, writable: !0, value: t }) : p[c] = t;
|
|
3
|
+
var s = (p, c, t) => Et(p, typeof c != "symbol" ? c + "" : c, t);
|
|
4
|
+
const P = class P extends HTMLElement {
|
|
5
5
|
constructor() {
|
|
6
6
|
super();
|
|
7
7
|
s(this, "render", (t, e) => {
|
|
8
|
-
this.shadowRoot.innerHTML = `<style>${
|
|
8
|
+
this.shadowRoot.innerHTML = `<style>${P.BASE_STYLES}${t}</style>${e}`;
|
|
9
9
|
});
|
|
10
10
|
s(this, "emit", (t, e) => {
|
|
11
11
|
this.dispatchEvent(new CustomEvent(t, { detail: e, bubbles: !0, composed: !0 }));
|
|
@@ -15,13 +15,13 @@ const T = class T extends HTMLElement {
|
|
|
15
15
|
this.attachShadow({ mode: "open" });
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
|
-
s(
|
|
18
|
+
s(P, "BASE_STYLES", `
|
|
19
19
|
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
|
20
20
|
:host { display: inline-block; font-family: var(--wox-font, 'Inter', sans-serif); color: var(--wox-text-primary, #eee); font-size: var(--wox-font-size-base, 12px); }
|
|
21
21
|
:host([hidden]) { display: none !important; }
|
|
22
22
|
`);
|
|
23
|
-
let w =
|
|
24
|
-
const
|
|
23
|
+
let w = P;
|
|
24
|
+
const D = `
|
|
25
25
|
/* glow: neon glow effect using --wox-fx-color */
|
|
26
26
|
.glow {
|
|
27
27
|
border-color: var(--wox-fx-color);
|
|
@@ -49,7 +49,7 @@ const M = `
|
|
|
49
49
|
to { opacity: 0.4; }
|
|
50
50
|
}
|
|
51
51
|
`;
|
|
52
|
-
class
|
|
52
|
+
class G extends w {
|
|
53
53
|
constructor() {
|
|
54
54
|
super(...arguments);
|
|
55
55
|
s(this, "_render", () => {
|
|
@@ -60,7 +60,7 @@ class H extends w {
|
|
|
60
60
|
::slotted(svg) { width: var(--size, 18px); height: var(--size, 18px); }
|
|
61
61
|
slot { display: inline-flex; align-items: center; justify-content: center; }
|
|
62
62
|
.fx-wrap { display: inline-flex; align-items: center; justify-content: center; border-radius: var(--wox-radius-sm, 3px); padding: 4px; }
|
|
63
|
-
${
|
|
63
|
+
${D} :host { --size: ${e}px; }`, a);
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
66
|
connectedCallback() {
|
|
@@ -70,8 +70,8 @@ class H extends w {
|
|
|
70
70
|
this.isConnected && this._render();
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
s(
|
|
74
|
-
class
|
|
73
|
+
s(G, "observedAttributes", ["name", "size", "color", "glow", "pulse"]);
|
|
74
|
+
class Y extends w {
|
|
75
75
|
constructor() {
|
|
76
76
|
super(...arguments);
|
|
77
77
|
s(this, "_render", () => {
|
|
@@ -92,8 +92,8 @@ class j extends w {
|
|
|
92
92
|
this.isConnected && this._render();
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
|
-
s(
|
|
96
|
-
class
|
|
95
|
+
s(Y, "observedAttributes", ["direction", "spacing"]);
|
|
96
|
+
class X extends w {
|
|
97
97
|
constructor() {
|
|
98
98
|
super(...arguments);
|
|
99
99
|
s(this, "_render", () => {
|
|
@@ -115,17 +115,17 @@ class G extends w {
|
|
|
115
115
|
this.isConnected && this._render();
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
|
-
s(
|
|
119
|
-
class
|
|
118
|
+
s(X, "observedAttributes", ["variant", "text", "color"]);
|
|
119
|
+
class q extends w {
|
|
120
120
|
constructor() {
|
|
121
121
|
super(...arguments);
|
|
122
122
|
s(this, "_render", () => {
|
|
123
|
-
const t = this.getAttribute("variant") || "icon", e = this.getAttribute("icon") || "", n = this.getAttribute("label") || "", o = this.hasAttribute("active"), i = this.hasAttribute("disabled"), r = this.getAttribute("dash") || "solid", a = this.getAttribute("color") || "",
|
|
124
|
-
let
|
|
125
|
-
t === "icon" ?
|
|
126
|
-
const
|
|
127
|
-
a &&
|
|
128
|
-
const k = a ? " data-color" : "",
|
|
123
|
+
const t = this.getAttribute("variant") || "icon", e = this.getAttribute("icon") || "", n = this.getAttribute("label") || "", o = this.hasAttribute("active"), i = this.hasAttribute("disabled"), r = this.getAttribute("dash") || "solid", a = this.getAttribute("color") || "", d = this.hasAttribute("glow"), h = this.hasAttribute("pulse"), l = this.getAttribute("border-color") || "", g = this.getAttribute("border-style") || "", x = this.getAttribute("icon-color") || "", f = this.getAttribute("text-color") || "", b = [`v-${t}`, o ? "active" : "", d ? "glow" : "", h ? "pulse" : ""].filter(Boolean).join(" ");
|
|
124
|
+
let u = "";
|
|
125
|
+
t === "icon" ? u = e ? `<span class="material-icons">${e}</span>` : "<slot></slot>" : t === "text" ? u = (e ? `<span class="material-icons" style="font-size:14px">${e}</span>` : "") + (n || "<slot></slot>") : t === "tile" ? u = (e ? `<span class="material-icons">${e}</span>` : '<slot name="icon"></slot>') + `<span>${n}</span>` : t === "dash" && (u = `<div class="dash-line${r === "solid" ? "" : ` ${r}`}"></div>`);
|
|
126
|
+
const v = [];
|
|
127
|
+
a && v.push(`--wox-fx-color:${a}`), l && v.push(`--wox-btn-border:${l}`), g && v.push(`--wox-btn-border-style:${g}`), x && v.push(`--wox-btn-icon:${x}`), f && v.push(`--wox-btn-text:${f}`);
|
|
128
|
+
const k = a ? " data-color" : "", A = v.length ? ` style="${v.join(";")}"` : "";
|
|
129
129
|
this.render(`
|
|
130
130
|
:host { display: inline-block; }
|
|
131
131
|
button {
|
|
@@ -192,7 +192,7 @@ class Y extends w {
|
|
|
192
192
|
button.v-dash.active .dash-line.zigzag { color: var(--wox-btn-text, var(--wox-accent, #00e5ff)); }
|
|
193
193
|
|
|
194
194
|
.material-icons { font-family: 'Material Icons'; font-weight: normal; font-style: normal; display: inline-block; line-height: 1; text-transform: none; letter-spacing: normal; word-wrap: normal; white-space: nowrap; direction: ltr; -webkit-font-smoothing: antialiased; }
|
|
195
|
-
` +
|
|
195
|
+
` + D, `<button class="${b}"${k}${A} ${i ? "disabled" : ""}>${u}</button>`), this.$("button").addEventListener("click", (z) => {
|
|
196
196
|
i || this.emit("wox-click", { originalEvent: z });
|
|
197
197
|
});
|
|
198
198
|
});
|
|
@@ -204,12 +204,13 @@ class Y extends w {
|
|
|
204
204
|
this.isConnected && this._render();
|
|
205
205
|
}
|
|
206
206
|
}
|
|
207
|
-
s(
|
|
208
|
-
|
|
207
|
+
s(q, "observedAttributes", ["variant", "icon", "label", "active", "disabled", "color", "size", "dash", "glow", "pulse", "border-color", "border-style", "icon-color", "text-color"]);
|
|
208
|
+
const Ct = ["text", "number", "password", "email", "url", "tel", "search", "color", "date", "time", "datetime-local", "range"], At = ["number", "range"];
|
|
209
|
+
class J extends w {
|
|
209
210
|
constructor() {
|
|
210
211
|
super(...arguments);
|
|
211
212
|
s(this, "_render", () => {
|
|
212
|
-
const t = this.getAttribute("type") || "text", e = this.getAttribute("value") || "",
|
|
213
|
+
const t = this.getAttribute("type") || "text", e = Ct.includes(t) ? t : "text", n = this.getAttribute("value") || "", o = this.getAttribute("unit") || "", i = this.getAttribute("label") || "", r = this.getAttribute("min"), a = this.getAttribute("max"), d = this.getAttribute("step"), h = this.getAttribute("placeholder") || "", l = this.hasAttribute("disabled"), g = At.includes(e), x = e === "number", f = g ? `${r !== null ? ` min="${r}"` : ""}${a !== null ? ` max="${a}"` : ""}${d !== null ? ` step="${d}"` : ""}` : "", b = o && e !== "color" && e !== "range";
|
|
213
214
|
this.render(`
|
|
214
215
|
:host { display: inline-block; }
|
|
215
216
|
.wrapper { display: flex; flex-direction: column; gap: 3px; }
|
|
@@ -232,36 +233,53 @@ class X extends w {
|
|
|
232
233
|
input:disabled { opacity: 0.4; cursor: not-allowed; }
|
|
233
234
|
input.has-unit { padding-right: 28px; }
|
|
234
235
|
.suffix { position: absolute; right: 8px; font-size: var(--wox-font-size-sm, 10px); color: var(--wox-text-secondary, #999); pointer-events: none; }
|
|
236
|
+
input[type="color"] {
|
|
237
|
+
padding: 2px; height: 32px; cursor: pointer;
|
|
238
|
+
border-radius: var(--wox-radius-md, 6px);
|
|
239
|
+
}
|
|
240
|
+
input[type="color"]::-webkit-color-swatch-wrapper { padding: 2px; }
|
|
241
|
+
input[type="color"]::-webkit-color-swatch { border: none; border-radius: 3px; }
|
|
242
|
+
input[type="color"]::-moz-color-swatch { border: none; border-radius: 3px; }
|
|
243
|
+
input[type="date"], input[type="time"], input[type="datetime-local"] {
|
|
244
|
+
color-scheme: dark;
|
|
245
|
+
}
|
|
246
|
+
input[type="search"]::-webkit-search-cancel-button { filter: invert(0.7); }
|
|
247
|
+
input[type="range"] {
|
|
248
|
+
padding: 0; background: transparent; border: none; box-shadow: none;
|
|
249
|
+
accent-color: var(--wox-accent, #00e5ff);
|
|
250
|
+
height: 20px; cursor: pointer;
|
|
251
|
+
}
|
|
252
|
+
input[type="range"]:focus { box-shadow: none; border: none; }
|
|
235
253
|
`, `
|
|
236
254
|
<div class="wrapper">
|
|
237
|
-
${
|
|
255
|
+
${i ? `<label class="${x ? "scrub" : ""}">${i}${b ? `<span class="unit">${o}</span>` : ""}</label>` : ""}
|
|
238
256
|
<div class="input-wrap">
|
|
239
|
-
<input type="${
|
|
240
|
-
${
|
|
257
|
+
<input type="${e}" value="${n}" placeholder="${h}" ${f} ${l ? "disabled" : ""} class="${b && !i ? "has-unit" : ""}">
|
|
258
|
+
${b && !i ? `<span class="suffix">${o}</span>` : ""}
|
|
241
259
|
</div>
|
|
242
260
|
</div>
|
|
243
261
|
`);
|
|
244
|
-
const
|
|
245
|
-
if (
|
|
246
|
-
const v =
|
|
262
|
+
const u = this.$("input");
|
|
263
|
+
if (u.addEventListener("input", () => {
|
|
264
|
+
const v = g ? parseFloat(u.value) : u.value;
|
|
247
265
|
this.emit("wox-input", { value: v });
|
|
248
|
-
}),
|
|
249
|
-
const v =
|
|
266
|
+
}), u.addEventListener("change", () => {
|
|
267
|
+
const v = g ? parseFloat(u.value) : u.value;
|
|
250
268
|
this.emit("wox-change", { value: v });
|
|
251
|
-
}),
|
|
252
|
-
v.key === "Enter" &&
|
|
253
|
-
}),
|
|
269
|
+
}), u.addEventListener("keydown", (v) => {
|
|
270
|
+
v.key === "Enter" && u.blur();
|
|
271
|
+
}), x && i) {
|
|
254
272
|
const v = this.$("label");
|
|
255
|
-
let
|
|
256
|
-
const
|
|
257
|
-
const
|
|
258
|
-
let
|
|
259
|
-
|
|
260
|
-
},
|
|
261
|
-
document.removeEventListener("mousemove",
|
|
273
|
+
let k = 0, A = 0;
|
|
274
|
+
const z = (y) => {
|
|
275
|
+
const N = y.clientX - k, kt = parseFloat(d) || 1;
|
|
276
|
+
let L = A + Math.round(N / 2) * kt;
|
|
277
|
+
r !== null && (L = Math.max(parseFloat(r), L)), a !== null && (L = Math.min(parseFloat(a), L)), u.value = L, this.emit("wox-input", { value: L });
|
|
278
|
+
}, m = () => {
|
|
279
|
+
document.removeEventListener("mousemove", z), document.removeEventListener("mouseup", m), this.emit("wox-change", { value: parseFloat(u.value) });
|
|
262
280
|
};
|
|
263
|
-
v.addEventListener("mousedown", (
|
|
264
|
-
|
|
281
|
+
v.addEventListener("mousedown", (y) => {
|
|
282
|
+
l || (k = y.clientX, A = parseFloat(u.value) || 0, document.addEventListener("mousemove", z), document.addEventListener("mouseup", m), y.preventDefault());
|
|
265
283
|
});
|
|
266
284
|
}
|
|
267
285
|
});
|
|
@@ -288,9 +306,9 @@ class X extends w {
|
|
|
288
306
|
e && (e.value = t);
|
|
289
307
|
}
|
|
290
308
|
}
|
|
291
|
-
s(
|
|
309
|
+
s(J, "observedAttributes", ["type", "value", "unit", "label", "min", "max", "step", "placeholder", "disabled"]);
|
|
292
310
|
const $ = (p) => String(p).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
293
|
-
class
|
|
311
|
+
class K extends w {
|
|
294
312
|
constructor() {
|
|
295
313
|
super(...arguments);
|
|
296
314
|
s(this, "_isOpen", !1);
|
|
@@ -320,8 +338,8 @@ class q extends w {
|
|
|
320
338
|
s(this, "_calculateDropdownPosition", () => {
|
|
321
339
|
const t = this.$(".trigger");
|
|
322
340
|
if (!t) return null;
|
|
323
|
-
const e = t.getBoundingClientRect(), n = window.innerHeight, o = window.innerWidth, i = n - e.bottom, r = e.top, a = e.width,
|
|
324
|
-
return this._openUpward ? { bottom: n - e.top + 2, left:
|
|
341
|
+
const e = t.getBoundingClientRect(), n = window.innerHeight, o = window.innerWidth, i = n - e.bottom, r = e.top, a = e.width, d = Math.max(0, Math.min(e.left, o - a));
|
|
342
|
+
return this._openUpward ? { bottom: n - e.top + 2, left: d, width: a, maxHeight: Math.max(100, Math.min(200, r - 10)) } : { top: e.bottom + 2, left: d, width: a, maxHeight: Math.max(100, Math.min(200, i - 10)) };
|
|
325
343
|
});
|
|
326
344
|
s(this, "_updateDropdownPosition", () => {
|
|
327
345
|
requestAnimationFrame(() => {
|
|
@@ -709,8 +727,8 @@ class q extends w {
|
|
|
709
727
|
this._selectedOptions = [], this._filteredOptions = [...t], this._parsedOptions = null, this.setAttribute("options", JSON.stringify(t));
|
|
710
728
|
}
|
|
711
729
|
}
|
|
712
|
-
s(
|
|
713
|
-
class
|
|
730
|
+
s(K, "observedAttributes", ["multiple", "searchable", "placeholder", "disabled", "value", "options"]);
|
|
731
|
+
class V extends w {
|
|
714
732
|
constructor() {
|
|
715
733
|
super();
|
|
716
734
|
s(this, "_getConfig", () => ({ min: parseFloat(this.getAttribute("min") ?? 0), max: parseFloat(this.getAttribute("max") ?? 100), step: parseFloat(this.getAttribute("step") ?? 1), unit: this.getAttribute("unit") || "" }));
|
|
@@ -723,7 +741,7 @@ class J extends w {
|
|
|
723
741
|
i && (i.style.width = o + "%"), r && (r.style.left = o + "%"), a && (a.textContent = this._formatVal(n));
|
|
724
742
|
});
|
|
725
743
|
s(this, "_build", () => {
|
|
726
|
-
const { min: t, max: e } = this._getConfig(), n = parseFloat(this.getAttribute("value") ?? t), o = this.getAttribute("label") || "", i = this.hasAttribute("show-value"), r = (n - t) / (e - t) * 100, a = this.getAttribute("color") || "",
|
|
744
|
+
const { min: t, max: e } = this._getConfig(), n = parseFloat(this.getAttribute("value") ?? t), o = this.getAttribute("label") || "", i = this.hasAttribute("show-value"), r = (n - t) / (e - t) * 100, a = this.getAttribute("color") || "", d = [this.hasAttribute("glow") ? "glow" : "", this.hasAttribute("pulse") ? "pulse" : ""].filter(Boolean).join(" "), h = a ? `--wox-fx-color:${a};border-color:${a}` : "", l = a ? " custom-color" : "";
|
|
727
745
|
this.render(`
|
|
728
746
|
:host { display: inline-block; width: 100%; }
|
|
729
747
|
.wrapper { display: flex; align-items: center; gap: var(--wox-space-lg, 12px); }
|
|
@@ -748,38 +766,38 @@ class J extends w {
|
|
|
748
766
|
}
|
|
749
767
|
.fill.custom-color { background: var(--wox-fx-color); }
|
|
750
768
|
.thumb.glow { width: 16px; height: 16px; }
|
|
751
|
-
` +
|
|
769
|
+
` + D, `
|
|
752
770
|
<div class="wrapper">
|
|
753
771
|
${o ? `<span class="label">${o}</span>` : ""}
|
|
754
772
|
<div class="track-wrap">
|
|
755
|
-
<div class="track"><div class="fill${
|
|
756
|
-
<div class="thumb ${
|
|
773
|
+
<div class="track"><div class="fill${l}" style="width:${r}%;${a ? "--wox-fx-color:" + a : ""}"></div></div>
|
|
774
|
+
<div class="thumb ${d}" style="${h};left:${r}%"></div>
|
|
757
775
|
</div>
|
|
758
776
|
${i ? `<span class="value">${this._formatVal(n)}</span>` : ""}
|
|
759
777
|
</div>
|
|
760
778
|
`), this._attachDrag();
|
|
761
779
|
});
|
|
762
780
|
s(this, "_attachDrag", () => {
|
|
763
|
-
const { min: t, max: e, step: n, unit: o } = this._getConfig(), i = this.$(".track-wrap"), r = this.$(".fill"), a = this.$(".thumb"),
|
|
764
|
-
const
|
|
765
|
-
let b = (
|
|
781
|
+
const { min: t, max: e, step: n, unit: o } = this._getConfig(), i = this.$(".track-wrap"), r = this.$(".fill"), a = this.$(".thumb"), d = this.$(".value"), h = (x) => {
|
|
782
|
+
const f = i.getBoundingClientRect();
|
|
783
|
+
let b = (x - f.left) / f.width;
|
|
766
784
|
b = Math.max(0, Math.min(1, b));
|
|
767
|
-
let
|
|
768
|
-
|
|
769
|
-
const
|
|
770
|
-
return r.style.width =
|
|
771
|
-
},
|
|
772
|
-
const
|
|
773
|
-
this.emit("wox-input", { value:
|
|
774
|
-
},
|
|
775
|
-
this._dragging = !1, a.classList.remove("dragging"), document.removeEventListener("mousemove",
|
|
776
|
-
const
|
|
777
|
-
this.setAttribute("value",
|
|
785
|
+
let u = t + b * (e - t);
|
|
786
|
+
u = Math.round(u / n) * n, u = Math.max(t, Math.min(e, u));
|
|
787
|
+
const v = (u - t) / (e - t) * 100;
|
|
788
|
+
return r.style.width = v + "%", a.style.left = v + "%", d && (d.textContent = o === "%" ? Math.round(100 * u) + "%" : n < 1 ? u.toFixed(2) : String(u)), u;
|
|
789
|
+
}, l = (x) => {
|
|
790
|
+
const f = h(x.clientX);
|
|
791
|
+
this.emit("wox-input", { value: f });
|
|
792
|
+
}, g = (x) => {
|
|
793
|
+
this._dragging = !1, a.classList.remove("dragging"), document.removeEventListener("mousemove", l), document.removeEventListener("mouseup", g);
|
|
794
|
+
const f = h(x.clientX);
|
|
795
|
+
this.setAttribute("value", f), this.emit("wox-change", { value: f });
|
|
778
796
|
};
|
|
779
|
-
i.addEventListener("mousedown", (
|
|
797
|
+
i.addEventListener("mousedown", (x) => {
|
|
780
798
|
this._dragging = !0, a.classList.add("dragging");
|
|
781
|
-
const
|
|
782
|
-
this.emit("wox-input", { value:
|
|
799
|
+
const f = h(x.clientX);
|
|
800
|
+
this.emit("wox-input", { value: f }), document.addEventListener("mousemove", l), document.addEventListener("mouseup", g), x.preventDefault();
|
|
783
801
|
});
|
|
784
802
|
});
|
|
785
803
|
this._dragging = !1;
|
|
@@ -791,8 +809,8 @@ class J extends w {
|
|
|
791
809
|
this.isConnected && (this._dragging || (t === "value" ? this._updateVisuals() : this._build()));
|
|
792
810
|
}
|
|
793
811
|
}
|
|
794
|
-
s(
|
|
795
|
-
class
|
|
812
|
+
s(V, "observedAttributes", ["value", "min", "max", "step", "label", "unit", "show-value", "color", "glow", "pulse"]);
|
|
813
|
+
class U extends w {
|
|
796
814
|
constructor() {
|
|
797
815
|
super(...arguments);
|
|
798
816
|
s(this, "_render", () => {
|
|
@@ -814,7 +832,7 @@ class K extends w {
|
|
|
814
832
|
background: repeating-conic-gradient(#888 0% 25%, #fff 0% 50%) 0 0 / 8px 8px;
|
|
815
833
|
}
|
|
816
834
|
.color { position: absolute; inset: 0; }
|
|
817
|
-
${
|
|
835
|
+
${D} :host { --size: ${e}px; }`, `<div class="swatch ${r}"${a}>
|
|
818
836
|
<div class="checker"></div>
|
|
819
837
|
<div class="color" style="background:${t}"></div>
|
|
820
838
|
</div>`), this.$(".swatch").addEventListener("click", () => {
|
|
@@ -829,8 +847,8 @@ class K extends w {
|
|
|
829
847
|
this.isConnected && this._render();
|
|
830
848
|
}
|
|
831
849
|
}
|
|
832
|
-
s(
|
|
833
|
-
class
|
|
850
|
+
s(U, "observedAttributes", ["color", "size", "selected", "glow", "pulse"]);
|
|
851
|
+
class Q extends w {
|
|
834
852
|
constructor() {
|
|
835
853
|
super(...arguments);
|
|
836
854
|
s(this, "_render", () => {
|
|
@@ -854,9 +872,9 @@ class V extends w {
|
|
|
854
872
|
s(this, "_position", () => {
|
|
855
873
|
const t = this.shadowRoot.querySelector(".tip");
|
|
856
874
|
if (!t) return;
|
|
857
|
-
const e = this.getAttribute("position") || "top", n = this.getBoundingClientRect(), o = t.getBoundingClientRect(), i = window.innerWidth, r = window.innerHeight, a = { top: n.top - 6 - o.height >= 0, bottom: n.bottom + 6 + o.height <= r, left: n.left - 6 - o.width >= 0, right: n.right + 6 + o.width <= i },
|
|
858
|
-
let
|
|
859
|
-
|
|
875
|
+
const e = this.getAttribute("position") || "top", n = this.getBoundingClientRect(), o = t.getBoundingClientRect(), i = window.innerWidth, r = window.innerHeight, a = { top: n.top - 6 - o.height >= 0, bottom: n.bottom + 6 + o.height <= r, left: n.left - 6 - o.width >= 0, right: n.right + 6 + o.width <= i }, d = { top: "bottom", bottom: "top", left: "right", right: "left" }, h = [e, d[e], ...["top", "bottom", "left", "right"].filter((x) => x !== e && x !== d[e])].find((x) => a[x]) || e;
|
|
876
|
+
let l, g;
|
|
877
|
+
h === "top" ? (l = n.top - 6 - o.height, g = n.left + n.width / 2 - o.width / 2) : h === "bottom" ? (l = n.bottom + 6, g = n.left + n.width / 2 - o.width / 2) : h === "left" ? (l = n.top + n.height / 2 - o.height / 2, g = n.left - 6 - o.width) : (l = n.top + n.height / 2 - o.height / 2, g = n.right + 6), g = Math.max(4, Math.min(g, i - o.width - 4)), l = Math.max(4, Math.min(l, r - o.height - 4)), t.style.top = `${l}px`, t.style.left = `${g}px`;
|
|
860
878
|
});
|
|
861
879
|
}
|
|
862
880
|
connectedCallback() {
|
|
@@ -866,8 +884,8 @@ class V extends w {
|
|
|
866
884
|
this.isConnected && this._render();
|
|
867
885
|
}
|
|
868
886
|
}
|
|
869
|
-
s(
|
|
870
|
-
class
|
|
887
|
+
s(Q, "observedAttributes", ["text", "position", "delay"]);
|
|
888
|
+
class Z extends w {
|
|
871
889
|
constructor() {
|
|
872
890
|
super();
|
|
873
891
|
s(this, "_initFromAttrs", () => {
|
|
@@ -976,16 +994,16 @@ class U extends w {
|
|
|
976
994
|
const t = this._wCtx, e = 220;
|
|
977
995
|
t.clearRect(0, 0, e, e);
|
|
978
996
|
const n = t.createConicGradient(-Math.PI / 2, 110, 110);
|
|
979
|
-
for (let
|
|
997
|
+
for (let x = 0; x <= 36; x++) n.addColorStop(x / 36, `hsl(${10 * x},100%,50%)`);
|
|
980
998
|
t.fillStyle = n, t.beginPath(), t.arc(110, 110, 104, 0, 2 * Math.PI), t.fill(), t.save(), t.globalCompositeOperation = "destination-out", t.beginPath(), t.arc(110, 110, 78, 0, 2 * Math.PI), t.fill(), t.restore(), t.strokeStyle = "rgba(0,0,0,0.25)", t.lineWidth = 1, t.beginPath(), t.arc(110, 110, 103.5, 0, 2 * Math.PI), t.stroke(), t.beginPath(), t.arc(110, 110, 78.5, 0, 2 * Math.PI), t.stroke();
|
|
981
999
|
const o = this._hue * Math.PI * 2 - Math.PI / 2, i = 110 + 91 * Math.cos(o), r = 110 + 91 * Math.sin(o);
|
|
982
1000
|
t.strokeStyle = "#fff", t.lineWidth = 2.5, t.beginPath(), t.arc(i, r, 8, 0, 2 * Math.PI), t.stroke(), t.strokeStyle = "rgba(0,0,0,0.4)", t.lineWidth = 1, t.beginPath(), t.arc(i, r, 8, 0, 2 * Math.PI), t.stroke();
|
|
983
|
-
const a = 104,
|
|
984
|
-
|
|
985
|
-
const
|
|
986
|
-
|
|
987
|
-
const
|
|
988
|
-
t.strokeStyle = "#fff", t.lineWidth = 2.5, t.beginPath(), t.arc(
|
|
1001
|
+
const a = 104, d = t.createLinearGradient(58, 0, 162, 0);
|
|
1002
|
+
d.addColorStop(0, "#fff"), d.addColorStop(1, `hsl(${360 * this._hue},100%,50%)`), t.fillStyle = d, t.fillRect(58, 58, a, a);
|
|
1003
|
+
const h = t.createLinearGradient(0, 58, 0, 162);
|
|
1004
|
+
h.addColorStop(0, "rgba(0,0,0,0)"), h.addColorStop(1, "rgba(0,0,0,1)"), t.fillStyle = h, t.fillRect(58, 58, a, a);
|
|
1005
|
+
const l = 58 + this._sat * a, g = 58 + (1 - this._val) * a;
|
|
1006
|
+
t.strokeStyle = "#fff", t.lineWidth = 2.5, t.beginPath(), t.arc(l, g, 7, 0, 2 * Math.PI), t.stroke(), t.strokeStyle = "rgba(0,0,0,0.4)", t.lineWidth = 1, t.beginPath(), t.arc(l, g, 7, 0, 2 * Math.PI), t.stroke();
|
|
989
1007
|
});
|
|
990
1008
|
s(this, "_drawAlpha", () => {
|
|
991
1009
|
const t = this._aCtx;
|
|
@@ -1053,8 +1071,8 @@ class U extends w {
|
|
|
1053
1071
|
} else t !== "color" && t !== "alpha" || (this._initFromAttrs(), this.hasAttribute("open") && this._redraw());
|
|
1054
1072
|
}
|
|
1055
1073
|
}
|
|
1056
|
-
s(
|
|
1057
|
-
const
|
|
1074
|
+
s(Z, "observedAttributes", ["color", "alpha", "open"]);
|
|
1075
|
+
const F = `
|
|
1058
1076
|
:host { display: block; }
|
|
1059
1077
|
.item {
|
|
1060
1078
|
color: var(--wox-text-primary, #eee); padding: 8px 12px; display: flex; align-items: center;
|
|
@@ -1075,12 +1093,12 @@ const P = `
|
|
|
1075
1093
|
}
|
|
1076
1094
|
.material-icons { font-family: 'Material Icons'; font-weight: normal; font-style: normal; display: inline-block; line-height: 1; text-transform: none; letter-spacing: normal; word-wrap: normal; white-space: nowrap; direction: ltr; -webkit-font-smoothing: antialiased; }
|
|
1077
1095
|
`;
|
|
1078
|
-
class
|
|
1096
|
+
class tt extends w {
|
|
1079
1097
|
constructor() {
|
|
1080
1098
|
super(...arguments);
|
|
1081
1099
|
s(this, "_render", () => {
|
|
1082
1100
|
const t = this.getAttribute("type") || "item", e = this.getAttribute("label") || "", n = this.getAttribute("shortcut") || "", o = this.getAttribute("icon") || "", i = this.hasAttribute("disabled"), r = this.hasAttribute("submenu");
|
|
1083
|
-
t !== "separator" ? t !== "header" ? (this.render(
|
|
1101
|
+
t !== "separator" ? t !== "header" ? (this.render(F, `
|
|
1084
1102
|
<div class="item ${i ? "disabled" : ""}">
|
|
1085
1103
|
${o ? `<span class="icon material-icons">${o}</span>` : ""}
|
|
1086
1104
|
<span class="label">${e}</span>
|
|
@@ -1089,7 +1107,7 @@ class Q extends w {
|
|
|
1089
1107
|
</div>
|
|
1090
1108
|
`), i || this.$(".item").addEventListener("click", () => {
|
|
1091
1109
|
this.emit("wox-select", { label: e });
|
|
1092
|
-
})) : this.render(
|
|
1110
|
+
})) : this.render(F, `<div class="header">${e}</div>`) : this.render(F, '<div class="separator"></div>');
|
|
1093
1111
|
});
|
|
1094
1112
|
}
|
|
1095
1113
|
connectedCallback() {
|
|
@@ -1099,8 +1117,8 @@ class Q extends w {
|
|
|
1099
1117
|
this.isConnected && this._render();
|
|
1100
1118
|
}
|
|
1101
1119
|
}
|
|
1102
|
-
s(
|
|
1103
|
-
class
|
|
1120
|
+
s(tt, "observedAttributes", ["label", "shortcut", "icon", "disabled", "type", "submenu"]);
|
|
1121
|
+
class et extends w {
|
|
1104
1122
|
constructor() {
|
|
1105
1123
|
super(...arguments);
|
|
1106
1124
|
s(this, "_render", () => {
|
|
@@ -1144,8 +1162,8 @@ class Z extends w {
|
|
|
1144
1162
|
if (!t || !e) return;
|
|
1145
1163
|
const n = t.getBoundingClientRect(), o = window.innerWidth, i = window.innerHeight, r = e.getBoundingClientRect();
|
|
1146
1164
|
n.left + r.width > o ? e.style.left = n.right - r.width + "px" : e.style.left = `${n.left}px`;
|
|
1147
|
-
const a = i - n.bottom,
|
|
1148
|
-
a >= r.height || a >=
|
|
1165
|
+
const a = i - n.bottom, d = n.top;
|
|
1166
|
+
a >= r.height || a >= d ? (e.style.top = `${n.bottom}px`, e.style.bottom = "") : (e.style.top = "", e.style.bottom = i - n.top + "px");
|
|
1149
1167
|
});
|
|
1150
1168
|
});
|
|
1151
1169
|
s(this, "_close", () => {
|
|
@@ -1168,13 +1186,13 @@ class Z extends w {
|
|
|
1168
1186
|
this._outsideClick && document.removeEventListener("mousedown", this._outsideClick);
|
|
1169
1187
|
}
|
|
1170
1188
|
}
|
|
1171
|
-
s(
|
|
1172
|
-
const
|
|
1173
|
-
class
|
|
1189
|
+
s(et, "observedAttributes", ["label", "open", "trigger"]);
|
|
1190
|
+
const zt = { rectangle: "crop_square", ellipse: "radio_button_unchecked", path: "timeline", image: "image", text: "text_fields", group: "folder", layer: "layers" };
|
|
1191
|
+
class nt extends w {
|
|
1174
1192
|
constructor() {
|
|
1175
1193
|
super(...arguments);
|
|
1176
1194
|
s(this, "_render", () => {
|
|
1177
|
-
const t = this.getAttribute("name") || "Layer", e = this.getAttribute("type") || "layer", n = this.hasAttribute("visible"), o = this.hasAttribute("locked"), i = this.hasAttribute("selected"), r =
|
|
1195
|
+
const t = this.getAttribute("name") || "Layer", e = this.getAttribute("type") || "layer", n = this.hasAttribute("visible"), o = this.hasAttribute("locked"), i = this.hasAttribute("selected"), r = zt[e] || "layers";
|
|
1178
1196
|
this.render(`
|
|
1179
1197
|
:host { display: block; }
|
|
1180
1198
|
.layer {
|
|
@@ -1211,12 +1229,12 @@ class tt extends w {
|
|
|
1211
1229
|
a.target.closest(".toggle") || this.emit("wox-select", { name: t });
|
|
1212
1230
|
}), this.$(".name").addEventListener("dblclick", () => this._startEditing()), this.$(".eye").addEventListener("click", (a) => {
|
|
1213
1231
|
a.stopPropagation();
|
|
1214
|
-
const
|
|
1215
|
-
|
|
1232
|
+
const d = !n;
|
|
1233
|
+
d ? this.setAttribute("visible", "") : this.removeAttribute("visible"), this.emit("wox-visibility", { visible: d });
|
|
1216
1234
|
}), this.$(".lock").addEventListener("click", (a) => {
|
|
1217
1235
|
a.stopPropagation();
|
|
1218
|
-
const
|
|
1219
|
-
|
|
1236
|
+
const d = !o;
|
|
1237
|
+
d ? this.setAttribute("locked", "") : this.removeAttribute("locked"), this.emit("wox-lock", { locked: d });
|
|
1220
1238
|
});
|
|
1221
1239
|
});
|
|
1222
1240
|
s(this, "_startEditing", () => {
|
|
@@ -1238,8 +1256,8 @@ class tt extends w {
|
|
|
1238
1256
|
this.isConnected && !this._editing && this._render();
|
|
1239
1257
|
}
|
|
1240
1258
|
}
|
|
1241
|
-
s(
|
|
1242
|
-
class
|
|
1259
|
+
s(nt, "observedAttributes", ["name", "type", "visible", "locked", "selected", "depth"]);
|
|
1260
|
+
class ot extends w {
|
|
1243
1261
|
constructor() {
|
|
1244
1262
|
super(...arguments);
|
|
1245
1263
|
s(this, "_render", () => {
|
|
@@ -1296,8 +1314,8 @@ class et extends w {
|
|
|
1296
1314
|
this.isConnected && this._render();
|
|
1297
1315
|
}
|
|
1298
1316
|
}
|
|
1299
|
-
s(
|
|
1300
|
-
class
|
|
1317
|
+
s(ot, "observedAttributes", ["title", "collapsed", "icon"]);
|
|
1318
|
+
class it extends w {
|
|
1301
1319
|
connectedCallback() {
|
|
1302
1320
|
this.render(`
|
|
1303
1321
|
:host { display: none; flex: 1; overflow-y: auto; overflow-x: hidden; flex-direction: column; }
|
|
@@ -1305,8 +1323,8 @@ class nt extends w {
|
|
|
1305
1323
|
`, "<slot></slot>");
|
|
1306
1324
|
}
|
|
1307
1325
|
}
|
|
1308
|
-
s(
|
|
1309
|
-
class
|
|
1326
|
+
s(it, "observedAttributes", ["name", "label", "icon", "active"]);
|
|
1327
|
+
class st extends w {
|
|
1310
1328
|
constructor() {
|
|
1311
1329
|
super(...arguments);
|
|
1312
1330
|
s(this, "_render", () => {
|
|
@@ -1362,10 +1380,10 @@ class ot extends w {
|
|
|
1362
1380
|
t.innerHTML = "";
|
|
1363
1381
|
const e = this._getTabs(), n = this.getAttribute("active") || ((o = e[0]) == null ? void 0 : o.getAttribute("name")) || "";
|
|
1364
1382
|
e.forEach((i) => {
|
|
1365
|
-
const r = i.getAttribute("name") || "", a = i.getAttribute("label") || r,
|
|
1366
|
-
|
|
1383
|
+
const r = i.getAttribute("name") || "", a = i.getAttribute("label") || r, d = document.createElement("button");
|
|
1384
|
+
d.className = "tab-btn" + (r === n ? " active" : ""), d.textContent = a, d.addEventListener("click", () => {
|
|
1367
1385
|
this.setAttribute("active", r), this.emit("wox-tab-change", { name: r });
|
|
1368
|
-
}), t.appendChild(
|
|
1386
|
+
}), t.appendChild(d);
|
|
1369
1387
|
}), this._updateActive();
|
|
1370
1388
|
});
|
|
1371
1389
|
s(this, "_updateActive", () => {
|
|
@@ -1388,8 +1406,8 @@ class ot extends w {
|
|
|
1388
1406
|
this.isConnected && this._updateActive();
|
|
1389
1407
|
}
|
|
1390
1408
|
}
|
|
1391
|
-
s(
|
|
1392
|
-
class
|
|
1409
|
+
s(st, "observedAttributes", ["active", "placement"]);
|
|
1410
|
+
class rt extends w {
|
|
1393
1411
|
constructor() {
|
|
1394
1412
|
super(...arguments);
|
|
1395
1413
|
s(this, "_render", () => {
|
|
@@ -1411,8 +1429,8 @@ class it extends w {
|
|
|
1411
1429
|
this.isConnected && this._render();
|
|
1412
1430
|
}
|
|
1413
1431
|
}
|
|
1414
|
-
s(
|
|
1415
|
-
class
|
|
1432
|
+
s(rt, "observedAttributes", ["label"]);
|
|
1433
|
+
class at extends w {
|
|
1416
1434
|
constructor() {
|
|
1417
1435
|
super(...arguments);
|
|
1418
1436
|
s(this, "_render", () => {
|
|
@@ -1436,8 +1454,8 @@ class st extends w {
|
|
|
1436
1454
|
this.isConnected && this._render();
|
|
1437
1455
|
}
|
|
1438
1456
|
}
|
|
1439
|
-
s(
|
|
1440
|
-
class
|
|
1457
|
+
s(at, "observedAttributes", ["width", "position"]);
|
|
1458
|
+
class dt extends w {
|
|
1441
1459
|
constructor() {
|
|
1442
1460
|
super(...arguments);
|
|
1443
1461
|
s(this, "_render", () => {
|
|
@@ -1463,14 +1481,14 @@ class rt extends w {
|
|
|
1463
1481
|
const n = this.$(".resizer");
|
|
1464
1482
|
if (!n) return;
|
|
1465
1483
|
let o = 0, i = 0;
|
|
1466
|
-
const r = this.getAttribute("position") === "left", a = (
|
|
1467
|
-
const
|
|
1468
|
-
this.style.width =
|
|
1469
|
-
},
|
|
1470
|
-
document.removeEventListener("mousemove", a), document.removeEventListener("mouseup",
|
|
1484
|
+
const r = this.getAttribute("position") === "left", a = (h) => {
|
|
1485
|
+
const l = r ? h.clientX - o : o - h.clientX, g = Math.max(180, Math.min(600, i + l));
|
|
1486
|
+
this.style.width = g + "px";
|
|
1487
|
+
}, d = () => {
|
|
1488
|
+
document.removeEventListener("mousemove", a), document.removeEventListener("mouseup", d);
|
|
1471
1489
|
};
|
|
1472
|
-
n.addEventListener("mousedown", (
|
|
1473
|
-
o =
|
|
1490
|
+
n.addEventListener("mousedown", (h) => {
|
|
1491
|
+
o = h.clientX, i = this.getBoundingClientRect().width, document.addEventListener("mousemove", a), document.addEventListener("mouseup", d), h.preventDefault();
|
|
1474
1492
|
});
|
|
1475
1493
|
}
|
|
1476
1494
|
});
|
|
@@ -1482,8 +1500,8 @@ class rt extends w {
|
|
|
1482
1500
|
this.isConnected && this._render();
|
|
1483
1501
|
}
|
|
1484
1502
|
}
|
|
1485
|
-
s(
|
|
1486
|
-
class
|
|
1503
|
+
s(dt, "observedAttributes", ["width", "position", "resizable"]);
|
|
1504
|
+
class lt extends w {
|
|
1487
1505
|
constructor() {
|
|
1488
1506
|
super(...arguments);
|
|
1489
1507
|
s(this, "_render", () => {
|
|
@@ -1509,8 +1527,8 @@ class at extends w {
|
|
|
1509
1527
|
this.isConnected && this._render();
|
|
1510
1528
|
}
|
|
1511
1529
|
}
|
|
1512
|
-
s(
|
|
1513
|
-
class
|
|
1530
|
+
s(lt, "observedAttributes", ["height"]);
|
|
1531
|
+
class ct extends w {
|
|
1514
1532
|
constructor() {
|
|
1515
1533
|
super(...arguments);
|
|
1516
1534
|
s(this, "_render", () => {
|
|
@@ -1538,8 +1556,8 @@ class dt extends w {
|
|
|
1538
1556
|
this.isConnected && this._render();
|
|
1539
1557
|
}
|
|
1540
1558
|
}
|
|
1541
|
-
s(
|
|
1542
|
-
class
|
|
1559
|
+
s(ct, "observedAttributes", ["height"]);
|
|
1560
|
+
class pt extends w {
|
|
1543
1561
|
constructor() {
|
|
1544
1562
|
super(...arguments);
|
|
1545
1563
|
s(this, "_render", () => {
|
|
@@ -1580,7 +1598,7 @@ class lt extends w {
|
|
|
1580
1598
|
.btn-secondary:hover { background: var(--wox-border-light, #444); }
|
|
1581
1599
|
.btn-primary { background: var(--wox-accent, #00e5ff); color: var(--wox-text-hi, #fff); }
|
|
1582
1600
|
.btn-primary:hover { filter: brightness(0.85); }
|
|
1583
|
-
${
|
|
1601
|
+
${D} .box { --width: ${n}; }`, `
|
|
1584
1602
|
<div class="overlay">
|
|
1585
1603
|
<div class="box ${i}"${r}>
|
|
1586
1604
|
<div class="header">
|
|
@@ -1596,19 +1614,19 @@ class lt extends w {
|
|
|
1596
1614
|
</div>
|
|
1597
1615
|
</div>
|
|
1598
1616
|
</div>
|
|
1599
|
-
`), this.$(".overlay").addEventListener("click", (
|
|
1600
|
-
|
|
1617
|
+
`), this.$(".overlay").addEventListener("click", (l) => {
|
|
1618
|
+
l.target === this.$(".overlay") && (this.removeAttribute("open"), this.emit("wox-close", {}));
|
|
1601
1619
|
});
|
|
1602
1620
|
const a = this.$(".close-btn");
|
|
1603
1621
|
a && a.addEventListener("click", () => {
|
|
1604
1622
|
this.removeAttribute("open"), this.emit("wox-close", {});
|
|
1605
1623
|
});
|
|
1606
|
-
const
|
|
1607
|
-
|
|
1624
|
+
const d = this.$(".cancel-btn");
|
|
1625
|
+
d && d.addEventListener("click", () => {
|
|
1608
1626
|
this.removeAttribute("open"), this.emit("wox-cancel", {});
|
|
1609
1627
|
});
|
|
1610
|
-
const
|
|
1611
|
-
|
|
1628
|
+
const h = this.$(".ok-btn");
|
|
1629
|
+
h && h.addEventListener("click", () => {
|
|
1612
1630
|
this.removeAttribute("open"), this.emit("wox-confirm", {});
|
|
1613
1631
|
});
|
|
1614
1632
|
});
|
|
@@ -1644,8 +1662,8 @@ class lt extends w {
|
|
|
1644
1662
|
t ? this.setAttribute("open", "") : this.removeAttribute("open");
|
|
1645
1663
|
}
|
|
1646
1664
|
}
|
|
1647
|
-
s(
|
|
1648
|
-
class
|
|
1665
|
+
s(pt, "observedAttributes", ["open", "title", "closable", "width", "color", "glow", "pulse"]);
|
|
1666
|
+
class ft extends w {
|
|
1649
1667
|
constructor() {
|
|
1650
1668
|
super(...arguments);
|
|
1651
1669
|
s(this, "_columns", []);
|
|
@@ -1664,18 +1682,18 @@ class vt extends w {
|
|
|
1664
1682
|
});
|
|
1665
1683
|
s(this, "_render", () => {
|
|
1666
1684
|
const t = this._getSortedRows(), e = this._columns.map((o, i) => {
|
|
1667
|
-
const r = this._sortKey === o.key, a = [r ? "sorted" : "", r && this._sortDir === "desc" ? "desc" : ""].filter(Boolean).join(" "),
|
|
1685
|
+
const r = this._sortKey === o.key, a = [r ? "sorted" : "", r && this._sortDir === "desc" ? "desc" : ""].filter(Boolean).join(" "), d = o.sortable !== !1;
|
|
1668
1686
|
return `<div class="header-cell ${a}" data-col="${i}" style="width:${this._colWidths[i]}px" draggable="true">
|
|
1669
1687
|
<span class="label-text">${o.label || o.key}</span>
|
|
1670
|
-
${
|
|
1688
|
+
${d ? '<span class="sort-arrow">▲</span>' : ""}
|
|
1671
1689
|
<div class="resize-handle" data-col="${i}"></div>
|
|
1672
1690
|
</div>`;
|
|
1673
1691
|
}).join(""), n = t.length === 0 ? '<div class="empty">No data</div>' : t.map((o, i) => {
|
|
1674
|
-
const r = i % 2 == 0 ? "even" : "odd", a = this._columns.map((
|
|
1675
|
-
const
|
|
1676
|
-
return
|
|
1692
|
+
const r = i % 2 == 0 ? "even" : "odd", a = this._columns.map((d, h) => {
|
|
1693
|
+
const l = d.align ? ` align-${d.align}` : "", g = this._editingCell && this._editingCell.rowIndex === i && this._editingCell.key === d.key, x = o[d.key] != null ? o[d.key] : "";
|
|
1694
|
+
return g ? `<div class="cell${l}" style="width:${this._colWidths[h]}px" data-key="${d.key}">
|
|
1677
1695
|
<input class="cell-input" spellcheck="false">
|
|
1678
|
-
</div>` : `<div class="cell${
|
|
1696
|
+
</div>` : `<div class="cell${l}" style="width:${this._colWidths[h]}px" data-key="${d.key}">${x}</div>`;
|
|
1679
1697
|
}).join("");
|
|
1680
1698
|
return `<div class="row ${r}" data-row="${i}">${a}</div>`;
|
|
1681
1699
|
}).join("");
|
|
@@ -1772,12 +1790,12 @@ class vt extends w {
|
|
|
1772
1790
|
const o = this.$(".cell-input");
|
|
1773
1791
|
if (o) {
|
|
1774
1792
|
const { rowIndex: i, key: r } = this._editingCell, a = this._getSortedRows();
|
|
1775
|
-
let
|
|
1776
|
-
const
|
|
1777
|
-
|
|
1778
|
-
const
|
|
1779
|
-
o.value =
|
|
1780
|
-
|
|
1793
|
+
let d = a[i][r] != null ? a[i][r] : "";
|
|
1794
|
+
const h = document.createElement("div");
|
|
1795
|
+
h.innerHTML = d;
|
|
1796
|
+
const l = h.textContent || h.innerText || d;
|
|
1797
|
+
o.value = l, o.dataset.oldValue = l, o.focus(), o.select(), o.addEventListener("keydown", (g) => {
|
|
1798
|
+
g.key === "Enter" ? this._commitEdit(o.value) : g.key === "Escape" && (this._editingCell = null, this._render());
|
|
1781
1799
|
}), o.addEventListener("blur", () => {
|
|
1782
1800
|
this._commitEdit(o.value);
|
|
1783
1801
|
});
|
|
@@ -1825,9 +1843,9 @@ class vt extends w {
|
|
|
1825
1843
|
e.preventDefault(), e.stopPropagation();
|
|
1826
1844
|
const n = Number(t.dataset.col), o = e.clientX, i = this._colWidths[n];
|
|
1827
1845
|
t.classList.add("active");
|
|
1828
|
-
const r = (
|
|
1829
|
-
const
|
|
1830
|
-
this._colWidths[n] = Math.max(40, i +
|
|
1846
|
+
const r = (d) => {
|
|
1847
|
+
const h = d.clientX - o;
|
|
1848
|
+
this._colWidths[n] = Math.max(40, i + h), this._applyWidths();
|
|
1831
1849
|
}, a = () => {
|
|
1832
1850
|
t.classList.remove("active"), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", a);
|
|
1833
1851
|
};
|
|
@@ -1867,12 +1885,12 @@ class vt extends w {
|
|
|
1867
1885
|
return this._rows;
|
|
1868
1886
|
}
|
|
1869
1887
|
}
|
|
1870
|
-
const
|
|
1871
|
-
let
|
|
1872
|
-
const
|
|
1888
|
+
const Lt = 4e3, ut = { TL: { top: "16px", left: "16px" }, TC: { top: "16px", left: "50%", transform: "translateX(-50%)" }, TR: { top: "16px", right: "16px" }, BL: { bottom: "16px", left: "16px" }, BC: { bottom: "16px", left: "50%", transform: "translateX(-50%)" }, BR: { bottom: "16px", right: "16px" } }, St = { TL: "translateX(-120%)", TC: "translateY(-120%)", TR: "translateX(120%)", BL: "translateX(-120%)", BC: "translateY(120%)", BR: "translateX(120%)" }, Mt = { success: { bg: "#1a2e1a", border: "#4CAF50", icon: "#66BB6A", progress: "#4CAF50", text: "#c8e6c9" }, error: { bg: "#2e1a1a", border: "#f44336", icon: "#ef5350", progress: "#f44336", text: "#ffcdd2" }, warning: { bg: "#2e2a1a", border: "#FF9800", icon: "#FFA726", progress: "#FF9800", text: "#ffe0b2" }, info: { bg: "#1a222e", border: "#2196F3", icon: "#42A5F5", progress: "#2196F3", text: "#bbdefb" } }, Dt = { success: { bg: "#e8f5e9", border: "#2e7d32", icon: "#388e3c", progress: "#2e7d32", text: "#1b5e20" }, error: { bg: "#fce4ec", border: "#c62828", icon: "#d32f2f", progress: "#c62828", text: "#b71c1c" }, warning: { bg: "#fff8e1", border: "#e65100", icon: "#ef6c00", progress: "#e65100", text: "#bf360c" }, info: { bg: "#e3f2fd", border: "#1565c0", icon: "#1976d2", progress: "#1565c0", text: "#0d47a1" } }, gt = { success: '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6 9 17l-5-5"/></svg>', error: '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><line x1="15" y1="9" x2="9" y2="15"/><line x1="9" y1="9" x2="15" y2="15"/></svg>', warning: '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"/><line x1="12" y1="9" x2="12" y2="13"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg>', info: '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><line x1="12" y1="16" x2="12" y2="12"/><line x1="12" y1="8" x2="12.01" y2="8"/></svg>' };
|
|
1889
|
+
let bt = !1;
|
|
1890
|
+
const B = /* @__PURE__ */ new Set(), W = {}, R = (p, c, t = {}) => {
|
|
1873
1891
|
(() => {
|
|
1874
|
-
if (
|
|
1875
|
-
|
|
1892
|
+
if (bt) return;
|
|
1893
|
+
bt = !0;
|
|
1876
1894
|
const m = document.createElement("style");
|
|
1877
1895
|
m.textContent = `
|
|
1878
1896
|
.wox-toast-container {
|
|
@@ -1931,60 +1949,60 @@ const N = /* @__PURE__ */ new Set(), F = {}, D = (p, c, t = {}) => {
|
|
|
1931
1949
|
`, document.head.appendChild(m);
|
|
1932
1950
|
})();
|
|
1933
1951
|
const e = `${p}::${c}`;
|
|
1934
|
-
if (
|
|
1935
|
-
|
|
1936
|
-
const { duration: n =
|
|
1937
|
-
const y = document.documentElement.dataset.woxTheme === "light" ?
|
|
1952
|
+
if (B.has(e)) return;
|
|
1953
|
+
B.add(e);
|
|
1954
|
+
const { duration: n = Lt, closable: o = !0, position: i = "BR" } = t, r = document.documentElement.dataset.woxTheme === "light", a = ((m) => {
|
|
1955
|
+
const y = document.documentElement.dataset.woxTheme === "light" ? Dt : Mt;
|
|
1938
1956
|
return y[m] || y.info;
|
|
1939
|
-
})(p),
|
|
1940
|
-
if (
|
|
1957
|
+
})(p), d = ut[i] ? i : "BR", h = ((m) => {
|
|
1958
|
+
if (W[m]) return W[m];
|
|
1941
1959
|
const y = document.createElement("div");
|
|
1942
1960
|
y.className = `wox-toast-container wox-toast-container-${m}`;
|
|
1943
|
-
const
|
|
1944
|
-
return Object.assign(y.style,
|
|
1945
|
-
})(
|
|
1946
|
-
|
|
1947
|
-
let
|
|
1948
|
-
<span class="wox-toast-icon" style="color:${a.icon}">${
|
|
1961
|
+
const N = ut[m];
|
|
1962
|
+
return Object.assign(y.style, N), m.startsWith("B") && (y.style.flexDirection = "column-reverse"), document.body.appendChild(y), W[m] = y, y;
|
|
1963
|
+
})(d), l = document.createElement("div");
|
|
1964
|
+
l.className = `wox-toast wox-toast-${p}`, l.style.backgroundColor = a.bg, l.style.borderLeftColor = a.border, l.style.color = a.text;
|
|
1965
|
+
let g = `
|
|
1966
|
+
<span class="wox-toast-icon" style="color:${a.icon}">${gt[p] || gt.info}</span>
|
|
1949
1967
|
<span class="wox-toast-message">${c}</span>
|
|
1950
1968
|
`;
|
|
1951
|
-
if (o && (
|
|
1952
|
-
const m =
|
|
1969
|
+
if (o && (g += '<button class="wox-toast-close" aria-label="Close">×</button>'), l.innerHTML = g, o) {
|
|
1970
|
+
const m = l.querySelector(".wox-toast-close");
|
|
1953
1971
|
m && (m.addEventListener("mouseenter", () => {
|
|
1954
1972
|
m.style.color = a.icon;
|
|
1955
1973
|
}), m.addEventListener("mouseleave", () => {
|
|
1956
1974
|
m.style.color = r ? "#999" : "#666";
|
|
1957
1975
|
}));
|
|
1958
1976
|
}
|
|
1959
|
-
let
|
|
1960
|
-
n > 0 && (
|
|
1961
|
-
const
|
|
1962
|
-
|
|
1963
|
-
let b = null,
|
|
1964
|
-
const
|
|
1965
|
-
n <= 0 || (
|
|
1977
|
+
let x = null;
|
|
1978
|
+
n > 0 && (x = document.createElement("div"), x.className = "wox-toast-progress", x.style.backgroundColor = a.progress, x.style.width = "100%", l.appendChild(x));
|
|
1979
|
+
const f = St[d];
|
|
1980
|
+
l.animate([{ transform: f, opacity: 0 }, { transform: "translateX(0) translateY(0)", opacity: 1 }], { duration: 300, easing: "cubic-bezier(.22,1,.36,1)", fill: "forwards" }), h.appendChild(l);
|
|
1981
|
+
let b = null, u = n, v = 0, k = null;
|
|
1982
|
+
const A = () => {
|
|
1983
|
+
n <= 0 || (v = Date.now(), x && (k = x.animate([{ width: x.style.width }, { width: "0%" }], { duration: u, easing: "linear", fill: "forwards" })), b = setTimeout(() => z(), u));
|
|
1966
1984
|
}, z = () => {
|
|
1967
|
-
|
|
1968
|
-
const m =
|
|
1969
|
-
|
|
1985
|
+
B.delete(e), b && (clearTimeout(b), b = null), k && k.cancel(), l.animate([{ transform: "translateX(0) translateY(0)", opacity: 1 }, { transform: f, opacity: 0 }], { duration: 300, easing: "cubic-bezier(.22,1,.36,1)", fill: "forwards" }).onfinish = () => {
|
|
1986
|
+
const m = l.offsetHeight;
|
|
1987
|
+
l.style.minHeight = "0", l.style.padding = "0", l.style.margin = "0", l.style.overflow = "hidden", l.animate([{ height: `${m}px` }, { height: "0px" }], { duration: 200, easing: "ease" }).onfinish = () => l.remove();
|
|
1970
1988
|
};
|
|
1971
1989
|
};
|
|
1972
|
-
if (
|
|
1990
|
+
if (l.addEventListener("mouseenter", () => {
|
|
1973
1991
|
b && (clearTimeout(b), b = null), k && k.pause();
|
|
1974
|
-
const m = Date.now() -
|
|
1975
|
-
if (
|
|
1976
|
-
const y = n > 0 ?
|
|
1977
|
-
|
|
1992
|
+
const m = Date.now() - v;
|
|
1993
|
+
if (u = Math.max(u - m, 0), x && k) {
|
|
1994
|
+
const y = n > 0 ? u / n * 100 : 0;
|
|
1995
|
+
x.style.width = `${y}%`;
|
|
1978
1996
|
}
|
|
1979
|
-
}),
|
|
1980
|
-
const m =
|
|
1997
|
+
}), l.addEventListener("mouseleave", A), o) {
|
|
1998
|
+
const m = l.querySelector(".wox-toast-close");
|
|
1981
1999
|
m && m.addEventListener("click", z);
|
|
1982
2000
|
}
|
|
1983
|
-
|
|
2001
|
+
A();
|
|
1984
2002
|
};
|
|
1985
|
-
class
|
|
2003
|
+
class S extends w {
|
|
1986
2004
|
}
|
|
1987
|
-
s(
|
|
2005
|
+
s(S, "success", (c, t) => R("success", c, t)), s(S, "error", (c, t) => R("error", c, t)), s(S, "warning", (c, t) => R("warning", c, t)), s(S, "info", (c, t) => R("info", c, t));
|
|
1988
2006
|
const _ = class _ extends w {
|
|
1989
2007
|
};
|
|
1990
2008
|
s(_, "_el", null), s(_, "_listenersReady", !1), s(_, "show", (c, t) => {
|
|
@@ -2050,12 +2068,12 @@ s(_, "_el", null), s(_, "_listenersReady", !1), s(_, "show", (c, t) => {
|
|
|
2050
2068
|
}), s(_, "_onKeyDown", (c) => {
|
|
2051
2069
|
c.key === "Escape" && _.hide();
|
|
2052
2070
|
});
|
|
2053
|
-
let
|
|
2054
|
-
const
|
|
2071
|
+
let T = _;
|
|
2072
|
+
const C = (p) => {
|
|
2055
2073
|
if (!p || !p.stops || p.stops.length < 2) return "";
|
|
2056
2074
|
const c = [...p.stops].sort((t, e) => t.position - e.position).map((t) => `${t.color} ${t.position}%`).join(", ");
|
|
2057
2075
|
return p.type === "linear" ? `linear-gradient(${p.angle}deg, ${c})` : `radial-gradient(circle, ${c})`;
|
|
2058
|
-
},
|
|
2076
|
+
}, wt = (p) => {
|
|
2059
2077
|
if (!p) return null;
|
|
2060
2078
|
let c = null, t = 90, e = null;
|
|
2061
2079
|
const n = p.match(/^linear-gradient\(\s*(\d+)deg\s*,\s*(.+)\)$/i);
|
|
@@ -2069,7 +2087,7 @@ const A = (p) => {
|
|
|
2069
2087
|
for (; (r = i.exec(e)) !== null; ) o.push({ color: r[1], position: parseFloat(r[2]) });
|
|
2070
2088
|
return o.length < 2 ? null : { type: c, angle: t, stops: o };
|
|
2071
2089
|
};
|
|
2072
|
-
class
|
|
2090
|
+
class _t extends w {
|
|
2073
2091
|
constructor() {
|
|
2074
2092
|
super(...arguments);
|
|
2075
2093
|
s(this, "_gradient", null);
|
|
@@ -2077,7 +2095,7 @@ class mt extends w {
|
|
|
2077
2095
|
s(this, "_justDragged", !1);
|
|
2078
2096
|
s(this, "_build", () => {
|
|
2079
2097
|
if (!this._gradient) return;
|
|
2080
|
-
const t =
|
|
2098
|
+
const t = C(this._gradient);
|
|
2081
2099
|
this.render(`
|
|
2082
2100
|
:host { display: block; }
|
|
2083
2101
|
.editor { padding: var(--wox-space-md, 8px) 0; }
|
|
@@ -2111,10 +2129,10 @@ class mt extends w {
|
|
|
2111
2129
|
});
|
|
2112
2130
|
s(this, "_updatePreview", () => {
|
|
2113
2131
|
const t = this.$(".bar");
|
|
2114
|
-
t && (t.style.background =
|
|
2132
|
+
t && (t.style.background = C(this._gradient));
|
|
2115
2133
|
});
|
|
2116
2134
|
s(this, "_emitGradient", (t) => {
|
|
2117
|
-
this.emit(t, { gradient: this.gradient, css:
|
|
2135
|
+
this.emit(t, { gradient: this.gradient, css: C(this._gradient) });
|
|
2118
2136
|
});
|
|
2119
2137
|
s(this, "_renderStops", () => {
|
|
2120
2138
|
const t = this.$(".stops");
|
|
@@ -2134,30 +2152,30 @@ class mt extends w {
|
|
|
2134
2152
|
r.preventDefault(), r.stopPropagation();
|
|
2135
2153
|
const a = this.$(".bar");
|
|
2136
2154
|
if (!a) return;
|
|
2137
|
-
const
|
|
2138
|
-
this._dragging = { idx:
|
|
2139
|
-
const
|
|
2140
|
-
const
|
|
2141
|
-
this._gradient.stops[
|
|
2142
|
-
},
|
|
2143
|
-
var
|
|
2144
|
-
document.removeEventListener("mousemove",
|
|
2145
|
-
const
|
|
2146
|
-
|
|
2147
|
-
const b = Math.abs(
|
|
2148
|
-
(
|
|
2155
|
+
const d = a.getBoundingClientRect(), h = parseInt(o.dataset.index, 10);
|
|
2156
|
+
this._dragging = { idx: h, startY: r.clientY }, o.classList.add("dragging");
|
|
2157
|
+
const l = (x) => {
|
|
2158
|
+
const f = (x.clientX - d.left) / d.width * 100, b = Math.max(0, Math.min(100, Math.round(10 * f) / 10));
|
|
2159
|
+
this._gradient.stops[h].position = b, o.style.left = b + "%", Math.abs(x.clientY - this._dragging.startY) > 40 && this._gradient.stops.length > 2 ? o.classList.add("removing") : o.classList.remove("removing"), this._updatePreview(), this._emitGradient("wox-gradient-input");
|
|
2160
|
+
}, g = (x) => {
|
|
2161
|
+
var u;
|
|
2162
|
+
document.removeEventListener("mousemove", l), document.removeEventListener("mouseup", g), o.classList.remove("dragging");
|
|
2163
|
+
const f = Math.abs(x.clientY - this._dragging.startY);
|
|
2164
|
+
f > 40 && this._gradient.stops.length > 2 ? (this._gradient.stops.splice(h, 1), this._renderStops(), this._updatePreview(), this._emitGradient("wox-gradient-change")) : this._emitGradient("wox-gradient-change");
|
|
2165
|
+
const b = Math.abs(x.clientX - (d.left + (((u = this._gradient.stops[h]) == null ? void 0 : u.position) || 0) * d.width / 100));
|
|
2166
|
+
(f > 3 || b > 3) && (this._justDragged = !0), this._dragging = null;
|
|
2149
2167
|
};
|
|
2150
|
-
document.addEventListener("mousemove",
|
|
2168
|
+
document.addEventListener("mousemove", l), document.addEventListener("mouseup", g);
|
|
2151
2169
|
}), t.appendChild(o);
|
|
2152
2170
|
}));
|
|
2153
2171
|
});
|
|
2154
2172
|
s(this, "_bindBarEvents", () => {
|
|
2155
2173
|
const t = this.$(".bar");
|
|
2156
2174
|
t && t.addEventListener("dblclick", (e) => {
|
|
2157
|
-
const n = t.getBoundingClientRect(), o = Math.round((e.clientX - n.left) / n.width * 100), i = Math.max(0, Math.min(100, o)), r = [...this._gradient.stops].sort((
|
|
2175
|
+
const n = t.getBoundingClientRect(), o = Math.round((e.clientX - n.left) / n.width * 100), i = Math.max(0, Math.min(100, o)), r = [...this._gradient.stops].sort((d, h) => d.position - h.position);
|
|
2158
2176
|
let a = "#888888";
|
|
2159
|
-
for (let
|
|
2160
|
-
a = r[
|
|
2177
|
+
for (let d = 0; d < r.length - 1; d++) if (i >= r[d].position && i <= r[d + 1].position) {
|
|
2178
|
+
a = r[d].color;
|
|
2161
2179
|
break;
|
|
2162
2180
|
}
|
|
2163
2181
|
this._gradient.stops.push({ color: a, position: i }), this._renderStops(), this._updatePreview(), this._emitGradient("wox-gradient-change");
|
|
@@ -2174,8 +2192,8 @@ class mt extends w {
|
|
|
2174
2192
|
return this._gradient ? JSON.parse(JSON.stringify(this._gradient)) : null;
|
|
2175
2193
|
}
|
|
2176
2194
|
}
|
|
2177
|
-
const
|
|
2178
|
-
class
|
|
2195
|
+
const Rt = [{ id: "grad_preset_sunset", name: "Sunset", type: "linear", angle: 135, stops: [{ color: "#ff512f", position: 0 }, { color: "#f09819", position: 100 }] }, { id: "grad_preset_ocean", name: "Ocean", type: "linear", angle: 135, stops: [{ color: "#2193b0", position: 0 }, { color: "#6dd5ed", position: 100 }] }, { id: "grad_preset_forest", name: "Forest", type: "linear", angle: 135, stops: [{ color: "#11998e", position: 0 }, { color: "#38ef7d", position: 100 }] }, { id: "grad_preset_purple_haze", name: "Purple Haze", type: "linear", angle: 135, stops: [{ color: "#7b4397", position: 0 }, { color: "#dc2430", position: 100 }] }, { id: "grad_preset_midnight", name: "Midnight", type: "linear", angle: 135, stops: [{ color: "#232526", position: 0 }, { color: "#414345", position: 100 }] }, { id: "grad_preset_peach", name: "Peach", type: "linear", angle: 135, stops: [{ color: "#ffecd2", position: 0 }, { color: "#fcb69f", position: 100 }] }], I = () => "grad_" + Date.now().toString(36) + "_" + Math.random().toString(36).slice(2, 7), vt = (p) => !!p && (p.startsWith("linear-gradient") || p.startsWith("radial-gradient"));
|
|
2196
|
+
class ht extends w {
|
|
2179
2197
|
constructor() {
|
|
2180
2198
|
super(...arguments);
|
|
2181
2199
|
s(this, "_value", "#ffffff");
|
|
@@ -2188,7 +2206,7 @@ class ct extends w {
|
|
|
2188
2206
|
s(this, "_editingName", "");
|
|
2189
2207
|
s(this, "_syncFromAttributes", () => {
|
|
2190
2208
|
const t = this.getAttribute("value");
|
|
2191
|
-
t && (this._value = t, this._gradient =
|
|
2209
|
+
t && (this._value = t, this._gradient = vt(t) ? wt(t) : null);
|
|
2192
2210
|
const e = this.getAttribute("animation-speed");
|
|
2193
2211
|
e !== null && (this._animationSpeed = parseInt(e, 10) || 0);
|
|
2194
2212
|
const n = this.getAttribute("animation-type");
|
|
@@ -2200,7 +2218,7 @@ class ct extends w {
|
|
|
2200
2218
|
if (t) return void (this._gradients = JSON.parse(t));
|
|
2201
2219
|
} catch {
|
|
2202
2220
|
}
|
|
2203
|
-
this._gradients =
|
|
2221
|
+
this._gradients = Rt.map((t) => ({ ...t, stops: t.stops.map((e) => ({ ...e })) })), this._persistGradients();
|
|
2204
2222
|
});
|
|
2205
2223
|
s(this, "_persistGradients", () => {
|
|
2206
2224
|
try {
|
|
@@ -2218,8 +2236,8 @@ class ct extends w {
|
|
|
2218
2236
|
s(this, "_getById", (t) => this._gradients.find((e) => e.id === t));
|
|
2219
2237
|
s(this, "_labelForValue", (t) => {
|
|
2220
2238
|
if (!t) return "None";
|
|
2221
|
-
if (
|
|
2222
|
-
for (const e of this._gradients) if (
|
|
2239
|
+
if (vt(t)) {
|
|
2240
|
+
for (const e of this._gradients) if (C(e) === t) return e.name;
|
|
2223
2241
|
return "Custom Gradient";
|
|
2224
2242
|
}
|
|
2225
2243
|
return t;
|
|
@@ -2368,8 +2386,8 @@ class ct extends w {
|
|
|
2368
2386
|
if (!this._gradient) return void t.classList.remove("visible");
|
|
2369
2387
|
t.classList.add("visible");
|
|
2370
2388
|
const e = this._gradient.type !== "radial";
|
|
2371
|
-
this.$$(".type-btn").forEach((
|
|
2372
|
-
|
|
2389
|
+
this.$$(".type-btn").forEach((d) => {
|
|
2390
|
+
d.classList.toggle("active", d.dataset.type === this._gradient.type);
|
|
2373
2391
|
});
|
|
2374
2392
|
const n = this.$(".angle-row");
|
|
2375
2393
|
n && (n.style.display = e ? "" : "none");
|
|
@@ -2383,35 +2401,35 @@ class ct extends w {
|
|
|
2383
2401
|
a && (a.value = this._animationType);
|
|
2384
2402
|
});
|
|
2385
2403
|
s(this, "_bindEvents", () => {
|
|
2386
|
-
this.$(".current").addEventListener("click", (
|
|
2387
|
-
|
|
2388
|
-
}), this.$$(".type-btn").forEach((
|
|
2389
|
-
|
|
2404
|
+
this.$(".current").addEventListener("click", (l) => {
|
|
2405
|
+
l.stopPropagation(), this._open ? this._closeDropdown() : this._openDropdown();
|
|
2406
|
+
}), this.$$(".type-btn").forEach((l) => {
|
|
2407
|
+
l.addEventListener("click", () => {
|
|
2390
2408
|
if (!this._gradient) return;
|
|
2391
|
-
this.$$(".type-btn").forEach((
|
|
2392
|
-
const
|
|
2393
|
-
|
|
2409
|
+
this.$$(".type-btn").forEach((x) => x.classList.remove("active")), l.classList.add("active"), this._gradient.type = l.dataset.type;
|
|
2410
|
+
const g = this.$(".angle-row");
|
|
2411
|
+
g && (g.style.display = l.dataset.type === "linear" ? "" : "none"), this._applyGradient();
|
|
2394
2412
|
});
|
|
2395
2413
|
});
|
|
2396
2414
|
const t = this.$(".angle-row wox-slider");
|
|
2397
|
-
t && (t.addEventListener("wox-input", (
|
|
2398
|
-
this._gradient && (this._gradient.angle =
|
|
2399
|
-
}), t.addEventListener("wox-change", (
|
|
2400
|
-
this._gradient && (this._gradient.angle =
|
|
2415
|
+
t && (t.addEventListener("wox-input", (l) => {
|
|
2416
|
+
this._gradient && (this._gradient.angle = l.detail.value, this._applyGradient());
|
|
2417
|
+
}), t.addEventListener("wox-change", (l) => {
|
|
2418
|
+
this._gradient && (this._gradient.angle = l.detail.value, this._applyGradient());
|
|
2401
2419
|
}));
|
|
2402
2420
|
const e = this.$(".speed-row wox-slider");
|
|
2403
|
-
e && (e.addEventListener("wox-input", (
|
|
2404
|
-
this._animationSpeed =
|
|
2405
|
-
const
|
|
2406
|
-
|
|
2407
|
-
}), e.addEventListener("wox-change", (
|
|
2408
|
-
this._animationSpeed =
|
|
2409
|
-
const
|
|
2410
|
-
|
|
2421
|
+
e && (e.addEventListener("wox-input", (l) => {
|
|
2422
|
+
this._animationSpeed = l.detail.value;
|
|
2423
|
+
const g = this.$(".anim-type-row");
|
|
2424
|
+
g && (g.style.display = this._animationSpeed > 0 ? "" : "none"), this._emitChange();
|
|
2425
|
+
}), e.addEventListener("wox-change", (l) => {
|
|
2426
|
+
this._animationSpeed = l.detail.value;
|
|
2427
|
+
const g = this.$(".anim-type-row");
|
|
2428
|
+
g && (g.style.display = this._animationSpeed > 0 ? "" : "none"), this._emitChange();
|
|
2411
2429
|
}));
|
|
2412
2430
|
const n = this.$(".anim-select");
|
|
2413
|
-
n && n.addEventListener("change", (
|
|
2414
|
-
this._animationType =
|
|
2431
|
+
n && n.addEventListener("change", (l) => {
|
|
2432
|
+
this._animationType = l.target.value, this._emitChange();
|
|
2415
2433
|
});
|
|
2416
2434
|
const o = this.$(".cancel-btn");
|
|
2417
2435
|
o && o.addEventListener("click", () => {
|
|
@@ -2426,17 +2444,17 @@ class ct extends w {
|
|
|
2426
2444
|
this._applyFromEditor(!0);
|
|
2427
2445
|
});
|
|
2428
2446
|
const a = this.$(".name-input");
|
|
2429
|
-
a && a.addEventListener("input", (
|
|
2430
|
-
this._editingName =
|
|
2447
|
+
a && a.addEventListener("input", (l) => {
|
|
2448
|
+
this._editingName = l.target.value.trim();
|
|
2431
2449
|
});
|
|
2432
|
-
const
|
|
2433
|
-
|
|
2434
|
-
this._editingGradient =
|
|
2435
|
-
}),
|
|
2436
|
-
this._editingGradient =
|
|
2450
|
+
const d = this.$(".modal-editor");
|
|
2451
|
+
d && (d.addEventListener("wox-gradient-input", (l) => {
|
|
2452
|
+
this._editingGradient = l.detail.gradient;
|
|
2453
|
+
}), d.addEventListener("wox-gradient-change", (l) => {
|
|
2454
|
+
this._editingGradient = l.detail.gradient;
|
|
2437
2455
|
}));
|
|
2438
|
-
const
|
|
2439
|
-
|
|
2456
|
+
const h = this.$(".editor-modal");
|
|
2457
|
+
h && h.addEventListener("wox-close", () => {
|
|
2440
2458
|
this._editingGradient = null, this._editingName = "";
|
|
2441
2459
|
});
|
|
2442
2460
|
});
|
|
@@ -2466,14 +2484,14 @@ class ct extends w {
|
|
|
2466
2484
|
<input type="color" class="solid-input" value="${n}">
|
|
2467
2485
|
</div>
|
|
2468
2486
|
`, this._gradients.forEach((o) => {
|
|
2469
|
-
const i =
|
|
2487
|
+
const i = C(o), r = o.id.startsWith("grad_preset_"), a = r ? `<button class="dropdown-item-btn" data-dup-id="${o.id}" title="Duplicate gradient">⎘</button>` : "", d = r ? "" : `<button class="dropdown-item-btn" data-edit-id="${o.id}" title="Edit gradient">✎</button>`, h = r ? "" : `<button class="dropdown-item-btn delete-btn" data-delete-id="${o.id}" title="Delete gradient">×</button>`;
|
|
2470
2488
|
e += `
|
|
2471
2489
|
<div class="dropdown-item" data-gradient-id="${o.id}">
|
|
2472
2490
|
<div class="dropdown-item-preview" style="background: ${i}"></div>
|
|
2473
2491
|
<span class="dropdown-item-label">${o.name}</span>
|
|
2474
2492
|
${a}
|
|
2475
|
-
${
|
|
2476
|
-
${
|
|
2493
|
+
${d}
|
|
2494
|
+
${h}
|
|
2477
2495
|
</div>
|
|
2478
2496
|
`;
|
|
2479
2497
|
}), e += `
|
|
@@ -2496,15 +2514,15 @@ class ct extends w {
|
|
|
2496
2514
|
i.addEventListener("click", (r) => {
|
|
2497
2515
|
if (r.target.hasAttribute("data-delete-id") || r.target.hasAttribute("data-edit-id") || r.target.hasAttribute("data-dup-id")) return;
|
|
2498
2516
|
const a = this._getById(i.dataset.gradientId);
|
|
2499
|
-
a && (this._gradient = JSON.parse(JSON.stringify(a)), this._value =
|
|
2517
|
+
a && (this._gradient = JSON.parse(JSON.stringify(a)), this._value = C(this._gradient), this._updatePreview(), this._syncControls(), this._emitChange(), this._closeDropdown());
|
|
2500
2518
|
});
|
|
2501
2519
|
}), t.querySelectorAll("[data-dup-id]").forEach((i) => {
|
|
2502
2520
|
i.addEventListener("click", (r) => {
|
|
2503
2521
|
r.stopPropagation();
|
|
2504
2522
|
const a = this._getById(i.dataset.dupId);
|
|
2505
2523
|
if (!a) return;
|
|
2506
|
-
const
|
|
2507
|
-
this._closeDropdown(), this._openEditorDialog(
|
|
2524
|
+
const d = { id: I(), name: a.name + " Copy", type: a.type, angle: a.angle, stops: a.stops.map((h) => ({ ...h })) };
|
|
2525
|
+
this._closeDropdown(), this._openEditorDialog(d);
|
|
2508
2526
|
});
|
|
2509
2527
|
}), t.querySelectorAll("[data-edit-id]").forEach((i) => {
|
|
2510
2528
|
i.addEventListener("click", (r) => {
|
|
@@ -2524,7 +2542,7 @@ class ct extends w {
|
|
|
2524
2542
|
});
|
|
2525
2543
|
s(this, "_openEditorDialog", (t) => {
|
|
2526
2544
|
let e;
|
|
2527
|
-
t ? e = JSON.parse(JSON.stringify(t)) : (e =
|
|
2545
|
+
t ? e = JSON.parse(JSON.stringify(t)) : (e = wt(this._value), e ? (e.id = e.id || I(), e.name = e.name || "Custom Gradient") : e = { id: I(), name: "Custom Gradient", type: "linear", angle: 90, stops: [{ color: this._value.startsWith("#") ? this._value : "#000000", position: 0 }, { color: "#ffffff", position: 100 }] }), this._editingGradient = JSON.parse(JSON.stringify(e)), this._editingName = e.name;
|
|
2528
2546
|
const n = this.$(".modal-editor");
|
|
2529
2547
|
n && (n.gradient = this._editingGradient);
|
|
2530
2548
|
const o = this.$(".name-input");
|
|
@@ -2535,14 +2553,14 @@ class ct extends w {
|
|
|
2535
2553
|
s(this, "_applyFromEditor", (t) => {
|
|
2536
2554
|
if (!this._editingGradient) return;
|
|
2537
2555
|
const e = JSON.parse(JSON.stringify(this._editingGradient));
|
|
2538
|
-
this._editingName && (e.name = this._editingName), e.id = this._editingOriginalId || e.id ||
|
|
2556
|
+
this._editingName && (e.name = this._editingName), e.id = this._editingOriginalId || e.id || I(), t && this._save(e), this._gradient = JSON.parse(JSON.stringify(e)), this._value = C(this._gradient), this._updatePreview(), this._syncControls(), this._emitChange(), this._closeModal();
|
|
2539
2557
|
});
|
|
2540
2558
|
s(this, "_closeModal", () => {
|
|
2541
2559
|
const t = this.$(".editor-modal");
|
|
2542
2560
|
t && t.removeAttribute("open"), this._editingGradient = null, this._editingName = "", this._editingOriginalId = null;
|
|
2543
2561
|
});
|
|
2544
2562
|
s(this, "_applyGradient", () => {
|
|
2545
|
-
this._gradient && (this._value =
|
|
2563
|
+
this._gradient && (this._value = C(this._gradient), this._updatePreview(), this._emitChange());
|
|
2546
2564
|
});
|
|
2547
2565
|
s(this, "_emitChange", () => {
|
|
2548
2566
|
this.emit("wox-gradient-change", { value: this._value, animationSpeed: this._animationSpeed, animationType: this._animationType });
|
|
@@ -2560,9 +2578,9 @@ class ct extends w {
|
|
|
2560
2578
|
this.isConnected && (this._syncFromAttributes(), this._updatePreview(), this._syncControls());
|
|
2561
2579
|
}
|
|
2562
2580
|
}
|
|
2563
|
-
s(
|
|
2564
|
-
const
|
|
2565
|
-
class
|
|
2581
|
+
s(ht, "observedAttributes", ["value", "animation-speed", "animation-type"]);
|
|
2582
|
+
const It = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], Ot = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
|
|
2583
|
+
class xt extends w {
|
|
2566
2584
|
constructor() {
|
|
2567
2585
|
super(...arguments);
|
|
2568
2586
|
s(this, "_currentDate", /* @__PURE__ */ new Date());
|
|
@@ -2576,14 +2594,14 @@ class pt extends w {
|
|
|
2576
2594
|
this._currentDate = new Date(t, this._currentDate.getMonth(), 1), this._render();
|
|
2577
2595
|
});
|
|
2578
2596
|
s(this, "_goToday", () => {
|
|
2579
|
-
const t = /* @__PURE__ */ new Date(), e =
|
|
2597
|
+
const t = /* @__PURE__ */ new Date(), e = mt(t);
|
|
2580
2598
|
this._currentDate = new Date(t.getFullYear(), t.getMonth(), 1), this.rangeMode ? this._selectedRange = { start: e, end: null } : (this._selectedDate = e, this.emit("wox-change", { date: e })), this._render();
|
|
2581
2599
|
});
|
|
2582
2600
|
s(this, "_handleDayClick", (t) => {
|
|
2583
2601
|
const e = t.dataset.date;
|
|
2584
2602
|
if (e) {
|
|
2585
2603
|
if (t.classList.contains("other-month")) {
|
|
2586
|
-
const n =
|
|
2604
|
+
const n = O(e);
|
|
2587
2605
|
this._currentDate = new Date(n.getFullYear(), n.getMonth(), 1);
|
|
2588
2606
|
}
|
|
2589
2607
|
this.rangeMode ? this._handleRangeSelection(e) : (this._selectedDate = e, this.emit("wox-change", { date: e }), this._render());
|
|
@@ -2609,21 +2627,21 @@ class pt extends w {
|
|
|
2609
2627
|
return e;
|
|
2610
2628
|
});
|
|
2611
2629
|
s(this, "_generateGrid", (t, e) => {
|
|
2612
|
-
const n = /* @__PURE__ */ new Date(), o =
|
|
2630
|
+
const n = /* @__PURE__ */ new Date(), o = mt(n), i = new Date(t, e, 1).getDay(), r = new Date(t, e + 1, 0).getDate();
|
|
2613
2631
|
let a = "";
|
|
2614
|
-
const
|
|
2632
|
+
const d = e === 0 ? t - 1 : t, h = e === 0 ? 11 : e - 1, l = new Date(d, h + 1, 0).getDate();
|
|
2615
2633
|
for (let b = i - 1; b >= 0; b--) {
|
|
2616
|
-
const
|
|
2617
|
-
a += `<div class="day-cell other-month" data-date="${
|
|
2634
|
+
const u = l - b;
|
|
2635
|
+
a += `<div class="day-cell other-month" data-date="${H(d, h, u)}">${u}</div>`;
|
|
2618
2636
|
}
|
|
2619
2637
|
for (let b = 1; b <= r; b++) {
|
|
2620
|
-
const
|
|
2621
|
-
let
|
|
2622
|
-
|
|
2638
|
+
const u = H(t, e, b);
|
|
2639
|
+
let v = "day-cell";
|
|
2640
|
+
u === o && (v += " today"), this.rangeMode ? this._selectedRange.start && u === this._selectedRange.start ? v += " range-start" : this._selectedRange.end && u === this._selectedRange.end ? v += " range-end" : Tt(u, this._selectedRange.start, this._selectedRange.end) && (v += " in-range") : this._selectedDate && u === this._selectedDate && (v += " selected"), a += `<div class="${v}" data-date="${u}">${b}</div>`;
|
|
2623
2641
|
}
|
|
2624
|
-
const
|
|
2625
|
-
for (let b = 1; b <=
|
|
2626
|
-
a += `<div class="day-cell other-month" data-date="${
|
|
2642
|
+
const g = 7 * Math.ceil((i + r) / 7), x = e === 11 ? t + 1 : t, f = e === 11 ? 0 : e + 1;
|
|
2643
|
+
for (let b = 1; b <= g - i - r; b++)
|
|
2644
|
+
a += `<div class="day-cell other-month" data-date="${H(x, f, b)}">${b}</div>`;
|
|
2627
2645
|
return a;
|
|
2628
2646
|
});
|
|
2629
2647
|
s(this, "_getModeHint", () => this.rangeMode ? this._selectedRange.start ? this._selectedRange.end ? `${this._selectedRange.start} → ${this._selectedRange.end}` : "Select end date" : "Select start date" : "Select a date");
|
|
@@ -2832,13 +2850,13 @@ class pt extends w {
|
|
|
2832
2850
|
<div class="header">
|
|
2833
2851
|
<button class="nav-btn" id="prev-month">‹</button>
|
|
2834
2852
|
<div class="month-year">
|
|
2835
|
-
${
|
|
2853
|
+
${It[e]}
|
|
2836
2854
|
<select class="year-select">${this._generateYearOptions(t)}</select>
|
|
2837
2855
|
</div>
|
|
2838
2856
|
<button class="nav-btn" id="next-month">›</button>
|
|
2839
2857
|
</div>
|
|
2840
2858
|
<div class="day-headers">
|
|
2841
|
-
${
|
|
2859
|
+
${Ot.map((n) => `<div class="day-header">${n}</div>`).join("")}
|
|
2842
2860
|
</div>
|
|
2843
2861
|
<div class="calendar-grid">
|
|
2844
2862
|
${this._generateGrid(t, e)}
|
|
@@ -2879,7 +2897,7 @@ class pt extends w {
|
|
|
2879
2897
|
if (t === "range-mode") this._selectedDate = null, this._selectedRange = { start: null, end: null };
|
|
2880
2898
|
else if (t === "value" && n !== null) {
|
|
2881
2899
|
this._selectedDate = n;
|
|
2882
|
-
const o =
|
|
2900
|
+
const o = O(n);
|
|
2883
2901
|
isNaN(o) || (this._currentDate = new Date(o.getFullYear(), o.getMonth(), 1));
|
|
2884
2902
|
} else t === "range-start" ? this._selectedRange.start = n : t === "range-end" && (this._selectedRange.end = n);
|
|
2885
2903
|
this._render();
|
|
@@ -2900,13 +2918,13 @@ class pt extends w {
|
|
|
2900
2918
|
setDate(t) {
|
|
2901
2919
|
if (this.rangeMode) return;
|
|
2902
2920
|
this._selectedDate = t;
|
|
2903
|
-
const e =
|
|
2921
|
+
const e = O(t);
|
|
2904
2922
|
isNaN(e) || (this._currentDate = new Date(e.getFullYear(), e.getMonth(), 1)), this._render();
|
|
2905
2923
|
}
|
|
2906
2924
|
setRange(t, e) {
|
|
2907
2925
|
if (!this.rangeMode) return;
|
|
2908
2926
|
this._selectedRange = { start: t, end: e };
|
|
2909
|
-
const n =
|
|
2927
|
+
const n = O(t);
|
|
2910
2928
|
this._currentDate = new Date(n.getFullYear(), n.getMonth(), 1), this._render();
|
|
2911
2929
|
}
|
|
2912
2930
|
getSelectedDate() {
|
|
@@ -2919,40 +2937,40 @@ class pt extends w {
|
|
|
2919
2937
|
this._selectedDate = null, this._selectedRange = { start: null, end: null }, this._render();
|
|
2920
2938
|
}
|
|
2921
2939
|
}
|
|
2922
|
-
s(
|
|
2923
|
-
const
|
|
2940
|
+
s(xt, "observedAttributes", ["range-mode", "value", "range-start", "range-end", "disabled"]);
|
|
2941
|
+
const mt = (p) => `${p.getFullYear()}-${String(p.getMonth() + 1).padStart(2, "0")}-${String(p.getDate()).padStart(2, "0")}`, O = (p) => {
|
|
2924
2942
|
const [c, t, e] = p.split("-").map(Number);
|
|
2925
2943
|
return new Date(c, t - 1, e);
|
|
2926
|
-
},
|
|
2944
|
+
}, H = (p, c, t) => `${p}-${String(c + 1).padStart(2, "0")}-${String(t).padStart(2, "0")}`, Tt = (p, c, t) => !(!c || !t) && p > c && p < t, j = "woxTheme", E = class E {
|
|
2927
2945
|
};
|
|
2928
|
-
s(
|
|
2946
|
+
s(E, "get", () => document.documentElement.dataset[j] === "light" ? "light" : "dark"), s(E, "set", (c) => {
|
|
2929
2947
|
if (c === "dark" || c === "light") {
|
|
2930
|
-
c === "light" ? document.documentElement.dataset[
|
|
2948
|
+
c === "light" ? document.documentElement.dataset[j] = "light" : delete document.documentElement.dataset[j];
|
|
2931
2949
|
try {
|
|
2932
2950
|
localStorage.setItem("wox-theme", c);
|
|
2933
2951
|
} catch {
|
|
2934
2952
|
}
|
|
2935
2953
|
document.documentElement.dispatchEvent(new CustomEvent("wox-theme-change", { detail: { theme: c }, bubbles: !0, composed: !0 }));
|
|
2936
2954
|
}
|
|
2937
|
-
}), s(
|
|
2938
|
-
|
|
2939
|
-
}), s(
|
|
2955
|
+
}), s(E, "toggle", () => {
|
|
2956
|
+
E.set(E.get() === "dark" ? "light" : "dark");
|
|
2957
|
+
}), s(E, "auto", () => {
|
|
2940
2958
|
try {
|
|
2941
2959
|
const t = localStorage.getItem("wox-theme");
|
|
2942
|
-
if (t === "dark" || t === "light") return void
|
|
2960
|
+
if (t === "dark" || t === "light") return void E.set(t);
|
|
2943
2961
|
} catch {
|
|
2944
2962
|
}
|
|
2945
2963
|
const c = window.matchMedia("(prefers-color-scheme: light)").matches;
|
|
2946
|
-
|
|
2964
|
+
E.set(c ? "light" : "dark");
|
|
2947
2965
|
});
|
|
2948
|
-
let
|
|
2949
|
-
class
|
|
2966
|
+
let M = E;
|
|
2967
|
+
class yt extends w {
|
|
2950
2968
|
constructor() {
|
|
2951
2969
|
super(...arguments);
|
|
2952
2970
|
s(this, "_onThemeChange", null);
|
|
2953
2971
|
}
|
|
2954
2972
|
connectedCallback() {
|
|
2955
|
-
this._render(), this.hasAttribute("auto") &&
|
|
2973
|
+
this._render(), this.hasAttribute("auto") && M.auto(), this._onThemeChange = () => this._updateIcon(), document.documentElement.addEventListener("wox-theme-change", this._onThemeChange), this._updateIcon();
|
|
2956
2974
|
}
|
|
2957
2975
|
disconnectedCallback() {
|
|
2958
2976
|
this._onThemeChange && (document.documentElement.removeEventListener("wox-theme-change", this._onThemeChange), this._onThemeChange = null);
|
|
@@ -2992,17 +3010,17 @@ class ft extends w {
|
|
|
2992
3010
|
-webkit-font-smoothing: antialiased;
|
|
2993
3011
|
text-rendering: optimizeLegibility;
|
|
2994
3012
|
}
|
|
2995
|
-
`, '<button type="button" title="Toggle theme"><span class="icon">light_mode</span></button>'), this.$("button").addEventListener("click", () =>
|
|
3013
|
+
`, '<button type="button" title="Toggle theme"><span class="icon">light_mode</span></button>'), this.$("button").addEventListener("click", () => M.toggle());
|
|
2996
3014
|
}
|
|
2997
3015
|
_updateIcon() {
|
|
2998
3016
|
const t = this.$(".icon");
|
|
2999
3017
|
if (!t) return;
|
|
3000
|
-
const e =
|
|
3018
|
+
const e = M.get() === "dark";
|
|
3001
3019
|
t.textContent = e ? "light_mode" : "dark_mode", this.$("button").title = e ? "Switch to light mode" : "Switch to dark mode";
|
|
3002
3020
|
}
|
|
3003
3021
|
}
|
|
3004
|
-
customElements.define("wox-icon",
|
|
3005
|
-
const
|
|
3022
|
+
customElements.define("wox-icon", G), customElements.define("wox-separator", Y), customElements.define("wox-badge", X), customElements.define("wox-button", q), customElements.define("wox-input", J), customElements.define("wox-select", K), customElements.define("wox-slider", V), customElements.define("wox-color-swatch", U), customElements.define("wox-tooltip", Q), customElements.define("wox-color-picker", Z), customElements.define("wox-menu-item", tt), customElements.define("wox-menu", et), customElements.define("wox-layer-item", nt), customElements.define("wox-section", ot), customElements.define("wox-tab", it), customElements.define("wox-tabs", st), customElements.define("wox-toolbar-group", rt), customElements.define("wox-toolbar", at), customElements.define("wox-panel", dt), customElements.define("wox-menubar", lt), customElements.define("wox-statusbar", ct), customElements.define("wox-modal", pt), customElements.define("wox-datagrid", ft), customElements.define("wox-toast", S), customElements.define("wox-context-menu", T), customElements.define("wox-gradient-editor", _t), customElements.define("wox-gradient-selector", ht), customElements.define("wox-date-picker", xt), customElements.define("wox-theme-toggle", yt);
|
|
3023
|
+
const Pt = `/* wox-theme.css — Global CSS custom properties for the WOX component library */
|
|
3006
3024
|
:root {
|
|
3007
3025
|
--wox-bg-app: #121214;
|
|
3008
3026
|
--wox-bg-panel: #17171a;
|
|
@@ -3088,41 +3106,41 @@ const Rt = `/* wox-theme.css — Global CSS custom properties for the WOX compon
|
|
|
3088
3106
|
(() => {
|
|
3089
3107
|
if (document.getElementById("wox-theme")) return;
|
|
3090
3108
|
const p = document.createElement("style");
|
|
3091
|
-
p.id = "wox-theme", p.textContent =
|
|
3092
|
-
})(), window.WoxIcon =
|
|
3109
|
+
p.id = "wox-theme", p.textContent = Pt, document.head.appendChild(p);
|
|
3110
|
+
})(), window.WoxIcon = G, window.WoxSeparator = Y, window.WoxBadge = X, window.WoxButton = q, window.WoxInput = J, window.WoxSelect = K, window.WoxSlider = V, window.WoxColorSwatch = U, window.WoxTooltip = Q, window.WoxColorPicker = Z, window.WoxMenuItem = tt, window.WoxMenu = et, window.WoxLayerItem = nt, window.WoxSection = ot, window.WoxTab = it, window.WoxTabs = st, window.WoxToolbarGroup = rt, window.WoxToolbar = at, window.WoxPanel = dt, window.WoxMenubar = lt, window.WoxStatusbar = ct, window.WoxModal = pt, window.WoxDatagrid = ft, window.WoxToast = S, window.WoxContextMenu = T, window.WoxGradientEditor = _t, window.WoxGradientSelector = ht, window.WoxDatePicker = xt, window.WoxThemeToggle = yt;
|
|
3093
3111
|
export {
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3112
|
+
D as FX_STYLES,
|
|
3113
|
+
X as WoxBadge,
|
|
3114
|
+
q as WoxButton,
|
|
3115
|
+
Z as WoxColorPicker,
|
|
3116
|
+
U as WoxColorSwatch,
|
|
3117
|
+
T as WoxContextMenu,
|
|
3118
|
+
ft as WoxDatagrid,
|
|
3119
|
+
xt as WoxDatePicker,
|
|
3102
3120
|
w as WoxElement,
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3121
|
+
_t as WoxGradientEditor,
|
|
3122
|
+
ht as WoxGradientSelector,
|
|
3123
|
+
G as WoxIcon,
|
|
3124
|
+
J as WoxInput,
|
|
3125
|
+
nt as WoxLayerItem,
|
|
3126
|
+
et as WoxMenu,
|
|
3127
|
+
tt as WoxMenuItem,
|
|
3128
|
+
lt as WoxMenubar,
|
|
3129
|
+
pt as WoxModal,
|
|
3130
|
+
dt as WoxPanel,
|
|
3131
|
+
ot as WoxSection,
|
|
3132
|
+
K as WoxSelect,
|
|
3133
|
+
Y as WoxSeparator,
|
|
3134
|
+
V as WoxSlider,
|
|
3135
|
+
ct as WoxStatusbar,
|
|
3136
|
+
it as WoxTab,
|
|
3137
|
+
st as WoxTabs,
|
|
3138
|
+
M as WoxTheme,
|
|
3139
|
+
yt as WoxThemeToggle,
|
|
3140
|
+
S as WoxToast,
|
|
3141
|
+
at as WoxToolbar,
|
|
3142
|
+
rt as WoxToolbarGroup,
|
|
3143
|
+
Q as WoxTooltip,
|
|
3144
|
+
wt as cssToGradient,
|
|
3145
|
+
C as gradientToCSS
|
|
3128
3146
|
};
|