@linkdesk/ui 0.1.0 → 0.1.2
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/button/Button.d.ts +13 -2
- package/dist/combobox/Combobox.d.ts +1 -1
- package/dist/hooks/useClickPreview.d.ts +33 -0
- package/dist/hooks/useClipboardKeys.d.ts +33 -0
- package/dist/hooks/useDebouncedInput.d.ts +18 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +7 -0
- package/dist/index.js +1484 -971
- package/dist/select-box/SelectBox.d.ts +1 -1
- package/dist/string-list-editor/StringListEditor.d.ts +44 -0
- package/dist/string-list-editor/urlSourceKey.d.ts +13 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,83 +1,87 @@
|
|
|
1
1
|
import "./index.css";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { useRef as
|
|
4
|
-
import
|
|
5
|
-
import { useTranslation as
|
|
6
|
-
function
|
|
7
|
-
return /* @__PURE__ */
|
|
2
|
+
import { jsx as u, jsxs as P, Fragment as Ve } from "react/jsx-runtime";
|
|
3
|
+
import { useRef as F, useEffect as z, useState as T, useCallback as W, useLayoutEffect as ce, useMemo as j, forwardRef as ie, useImperativeHandle as je, useContext as Oe, createContext as qe, createElement as re } from "react";
|
|
4
|
+
import Ue, { createPortal as ae } from "react-dom";
|
|
5
|
+
import { useTranslation as U } from "react-i18next";
|
|
6
|
+
function Gt({ children: e, title: t }) {
|
|
7
|
+
return /* @__PURE__ */ u("span", { className: "badge", title: t, children: e });
|
|
8
8
|
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
function Ge({ children: e, onClick: t, disabled: n, title: o, type: r = "button", variant: i }) {
|
|
10
|
+
const s = i ? `button button--${i}` : "button";
|
|
11
|
+
return /* @__PURE__ */ u("button", { type: r, className: s, onClick: t, disabled: n, title: o, children: e });
|
|
12
|
+
}
|
|
13
|
+
var G = {}, ue;
|
|
14
|
+
function Ze() {
|
|
15
|
+
if (ue) return G;
|
|
16
|
+
ue = 1;
|
|
17
|
+
var e = Ue;
|
|
14
18
|
if (process.env.NODE_ENV === "production")
|
|
15
|
-
|
|
19
|
+
G.createRoot = e.createRoot, G.hydrateRoot = e.hydrateRoot;
|
|
16
20
|
else {
|
|
17
|
-
var
|
|
18
|
-
|
|
19
|
-
|
|
21
|
+
var t = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
22
|
+
G.createRoot = function(n, o) {
|
|
23
|
+
t.usingClientEntryPoint = !0;
|
|
20
24
|
try {
|
|
21
|
-
return
|
|
25
|
+
return e.createRoot(n, o);
|
|
22
26
|
} finally {
|
|
23
|
-
|
|
27
|
+
t.usingClientEntryPoint = !1;
|
|
24
28
|
}
|
|
25
|
-
},
|
|
26
|
-
|
|
29
|
+
}, G.hydrateRoot = function(n, o, r) {
|
|
30
|
+
t.usingClientEntryPoint = !0;
|
|
27
31
|
try {
|
|
28
|
-
return
|
|
32
|
+
return e.hydrateRoot(n, o, r);
|
|
29
33
|
} finally {
|
|
30
|
-
|
|
34
|
+
t.usingClientEntryPoint = !1;
|
|
31
35
|
}
|
|
32
36
|
};
|
|
33
37
|
}
|
|
34
|
-
return
|
|
38
|
+
return G;
|
|
35
39
|
}
|
|
36
|
-
|
|
37
|
-
const
|
|
38
|
-
function
|
|
39
|
-
return document.getElementById(
|
|
40
|
+
Ze();
|
|
41
|
+
const Xe = "overlay-root", Ye = "ld-scrim-plane";
|
|
42
|
+
function ye() {
|
|
43
|
+
return document.getElementById(Ye) ?? document.body;
|
|
40
44
|
}
|
|
41
|
-
const
|
|
42
|
-
function
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
if (!s || !
|
|
46
|
-
const
|
|
47
|
-
var
|
|
48
|
-
const
|
|
49
|
-
!
|
|
45
|
+
const de = 'a[href],button:not([disabled]),input:not([disabled]),textarea:not([disabled]),select:not([disabled]),[tabindex]:not([tabindex="-1"])';
|
|
46
|
+
function le({ children: e, onClose: t, triggerRef: n, trapFocus: o, zIndex: r, rootId: i, open: s = !0 }) {
|
|
47
|
+
const a = F(null);
|
|
48
|
+
z(() => {
|
|
49
|
+
if (!s || !t) return;
|
|
50
|
+
const d = (h) => {
|
|
51
|
+
var c, y;
|
|
52
|
+
const x = h.target, p = (c = a.current) == null ? void 0 : c.contains(x), f = ((y = n == null ? void 0 : n.current) == null ? void 0 : y.contains(x)) ?? !1;
|
|
53
|
+
!p && !f && t();
|
|
50
54
|
};
|
|
51
|
-
return window.addEventListener("mousedown",
|
|
52
|
-
}, [s,
|
|
53
|
-
if (!s || !
|
|
54
|
-
const
|
|
55
|
-
|
|
55
|
+
return window.addEventListener("mousedown", d, !0), () => window.removeEventListener("mousedown", d, !0);
|
|
56
|
+
}, [s, t, n]), z(() => {
|
|
57
|
+
if (!s || !t) return;
|
|
58
|
+
const d = (h) => {
|
|
59
|
+
h.key === "Escape" && t();
|
|
56
60
|
};
|
|
57
|
-
return window.addEventListener("keydown",
|
|
58
|
-
}, [s,
|
|
61
|
+
return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
|
|
62
|
+
}, [s, t]), z(() => {
|
|
59
63
|
if (!s || !o) return;
|
|
60
|
-
const
|
|
61
|
-
if (!
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
const
|
|
65
|
-
if (
|
|
66
|
-
const
|
|
67
|
-
if (
|
|
68
|
-
|
|
64
|
+
const d = a.current;
|
|
65
|
+
if (!d) return;
|
|
66
|
+
const h = d.querySelector(de);
|
|
67
|
+
h ? h.focus() : (d.tabIndex = -1, d.focus());
|
|
68
|
+
const x = (p) => {
|
|
69
|
+
if (p.key !== "Tab") return;
|
|
70
|
+
const f = Array.from(d.querySelectorAll(de));
|
|
71
|
+
if (f.length === 0) {
|
|
72
|
+
p.preventDefault();
|
|
69
73
|
return;
|
|
70
74
|
}
|
|
71
|
-
const
|
|
72
|
-
|
|
75
|
+
const c = f[0], y = f[f.length - 1];
|
|
76
|
+
p.shiftKey && document.activeElement === c ? (p.preventDefault(), y.focus()) : !p.shiftKey && document.activeElement === y && (p.preventDefault(), c.focus());
|
|
73
77
|
};
|
|
74
|
-
return window.addEventListener("keydown",
|
|
78
|
+
return window.addEventListener("keydown", x), () => window.removeEventListener("keydown", x);
|
|
75
79
|
}, [s, o]);
|
|
76
|
-
const
|
|
80
|
+
const l = {
|
|
77
81
|
position: "relative",
|
|
78
82
|
...r ? { zIndex: r } : {}
|
|
79
83
|
};
|
|
80
|
-
return
|
|
84
|
+
return ae(
|
|
81
85
|
// E5.8#109:data-overlay-wrapper 结构标记——浮层权威的「隔离地板」(index.css)用它排除本包装盒。
|
|
82
86
|
// 包装盒是结构容器(ref/zIndex 载体)不是表面:若地板规则的深度 2 选择器给它的 backdrop-filter,
|
|
83
87
|
// 它就成了 backdrop root,把内部真实表面的 backdrop 采样掐断(E5.8#103 地板因此从未对
|
|
@@ -86,214 +90,214 @@ function ie({ children: t, onClose: n, triggerRef: e, trapFocus: o, zIndex: r, r
|
|
|
86
90
|
// 对外只算包装盒 z-auto(0),被 scrim 遮罩 z500 盖住 → 点在预期位置实中遮罩 onClose =「点一下自己退」。
|
|
87
91
|
// 故包装盒必须保持零 stacking-context 属性(backdrop-filter/filter/transform/z-index 均禁;
|
|
88
92
|
// zIndex 例外见 prop 契约——需 z-index 时必须 > scrim 遮罩 500)。
|
|
89
|
-
/* @__PURE__ */
|
|
93
|
+
/* @__PURE__ */ u("div", { ref: a, "data-overlay-wrapper": !0, style: Object.keys(l).length > 1 ? l : {}, children: e }),
|
|
90
94
|
// E5.8#107 单一门:默认 → #overlay-root(浮层权威 surface 根);显式 rootId 优先;根缺失回退 body
|
|
91
|
-
(
|
|
95
|
+
(i ? document.getElementById(i) : document.getElementById(Xe)) ?? document.body
|
|
92
96
|
);
|
|
93
97
|
}
|
|
94
|
-
const
|
|
95
|
-
function
|
|
96
|
-
const
|
|
97
|
-
|
|
98
|
+
const he = 232, fe = 224, me = 263, Je = 8;
|
|
99
|
+
function Q(e, t, n, o, r = Je) {
|
|
100
|
+
const i = Math.max(r, o.width - t - r), s = Math.max(r, o.height - n - r), a = Math.min(Math.max(
|
|
101
|
+
e.x + t + r <= o.width ? e.x : e.x - t - r,
|
|
98
102
|
r
|
|
99
|
-
),
|
|
100
|
-
|
|
103
|
+
), i), l = Math.min(Math.max(
|
|
104
|
+
e.y + n + r <= o.height ? e.y : e.y - n - r,
|
|
101
105
|
r
|
|
102
106
|
), s);
|
|
103
|
-
return { left:
|
|
107
|
+
return { left: a, top: l };
|
|
104
108
|
}
|
|
105
|
-
function
|
|
106
|
-
const
|
|
109
|
+
function Qe(e) {
|
|
110
|
+
const t = e.replace("#", "");
|
|
107
111
|
return [
|
|
108
|
-
parseInt(
|
|
109
|
-
parseInt(
|
|
110
|
-
parseInt(
|
|
112
|
+
parseInt(t.substring(0, 2), 16),
|
|
113
|
+
parseInt(t.substring(2, 4), 16),
|
|
114
|
+
parseInt(t.substring(4, 6), 16)
|
|
111
115
|
];
|
|
112
116
|
}
|
|
113
|
-
function
|
|
114
|
-
return "#" + [t, n
|
|
117
|
+
function et(e, t, n) {
|
|
118
|
+
return "#" + [e, t, n].map((o) => Math.max(0, Math.min(255, Math.round(o))).toString(16).padStart(2, "0")).join("");
|
|
115
119
|
}
|
|
116
|
-
function
|
|
117
|
-
const o =
|
|
118
|
-
let s = 0,
|
|
119
|
-
return
|
|
120
|
+
function tt(e, t, n) {
|
|
121
|
+
const o = n * t, r = o * (1 - Math.abs(e / 60 % 2 - 1)), i = n - o;
|
|
122
|
+
let s = 0, a = 0, l = 0;
|
|
123
|
+
return e < 60 ? (s = o, a = r) : e < 120 ? (s = r, a = o) : e < 180 ? (a = o, l = r) : e < 240 ? (a = r, l = o) : e < 300 ? (s = r, l = o) : (s = o, l = r), [Math.round((s + i) * 255), Math.round((a + i) * 255), Math.round((l + i) * 255)];
|
|
120
124
|
}
|
|
121
|
-
function
|
|
122
|
-
const o = Math.max(t, n
|
|
125
|
+
function nt(e, t, n) {
|
|
126
|
+
const o = Math.max(e, t, n) / 255, r = Math.min(e, t, n) / 255, i = o - r;
|
|
123
127
|
let s = 0;
|
|
124
|
-
|
|
125
|
-
const
|
|
126
|
-
return { h: s, s:
|
|
128
|
+
i > 0 && (o === e / 255 ? s = 60 * ((t / 255 - n / 255) / i % 6) : o === t / 255 ? s = 60 * ((n / 255 - e / 255) / i + 2) : s = 60 * ((e / 255 - t / 255) / i + 4)), s < 0 && (s += 360);
|
|
129
|
+
const a = o === 0 ? 0 : i / o;
|
|
130
|
+
return { h: s, s: a, v: o };
|
|
127
131
|
}
|
|
128
|
-
function
|
|
129
|
-
const [
|
|
130
|
-
return
|
|
132
|
+
function Y(e) {
|
|
133
|
+
const [t, n, o] = Qe(e);
|
|
134
|
+
return nt(t, n, o);
|
|
131
135
|
}
|
|
132
|
-
function
|
|
133
|
-
const [o, r,
|
|
134
|
-
return
|
|
136
|
+
function ee(e, t, n) {
|
|
137
|
+
const [o, r, i] = tt(e, t, n);
|
|
138
|
+
return et(o, r, i);
|
|
135
139
|
}
|
|
136
|
-
function
|
|
137
|
-
let
|
|
138
|
-
return
|
|
140
|
+
function ot(e) {
|
|
141
|
+
let t = e.replace(/[^0-9a-fA-F]/g, "").slice(0, 6);
|
|
142
|
+
return t.length > 0 && (t = "#" + t), t;
|
|
139
143
|
}
|
|
140
|
-
function
|
|
141
|
-
const [s,
|
|
142
|
-
|
|
143
|
-
if (
|
|
144
|
-
const
|
|
145
|
-
|
|
144
|
+
function Zt({ open: e, value: t, onChange: n, onClose: o, presets: r, anchor: i }) {
|
|
145
|
+
const [s, a] = T(() => Y(t)), [l, d] = T(t), h = F(null), x = F(null), p = F(null), f = F(null), c = F(s), [y, _] = T(null);
|
|
146
|
+
z(() => {
|
|
147
|
+
if (e) {
|
|
148
|
+
const k = Y(t);
|
|
149
|
+
c.current = k, a(k), d(t);
|
|
146
150
|
}
|
|
147
|
-
}, [
|
|
148
|
-
const
|
|
149
|
-
const
|
|
150
|
-
if (
|
|
151
|
-
const
|
|
152
|
-
return
|
|
151
|
+
}, [t, e]);
|
|
152
|
+
const E = W((k) => {
|
|
153
|
+
const D = ot(k);
|
|
154
|
+
if (d(D), /^#[0-9a-fA-F]{6}$/.test(D)) {
|
|
155
|
+
const B = Y(D);
|
|
156
|
+
return c.current = B, a(B), D;
|
|
153
157
|
}
|
|
154
158
|
return null;
|
|
155
|
-
}, []),
|
|
156
|
-
var
|
|
157
|
-
const
|
|
158
|
-
if (!
|
|
159
|
-
const
|
|
160
|
-
|
|
161
|
-
}, []),
|
|
162
|
-
var
|
|
163
|
-
const
|
|
164
|
-
if (!
|
|
165
|
-
const
|
|
166
|
-
|
|
159
|
+
}, []), C = W((k) => {
|
|
160
|
+
var A;
|
|
161
|
+
const D = (A = h.current) == null ? void 0 : A.getBoundingClientRect();
|
|
162
|
+
if (!D) return;
|
|
163
|
+
const B = Math.max(0, Math.min(1, (k.clientX - D.left) / D.width)), V = Math.max(0, Math.min(1, (k.clientY - D.top) / D.height)), g = { ...c.current, s: B, v: 1 - V };
|
|
164
|
+
c.current = g, a(g), d(ee(g.h, g.s, g.v));
|
|
165
|
+
}, []), I = W((k) => {
|
|
166
|
+
var g;
|
|
167
|
+
const D = (g = x.current) == null ? void 0 : g.getBoundingClientRect();
|
|
168
|
+
if (!D) return;
|
|
169
|
+
const B = Math.max(0, Math.min(1, (k.clientX - D.left) / D.width)), v = { ...c.current, h: B * 360 };
|
|
170
|
+
c.current = v, a(v), d(ee(v.h, v.s, v.v));
|
|
167
171
|
}, []);
|
|
168
|
-
if (
|
|
169
|
-
if (!
|
|
170
|
-
const
|
|
171
|
-
|
|
172
|
-
},
|
|
173
|
-
|
|
172
|
+
if (z(() => {
|
|
173
|
+
if (!e) return;
|
|
174
|
+
const k = () => {
|
|
175
|
+
f.current = null;
|
|
176
|
+
}, D = (B) => {
|
|
177
|
+
f.current === "sv" ? C(B) : f.current === "hue" && I(B);
|
|
174
178
|
};
|
|
175
|
-
return window.addEventListener("mouseup",
|
|
176
|
-
window.removeEventListener("mouseup",
|
|
179
|
+
return window.addEventListener("mouseup", k), window.addEventListener("mousemove", D), () => {
|
|
180
|
+
window.removeEventListener("mouseup", k), window.removeEventListener("mousemove", D);
|
|
177
181
|
};
|
|
178
|
-
}, [
|
|
179
|
-
if (!
|
|
180
|
-
|
|
182
|
+
}, [e, C, I]), ce(() => {
|
|
183
|
+
if (!e || !i) {
|
|
184
|
+
_(null);
|
|
181
185
|
return;
|
|
182
186
|
}
|
|
183
|
-
const
|
|
184
|
-
|
|
185
|
-
}, [
|
|
186
|
-
const
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
r != null && r.length ?
|
|
187
|
+
const k = p.current, D = { width: window.innerWidth, height: window.innerHeight }, B = k ? Q(i, k.offsetWidth, k.offsetHeight, D) : Q(i, he, r != null && r.length ? me : fe, D);
|
|
188
|
+
_((V) => V && V.left === B.left && V.top === B.top ? V : B);
|
|
189
|
+
}, [e, i, r]), !e) return null;
|
|
190
|
+
const w = ee(s.h, 1, 1), $ = `${Math.round(s.s * 100)}%`, M = `${Math.round((1 - s.v) * 100)}%`, b = `${Math.round(s.h / 360 * 100)}%`, N = i && !y ? Q(
|
|
191
|
+
i,
|
|
192
|
+
he,
|
|
193
|
+
r != null && r.length ? me : fe,
|
|
190
194
|
{ width: window.innerWidth, height: window.innerHeight }
|
|
191
|
-
) : null,
|
|
192
|
-
return /* @__PURE__ */
|
|
193
|
-
|
|
194
|
-
/* @__PURE__ */
|
|
195
|
+
) : null, m = y ?? N;
|
|
196
|
+
return /* @__PURE__ */ P(le, { onClose: o, children: [
|
|
197
|
+
ae(/* @__PURE__ */ u("div", { className: "colorpicker-overlay", onClick: () => o() }), ye()),
|
|
198
|
+
/* @__PURE__ */ P(
|
|
195
199
|
"div",
|
|
196
200
|
{
|
|
197
|
-
ref:
|
|
201
|
+
ref: p,
|
|
198
202
|
className: "colorpicker-panel",
|
|
199
|
-
style:
|
|
200
|
-
onClick: (
|
|
203
|
+
style: i && m ? { left: m.left, top: m.top } : void 0,
|
|
204
|
+
onClick: (k) => k.stopPropagation(),
|
|
201
205
|
children: [
|
|
202
|
-
/* @__PURE__ */
|
|
206
|
+
/* @__PURE__ */ P(
|
|
203
207
|
"div",
|
|
204
208
|
{
|
|
205
|
-
ref:
|
|
209
|
+
ref: h,
|
|
206
210
|
className: "colorpicker-sv",
|
|
207
|
-
style: { background:
|
|
208
|
-
onMouseDown: (
|
|
209
|
-
|
|
211
|
+
style: { background: w },
|
|
212
|
+
onMouseDown: (k) => {
|
|
213
|
+
f.current = "sv", C(k);
|
|
210
214
|
},
|
|
211
215
|
children: [
|
|
212
|
-
/* @__PURE__ */
|
|
213
|
-
/* @__PURE__ */
|
|
214
|
-
/* @__PURE__ */
|
|
216
|
+
/* @__PURE__ */ u("div", { className: "colorpicker-sv-white" }),
|
|
217
|
+
/* @__PURE__ */ u("div", { className: "colorpicker-sv-black" }),
|
|
218
|
+
/* @__PURE__ */ u("div", { className: "colorpicker-sv-cursor", style: { left: $, top: M } })
|
|
215
219
|
]
|
|
216
220
|
}
|
|
217
221
|
),
|
|
218
|
-
/* @__PURE__ */
|
|
222
|
+
/* @__PURE__ */ u(
|
|
219
223
|
"div",
|
|
220
224
|
{
|
|
221
|
-
ref:
|
|
225
|
+
ref: x,
|
|
222
226
|
className: "colorpicker-hue",
|
|
223
|
-
onMouseDown: (
|
|
224
|
-
|
|
227
|
+
onMouseDown: (k) => {
|
|
228
|
+
f.current = "hue", I(k);
|
|
225
229
|
},
|
|
226
|
-
children: /* @__PURE__ */
|
|
230
|
+
children: /* @__PURE__ */ u("div", { className: "colorpicker-hue-cursor", style: { left: b } })
|
|
227
231
|
}
|
|
228
232
|
),
|
|
229
|
-
/* @__PURE__ */
|
|
230
|
-
/* @__PURE__ */
|
|
231
|
-
/* @__PURE__ */
|
|
233
|
+
/* @__PURE__ */ P("div", { className: "colorpicker-footer", children: [
|
|
234
|
+
/* @__PURE__ */ u("div", { className: "colorpicker-preview", style: { background: l } }),
|
|
235
|
+
/* @__PURE__ */ u(
|
|
232
236
|
"input",
|
|
233
237
|
{
|
|
234
238
|
className: "colorpicker-hex",
|
|
235
239
|
type: "text",
|
|
236
|
-
value:
|
|
237
|
-
onChange: (
|
|
238
|
-
const
|
|
239
|
-
|
|
240
|
+
value: l,
|
|
241
|
+
onChange: (k) => {
|
|
242
|
+
const D = E(k.target.value);
|
|
243
|
+
D && n(D);
|
|
240
244
|
},
|
|
241
|
-
onKeyDown: (
|
|
242
|
-
if (
|
|
243
|
-
const
|
|
244
|
-
|
|
245
|
+
onKeyDown: (k) => {
|
|
246
|
+
if (k.key === "Enter") {
|
|
247
|
+
const D = E(l);
|
|
248
|
+
D && n(D);
|
|
245
249
|
}
|
|
246
250
|
},
|
|
247
251
|
spellCheck: !1
|
|
248
252
|
}
|
|
249
253
|
),
|
|
250
|
-
/* @__PURE__ */
|
|
251
|
-
|
|
254
|
+
/* @__PURE__ */ u("button", { className: "colorpicker-ok", onClick: () => {
|
|
255
|
+
n(l), o();
|
|
252
256
|
}, children: "OK" })
|
|
253
257
|
] }),
|
|
254
|
-
r && r.length > 0 && /* @__PURE__ */
|
|
258
|
+
r && r.length > 0 && /* @__PURE__ */ u("div", { className: "colorpicker-presets", children: r.map((k) => /* @__PURE__ */ u(
|
|
255
259
|
"div",
|
|
256
260
|
{
|
|
257
261
|
className: "colorpicker-preset",
|
|
258
|
-
style: { background:
|
|
259
|
-
title:
|
|
262
|
+
style: { background: k },
|
|
263
|
+
title: k,
|
|
260
264
|
onClick: () => {
|
|
261
|
-
const
|
|
262
|
-
|
|
265
|
+
const D = Y(k);
|
|
266
|
+
c.current = D, a(D), d(k), n(k);
|
|
263
267
|
}
|
|
264
268
|
},
|
|
265
|
-
|
|
269
|
+
k
|
|
266
270
|
)) })
|
|
267
271
|
]
|
|
268
272
|
}
|
|
269
273
|
)
|
|
270
274
|
] });
|
|
271
275
|
}
|
|
272
|
-
const
|
|
273
|
-
function
|
|
274
|
-
const [s,
|
|
275
|
-
var
|
|
276
|
-
const
|
|
277
|
-
if (!
|
|
278
|
-
const
|
|
279
|
-
left: Math.round(
|
|
280
|
-
top: Math.round(
|
|
281
|
-
width: Math.round(
|
|
282
|
-
maxWidth: Math.round(window.innerWidth -
|
|
276
|
+
const rt = { left: 0, top: 0, width: 100, maxWidth: 300 };
|
|
277
|
+
function ke({ containerRef: e, onClose: t, onKeyDown: n, listRef: o, search: r, children: i }) {
|
|
278
|
+
const [s, a] = T(rt), l = W(() => {
|
|
279
|
+
var x;
|
|
280
|
+
const d = (x = e.current) == null ? void 0 : x.getBoundingClientRect();
|
|
281
|
+
if (!d) return;
|
|
282
|
+
const h = {
|
|
283
|
+
left: Math.round(d.left),
|
|
284
|
+
top: Math.round(d.bottom) + 2,
|
|
285
|
+
width: Math.round(d.width),
|
|
286
|
+
maxWidth: Math.round(window.innerWidth - d.left - 24)
|
|
283
287
|
};
|
|
284
|
-
|
|
285
|
-
(
|
|
288
|
+
a(
|
|
289
|
+
(p) => p.left === h.left && p.top === h.top && p.width === h.width && p.maxWidth === h.maxWidth ? p : h
|
|
286
290
|
);
|
|
287
|
-
}, [
|
|
288
|
-
return
|
|
289
|
-
window.removeEventListener("resize",
|
|
290
|
-
}), [
|
|
291
|
-
|
|
292
|
-
}, [
|
|
291
|
+
}, [e]);
|
|
292
|
+
return ce(() => (l(), window.addEventListener("resize", l), window.addEventListener("scroll", l, !0), () => {
|
|
293
|
+
window.removeEventListener("resize", l), window.removeEventListener("scroll", l, !0);
|
|
294
|
+
}), [l]), z(() => {
|
|
295
|
+
e.current || l();
|
|
296
|
+
}, [e, l]), /* @__PURE__ */ u(le, { onClose: t, triggerRef: e, children: /* @__PURE__ */ P(
|
|
293
297
|
"div",
|
|
294
298
|
{
|
|
295
299
|
className: "selectbox-dropdown",
|
|
296
|
-
onKeyDown:
|
|
300
|
+
onKeyDown: n,
|
|
297
301
|
style: {
|
|
298
302
|
position: "fixed",
|
|
299
303
|
left: s.left,
|
|
@@ -304,107 +308,107 @@ function ve({ containerRef: t, onClose: n, onKeyDown: e, listRef: o, search: r,
|
|
|
304
308
|
},
|
|
305
309
|
children: [
|
|
306
310
|
r,
|
|
307
|
-
/* @__PURE__ */
|
|
311
|
+
/* @__PURE__ */ u("ul", { ref: o, className: "selectbox-list", tabIndex: -1, children: i })
|
|
308
312
|
]
|
|
309
313
|
}
|
|
310
314
|
) });
|
|
311
315
|
}
|
|
312
|
-
function
|
|
313
|
-
const { t:
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
}, [
|
|
317
|
-
const
|
|
318
|
-
if (!
|
|
319
|
-
const
|
|
320
|
-
return
|
|
321
|
-
}, [
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
}, [
|
|
325
|
-
if (!
|
|
326
|
-
|
|
327
|
-
const
|
|
328
|
-
|
|
329
|
-
}, [
|
|
330
|
-
if (!
|
|
331
|
-
const
|
|
332
|
-
|
|
333
|
-
}, [
|
|
334
|
-
const
|
|
335
|
-
(
|
|
336
|
-
const
|
|
337
|
-
|
|
316
|
+
function Xt({ value: e, options: t, onChange: n, disabled: o, placeholder: r, title: i, className: s, onOpen: a, inputMode: l = "text" }) {
|
|
317
|
+
const { t: d } = U(), [h, x] = T(!1), [p, f] = T(e), [c, y] = T(-1), _ = F(null), E = F(null), C = F(!1);
|
|
318
|
+
z(() => {
|
|
319
|
+
C.current || f(e);
|
|
320
|
+
}, [e]);
|
|
321
|
+
const I = p !== e, w = j(() => {
|
|
322
|
+
if (!I) return t;
|
|
323
|
+
const b = p.trim().toLowerCase();
|
|
324
|
+
return b ? t.filter((N) => N.toLowerCase().includes(b)) : t;
|
|
325
|
+
}, [t, p, I]);
|
|
326
|
+
z(() => {
|
|
327
|
+
c >= w.length && y(Math.max(0, w.length - 1));
|
|
328
|
+
}, [w.length, c]), z(() => {
|
|
329
|
+
if (!h) return;
|
|
330
|
+
a == null || a();
|
|
331
|
+
const b = w.findIndex((N) => N === e);
|
|
332
|
+
y(b >= 0 ? b : 0);
|
|
333
|
+
}, [h]), z(() => {
|
|
334
|
+
if (!h || !E.current) return;
|
|
335
|
+
const b = E.current.children[c];
|
|
336
|
+
b == null || b.scrollIntoView({ block: "nearest" });
|
|
337
|
+
}, [c, h]);
|
|
338
|
+
const $ = W(
|
|
339
|
+
(b) => {
|
|
340
|
+
const N = b.trim();
|
|
341
|
+
x(!1), N && (f(N), N !== e && n(N));
|
|
338
342
|
},
|
|
339
|
-
[
|
|
340
|
-
), M =
|
|
341
|
-
(
|
|
342
|
-
switch (
|
|
343
|
+
[e, n]
|
|
344
|
+
), M = W(
|
|
345
|
+
(b) => {
|
|
346
|
+
switch (b.key) {
|
|
343
347
|
case "ArrowDown":
|
|
344
|
-
|
|
348
|
+
b.preventDefault(), x(!0), y((N) => Math.min(N + 1, w.length - 1));
|
|
345
349
|
break;
|
|
346
350
|
case "ArrowUp":
|
|
347
|
-
|
|
351
|
+
b.preventDefault(), x(!0), y((N) => Math.max(N - 1, 0));
|
|
348
352
|
break;
|
|
349
353
|
case "Enter":
|
|
350
|
-
|
|
354
|
+
b.preventDefault(), h && w[c] ? $(w[c]) : $(p);
|
|
351
355
|
break;
|
|
352
356
|
case "Escape":
|
|
353
|
-
|
|
357
|
+
b.preventDefault(), f(e), x(!1);
|
|
354
358
|
break;
|
|
355
359
|
}
|
|
356
360
|
},
|
|
357
|
-
[
|
|
361
|
+
[h, w, c, $, p, e]
|
|
358
362
|
);
|
|
359
|
-
return /* @__PURE__ */
|
|
363
|
+
return /* @__PURE__ */ P(
|
|
360
364
|
"div",
|
|
361
365
|
{
|
|
362
|
-
className: `combobox ${
|
|
363
|
-
ref:
|
|
366
|
+
className: `combobox ${h ? "selectbox-open" : ""} ${o ? "selectbox-disabled" : ""} ${s ?? ""}`,
|
|
367
|
+
ref: _,
|
|
364
368
|
children: [
|
|
365
|
-
/* @__PURE__ */
|
|
366
|
-
/* @__PURE__ */
|
|
369
|
+
/* @__PURE__ */ P("div", { className: "combobox-field", children: [
|
|
370
|
+
/* @__PURE__ */ u(
|
|
367
371
|
"input",
|
|
368
372
|
{
|
|
369
373
|
type: "text",
|
|
370
|
-
inputMode:
|
|
374
|
+
inputMode: l,
|
|
371
375
|
className: "combobox-input",
|
|
372
|
-
value:
|
|
373
|
-
title:
|
|
374
|
-
"aria-label":
|
|
376
|
+
value: p,
|
|
377
|
+
title: i,
|
|
378
|
+
"aria-label": i,
|
|
375
379
|
placeholder: r,
|
|
376
380
|
disabled: o,
|
|
377
381
|
onFocus: () => {
|
|
378
|
-
|
|
382
|
+
C.current = !0, x(!0);
|
|
379
383
|
},
|
|
380
384
|
onBlur: () => {
|
|
381
|
-
|
|
385
|
+
C.current = !1, $(p);
|
|
382
386
|
},
|
|
383
|
-
onChange: (
|
|
384
|
-
|
|
387
|
+
onChange: (b) => {
|
|
388
|
+
f(b.target.value), x(!0), y(-1);
|
|
385
389
|
},
|
|
386
390
|
onKeyDown: M
|
|
387
391
|
}
|
|
388
392
|
),
|
|
389
|
-
/* @__PURE__ */
|
|
393
|
+
/* @__PURE__ */ u("span", { className: `codicon codicon-chevron-down selectbox-arrow ${h ? "selectbox-arrow-up" : ""}` })
|
|
390
394
|
] }),
|
|
391
|
-
|
|
392
|
-
|
|
395
|
+
h && /* @__PURE__ */ u(
|
|
396
|
+
ke,
|
|
393
397
|
{
|
|
394
|
-
containerRef:
|
|
395
|
-
onClose: () =>
|
|
396
|
-
listRef:
|
|
397
|
-
children:
|
|
398
|
+
containerRef: _,
|
|
399
|
+
onClose: () => x(!1),
|
|
400
|
+
listRef: E,
|
|
401
|
+
children: w.length === 0 ? /* @__PURE__ */ u("li", { className: "selectbox-empty", children: d("无匹配项") }) : w.map((b, N) => /* @__PURE__ */ u(
|
|
398
402
|
"li",
|
|
399
403
|
{
|
|
400
|
-
className: `selectbox-item ${
|
|
401
|
-
onMouseDown: (
|
|
402
|
-
|
|
404
|
+
className: `selectbox-item ${N === c ? "selectbox-item-focus" : ""} ${b === e ? "selectbox-item-selected" : ""}`,
|
|
405
|
+
onMouseDown: (m) => {
|
|
406
|
+
m.preventDefault(), $(b);
|
|
403
407
|
},
|
|
404
|
-
onMouseEnter: () =>
|
|
405
|
-
children:
|
|
408
|
+
onMouseEnter: () => y(N),
|
|
409
|
+
children: b
|
|
406
410
|
},
|
|
407
|
-
|
|
411
|
+
b
|
|
408
412
|
))
|
|
409
413
|
}
|
|
410
414
|
)
|
|
@@ -412,348 +416,348 @@ function Ct({ value: t, options: n, onChange: e, disabled: o, placeholder: r, ti
|
|
|
412
416
|
}
|
|
413
417
|
);
|
|
414
418
|
}
|
|
415
|
-
const
|
|
416
|
-
function
|
|
419
|
+
const J = 3e3;
|
|
420
|
+
function te() {
|
|
417
421
|
return window.linkdesk;
|
|
418
422
|
}
|
|
419
|
-
function
|
|
420
|
-
return
|
|
421
|
-
if (typeof
|
|
422
|
-
const o =
|
|
423
|
+
function ge(e, t) {
|
|
424
|
+
return e.map((n) => {
|
|
425
|
+
if (typeof n == "string") return { id: n, label: n, group: t };
|
|
426
|
+
const o = n.children && n.children.length > 0 ? ge(n.children, t) : void 0;
|
|
423
427
|
return {
|
|
424
|
-
id:
|
|
425
|
-
label:
|
|
426
|
-
group:
|
|
427
|
-
checked:
|
|
428
|
-
commandArgs:
|
|
428
|
+
id: n.command,
|
|
429
|
+
label: n.label ?? n.command,
|
|
430
|
+
group: t,
|
|
431
|
+
checked: n.checked,
|
|
432
|
+
commandArgs: n.commandArgs,
|
|
429
433
|
...o ? { children: o } : {}
|
|
430
434
|
};
|
|
431
435
|
});
|
|
432
436
|
}
|
|
433
|
-
function
|
|
434
|
-
const
|
|
435
|
-
|
|
436
|
-
var
|
|
437
|
-
let
|
|
438
|
-
return
|
|
439
|
-
|
|
440
|
-
}) : ((
|
|
441
|
-
!
|
|
437
|
+
function Yt({ menuId: e, anchor: t, context: n, onClose: o, resolveChildren: r, items: i, variant: s }) {
|
|
438
|
+
const a = F(null), l = F(/* @__PURE__ */ new Map()), d = F(null), [h, x] = T([]), p = j(() => JSON.stringify(n ?? {}), [n]);
|
|
439
|
+
z(() => {
|
|
440
|
+
var g, A;
|
|
441
|
+
let v = !1;
|
|
442
|
+
return i ? (x(i), () => {
|
|
443
|
+
v = !0;
|
|
444
|
+
}) : ((A = (g = te().menu) == null ? void 0 : g.getItems) == null || A.call(g, e, n).then((L) => {
|
|
445
|
+
!v && L && x(L);
|
|
442
446
|
}).catch(() => {
|
|
443
447
|
}), () => {
|
|
444
|
-
|
|
448
|
+
v = !0;
|
|
445
449
|
});
|
|
446
|
-
}, [
|
|
447
|
-
const
|
|
448
|
-
const
|
|
449
|
-
for (const
|
|
450
|
-
const
|
|
451
|
-
if (!
|
|
452
|
-
const
|
|
453
|
-
|
|
454
|
-
let
|
|
455
|
-
if (
|
|
456
|
-
|
|
457
|
-
else if (
|
|
458
|
-
const
|
|
459
|
-
|
|
450
|
+
}, [e, p, i]);
|
|
451
|
+
const f = j(() => {
|
|
452
|
+
const v = /* @__PURE__ */ new Map(), g = [];
|
|
453
|
+
for (const L of h) {
|
|
454
|
+
const R = L.children;
|
|
455
|
+
if (!L.command && !R) continue;
|
|
456
|
+
const S = L.group ?? "__default";
|
|
457
|
+
v.has(S) || (v.set(S, []), g.push(S));
|
|
458
|
+
let K;
|
|
459
|
+
if (R && R.length > 0)
|
|
460
|
+
K = ge(R, S);
|
|
461
|
+
else if (R && R.length === 0 && r) {
|
|
462
|
+
const O = r(L.command, n ?? {});
|
|
463
|
+
O && O.length > 0 && (K = O.map((X) => ({ id: X.id, label: X.label, group: S })));
|
|
460
464
|
}
|
|
461
|
-
|
|
462
|
-
id:
|
|
465
|
+
v.get(S).push({
|
|
466
|
+
id: L.command || L.label || "",
|
|
463
467
|
// E5.8#37.7.1:label 优先于命令 title——菜单项显式 label 是槽位显示文本(如 when 门控的
|
|
464
468
|
// 「移动到右侧/左侧」、面板视图清单的视图名);命令 title 只是无 label 时的兜底
|
|
465
469
|
// (修复 #37.6 侧栏换边菜单项被命令 title「切换侧栏位置」遮蔽的潜在 bug)。
|
|
466
|
-
label:
|
|
467
|
-
group:
|
|
468
|
-
shortcut:
|
|
469
|
-
checked:
|
|
470
|
-
commandArgs:
|
|
471
|
-
children:
|
|
470
|
+
label: L.label ?? L.title ?? L.command,
|
|
471
|
+
group: S,
|
|
472
|
+
shortcut: L.shortcut,
|
|
473
|
+
checked: L.checked,
|
|
474
|
+
commandArgs: L.commandArgs,
|
|
475
|
+
children: K
|
|
472
476
|
});
|
|
473
477
|
}
|
|
474
|
-
const
|
|
475
|
-
for (let
|
|
476
|
-
|
|
477
|
-
return
|
|
478
|
-
}, [
|
|
479
|
-
|
|
480
|
-
}, []),
|
|
481
|
-
|
|
482
|
-
}, []),
|
|
483
|
-
|
|
484
|
-
const
|
|
485
|
-
|
|
486
|
-
}, [
|
|
487
|
-
|
|
488
|
-
if (!
|
|
489
|
-
const
|
|
490
|
-
|
|
491
|
-
},
|
|
492
|
-
var
|
|
493
|
-
const
|
|
494
|
-
(((
|
|
478
|
+
const A = [];
|
|
479
|
+
for (let L = 0; L < g.length; L++)
|
|
480
|
+
L > 0 && A.push({ type: "divider", group: g[L] }), A.push(...v.get(g[L]));
|
|
481
|
+
return A;
|
|
482
|
+
}, [h, n, r]), [c, y] = T([]), _ = W(() => {
|
|
483
|
+
d.current && (clearTimeout(d.current), d.current = null);
|
|
484
|
+
}, []), E = W((v) => {
|
|
485
|
+
d.current && (clearTimeout(d.current), d.current = null), d.current = setTimeout(() => y((g) => g.slice(0, v)), 150);
|
|
486
|
+
}, []), C = W((v, g, A) => {
|
|
487
|
+
_();
|
|
488
|
+
const L = v.getBoundingClientRect(), R = 160, S = L.right + R > window.innerWidth ? L.left - R - 4 : L.right + 4;
|
|
489
|
+
y((K) => [...K.slice(0, A), { x: S, y: L.top, items: g }]);
|
|
490
|
+
}, [_]), [I, w] = T({ left: t.x, top: t.y }), [$, M] = T(!1), b = $;
|
|
491
|
+
z(() => {
|
|
492
|
+
if (!b) return;
|
|
493
|
+
const v = (R) => {
|
|
494
|
+
R.key === "Escape" && (c.length > 0 ? y((S) => S.slice(0, S.length - 1)) : o());
|
|
495
|
+
}, g = () => o(), A = () => o(), L = (R) => {
|
|
496
|
+
var O;
|
|
497
|
+
const S = R.target;
|
|
498
|
+
(((O = a.current) == null ? void 0 : O.contains(S)) ?? !1) || [...l.current.values()].some((X) => X.contains(S)) || o();
|
|
495
499
|
};
|
|
496
|
-
return window.addEventListener("keydown",
|
|
497
|
-
window.removeEventListener("keydown",
|
|
500
|
+
return window.addEventListener("keydown", v), window.addEventListener("blur", g), window.addEventListener("wheel", A, !0), s !== "embedded" && window.addEventListener("mousedown", L, !0), () => {
|
|
501
|
+
window.removeEventListener("keydown", v), window.removeEventListener("blur", g), window.removeEventListener("wheel", A, !0), s !== "embedded" && window.removeEventListener("mousedown", L, !0);
|
|
498
502
|
};
|
|
499
|
-
}, [o,
|
|
500
|
-
const [
|
|
501
|
-
|
|
502
|
-
if (!
|
|
503
|
-
const
|
|
504
|
-
var
|
|
505
|
-
if (
|
|
506
|
-
|
|
507
|
-
else if (
|
|
508
|
-
|
|
509
|
-
else if (
|
|
510
|
-
const
|
|
511
|
-
if ((
|
|
512
|
-
|
|
513
|
-
const
|
|
514
|
-
|
|
503
|
+
}, [o, c, b, s]);
|
|
504
|
+
const [N, m] = T(-1), k = F(/* @__PURE__ */ new Map()), D = j(() => f.filter((v) => !("type" in v)), [f]);
|
|
505
|
+
z(() => {
|
|
506
|
+
if (!b) return;
|
|
507
|
+
const v = (g) => {
|
|
508
|
+
var A, L, R;
|
|
509
|
+
if (g.key === "ArrowDown")
|
|
510
|
+
g.preventDefault(), m((S) => Math.min(S + 1, D.length - 1));
|
|
511
|
+
else if (g.key === "ArrowUp")
|
|
512
|
+
g.preventDefault(), m((S) => Math.max(S - 1, 0));
|
|
513
|
+
else if (g.key === "ArrowRight" && N >= 0) {
|
|
514
|
+
const S = D[N];
|
|
515
|
+
if ((A = S == null ? void 0 : S.children) != null && A.length) {
|
|
516
|
+
g.preventDefault();
|
|
517
|
+
const K = k.current.get(N);
|
|
518
|
+
K && C(K, S.children, 0);
|
|
515
519
|
}
|
|
516
|
-
} else if (
|
|
517
|
-
|
|
518
|
-
else if (
|
|
519
|
-
|
|
520
|
-
const
|
|
521
|
-
|
|
520
|
+
} else if (g.key === "ArrowLeft")
|
|
521
|
+
c.length > 0 && (g.preventDefault(), y((S) => S.slice(0, S.length - 1)));
|
|
522
|
+
else if (g.key === "Enter" && N >= 0) {
|
|
523
|
+
g.preventDefault();
|
|
524
|
+
const S = D[N];
|
|
525
|
+
S && ((R = (L = te().commands) == null ? void 0 : L.executeCommand) == null || R.call(L, S.id, void 0, ...S.commandArgs ?? [], n), o());
|
|
522
526
|
}
|
|
523
527
|
};
|
|
524
|
-
return window.addEventListener("keydown",
|
|
525
|
-
}, [
|
|
526
|
-
var
|
|
527
|
-
|
|
528
|
-
}, [
|
|
529
|
-
const
|
|
530
|
-
var
|
|
531
|
-
o(), await ((
|
|
532
|
-
}, [
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
}, [
|
|
536
|
-
const
|
|
537
|
-
if (!
|
|
538
|
-
const
|
|
539
|
-
let
|
|
540
|
-
|
|
541
|
-
const
|
|
542
|
-
M(!0),
|
|
528
|
+
return window.addEventListener("keydown", v), () => window.removeEventListener("keydown", v);
|
|
529
|
+
}, [D, N, n, o, b, c, C]), z(() => {
|
|
530
|
+
var v;
|
|
531
|
+
N >= 0 && ((v = k.current.get(N)) == null || v.scrollIntoView({ block: "nearest" }));
|
|
532
|
+
}, [N]);
|
|
533
|
+
const B = W(async (v) => {
|
|
534
|
+
var g, A;
|
|
535
|
+
o(), await ((A = (g = te().commands) == null ? void 0 : g.executeCommand) == null ? void 0 : A.call(g, v.id, void 0, ...v.commandArgs ?? [], n));
|
|
536
|
+
}, [n, o]);
|
|
537
|
+
ce(() => {
|
|
538
|
+
w({ left: t.x, top: Math.max(30, t.y) }), M(!1);
|
|
539
|
+
}, [t.x, t.y, f.length]), z(() => {
|
|
540
|
+
const v = a.current;
|
|
541
|
+
if (!v) return;
|
|
542
|
+
const g = v.getBoundingClientRect();
|
|
543
|
+
let A = t.x, L = Math.max(30, t.y);
|
|
544
|
+
A + g.width > window.innerWidth && (A = Math.max(0, window.innerWidth - g.width - 4)), L + g.height > window.innerHeight && (L = Math.max(30, window.innerHeight - g.height - 4)), w({ left: A, top: L });
|
|
545
|
+
const R = requestAnimationFrame(() => {
|
|
546
|
+
M(!0), v.classList.add("show");
|
|
543
547
|
});
|
|
544
|
-
return () => cancelAnimationFrame(
|
|
545
|
-
}, [
|
|
546
|
-
var
|
|
547
|
-
|
|
548
|
-
}, [
|
|
548
|
+
return () => cancelAnimationFrame(R);
|
|
549
|
+
}, [t.x, t.y, f.length]), z(() => {
|
|
550
|
+
var v;
|
|
551
|
+
$ && ((v = a.current) == null || v.focus());
|
|
552
|
+
}, [$]);
|
|
549
553
|
let V = 0;
|
|
550
|
-
return /* @__PURE__ */
|
|
551
|
-
s !== "embedded" && s !== "non-modal" &&
|
|
552
|
-
/* @__PURE__ */
|
|
554
|
+
return /* @__PURE__ */ P(le, { rootId: "context-menu-root", zIndex: String(J), children: [
|
|
555
|
+
s !== "embedded" && s !== "non-modal" && ae(
|
|
556
|
+
/* @__PURE__ */ u(
|
|
553
557
|
"div",
|
|
554
558
|
{
|
|
555
559
|
style: {
|
|
556
560
|
position: "fixed",
|
|
557
561
|
inset: 0,
|
|
558
|
-
zIndex:
|
|
562
|
+
zIndex: J - 1
|
|
559
563
|
}
|
|
560
564
|
}
|
|
561
565
|
),
|
|
562
|
-
|
|
566
|
+
ye()
|
|
563
567
|
),
|
|
564
|
-
/* @__PURE__ */
|
|
568
|
+
/* @__PURE__ */ u(
|
|
565
569
|
"div",
|
|
566
570
|
{
|
|
567
|
-
ref:
|
|
571
|
+
ref: a,
|
|
568
572
|
className: "ctx-menu",
|
|
569
573
|
tabIndex: -1,
|
|
570
574
|
style: {
|
|
571
|
-
left:
|
|
572
|
-
top:
|
|
573
|
-
zIndex:
|
|
574
|
-
visibility:
|
|
575
|
+
left: I.left,
|
|
576
|
+
top: I.top,
|
|
577
|
+
zIndex: J,
|
|
578
|
+
visibility: $ ? void 0 : "hidden"
|
|
575
579
|
},
|
|
576
|
-
children:
|
|
577
|
-
if ("type" in
|
|
578
|
-
const
|
|
580
|
+
children: f.map((v, g) => {
|
|
581
|
+
if ("type" in v) return /* @__PURE__ */ u("div", { className: "ctx-divider" }, `div-${g}`);
|
|
582
|
+
const A = V++, L = !!(v.children && v.children.length > 0), R = A === N, S = v.group === "delete";
|
|
579
583
|
return (
|
|
580
584
|
// E5.8#37.7.1:复合 key——共享命令 id 的动态项(面板视图清单全用同一 toggle 命令)会撞 key;
|
|
581
585
|
// 并入数组索引消歧(菜单项在菜单生命周期内静态,索引稳定)。
|
|
582
|
-
/* @__PURE__ */
|
|
586
|
+
/* @__PURE__ */ P(
|
|
583
587
|
"div",
|
|
584
588
|
{
|
|
585
|
-
ref: (
|
|
586
|
-
|
|
589
|
+
ref: (K) => {
|
|
590
|
+
K ? k.current.set(A, K) : k.current.delete(A);
|
|
587
591
|
},
|
|
588
|
-
className: `ctx-item${
|
|
589
|
-
onClick: (
|
|
590
|
-
|
|
592
|
+
className: `ctx-item${R ? " focused" : ""}${S ? " ctx-item-danger" : ""}`,
|
|
593
|
+
onClick: (K) => {
|
|
594
|
+
K.stopPropagation(), L || B(v);
|
|
591
595
|
},
|
|
592
|
-
onMouseEnter: (
|
|
593
|
-
|
|
596
|
+
onMouseEnter: (K) => {
|
|
597
|
+
m(A), L ? C(K.currentTarget, v.children, 0) : y((O) => O.slice(0, 0));
|
|
594
598
|
},
|
|
595
599
|
onMouseLeave: () => {
|
|
596
|
-
|
|
600
|
+
L && E(1);
|
|
597
601
|
},
|
|
598
602
|
children: [
|
|
599
|
-
/* @__PURE__ */
|
|
600
|
-
/* @__PURE__ */
|
|
601
|
-
|
|
602
|
-
|
|
603
|
+
/* @__PURE__ */ u("span", { className: "ctx-item-check", "aria-hidden": "true", children: v.checked ? "✓" : "" }),
|
|
604
|
+
/* @__PURE__ */ u("span", { className: "ctx-item-label", children: v.label }),
|
|
605
|
+
L && /* @__PURE__ */ u("span", { className: "ctx-item-chevron", children: "›" }),
|
|
606
|
+
v.shortcut && /* @__PURE__ */ u("span", { className: "ctx-item-shortcut", children: v.shortcut })
|
|
603
607
|
]
|
|
604
608
|
},
|
|
605
|
-
`${
|
|
609
|
+
`${v.id}::${g}`
|
|
606
610
|
)
|
|
607
611
|
);
|
|
608
612
|
})
|
|
609
613
|
}
|
|
610
614
|
),
|
|
611
|
-
|
|
615
|
+
c.map((v, g) => /* @__PURE__ */ u(
|
|
612
616
|
"div",
|
|
613
617
|
{
|
|
614
|
-
ref: (
|
|
615
|
-
|
|
618
|
+
ref: (A) => {
|
|
619
|
+
A ? l.current.set(g, A) : l.current.delete(g);
|
|
616
620
|
},
|
|
617
621
|
className: "ctx-menu show",
|
|
618
|
-
style: { left:
|
|
619
|
-
onMouseEnter:
|
|
620
|
-
onMouseLeave: () =>
|
|
621
|
-
children:
|
|
622
|
-
const
|
|
623
|
-
return /* @__PURE__ */
|
|
622
|
+
style: { left: v.x, top: v.y, zIndex: J },
|
|
623
|
+
onMouseEnter: _,
|
|
624
|
+
onMouseLeave: () => E(g + 1),
|
|
625
|
+
children: v.items.map((A, L) => {
|
|
626
|
+
const R = !!(A.children && A.children.length > 0);
|
|
627
|
+
return /* @__PURE__ */ P(
|
|
624
628
|
"div",
|
|
625
629
|
{
|
|
626
630
|
className: "ctx-item",
|
|
627
|
-
onClick: (
|
|
628
|
-
|
|
631
|
+
onClick: (S) => {
|
|
632
|
+
S.stopPropagation(), R || B(A);
|
|
629
633
|
},
|
|
630
|
-
onMouseEnter: (
|
|
631
|
-
|
|
634
|
+
onMouseEnter: (S) => {
|
|
635
|
+
R ? C(S.currentTarget, A.children, g + 1) : y((K) => K.slice(0, g + 1));
|
|
632
636
|
},
|
|
633
637
|
onMouseLeave: () => {
|
|
634
|
-
|
|
638
|
+
R && E(g + 2);
|
|
635
639
|
},
|
|
636
640
|
children: [
|
|
637
|
-
/* @__PURE__ */
|
|
638
|
-
/* @__PURE__ */
|
|
639
|
-
|
|
640
|
-
|
|
641
|
+
/* @__PURE__ */ u("span", { className: "ctx-item-check", "aria-hidden": "true", children: A.checked ? "✓" : "" }),
|
|
642
|
+
/* @__PURE__ */ u("span", { className: "ctx-item-label", children: A.label }),
|
|
643
|
+
R && /* @__PURE__ */ u("span", { className: "ctx-item-chevron", children: "›" }),
|
|
644
|
+
A.shortcut && /* @__PURE__ */ u("span", { className: "ctx-item-shortcut", children: A.shortcut })
|
|
641
645
|
]
|
|
642
646
|
},
|
|
643
|
-
`${
|
|
647
|
+
`${A.id}::${L}`
|
|
644
648
|
);
|
|
645
649
|
})
|
|
646
650
|
},
|
|
647
|
-
|
|
651
|
+
g
|
|
648
652
|
))
|
|
649
653
|
] });
|
|
650
654
|
}
|
|
651
|
-
function
|
|
652
|
-
return typeof
|
|
655
|
+
function st(e) {
|
|
656
|
+
return typeof e == "object" && "value" in e && "label" in e;
|
|
653
657
|
}
|
|
654
|
-
function
|
|
655
|
-
const { t:
|
|
656
|
-
() =>
|
|
657
|
-
[
|
|
658
|
-
),
|
|
659
|
-
if (!
|
|
660
|
-
const
|
|
661
|
-
return
|
|
662
|
-
}, [
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
}, [
|
|
666
|
-
var
|
|
667
|
-
if (!
|
|
668
|
-
|
|
658
|
+
function be({ value: e, options: t, onChange: n, disabled: o, placeholder: r, title: i, className: s, onOpen: a }) {
|
|
659
|
+
const { t: l } = U(), [d, h] = T(!1), [x, p] = T(""), [f, c] = T(-1), y = F(null), _ = F(null), E = F(null), C = j(
|
|
660
|
+
() => t.map((m) => st(m) ? m : { value: m, label: m }),
|
|
661
|
+
[t]
|
|
662
|
+
), I = j(() => {
|
|
663
|
+
if (!x) return C;
|
|
664
|
+
const m = x.toLowerCase();
|
|
665
|
+
return C.filter((k) => k.label.toLowerCase().includes(m));
|
|
666
|
+
}, [C, x]), w = j(() => C.find((m) => m.value === e), [C, e]), $ = j(() => w ? w.label : e !== "" ? e : r ?? e, [w, e, r]);
|
|
667
|
+
z(() => {
|
|
668
|
+
f >= I.length && c(Math.max(0, I.length - 1));
|
|
669
|
+
}, [I.length, f]), z(() => {
|
|
670
|
+
var k, D;
|
|
671
|
+
if (!d) {
|
|
672
|
+
p(""), c(-1);
|
|
669
673
|
return;
|
|
670
674
|
}
|
|
671
|
-
|
|
672
|
-
const
|
|
673
|
-
|
|
674
|
-
}, [
|
|
675
|
-
const M =
|
|
676
|
-
(
|
|
677
|
-
|
|
675
|
+
a == null || a();
|
|
676
|
+
const m = I.findIndex((B) => B.value === e);
|
|
677
|
+
c(m >= 0 ? m : 0), C.length > 8 ? (k = _.current) == null || k.focus() : (D = E.current) == null || D.focus();
|
|
678
|
+
}, [d]);
|
|
679
|
+
const M = W(
|
|
680
|
+
(m) => {
|
|
681
|
+
n(m), h(!1);
|
|
678
682
|
},
|
|
679
|
-
[
|
|
680
|
-
),
|
|
681
|
-
(
|
|
682
|
-
switch (
|
|
683
|
+
[n]
|
|
684
|
+
), b = W(
|
|
685
|
+
(m) => {
|
|
686
|
+
switch (m.key) {
|
|
683
687
|
case "ArrowDown":
|
|
684
|
-
|
|
688
|
+
m.preventDefault(), c((k) => Math.min(k + 1, I.length - 1));
|
|
685
689
|
break;
|
|
686
690
|
case "ArrowUp":
|
|
687
|
-
|
|
691
|
+
m.preventDefault(), c((k) => Math.max(k - 1, 0));
|
|
688
692
|
break;
|
|
689
693
|
case "Enter":
|
|
690
|
-
|
|
694
|
+
m.preventDefault(), I[f] && M(I[f].value);
|
|
691
695
|
break;
|
|
692
696
|
}
|
|
693
697
|
},
|
|
694
|
-
[
|
|
698
|
+
[I, f, M]
|
|
695
699
|
);
|
|
696
|
-
|
|
697
|
-
if (!
|
|
698
|
-
const
|
|
699
|
-
|
|
700
|
-
}, [
|
|
701
|
-
const
|
|
702
|
-
return /* @__PURE__ */
|
|
700
|
+
z(() => {
|
|
701
|
+
if (!d || !E.current) return;
|
|
702
|
+
const m = E.current.children[f];
|
|
703
|
+
m == null || m.scrollIntoView({ block: "nearest" });
|
|
704
|
+
}, [f, d]);
|
|
705
|
+
const N = C.length > 8;
|
|
706
|
+
return /* @__PURE__ */ P(
|
|
703
707
|
"div",
|
|
704
708
|
{
|
|
705
|
-
className: `selectbox ${
|
|
706
|
-
ref:
|
|
709
|
+
className: `selectbox ${d ? "selectbox-open" : ""} ${o ? "selectbox-disabled" : ""} ${s ?? ""}`,
|
|
710
|
+
ref: y,
|
|
707
711
|
children: [
|
|
708
|
-
/* @__PURE__ */
|
|
712
|
+
/* @__PURE__ */ P(
|
|
709
713
|
"button",
|
|
710
714
|
{
|
|
711
715
|
type: "button",
|
|
712
716
|
className: "selectbox-trigger",
|
|
713
717
|
disabled: o,
|
|
714
|
-
title:
|
|
715
|
-
onClick: () =>
|
|
718
|
+
title: i,
|
|
719
|
+
onClick: () => h((m) => !m),
|
|
716
720
|
children: [
|
|
717
|
-
/* @__PURE__ */
|
|
718
|
-
(
|
|
719
|
-
|
|
721
|
+
/* @__PURE__ */ P("span", { className: "selectbox-label", children: [
|
|
722
|
+
(w == null ? void 0 : w.preview) && /* @__PURE__ */ u("span", { className: "selectbox-swatch", style: { background: w.preview } }),
|
|
723
|
+
$
|
|
720
724
|
] }),
|
|
721
|
-
/* @__PURE__ */
|
|
725
|
+
/* @__PURE__ */ u("span", { className: `codicon codicon-chevron-down selectbox-arrow ${d ? "selectbox-arrow-up" : ""}` })
|
|
722
726
|
]
|
|
723
727
|
}
|
|
724
728
|
),
|
|
725
|
-
|
|
726
|
-
|
|
729
|
+
d && /* @__PURE__ */ u(
|
|
730
|
+
ke,
|
|
727
731
|
{
|
|
728
|
-
containerRef:
|
|
729
|
-
onClose: () =>
|
|
730
|
-
onKeyDown:
|
|
731
|
-
listRef:
|
|
732
|
-
search:
|
|
732
|
+
containerRef: y,
|
|
733
|
+
onClose: () => h(!1),
|
|
734
|
+
onKeyDown: b,
|
|
735
|
+
listRef: E,
|
|
736
|
+
search: N ? /* @__PURE__ */ u("div", { className: "selectbox-search", children: /* @__PURE__ */ u(
|
|
733
737
|
"input",
|
|
734
738
|
{
|
|
735
|
-
ref:
|
|
739
|
+
ref: _,
|
|
736
740
|
type: "text",
|
|
737
741
|
className: "selectbox-search-input",
|
|
738
|
-
placeholder:
|
|
739
|
-
value:
|
|
740
|
-
onChange: (
|
|
741
|
-
|
|
742
|
+
placeholder: l("筛选..."),
|
|
743
|
+
value: x,
|
|
744
|
+
onChange: (m) => {
|
|
745
|
+
p(m.target.value), c(0);
|
|
742
746
|
}
|
|
743
747
|
}
|
|
744
748
|
) }) : void 0,
|
|
745
|
-
children:
|
|
749
|
+
children: I.length === 0 ? /* @__PURE__ */ u("li", { className: "selectbox-empty", children: l("无匹配项") }) : I.map((m, k) => /* @__PURE__ */ P(
|
|
746
750
|
"li",
|
|
747
751
|
{
|
|
748
|
-
className: `selectbox-item ${
|
|
749
|
-
onClick: () => M(
|
|
750
|
-
onMouseEnter: () =>
|
|
752
|
+
className: `selectbox-item ${k === f ? "selectbox-item-focus" : ""} ${m.value === e ? "selectbox-item-selected" : ""}`,
|
|
753
|
+
onClick: () => M(m.value),
|
|
754
|
+
onMouseEnter: () => c(k),
|
|
751
755
|
children: [
|
|
752
|
-
|
|
753
|
-
|
|
756
|
+
m.preview && /* @__PURE__ */ u("span", { className: "selectbox-swatch", style: { background: m.preview } }),
|
|
757
|
+
m.label
|
|
754
758
|
]
|
|
755
759
|
},
|
|
756
|
-
|
|
760
|
+
m.value
|
|
757
761
|
))
|
|
758
762
|
}
|
|
759
763
|
)
|
|
@@ -761,125 +765,125 @@ function ge({ value: t, options: n, onChange: e, disabled: o, placeholder: r, ti
|
|
|
761
765
|
}
|
|
762
766
|
);
|
|
763
767
|
}
|
|
764
|
-
const
|
|
765
|
-
function
|
|
766
|
-
const { t:
|
|
767
|
-
|
|
768
|
-
var
|
|
769
|
-
if (!
|
|
770
|
-
let
|
|
771
|
-
(
|
|
772
|
-
|
|
768
|
+
const pe = "followTheme", ne = [];
|
|
769
|
+
function Jt({ value: e, onChange: t, optionsFrom: n, domain: o, disabled: r, placeholder: i, title: s }) {
|
|
770
|
+
const { t: a } = U(), [l, d] = T(ne), h = n === "theme.colorways" && o === "colors", [x, p] = T(void 0);
|
|
771
|
+
z(() => {
|
|
772
|
+
var E, C, I, w, $;
|
|
773
|
+
if (!h) return;
|
|
774
|
+
let y = !1;
|
|
775
|
+
(C = (E = window.linkdesk) == null ? void 0 : E.configuration) == null || C.get("app.appearanceMode").then((M) => {
|
|
776
|
+
y || p(M);
|
|
773
777
|
});
|
|
774
|
-
const
|
|
778
|
+
const _ = ($ = (w = (I = window.linkdesk) == null ? void 0 : I.configuration) == null ? void 0 : w.onChange) == null ? void 0 : $.call(w, "app.appearanceMode", (M) => p(M));
|
|
775
779
|
return () => {
|
|
776
|
-
|
|
780
|
+
y = !0, _ == null || _();
|
|
777
781
|
};
|
|
778
|
-
}, [
|
|
779
|
-
const
|
|
780
|
-
var
|
|
781
|
-
const
|
|
782
|
-
if (
|
|
782
|
+
}, [h]);
|
|
783
|
+
const f = h && x === "custom", c = W(async () => {
|
|
784
|
+
var _, E, C, I;
|
|
785
|
+
const y = (E = (_ = window.linkdesk) == null ? void 0 : _.theme) == null ? void 0 : E.listRecipes;
|
|
786
|
+
if (y)
|
|
783
787
|
try {
|
|
784
|
-
const
|
|
785
|
-
if (
|
|
788
|
+
const w = await y() ?? [];
|
|
789
|
+
if (n === "theme.sources" || f) {
|
|
786
790
|
if (o === "colors") {
|
|
787
|
-
|
|
788
|
-
{ value:
|
|
789
|
-
...
|
|
790
|
-
(
|
|
791
|
-
var
|
|
791
|
+
d([
|
|
792
|
+
{ value: pe, label: a("跟随主题") },
|
|
793
|
+
...w.flatMap(
|
|
794
|
+
(m) => m.colorways.map((k) => {
|
|
795
|
+
var D;
|
|
792
796
|
return {
|
|
793
|
-
value:
|
|
794
|
-
label: `${
|
|
795
|
-
preview: ((
|
|
797
|
+
value: k.id,
|
|
798
|
+
label: `${m.name}·${k.name}`,
|
|
799
|
+
preview: ((D = k.preview) == null ? void 0 : D.accent) || void 0
|
|
796
800
|
};
|
|
797
801
|
})
|
|
798
802
|
)
|
|
799
803
|
]);
|
|
800
804
|
return;
|
|
801
805
|
}
|
|
802
|
-
const
|
|
803
|
-
|
|
804
|
-
{ value:
|
|
805
|
-
...
|
|
806
|
+
const N = o ? w.filter((m) => m.domains.includes(o)) : w;
|
|
807
|
+
d([
|
|
808
|
+
{ value: pe, label: a("跟随主题") },
|
|
809
|
+
...N.map((m) => ({ value: m.id, label: m.name }))
|
|
806
810
|
]);
|
|
807
811
|
return;
|
|
808
812
|
}
|
|
809
|
-
const
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
var
|
|
813
|
-
return { value:
|
|
814
|
-
}) :
|
|
813
|
+
const $ = (I = (C = window.linkdesk) == null ? void 0 : C.configuration) == null ? void 0 : I.get, M = $ ? await $("app.theme") : "", b = w.find((N) => N.id === M);
|
|
814
|
+
d(
|
|
815
|
+
b ? b.colorways.map((N) => {
|
|
816
|
+
var m;
|
|
817
|
+
return { value: N.id, label: N.name, preview: ((m = N.preview) == null ? void 0 : m.accent) || void 0 };
|
|
818
|
+
}) : ne
|
|
815
819
|
);
|
|
816
820
|
} catch {
|
|
817
|
-
|
|
821
|
+
d(ne);
|
|
818
822
|
}
|
|
819
|
-
}, [
|
|
820
|
-
return
|
|
821
|
-
var
|
|
822
|
-
|
|
823
|
-
const
|
|
824
|
-
|
|
825
|
-
}),
|
|
826
|
-
|
|
823
|
+
}, [n, o, a, f]);
|
|
824
|
+
return z(() => {
|
|
825
|
+
var E, C, I, w, $, M;
|
|
826
|
+
c();
|
|
827
|
+
const y = (I = (C = (E = window.linkdesk) == null ? void 0 : E.configuration) == null ? void 0 : C.onPluginLifecycleChange) == null ? void 0 : I.call(C, () => {
|
|
828
|
+
c();
|
|
829
|
+
}), _ = n === "theme.colorways" ? (M = ($ = (w = window.linkdesk) == null ? void 0 : w.configuration) == null ? void 0 : $.onChange) == null ? void 0 : M.call($, "app.theme", () => {
|
|
830
|
+
c();
|
|
827
831
|
}) : void 0;
|
|
828
832
|
return () => {
|
|
829
|
-
|
|
833
|
+
y == null || y(), _ == null || _();
|
|
830
834
|
};
|
|
831
|
-
}, [
|
|
832
|
-
|
|
835
|
+
}, [c, n]), h && !f && l.length === 1 ? null : /* @__PURE__ */ u(
|
|
836
|
+
be,
|
|
833
837
|
{
|
|
834
|
-
value:
|
|
835
|
-
options:
|
|
836
|
-
onChange:
|
|
838
|
+
value: e,
|
|
839
|
+
options: l,
|
|
840
|
+
onChange: t,
|
|
837
841
|
disabled: r,
|
|
838
|
-
placeholder:
|
|
842
|
+
placeholder: i,
|
|
839
843
|
title: s,
|
|
840
844
|
onOpen: () => {
|
|
841
|
-
|
|
845
|
+
c();
|
|
842
846
|
}
|
|
843
847
|
}
|
|
844
848
|
);
|
|
845
849
|
}
|
|
846
|
-
function
|
|
847
|
-
const { t: o } =
|
|
848
|
-
var
|
|
849
|
-
const
|
|
850
|
-
if (!
|
|
851
|
-
const s =
|
|
850
|
+
function Qt({ value: e, onChange: t, dialogType: n }) {
|
|
851
|
+
const { t: o } = U(), r = async () => {
|
|
852
|
+
var a;
|
|
853
|
+
const i = (a = window.linkdesk) == null ? void 0 : a.dialog;
|
|
854
|
+
if (!i) return;
|
|
855
|
+
const s = n === "directory" ? { directory: !0 } : {
|
|
852
856
|
filters: [{ name: o("所有文件"), extensions: ["*"] }]
|
|
853
857
|
};
|
|
854
858
|
try {
|
|
855
|
-
const
|
|
856
|
-
|
|
859
|
+
const l = await i.open(s);
|
|
860
|
+
l && t(l);
|
|
857
861
|
} catch {
|
|
858
862
|
}
|
|
859
863
|
};
|
|
860
|
-
return /* @__PURE__ */
|
|
861
|
-
/* @__PURE__ */
|
|
864
|
+
return /* @__PURE__ */ P("div", { style: { display: "flex", gap: 4, alignItems: "center" }, children: [
|
|
865
|
+
/* @__PURE__ */ u(
|
|
862
866
|
"input",
|
|
863
867
|
{
|
|
864
868
|
className: "input",
|
|
865
869
|
type: "text",
|
|
866
|
-
value:
|
|
867
|
-
onChange: (
|
|
870
|
+
value: e,
|
|
871
|
+
onChange: (i) => t(i.target.value),
|
|
868
872
|
style: { flex: 1 },
|
|
869
|
-
placeholder: o(
|
|
873
|
+
placeholder: o(n === "directory" ? "选择目录…" : "选择文件…")
|
|
870
874
|
}
|
|
871
875
|
),
|
|
872
|
-
/* @__PURE__ */
|
|
873
|
-
|
|
876
|
+
/* @__PURE__ */ u(
|
|
877
|
+
Ge,
|
|
874
878
|
{
|
|
875
879
|
onClick: r,
|
|
876
|
-
title: o(
|
|
880
|
+
title: o(n === "directory" ? "浏览目录…" : "浏览文件…"),
|
|
877
881
|
children: "…"
|
|
878
882
|
}
|
|
879
883
|
)
|
|
880
884
|
] });
|
|
881
885
|
}
|
|
882
|
-
const
|
|
886
|
+
const ve = [
|
|
883
887
|
"Cascadia Code",
|
|
884
888
|
"Cascadia Mono",
|
|
885
889
|
"Consolas",
|
|
@@ -899,8 +903,8 @@ const be = [
|
|
|
899
903
|
"Noto Sans Mono",
|
|
900
904
|
"Source Code Pro",
|
|
901
905
|
"Ubuntu Mono"
|
|
902
|
-
],
|
|
903
|
-
...
|
|
906
|
+
], ct = [
|
|
907
|
+
...ve,
|
|
904
908
|
"Arial",
|
|
905
909
|
"Arial Narrow",
|
|
906
910
|
"Calibri",
|
|
@@ -921,709 +925,1218 @@ const be = [
|
|
|
921
925
|
"Trebuchet MS",
|
|
922
926
|
"Verdana"
|
|
923
927
|
];
|
|
924
|
-
function
|
|
928
|
+
function it(e) {
|
|
925
929
|
try {
|
|
926
|
-
const
|
|
927
|
-
if (!
|
|
928
|
-
|
|
929
|
-
const o =
|
|
930
|
+
const n = document.createElement("canvas").getContext("2d");
|
|
931
|
+
if (!n) return !1;
|
|
932
|
+
n.font = `16px "${e}"`;
|
|
933
|
+
const o = n.measureText("i").width, r = n.measureText("W").width;
|
|
930
934
|
return Math.abs(o - r) < 0.5;
|
|
931
935
|
} catch {
|
|
932
936
|
return !1;
|
|
933
937
|
}
|
|
934
938
|
}
|
|
935
|
-
function
|
|
936
|
-
const [
|
|
937
|
-
return
|
|
939
|
+
function at(e) {
|
|
940
|
+
const [t, n] = T([]);
|
|
941
|
+
return z(() => {
|
|
938
942
|
let o = !1;
|
|
939
943
|
async function r() {
|
|
940
|
-
var
|
|
941
|
-
let
|
|
944
|
+
var a;
|
|
945
|
+
let i = [];
|
|
942
946
|
if ("queryLocalFonts" in window)
|
|
943
947
|
try {
|
|
944
|
-
const
|
|
945
|
-
o || (
|
|
948
|
+
const l = await ((a = window.queryLocalFonts) == null ? void 0 : a.call(window));
|
|
949
|
+
o || (i = (l ?? []).map((d) => d.family).filter((d, h, x) => x.indexOf(d) === h));
|
|
946
950
|
} catch {
|
|
947
951
|
}
|
|
948
|
-
|
|
949
|
-
const s =
|
|
950
|
-
o ||
|
|
952
|
+
i.length === 0 && (i = e ? ve : ct);
|
|
953
|
+
const s = e ? i.filter((l) => it(l)) : i;
|
|
954
|
+
o || n(s.sort((l, d) => l.localeCompare(d)));
|
|
951
955
|
}
|
|
952
956
|
return r(), () => {
|
|
953
957
|
o = !0;
|
|
954
958
|
};
|
|
955
|
-
}, [
|
|
959
|
+
}, [e]), t;
|
|
956
960
|
}
|
|
957
|
-
function
|
|
958
|
-
const { t: o } =
|
|
961
|
+
function en({ value: e, onChange: t, monoOnly: n = !0 }) {
|
|
962
|
+
const { t: o } = U(), r = at(n), i = j(() => n ? r.map((s) => ({ value: s, label: s })) : [
|
|
959
963
|
{ value: "", label: o("跟随主题") },
|
|
960
964
|
{ value: "__none__", label: o("系统字体") },
|
|
961
965
|
...r.map((s) => ({ value: s, label: s }))
|
|
962
|
-
], [
|
|
963
|
-
return /* @__PURE__ */
|
|
964
|
-
|
|
966
|
+
], [n, r, o]);
|
|
967
|
+
return /* @__PURE__ */ u(
|
|
968
|
+
be,
|
|
965
969
|
{
|
|
966
|
-
value:
|
|
967
|
-
options:
|
|
968
|
-
onChange:
|
|
969
|
-
placeholder: o(
|
|
970
|
+
value: e,
|
|
971
|
+
options: i,
|
|
972
|
+
onChange: t,
|
|
973
|
+
placeholder: o(n ? "选择等宽字体…" : "跟随主题")
|
|
970
974
|
}
|
|
971
975
|
);
|
|
972
976
|
}
|
|
973
|
-
function
|
|
974
|
-
return /* @__PURE__ */
|
|
975
|
-
/* @__PURE__ */
|
|
976
|
-
|
|
977
|
+
function tn({ label: e, children: t }) {
|
|
978
|
+
return /* @__PURE__ */ P("div", { className: "form-row", children: [
|
|
979
|
+
/* @__PURE__ */ u("label", { children: e }),
|
|
980
|
+
t
|
|
977
981
|
] });
|
|
978
982
|
}
|
|
979
|
-
function
|
|
980
|
-
const { t:
|
|
981
|
-
(
|
|
982
|
-
let
|
|
983
|
-
return
|
|
983
|
+
function nn({ value: e, onChange: t, min: n, max: o, step: r = 1, unit: i, style: s }) {
|
|
984
|
+
const { t: a } = U(), l = W(
|
|
985
|
+
(f) => {
|
|
986
|
+
let c = f;
|
|
987
|
+
return n !== void 0 && (c = Math.max(n, c)), o !== void 0 && (c = Math.min(o, c)), c;
|
|
984
988
|
},
|
|
985
|
-
[
|
|
986
|
-
),
|
|
987
|
-
return /* @__PURE__ */
|
|
988
|
-
/* @__PURE__ */
|
|
989
|
+
[n, o]
|
|
990
|
+
), d = () => t(l(e - r)), h = () => t(l(e + r)), x = n !== void 0 && e <= n, p = o !== void 0 && e >= o;
|
|
991
|
+
return /* @__PURE__ */ P("div", { className: "number-input", style: s, children: [
|
|
992
|
+
/* @__PURE__ */ u(
|
|
989
993
|
"button",
|
|
990
994
|
{
|
|
991
995
|
className: "number-input-btn",
|
|
992
|
-
onClick:
|
|
993
|
-
disabled:
|
|
996
|
+
onClick: d,
|
|
997
|
+
disabled: x,
|
|
994
998
|
tabIndex: -1,
|
|
995
|
-
"aria-label":
|
|
999
|
+
"aria-label": a("减少"),
|
|
996
1000
|
children: "−"
|
|
997
1001
|
}
|
|
998
1002
|
),
|
|
999
|
-
/* @__PURE__ */
|
|
1003
|
+
/* @__PURE__ */ u(
|
|
1000
1004
|
"input",
|
|
1001
1005
|
{
|
|
1002
1006
|
className: "input number-input-field",
|
|
1003
1007
|
type: "text",
|
|
1004
|
-
value:
|
|
1005
|
-
onChange: (
|
|
1006
|
-
const
|
|
1007
|
-
isNaN(
|
|
1008
|
+
value: e,
|
|
1009
|
+
onChange: (f) => {
|
|
1010
|
+
const c = Number(f.target.value);
|
|
1011
|
+
isNaN(c) || t(l(c));
|
|
1008
1012
|
},
|
|
1009
1013
|
style: { width: 56, textAlign: "center" }
|
|
1010
1014
|
}
|
|
1011
1015
|
),
|
|
1012
|
-
|
|
1013
|
-
/* @__PURE__ */
|
|
1016
|
+
i ? /* @__PURE__ */ u("span", { className: "number-input-unit", children: i }) : null,
|
|
1017
|
+
/* @__PURE__ */ u(
|
|
1014
1018
|
"button",
|
|
1015
1019
|
{
|
|
1016
1020
|
className: "number-input-btn",
|
|
1017
|
-
onClick:
|
|
1018
|
-
disabled:
|
|
1021
|
+
onClick: h,
|
|
1022
|
+
disabled: p,
|
|
1019
1023
|
tabIndex: -1,
|
|
1020
|
-
"aria-label":
|
|
1024
|
+
"aria-label": a("增加"),
|
|
1021
1025
|
children: "+"
|
|
1022
1026
|
}
|
|
1023
1027
|
)
|
|
1024
1028
|
] });
|
|
1025
1029
|
}
|
|
1026
|
-
function
|
|
1027
|
-
const r =
|
|
1028
|
-
var
|
|
1030
|
+
function on({ options: e, value: t, onChange: n, ariaLabel: o }) {
|
|
1031
|
+
const r = F([]), i = (s, a) => {
|
|
1032
|
+
var h;
|
|
1029
1033
|
if (!["ArrowRight", "ArrowLeft", "ArrowUp", "ArrowDown"].includes(s.key)) return;
|
|
1030
1034
|
s.preventDefault();
|
|
1031
|
-
const
|
|
1032
|
-
(
|
|
1035
|
+
const l = s.key === "ArrowRight" || s.key === "ArrowDown" ? 1 : -1, d = (a + l + e.length) % e.length;
|
|
1036
|
+
(h = r.current[d]) == null || h.focus(), n(e[d].value);
|
|
1033
1037
|
};
|
|
1034
|
-
return /* @__PURE__ */
|
|
1035
|
-
const
|
|
1036
|
-
return /* @__PURE__ */
|
|
1038
|
+
return /* @__PURE__ */ u("div", { className: "segmented-radio", role: "radiogroup", "aria-label": o, children: e.map((s, a) => {
|
|
1039
|
+
const l = t === s.value;
|
|
1040
|
+
return /* @__PURE__ */ P(
|
|
1037
1041
|
"button",
|
|
1038
1042
|
{
|
|
1039
1043
|
type: "button",
|
|
1040
|
-
ref: (
|
|
1041
|
-
r.current[
|
|
1044
|
+
ref: (d) => {
|
|
1045
|
+
r.current[a] = d;
|
|
1042
1046
|
},
|
|
1043
1047
|
role: "radio",
|
|
1044
|
-
"aria-checked":
|
|
1045
|
-
tabIndex:
|
|
1046
|
-
className: `segmented-radio__option${
|
|
1048
|
+
"aria-checked": l,
|
|
1049
|
+
tabIndex: l ? 0 : -1,
|
|
1050
|
+
className: `segmented-radio__option${l ? " is-selected" : ""}`,
|
|
1047
1051
|
title: s.title ?? s.label,
|
|
1048
|
-
onClick: () =>
|
|
1049
|
-
onKeyDown: (
|
|
1052
|
+
onClick: () => n(s.value),
|
|
1053
|
+
onKeyDown: (d) => i(d, a),
|
|
1050
1054
|
children: [
|
|
1051
1055
|
s.preview,
|
|
1052
|
-
/* @__PURE__ */
|
|
1056
|
+
/* @__PURE__ */ u("span", { className: "segmented-radio__label", children: s.label })
|
|
1053
1057
|
]
|
|
1054
1058
|
},
|
|
1055
1059
|
s.value
|
|
1056
1060
|
);
|
|
1057
1061
|
}) });
|
|
1058
1062
|
}
|
|
1059
|
-
function
|
|
1060
|
-
const
|
|
1061
|
-
return /* @__PURE__ */
|
|
1063
|
+
function rn({ value: e, onChange: t, min: n = 0, max: o = 100, step: r = 1, ariaLabel: i, disabled: s, style: a }) {
|
|
1064
|
+
const l = (h) => Math.min(o, Math.max(n, h)), d = o > n ? (l(e) - n) / (o - n) * 100 : 0;
|
|
1065
|
+
return /* @__PURE__ */ u(
|
|
1062
1066
|
"input",
|
|
1063
1067
|
{
|
|
1064
1068
|
type: "range",
|
|
1065
1069
|
className: "slider",
|
|
1066
|
-
value:
|
|
1067
|
-
min:
|
|
1070
|
+
value: l(e),
|
|
1071
|
+
min: n,
|
|
1068
1072
|
max: o,
|
|
1069
1073
|
step: r,
|
|
1070
1074
|
disabled: s,
|
|
1071
|
-
"aria-label":
|
|
1072
|
-
onChange: (
|
|
1073
|
-
style: { ...
|
|
1075
|
+
"aria-label": i,
|
|
1076
|
+
onChange: (h) => t(Number(h.target.value)),
|
|
1077
|
+
style: { ...a, "--slider-pct": `${d}%` }
|
|
1074
1078
|
}
|
|
1075
1079
|
);
|
|
1076
1080
|
}
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1081
|
+
function sn({
|
|
1082
|
+
value: e,
|
|
1083
|
+
onChange: t,
|
|
1084
|
+
locked: n = [],
|
|
1085
|
+
lockedBadge: o,
|
|
1086
|
+
placeholder: r,
|
|
1087
|
+
addLabel: i,
|
|
1088
|
+
removeTitle: s,
|
|
1089
|
+
urlOnly: a,
|
|
1090
|
+
emptyMessage: l,
|
|
1091
|
+
badUrlMessage: d,
|
|
1092
|
+
duplicateMessage: h,
|
|
1093
|
+
itemKey: x,
|
|
1094
|
+
hint: p
|
|
1095
|
+
}) {
|
|
1096
|
+
const [f, c] = T(""), [y, _] = T(null), E = () => _(null), C = (w) => {
|
|
1097
|
+
const $ = (M) => {
|
|
1098
|
+
if (!x) return M === w;
|
|
1099
|
+
const b = x(w);
|
|
1100
|
+
return b === null ? M === w : x(M) === b;
|
|
1101
|
+
};
|
|
1102
|
+
return n.some($) || e.some($);
|
|
1103
|
+
}, I = () => {
|
|
1104
|
+
const w = f.trim();
|
|
1105
|
+
if (!w) {
|
|
1106
|
+
l && _(l);
|
|
1107
|
+
return;
|
|
1108
|
+
}
|
|
1109
|
+
if (a && !/^https?:\/\/.+/.test(w)) {
|
|
1110
|
+
d && _(d);
|
|
1111
|
+
return;
|
|
1112
|
+
}
|
|
1113
|
+
if (C(w)) {
|
|
1114
|
+
h && _(h);
|
|
1115
|
+
return;
|
|
1116
|
+
}
|
|
1117
|
+
t([...e, w]), c(""), E();
|
|
1118
|
+
};
|
|
1119
|
+
return /* @__PURE__ */ P("div", { className: "sle", children: [
|
|
1120
|
+
n.map((w) => /* @__PURE__ */ P("div", { className: "sle-row sle-row--locked", title: w, children: [
|
|
1121
|
+
a && /* @__PURE__ */ u("span", { className: "codicon codicon-link sle-glyph", "aria-hidden": "true" }),
|
|
1122
|
+
/* @__PURE__ */ u("span", { className: "sle-url", children: w }),
|
|
1123
|
+
o && /* @__PURE__ */ u("span", { className: "sle-badge", children: o }),
|
|
1124
|
+
/* @__PURE__ */ u("span", { className: "codicon codicon-lock sle-lock", "aria-hidden": "true" })
|
|
1125
|
+
] }, w)),
|
|
1126
|
+
e.map((w) => /* @__PURE__ */ P("div", { className: "sle-row", title: w, children: [
|
|
1127
|
+
a && /* @__PURE__ */ u("span", { className: "codicon codicon-link sle-glyph", "aria-hidden": "true" }),
|
|
1128
|
+
/* @__PURE__ */ u("span", { className: "sle-url", children: w }),
|
|
1129
|
+
/* @__PURE__ */ u(
|
|
1130
|
+
"button",
|
|
1131
|
+
{
|
|
1132
|
+
className: "sle-del",
|
|
1133
|
+
title: s,
|
|
1134
|
+
"aria-label": s,
|
|
1135
|
+
onClick: () => t(e.filter(($) => $ !== w)),
|
|
1136
|
+
children: /* @__PURE__ */ u("span", { className: "codicon codicon-trash", "aria-hidden": "true" })
|
|
1137
|
+
}
|
|
1138
|
+
)
|
|
1139
|
+
] }, w)),
|
|
1140
|
+
/* @__PURE__ */ P("div", { className: "sle-add-row", children: [
|
|
1141
|
+
/* @__PURE__ */ u(
|
|
1142
|
+
"input",
|
|
1143
|
+
{
|
|
1144
|
+
className: "sle-input",
|
|
1145
|
+
type: "text",
|
|
1146
|
+
value: f,
|
|
1147
|
+
placeholder: r,
|
|
1148
|
+
spellCheck: !1,
|
|
1149
|
+
onChange: (w) => {
|
|
1150
|
+
c(w.target.value), E();
|
|
1151
|
+
},
|
|
1152
|
+
onKeyDown: (w) => {
|
|
1153
|
+
w.key === "Enter" && I();
|
|
1154
|
+
}
|
|
1155
|
+
}
|
|
1156
|
+
),
|
|
1157
|
+
/* @__PURE__ */ u("button", { className: "sle-add-btn", type: "button", onClick: I, children: i })
|
|
1158
|
+
] }),
|
|
1159
|
+
y && /* @__PURE__ */ u("span", { className: "sle-msg sle-msg--error", children: y }),
|
|
1160
|
+
!y && p && /* @__PURE__ */ u("div", { className: "sle-msg sle-msg--hint", children: p })
|
|
1161
|
+
] });
|
|
1162
|
+
}
|
|
1163
|
+
const lt = 6, ut = "color-mix(in srgb, var(--text-secondary) 45%, transparent)";
|
|
1164
|
+
function cn({ value: e, onChange: t }) {
|
|
1165
|
+
const { t: n } = U(), [o, r] = T([]), [i, s] = T(0), a = F([]), l = W((h) => {
|
|
1166
|
+
var p, f;
|
|
1167
|
+
const x = (f = (p = window.linkdesk) == null ? void 0 : p.theme) == null ? void 0 : f.listRecipes;
|
|
1168
|
+
x && x().then((c) => {
|
|
1169
|
+
h && !h() || r(c ?? []);
|
|
1084
1170
|
}).catch(() => {
|
|
1085
1171
|
});
|
|
1086
1172
|
}, []);
|
|
1087
|
-
|
|
1088
|
-
var
|
|
1089
|
-
let
|
|
1090
|
-
|
|
1091
|
-
const
|
|
1092
|
-
|
|
1173
|
+
z(() => {
|
|
1174
|
+
var f, c, y;
|
|
1175
|
+
let h = !1;
|
|
1176
|
+
l(() => !h);
|
|
1177
|
+
const p = (y = (c = (f = window.linkdesk) == null ? void 0 : f.configuration) == null ? void 0 : c.onPluginLifecycleChange) == null ? void 0 : y.call(c, () => {
|
|
1178
|
+
l();
|
|
1093
1179
|
});
|
|
1094
1180
|
return () => {
|
|
1095
|
-
|
|
1181
|
+
h = !0, p == null || p();
|
|
1096
1182
|
};
|
|
1097
|
-
}, [
|
|
1098
|
-
const
|
|
1099
|
-
var
|
|
1100
|
-
const
|
|
1101
|
-
if (
|
|
1102
|
-
let
|
|
1103
|
-
switch (
|
|
1183
|
+
}, [l]);
|
|
1184
|
+
const d = (h) => {
|
|
1185
|
+
var f;
|
|
1186
|
+
const x = o.length;
|
|
1187
|
+
if (x === 0) return;
|
|
1188
|
+
let p = i;
|
|
1189
|
+
switch (h.key) {
|
|
1104
1190
|
case "ArrowRight":
|
|
1105
1191
|
case "ArrowDown":
|
|
1106
|
-
|
|
1192
|
+
p = Math.min(i + 1, x - 1);
|
|
1107
1193
|
break;
|
|
1108
1194
|
case "ArrowLeft":
|
|
1109
1195
|
case "ArrowUp":
|
|
1110
|
-
|
|
1196
|
+
p = Math.max(i - 1, 0);
|
|
1111
1197
|
break;
|
|
1112
1198
|
case "Home":
|
|
1113
|
-
|
|
1199
|
+
p = 0;
|
|
1114
1200
|
break;
|
|
1115
1201
|
case "End":
|
|
1116
|
-
|
|
1202
|
+
p = x - 1;
|
|
1117
1203
|
break;
|
|
1118
1204
|
default:
|
|
1119
1205
|
return;
|
|
1120
1206
|
}
|
|
1121
|
-
|
|
1207
|
+
h.preventDefault(), s(p), (f = a.current[p]) == null || f.focus();
|
|
1122
1208
|
};
|
|
1123
|
-
return o.length === 0 ? /* @__PURE__ */
|
|
1209
|
+
return o.length === 0 ? /* @__PURE__ */ u("span", { className: "theme-picker-empty", children: n("无可用主题配方") }) : /* @__PURE__ */ u(
|
|
1124
1210
|
"div",
|
|
1125
1211
|
{
|
|
1126
1212
|
className: "theme-picker",
|
|
1127
1213
|
role: "group",
|
|
1128
|
-
"aria-label":
|
|
1129
|
-
onKeyDown:
|
|
1130
|
-
children: o.map((
|
|
1131
|
-
var
|
|
1132
|
-
const
|
|
1133
|
-
return /* @__PURE__ */
|
|
1214
|
+
"aria-label": n("主题配方"),
|
|
1215
|
+
onKeyDown: d,
|
|
1216
|
+
children: o.map((h, x) => {
|
|
1217
|
+
var _, E;
|
|
1218
|
+
const p = h.colorways.length <= 1, f = (_ = h.colorways[0]) == null ? void 0 : _.preview, c = (f == null ? void 0 : f.accent) || ut, y = h.id === e;
|
|
1219
|
+
return /* @__PURE__ */ P(
|
|
1134
1220
|
"button",
|
|
1135
1221
|
{
|
|
1136
|
-
ref: (
|
|
1137
|
-
|
|
1222
|
+
ref: (C) => {
|
|
1223
|
+
a.current[x] = C;
|
|
1138
1224
|
},
|
|
1139
1225
|
type: "button",
|
|
1140
|
-
className: `theme-card${
|
|
1141
|
-
tabIndex:
|
|
1142
|
-
"aria-label":
|
|
1143
|
-
"aria-pressed":
|
|
1144
|
-
onClick: () =>
|
|
1145
|
-
onFocus: () => s(
|
|
1226
|
+
className: `theme-card${y ? " active" : ""}`,
|
|
1227
|
+
tabIndex: i === x ? 0 : -1,
|
|
1228
|
+
"aria-label": h.name,
|
|
1229
|
+
"aria-pressed": y,
|
|
1230
|
+
onClick: () => t(h.id),
|
|
1231
|
+
onFocus: () => s(x),
|
|
1146
1232
|
children: [
|
|
1147
|
-
/* @__PURE__ */
|
|
1233
|
+
/* @__PURE__ */ u("div", { className: "theme-preview", style: f != null && f.bgWindow ? { background: f.bgWindow } : void 0, children: p ? (
|
|
1148
1234
|
// 单配色配方——3 条强调色预览条(mockup .pv-bar)
|
|
1149
|
-
/* @__PURE__ */
|
|
1150
|
-
/* @__PURE__ */
|
|
1151
|
-
/* @__PURE__ */
|
|
1152
|
-
/* @__PURE__ */
|
|
1235
|
+
/* @__PURE__ */ P(Ve, { children: [
|
|
1236
|
+
/* @__PURE__ */ u("span", { className: "pv-bar", style: { background: c } }),
|
|
1237
|
+
/* @__PURE__ */ u("span", { className: "pv-bar", style: { background: c } }),
|
|
1238
|
+
/* @__PURE__ */ u("span", { className: "pv-bar", style: { background: c } })
|
|
1153
1239
|
] })
|
|
1154
1240
|
) : (
|
|
1155
1241
|
// 多配色配方——配色圆点色板(mockup .pv-dot)
|
|
1156
|
-
/* @__PURE__ */
|
|
1157
|
-
var
|
|
1158
|
-
return /* @__PURE__ */
|
|
1242
|
+
/* @__PURE__ */ u("span", { className: "pv-dots", children: h.colorways.slice(0, lt).map((C) => {
|
|
1243
|
+
var I;
|
|
1244
|
+
return /* @__PURE__ */ u(
|
|
1159
1245
|
"span",
|
|
1160
1246
|
{
|
|
1161
1247
|
className: "pv-dot",
|
|
1162
|
-
style: (
|
|
1248
|
+
style: (I = C.preview) != null && I.accent ? { background: C.preview.accent } : void 0
|
|
1163
1249
|
},
|
|
1164
|
-
|
|
1250
|
+
C.id
|
|
1165
1251
|
);
|
|
1166
1252
|
}) })
|
|
1167
1253
|
) }),
|
|
1168
|
-
/* @__PURE__ */
|
|
1169
|
-
/* @__PURE__ */
|
|
1170
|
-
/* @__PURE__ */
|
|
1254
|
+
/* @__PURE__ */ P("div", { className: "tname", children: [
|
|
1255
|
+
/* @__PURE__ */ u("span", { className: "tname-name", children: h.name }),
|
|
1256
|
+
/* @__PURE__ */ u("span", { className: "badge", children: p ? ((E = h.colorways[0]) == null ? void 0 : E.name) ?? "" : n("{{count}} 配色", { count: h.colorways.length }) })
|
|
1171
1257
|
] })
|
|
1172
1258
|
]
|
|
1173
1259
|
},
|
|
1174
|
-
|
|
1260
|
+
h.id
|
|
1175
1261
|
);
|
|
1176
1262
|
})
|
|
1177
1263
|
}
|
|
1178
1264
|
);
|
|
1179
1265
|
}
|
|
1180
|
-
function
|
|
1181
|
-
return /* @__PURE__ */
|
|
1266
|
+
function an({ checked: e, onChange: t, disabled: n }) {
|
|
1267
|
+
return /* @__PURE__ */ u(
|
|
1182
1268
|
"div",
|
|
1183
1269
|
{
|
|
1184
|
-
className: `toggle${
|
|
1270
|
+
className: `toggle${e ? " on" : ""}${n ? " disabled" : ""}`,
|
|
1185
1271
|
onClick: () => {
|
|
1186
|
-
|
|
1272
|
+
n || t(!e);
|
|
1187
1273
|
},
|
|
1188
1274
|
role: "switch",
|
|
1189
|
-
"aria-checked":
|
|
1275
|
+
"aria-checked": e
|
|
1190
1276
|
}
|
|
1191
1277
|
);
|
|
1192
1278
|
}
|
|
1193
|
-
function
|
|
1279
|
+
function Z() {
|
|
1194
1280
|
return window.linkdesk;
|
|
1195
1281
|
}
|
|
1196
|
-
const
|
|
1197
|
-
size:
|
|
1198
|
-
value:
|
|
1282
|
+
const ln = ie(function({
|
|
1283
|
+
size: t,
|
|
1284
|
+
value: n,
|
|
1199
1285
|
onConfirm: o,
|
|
1200
1286
|
onCancel: r,
|
|
1201
|
-
onChange:
|
|
1287
|
+
onChange: i,
|
|
1202
1288
|
selectMode: s = "all",
|
|
1203
|
-
width:
|
|
1204
|
-
autoFocus:
|
|
1205
|
-
placeholder:
|
|
1206
|
-
type:
|
|
1207
|
-
min:
|
|
1208
|
-
max:
|
|
1209
|
-
},
|
|
1210
|
-
const
|
|
1211
|
-
|
|
1212
|
-
getValue: () =>
|
|
1213
|
-
}), [
|
|
1214
|
-
if (!
|
|
1215
|
-
|
|
1216
|
-
if (
|
|
1289
|
+
width: a,
|
|
1290
|
+
autoFocus: l,
|
|
1291
|
+
placeholder: d,
|
|
1292
|
+
type: h = "text",
|
|
1293
|
+
min: x,
|
|
1294
|
+
max: p
|
|
1295
|
+
}, f) {
|
|
1296
|
+
const c = F(null), [y, _] = T(n), [E, C] = T(!0);
|
|
1297
|
+
je(f, () => ({
|
|
1298
|
+
getValue: () => y
|
|
1299
|
+
}), [y]), z(() => {
|
|
1300
|
+
if (!l || !c.current) return;
|
|
1301
|
+
c.current.focus(), requestAnimationFrame(() => {
|
|
1302
|
+
if (c.current)
|
|
1217
1303
|
if (s === "nameOnly") {
|
|
1218
|
-
const
|
|
1219
|
-
|
|
1304
|
+
const b = n.lastIndexOf(".");
|
|
1305
|
+
b > 0 ? c.current.setSelectionRange(0, b) : c.current.select();
|
|
1220
1306
|
} else
|
|
1221
|
-
|
|
1307
|
+
c.current.select();
|
|
1222
1308
|
});
|
|
1223
|
-
}, [
|
|
1224
|
-
var M,
|
|
1225
|
-
if (
|
|
1226
|
-
(
|
|
1227
|
-
const
|
|
1228
|
-
var
|
|
1229
|
-
(
|
|
1309
|
+
}, [l]), z(() => {
|
|
1310
|
+
var M, b;
|
|
1311
|
+
if (!E) {
|
|
1312
|
+
(b = (M = Z().contextKey) == null ? void 0 : M.set) == null || b.call(M, "inputFocus", !1);
|
|
1313
|
+
const N = requestAnimationFrame(() => {
|
|
1314
|
+
var m, k;
|
|
1315
|
+
(k = (m = Z().keybindings) == null ? void 0 : m.setKeybindingCaptureActive) == null || k.call(m, !1);
|
|
1230
1316
|
});
|
|
1231
|
-
return () => cancelAnimationFrame(
|
|
1317
|
+
return () => cancelAnimationFrame(N);
|
|
1232
1318
|
}
|
|
1233
|
-
}, [
|
|
1234
|
-
var M,
|
|
1235
|
-
(
|
|
1319
|
+
}, [E]), z(() => () => {
|
|
1320
|
+
var M, b, N, m;
|
|
1321
|
+
(b = (M = Z().contextKey) == null ? void 0 : M.set) == null || b.call(M, "inputFocus", !1), (m = (N = Z().keybindings) == null ? void 0 : N.setKeybindingCaptureActive) == null || m.call(N, !1);
|
|
1236
1322
|
}, []);
|
|
1237
|
-
const
|
|
1238
|
-
M.key === "Enter" ? (M.preventDefault(),
|
|
1239
|
-
},
|
|
1240
|
-
|
|
1241
|
-
},
|
|
1242
|
-
var M,
|
|
1243
|
-
(
|
|
1323
|
+
const I = (M) => {
|
|
1324
|
+
M.key === "Enter" ? (M.preventDefault(), C(!1), o(y)) : M.key === "Escape" && (M.preventDefault(), C(!1), r()), M.stopPropagation();
|
|
1325
|
+
}, w = () => {
|
|
1326
|
+
E && (C(!1), o(y));
|
|
1327
|
+
}, $ = () => {
|
|
1328
|
+
var M, b, N, m;
|
|
1329
|
+
(b = (M = Z().contextKey) == null ? void 0 : M.set) == null || b.call(M, "inputFocus", !0), (m = (N = Z().keybindings) == null ? void 0 : N.setKeybindingCaptureActive) == null || m.call(N, !0);
|
|
1244
1330
|
};
|
|
1245
|
-
return /* @__PURE__ */
|
|
1331
|
+
return /* @__PURE__ */ u(
|
|
1246
1332
|
"input",
|
|
1247
1333
|
{
|
|
1248
|
-
ref:
|
|
1249
|
-
className: `inline-input inline-input--${
|
|
1250
|
-
type:
|
|
1251
|
-
value:
|
|
1334
|
+
ref: c,
|
|
1335
|
+
className: `inline-input inline-input--${t}`,
|
|
1336
|
+
type: h,
|
|
1337
|
+
value: y,
|
|
1252
1338
|
onChange: (M) => {
|
|
1253
|
-
const
|
|
1254
|
-
|
|
1339
|
+
const b = h === "number" ? M.target.value.replace(/\D/g, "") : M.target.value;
|
|
1340
|
+
_(b), i == null || i(b);
|
|
1255
1341
|
},
|
|
1256
|
-
onKeyDown:
|
|
1257
|
-
onBlur:
|
|
1258
|
-
onFocus:
|
|
1342
|
+
onKeyDown: I,
|
|
1343
|
+
onBlur: w,
|
|
1344
|
+
onFocus: $,
|
|
1259
1345
|
onDragStart: (M) => M.preventDefault(),
|
|
1260
|
-
placeholder:
|
|
1261
|
-
min:
|
|
1262
|
-
max:
|
|
1263
|
-
style:
|
|
1346
|
+
placeholder: d,
|
|
1347
|
+
min: x,
|
|
1348
|
+
max: p,
|
|
1349
|
+
style: a ? { width: a } : void 0,
|
|
1264
1350
|
autoComplete: "off",
|
|
1265
1351
|
spellCheck: !1
|
|
1266
1352
|
}
|
|
1267
1353
|
);
|
|
1268
1354
|
});
|
|
1269
|
-
function
|
|
1270
|
-
const
|
|
1271
|
-
if (o === "lucide" &&
|
|
1272
|
-
return { lucide:
|
|
1273
|
-
if (o === "codicon" &&
|
|
1274
|
-
return { codicon: `codicon-${
|
|
1275
|
-
if (
|
|
1276
|
-
return { src:
|
|
1277
|
-
if (
|
|
1278
|
-
if (
|
|
1279
|
-
const r =
|
|
1280
|
-
return { src: `linkdesk://${
|
|
1355
|
+
function dt(e, t) {
|
|
1356
|
+
const n = t.icon, o = t.iconSource;
|
|
1357
|
+
if (o === "lucide" && n)
|
|
1358
|
+
return { lucide: n };
|
|
1359
|
+
if (o === "codicon" && n)
|
|
1360
|
+
return { codicon: `codicon-${n}` };
|
|
1361
|
+
if (n && (o === "svg" || o === "url"))
|
|
1362
|
+
return { src: n };
|
|
1363
|
+
if (n) {
|
|
1364
|
+
if (n.includes("/") || n.includes(".")) {
|
|
1365
|
+
const r = n.includes(".") ? n : `${n}.png`;
|
|
1366
|
+
return { src: `linkdesk://${e}/${r}` };
|
|
1281
1367
|
}
|
|
1282
|
-
return { codicon: `codicon-${
|
|
1368
|
+
return { codicon: `codicon-${n}` };
|
|
1283
1369
|
}
|
|
1284
1370
|
return { emoji: "📄" };
|
|
1285
1371
|
}
|
|
1286
1372
|
/**
|
|
1287
|
-
* @license lucide-react v1.
|
|
1373
|
+
* @license lucide-react v1.42.0 - ISC
|
|
1288
1374
|
*
|
|
1289
1375
|
* This source code is licensed under the ISC license.
|
|
1290
1376
|
* See the LICENSE file in the root directory of this source tree.
|
|
1291
1377
|
*/
|
|
1292
|
-
const
|
|
1378
|
+
const ht = (e) => e == null ? void 0 : e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
1293
1379
|
/**
|
|
1294
|
-
* @license lucide-react v1.
|
|
1380
|
+
* @license lucide-react v1.42.0 - ISC
|
|
1295
1381
|
*
|
|
1296
1382
|
* This source code is licensed under the ISC license.
|
|
1297
1383
|
* See the LICENSE file in the root directory of this source tree.
|
|
1298
1384
|
*/
|
|
1299
|
-
|
|
1385
|
+
function ft(e, t, n = []) {
|
|
1386
|
+
if (t == null)
|
|
1387
|
+
throw new Error("[lucide]: iconNode is required when icon name is used");
|
|
1388
|
+
return {
|
|
1389
|
+
name: ht(e),
|
|
1390
|
+
size: 24,
|
|
1391
|
+
node: t,
|
|
1392
|
+
...n.length > 0 ? { aliases: n } : {}
|
|
1393
|
+
};
|
|
1394
|
+
}
|
|
1300
1395
|
/**
|
|
1301
|
-
* @license lucide-react v1.
|
|
1396
|
+
* @license lucide-react v1.42.0 - ISC
|
|
1302
1397
|
*
|
|
1303
1398
|
* This source code is licensed under the ISC license.
|
|
1304
1399
|
* See the LICENSE file in the root directory of this source tree.
|
|
1305
1400
|
*/
|
|
1306
|
-
const
|
|
1307
|
-
|
|
1308
|
-
(
|
|
1309
|
-
)
|
|
1401
|
+
const mt = (e) => {
|
|
1402
|
+
let t = "", n = !1;
|
|
1403
|
+
for (const o of e) {
|
|
1404
|
+
if (o === "-" || o === "_" || o <= " ") {
|
|
1405
|
+
n = t.length > 0;
|
|
1406
|
+
continue;
|
|
1407
|
+
}
|
|
1408
|
+
t.length === 0 ? t += o.toLowerCase() : t += n ? o.toUpperCase() : o, n = !1;
|
|
1409
|
+
}
|
|
1410
|
+
return t;
|
|
1411
|
+
};
|
|
1310
1412
|
/**
|
|
1311
|
-
* @license lucide-react v1.
|
|
1413
|
+
* @license lucide-react v1.42.0 - ISC
|
|
1312
1414
|
*
|
|
1313
1415
|
* This source code is licensed under the ISC license.
|
|
1314
1416
|
* See the LICENSE file in the root directory of this source tree.
|
|
1315
1417
|
*/
|
|
1316
|
-
const
|
|
1317
|
-
const
|
|
1318
|
-
return
|
|
1418
|
+
const pt = (e) => {
|
|
1419
|
+
const t = mt(e);
|
|
1420
|
+
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
1319
1421
|
};
|
|
1320
1422
|
/**
|
|
1321
|
-
* @license lucide-react v1.
|
|
1423
|
+
* @license lucide-react v1.42.0 - ISC
|
|
1424
|
+
*
|
|
1425
|
+
* This source code is licensed under the ISC license.
|
|
1426
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1427
|
+
*/
|
|
1428
|
+
const se = (...e) => e.filter((t, n, o) => !!t && t.trim() !== "" && o.indexOf(t) === n).join(" ").trim();
|
|
1429
|
+
/**
|
|
1430
|
+
* @license lucide-react v1.42.0 - ISC
|
|
1322
1431
|
*
|
|
1323
1432
|
* This source code is licensed under the ISC license.
|
|
1324
1433
|
* See the LICENSE file in the root directory of this source tree.
|
|
1325
1434
|
*/
|
|
1326
|
-
|
|
1435
|
+
const q = {
|
|
1327
1436
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1328
1437
|
width: 24,
|
|
1329
1438
|
height: 24,
|
|
1330
1439
|
viewBox: "0 0 24 24",
|
|
1331
1440
|
fill: "none",
|
|
1332
1441
|
stroke: "currentColor",
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1442
|
+
"stroke-width": 2,
|
|
1443
|
+
"stroke-linecap": "round",
|
|
1444
|
+
"stroke-linejoin": "round"
|
|
1336
1445
|
};
|
|
1337
1446
|
/**
|
|
1338
|
-
* @license lucide-react v1.
|
|
1447
|
+
* @license lucide-react v1.42.0 - ISC
|
|
1339
1448
|
*
|
|
1340
1449
|
* This source code is licensed under the ISC license.
|
|
1341
1450
|
* See the LICENSE file in the root directory of this source tree.
|
|
1342
1451
|
*/
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1452
|
+
function oe(e) {
|
|
1453
|
+
return e != null;
|
|
1454
|
+
}
|
|
1455
|
+
function wt(e, t = {}) {
|
|
1456
|
+
var p, f;
|
|
1457
|
+
const n = t.attributeNames ?? {}, o = (c) => n[c] ?? c, r = e.size ?? e.width ?? q.width, i = e.size ?? e.height ?? q.height, s = ((p = e.aliases) == null ? void 0 : p.filter((c) => typeof c == "string" && c.trim() !== "").map((c) => `lucide-${c}`)) ?? [], a = [...e.name ? [`lucide-${e.name}`] : [], ...s], l = ((f = t.className) == null ? void 0 : f.split(" ").filter(Boolean)) ?? [], d = t.includeDefaultClasses === !1 ? se(...l) : se("lucide", ...a, ...l), h = t.absoluteStrokeWidth ? Number(t.strokeWidth ?? q["stroke-width"]) * Number(e.size ?? e.width ?? q.width) / Number(t.size ?? t.width ?? q.width) : t.strokeWidth ?? q["stroke-width"];
|
|
1458
|
+
return [
|
|
1459
|
+
"svg",
|
|
1460
|
+
{
|
|
1461
|
+
...Object.entries(q).reduce((c, [y, _]) => (c[o(y)] = _, c), {}),
|
|
1462
|
+
..."color" in t && t.color && {
|
|
1463
|
+
[o("stroke")]: t.color
|
|
1464
|
+
},
|
|
1465
|
+
..."size" in t && oe(t.size) && {
|
|
1466
|
+
[o("width")]: t.size,
|
|
1467
|
+
[o("height")]: t.size
|
|
1468
|
+
},
|
|
1469
|
+
..."width" in t && oe(t.width) && {
|
|
1470
|
+
[o("width")]: t.width
|
|
1471
|
+
},
|
|
1472
|
+
..."height" in t && oe(t.height) && {
|
|
1473
|
+
[o("height")]: t.height
|
|
1474
|
+
},
|
|
1475
|
+
[o("stroke-width")]: h,
|
|
1476
|
+
...d && {
|
|
1477
|
+
[o("class")]: d
|
|
1478
|
+
},
|
|
1479
|
+
[o("viewBox")]: `0 0 ${r} ${i}`,
|
|
1480
|
+
...t.hasA11yProp === !1 ? {
|
|
1481
|
+
[o("aria-hidden")]: "true"
|
|
1482
|
+
} : {},
|
|
1483
|
+
..."attributes" in t && t.attributes
|
|
1484
|
+
},
|
|
1485
|
+
e.node.map((c) => {
|
|
1486
|
+
const [y, _, E] = c, C = t.nonScalingStroke ? { [o("vector-effect")]: "non-scaling-stroke", ..._ } : _;
|
|
1487
|
+
return E ? [y, C, E] : [y, C];
|
|
1488
|
+
})
|
|
1489
|
+
];
|
|
1490
|
+
}
|
|
1491
|
+
/**
|
|
1492
|
+
* @license lucide-react v1.42.0 - ISC
|
|
1493
|
+
*
|
|
1494
|
+
* This source code is licensed under the ISC license.
|
|
1495
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1496
|
+
*/
|
|
1497
|
+
function yt(e, t = {}) {
|
|
1498
|
+
return wt(e, {
|
|
1499
|
+
...t,
|
|
1500
|
+
attributeNames: {
|
|
1501
|
+
...t.attributeNames,
|
|
1502
|
+
class: "className",
|
|
1503
|
+
"stroke-width": "strokeWidth",
|
|
1504
|
+
"stroke-linecap": "strokeLinecap",
|
|
1505
|
+
"stroke-linejoin": "strokeLinejoin",
|
|
1506
|
+
"vector-effect": "vectorEffect"
|
|
1507
|
+
}
|
|
1508
|
+
});
|
|
1509
|
+
}
|
|
1510
|
+
/**
|
|
1511
|
+
* @license lucide-react v1.42.0 - ISC
|
|
1512
|
+
*
|
|
1513
|
+
* This source code is licensed under the ISC license.
|
|
1514
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1515
|
+
*/
|
|
1516
|
+
const kt = (e) => {
|
|
1517
|
+
for (const t in e)
|
|
1518
|
+
if (t.startsWith("aria-") || t === "role" || t === "title")
|
|
1346
1519
|
return !0;
|
|
1347
1520
|
return !1;
|
|
1348
|
-
},
|
|
1349
|
-
({
|
|
1521
|
+
}, gt = qe({}), bt = () => Oe(gt), vt = ie(
|
|
1522
|
+
({
|
|
1523
|
+
color: e,
|
|
1524
|
+
size: t,
|
|
1525
|
+
width: n,
|
|
1526
|
+
height: o,
|
|
1527
|
+
strokeWidth: r,
|
|
1528
|
+
absoluteStrokeWidth: i,
|
|
1529
|
+
nonScalingStroke: s,
|
|
1530
|
+
className: a = "",
|
|
1531
|
+
children: l,
|
|
1532
|
+
iconNode: d = [],
|
|
1533
|
+
icon: h = {
|
|
1534
|
+
node: d,
|
|
1535
|
+
aliases: [],
|
|
1536
|
+
size: 24
|
|
1537
|
+
},
|
|
1538
|
+
...x
|
|
1539
|
+
}, p) => {
|
|
1350
1540
|
const {
|
|
1351
|
-
size:
|
|
1352
|
-
strokeWidth:
|
|
1353
|
-
absoluteStrokeWidth:
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1541
|
+
size: f = 24,
|
|
1542
|
+
strokeWidth: c = 2,
|
|
1543
|
+
absoluteStrokeWidth: y = !1,
|
|
1544
|
+
nonScalingStroke: _ = !1,
|
|
1545
|
+
color: E = "currentColor",
|
|
1546
|
+
className: C = ""
|
|
1547
|
+
} = bt() ?? {}, I = !!l || kt(x), [w, $, M = []] = yt(h, {
|
|
1548
|
+
color: e ?? E,
|
|
1549
|
+
width: n ?? t ?? f,
|
|
1550
|
+
height: o ?? t ?? f,
|
|
1551
|
+
strokeWidth: r ?? c,
|
|
1552
|
+
absoluteStrokeWidth: i ?? y,
|
|
1553
|
+
nonScalingStroke: s ?? _,
|
|
1554
|
+
className: se(C, a),
|
|
1555
|
+
hasA11yProp: I,
|
|
1556
|
+
attributes: x
|
|
1557
|
+
});
|
|
1558
|
+
return re(
|
|
1559
|
+
w,
|
|
1359
1560
|
{
|
|
1360
|
-
ref:
|
|
1361
|
-
|
|
1362
|
-
width: n ?? l ?? ne.width,
|
|
1363
|
-
height: n ?? l ?? ne.height,
|
|
1364
|
-
stroke: t ?? v,
|
|
1365
|
-
strokeWidth: a,
|
|
1366
|
-
className: ke("lucide", m, r),
|
|
1367
|
-
...!c && !qe(h) && { "aria-hidden": "true" },
|
|
1368
|
-
...h
|
|
1561
|
+
ref: p,
|
|
1562
|
+
...$
|
|
1369
1563
|
},
|
|
1370
1564
|
[
|
|
1371
|
-
...
|
|
1372
|
-
...Array.isArray(
|
|
1565
|
+
...M.map(([b, N]) => re(b, N)),
|
|
1566
|
+
...Array.isArray(l) ? l : [l]
|
|
1373
1567
|
]
|
|
1374
1568
|
);
|
|
1375
1569
|
}
|
|
1376
1570
|
);
|
|
1377
1571
|
/**
|
|
1378
|
-
* @license lucide-react v1.
|
|
1572
|
+
* @license lucide-react v1.42.0 - ISC
|
|
1379
1573
|
*
|
|
1380
1574
|
* This source code is licensed under the ISC license.
|
|
1381
1575
|
* See the LICENSE file in the root directory of this source tree.
|
|
1382
1576
|
*/
|
|
1383
|
-
|
|
1384
|
-
const e =
|
|
1385
|
-
({ className:
|
|
1386
|
-
ref:
|
|
1387
|
-
|
|
1388
|
-
className:
|
|
1389
|
-
|
|
1390
|
-
`lucide-${t}`,
|
|
1391
|
-
o
|
|
1392
|
-
),
|
|
1393
|
-
...r
|
|
1577
|
+
function H(e, t = [], n = []) {
|
|
1578
|
+
const o = typeof e == "string" ? ft(e, t, n) : e, r = ie(
|
|
1579
|
+
({ className: i, ...s }, a) => re(vt, {
|
|
1580
|
+
ref: a,
|
|
1581
|
+
icon: o,
|
|
1582
|
+
className: i,
|
|
1583
|
+
...s
|
|
1394
1584
|
})
|
|
1395
1585
|
);
|
|
1396
|
-
return
|
|
1397
|
-
}
|
|
1586
|
+
return o.name && (r.displayName = pt(o.name)), r;
|
|
1587
|
+
}
|
|
1398
1588
|
/**
|
|
1399
|
-
* @license lucide-react v1.
|
|
1589
|
+
* @license lucide-react v1.42.0 - ISC
|
|
1400
1590
|
*
|
|
1401
1591
|
* This source code is licensed under the ISC license.
|
|
1402
1592
|
* See the LICENSE file in the root directory of this source tree.
|
|
1403
1593
|
*/
|
|
1404
|
-
const
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
{
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1594
|
+
const xe = {
|
|
1595
|
+
name: "book-open",
|
|
1596
|
+
size: 24,
|
|
1597
|
+
node: [
|
|
1598
|
+
["path", { d: "M12 5v16", key: "1f6ucr" }],
|
|
1599
|
+
[
|
|
1600
|
+
"path",
|
|
1601
|
+
{
|
|
1602
|
+
d: "M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z",
|
|
1603
|
+
key: "1fyvmf"
|
|
1604
|
+
}
|
|
1605
|
+
]
|
|
1412
1606
|
]
|
|
1413
|
-
|
|
1607
|
+
};
|
|
1608
|
+
xe.node;
|
|
1609
|
+
const xt = H(xe);
|
|
1414
1610
|
/**
|
|
1415
|
-
* @license lucide-react v1.
|
|
1611
|
+
* @license lucide-react v1.42.0 - ISC
|
|
1416
1612
|
*
|
|
1417
1613
|
* This source code is licensed under the ISC license.
|
|
1418
1614
|
* See the LICENSE file in the root directory of this source tree.
|
|
1419
1615
|
*/
|
|
1420
|
-
const
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1616
|
+
const Me = {
|
|
1617
|
+
name: "chart-column",
|
|
1618
|
+
size: 24,
|
|
1619
|
+
node: [
|
|
1620
|
+
["path", { d: "M3 3v16a2 2 0 0 0 2 2h16", key: "c24i48" }],
|
|
1621
|
+
["path", { d: "M18 17V9", key: "2bz60n" }],
|
|
1622
|
+
["path", { d: "M13 17V5", key: "1frdt8" }],
|
|
1623
|
+
["path", { d: "M8 17v-3", key: "17ska0" }]
|
|
1624
|
+
],
|
|
1625
|
+
aliases: ["bar-chart-3"]
|
|
1626
|
+
};
|
|
1627
|
+
Me.node;
|
|
1628
|
+
const Mt = H(Me);
|
|
1426
1629
|
/**
|
|
1427
|
-
* @license lucide-react v1.
|
|
1630
|
+
* @license lucide-react v1.42.0 - ISC
|
|
1428
1631
|
*
|
|
1429
1632
|
* This source code is licensed under the ISC license.
|
|
1430
1633
|
* See the LICENSE file in the root directory of this source tree.
|
|
1431
1634
|
*/
|
|
1432
|
-
const
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
}
|
|
1635
|
+
const Ne = {
|
|
1636
|
+
name: "download",
|
|
1637
|
+
size: 24,
|
|
1638
|
+
node: [
|
|
1639
|
+
["path", { d: "M12 15V3", key: "m9g1x1" }],
|
|
1640
|
+
["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }],
|
|
1641
|
+
["path", { d: "m7 10 5 5 5-5", key: "brsn70" }]
|
|
1642
|
+
]
|
|
1643
|
+
};
|
|
1644
|
+
Ne.node;
|
|
1645
|
+
const Nt = H(Ne);
|
|
1646
|
+
/**
|
|
1647
|
+
* @license lucide-react v1.42.0 - ISC
|
|
1648
|
+
*
|
|
1649
|
+
* This source code is licensed under the ISC license.
|
|
1650
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1651
|
+
*/
|
|
1652
|
+
const Ce = {
|
|
1653
|
+
name: "face-slightly-smiling",
|
|
1654
|
+
size: 24,
|
|
1655
|
+
node: [
|
|
1656
|
+
["path", { d: "M15 10V9", key: "4dkmfx" }],
|
|
1657
|
+
["path", { d: "M16.472 15a6 6 0 01-8.943 0", key: "7qomzy" }],
|
|
1658
|
+
["path", { d: "M9 10V9", key: "1lazqi" }],
|
|
1659
|
+
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]
|
|
1439
1660
|
],
|
|
1440
|
-
|
|
1441
|
-
|
|
1661
|
+
aliases: ["smile"]
|
|
1662
|
+
};
|
|
1663
|
+
Ce.node;
|
|
1664
|
+
const Ct = H(Ce);
|
|
1442
1665
|
/**
|
|
1443
|
-
* @license lucide-react v1.
|
|
1666
|
+
* @license lucide-react v1.42.0 - ISC
|
|
1444
1667
|
*
|
|
1445
1668
|
* This source code is licensed under the ISC license.
|
|
1446
1669
|
* See the LICENSE file in the root directory of this source tree.
|
|
1447
1670
|
*/
|
|
1448
|
-
const
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1671
|
+
const Le = {
|
|
1672
|
+
name: "file",
|
|
1673
|
+
size: 24,
|
|
1674
|
+
node: [
|
|
1675
|
+
[
|
|
1676
|
+
"path",
|
|
1677
|
+
{
|
|
1678
|
+
d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
|
|
1679
|
+
key: "1oefj6"
|
|
1680
|
+
}
|
|
1681
|
+
],
|
|
1682
|
+
["path", { d: "M14 2v5a1 1 0 0 0 1 1h5", key: "wfsgrz" }]
|
|
1455
1683
|
]
|
|
1456
|
-
|
|
1684
|
+
};
|
|
1685
|
+
Le.node;
|
|
1686
|
+
const Lt = H(Le);
|
|
1457
1687
|
/**
|
|
1458
|
-
* @license lucide-react v1.
|
|
1688
|
+
* @license lucide-react v1.42.0 - ISC
|
|
1459
1689
|
*
|
|
1460
1690
|
* This source code is licensed under the ISC license.
|
|
1461
1691
|
* See the LICENSE file in the root directory of this source tree.
|
|
1462
1692
|
*/
|
|
1463
|
-
const
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
["path", { d: "M3 5a2 2 0 0 0 2 2h3", key: "f2jnh7" }],
|
|
1479
|
-
["path", { d: "M3 3v13a2 2 0 0 0 2 2h3", key: "k8epm1" }]
|
|
1480
|
-
], ct = O("folder-tree", st);
|
|
1693
|
+
const Ae = {
|
|
1694
|
+
name: "folder-open",
|
|
1695
|
+
size: 24,
|
|
1696
|
+
node: [
|
|
1697
|
+
[
|
|
1698
|
+
"path",
|
|
1699
|
+
{
|
|
1700
|
+
d: "m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",
|
|
1701
|
+
key: "usdka0"
|
|
1702
|
+
}
|
|
1703
|
+
]
|
|
1704
|
+
]
|
|
1705
|
+
};
|
|
1706
|
+
Ae.node;
|
|
1707
|
+
const At = H(Ae);
|
|
1481
1708
|
/**
|
|
1482
|
-
* @license lucide-react v1.
|
|
1709
|
+
* @license lucide-react v1.42.0 - ISC
|
|
1483
1710
|
*
|
|
1484
1711
|
* This source code is licensed under the ISC license.
|
|
1485
1712
|
* See the LICENSE file in the root directory of this source tree.
|
|
1486
1713
|
*/
|
|
1487
|
-
const
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1714
|
+
const _e = {
|
|
1715
|
+
name: "folder-tree",
|
|
1716
|
+
size: 24,
|
|
1717
|
+
node: [
|
|
1718
|
+
[
|
|
1719
|
+
"path",
|
|
1720
|
+
{
|
|
1721
|
+
d: "M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",
|
|
1722
|
+
key: "hod4my"
|
|
1723
|
+
}
|
|
1724
|
+
],
|
|
1725
|
+
[
|
|
1726
|
+
"path",
|
|
1727
|
+
{
|
|
1728
|
+
d: "M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",
|
|
1729
|
+
key: "w4yl2u"
|
|
1730
|
+
}
|
|
1731
|
+
],
|
|
1732
|
+
["path", { d: "M3 5a2 2 0 0 0 2 2h3", key: "f2jnh7" }],
|
|
1733
|
+
["path", { d: "M3 3v13a2 2 0 0 0 2 2h3", key: "k8epm1" }]
|
|
1494
1734
|
]
|
|
1495
|
-
|
|
1735
|
+
};
|
|
1736
|
+
_e.node;
|
|
1737
|
+
const _t = H(_e);
|
|
1496
1738
|
/**
|
|
1497
|
-
* @license lucide-react v1.
|
|
1739
|
+
* @license lucide-react v1.42.0 - ISC
|
|
1498
1740
|
*
|
|
1499
1741
|
* This source code is licensed under the ISC license.
|
|
1500
1742
|
* See the LICENSE file in the root directory of this source tree.
|
|
1501
1743
|
*/
|
|
1502
|
-
const
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
]
|
|
1744
|
+
const De = {
|
|
1745
|
+
name: "folder",
|
|
1746
|
+
size: 24,
|
|
1747
|
+
node: [
|
|
1748
|
+
[
|
|
1749
|
+
"path",
|
|
1750
|
+
{
|
|
1751
|
+
d: "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",
|
|
1752
|
+
key: "1kt360"
|
|
1753
|
+
}
|
|
1754
|
+
]
|
|
1755
|
+
]
|
|
1756
|
+
};
|
|
1757
|
+
De.node;
|
|
1758
|
+
const Dt = H(De);
|
|
1513
1759
|
/**
|
|
1514
|
-
* @license lucide-react v1.
|
|
1760
|
+
* @license lucide-react v1.42.0 - ISC
|
|
1515
1761
|
*
|
|
1516
1762
|
* This source code is licensed under the ISC license.
|
|
1517
1763
|
* See the LICENSE file in the root directory of this source tree.
|
|
1518
1764
|
*/
|
|
1519
|
-
const
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1765
|
+
const Ee = {
|
|
1766
|
+
name: "globe",
|
|
1767
|
+
size: 24,
|
|
1768
|
+
node: [
|
|
1769
|
+
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
1770
|
+
["path", { d: "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20", key: "13o1zl" }],
|
|
1771
|
+
["path", { d: "M2 12h20", key: "9i4pu4" }]
|
|
1772
|
+
]
|
|
1773
|
+
};
|
|
1774
|
+
Ee.node;
|
|
1775
|
+
const Et = H(Ee);
|
|
1523
1776
|
/**
|
|
1524
|
-
* @license lucide-react v1.
|
|
1777
|
+
* @license lucide-react v1.42.0 - ISC
|
|
1525
1778
|
*
|
|
1526
1779
|
* This source code is licensed under the ISC license.
|
|
1527
1780
|
* See the LICENSE file in the root directory of this source tree.
|
|
1528
1781
|
*/
|
|
1529
|
-
const
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1782
|
+
const Ie = {
|
|
1783
|
+
name: "lightbulb",
|
|
1784
|
+
size: 24,
|
|
1785
|
+
node: [
|
|
1786
|
+
[
|
|
1787
|
+
"path",
|
|
1788
|
+
{
|
|
1789
|
+
d: "M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",
|
|
1790
|
+
key: "1gvzjb"
|
|
1791
|
+
}
|
|
1792
|
+
],
|
|
1793
|
+
["path", { d: "M9 18h6", key: "x1upvd" }],
|
|
1794
|
+
["path", { d: "M10 22h4", key: "ceow96" }]
|
|
1795
|
+
]
|
|
1796
|
+
};
|
|
1797
|
+
Ie.node;
|
|
1798
|
+
const It = H(Ie);
|
|
1534
1799
|
/**
|
|
1535
|
-
* @license lucide-react v1.
|
|
1800
|
+
* @license lucide-react v1.42.0 - ISC
|
|
1536
1801
|
*
|
|
1537
1802
|
* This source code is licensed under the ISC license.
|
|
1538
1803
|
* See the LICENSE file in the root directory of this source tree.
|
|
1539
1804
|
*/
|
|
1540
|
-
const
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
["path", { d: "m7.5 4.27 9 5.15", key: "1c824w" }]
|
|
1551
|
-
], wt = O("package", pt);
|
|
1805
|
+
const Se = {
|
|
1806
|
+
name: "lock",
|
|
1807
|
+
size: 24,
|
|
1808
|
+
node: [
|
|
1809
|
+
["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2", key: "1w4ew1" }],
|
|
1810
|
+
["path", { d: "M7 11V7a5 5 0 0 1 10 0v4", key: "fwvmzm" }]
|
|
1811
|
+
]
|
|
1812
|
+
};
|
|
1813
|
+
Se.node;
|
|
1814
|
+
const St = H(Se);
|
|
1552
1815
|
/**
|
|
1553
|
-
* @license lucide-react v1.
|
|
1816
|
+
* @license lucide-react v1.42.0 - ISC
|
|
1554
1817
|
*
|
|
1555
1818
|
* This source code is licensed under the ISC license.
|
|
1556
1819
|
* See the LICENSE file in the root directory of this source tree.
|
|
1557
1820
|
*/
|
|
1558
|
-
const
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
}
|
|
1821
|
+
const $e = {
|
|
1822
|
+
name: "monitor",
|
|
1823
|
+
size: 24,
|
|
1824
|
+
node: [
|
|
1825
|
+
["rect", { width: "20", height: "14", x: "2", y: "3", rx: "2", key: "48i651" }],
|
|
1826
|
+
["line", { x1: "8", x2: "16", y1: "21", y2: "21", key: "1svkeh" }],
|
|
1827
|
+
["line", { x1: "12", x2: "12", y1: "17", y2: "21", key: "vw1qmm" }]
|
|
1828
|
+
]
|
|
1829
|
+
};
|
|
1830
|
+
$e.node;
|
|
1831
|
+
const $t = H($e);
|
|
1832
|
+
/**
|
|
1833
|
+
* @license lucide-react v1.42.0 - ISC
|
|
1834
|
+
*
|
|
1835
|
+
* This source code is licensed under the ISC license.
|
|
1836
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1837
|
+
*/
|
|
1838
|
+
const ze = {
|
|
1839
|
+
name: "package",
|
|
1840
|
+
size: 24,
|
|
1841
|
+
node: [
|
|
1842
|
+
[
|
|
1843
|
+
"path",
|
|
1844
|
+
{
|
|
1845
|
+
d: "M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",
|
|
1846
|
+
key: "1a0edw"
|
|
1847
|
+
}
|
|
1848
|
+
],
|
|
1849
|
+
["path", { d: "M12 22V12", key: "d0xqtd" }],
|
|
1850
|
+
["polyline", { points: "3.29 7 12 12 20.71 7", key: "ousv84" }],
|
|
1851
|
+
["path", { d: "m7.5 4.27 9 5.15", key: "1c824w" }]
|
|
1852
|
+
]
|
|
1853
|
+
};
|
|
1854
|
+
ze.node;
|
|
1855
|
+
const zt = H(ze);
|
|
1856
|
+
/**
|
|
1857
|
+
* @license lucide-react v1.42.0 - ISC
|
|
1858
|
+
*
|
|
1859
|
+
* This source code is licensed under the ISC license.
|
|
1860
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1861
|
+
*/
|
|
1862
|
+
const Re = {
|
|
1863
|
+
name: "plug",
|
|
1864
|
+
size: 24,
|
|
1865
|
+
node: [
|
|
1866
|
+
["path", { d: "M12 22v-5", key: "1ega77" }],
|
|
1867
|
+
["path", { d: "M15 8V2", key: "18g5xt" }],
|
|
1868
|
+
[
|
|
1869
|
+
"path",
|
|
1870
|
+
{ d: "M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z", key: "1xoxul" }
|
|
1871
|
+
],
|
|
1872
|
+
["path", { d: "M9 8V2", key: "14iosj" }]
|
|
1873
|
+
]
|
|
1874
|
+
};
|
|
1875
|
+
Re.node;
|
|
1876
|
+
const Rt = H(Re);
|
|
1877
|
+
/**
|
|
1878
|
+
* @license lucide-react v1.42.0 - ISC
|
|
1879
|
+
*
|
|
1880
|
+
* This source code is licensed under the ISC license.
|
|
1881
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1882
|
+
*/
|
|
1883
|
+
const Te = {
|
|
1884
|
+
name: "puzzle",
|
|
1885
|
+
size: 24,
|
|
1886
|
+
node: [
|
|
1887
|
+
[
|
|
1888
|
+
"path",
|
|
1889
|
+
{
|
|
1890
|
+
d: "M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",
|
|
1891
|
+
key: "w46dr5"
|
|
1892
|
+
}
|
|
1893
|
+
]
|
|
1894
|
+
]
|
|
1895
|
+
};
|
|
1896
|
+
Te.node;
|
|
1897
|
+
const Tt = H(Te);
|
|
1898
|
+
/**
|
|
1899
|
+
* @license lucide-react v1.42.0 - ISC
|
|
1900
|
+
*
|
|
1901
|
+
* This source code is licensed under the ISC license.
|
|
1902
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1903
|
+
*/
|
|
1904
|
+
const Pe = {
|
|
1905
|
+
name: "rocket",
|
|
1906
|
+
size: 24,
|
|
1907
|
+
node: [
|
|
1908
|
+
["path", { d: "M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5", key: "qeys4" }],
|
|
1909
|
+
[
|
|
1910
|
+
"path",
|
|
1911
|
+
{
|
|
1912
|
+
d: "M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09",
|
|
1913
|
+
key: "u4xsad"
|
|
1914
|
+
}
|
|
1915
|
+
],
|
|
1916
|
+
[
|
|
1917
|
+
"path",
|
|
1918
|
+
{
|
|
1919
|
+
d: "M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z",
|
|
1920
|
+
key: "676m9"
|
|
1921
|
+
}
|
|
1922
|
+
],
|
|
1923
|
+
["path", { d: "M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05", key: "92ym6u" }]
|
|
1924
|
+
]
|
|
1925
|
+
};
|
|
1926
|
+
Pe.node;
|
|
1927
|
+
const Pt = H(Pe);
|
|
1928
|
+
/**
|
|
1929
|
+
* @license lucide-react v1.42.0 - ISC
|
|
1930
|
+
*
|
|
1931
|
+
* This source code is licensed under the ISC license.
|
|
1932
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1933
|
+
*/
|
|
1934
|
+
const Fe = {
|
|
1935
|
+
name: "settings",
|
|
1936
|
+
size: 24,
|
|
1937
|
+
node: [
|
|
1938
|
+
[
|
|
1939
|
+
"path",
|
|
1940
|
+
{
|
|
1941
|
+
d: "M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",
|
|
1942
|
+
key: "1i5ecw"
|
|
1943
|
+
}
|
|
1944
|
+
],
|
|
1945
|
+
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
1946
|
+
]
|
|
1947
|
+
};
|
|
1948
|
+
Fe.node;
|
|
1949
|
+
const Ft = H(Fe);
|
|
1950
|
+
/**
|
|
1951
|
+
* @license lucide-react v1.42.0 - ISC
|
|
1952
|
+
*
|
|
1953
|
+
* This source code is licensed under the ISC license.
|
|
1954
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1955
|
+
*/
|
|
1956
|
+
const He = {
|
|
1957
|
+
name: "shopping-bag",
|
|
1958
|
+
size: 24,
|
|
1959
|
+
node: [
|
|
1960
|
+
["path", { d: "M16 10a4 4 0 0 1-8 0", key: "1ltviw" }],
|
|
1961
|
+
["path", { d: "M3.103 6.034h17.794", key: "awc11p" }],
|
|
1962
|
+
[
|
|
1963
|
+
"path",
|
|
1964
|
+
{
|
|
1965
|
+
d: "M3.4 5.467a2 2 0 0 0-.4 1.2V20a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6.667a2 2 0 0 0-.4-1.2l-2-2.667A2 2 0 0 0 17 2H7a2 2 0 0 0-1.6.8z",
|
|
1966
|
+
key: "o988cm"
|
|
1967
|
+
}
|
|
1968
|
+
]
|
|
1969
|
+
]
|
|
1970
|
+
};
|
|
1971
|
+
He.node;
|
|
1972
|
+
const Ht = H(He);
|
|
1973
|
+
/**
|
|
1974
|
+
* @license lucide-react v1.42.0 - ISC
|
|
1975
|
+
*
|
|
1976
|
+
* This source code is licensed under the ISC license.
|
|
1977
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1978
|
+
*/
|
|
1979
|
+
const We = {
|
|
1980
|
+
name: "sparkles",
|
|
1981
|
+
size: 24,
|
|
1982
|
+
node: [
|
|
1983
|
+
[
|
|
1984
|
+
"path",
|
|
1985
|
+
{
|
|
1986
|
+
d: "M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",
|
|
1987
|
+
key: "1s2grr"
|
|
1988
|
+
}
|
|
1989
|
+
],
|
|
1990
|
+
["path", { d: "M20 2v4", key: "1rf3ol" }],
|
|
1991
|
+
["path", { d: "M22 4h-4", key: "gwowj6" }],
|
|
1992
|
+
["circle", { cx: "4", cy: "20", r: "2", key: "6kqj1y" }]
|
|
1565
1993
|
],
|
|
1566
|
-
|
|
1567
|
-
|
|
1994
|
+
aliases: ["stars"]
|
|
1995
|
+
};
|
|
1996
|
+
We.node;
|
|
1997
|
+
const Wt = H(We);
|
|
1568
1998
|
/**
|
|
1569
|
-
* @license lucide-react v1.
|
|
1999
|
+
* @license lucide-react v1.42.0 - ISC
|
|
1570
2000
|
*
|
|
1571
2001
|
* This source code is licensed under the ISC license.
|
|
1572
2002
|
* See the LICENSE file in the root directory of this source tree.
|
|
1573
2003
|
*/
|
|
1574
|
-
const
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
[
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
2004
|
+
const Be = {
|
|
2005
|
+
name: "star",
|
|
2006
|
+
size: 24,
|
|
2007
|
+
node: [
|
|
2008
|
+
[
|
|
2009
|
+
"path",
|
|
2010
|
+
{
|
|
2011
|
+
d: "M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",
|
|
2012
|
+
key: "r04s7s"
|
|
2013
|
+
}
|
|
2014
|
+
]
|
|
2015
|
+
]
|
|
2016
|
+
};
|
|
2017
|
+
Be.node;
|
|
2018
|
+
const Bt = H(Be);
|
|
2019
|
+
/**
|
|
2020
|
+
* @license lucide-react v1.42.0 - ISC
|
|
2021
|
+
*
|
|
2022
|
+
* This source code is licensed under the ISC license.
|
|
2023
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
2024
|
+
*/
|
|
2025
|
+
const Ke = {
|
|
2026
|
+
name: "zap",
|
|
2027
|
+
size: 24,
|
|
2028
|
+
node: [
|
|
2029
|
+
[
|
|
2030
|
+
"path",
|
|
2031
|
+
{
|
|
2032
|
+
d: "M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z",
|
|
2033
|
+
key: "1v7up4"
|
|
2034
|
+
}
|
|
2035
|
+
]
|
|
1583
2036
|
]
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
2037
|
+
};
|
|
2038
|
+
Ke.node;
|
|
2039
|
+
const Kt = H(Ke), Vt = {
|
|
2040
|
+
File: Lt,
|
|
2041
|
+
Folder: Dt,
|
|
2042
|
+
FolderOpen: At,
|
|
2043
|
+
FolderTree: _t,
|
|
2044
|
+
Package: zt,
|
|
2045
|
+
ShoppingBag: Ht,
|
|
2046
|
+
Monitor: $t,
|
|
2047
|
+
Settings: Ft,
|
|
2048
|
+
BookOpen: xt,
|
|
2049
|
+
BarChart3: Mt,
|
|
2050
|
+
Lightbulb: It,
|
|
2051
|
+
Lock: St,
|
|
2052
|
+
Download: Nt,
|
|
2053
|
+
Globe: Et,
|
|
2054
|
+
Plug: Rt,
|
|
2055
|
+
Puzzle: Tt,
|
|
2056
|
+
Rocket: Pt,
|
|
2057
|
+
Smile: Ct,
|
|
2058
|
+
Sparkles: Wt,
|
|
2059
|
+
Star: Bt,
|
|
2060
|
+
Zap: Kt
|
|
2061
|
+
}, we = "📄";
|
|
2062
|
+
function un({ pluginId: e, manifest: t, className: n, alt: o = "" }) {
|
|
2063
|
+
const r = t ? dt(e, t) : { emoji: we };
|
|
1600
2064
|
if (r.lucide) {
|
|
1601
|
-
const
|
|
1602
|
-
if (
|
|
1603
|
-
return /* @__PURE__ */
|
|
2065
|
+
const i = Vt[r.lucide];
|
|
2066
|
+
if (i)
|
|
2067
|
+
return /* @__PURE__ */ u(i, { className: `plugin-icon plugin-icon--lucide ${n ?? ""}` });
|
|
1604
2068
|
}
|
|
1605
|
-
return r.codicon ? /* @__PURE__ */
|
|
2069
|
+
return r.codicon ? /* @__PURE__ */ u("span", { className: `codicon ${r.codicon} plugin-icon plugin-icon--codicon ${n ?? ""}` }) : r.src ? /* @__PURE__ */ u("img", { src: r.src, alt: o, className: `plugin-icon plugin-icon--img ${n ?? ""}`, draggable: !1 }) : /* @__PURE__ */ u("span", { className: `plugin-icon plugin-icon--emoji ${n ?? ""}`, children: r.emoji ?? we });
|
|
2070
|
+
}
|
|
2071
|
+
function dn({ onPreview: e, onPin: t, disabled: n, delay: o = 250 }) {
|
|
2072
|
+
const r = F(null);
|
|
2073
|
+
z(() => () => {
|
|
2074
|
+
r.current && clearTimeout(r.current);
|
|
2075
|
+
}, []);
|
|
2076
|
+
const i = W((a) => {
|
|
2077
|
+
n || a.button !== void 0 && a.button !== 0 || (r.current ? (clearTimeout(r.current), r.current = null) : r.current = setTimeout(() => {
|
|
2078
|
+
r.current = null, e();
|
|
2079
|
+
}, o));
|
|
2080
|
+
}, [n, o, e]), s = W((a) => {
|
|
2081
|
+
n || a.button !== void 0 && a.button !== 0 || a.detail === 2 && (r.current && (clearTimeout(r.current), r.current = null), t());
|
|
2082
|
+
}, [n, t]);
|
|
2083
|
+
return { handleMouseDown: i, handleClick: s };
|
|
2084
|
+
}
|
|
2085
|
+
function hn(e) {
|
|
2086
|
+
const t = F(e);
|
|
2087
|
+
return t.current = e, W((n) => {
|
|
2088
|
+
var r, i, s, a, l, d;
|
|
2089
|
+
if (!(n.ctrlKey || n.metaKey)) return !1;
|
|
2090
|
+
const o = n.key.toLowerCase();
|
|
2091
|
+
return o !== "c" && o !== "x" && o !== "v" ? !1 : (n.preventDefault(), o === "c" ? (i = (r = t.current).onCopy) == null || i.call(r) : o === "x" ? (a = (s = t.current).onCut) == null || a.call(s) : (d = (l = t.current).onPaste) == null || d.call(l), !0);
|
|
2092
|
+
}, []);
|
|
2093
|
+
}
|
|
2094
|
+
function fn(e, t = 150) {
|
|
2095
|
+
const [n, o] = T(""), r = F(null), i = W(
|
|
2096
|
+
(a) => {
|
|
2097
|
+
o(a), r.current && clearTimeout(r.current), r.current = setTimeout(() => {
|
|
2098
|
+
e(a);
|
|
2099
|
+
}, t);
|
|
2100
|
+
},
|
|
2101
|
+
[e, t]
|
|
2102
|
+
), s = W(() => {
|
|
2103
|
+
r.current && clearTimeout(r.current), o(""), e("");
|
|
2104
|
+
}, [e]);
|
|
2105
|
+
return z(() => () => {
|
|
2106
|
+
r.current && clearTimeout(r.current);
|
|
2107
|
+
}, []), { value: n, onChange: i, onClear: s };
|
|
2108
|
+
}
|
|
2109
|
+
function mn(e, t) {
|
|
2110
|
+
const n = t - e;
|
|
2111
|
+
return !Number.isInteger(e) || !Number.isInteger(t) || n <= 2 ? 0.01 : 1;
|
|
1606
2112
|
}
|
|
1607
|
-
function
|
|
1608
|
-
const
|
|
1609
|
-
return
|
|
2113
|
+
function pn(e) {
|
|
2114
|
+
const t = /^https?:\/\/(?:github\.com|raw\.githubusercontent\.com)\/([^/]+)\/([^/?#]+)/i.exec(e.trim());
|
|
2115
|
+
return t ? `${t[1].toLowerCase()}/${t[2].toLowerCase()}` : null;
|
|
1610
2116
|
}
|
|
1611
2117
|
export {
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
2118
|
+
Gt as Badge,
|
|
2119
|
+
Ge as Button,
|
|
2120
|
+
Zt as ColorPicker,
|
|
2121
|
+
Xt as Combobox,
|
|
2122
|
+
Yt as ContextMenu,
|
|
2123
|
+
Jt as DynamicSelect,
|
|
2124
|
+
Qt as FilePathInput,
|
|
2125
|
+
en as FontFamilySelect,
|
|
2126
|
+
tn as FormRow,
|
|
2127
|
+
ln as InlineInput,
|
|
2128
|
+
nn as NumberInput,
|
|
2129
|
+
le as OverlayPortal,
|
|
2130
|
+
un as PluginIcon,
|
|
2131
|
+
on as SegmentedRadio,
|
|
2132
|
+
be as SelectBox,
|
|
2133
|
+
rn as Slider,
|
|
2134
|
+
sn as StringListEditor,
|
|
2135
|
+
cn as ThemePicker,
|
|
2136
|
+
an as Toggle,
|
|
2137
|
+
mn as inferSliderStep,
|
|
2138
|
+
pn as urlSourceKey,
|
|
2139
|
+
dn as useClickPreview,
|
|
2140
|
+
hn as useClipboardKeys,
|
|
2141
|
+
fn as useDebouncedInput
|
|
1629
2142
|
};
|