@appforgeapps/uiforge 0.5.4 → 0.5.6
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/README.md +20 -1
- package/dist/index.d.ts +433 -1
- package/dist/uiforge.cjs +4 -4
- package/dist/uiforge.css +1 -1
- package/dist/uiforge.js +1113 -939
- package/package.json +1 -1
package/dist/uiforge.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsx as n, jsxs as
|
|
1
|
+
import { jsx as n, jsxs as m, Fragment as ge } from "react/jsx-runtime";
|
|
2
2
|
import { useState as X, useMemo as se, useCallback as B, useRef as Q, useEffect as ie, createElement as Se, PureComponent as Qe, createContext as Xe, useContext as et, useId as tt } from "react";
|
|
3
|
-
const
|
|
3
|
+
const Yr = ({
|
|
4
4
|
variant: t = "primary",
|
|
5
5
|
size: e = "medium",
|
|
6
6
|
theme: r = "light",
|
|
@@ -9,9 +9,9 @@ const Zr = ({
|
|
|
9
9
|
className: c = "",
|
|
10
10
|
...s
|
|
11
11
|
}) => {
|
|
12
|
-
const l = "uiforge-button",
|
|
13
|
-
return /* @__PURE__ */ n("button", { className:
|
|
14
|
-
},
|
|
12
|
+
const l = "uiforge-button", $ = `${l}--${t}`, w = `${l}--${e}`, N = `${l}--${r}`, k = i === "condensed" ? `${l}--condensed` : "", x = [l, $, w, N, k, c].filter(Boolean).join(" ");
|
|
13
|
+
return /* @__PURE__ */ n("button", { className: x, "data-theme": r, ...s, children: a });
|
|
14
|
+
}, Jr = ({
|
|
15
15
|
isOpen: t,
|
|
16
16
|
controlsId: e,
|
|
17
17
|
ariaLabel: r = "Toggle menu",
|
|
@@ -20,7 +20,7 @@ const Zr = ({
|
|
|
20
20
|
...c
|
|
21
21
|
}) => {
|
|
22
22
|
const s = "uiforge-hamburger-button", l = [s, `${s}--${a}`, t && `${s}--open`, i].filter(Boolean).join(" ");
|
|
23
|
-
return /* @__PURE__ */
|
|
23
|
+
return /* @__PURE__ */ m(
|
|
24
24
|
"button",
|
|
25
25
|
{
|
|
26
26
|
type: "button",
|
|
@@ -36,7 +36,7 @@ const Zr = ({
|
|
|
36
36
|
]
|
|
37
37
|
}
|
|
38
38
|
);
|
|
39
|
-
},
|
|
39
|
+
}, Qr = ({
|
|
40
40
|
icon: t,
|
|
41
41
|
size: e = "medium",
|
|
42
42
|
ariaLabel: r,
|
|
@@ -45,188 +45,188 @@ const Zr = ({
|
|
|
45
45
|
disabled: c,
|
|
46
46
|
...s
|
|
47
47
|
}) => {
|
|
48
|
-
const l = "uiforge-icon-button",
|
|
49
|
-
return /* @__PURE__ */
|
|
48
|
+
const l = "uiforge-icon-button", $ = [l, `${l}--${e}`, a].filter(Boolean).join(" ");
|
|
49
|
+
return /* @__PURE__ */ m("button", { type: "button", className: $, "aria-label": r, disabled: c, ...s, children: [
|
|
50
50
|
/* @__PURE__ */ n("span", { className: `${l}__icon`, "aria-hidden": "true", children: t }),
|
|
51
51
|
i !== void 0 && /* @__PURE__ */ n("span", { className: `${l}__badge`, "aria-hidden": "true", children: i })
|
|
52
52
|
] });
|
|
53
|
-
},
|
|
53
|
+
}, Xr = ({
|
|
54
54
|
columns: t,
|
|
55
55
|
data: e,
|
|
56
56
|
theme: r = "light",
|
|
57
57
|
selectable: i = !1,
|
|
58
58
|
selectedRows: a,
|
|
59
|
-
getRowKey: c = (
|
|
59
|
+
getRowKey: c = (E, S) => S,
|
|
60
60
|
onSelectionChange: s,
|
|
61
61
|
onCellEdit: l,
|
|
62
|
-
actionButtons:
|
|
63
|
-
searchable:
|
|
64
|
-
searchPlaceholder:
|
|
65
|
-
onSearch:
|
|
66
|
-
customFilter:
|
|
62
|
+
actionButtons: $ = [],
|
|
63
|
+
searchable: w = !1,
|
|
64
|
+
searchPlaceholder: N = "Search...",
|
|
65
|
+
onSearch: k,
|
|
66
|
+
customFilter: x,
|
|
67
67
|
pagination: d,
|
|
68
|
-
onPageChange:
|
|
68
|
+
onPageChange: _,
|
|
69
69
|
onPageSizeChange: o,
|
|
70
70
|
pageSizeOptions: u = [10, 25, 50, 100],
|
|
71
|
-
className:
|
|
72
|
-
loading:
|
|
73
|
-
emptyMessage:
|
|
71
|
+
className: h = "",
|
|
72
|
+
loading: g = !1,
|
|
73
|
+
emptyMessage: L = "No data available"
|
|
74
74
|
}) => {
|
|
75
|
-
const [
|
|
75
|
+
const [E, S] = X(/* @__PURE__ */ new Set()), [C, P] = X(""), [z, A] = X(null), [R, T] = X(""), v = a ?? E, f = se(() => !w || !C ? e : e.filter((y) => x ? x(y, C) : Object.values(y).some((j) => j == null ? !1 : String(j).toLowerCase().includes(C.toLowerCase()))), [e, C, w, x]), I = se(() => {
|
|
76
76
|
if (!d || d.serverSide)
|
|
77
|
-
return
|
|
78
|
-
const
|
|
79
|
-
return
|
|
80
|
-
}, [
|
|
81
|
-
const F = c(
|
|
82
|
-
return
|
|
83
|
-
}), [e,
|
|
84
|
-
(
|
|
85
|
-
const
|
|
86
|
-
|
|
77
|
+
return f;
|
|
78
|
+
const y = d.currentPage * d.pageSize, j = y + d.pageSize;
|
|
79
|
+
return f.slice(y, j);
|
|
80
|
+
}, [f, d]), M = se(() => d ? d.serverSide && d.totalItems !== void 0 ? Math.ceil(d.totalItems / d.pageSize) : Math.ceil(f.length / d.pageSize) : 1, [d, f.length]), ae = B(() => e.filter((y, j) => {
|
|
81
|
+
const F = c(y, j);
|
|
82
|
+
return v.has(F);
|
|
83
|
+
}), [e, v, c]), J = B(
|
|
84
|
+
(y) => {
|
|
85
|
+
const j = /* @__PURE__ */ new Set();
|
|
86
|
+
y && I.forEach((F) => {
|
|
87
87
|
const Z = e.indexOf(F), de = c(F, Z);
|
|
88
|
-
|
|
89
|
-
}), a === void 0 &&
|
|
88
|
+
j.add(de);
|
|
89
|
+
}), a === void 0 && S(j), s?.(j, y ? I : []);
|
|
90
90
|
},
|
|
91
|
-
[
|
|
91
|
+
[I, e, c, s, a]
|
|
92
92
|
), oe = B(
|
|
93
|
-
(
|
|
94
|
-
const Z = new Set(
|
|
95
|
-
F ? Z.add(
|
|
93
|
+
(y, j, F) => {
|
|
94
|
+
const Z = new Set(v);
|
|
95
|
+
F ? Z.add(y) : Z.delete(y), a === void 0 && S(Z);
|
|
96
96
|
const de = e.filter((K, pe) => {
|
|
97
|
-
const
|
|
98
|
-
return Z.has(
|
|
97
|
+
const ye = c(K, pe);
|
|
98
|
+
return Z.has(ye);
|
|
99
99
|
});
|
|
100
100
|
s?.(Z, de);
|
|
101
101
|
},
|
|
102
|
-
[
|
|
102
|
+
[v, e, c, s, a]
|
|
103
103
|
), re = B(
|
|
104
|
-
(
|
|
105
|
-
|
|
104
|
+
(y) => {
|
|
105
|
+
P(y), k?.(y);
|
|
106
106
|
},
|
|
107
|
-
[
|
|
107
|
+
[k]
|
|
108
108
|
), ce = B(
|
|
109
|
-
(
|
|
110
|
-
|
|
109
|
+
(y, j, F) => {
|
|
110
|
+
A({ rowKey: y, columnKey: j }), T(F);
|
|
111
111
|
},
|
|
112
112
|
[]
|
|
113
113
|
), le = B(
|
|
114
|
-
(
|
|
115
|
-
l?.(
|
|
114
|
+
(y, j, F) => {
|
|
115
|
+
l?.(y, j, R, F), A(null), T("");
|
|
116
116
|
},
|
|
117
117
|
[R, l]
|
|
118
118
|
), H = B(() => {
|
|
119
|
-
|
|
119
|
+
A(null), T("");
|
|
120
120
|
}, []), he = B(
|
|
121
|
-
(
|
|
122
|
-
d &&
|
|
121
|
+
(y) => {
|
|
122
|
+
d && _?.(y, d.pageSize);
|
|
123
123
|
},
|
|
124
|
-
[d,
|
|
124
|
+
[d, _]
|
|
125
125
|
), G = B(
|
|
126
|
-
(
|
|
127
|
-
o?.(
|
|
126
|
+
(y) => {
|
|
127
|
+
o?.(y), d && _?.(0, y);
|
|
128
128
|
},
|
|
129
|
-
[o,
|
|
130
|
-
), ne = se(() =>
|
|
131
|
-
const
|
|
132
|
-
return
|
|
133
|
-
}), [
|
|
134
|
-
const F = e.indexOf(
|
|
135
|
-
return
|
|
136
|
-
}) && !ne, [
|
|
137
|
-
return /* @__PURE__ */
|
|
138
|
-
(
|
|
139
|
-
|
|
129
|
+
[o, _, d]
|
|
130
|
+
), ne = se(() => I.length === 0 ? !1 : I.every((y) => {
|
|
131
|
+
const j = e.indexOf(y), F = c(y, j);
|
|
132
|
+
return v.has(F);
|
|
133
|
+
}), [I, v, e, c]), me = se(() => I.length === 0 ? !1 : I.some((j) => {
|
|
134
|
+
const F = e.indexOf(j), Z = c(j, F);
|
|
135
|
+
return v.has(Z);
|
|
136
|
+
}) && !ne, [I, v, ne, e, c]), D = "uiforge-grid", q = `${D}--${r}`;
|
|
137
|
+
return /* @__PURE__ */ m("div", { className: `${D} ${q} ${h}`.trim(), "data-theme": r, children: [
|
|
138
|
+
(w || $.length > 0) && /* @__PURE__ */ m("div", { className: `${D}__toolbar`, children: [
|
|
139
|
+
w && /* @__PURE__ */ n("div", { className: `${D}__search`, children: /* @__PURE__ */ n(
|
|
140
140
|
"input",
|
|
141
141
|
{
|
|
142
142
|
type: "text",
|
|
143
|
-
className: `${
|
|
144
|
-
placeholder:
|
|
145
|
-
value:
|
|
146
|
-
onChange: (
|
|
143
|
+
className: `${D}__search-input`,
|
|
144
|
+
placeholder: N,
|
|
145
|
+
value: C,
|
|
146
|
+
onChange: (y) => re(y.target.value),
|
|
147
147
|
"aria-label": "Search"
|
|
148
148
|
}
|
|
149
149
|
) }),
|
|
150
|
-
|
|
151
|
-
const F =
|
|
150
|
+
$.length > 0 && /* @__PURE__ */ n("div", { className: `${D}__actions`, children: $.map((y, j) => {
|
|
151
|
+
const F = y.disabled || y.requiresSelection && v.size === 0;
|
|
152
152
|
return /* @__PURE__ */ n(
|
|
153
153
|
"button",
|
|
154
154
|
{
|
|
155
|
-
className: `${
|
|
156
|
-
onClick: () =>
|
|
155
|
+
className: `${D}__action-button ${D}__action-button--${y.variant || "primary"}`,
|
|
156
|
+
onClick: () => y.onClick(ae()),
|
|
157
157
|
disabled: F,
|
|
158
|
-
children:
|
|
158
|
+
children: y.label
|
|
159
159
|
},
|
|
160
|
-
|
|
160
|
+
j
|
|
161
161
|
);
|
|
162
162
|
}) })
|
|
163
163
|
] }),
|
|
164
|
-
/* @__PURE__ */ n("div", { className: `${
|
|
165
|
-
/* @__PURE__ */ n("thead", { children: /* @__PURE__ */
|
|
166
|
-
i && /* @__PURE__ */ n("th", { className: `${
|
|
164
|
+
/* @__PURE__ */ n("div", { className: `${D}__table-container`, children: /* @__PURE__ */ m("table", { className: `${D}__table`, role: "table", children: [
|
|
165
|
+
/* @__PURE__ */ n("thead", { children: /* @__PURE__ */ m("tr", { children: [
|
|
166
|
+
i && /* @__PURE__ */ n("th", { className: `${D}__header-cell ${D}__header-cell--checkbox`, children: /* @__PURE__ */ n(
|
|
167
167
|
"input",
|
|
168
168
|
{
|
|
169
169
|
type: "checkbox",
|
|
170
170
|
checked: ne,
|
|
171
|
-
ref: (
|
|
172
|
-
|
|
171
|
+
ref: (y) => {
|
|
172
|
+
y && (y.indeterminate = me);
|
|
173
173
|
},
|
|
174
|
-
onChange: (
|
|
174
|
+
onChange: (y) => J(y.target.checked),
|
|
175
175
|
"aria-label": "Select all rows"
|
|
176
176
|
}
|
|
177
177
|
) }),
|
|
178
|
-
t.map((
|
|
178
|
+
t.map((y) => /* @__PURE__ */ n(
|
|
179
179
|
"th",
|
|
180
180
|
{
|
|
181
|
-
className: `${
|
|
182
|
-
style: { width:
|
|
183
|
-
children:
|
|
181
|
+
className: `${D}__header-cell`,
|
|
182
|
+
style: { width: y.width },
|
|
183
|
+
children: y.header
|
|
184
184
|
},
|
|
185
|
-
|
|
185
|
+
y.key
|
|
186
186
|
))
|
|
187
187
|
] }) }),
|
|
188
|
-
/* @__PURE__ */ n("tbody", { children:
|
|
188
|
+
/* @__PURE__ */ n("tbody", { children: g ? /* @__PURE__ */ n("tr", { children: /* @__PURE__ */ n(
|
|
189
189
|
"td",
|
|
190
190
|
{
|
|
191
191
|
colSpan: t.length + (i ? 1 : 0),
|
|
192
|
-
className: `${
|
|
192
|
+
className: `${D}__loading-cell`,
|
|
193
193
|
children: "Loading..."
|
|
194
194
|
}
|
|
195
|
-
) }) :
|
|
195
|
+
) }) : I.length === 0 ? /* @__PURE__ */ n("tr", { children: /* @__PURE__ */ n(
|
|
196
196
|
"td",
|
|
197
197
|
{
|
|
198
198
|
colSpan: t.length + (i ? 1 : 0),
|
|
199
|
-
className: `${
|
|
200
|
-
children:
|
|
199
|
+
className: `${D}__empty-cell`,
|
|
200
|
+
children: L
|
|
201
201
|
}
|
|
202
|
-
) }) :
|
|
203
|
-
const F = e.indexOf(
|
|
204
|
-
return /* @__PURE__ */
|
|
202
|
+
) }) : I.map((y, j) => {
|
|
203
|
+
const F = e.indexOf(y), Z = c(y, F), de = v.has(Z);
|
|
204
|
+
return /* @__PURE__ */ m(
|
|
205
205
|
"tr",
|
|
206
206
|
{
|
|
207
|
-
className: `${
|
|
207
|
+
className: `${D}__row ${de ? `${D}__row--selected` : ""}`,
|
|
208
208
|
children: [
|
|
209
|
-
i && /* @__PURE__ */ n("td", { className: `${
|
|
209
|
+
i && /* @__PURE__ */ n("td", { className: `${D}__cell ${D}__cell--checkbox`, children: /* @__PURE__ */ n(
|
|
210
210
|
"input",
|
|
211
211
|
{
|
|
212
212
|
type: "checkbox",
|
|
213
213
|
checked: de,
|
|
214
|
-
onChange: (K) => oe(Z,
|
|
215
|
-
"aria-label": `Select row ${
|
|
214
|
+
onChange: (K) => oe(Z, y, K.target.checked),
|
|
215
|
+
"aria-label": `Select row ${j + 1}`
|
|
216
216
|
}
|
|
217
217
|
) }),
|
|
218
218
|
t.map((K) => {
|
|
219
|
-
const pe = K.field ?
|
|
220
|
-
return /* @__PURE__ */ n("td", { className: `${
|
|
219
|
+
const pe = K.field ? y[K.field] : void 0, ye = z?.rowKey === Z && z?.columnKey === K.key;
|
|
220
|
+
return /* @__PURE__ */ n("td", { className: `${D}__cell`, children: ye ? /* @__PURE__ */ m("div", { className: `${D}__edit-cell`, children: [
|
|
221
221
|
/* @__PURE__ */ n(
|
|
222
222
|
"input",
|
|
223
223
|
{
|
|
224
224
|
type: "text",
|
|
225
|
-
className: `${
|
|
225
|
+
className: `${D}__edit-input`,
|
|
226
226
|
value: String(R ?? ""),
|
|
227
|
-
onChange: (ue) =>
|
|
227
|
+
onChange: (ue) => T(ue.target.value),
|
|
228
228
|
onKeyDown: (ue) => {
|
|
229
|
-
ue.key === "Enter" ? le(Z, K.key,
|
|
229
|
+
ue.key === "Enter" ? le(Z, K.key, y) : ue.key === "Escape" && H();
|
|
230
230
|
},
|
|
231
231
|
autoFocus: !0,
|
|
232
232
|
"aria-label": `Edit ${K.header}`
|
|
@@ -235,8 +235,8 @@ const Zr = ({
|
|
|
235
235
|
/* @__PURE__ */ n(
|
|
236
236
|
"button",
|
|
237
237
|
{
|
|
238
|
-
className: `${
|
|
239
|
-
onClick: () => le(Z, K.key,
|
|
238
|
+
className: `${D}__edit-button ${D}__edit-button--save`,
|
|
239
|
+
onClick: () => le(Z, K.key, y),
|
|
240
240
|
"aria-label": "Save",
|
|
241
241
|
children: "✓"
|
|
242
242
|
}
|
|
@@ -244,7 +244,7 @@ const Zr = ({
|
|
|
244
244
|
/* @__PURE__ */ n(
|
|
245
245
|
"button",
|
|
246
246
|
{
|
|
247
|
-
className: `${
|
|
247
|
+
className: `${D}__edit-button ${D}__edit-button--cancel`,
|
|
248
248
|
onClick: H,
|
|
249
249
|
"aria-label": "Cancel",
|
|
250
250
|
children: "✕"
|
|
@@ -253,7 +253,7 @@ const Zr = ({
|
|
|
253
253
|
] }) : /* @__PURE__ */ n(
|
|
254
254
|
"div",
|
|
255
255
|
{
|
|
256
|
-
className: `${
|
|
256
|
+
className: `${D}__cell-content ${K.editable ? `${D}__cell-content--editable` : ""}`,
|
|
257
257
|
onClick: () => {
|
|
258
258
|
K.editable && ce(Z, K.key, pe);
|
|
259
259
|
},
|
|
@@ -263,7 +263,7 @@ const Zr = ({
|
|
|
263
263
|
tabIndex: K.editable ? 0 : void 0,
|
|
264
264
|
role: K.editable ? "button" : void 0,
|
|
265
265
|
"aria-label": K.editable ? `Edit ${K.header}` : void 0,
|
|
266
|
-
children: K.render ? K.render(pe,
|
|
266
|
+
children: K.render ? K.render(pe, y, F) : String(pe ?? "")
|
|
267
267
|
}
|
|
268
268
|
) }, K.key);
|
|
269
269
|
})
|
|
@@ -273,8 +273,8 @@ const Zr = ({
|
|
|
273
273
|
);
|
|
274
274
|
}) })
|
|
275
275
|
] }) }),
|
|
276
|
-
d &&
|
|
277
|
-
/* @__PURE__ */ n("div", { className: `${
|
|
276
|
+
d && M > 1 && /* @__PURE__ */ m("div", { className: `${D}__pagination`, children: [
|
|
277
|
+
/* @__PURE__ */ n("div", { className: `${D}__pagination-info`, children: d.serverSide && d.totalItems !== void 0 ? /* @__PURE__ */ m(ge, { children: [
|
|
278
278
|
"Showing ",
|
|
279
279
|
d.currentPage * d.pageSize + 1,
|
|
280
280
|
" to",
|
|
@@ -287,60 +287,60 @@ const Zr = ({
|
|
|
287
287
|
"of ",
|
|
288
288
|
d.totalItems,
|
|
289
289
|
" items"
|
|
290
|
-
] }) : /* @__PURE__ */
|
|
290
|
+
] }) : /* @__PURE__ */ m(ge, { children: [
|
|
291
291
|
"Showing ",
|
|
292
292
|
d.currentPage * d.pageSize + 1,
|
|
293
293
|
" to",
|
|
294
294
|
" ",
|
|
295
|
-
Math.min((d.currentPage + 1) * d.pageSize,
|
|
295
|
+
Math.min((d.currentPage + 1) * d.pageSize, f.length),
|
|
296
296
|
" ",
|
|
297
297
|
"of ",
|
|
298
|
-
|
|
298
|
+
f.length,
|
|
299
299
|
" items"
|
|
300
300
|
] }) }),
|
|
301
|
-
/* @__PURE__ */
|
|
301
|
+
/* @__PURE__ */ m("div", { className: `${D}__pagination-controls`, children: [
|
|
302
302
|
/* @__PURE__ */ n(
|
|
303
303
|
"button",
|
|
304
304
|
{
|
|
305
|
-
className: `${
|
|
305
|
+
className: `${D}__pagination-button`,
|
|
306
306
|
onClick: () => he(d.currentPage - 1),
|
|
307
307
|
disabled: d.currentPage === 0,
|
|
308
308
|
"aria-label": "Previous page",
|
|
309
309
|
children: "‹"
|
|
310
310
|
}
|
|
311
311
|
),
|
|
312
|
-
Array.from({ length:
|
|
312
|
+
Array.from({ length: M }, (y, j) => j).map((y) => y === 0 || y === M - 1 || Math.abs(y - d.currentPage) <= 1 ? /* @__PURE__ */ n(
|
|
313
313
|
"button",
|
|
314
314
|
{
|
|
315
|
-
className: `${
|
|
316
|
-
onClick: () => he(
|
|
317
|
-
"aria-label": `Page ${
|
|
318
|
-
"aria-current":
|
|
319
|
-
children:
|
|
315
|
+
className: `${D}__pagination-button ${y === d.currentPage ? `${D}__pagination-button--active` : ""}`,
|
|
316
|
+
onClick: () => he(y),
|
|
317
|
+
"aria-label": `Page ${y + 1}`,
|
|
318
|
+
"aria-current": y === d.currentPage ? "page" : void 0,
|
|
319
|
+
children: y + 1
|
|
320
320
|
},
|
|
321
|
-
|
|
322
|
-
) :
|
|
321
|
+
y
|
|
322
|
+
) : y === d.currentPage - 2 || y === d.currentPage + 2 ? /* @__PURE__ */ n("span", { className: `${D}__pagination-ellipsis`, children: "..." }, y) : null),
|
|
323
323
|
/* @__PURE__ */ n(
|
|
324
324
|
"button",
|
|
325
325
|
{
|
|
326
|
-
className: `${
|
|
326
|
+
className: `${D}__pagination-button`,
|
|
327
327
|
onClick: () => he(d.currentPage + 1),
|
|
328
|
-
disabled: d.currentPage >=
|
|
328
|
+
disabled: d.currentPage >= M - 1,
|
|
329
329
|
"aria-label": "Next page",
|
|
330
330
|
children: "›"
|
|
331
331
|
}
|
|
332
332
|
)
|
|
333
333
|
] }),
|
|
334
|
-
/* @__PURE__ */
|
|
334
|
+
/* @__PURE__ */ m("div", { className: `${D}__page-size`, children: [
|
|
335
335
|
/* @__PURE__ */ n("label", { htmlFor: "page-size-select", children: "Items per page:" }),
|
|
336
336
|
/* @__PURE__ */ n(
|
|
337
337
|
"select",
|
|
338
338
|
{
|
|
339
339
|
id: "page-size-select",
|
|
340
|
-
className: `${
|
|
340
|
+
className: `${D}__page-size-select`,
|
|
341
341
|
value: d.pageSize,
|
|
342
|
-
onChange: (
|
|
343
|
-
children: u.map((
|
|
342
|
+
onChange: (y) => G(Number(y.target.value)),
|
|
343
|
+
children: u.map((y) => /* @__PURE__ */ n("option", { value: y, children: y }, y))
|
|
344
344
|
}
|
|
345
345
|
)
|
|
346
346
|
] })
|
|
@@ -351,7 +351,7 @@ const Zr = ({
|
|
|
351
351
|
type: t,
|
|
352
352
|
content: "",
|
|
353
353
|
format: {}
|
|
354
|
-
}),
|
|
354
|
+
}), en = ({
|
|
355
355
|
initialBlocks: t = [],
|
|
356
356
|
onChange: e,
|
|
357
357
|
placeholder: r = "Start typing...",
|
|
@@ -360,138 +360,138 @@ const Zr = ({
|
|
|
360
360
|
className: c = "",
|
|
361
361
|
maxHeight: s
|
|
362
362
|
}) => {
|
|
363
|
-
const [l,
|
|
363
|
+
const [l, $] = X(
|
|
364
364
|
t.length > 0 ? t : [Me()]
|
|
365
|
-
), [
|
|
365
|
+
), [w, N] = X(null), [k, x] = X(null), [d, _] = X(!1), o = Q(null);
|
|
366
366
|
ie(() => {
|
|
367
367
|
e && e(l);
|
|
368
368
|
}, [l, e]);
|
|
369
|
-
const u = B((
|
|
370
|
-
|
|
371
|
-
}, []),
|
|
372
|
-
const
|
|
373
|
-
|
|
374
|
-
if (!
|
|
375
|
-
return [...
|
|
376
|
-
const ae =
|
|
377
|
-
return J.splice(ae + 1, 0,
|
|
378
|
-
}),
|
|
379
|
-
}, []),
|
|
380
|
-
|
|
381
|
-
const
|
|
382
|
-
return
|
|
369
|
+
const u = B((v, f) => {
|
|
370
|
+
$((I) => I.map((M) => M.id === v ? { ...M, ...f } : M));
|
|
371
|
+
}, []), h = B((v = "paragraph", f) => {
|
|
372
|
+
const I = Me(v);
|
|
373
|
+
$((M) => {
|
|
374
|
+
if (!f)
|
|
375
|
+
return [...M, I];
|
|
376
|
+
const ae = M.findIndex((oe) => oe.id === f), J = [...M];
|
|
377
|
+
return J.splice(ae + 1, 0, I), J;
|
|
378
|
+
}), N(I.id);
|
|
379
|
+
}, []), g = B((v) => {
|
|
380
|
+
$((f) => {
|
|
381
|
+
const I = f.filter((M) => M.id !== v);
|
|
382
|
+
return I.length > 0 ? I : [Me()];
|
|
383
383
|
});
|
|
384
|
-
}, []),
|
|
385
|
-
|
|
386
|
-
const
|
|
387
|
-
if (
|
|
388
|
-
const J = [...
|
|
384
|
+
}, []), L = B((v, f) => {
|
|
385
|
+
$((I) => {
|
|
386
|
+
const M = I.findIndex((re) => re.id === v), ae = I.findIndex((re) => re.id === f);
|
|
387
|
+
if (M === -1 || ae === -1) return I;
|
|
388
|
+
const J = [...I], [oe] = J.splice(M, 1);
|
|
389
389
|
return J.splice(ae, 0, oe), J;
|
|
390
390
|
});
|
|
391
|
-
}, []),
|
|
392
|
-
(
|
|
393
|
-
i || (
|
|
391
|
+
}, []), E = B(
|
|
392
|
+
(v, f) => {
|
|
393
|
+
i || (x(f), v.dataTransfer.effectAllowed = "move");
|
|
394
394
|
},
|
|
395
395
|
[i]
|
|
396
|
-
),
|
|
397
|
-
|
|
398
|
-
}, []),
|
|
399
|
-
(
|
|
400
|
-
|
|
396
|
+
), S = B((v) => {
|
|
397
|
+
v.preventDefault(), v.dataTransfer.dropEffect = "move";
|
|
398
|
+
}, []), C = B(
|
|
399
|
+
(v, f) => {
|
|
400
|
+
v.preventDefault(), k && k !== f && L(k, f), x(null);
|
|
401
401
|
},
|
|
402
|
-
[
|
|
403
|
-
),
|
|
404
|
-
|
|
405
|
-
}, []),
|
|
406
|
-
(
|
|
407
|
-
|
|
408
|
-
(
|
|
409
|
-
if (
|
|
410
|
-
const
|
|
402
|
+
[k, L]
|
|
403
|
+
), P = B(() => {
|
|
404
|
+
x(null);
|
|
405
|
+
}, []), z = B(
|
|
406
|
+
(v) => {
|
|
407
|
+
w && $(
|
|
408
|
+
(f) => f.map((I) => {
|
|
409
|
+
if (I.id === w) {
|
|
410
|
+
const M = I.format || {};
|
|
411
411
|
return {
|
|
412
|
-
...
|
|
412
|
+
...I,
|
|
413
413
|
format: {
|
|
414
|
-
...
|
|
415
|
-
[
|
|
414
|
+
...M,
|
|
415
|
+
[v]: !M[v]
|
|
416
416
|
}
|
|
417
417
|
};
|
|
418
418
|
}
|
|
419
|
-
return
|
|
419
|
+
return I;
|
|
420
420
|
})
|
|
421
421
|
);
|
|
422
422
|
},
|
|
423
|
-
[
|
|
424
|
-
),
|
|
425
|
-
(
|
|
426
|
-
u(
|
|
423
|
+
[w]
|
|
424
|
+
), A = B(
|
|
425
|
+
(v, f) => {
|
|
426
|
+
u(v, { type: f });
|
|
427
427
|
},
|
|
428
428
|
[u]
|
|
429
429
|
), R = B(
|
|
430
|
-
(
|
|
430
|
+
(v, f) => {
|
|
431
431
|
if (!i) {
|
|
432
|
-
if ((
|
|
433
|
-
|
|
434
|
-
else if ((
|
|
435
|
-
|
|
436
|
-
else if ((
|
|
437
|
-
|
|
438
|
-
else if (
|
|
439
|
-
const
|
|
440
|
-
|
|
441
|
-
} else if (
|
|
442
|
-
const
|
|
443
|
-
|
|
432
|
+
if ((v.metaKey || v.ctrlKey) && v.key === "b")
|
|
433
|
+
v.preventDefault(), z("bold");
|
|
434
|
+
else if ((v.metaKey || v.ctrlKey) && v.key === "i")
|
|
435
|
+
v.preventDefault(), z("italic");
|
|
436
|
+
else if ((v.metaKey || v.ctrlKey) && v.key === "u")
|
|
437
|
+
v.preventDefault(), z("underline");
|
|
438
|
+
else if (v.key === "Enter" && !v.shiftKey) {
|
|
439
|
+
const I = l.find((M) => M.id === f);
|
|
440
|
+
I && I.type !== "code" && (v.preventDefault(), h("paragraph", f));
|
|
441
|
+
} else if (v.key === "Backspace") {
|
|
442
|
+
const I = l.find((M) => M.id === f);
|
|
443
|
+
I && !I.content && l.length > 1 && (v.preventDefault(), g(f));
|
|
444
444
|
}
|
|
445
445
|
}
|
|
446
446
|
},
|
|
447
|
-
[i, l,
|
|
448
|
-
),
|
|
449
|
-
return /* @__PURE__ */
|
|
447
|
+
[i, l, z, h, g]
|
|
448
|
+
), T = `uiforge-blocks-editor--${a}`;
|
|
449
|
+
return /* @__PURE__ */ m(
|
|
450
450
|
"div",
|
|
451
451
|
{
|
|
452
|
-
className: `uiforge-blocks-editor ${
|
|
452
|
+
className: `uiforge-blocks-editor ${T} ${c}`,
|
|
453
453
|
ref: o,
|
|
454
454
|
style: { maxHeight: s },
|
|
455
455
|
"data-theme": a,
|
|
456
456
|
children: [
|
|
457
|
-
!i && d &&
|
|
457
|
+
!i && d && w && /* @__PURE__ */ n(
|
|
458
458
|
nt,
|
|
459
459
|
{
|
|
460
|
-
selectedBlock: l.find((
|
|
461
|
-
onFormatToggle:
|
|
462
|
-
onBlockTypeChange: (
|
|
460
|
+
selectedBlock: l.find((v) => v.id === w),
|
|
461
|
+
onFormatToggle: z,
|
|
462
|
+
onBlockTypeChange: (v) => A(w, v)
|
|
463
463
|
}
|
|
464
464
|
),
|
|
465
|
-
/* @__PURE__ */ n("div", { className: "uiforge-blocks-editor__content", children: l.map((
|
|
465
|
+
/* @__PURE__ */ n("div", { className: "uiforge-blocks-editor__content", children: l.map((v, f) => /* @__PURE__ */ n(
|
|
466
466
|
it,
|
|
467
467
|
{
|
|
468
|
-
block:
|
|
469
|
-
isSelected:
|
|
470
|
-
isDragging:
|
|
468
|
+
block: v,
|
|
469
|
+
isSelected: w === v.id,
|
|
470
|
+
isDragging: k === v.id,
|
|
471
471
|
readOnly: i,
|
|
472
|
-
placeholder:
|
|
472
|
+
placeholder: f === 0 && l.length === 1 ? r : void 0,
|
|
473
473
|
onSelect: () => {
|
|
474
|
-
|
|
474
|
+
N(v.id), _(!0);
|
|
475
475
|
},
|
|
476
|
-
onChange: (
|
|
477
|
-
onDelete: () =>
|
|
478
|
-
onDragStart: (
|
|
479
|
-
onDragOver:
|
|
480
|
-
onDrop: (
|
|
481
|
-
onDragEnd:
|
|
482
|
-
onKeyDown: (
|
|
476
|
+
onChange: (I) => u(v.id, I),
|
|
477
|
+
onDelete: () => g(v.id),
|
|
478
|
+
onDragStart: (I) => E(I, v.id),
|
|
479
|
+
onDragOver: S,
|
|
480
|
+
onDrop: (I) => C(I, v.id),
|
|
481
|
+
onDragEnd: P,
|
|
482
|
+
onKeyDown: (I) => R(I, v.id)
|
|
483
483
|
},
|
|
484
|
-
|
|
484
|
+
v.id
|
|
485
485
|
)) }),
|
|
486
|
-
!i && /* @__PURE__ */ n(at, { onAddBlock:
|
|
486
|
+
!i && /* @__PURE__ */ n(at, { onAddBlock: h })
|
|
487
487
|
]
|
|
488
488
|
}
|
|
489
489
|
);
|
|
490
490
|
}, nt = ({ selectedBlock: t, onFormatToggle: e, onBlockTypeChange: r }) => {
|
|
491
491
|
if (!t) return null;
|
|
492
492
|
const i = t.format || {};
|
|
493
|
-
return /* @__PURE__ */
|
|
494
|
-
/* @__PURE__ */ n("div", { className: "uiforge-blocks-editor__toolbar-group", children: /* @__PURE__ */
|
|
493
|
+
return /* @__PURE__ */ m("div", { className: "uiforge-blocks-editor__toolbar", role: "toolbar", "aria-label": "Text formatting", children: [
|
|
494
|
+
/* @__PURE__ */ n("div", { className: "uiforge-blocks-editor__toolbar-group", children: /* @__PURE__ */ m(
|
|
495
495
|
"select",
|
|
496
496
|
{
|
|
497
497
|
value: t.type,
|
|
@@ -511,7 +511,7 @@ const Zr = ({
|
|
|
511
511
|
}
|
|
512
512
|
) }),
|
|
513
513
|
/* @__PURE__ */ n("div", { className: "uiforge-blocks-editor__toolbar-divider" }),
|
|
514
|
-
/* @__PURE__ */
|
|
514
|
+
/* @__PURE__ */ m("div", { className: "uiforge-blocks-editor__toolbar-group", children: [
|
|
515
515
|
/* @__PURE__ */ n(
|
|
516
516
|
"button",
|
|
517
517
|
{
|
|
@@ -571,43 +571,43 @@ const Zr = ({
|
|
|
571
571
|
onSelect: c,
|
|
572
572
|
onChange: s,
|
|
573
573
|
onDelete: l,
|
|
574
|
-
onDragStart:
|
|
575
|
-
onDragOver:
|
|
576
|
-
onDrop:
|
|
577
|
-
onDragEnd:
|
|
578
|
-
onKeyDown:
|
|
574
|
+
onDragStart: $,
|
|
575
|
+
onDragOver: w,
|
|
576
|
+
onDrop: N,
|
|
577
|
+
onDragEnd: k,
|
|
578
|
+
onKeyDown: x
|
|
579
579
|
}) => {
|
|
580
580
|
const d = [
|
|
581
581
|
"uiforge-blocks-editor__block",
|
|
582
582
|
`uiforge-blocks-editor__block--${t.type}`,
|
|
583
583
|
e ? "uiforge-blocks-editor__block--selected" : "",
|
|
584
584
|
r ? "uiforge-blocks-editor__block--dragging" : ""
|
|
585
|
-
].filter(Boolean).join(" "),
|
|
585
|
+
].filter(Boolean).join(" "), _ = [
|
|
586
586
|
"uiforge-blocks-editor__block-text",
|
|
587
587
|
t.format?.bold ? "uiforge-blocks-editor__block-text--bold" : "",
|
|
588
588
|
t.format?.italic ? "uiforge-blocks-editor__block-text--italic" : "",
|
|
589
589
|
t.format?.underline ? "uiforge-blocks-editor__block-text--underline" : "",
|
|
590
590
|
t.format?.code ? "uiforge-blocks-editor__block-text--code" : ""
|
|
591
|
-
].filter(Boolean).join(" "), o = (
|
|
592
|
-
s({ content:
|
|
591
|
+
].filter(Boolean).join(" "), o = (h) => {
|
|
592
|
+
s({ content: h.target.value });
|
|
593
593
|
}, u = () => {
|
|
594
|
-
const
|
|
594
|
+
const h = {
|
|
595
595
|
value: t.content,
|
|
596
596
|
onChange: o,
|
|
597
597
|
onFocus: c,
|
|
598
|
-
onKeyDown:
|
|
598
|
+
onKeyDown: x,
|
|
599
599
|
placeholder: a,
|
|
600
600
|
readOnly: i,
|
|
601
|
-
className:
|
|
601
|
+
className: _
|
|
602
602
|
};
|
|
603
603
|
switch (t.type) {
|
|
604
604
|
case "heading1":
|
|
605
605
|
return /* @__PURE__ */ n(
|
|
606
606
|
"input",
|
|
607
607
|
{
|
|
608
|
-
...
|
|
608
|
+
...h,
|
|
609
609
|
type: "text",
|
|
610
|
-
className: `${
|
|
610
|
+
className: `${_} uiforge-blocks-editor__heading1`,
|
|
611
611
|
placeholder: a || "Heading 1"
|
|
612
612
|
}
|
|
613
613
|
);
|
|
@@ -615,9 +615,9 @@ const Zr = ({
|
|
|
615
615
|
return /* @__PURE__ */ n(
|
|
616
616
|
"input",
|
|
617
617
|
{
|
|
618
|
-
...
|
|
618
|
+
...h,
|
|
619
619
|
type: "text",
|
|
620
|
-
className: `${
|
|
620
|
+
className: `${_} uiforge-blocks-editor__heading2`,
|
|
621
621
|
placeholder: a || "Heading 2"
|
|
622
622
|
}
|
|
623
623
|
);
|
|
@@ -625,9 +625,9 @@ const Zr = ({
|
|
|
625
625
|
return /* @__PURE__ */ n(
|
|
626
626
|
"input",
|
|
627
627
|
{
|
|
628
|
-
...
|
|
628
|
+
...h,
|
|
629
629
|
type: "text",
|
|
630
|
-
className: `${
|
|
630
|
+
className: `${_} uiforge-blocks-editor__heading3`,
|
|
631
631
|
placeholder: a || "Heading 3"
|
|
632
632
|
}
|
|
633
633
|
);
|
|
@@ -635,8 +635,8 @@ const Zr = ({
|
|
|
635
635
|
return /* @__PURE__ */ n(
|
|
636
636
|
"textarea",
|
|
637
637
|
{
|
|
638
|
-
...
|
|
639
|
-
className: `${
|
|
638
|
+
...h,
|
|
639
|
+
className: `${_} uiforge-blocks-editor__code`,
|
|
640
640
|
placeholder: a || "Code block",
|
|
641
641
|
rows: 4
|
|
642
642
|
}
|
|
@@ -645,20 +645,20 @@ const Zr = ({
|
|
|
645
645
|
return /* @__PURE__ */ n(
|
|
646
646
|
"textarea",
|
|
647
647
|
{
|
|
648
|
-
...
|
|
649
|
-
className: `${
|
|
648
|
+
...h,
|
|
649
|
+
className: `${_} uiforge-blocks-editor__quote`,
|
|
650
650
|
placeholder: a || "Quote",
|
|
651
651
|
rows: 2
|
|
652
652
|
}
|
|
653
653
|
);
|
|
654
654
|
case "image":
|
|
655
|
-
return /* @__PURE__ */
|
|
655
|
+
return /* @__PURE__ */ m("div", { className: "uiforge-blocks-editor__image-block", children: [
|
|
656
656
|
/* @__PURE__ */ n(
|
|
657
657
|
"input",
|
|
658
658
|
{
|
|
659
659
|
type: "text",
|
|
660
660
|
value: t.imageUrl || "",
|
|
661
|
-
onChange: (
|
|
661
|
+
onChange: (g) => s({ imageUrl: g.target.value }),
|
|
662
662
|
placeholder: "Image URL",
|
|
663
663
|
className: "uiforge-blocks-editor__image-url",
|
|
664
664
|
readOnly: i
|
|
@@ -669,7 +669,7 @@ const Zr = ({
|
|
|
669
669
|
{
|
|
670
670
|
type: "text",
|
|
671
671
|
value: t.imageAlt || "",
|
|
672
|
-
onChange: (
|
|
672
|
+
onChange: (g) => s({ imageAlt: g.target.value }),
|
|
673
673
|
placeholder: "Alt text",
|
|
674
674
|
className: "uiforge-blocks-editor__image-alt",
|
|
675
675
|
readOnly: i
|
|
@@ -688,8 +688,8 @@ const Zr = ({
|
|
|
688
688
|
return /* @__PURE__ */ n(
|
|
689
689
|
"textarea",
|
|
690
690
|
{
|
|
691
|
-
...
|
|
692
|
-
className: `${
|
|
691
|
+
...h,
|
|
692
|
+
className: `${_} uiforge-blocks-editor__paragraph`,
|
|
693
693
|
placeholder: a || "Start typing...",
|
|
694
694
|
rows: 1,
|
|
695
695
|
style: { minHeight: "1.5em" }
|
|
@@ -697,18 +697,18 @@ const Zr = ({
|
|
|
697
697
|
);
|
|
698
698
|
}
|
|
699
699
|
};
|
|
700
|
-
return /* @__PURE__ */
|
|
700
|
+
return /* @__PURE__ */ m(
|
|
701
701
|
"div",
|
|
702
702
|
{
|
|
703
703
|
className: d,
|
|
704
704
|
draggable: !i,
|
|
705
|
-
onDragStart:
|
|
706
|
-
onDragOver:
|
|
707
|
-
onDrop:
|
|
708
|
-
onDragEnd:
|
|
705
|
+
onDragStart: $,
|
|
706
|
+
onDragOver: w,
|
|
707
|
+
onDrop: N,
|
|
708
|
+
onDragEnd: k,
|
|
709
709
|
"data-block-id": t.id,
|
|
710
710
|
children: [
|
|
711
|
-
!i && /* @__PURE__ */
|
|
711
|
+
!i && /* @__PURE__ */ m("div", { className: "uiforge-blocks-editor__block-controls", children: [
|
|
712
712
|
/* @__PURE__ */ n(
|
|
713
713
|
"button",
|
|
714
714
|
{
|
|
@@ -737,7 +737,7 @@ const Zr = ({
|
|
|
737
737
|
);
|
|
738
738
|
}, at = ({ onAddBlock: t }) => {
|
|
739
739
|
const [e, r] = X(!1);
|
|
740
|
-
return /* @__PURE__ */
|
|
740
|
+
return /* @__PURE__ */ m("div", { className: "uiforge-blocks-editor__block-menu", children: [
|
|
741
741
|
/* @__PURE__ */ n(
|
|
742
742
|
"button",
|
|
743
743
|
{
|
|
@@ -758,7 +758,7 @@ const Zr = ({
|
|
|
758
758
|
{ type: "quote", label: "Quote", icon: '"' },
|
|
759
759
|
{ type: "code", label: "Code", icon: "</>" },
|
|
760
760
|
{ type: "image", label: "Image", icon: "🖼" }
|
|
761
|
-
].map(({ type: a, label: c, icon: s }) => /* @__PURE__ */
|
|
761
|
+
].map(({ type: a, label: c, icon: s }) => /* @__PURE__ */ m(
|
|
762
762
|
"button",
|
|
763
763
|
{
|
|
764
764
|
type: "button",
|
|
@@ -785,7 +785,7 @@ function ot(t) {
|
|
|
785
785
|
return "";
|
|
786
786
|
return e;
|
|
787
787
|
}
|
|
788
|
-
function
|
|
788
|
+
function tn(t) {
|
|
789
789
|
return t.map((e) => {
|
|
790
790
|
let r = Le(e.content);
|
|
791
791
|
switch (e.format?.bold && (r = `<strong>${r}</strong>`), e.format?.italic && (r = `<em>${r}</em>`), e.format?.underline && (r = `<u>${r}</u>`), e.format?.code && (r = `<code>${r}</code>`), e.type) {
|
|
@@ -811,7 +811,7 @@ function Xr(t) {
|
|
|
811
811
|
}).join(`
|
|
812
812
|
`);
|
|
813
813
|
}
|
|
814
|
-
function
|
|
814
|
+
function rn(t) {
|
|
815
815
|
return t.map((e) => {
|
|
816
816
|
let r = e.content;
|
|
817
817
|
switch (e.format?.bold && (r = `**${r}**`), e.format?.italic && (r = `*${r}*`), e.format?.code && (r = `\`${r}\``), e.type) {
|
|
@@ -838,10 +838,10 @@ ${e.content}
|
|
|
838
838
|
|
|
839
839
|
`);
|
|
840
840
|
}
|
|
841
|
-
function
|
|
841
|
+
function nn(t) {
|
|
842
842
|
return JSON.stringify(t, null, 2);
|
|
843
843
|
}
|
|
844
|
-
const
|
|
844
|
+
const an = ({
|
|
845
845
|
options: t = [],
|
|
846
846
|
value: e,
|
|
847
847
|
onChange: r,
|
|
@@ -850,26 +850,26 @@ const rn = ({
|
|
|
850
850
|
placeholder: c = "Select an option...",
|
|
851
851
|
disabled: s = !1,
|
|
852
852
|
clearable: l = !1,
|
|
853
|
-
className:
|
|
854
|
-
renderOption:
|
|
855
|
-
renderValue:
|
|
856
|
-
loading:
|
|
857
|
-
maxHeight:
|
|
853
|
+
className: $ = "",
|
|
854
|
+
renderOption: w,
|
|
855
|
+
renderValue: N,
|
|
856
|
+
loading: k = !1,
|
|
857
|
+
maxHeight: x = "300px",
|
|
858
858
|
debounceMs: d = 300,
|
|
859
|
-
searchable:
|
|
859
|
+
searchable: _ = !0,
|
|
860
860
|
noOptionsMessage: o = "No options found",
|
|
861
861
|
ariaLabel: u,
|
|
862
|
-
enableCache:
|
|
863
|
-
cacheTTL:
|
|
864
|
-
refreshOnOpen:
|
|
865
|
-
onClearCache:
|
|
866
|
-
onForceRefresh:
|
|
862
|
+
enableCache: h = !1,
|
|
863
|
+
cacheTTL: g,
|
|
864
|
+
refreshOnOpen: L = !1,
|
|
865
|
+
onClearCache: E,
|
|
866
|
+
onForceRefresh: S
|
|
867
867
|
}) => {
|
|
868
|
-
const [
|
|
868
|
+
const [C, P] = X(!1), [z, A] = X(""), [R, T] = X([]), [v, f] = X(0), [I, M] = X(!1), ae = Q(null), J = Q(null), oe = Q(null), re = Q(null), ce = Q(null), le = Q(i), H = Q(null), he = Q(!1), G = Q(/* @__PURE__ */ new Map()), ne = Q(h), me = Q(g), D = B((p, U = 0) => p.reduce((te, Y) => {
|
|
869
869
|
const W = { ...Y, level: U };
|
|
870
|
-
return te.push(W), Y.children && Y.children.length > 0 && te.push(...
|
|
871
|
-
}, []), []), q = (
|
|
872
|
-
if (!U.trim()) return
|
|
870
|
+
return te.push(W), Y.children && Y.children.length > 0 && te.push(...D(Y.children, U + 1)), te;
|
|
871
|
+
}, []), []), q = (p) => typeof p == "string" && (p.startsWith("http://") || p.startsWith("https://") || p.startsWith("data:") || p.startsWith("/")), y = se(() => D(R.length > 0 ? R : t).find((U) => U.value === e) || null, [e, t, R, D]), j = B((p, U) => {
|
|
872
|
+
if (!U.trim()) return p;
|
|
873
873
|
const te = U.toLowerCase(), Y = (W) => W.reduce((fe, ve) => {
|
|
874
874
|
const $e = ve.label.toLowerCase().includes(te), we = ve.children ? Y(ve.children) : [];
|
|
875
875
|
return ($e || we.length > 0) && fe.push({
|
|
@@ -877,206 +877,206 @@ const rn = ({
|
|
|
877
877
|
children: we.length > 0 ? we : ve.children
|
|
878
878
|
}), fe;
|
|
879
879
|
}, []);
|
|
880
|
-
return Y(
|
|
880
|
+
return Y(p);
|
|
881
881
|
}, []);
|
|
882
882
|
ie(() => {
|
|
883
883
|
le.current = i, ce.current = null;
|
|
884
884
|
}, [i]), ie(() => {
|
|
885
|
-
ne.current =
|
|
886
|
-
}, [
|
|
887
|
-
me.current =
|
|
888
|
-
}, [
|
|
889
|
-
|
|
885
|
+
ne.current = h;
|
|
886
|
+
}, [h]), ie(() => {
|
|
887
|
+
me.current = g;
|
|
888
|
+
}, [g]), ie(() => {
|
|
889
|
+
E && E(() => {
|
|
890
890
|
G.current.clear();
|
|
891
|
-
}),
|
|
891
|
+
}), S && S(() => {
|
|
892
892
|
if (!le.current) return;
|
|
893
893
|
H.current && H.current.abort(), H.current = new AbortController();
|
|
894
|
-
const
|
|
895
|
-
|
|
894
|
+
const p = H.current.signal;
|
|
895
|
+
M(!0), (async () => {
|
|
896
896
|
try {
|
|
897
|
-
const U = Date.now(), te =
|
|
897
|
+
const U = Date.now(), te = z, Y = G.current.get(te), W = Y && (!me.current || U - Y.timestamp < me.current);
|
|
898
898
|
let fe;
|
|
899
|
-
ne.current && W ? fe = Y.data : (fe = await (le.current ? le.current(
|
|
899
|
+
ne.current && W ? fe = Y.data : (fe = await (le.current ? le.current(z, p) : i?.(z, p) ?? []), !p.aborted && ne.current && G.current.set(te, { data: fe, timestamp: U })), p.aborted || (T(fe), ce.current = z);
|
|
900
900
|
} catch (U) {
|
|
901
|
-
console.error(U),
|
|
901
|
+
console.error(U), T([]);
|
|
902
902
|
} finally {
|
|
903
|
-
|
|
903
|
+
M(!1);
|
|
904
904
|
}
|
|
905
905
|
})();
|
|
906
906
|
});
|
|
907
|
-
}, [
|
|
908
|
-
if (i &&
|
|
909
|
-
const
|
|
910
|
-
return
|
|
907
|
+
}, [E, S, z, i]), ie(() => {
|
|
908
|
+
if (i && C) {
|
|
909
|
+
const p = ce.current === z, U = !he.current && C;
|
|
910
|
+
return p && !(L && U) ? void 0 : (re.current && clearTimeout(re.current), re.current = setTimeout(async () => {
|
|
911
911
|
H.current && H.current.abort(), H.current = new AbortController();
|
|
912
912
|
const Y = H.current.signal;
|
|
913
|
-
|
|
913
|
+
M(!0);
|
|
914
914
|
try {
|
|
915
915
|
let W;
|
|
916
|
-
const fe =
|
|
917
|
-
if (ne.current && we ? W = ve.data : (W = await (le.current ? le.current(
|
|
918
|
-
|
|
916
|
+
const fe = z, ve = G.current.get(fe), $e = Date.now(), we = ve && (!me.current || $e - ve.timestamp < me.current);
|
|
917
|
+
if (ne.current && we ? W = ve.data : (W = await (le.current ? le.current(z, Y) : i(z, Y)), !Y.aborted && ne.current && G.current.set(fe, { data: W, timestamp: $e })), Y.aborted) return;
|
|
918
|
+
T(W), ce.current = z;
|
|
919
919
|
} catch (W) {
|
|
920
|
-
console.error("Error fetching options:", W),
|
|
920
|
+
console.error("Error fetching options:", W), T([]);
|
|
921
921
|
} finally {
|
|
922
|
-
|
|
922
|
+
M(!1);
|
|
923
923
|
}
|
|
924
924
|
}, d), () => {
|
|
925
925
|
re.current && clearTimeout(re.current), H.current && (H.current.abort(), H.current = null);
|
|
926
926
|
});
|
|
927
|
-
} else i || j(
|
|
928
|
-
he.current =
|
|
929
|
-
}, [
|
|
930
|
-
i ||
|
|
927
|
+
} else i || T(j(t, z));
|
|
928
|
+
he.current = C;
|
|
929
|
+
}, [z, C, t, d, j, L, i]), ie(() => {
|
|
930
|
+
i || T(t);
|
|
931
931
|
}, [t, i]), ie(() => {
|
|
932
|
-
const
|
|
933
|
-
ae.current && !ae.current.contains(U.target) && (
|
|
932
|
+
const p = (U) => {
|
|
933
|
+
ae.current && !ae.current.contains(U.target) && (P(!1), A(""));
|
|
934
934
|
};
|
|
935
|
-
return document.addEventListener("mousedown",
|
|
935
|
+
return document.addEventListener("mousedown", p), () => document.removeEventListener("mousedown", p);
|
|
936
936
|
}, []);
|
|
937
|
-
const F = se(() =>
|
|
938
|
-
const
|
|
937
|
+
const F = se(() => D(R.length > 0 ? R : t).filter((U) => !U.disabled), [R, t, D]), Z = se(() => D(R.length > 0 ? R : t), [R, t, D]), de = se(() => {
|
|
938
|
+
const p = /* @__PURE__ */ new Map();
|
|
939
939
|
return Z.forEach((U) => {
|
|
940
940
|
const te = JSON.stringify({ value: U.value, label: U.label }), Y = F.findIndex(
|
|
941
941
|
(W) => W.value === U.value && W.label === U.label
|
|
942
942
|
);
|
|
943
|
-
|
|
944
|
-
}),
|
|
945
|
-
}, [Z, F]), K = (
|
|
943
|
+
p.set(te, Y);
|
|
944
|
+
}), p;
|
|
945
|
+
}, [Z, F]), K = (p) => {
|
|
946
946
|
if (!s)
|
|
947
|
-
switch (
|
|
947
|
+
switch (p.key) {
|
|
948
948
|
case "ArrowDown":
|
|
949
|
-
|
|
949
|
+
p.preventDefault(), C ? f((U) => U < F.length - 1 ? U + 1 : 0) : P(!0);
|
|
950
950
|
break;
|
|
951
951
|
case "ArrowUp":
|
|
952
|
-
|
|
952
|
+
p.preventDefault(), C && f((U) => U > 0 ? U - 1 : F.length - 1);
|
|
953
953
|
break;
|
|
954
954
|
case "Enter":
|
|
955
|
-
|
|
955
|
+
p.preventDefault(), C && F[v] ? pe(F[v]) : P(!C);
|
|
956
956
|
break;
|
|
957
957
|
case "Escape":
|
|
958
|
-
|
|
958
|
+
p.preventDefault(), P(!1), A("");
|
|
959
959
|
break;
|
|
960
960
|
case "Tab":
|
|
961
|
-
|
|
961
|
+
C && (P(!1), A(""));
|
|
962
962
|
break;
|
|
963
963
|
}
|
|
964
964
|
};
|
|
965
965
|
ie(() => {
|
|
966
|
-
if (
|
|
967
|
-
const
|
|
968
|
-
`[data-index="${
|
|
966
|
+
if (C && oe.current) {
|
|
967
|
+
const p = oe.current.querySelector(
|
|
968
|
+
`[data-index="${v}"]`
|
|
969
969
|
);
|
|
970
|
-
|
|
970
|
+
p && typeof p.scrollIntoView == "function" && p.scrollIntoView({ block: "nearest" });
|
|
971
971
|
}
|
|
972
|
-
}, [
|
|
973
|
-
const pe = (
|
|
974
|
-
|
|
975
|
-
},
|
|
976
|
-
|
|
972
|
+
}, [v, C]);
|
|
973
|
+
const pe = (p) => {
|
|
974
|
+
p.disabled || (r?.(p.value, p), P(!1), A(""), f(0));
|
|
975
|
+
}, ye = (p) => {
|
|
976
|
+
p.stopPropagation(), r?.(null, null), A("");
|
|
977
977
|
}, ue = () => {
|
|
978
|
-
s ||
|
|
979
|
-
const U = !
|
|
978
|
+
s || P((p) => {
|
|
979
|
+
const U = !p;
|
|
980
980
|
return U && setTimeout(() => J.current?.focus(), 0), U;
|
|
981
981
|
});
|
|
982
982
|
};
|
|
983
983
|
ie(() => {
|
|
984
|
-
|
|
985
|
-
}, [
|
|
986
|
-
const
|
|
987
|
-
|
|
988
|
-
}, _e = (
|
|
989
|
-
const U = (
|
|
990
|
-
return /* @__PURE__ */
|
|
991
|
-
|
|
984
|
+
C || (ce.current = null);
|
|
985
|
+
}, [C]);
|
|
986
|
+
const ke = (p) => {
|
|
987
|
+
A(p.target.value), C || P(!0), f(0);
|
|
988
|
+
}, _e = (p) => {
|
|
989
|
+
const U = (p.level || 0) * 20;
|
|
990
|
+
return /* @__PURE__ */ m("div", { className: "uiforge-combobox-option-content", style: { paddingLeft: `${U}px` }, children: [
|
|
991
|
+
p.icon && /* @__PURE__ */ n("span", { className: "uiforge-combobox-option-icon", children: q(p.icon) ? /* @__PURE__ */ n(
|
|
992
992
|
"img",
|
|
993
993
|
{
|
|
994
|
-
src:
|
|
994
|
+
src: p.icon,
|
|
995
995
|
alt: "",
|
|
996
996
|
className: "uiforge-combobox-option-icon-img"
|
|
997
997
|
}
|
|
998
|
-
) :
|
|
999
|
-
/* @__PURE__ */ n("span", { className: "uiforge-combobox-option-label", children:
|
|
998
|
+
) : p.icon }),
|
|
999
|
+
/* @__PURE__ */ n("span", { className: "uiforge-combobox-option-label", children: p.label })
|
|
1000
1000
|
] });
|
|
1001
|
-
},
|
|
1002
|
-
|
|
1003
|
-
/* @__PURE__ */ n("span", { className: "uiforge-combobox-value-label", children:
|
|
1004
|
-
] }) : c,
|
|
1005
|
-
|
|
1001
|
+
}, b = (p) => p ? /* @__PURE__ */ m("div", { className: "uiforge-combobox-value-content", children: [
|
|
1002
|
+
p.icon && /* @__PURE__ */ n("span", { className: "uiforge-combobox-value-icon", children: q(p.icon) ? /* @__PURE__ */ n("img", { src: p.icon, alt: "", className: "uiforge-combobox-value-icon-img" }) : p.icon }),
|
|
1003
|
+
/* @__PURE__ */ n("span", { className: "uiforge-combobox-value-label", children: p.label })
|
|
1004
|
+
] }) : c, O = "uiforge-combobox", V = `${O}--${a}`, ee = [
|
|
1005
|
+
O,
|
|
1006
1006
|
V,
|
|
1007
|
-
|
|
1008
|
-
s && `${
|
|
1009
|
-
|
|
1007
|
+
C && `${O}--open`,
|
|
1008
|
+
s && `${O}--disabled`,
|
|
1009
|
+
$
|
|
1010
1010
|
].filter(Boolean).join(" ");
|
|
1011
|
-
return /* @__PURE__ */
|
|
1011
|
+
return /* @__PURE__ */ m(
|
|
1012
1012
|
"div",
|
|
1013
1013
|
{
|
|
1014
1014
|
ref: ae,
|
|
1015
1015
|
className: ee,
|
|
1016
1016
|
onKeyDown: K,
|
|
1017
1017
|
role: "combobox",
|
|
1018
|
-
"aria-expanded":
|
|
1018
|
+
"aria-expanded": C,
|
|
1019
1019
|
"aria-haspopup": "listbox",
|
|
1020
1020
|
"aria-label": u,
|
|
1021
1021
|
"aria-disabled": s,
|
|
1022
1022
|
tabIndex: s ? -1 : 0,
|
|
1023
1023
|
"data-theme": a,
|
|
1024
1024
|
children: [
|
|
1025
|
-
/* @__PURE__ */
|
|
1026
|
-
|
|
1025
|
+
/* @__PURE__ */ m("div", { className: `${O}-control`, onClick: ue, children: [
|
|
1026
|
+
_ && C ? /* @__PURE__ */ n(
|
|
1027
1027
|
"input",
|
|
1028
1028
|
{
|
|
1029
1029
|
ref: J,
|
|
1030
1030
|
type: "text",
|
|
1031
|
-
className: `${
|
|
1032
|
-
value:
|
|
1033
|
-
onChange:
|
|
1031
|
+
className: `${O}-input`,
|
|
1032
|
+
value: z,
|
|
1033
|
+
onChange: ke,
|
|
1034
1034
|
placeholder: c,
|
|
1035
1035
|
disabled: s,
|
|
1036
1036
|
"aria-autocomplete": "list",
|
|
1037
|
-
"aria-controls": `${
|
|
1037
|
+
"aria-controls": `${O}-listbox`
|
|
1038
1038
|
}
|
|
1039
|
-
) : /* @__PURE__ */ n("div", { className: `${
|
|
1040
|
-
/* @__PURE__ */
|
|
1039
|
+
) : /* @__PURE__ */ n("div", { className: `${O}-value`, children: N ? N(y) : b(y) }),
|
|
1040
|
+
/* @__PURE__ */ m("div", { className: `${O}-indicators`, children: [
|
|
1041
1041
|
l && e !== null && e !== void 0 && !s && /* @__PURE__ */ n(
|
|
1042
1042
|
"button",
|
|
1043
1043
|
{
|
|
1044
1044
|
type: "button",
|
|
1045
|
-
className: `${
|
|
1046
|
-
onClick:
|
|
1045
|
+
className: `${O}-clear`,
|
|
1046
|
+
onClick: ye,
|
|
1047
1047
|
"aria-label": "Clear selection",
|
|
1048
1048
|
tabIndex: -1,
|
|
1049
1049
|
children: "×"
|
|
1050
1050
|
}
|
|
1051
1051
|
),
|
|
1052
|
-
/* @__PURE__ */ n("span", { className: `${
|
|
1052
|
+
/* @__PURE__ */ n("span", { className: `${O}-arrow`, children: "▼" })
|
|
1053
1053
|
] })
|
|
1054
1054
|
] }),
|
|
1055
|
-
|
|
1055
|
+
C && /* @__PURE__ */ n(
|
|
1056
1056
|
"div",
|
|
1057
1057
|
{
|
|
1058
1058
|
ref: oe,
|
|
1059
|
-
className: `${
|
|
1060
|
-
style: { maxHeight:
|
|
1059
|
+
className: `${O}-dropdown`,
|
|
1060
|
+
style: { maxHeight: x },
|
|
1061
1061
|
role: "listbox",
|
|
1062
|
-
id: `${
|
|
1063
|
-
children:
|
|
1064
|
-
const U = JSON.stringify({ value:
|
|
1065
|
-
`${
|
|
1066
|
-
Y && `${
|
|
1067
|
-
W && `${
|
|
1068
|
-
|
|
1062
|
+
id: `${O}-listbox`,
|
|
1063
|
+
children: k || I ? /* @__PURE__ */ n("div", { className: `${O}-loading`, children: "Loading..." }) : F.length === 0 ? /* @__PURE__ */ n("div", { className: `${O}-no-options`, children: o }) : Z.map((p) => {
|
|
1064
|
+
const U = JSON.stringify({ value: p.value, label: p.label }), te = de.get(U) ?? -1, Y = p.value === e, W = te === v, fe = [
|
|
1065
|
+
`${O}-option`,
|
|
1066
|
+
Y && `${O}-option--selected`,
|
|
1067
|
+
W && `${O}-option--highlighted`,
|
|
1068
|
+
p.disabled && `${O}-option--disabled`
|
|
1069
1069
|
].filter(Boolean).join(" ");
|
|
1070
1070
|
return /* @__PURE__ */ n(
|
|
1071
1071
|
"div",
|
|
1072
1072
|
{
|
|
1073
1073
|
className: fe,
|
|
1074
|
-
onClick: () => pe(
|
|
1074
|
+
onClick: () => pe(p),
|
|
1075
1075
|
role: "option",
|
|
1076
1076
|
"aria-selected": Y,
|
|
1077
|
-
"aria-disabled":
|
|
1077
|
+
"aria-disabled": p.disabled,
|
|
1078
1078
|
"data-index": te,
|
|
1079
|
-
children:
|
|
1079
|
+
children: w ? w(p) : _e(p)
|
|
1080
1080
|
},
|
|
1081
1081
|
U
|
|
1082
1082
|
);
|
|
@@ -1126,37 +1126,37 @@ function Ae(t, e) {
|
|
|
1126
1126
|
e === void 0 && (e = ct);
|
|
1127
1127
|
var r, i = [], a, c = !1;
|
|
1128
1128
|
function s() {
|
|
1129
|
-
for (var l = [],
|
|
1130
|
-
l[
|
|
1129
|
+
for (var l = [], $ = 0; $ < arguments.length; $++)
|
|
1130
|
+
l[$] = arguments[$];
|
|
1131
1131
|
return c && r === this && e(l, i) || (a = t.apply(this, l), c = !0, r = this, i = l), a;
|
|
1132
1132
|
}
|
|
1133
1133
|
return s;
|
|
1134
1134
|
}
|
|
1135
|
-
var dt = typeof performance == "object" && typeof performance.now == "function",
|
|
1135
|
+
var dt = typeof performance == "object" && typeof performance.now == "function", je = dt ? function() {
|
|
1136
1136
|
return performance.now();
|
|
1137
1137
|
} : function() {
|
|
1138
1138
|
return Date.now();
|
|
1139
1139
|
};
|
|
1140
|
-
function
|
|
1140
|
+
function Te(t) {
|
|
1141
1141
|
cancelAnimationFrame(t.id);
|
|
1142
1142
|
}
|
|
1143
1143
|
function ut(t, e) {
|
|
1144
|
-
var r =
|
|
1144
|
+
var r = je();
|
|
1145
1145
|
function i() {
|
|
1146
|
-
|
|
1146
|
+
je() - r >= e ? t.call(null) : a.id = requestAnimationFrame(i);
|
|
1147
1147
|
}
|
|
1148
1148
|
var a = {
|
|
1149
1149
|
id: requestAnimationFrame(i)
|
|
1150
1150
|
};
|
|
1151
1151
|
return a;
|
|
1152
1152
|
}
|
|
1153
|
-
var
|
|
1153
|
+
var De = -1;
|
|
1154
1154
|
function He(t) {
|
|
1155
|
-
if (t === void 0 && (t = !1),
|
|
1155
|
+
if (t === void 0 && (t = !1), De === -1 || t) {
|
|
1156
1156
|
var e = document.createElement("div"), r = e.style;
|
|
1157
|
-
r.width = "50px", r.height = "50px", r.overflow = "scroll", document.body.appendChild(e),
|
|
1157
|
+
r.width = "50px", r.height = "50px", r.overflow = "scroll", document.body.appendChild(e), De = e.offsetWidth - e.clientWidth, document.body.removeChild(e);
|
|
1158
1158
|
}
|
|
1159
|
-
return
|
|
1159
|
+
return De;
|
|
1160
1160
|
}
|
|
1161
1161
|
var be = null;
|
|
1162
1162
|
function We(t) {
|
|
@@ -1174,88 +1174,88 @@ var ht = 150, mt = function(e, r) {
|
|
|
1174
1174
|
}, Ie = null, xe = null;
|
|
1175
1175
|
process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (Ie = /* @__PURE__ */ new WeakSet(), xe = /* @__PURE__ */ new WeakSet());
|
|
1176
1176
|
function ft(t) {
|
|
1177
|
-
var e, r = t.getItemOffset, i = t.getEstimatedTotalSize, a = t.getItemSize, c = t.getOffsetForIndexAndAlignment, s = t.getStartIndexForOffset, l = t.getStopIndexForStartIndex,
|
|
1178
|
-
return e = /* @__PURE__ */ (function(
|
|
1179
|
-
st(
|
|
1180
|
-
function
|
|
1177
|
+
var e, r = t.getItemOffset, i = t.getEstimatedTotalSize, a = t.getItemSize, c = t.getOffsetForIndexAndAlignment, s = t.getStartIndexForOffset, l = t.getStopIndexForStartIndex, $ = t.initInstanceProps, w = t.shouldResetStyleCacheOnItemSizeChange, N = t.validateProps;
|
|
1178
|
+
return e = /* @__PURE__ */ (function(k) {
|
|
1179
|
+
st(x, k);
|
|
1180
|
+
function x(_) {
|
|
1181
1181
|
var o;
|
|
1182
|
-
return o =
|
|
1182
|
+
return o = k.call(this, _) || this, o._instanceProps = $(o.props, Re(o)), o._outerRef = void 0, o._resetIsScrollingTimeoutId = null, o.state = {
|
|
1183
1183
|
instance: Re(o),
|
|
1184
1184
|
isScrolling: !1,
|
|
1185
1185
|
scrollDirection: "forward",
|
|
1186
1186
|
scrollOffset: typeof o.props.initialScrollOffset == "number" ? o.props.initialScrollOffset : 0,
|
|
1187
1187
|
scrollUpdateWasRequested: !1
|
|
1188
|
-
}, o._callOnItemsRendered = void 0, o._callOnItemsRendered = Ae(function(u,
|
|
1188
|
+
}, o._callOnItemsRendered = void 0, o._callOnItemsRendered = Ae(function(u, h, g, L) {
|
|
1189
1189
|
return o.props.onItemsRendered({
|
|
1190
1190
|
overscanStartIndex: u,
|
|
1191
|
-
overscanStopIndex:
|
|
1192
|
-
visibleStartIndex:
|
|
1193
|
-
visibleStopIndex:
|
|
1191
|
+
overscanStopIndex: h,
|
|
1192
|
+
visibleStartIndex: g,
|
|
1193
|
+
visibleStopIndex: L
|
|
1194
1194
|
});
|
|
1195
|
-
}), o._callOnScroll = void 0, o._callOnScroll = Ae(function(u,
|
|
1195
|
+
}), o._callOnScroll = void 0, o._callOnScroll = Ae(function(u, h, g) {
|
|
1196
1196
|
return o.props.onScroll({
|
|
1197
1197
|
scrollDirection: u,
|
|
1198
|
-
scrollOffset:
|
|
1199
|
-
scrollUpdateWasRequested:
|
|
1198
|
+
scrollOffset: h,
|
|
1199
|
+
scrollUpdateWasRequested: g
|
|
1200
1200
|
});
|
|
1201
1201
|
}), o._getItemStyle = void 0, o._getItemStyle = function(u) {
|
|
1202
|
-
var
|
|
1203
|
-
if (
|
|
1204
|
-
|
|
1202
|
+
var h = o.props, g = h.direction, L = h.itemSize, E = h.layout, S = o._getItemStyleCache(w && L, w && E, w && g), C;
|
|
1203
|
+
if (S.hasOwnProperty(u))
|
|
1204
|
+
C = S[u];
|
|
1205
1205
|
else {
|
|
1206
|
-
var
|
|
1207
|
-
|
|
1206
|
+
var P = r(o.props, u, o._instanceProps), z = a(o.props, u, o._instanceProps), A = g === "horizontal" || E === "horizontal", R = g === "rtl", T = A ? P : 0;
|
|
1207
|
+
S[u] = C = {
|
|
1208
1208
|
position: "absolute",
|
|
1209
|
-
left: R ? void 0 :
|
|
1210
|
-
right: R ?
|
|
1211
|
-
top:
|
|
1212
|
-
height:
|
|
1213
|
-
width:
|
|
1209
|
+
left: R ? void 0 : T,
|
|
1210
|
+
right: R ? T : void 0,
|
|
1211
|
+
top: A ? 0 : P,
|
|
1212
|
+
height: A ? "100%" : z,
|
|
1213
|
+
width: A ? z : "100%"
|
|
1214
1214
|
};
|
|
1215
1215
|
}
|
|
1216
|
-
return
|
|
1217
|
-
}, o._getItemStyleCache = void 0, o._getItemStyleCache = Ae(function(u,
|
|
1216
|
+
return C;
|
|
1217
|
+
}, o._getItemStyleCache = void 0, o._getItemStyleCache = Ae(function(u, h, g) {
|
|
1218
1218
|
return {};
|
|
1219
1219
|
}), o._onScrollHorizontal = function(u) {
|
|
1220
|
-
var
|
|
1221
|
-
o.setState(function(
|
|
1222
|
-
if (
|
|
1220
|
+
var h = u.currentTarget, g = h.clientWidth, L = h.scrollLeft, E = h.scrollWidth;
|
|
1221
|
+
o.setState(function(S) {
|
|
1222
|
+
if (S.scrollOffset === L)
|
|
1223
1223
|
return null;
|
|
1224
|
-
var
|
|
1225
|
-
if (
|
|
1224
|
+
var C = o.props.direction, P = L;
|
|
1225
|
+
if (C === "rtl")
|
|
1226
1226
|
switch (We()) {
|
|
1227
1227
|
case "negative":
|
|
1228
|
-
|
|
1228
|
+
P = -L;
|
|
1229
1229
|
break;
|
|
1230
1230
|
case "positive-descending":
|
|
1231
|
-
|
|
1231
|
+
P = E - g - L;
|
|
1232
1232
|
break;
|
|
1233
1233
|
}
|
|
1234
|
-
return
|
|
1234
|
+
return P = Math.max(0, Math.min(P, E - g)), {
|
|
1235
1235
|
isScrolling: !0,
|
|
1236
|
-
scrollDirection:
|
|
1237
|
-
scrollOffset:
|
|
1236
|
+
scrollDirection: S.scrollOffset < P ? "forward" : "backward",
|
|
1237
|
+
scrollOffset: P,
|
|
1238
1238
|
scrollUpdateWasRequested: !1
|
|
1239
1239
|
};
|
|
1240
1240
|
}, o._resetIsScrollingDebounced);
|
|
1241
1241
|
}, o._onScrollVertical = function(u) {
|
|
1242
|
-
var
|
|
1243
|
-
o.setState(function(
|
|
1244
|
-
if (
|
|
1242
|
+
var h = u.currentTarget, g = h.clientHeight, L = h.scrollHeight, E = h.scrollTop;
|
|
1243
|
+
o.setState(function(S) {
|
|
1244
|
+
if (S.scrollOffset === E)
|
|
1245
1245
|
return null;
|
|
1246
|
-
var
|
|
1246
|
+
var C = Math.max(0, Math.min(E, L - g));
|
|
1247
1247
|
return {
|
|
1248
1248
|
isScrolling: !0,
|
|
1249
|
-
scrollDirection:
|
|
1250
|
-
scrollOffset:
|
|
1249
|
+
scrollDirection: S.scrollOffset < C ? "forward" : "backward",
|
|
1250
|
+
scrollOffset: C,
|
|
1251
1251
|
scrollUpdateWasRequested: !1
|
|
1252
1252
|
};
|
|
1253
1253
|
}, o._resetIsScrollingDebounced);
|
|
1254
1254
|
}, o._outerRefSetter = function(u) {
|
|
1255
|
-
var
|
|
1256
|
-
o._outerRef = u, typeof
|
|
1255
|
+
var h = o.props.outerRef;
|
|
1256
|
+
o._outerRef = u, typeof h == "function" ? h(u) : h != null && typeof h == "object" && h.hasOwnProperty("current") && (h.current = u);
|
|
1257
1257
|
}, o._resetIsScrollingDebounced = function() {
|
|
1258
|
-
o._resetIsScrollingTimeoutId !== null &&
|
|
1258
|
+
o._resetIsScrollingTimeoutId !== null && Te(o._resetIsScrollingTimeoutId), o._resetIsScrollingTimeoutId = ut(o._resetIsScrolling, ht);
|
|
1259
1259
|
}, o._resetIsScrolling = function() {
|
|
1260
1260
|
o._resetIsScrollingTimeoutId = null, o.setState({
|
|
1261
1261
|
isScrolling: !1
|
|
@@ -1264,10 +1264,10 @@ function ft(t) {
|
|
|
1264
1264
|
});
|
|
1265
1265
|
}, o;
|
|
1266
1266
|
}
|
|
1267
|
-
|
|
1268
|
-
return pt(o, u),
|
|
1267
|
+
x.getDerivedStateFromProps = function(o, u) {
|
|
1268
|
+
return pt(o, u), N(o), null;
|
|
1269
1269
|
};
|
|
1270
|
-
var d =
|
|
1270
|
+
var d = x.prototype;
|
|
1271
1271
|
return d.scrollTo = function(o) {
|
|
1272
1272
|
o = Math.max(0, o), this.setState(function(u) {
|
|
1273
1273
|
return u.scrollOffset === o ? null : {
|
|
@@ -1278,75 +1278,75 @@ function ft(t) {
|
|
|
1278
1278
|
}, this._resetIsScrollingDebounced);
|
|
1279
1279
|
}, d.scrollToItem = function(o, u) {
|
|
1280
1280
|
u === void 0 && (u = "auto");
|
|
1281
|
-
var
|
|
1282
|
-
o = Math.max(0, Math.min(o,
|
|
1283
|
-
var
|
|
1281
|
+
var h = this.props, g = h.itemCount, L = h.layout, E = this.state.scrollOffset;
|
|
1282
|
+
o = Math.max(0, Math.min(o, g - 1));
|
|
1283
|
+
var S = 0;
|
|
1284
1284
|
if (this._outerRef) {
|
|
1285
|
-
var
|
|
1286
|
-
|
|
1285
|
+
var C = this._outerRef;
|
|
1286
|
+
L === "vertical" ? S = C.scrollWidth > C.clientWidth ? He() : 0 : S = C.scrollHeight > C.clientHeight ? He() : 0;
|
|
1287
1287
|
}
|
|
1288
|
-
this.scrollTo(c(this.props, o, u,
|
|
1288
|
+
this.scrollTo(c(this.props, o, u, E, this._instanceProps, S));
|
|
1289
1289
|
}, d.componentDidMount = function() {
|
|
1290
|
-
var o = this.props, u = o.direction,
|
|
1291
|
-
if (typeof
|
|
1292
|
-
var
|
|
1293
|
-
u === "horizontal" ||
|
|
1290
|
+
var o = this.props, u = o.direction, h = o.initialScrollOffset, g = o.layout;
|
|
1291
|
+
if (typeof h == "number" && this._outerRef != null) {
|
|
1292
|
+
var L = this._outerRef;
|
|
1293
|
+
u === "horizontal" || g === "horizontal" ? L.scrollLeft = h : L.scrollTop = h;
|
|
1294
1294
|
}
|
|
1295
1295
|
this._callPropsCallbacks();
|
|
1296
1296
|
}, d.componentDidUpdate = function() {
|
|
1297
|
-
var o = this.props, u = o.direction,
|
|
1298
|
-
if (
|
|
1299
|
-
var
|
|
1300
|
-
if (u === "horizontal" ||
|
|
1297
|
+
var o = this.props, u = o.direction, h = o.layout, g = this.state, L = g.scrollOffset, E = g.scrollUpdateWasRequested;
|
|
1298
|
+
if (E && this._outerRef != null) {
|
|
1299
|
+
var S = this._outerRef;
|
|
1300
|
+
if (u === "horizontal" || h === "horizontal")
|
|
1301
1301
|
if (u === "rtl")
|
|
1302
1302
|
switch (We()) {
|
|
1303
1303
|
case "negative":
|
|
1304
|
-
|
|
1304
|
+
S.scrollLeft = -L;
|
|
1305
1305
|
break;
|
|
1306
1306
|
case "positive-ascending":
|
|
1307
|
-
|
|
1307
|
+
S.scrollLeft = L;
|
|
1308
1308
|
break;
|
|
1309
1309
|
default:
|
|
1310
|
-
var
|
|
1311
|
-
|
|
1310
|
+
var C = S.clientWidth, P = S.scrollWidth;
|
|
1311
|
+
S.scrollLeft = P - C - L;
|
|
1312
1312
|
break;
|
|
1313
1313
|
}
|
|
1314
1314
|
else
|
|
1315
|
-
|
|
1315
|
+
S.scrollLeft = L;
|
|
1316
1316
|
else
|
|
1317
|
-
|
|
1317
|
+
S.scrollTop = L;
|
|
1318
1318
|
}
|
|
1319
1319
|
this._callPropsCallbacks();
|
|
1320
1320
|
}, d.componentWillUnmount = function() {
|
|
1321
|
-
this._resetIsScrollingTimeoutId !== null &&
|
|
1321
|
+
this._resetIsScrollingTimeoutId !== null && Te(this._resetIsScrollingTimeoutId);
|
|
1322
1322
|
}, d.render = function() {
|
|
1323
|
-
var o = this.props, u = o.children,
|
|
1324
|
-
if (
|
|
1323
|
+
var o = this.props, u = o.children, h = o.className, g = o.direction, L = o.height, E = o.innerRef, S = o.innerElementType, C = o.innerTagName, P = o.itemCount, z = o.itemData, A = o.itemKey, R = A === void 0 ? mt : A, T = o.layout, v = o.outerElementType, f = o.outerTagName, I = o.style, M = o.useIsScrolling, ae = o.width, J = this.state.isScrolling, oe = g === "horizontal" || T === "horizontal", re = oe ? this._onScrollHorizontal : this._onScrollVertical, ce = this._getRangeToRender(), le = ce[0], H = ce[1], he = [];
|
|
1324
|
+
if (P > 0)
|
|
1325
1325
|
for (var G = le; G <= H; G++)
|
|
1326
1326
|
he.push(Se(u, {
|
|
1327
|
-
data:
|
|
1328
|
-
key: R(G,
|
|
1327
|
+
data: z,
|
|
1328
|
+
key: R(G, z),
|
|
1329
1329
|
index: G,
|
|
1330
|
-
isScrolling:
|
|
1330
|
+
isScrolling: M ? J : void 0,
|
|
1331
1331
|
style: this._getItemStyle(G)
|
|
1332
1332
|
}));
|
|
1333
1333
|
var ne = i(this.props, this._instanceProps);
|
|
1334
|
-
return Se(
|
|
1335
|
-
className:
|
|
1334
|
+
return Se(v || f || "div", {
|
|
1335
|
+
className: h,
|
|
1336
1336
|
onScroll: re,
|
|
1337
1337
|
ref: this._outerRefSetter,
|
|
1338
1338
|
style: Ue({
|
|
1339
1339
|
position: "relative",
|
|
1340
|
-
height:
|
|
1340
|
+
height: L,
|
|
1341
1341
|
width: ae,
|
|
1342
1342
|
overflow: "auto",
|
|
1343
1343
|
WebkitOverflowScrolling: "touch",
|
|
1344
1344
|
willChange: "transform",
|
|
1345
|
-
direction:
|
|
1346
|
-
},
|
|
1347
|
-
}, Se(
|
|
1345
|
+
direction: g
|
|
1346
|
+
}, I)
|
|
1347
|
+
}, Se(S || C || "div", {
|
|
1348
1348
|
children: he,
|
|
1349
|
-
ref:
|
|
1349
|
+
ref: E,
|
|
1350
1350
|
style: {
|
|
1351
1351
|
height: oe ? "100%" : ne,
|
|
1352
1352
|
pointerEvents: J ? "none" : void 0,
|
|
@@ -1357,21 +1357,21 @@ function ft(t) {
|
|
|
1357
1357
|
if (typeof this.props.onItemsRendered == "function") {
|
|
1358
1358
|
var o = this.props.itemCount;
|
|
1359
1359
|
if (o > 0) {
|
|
1360
|
-
var u = this._getRangeToRender(),
|
|
1361
|
-
this._callOnItemsRendered(
|
|
1360
|
+
var u = this._getRangeToRender(), h = u[0], g = u[1], L = u[2], E = u[3];
|
|
1361
|
+
this._callOnItemsRendered(h, g, L, E);
|
|
1362
1362
|
}
|
|
1363
1363
|
}
|
|
1364
1364
|
if (typeof this.props.onScroll == "function") {
|
|
1365
|
-
var
|
|
1366
|
-
this._callOnScroll(
|
|
1365
|
+
var S = this.state, C = S.scrollDirection, P = S.scrollOffset, z = S.scrollUpdateWasRequested;
|
|
1366
|
+
this._callOnScroll(C, P, z);
|
|
1367
1367
|
}
|
|
1368
1368
|
}, d._getRangeToRender = function() {
|
|
1369
|
-
var o = this.props, u = o.itemCount,
|
|
1369
|
+
var o = this.props, u = o.itemCount, h = o.overscanCount, g = this.state, L = g.isScrolling, E = g.scrollDirection, S = g.scrollOffset;
|
|
1370
1370
|
if (u === 0)
|
|
1371
1371
|
return [0, 0, 0, 0];
|
|
1372
|
-
var
|
|
1373
|
-
return [Math.max(0,
|
|
1374
|
-
},
|
|
1372
|
+
var C = s(this.props, S, this._instanceProps), P = l(this.props, C, S, this._instanceProps), z = !L || E === "backward" ? Math.max(1, h) : 1, A = !L || E === "forward" ? Math.max(1, h) : 1;
|
|
1373
|
+
return [Math.max(0, C - z), Math.max(0, Math.min(u - 1, P + A)), C, P];
|
|
1374
|
+
}, x;
|
|
1375
1375
|
})(Qe), e.defaultProps = {
|
|
1376
1376
|
direction: "ltr",
|
|
1377
1377
|
itemData: void 0,
|
|
@@ -1381,14 +1381,14 @@ function ft(t) {
|
|
|
1381
1381
|
}, e;
|
|
1382
1382
|
}
|
|
1383
1383
|
var pt = function(e, r) {
|
|
1384
|
-
var i = e.children, a = e.direction, c = e.height, s = e.layout, l = e.innerTagName,
|
|
1384
|
+
var i = e.children, a = e.direction, c = e.height, s = e.layout, l = e.innerTagName, $ = e.outerTagName, w = e.width, N = r.instance;
|
|
1385
1385
|
if (process.env.NODE_ENV !== "production") {
|
|
1386
|
-
(l != null ||
|
|
1387
|
-
var
|
|
1386
|
+
(l != null || $ != null) && xe && !xe.has(N) && (xe.add(N), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead."));
|
|
1387
|
+
var k = a === "horizontal" || s === "horizontal";
|
|
1388
1388
|
switch (a) {
|
|
1389
1389
|
case "horizontal":
|
|
1390
1390
|
case "vertical":
|
|
1391
|
-
Ie && !Ie.has(
|
|
1391
|
+
Ie && !Ie.has(N) && (Ie.add(N), console.warn('The direction prop should be either "ltr" (default) or "rtl". Please use the layout prop to specify "vertical" (default) or "horizontal" orientation.'));
|
|
1392
1392
|
break;
|
|
1393
1393
|
case "ltr":
|
|
1394
1394
|
case "rtl":
|
|
@@ -1405,9 +1405,9 @@ var pt = function(e, r) {
|
|
|
1405
1405
|
}
|
|
1406
1406
|
if (i == null)
|
|
1407
1407
|
throw Error('An invalid "children" prop has been specified. Value should be a React component. ' + ('"' + (i === null ? "null" : typeof i) + '" was specified.'));
|
|
1408
|
-
if (
|
|
1409
|
-
throw Error('An invalid "width" prop has been specified. Horizontal lists must specify a number for width. ' + ('"' + (
|
|
1410
|
-
if (!
|
|
1408
|
+
if (k && typeof w != "number")
|
|
1409
|
+
throw Error('An invalid "width" prop has been specified. Horizontal lists must specify a number for width. ' + ('"' + (w === null ? "null" : typeof w) + '" was specified.'));
|
|
1410
|
+
if (!k && typeof c != "number")
|
|
1411
1411
|
throw Error('An invalid "height" prop has been specified. Vertical lists must specify a number for height. ' + ('"' + (c === null ? "null" : typeof c) + '" was specified.'));
|
|
1412
1412
|
}
|
|
1413
1413
|
}, vt = /* @__PURE__ */ ft({
|
|
@@ -1424,19 +1424,19 @@ var pt = function(e, r) {
|
|
|
1424
1424
|
return i * r;
|
|
1425
1425
|
},
|
|
1426
1426
|
getOffsetForIndexAndAlignment: function(e, r, i, a, c, s) {
|
|
1427
|
-
var l = e.direction,
|
|
1428
|
-
switch (i === "smart" && (a >=
|
|
1427
|
+
var l = e.direction, $ = e.height, w = e.itemCount, N = e.itemSize, k = e.layout, x = e.width, d = l === "horizontal" || k === "horizontal", _ = d ? x : $, o = Math.max(0, w * N - _), u = Math.min(o, r * N), h = Math.max(0, r * N - _ + N + s);
|
|
1428
|
+
switch (i === "smart" && (a >= h - _ && a <= u + _ ? i = "auto" : i = "center"), i) {
|
|
1429
1429
|
case "start":
|
|
1430
1430
|
return u;
|
|
1431
1431
|
case "end":
|
|
1432
|
-
return
|
|
1432
|
+
return h;
|
|
1433
1433
|
case "center": {
|
|
1434
|
-
var
|
|
1435
|
-
return
|
|
1434
|
+
var g = Math.round(h + (u - h) / 2);
|
|
1435
|
+
return g < Math.ceil(_ / 2) ? 0 : g > o + Math.floor(_ / 2) ? o : g;
|
|
1436
1436
|
}
|
|
1437
1437
|
case "auto":
|
|
1438
1438
|
default:
|
|
1439
|
-
return a >=
|
|
1439
|
+
return a >= h && a <= u ? a : a < h ? h : u;
|
|
1440
1440
|
}
|
|
1441
1441
|
},
|
|
1442
1442
|
getStartIndexForOffset: function(e, r) {
|
|
@@ -1444,7 +1444,7 @@ var pt = function(e, r) {
|
|
|
1444
1444
|
return Math.max(0, Math.min(i - 1, Math.floor(r / a)));
|
|
1445
1445
|
},
|
|
1446
1446
|
getStopIndexForStartIndex: function(e, r, i) {
|
|
1447
|
-
var a = e.direction, c = e.height, s = e.itemCount, l = e.itemSize,
|
|
1447
|
+
var a = e.direction, c = e.height, s = e.itemCount, l = e.itemSize, $ = e.layout, w = e.width, N = a === "horizontal" || $ === "horizontal", k = r * l, x = N ? w : c, d = Math.ceil((x + i - k) / l);
|
|
1448
1448
|
return Math.max(0, Math.min(
|
|
1449
1449
|
s - 1,
|
|
1450
1450
|
r + d - 1
|
|
@@ -1472,7 +1472,7 @@ const gt = ({
|
|
|
1472
1472
|
size: t = 16,
|
|
1473
1473
|
className: e = "",
|
|
1474
1474
|
color: r = "currentColor"
|
|
1475
|
-
}) => /* @__PURE__ */
|
|
1475
|
+
}) => /* @__PURE__ */ m("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
|
|
1476
1476
|
/* @__PURE__ */ n("path", { d: "M8 9.5a1.5 1.5 0 100-3 1.5 1.5 0 000 3z" }),
|
|
1477
1477
|
/* @__PURE__ */ n("path", { d: "M8 0a8 8 0 100 16A8 8 0 008 0zM1.5 8a6.5 6.5 0 1113 0 6.5 6.5 0 01-13 0z" })
|
|
1478
1478
|
] }), wt = ({
|
|
@@ -1495,15 +1495,15 @@ const gt = ({
|
|
|
1495
1495
|
size: t = 16,
|
|
1496
1496
|
className: e = "",
|
|
1497
1497
|
color: r = "currentColor"
|
|
1498
|
-
}) => /* @__PURE__ */ n("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: /* @__PURE__ */ n("path", { d: "M7.47 10.78a.75.75 0 001.06 0l3.75-3.75a.75.75 0 00-1.06-1.06L8.75 8.44V1.75a.75.75 0 00-1.5 0v6.69L4.78 5.97a.75.75 0 00-1.06 1.06l3.75 3.75zM3.75 13a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5z" }) }),
|
|
1498
|
+
}) => /* @__PURE__ */ n("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: /* @__PURE__ */ n("path", { d: "M7.47 10.78a.75.75 0 001.06 0l3.75-3.75a.75.75 0 00-1.06-1.06L8.75 8.44V1.75a.75.75 0 00-1.5 0v6.69L4.78 5.97a.75.75 0 00-1.06 1.06l3.75 3.75zM3.75 13a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5z" }) }), Nt = ({
|
|
1499
1499
|
size: t = 16,
|
|
1500
1500
|
className: e = "",
|
|
1501
1501
|
color: r = "currentColor"
|
|
1502
|
-
}) => /* @__PURE__ */ n("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: /* @__PURE__ */ n("path", { d: "M4.53 4.75A.75.75 0 015 6.25h6a.75.75 0 00.53-1.28l-3-3a.75.75 0 00-1.06 0l-3 3zm.47 6.47a.75.75 0 01.53-.22h6a.75.75 0 01.53 1.28l-3 3a.75.75 0 01-1.06 0l-3-3a.75.75 0 01-.01-1.06h.01z" }) }),
|
|
1502
|
+
}) => /* @__PURE__ */ n("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: /* @__PURE__ */ n("path", { d: "M4.53 4.75A.75.75 0 015 6.25h6a.75.75 0 00.53-1.28l-3-3a.75.75 0 00-1.06 0l-3 3zm.47 6.47a.75.75 0 01.53-.22h6a.75.75 0 01.53 1.28l-3 3a.75.75 0 01-1.06 0l-3-3a.75.75 0 01-.01-1.06h.01z" }) }), Ct = ({
|
|
1503
1503
|
size: t = 20,
|
|
1504
1504
|
className: e = "",
|
|
1505
1505
|
color: r = "currentColor"
|
|
1506
|
-
}) => /* @__PURE__ */
|
|
1506
|
+
}) => /* @__PURE__ */ m("svg", { width: t, height: t, viewBox: "0 0 20 20", fill: "none", className: e, children: [
|
|
1507
1507
|
/* @__PURE__ */ n(
|
|
1508
1508
|
"path",
|
|
1509
1509
|
{
|
|
@@ -1534,11 +1534,11 @@ const gt = ({
|
|
|
1534
1534
|
strokeLinejoin: "round"
|
|
1535
1535
|
}
|
|
1536
1536
|
)
|
|
1537
|
-
] }),
|
|
1537
|
+
] }), kt = ({
|
|
1538
1538
|
size: t = 20,
|
|
1539
1539
|
className: e = "",
|
|
1540
1540
|
color: r = "currentColor"
|
|
1541
|
-
}) => /* @__PURE__ */
|
|
1541
|
+
}) => /* @__PURE__ */ m("svg", { width: t, height: t, viewBox: "0 0 20 20", fill: "none", className: e, children: [
|
|
1542
1542
|
/* @__PURE__ */ n(
|
|
1543
1543
|
"path",
|
|
1544
1544
|
{
|
|
@@ -1581,7 +1581,7 @@ const gt = ({
|
|
|
1581
1581
|
size: t = 16,
|
|
1582
1582
|
className: e = "",
|
|
1583
1583
|
color: r = "currentColor"
|
|
1584
|
-
}) => /* @__PURE__ */
|
|
1584
|
+
}) => /* @__PURE__ */ m("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: "none", className: e, children: [
|
|
1585
1585
|
/* @__PURE__ */ n("circle", { cx: "8", cy: "8", r: "7", stroke: r, strokeWidth: "1.5" }),
|
|
1586
1586
|
/* @__PURE__ */ n("path", { d: "M8 1C11.866 1 15 4.134 15 8C15 11.866 11.866 15 8 15", fill: r }),
|
|
1587
1587
|
/* @__PURE__ */ n("circle", { cx: "8", cy: "5", r: "2", fill: r === "currentColor" ? "white" : "#fff" }),
|
|
@@ -1592,23 +1592,23 @@ const gt = ({
|
|
|
1592
1592
|
size: t = 16,
|
|
1593
1593
|
className: e = "",
|
|
1594
1594
|
color: r = "currentColor"
|
|
1595
|
-
}) => /* @__PURE__ */
|
|
1595
|
+
}) => /* @__PURE__ */ m("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
|
|
1596
1596
|
/* @__PURE__ */ n("circle", { cx: "8", cy: "3", r: "1.5" }),
|
|
1597
1597
|
/* @__PURE__ */ n("path", { d: "M8 5C6.5 5 5 6 5 7.5V9C5 9 5.5 10 6 10.5L5 14H7L8 11L9 14H11L10 10.5C10.5 10 11 9 11 9V7.5C11 6 9.5 5 8 5Z" }),
|
|
1598
1598
|
/* @__PURE__ */ n("path", { d: "M4 9L2 10M12 9L14 10", strokeWidth: "1", stroke: r, fill: "none" })
|
|
1599
|
-
] }),
|
|
1599
|
+
] }), Dt = ({
|
|
1600
1600
|
size: t = 16,
|
|
1601
1601
|
className: e = "",
|
|
1602
1602
|
color: r = "currentColor"
|
|
1603
|
-
}) => /* @__PURE__ */
|
|
1603
|
+
}) => /* @__PURE__ */ m("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
|
|
1604
1604
|
/* @__PURE__ */ n("circle", { cx: "8", cy: "2.5", r: "1.5" }),
|
|
1605
1605
|
/* @__PURE__ */ n("path", { d: "M8 4.5L6 8L4 14H6L7 10H9L10 14H12L10 8L8 4.5Z" }),
|
|
1606
1606
|
/* @__PURE__ */ n("path", { d: "M6 8L3 6M10 8L13 6", strokeWidth: "1.5", stroke: r, fill: "none" })
|
|
1607
|
-
] }),
|
|
1607
|
+
] }), Et = ({
|
|
1608
1608
|
size: t = 16,
|
|
1609
1609
|
className: e = "",
|
|
1610
1610
|
color: r = "currentColor"
|
|
1611
|
-
}) => /* @__PURE__ */
|
|
1611
|
+
}) => /* @__PURE__ */ m("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
|
|
1612
1612
|
/* @__PURE__ */ n("rect", { x: "1", y: "6", width: "2", height: "4", rx: "0.5" }),
|
|
1613
1613
|
/* @__PURE__ */ n("rect", { x: "13", y: "6", width: "2", height: "4", rx: "0.5" }),
|
|
1614
1614
|
/* @__PURE__ */ n("rect", { x: "3", y: "5.5", width: "1", height: "5" }),
|
|
@@ -1618,11 +1618,11 @@ const gt = ({
|
|
|
1618
1618
|
size: t = 16,
|
|
1619
1619
|
className: e = "",
|
|
1620
1620
|
color: r = "currentColor"
|
|
1621
|
-
}) => /* @__PURE__ */
|
|
1621
|
+
}) => /* @__PURE__ */ m("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
|
|
1622
1622
|
/* @__PURE__ */ n("circle", { cx: "10", cy: "2.5", r: "1.5" }),
|
|
1623
1623
|
/* @__PURE__ */ n("path", { d: "M9 4.5L8 6L6 7L4 8L6 9L8 8L10 7L11 9L10 12L9 14H11L12 11L13 9L12 6L10 4.5H9Z" }),
|
|
1624
1624
|
/* @__PURE__ */ n("path", { d: "M6 14H4L5 11" })
|
|
1625
|
-
] }),
|
|
1625
|
+
] }), zt = ({
|
|
1626
1626
|
size: t = 16,
|
|
1627
1627
|
className: e = "",
|
|
1628
1628
|
color: r = "currentColor"
|
|
@@ -1635,18 +1635,18 @@ const gt = ({
|
|
|
1635
1635
|
strokeLinecap: "round",
|
|
1636
1636
|
strokeLinejoin: "round"
|
|
1637
1637
|
}
|
|
1638
|
-
) }),
|
|
1638
|
+
) }), Ot = ({
|
|
1639
1639
|
size: t = 16,
|
|
1640
1640
|
className: e = "",
|
|
1641
1641
|
color: r = "currentColor"
|
|
1642
|
-
}) => /* @__PURE__ */
|
|
1642
|
+
}) => /* @__PURE__ */ m("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
|
|
1643
1643
|
/* @__PURE__ */ n("path", { d: "M4 8C4 6 5 4 7 4C8 4 8.5 4.5 8.5 5.5C8.5 6 8.8 6.5 9.5 6.5C10.5 6.5 11 7 11 8C11 9.5 10 11 8 12C6 13 4 12 4 10V8Z" }),
|
|
1644
1644
|
/* @__PURE__ */ n("circle", { cx: "7", cy: "3", r: "1.5" })
|
|
1645
1645
|
] }), Ut = ({
|
|
1646
1646
|
size: t = 16,
|
|
1647
1647
|
className: e = "",
|
|
1648
1648
|
color: r = "currentColor"
|
|
1649
|
-
}) => /* @__PURE__ */
|
|
1649
|
+
}) => /* @__PURE__ */ m("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
|
|
1650
1650
|
/* @__PURE__ */ n("rect", { x: "2", y: "2", width: "12", height: "3", rx: "0.5" }),
|
|
1651
1651
|
/* @__PURE__ */ n("rect", { x: "2", y: "6.5", width: "12", height: "3", rx: "0.5" }),
|
|
1652
1652
|
/* @__PURE__ */ n("rect", { x: "2", y: "11", width: "12", height: "3", rx: "0.5" }),
|
|
@@ -1657,7 +1657,7 @@ const gt = ({
|
|
|
1657
1657
|
size: t = 16,
|
|
1658
1658
|
className: e = "",
|
|
1659
1659
|
color: r = "currentColor"
|
|
1660
|
-
}) => /* @__PURE__ */
|
|
1660
|
+
}) => /* @__PURE__ */ m("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
|
|
1661
1661
|
/* @__PURE__ */ n("ellipse", { cx: "8", cy: "3", rx: "5", ry: "2" }),
|
|
1662
1662
|
/* @__PURE__ */ n("path", { d: "M3 3V13C3 14.1 5.2 15 8 15C10.8 15 13 14.1 13 13V3" }),
|
|
1663
1663
|
/* @__PURE__ */ n("path", { d: "M3 8C3 9.1 5.2 10 8 10C10.8 10 13 9.1 13 8" })
|
|
@@ -1669,7 +1669,7 @@ const gt = ({
|
|
|
1669
1669
|
size: t = 16,
|
|
1670
1670
|
className: e = "",
|
|
1671
1671
|
color: r = "currentColor"
|
|
1672
|
-
}) => /* @__PURE__ */
|
|
1672
|
+
}) => /* @__PURE__ */ m("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
|
|
1673
1673
|
/* @__PURE__ */ n("path", { d: "M0 2.75C0 1.784.784 1 1.75 1h12.5c.966 0 1.75.784 1.75 1.75v10.5A1.75 1.75 0 0114.25 15H1.75A1.75 1.75 0 010 13.25V2.75z" }),
|
|
1674
1674
|
/* @__PURE__ */ n(
|
|
1675
1675
|
"path",
|
|
@@ -1694,11 +1694,11 @@ const gt = ({
|
|
|
1694
1694
|
strokeLinecap: "round"
|
|
1695
1695
|
}
|
|
1696
1696
|
)
|
|
1697
|
-
] }),
|
|
1697
|
+
] }), jt = ({
|
|
1698
1698
|
size: t = 16,
|
|
1699
1699
|
className: e = "",
|
|
1700
1700
|
color: r = "currentColor"
|
|
1701
|
-
}) => /* @__PURE__ */
|
|
1701
|
+
}) => /* @__PURE__ */ m("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
|
|
1702
1702
|
/* @__PURE__ */ n("path", { d: "M4.75 7.5a3.25 3.25 0 116.5 0v3.75a3.25 3.25 0 01-6.5 0V7.5z" }),
|
|
1703
1703
|
/* @__PURE__ */ n(
|
|
1704
1704
|
"path",
|
|
@@ -1710,7 +1710,7 @@ const gt = ({
|
|
|
1710
1710
|
}
|
|
1711
1711
|
),
|
|
1712
1712
|
/* @__PURE__ */ n("ellipse", { cx: "8", cy: "4", rx: "2.5", ry: "1.5" })
|
|
1713
|
-
] }),
|
|
1713
|
+
] }), Tt = ({
|
|
1714
1714
|
size: t = 16,
|
|
1715
1715
|
className: e = "",
|
|
1716
1716
|
color: r = "currentColor"
|
|
@@ -1718,14 +1718,14 @@ const gt = ({
|
|
|
1718
1718
|
size: t = 16,
|
|
1719
1719
|
className: e = "",
|
|
1720
1720
|
color: r = "currentColor"
|
|
1721
|
-
}) => /* @__PURE__ */
|
|
1721
|
+
}) => /* @__PURE__ */ m("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
|
|
1722
1722
|
/* @__PURE__ */ n("path", { d: "M8 0C6 0 4.5 2 3.5 5L1 7L4 8L5 11L7 8.5C9 7.5 11 6 13 3C14 2 15 0 16 0C16 0 14 2 13 3C11 5 9.5 6.5 8 7.5M10 4C10.552 4 11 3.552 11 3C11 2.448 10.552 2 10 2C9.448 2 9 2.448 9 3C9 3.552 9.448 4 10 4Z" }),
|
|
1723
1723
|
/* @__PURE__ */ n("path", { d: "M2 12C2 12 0 14 0 16C2 16 4 14 4 14" })
|
|
1724
1724
|
] }), Wt = ({
|
|
1725
1725
|
size: t = 16,
|
|
1726
1726
|
className: e = "",
|
|
1727
1727
|
color: r = "currentColor"
|
|
1728
|
-
}) => /* @__PURE__ */
|
|
1728
|
+
}) => /* @__PURE__ */ m("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
|
|
1729
1729
|
/* @__PURE__ */ n("rect", { x: "6", y: "6", width: "4", height: "4", rx: "0.5" }),
|
|
1730
1730
|
/* @__PURE__ */ n(
|
|
1731
1731
|
"path",
|
|
@@ -1745,7 +1745,7 @@ const gt = ({
|
|
|
1745
1745
|
size: t = 16,
|
|
1746
1746
|
className: e = "",
|
|
1747
1747
|
color: r = "currentColor"
|
|
1748
|
-
}) => /* @__PURE__ */
|
|
1748
|
+
}) => /* @__PURE__ */ m("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
|
|
1749
1749
|
/* @__PURE__ */ n("path", { d: "M8 1C4 1 2 3 2 6C2 8 2 10 3 11C3.5 11.5 4 12 5 12C5.5 12 6 11.5 6.5 10.5C7 9.5 7.5 9 8 9C8.5 9 9 9.5 9.5 10.5C10 11.5 10.5 12 11 12C12 12 12.5 11.5 13 11C14 10 14 8 14 6C14 3 12 1 8 1Z" }),
|
|
1750
1750
|
/* @__PURE__ */ n("ellipse", { cx: "6", cy: "5.5", rx: "1.5", ry: "2", fill: "white" }),
|
|
1751
1751
|
/* @__PURE__ */ n("ellipse", { cx: "10", cy: "5.5", rx: "1.5", ry: "2", fill: "white" }),
|
|
@@ -1755,7 +1755,7 @@ const gt = ({
|
|
|
1755
1755
|
size: t = 16,
|
|
1756
1756
|
className: e = "",
|
|
1757
1757
|
color: r = "currentColor"
|
|
1758
|
-
}) => /* @__PURE__ */
|
|
1758
|
+
}) => /* @__PURE__ */ m("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
|
|
1759
1759
|
/* @__PURE__ */ n("circle", { cx: "8", cy: "8", r: "5" }),
|
|
1760
1760
|
/* @__PURE__ */ n(
|
|
1761
1761
|
"ellipse",
|
|
@@ -1775,7 +1775,7 @@ const gt = ({
|
|
|
1775
1775
|
size: t = 16,
|
|
1776
1776
|
className: e = "",
|
|
1777
1777
|
color: r = "currentColor"
|
|
1778
|
-
}) => /* @__PURE__ */
|
|
1778
|
+
}) => /* @__PURE__ */ m("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
|
|
1779
1779
|
/* @__PURE__ */ n("path", { d: "M1 8L6 6L14 2L12 10L10 8L8 14H6L8 8L1 8Z" }),
|
|
1780
1780
|
/* @__PURE__ */ n("path", { d: "M10 8L12 10", strokeWidth: "1.5", stroke: r })
|
|
1781
1781
|
] }), Zt = ({
|
|
@@ -1786,7 +1786,7 @@ const gt = ({
|
|
|
1786
1786
|
size: t = 16,
|
|
1787
1787
|
className: e = "",
|
|
1788
1788
|
color: r = "currentColor"
|
|
1789
|
-
}) => /* @__PURE__ */
|
|
1789
|
+
}) => /* @__PURE__ */ m("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
|
|
1790
1790
|
/* @__PURE__ */ n("circle", { cx: "5", cy: "4", r: "2" }),
|
|
1791
1791
|
/* @__PURE__ */ n("circle", { cx: "11", cy: "4", r: "2" }),
|
|
1792
1792
|
/* @__PURE__ */ n("path", { d: "M1 14V12C1 10.5 2.5 9 5 9C7.5 9 9 10.5 9 12V14H1Z" }),
|
|
@@ -1795,7 +1795,7 @@ const gt = ({
|
|
|
1795
1795
|
size: t = 16,
|
|
1796
1796
|
className: e = "",
|
|
1797
1797
|
color: r = "currentColor"
|
|
1798
|
-
}) => /* @__PURE__ */
|
|
1798
|
+
}) => /* @__PURE__ */ m("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
|
|
1799
1799
|
/* @__PURE__ */ n("path", { d: "M3 1.75C3 .784 3.784 0 4.75 0h5.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0113.25 16h-8.5A1.75 1.75 0 013 14.25V1.75z" }),
|
|
1800
1800
|
/* @__PURE__ */ n("path", { d: "M10 0v3.5c0 .275.225.5.5.5H14", fill: r === "currentColor" ? "white" : "#fff" })
|
|
1801
1801
|
] }), Jt = ({
|
|
@@ -1814,14 +1814,14 @@ const gt = ({
|
|
|
1814
1814
|
size: t = 16,
|
|
1815
1815
|
className: e = "",
|
|
1816
1816
|
color: r = "currentColor"
|
|
1817
|
-
}) => /* @__PURE__ */
|
|
1817
|
+
}) => /* @__PURE__ */ m("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
|
|
1818
1818
|
/* @__PURE__ */ n("path", { d: "M3.25 1A2.25 2.25 0 011 3.25v9.5A2.25 2.25 0 013.25 15h9.5A2.25 2.25 0 0115 12.75v-9.5A2.25 2.25 0 0012.75 1h-9.5zM2.5 3.25a.75.75 0 01.75-.75h9.5a.75.75 0 01.75.75v9.5a.75.75 0 01-.75.75h-9.5a.75.75 0 01-.75-.75v-9.5z" }),
|
|
1819
1819
|
/* @__PURE__ */ n("path", { d: "M8 4a.75.75 0 01.75.75v2.5h2.5a.75.75 0 010 1.5h-2.5v2.5a.75.75 0 01-1.5 0v-2.5h-2.5a.75.75 0 010-1.5h2.5v-2.5A.75.75 0 018 4z" })
|
|
1820
1820
|
] }), tr = ({
|
|
1821
1821
|
size: t = 16,
|
|
1822
1822
|
className: e = "",
|
|
1823
1823
|
color: r = "currentColor"
|
|
1824
|
-
}) => /* @__PURE__ */
|
|
1824
|
+
}) => /* @__PURE__ */ m("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
|
|
1825
1825
|
/* @__PURE__ */ n("path", { d: "M6 1h4v1H6V1zM5.5 3h5L13 13c0 1.1-.9 2-2 2H5c-1.1 0-2-.9-2-2L5.5 3z" }),
|
|
1826
1826
|
/* @__PURE__ */ n("circle", { cx: "7", cy: "8", r: "1", fill: r === "currentColor" ? "white" : "#fff", opacity: "0.5" }),
|
|
1827
1827
|
/* @__PURE__ */ n(
|
|
@@ -1838,7 +1838,7 @@ const gt = ({
|
|
|
1838
1838
|
size: t = 16,
|
|
1839
1839
|
className: e = "",
|
|
1840
1840
|
color: r = "currentColor"
|
|
1841
|
-
}) => /* @__PURE__ */
|
|
1841
|
+
}) => /* @__PURE__ */ m("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
|
|
1842
1842
|
/* @__PURE__ */ n("path", { d: "M8 0L0 3v5c0 5 3 7.5 8 8 5-.5 8-3 8-8V3L8 0z" }),
|
|
1843
1843
|
/* @__PURE__ */ n(
|
|
1844
1844
|
"path",
|
|
@@ -1851,7 +1851,7 @@ const gt = ({
|
|
|
1851
1851
|
size: t = 16,
|
|
1852
1852
|
className: e = "",
|
|
1853
1853
|
color: r = "currentColor"
|
|
1854
|
-
}) => /* @__PURE__ */
|
|
1854
|
+
}) => /* @__PURE__ */ m("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
|
|
1855
1855
|
/* @__PURE__ */ n("rect", { x: "1", y: "1", width: "9", height: "11", rx: "1" }),
|
|
1856
1856
|
/* @__PURE__ */ n(
|
|
1857
1857
|
"line",
|
|
@@ -1892,7 +1892,7 @@ const gt = ({
|
|
|
1892
1892
|
size: t = 16,
|
|
1893
1893
|
className: e = "",
|
|
1894
1894
|
color: r = "currentColor"
|
|
1895
|
-
}) => /* @__PURE__ */ n("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: /* @__PURE__ */ n("path", { d: "M4.48 7.27c.26.26 1.28 1.33 1.28 1.33l.56-.58-.88-.91 1.69-1.8s-.76-.74-.43-.45c.32-1.19.03-2.51-.87-3.44C4.93.5 3.66.2 2.52.51l1.93 2-.51 1.96-1.89.52-1.93-2C-.19 4.17.1 5.48 1 6.4c.94.98 2.29 1.26 3.48.87zm6.44 1.94l-2.33 2.3 3.84 3.98c.31.33.73.49 1.14.49.41 0 .82-.16 1.14-.49.63-.65.63-1.7 0-2.35l-3.79-3.93zM16 2.53L13.55 0 6.33 7.46l.88.91-4.31 4.46-.99.53-1.39 2.27.35.37 2.2-1.44.51-1.02L7.9 9.08l.88.91L16 2.53z" }) }),
|
|
1895
|
+
}) => /* @__PURE__ */ n("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: /* @__PURE__ */ n("path", { d: "M4.48 7.27c.26.26 1.28 1.33 1.28 1.33l.56-.58-.88-.91 1.69-1.8s-.76-.74-.43-.45c.32-1.19.03-2.51-.87-3.44C4.93.5 3.66.2 2.52.51l1.93 2-.51 1.96-1.89.52-1.93-2C-.19 4.17.1 5.48 1 6.4c.94.98 2.29 1.26 3.48.87zm6.44 1.94l-2.33 2.3 3.84 3.98c.31.33.73.49 1.14.49.41 0 .82-.16 1.14-.49.63-.65.63-1.7 0-2.35l-3.79-3.93zM16 2.53L13.55 0 6.33 7.46l.88.91-4.31 4.46-.99.53-1.39 2.27.35.37 2.2-1.44.51-1.02L7.9 9.08l.88.91L16 2.53z" }) }), Ne = {
|
|
1896
1896
|
commit: gt,
|
|
1897
1897
|
pr: yt,
|
|
1898
1898
|
issue: bt,
|
|
@@ -1901,41 +1901,41 @@ const gt = ({
|
|
|
1901
1901
|
fork: $t,
|
|
1902
1902
|
merge: It,
|
|
1903
1903
|
release: xt,
|
|
1904
|
-
deploy:
|
|
1905
|
-
},
|
|
1906
|
-
unfold:
|
|
1907
|
-
fold:
|
|
1904
|
+
deploy: Nt
|
|
1905
|
+
}, Ce = {
|
|
1906
|
+
unfold: Ct,
|
|
1907
|
+
fold: kt,
|
|
1908
1908
|
close: St,
|
|
1909
1909
|
check: Mt
|
|
1910
|
-
},
|
|
1910
|
+
}, on = {
|
|
1911
1911
|
taichi: Lt,
|
|
1912
1912
|
meditation: At,
|
|
1913
|
-
yoga:
|
|
1914
|
-
},
|
|
1915
|
-
dumbbell:
|
|
1913
|
+
yoga: Dt
|
|
1914
|
+
}, sn = {
|
|
1915
|
+
dumbbell: Et,
|
|
1916
1916
|
running: Pt,
|
|
1917
|
-
heartrate:
|
|
1918
|
-
strength:
|
|
1919
|
-
},
|
|
1917
|
+
heartrate: zt,
|
|
1918
|
+
strength: Ot
|
|
1919
|
+
}, ln = {
|
|
1920
1920
|
server: Ut,
|
|
1921
1921
|
database: Vt,
|
|
1922
1922
|
cloud: Rt,
|
|
1923
1923
|
terminal: Bt,
|
|
1924
|
-
bug:
|
|
1925
|
-
code:
|
|
1926
|
-
},
|
|
1924
|
+
bug: jt,
|
|
1925
|
+
code: Tt
|
|
1926
|
+
}, cn = {
|
|
1927
1927
|
rocket: Ht,
|
|
1928
1928
|
satellite: Wt,
|
|
1929
1929
|
alien: Ft,
|
|
1930
1930
|
planet: qt,
|
|
1931
1931
|
telescope: Kt
|
|
1932
|
-
},
|
|
1932
|
+
}, dn = {
|
|
1933
1933
|
chart: Zt,
|
|
1934
1934
|
meeting: Gt,
|
|
1935
1935
|
document: Yt,
|
|
1936
1936
|
calendar: Jt,
|
|
1937
1937
|
briefcase: Qt
|
|
1938
|
-
},
|
|
1938
|
+
}, un = {
|
|
1939
1939
|
gitbranch: Xt,
|
|
1940
1940
|
prdraft: er,
|
|
1941
1941
|
testing: tr,
|
|
@@ -1970,12 +1970,12 @@ function sr() {
|
|
|
1970
1970
|
return et(Ze);
|
|
1971
1971
|
}
|
|
1972
1972
|
const lr = (t) => {
|
|
1973
|
-
const e =
|
|
1973
|
+
const e = Ne[t] || Ne.commit;
|
|
1974
1974
|
return /* @__PURE__ */ n(e, { size: 16 });
|
|
1975
1975
|
}, cr = (t) => {
|
|
1976
1976
|
const e = typeof t == "string" ? new Date(t) : t, i = (/* @__PURE__ */ new Date()).getTime() - e.getTime(), a = Math.floor(i / 1e3), c = Math.floor(a / 60), s = Math.floor(c / 60), l = Math.floor(s / 24);
|
|
1977
1977
|
return a < 60 ? "just now" : c < 60 ? `${c}m ago` : s < 24 ? `${s}h ago` : l < 30 ? `${l}d ago` : e.toLocaleDateString();
|
|
1978
|
-
},
|
|
1978
|
+
}, hn = ({
|
|
1979
1979
|
event: t,
|
|
1980
1980
|
expanded: e = !1,
|
|
1981
1981
|
onToggle: r,
|
|
@@ -1984,59 +1984,59 @@ const lr = (t) => {
|
|
|
1984
1984
|
showTimeline: c = !1,
|
|
1985
1985
|
density: s,
|
|
1986
1986
|
showMeta: l,
|
|
1987
|
-
renderIcon:
|
|
1988
|
-
className:
|
|
1987
|
+
renderIcon: $,
|
|
1988
|
+
className: w = ""
|
|
1989
1989
|
}) => {
|
|
1990
|
-
const
|
|
1990
|
+
const N = sr(), k = s ?? N.density, x = l ?? N.showMeta, d = i ?? !!t.description, _ = () => {
|
|
1991
1991
|
d && r && r(t.id, !e);
|
|
1992
|
-
}, o = (
|
|
1993
|
-
d && r && (
|
|
1992
|
+
}, o = (g) => {
|
|
1993
|
+
d && r && (g.key === "Enter" || g.key === " ") && (g.preventDefault(), r(t.id, !e));
|
|
1994
1994
|
}, u = [
|
|
1995
1995
|
"uiforge-activity-item",
|
|
1996
|
-
`uiforge-activity-item--${
|
|
1996
|
+
`uiforge-activity-item--${k}`,
|
|
1997
1997
|
a ? "uiforge-activity-item--child" : "",
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
].filter(Boolean).join(" "),
|
|
1998
|
+
x ? "" : "uiforge-activity-item--hide-meta",
|
|
1999
|
+
w
|
|
2000
|
+
].filter(Boolean).join(" "), h = [
|
|
2001
2001
|
"uiforge-activity-item__header",
|
|
2002
2002
|
d ? "uiforge-activity-item__header--clickable" : ""
|
|
2003
2003
|
].filter(Boolean).join(" ");
|
|
2004
|
-
return /* @__PURE__ */
|
|
2004
|
+
return /* @__PURE__ */ m(
|
|
2005
2005
|
"div",
|
|
2006
2006
|
{
|
|
2007
2007
|
className: u,
|
|
2008
2008
|
"data-event-id": t.id,
|
|
2009
|
-
"data-density":
|
|
2010
|
-
"data-show-meta":
|
|
2009
|
+
"data-density": k,
|
|
2010
|
+
"data-show-meta": x,
|
|
2011
2011
|
children: [
|
|
2012
2012
|
c && !a && /* @__PURE__ */ n("div", { className: "uiforge-activity-item__timeline-marker" }),
|
|
2013
|
-
/* @__PURE__ */ n("div", { className: "uiforge-activity-item__icon", children:
|
|
2014
|
-
/* @__PURE__ */
|
|
2015
|
-
/* @__PURE__ */
|
|
2013
|
+
/* @__PURE__ */ n("div", { className: "uiforge-activity-item__icon", children: $ ? $(t) : t.icon || lr(t.type) }),
|
|
2014
|
+
/* @__PURE__ */ m("div", { className: "uiforge-activity-item__content", children: [
|
|
2015
|
+
/* @__PURE__ */ m(
|
|
2016
2016
|
"div",
|
|
2017
2017
|
{
|
|
2018
|
-
className:
|
|
2019
|
-
onClick:
|
|
2018
|
+
className: h,
|
|
2019
|
+
onClick: _,
|
|
2020
2020
|
onKeyDown: o,
|
|
2021
2021
|
role: d ? "button" : void 0,
|
|
2022
2022
|
tabIndex: d ? 0 : void 0,
|
|
2023
2023
|
"aria-expanded": d ? e : void 0,
|
|
2024
2024
|
children: [
|
|
2025
2025
|
/* @__PURE__ */ n("div", { className: "uiforge-activity-item__title", children: t.title }),
|
|
2026
|
-
|
|
2027
|
-
d && /* @__PURE__ */ n("div", { className: "uiforge-activity-item__toggle", children: e ? /* @__PURE__ */ n(
|
|
2026
|
+
x && /* @__PURE__ */ n("div", { className: "uiforge-activity-item__timestamp", children: cr(t.timestamp) }),
|
|
2027
|
+
d && /* @__PURE__ */ n("div", { className: "uiforge-activity-item__toggle", children: e ? /* @__PURE__ */ n(Ce.fold, { size: 16 }) : /* @__PURE__ */ n(Ce.unfold, { size: 16 }) })
|
|
2028
2028
|
]
|
|
2029
2029
|
}
|
|
2030
2030
|
),
|
|
2031
|
-
e && t.description &&
|
|
2031
|
+
e && t.description && x && /* @__PURE__ */ n("div", { className: "uiforge-activity-item__description", children: t.description })
|
|
2032
2032
|
] })
|
|
2033
2033
|
]
|
|
2034
2034
|
}
|
|
2035
2035
|
);
|
|
2036
2036
|
}, Fe = 400, dr = (t) => {
|
|
2037
|
-
const e =
|
|
2037
|
+
const e = Ne[t] || Ne.commit;
|
|
2038
2038
|
return /* @__PURE__ */ n(e, { size: 16 });
|
|
2039
|
-
},
|
|
2039
|
+
}, Ee = (t, e = 2) => {
|
|
2040
2040
|
if (t.length === 0) return [];
|
|
2041
2041
|
const r = [];
|
|
2042
2042
|
let i = [], a = null;
|
|
@@ -2066,8 +2066,8 @@ const lr = (t) => {
|
|
|
2066
2066
|
}, qe = (t, e) => {
|
|
2067
2067
|
const r = t.reduce(
|
|
2068
2068
|
(s, l) => {
|
|
2069
|
-
const
|
|
2070
|
-
return s[
|
|
2069
|
+
const $ = l.metadata?.repository || "unknown";
|
|
2070
|
+
return s[$] || (s[$] = []), s[$].push(l), s;
|
|
2071
2071
|
},
|
|
2072
2072
|
{}
|
|
2073
2073
|
), i = Object.entries(r), a = i.length > 1;
|
|
@@ -2106,7 +2106,7 @@ const lr = (t) => {
|
|
|
2106
2106
|
merge: "merges",
|
|
2107
2107
|
release: "releases",
|
|
2108
2108
|
deploy: "deployments"
|
|
2109
|
-
})[t] || `${t}s`,
|
|
2109
|
+
})[t] || `${t}s`, ze = (t) => {
|
|
2110
2110
|
if (t.length === 0) return [];
|
|
2111
2111
|
const e = [];
|
|
2112
2112
|
let r = null;
|
|
@@ -2117,20 +2117,20 @@ const lr = (t) => {
|
|
|
2117
2117
|
}
|
|
2118
2118
|
const s = i.timestamp, l = `${s.getFullYear()}-${s.getMonth()}`;
|
|
2119
2119
|
if (l !== r) {
|
|
2120
|
-
const
|
|
2120
|
+
const $ = {
|
|
2121
2121
|
id: `sep-${a}`,
|
|
2122
2122
|
type: "date-separator",
|
|
2123
2123
|
date: s,
|
|
2124
2124
|
label: ur(s)
|
|
2125
2125
|
};
|
|
2126
|
-
e.push(
|
|
2126
|
+
e.push($), r = l;
|
|
2127
2127
|
}
|
|
2128
2128
|
e.push(i);
|
|
2129
2129
|
}), e;
|
|
2130
2130
|
}, ur = (t) => t.toLocaleDateString("en-US", { month: "long", year: "numeric" }), hr = (t) => {
|
|
2131
2131
|
const e = typeof t == "string" ? new Date(t) : t, i = (/* @__PURE__ */ new Date()).getTime() - e.getTime(), a = Math.floor(i / 1e3), c = Math.floor(a / 60), s = Math.floor(c / 60), l = Math.floor(s / 24);
|
|
2132
2132
|
return a < 60 ? "just now" : c < 60 ? `${c}m ago` : s < 24 ? `${s}h ago` : l < 30 ? `${l}d ago` : e.toLocaleDateString();
|
|
2133
|
-
},
|
|
2133
|
+
}, mn = ({
|
|
2134
2134
|
events: t,
|
|
2135
2135
|
theme: e = "light",
|
|
2136
2136
|
className: r = "",
|
|
@@ -2139,29 +2139,29 @@ const lr = (t) => {
|
|
|
2139
2139
|
loading: c = !1,
|
|
2140
2140
|
onLoadMore: s,
|
|
2141
2141
|
pagination: l,
|
|
2142
|
-
maxHeight:
|
|
2143
|
-
showMoreThreshold:
|
|
2144
|
-
initiallyExpandedAll:
|
|
2145
|
-
emptyMessage:
|
|
2146
|
-
onToggleExpand:
|
|
2142
|
+
maxHeight: $,
|
|
2143
|
+
showMoreThreshold: w = 100,
|
|
2144
|
+
initiallyExpandedAll: N = !1,
|
|
2145
|
+
emptyMessage: k = "No activity to display",
|
|
2146
|
+
onToggleExpand: x,
|
|
2147
2147
|
enableGrouping: d = !0,
|
|
2148
|
-
groupingThreshold:
|
|
2148
|
+
groupingThreshold: _ = 2,
|
|
2149
2149
|
showDateSeparators: o = !0,
|
|
2150
2150
|
showTimeline: u = !0,
|
|
2151
|
-
scale:
|
|
2152
|
-
density:
|
|
2153
|
-
responsive:
|
|
2154
|
-
compactBreakpointPx:
|
|
2155
|
-
containerRef:
|
|
2156
|
-
showMeta:
|
|
2157
|
-
renderIcon:
|
|
2158
|
-
renderEvent:
|
|
2159
|
-
virtualization:
|
|
2151
|
+
scale: h,
|
|
2152
|
+
density: g = "comfortable",
|
|
2153
|
+
responsive: L = !0,
|
|
2154
|
+
compactBreakpointPx: E = 640,
|
|
2155
|
+
containerRef: S,
|
|
2156
|
+
showMeta: C,
|
|
2157
|
+
renderIcon: P,
|
|
2158
|
+
renderEvent: z,
|
|
2159
|
+
virtualization: A = !1,
|
|
2160
2160
|
virtualItemHeight: R = 48
|
|
2161
2161
|
}) => {
|
|
2162
|
-
const [
|
|
2163
|
-
const
|
|
2164
|
-
return (d ? o ?
|
|
2162
|
+
const [T, v] = X(() => {
|
|
2163
|
+
const b = /* @__PURE__ */ new Set();
|
|
2164
|
+
return (d ? o ? ze(Ee(t, _)) : Ee(t, _) : t.map((V) => ({
|
|
2165
2165
|
id: V.id.toString(),
|
|
2166
2166
|
type: V.type,
|
|
2167
2167
|
count: 1,
|
|
@@ -2172,14 +2172,14 @@ const lr = (t) => {
|
|
|
2172
2172
|
}))).forEach((V) => {
|
|
2173
2173
|
if ("events" in V && V.type !== "date-separator") {
|
|
2174
2174
|
const ee = V;
|
|
2175
|
-
(
|
|
2176
|
-
(
|
|
2175
|
+
(N || ee.events.some((p) => p.initiallyExpanded)) && b.add(ee.id), ee.children && ee.children.forEach((p) => {
|
|
2176
|
+
(N || p.events.some((U) => U.initiallyExpanded)) && b.add(p.id);
|
|
2177
2177
|
});
|
|
2178
2178
|
}
|
|
2179
|
-
}),
|
|
2180
|
-
}), [
|
|
2179
|
+
}), b;
|
|
2180
|
+
}), [f, I] = X(!1), [M, ae] = X(Fe), J = Q(null), oe = S || J, re = Q(null), ce = Q(null), le = ar(L ? oe : null, E), H = se(() => L && le && g === "comfortable" ? "compact" : g, [L, le, g]), he = se(() => C !== void 0 ? C : !0, [C]), G = se(() => {
|
|
2181
2181
|
if (!d) {
|
|
2182
|
-
const
|
|
2182
|
+
const O = t.map((V) => ({
|
|
2183
2183
|
id: V.id.toString(),
|
|
2184
2184
|
type: V.type,
|
|
2185
2185
|
count: 1,
|
|
@@ -2188,168 +2188,168 @@ const lr = (t) => {
|
|
|
2188
2188
|
icon: V.icon,
|
|
2189
2189
|
events: [V]
|
|
2190
2190
|
}));
|
|
2191
|
-
return o ?
|
|
2191
|
+
return o ? ze(O) : O;
|
|
2192
2192
|
}
|
|
2193
|
-
const
|
|
2194
|
-
return o ?
|
|
2195
|
-
}, [t, d,
|
|
2193
|
+
const b = Ee(t, _);
|
|
2194
|
+
return o ? ze(b) : b;
|
|
2195
|
+
}, [t, d, _, o]), ne = B(() => {
|
|
2196
2196
|
if (!re.current || !a || !s) return;
|
|
2197
|
-
const { scrollTop:
|
|
2198
|
-
|
|
2199
|
-
}, [a, s,
|
|
2200
|
-
({ scrollOffset:
|
|
2197
|
+
const { scrollTop: b, scrollHeight: O, clientHeight: V } = re.current, ee = O - b - V;
|
|
2198
|
+
I(ee <= w);
|
|
2199
|
+
}, [a, s, w]), me = B(
|
|
2200
|
+
({ scrollOffset: b }) => {
|
|
2201
2201
|
if (!a || !s) return;
|
|
2202
|
-
const
|
|
2203
|
-
|
|
2202
|
+
const O = G.length * R, V = M, ee = O - b - V;
|
|
2203
|
+
I(ee <= w);
|
|
2204
2204
|
},
|
|
2205
2205
|
[
|
|
2206
2206
|
a,
|
|
2207
2207
|
s,
|
|
2208
|
-
|
|
2208
|
+
w,
|
|
2209
2209
|
G.length,
|
|
2210
2210
|
R,
|
|
2211
|
-
|
|
2211
|
+
M
|
|
2212
2212
|
]
|
|
2213
2213
|
);
|
|
2214
2214
|
ie(() => {
|
|
2215
|
-
if (!
|
|
2216
|
-
const
|
|
2215
|
+
if (!A || !J.current) return;
|
|
2216
|
+
const b = () => {
|
|
2217
2217
|
const V = J.current;
|
|
2218
2218
|
if (V) {
|
|
2219
2219
|
let ee = V.clientHeight || Fe;
|
|
2220
|
-
if (
|
|
2221
|
-
const
|
|
2222
|
-
!isNaN(
|
|
2220
|
+
if ($) {
|
|
2221
|
+
const p = parseFloat($);
|
|
2222
|
+
!isNaN(p) && p > 0 && (ee = p);
|
|
2223
2223
|
}
|
|
2224
2224
|
ae(ee);
|
|
2225
2225
|
}
|
|
2226
2226
|
};
|
|
2227
|
-
|
|
2228
|
-
const
|
|
2229
|
-
return
|
|
2230
|
-
|
|
2227
|
+
b();
|
|
2228
|
+
const O = new ResizeObserver(b);
|
|
2229
|
+
return O.observe(J.current), () => {
|
|
2230
|
+
O.disconnect();
|
|
2231
2231
|
};
|
|
2232
|
-
}, [
|
|
2233
|
-
const
|
|
2234
|
-
if (
|
|
2235
|
-
return
|
|
2236
|
-
|
|
2232
|
+
}, [A, $]), ie(() => {
|
|
2233
|
+
const b = re.current;
|
|
2234
|
+
if (b)
|
|
2235
|
+
return b.addEventListener("scroll", ne), ne(), () => {
|
|
2236
|
+
b.removeEventListener("scroll", ne);
|
|
2237
2237
|
};
|
|
2238
2238
|
}, [ne]);
|
|
2239
|
-
const
|
|
2240
|
-
(
|
|
2241
|
-
|
|
2242
|
-
const ee = new Set(V),
|
|
2243
|
-
return
|
|
2239
|
+
const D = B(
|
|
2240
|
+
(b, O) => {
|
|
2241
|
+
v((V) => {
|
|
2242
|
+
const ee = new Set(V), p = ee.has(b);
|
|
2243
|
+
return p ? ee.delete(b) : ee.add(b), x?.(O, !p), ee;
|
|
2244
2244
|
});
|
|
2245
2245
|
},
|
|
2246
|
-
[
|
|
2247
|
-
), q = (
|
|
2248
|
-
const V =
|
|
2249
|
-
return
|
|
2246
|
+
[x]
|
|
2247
|
+
), q = (b, O = !1) => {
|
|
2248
|
+
const V = T.has(b.id), ee = b.children && b.children.length > 0, p = b.count > 1, U = b.count === 1 && b.events[0]?.description, te = p || ee || U, Y = b.count === 1 && b.events.length === 1 ? b.events[0].id : b.id;
|
|
2249
|
+
return z && b.count === 1 && b.events.length === 1 ? /* @__PURE__ */ m(
|
|
2250
2250
|
"div",
|
|
2251
2251
|
{
|
|
2252
|
-
className: `activity-stream__item ${
|
|
2253
|
-
"data-event-id":
|
|
2252
|
+
className: `activity-stream__item ${O ? "activity-stream__item--child" : ""}`,
|
|
2253
|
+
"data-event-id": b.id,
|
|
2254
2254
|
children: [
|
|
2255
|
-
u && !
|
|
2256
|
-
|
|
2255
|
+
u && !O && /* @__PURE__ */ n("div", { className: "activity-stream__timeline-marker" }),
|
|
2256
|
+
z(b.events[0])
|
|
2257
2257
|
]
|
|
2258
2258
|
},
|
|
2259
|
-
|
|
2260
|
-
) : /* @__PURE__ */
|
|
2259
|
+
b.id
|
|
2260
|
+
) : /* @__PURE__ */ m(
|
|
2261
2261
|
"div",
|
|
2262
2262
|
{
|
|
2263
|
-
className: `activity-stream__item ${
|
|
2264
|
-
"data-event-id":
|
|
2263
|
+
className: `activity-stream__item ${O ? "activity-stream__item--child" : ""}`,
|
|
2264
|
+
"data-event-id": b.id,
|
|
2265
2265
|
children: [
|
|
2266
|
-
u && !
|
|
2267
|
-
/* @__PURE__ */ n("div", { className: "activity-stream__icon", children:
|
|
2268
|
-
/* @__PURE__ */
|
|
2269
|
-
/* @__PURE__ */
|
|
2266
|
+
u && !O && /* @__PURE__ */ n("div", { className: "activity-stream__timeline-marker" }),
|
|
2267
|
+
/* @__PURE__ */ n("div", { className: "activity-stream__icon", children: P && b.events.length === 1 ? P(b.events[0]) : b.icon || dr(b.type) }),
|
|
2268
|
+
/* @__PURE__ */ m("div", { className: "activity-stream__content", children: [
|
|
2269
|
+
/* @__PURE__ */ m(
|
|
2270
2270
|
"div",
|
|
2271
2271
|
{
|
|
2272
2272
|
className: `activity-stream__header ${te ? "activity-stream__header--clickable" : ""}`,
|
|
2273
|
-
onClick: () => te &&
|
|
2273
|
+
onClick: () => te && D(b.id, Y),
|
|
2274
2274
|
onKeyDown: (W) => {
|
|
2275
|
-
te && (W.key === "Enter" || W.key === " ") && (W.preventDefault(),
|
|
2275
|
+
te && (W.key === "Enter" || W.key === " ") && (W.preventDefault(), D(b.id, Y));
|
|
2276
2276
|
},
|
|
2277
2277
|
role: te ? "button" : void 0,
|
|
2278
2278
|
tabIndex: te ? 0 : void 0,
|
|
2279
2279
|
"aria-expanded": te ? V : void 0,
|
|
2280
2280
|
children: [
|
|
2281
|
-
/* @__PURE__ */ n("div", { className: "activity-stream__title", children:
|
|
2282
|
-
/* @__PURE__ */ n("div", { className: "activity-stream__timestamp", children: hr(
|
|
2283
|
-
te && /* @__PURE__ */ n("div", { className: "activity-stream__toggle", children: V ? /* @__PURE__ */ n(
|
|
2281
|
+
/* @__PURE__ */ n("div", { className: "activity-stream__title", children: b.title }),
|
|
2282
|
+
/* @__PURE__ */ n("div", { className: "activity-stream__timestamp", children: hr(b.timestamp) }),
|
|
2283
|
+
te && /* @__PURE__ */ n("div", { className: "activity-stream__toggle", children: V ? /* @__PURE__ */ n(Ce.fold, { size: 16 }) : /* @__PURE__ */ n(Ce.unfold, { size: 16 }) })
|
|
2284
2284
|
]
|
|
2285
2285
|
}
|
|
2286
2286
|
),
|
|
2287
|
-
V && ee &&
|
|
2288
|
-
V && !ee &&
|
|
2289
|
-
(W) =>
|
|
2287
|
+
V && ee && b.children && /* @__PURE__ */ n("div", { className: "activity-stream__children", children: b.children.map((W) => q(W, !0)) }),
|
|
2288
|
+
V && !ee && b.events.length > 1 && /* @__PURE__ */ n("div", { className: "activity-stream__events-list", children: b.events.map(
|
|
2289
|
+
(W) => z ? /* @__PURE__ */ n("div", { className: "activity-stream__event-item", children: z(W) }, W.id) : /* @__PURE__ */ m("div", { className: "activity-stream__event-item", children: [
|
|
2290
2290
|
/* @__PURE__ */ n("div", { className: "activity-stream__event-title", children: W.title }),
|
|
2291
2291
|
W.description && /* @__PURE__ */ n("div", { className: "activity-stream__event-description", children: W.description })
|
|
2292
2292
|
] }, W.id)
|
|
2293
2293
|
) }),
|
|
2294
|
-
V &&
|
|
2294
|
+
V && b.count === 1 && b.events[0].description && /* @__PURE__ */ n("div", { className: "activity-stream__description", children: b.events[0].description })
|
|
2295
2295
|
] })
|
|
2296
2296
|
]
|
|
2297
2297
|
},
|
|
2298
|
-
|
|
2298
|
+
b.id
|
|
2299
2299
|
);
|
|
2300
|
-
},
|
|
2301
|
-
(
|
|
2302
|
-
if ("type" in
|
|
2303
|
-
const
|
|
2304
|
-
return /* @__PURE__ */
|
|
2305
|
-
/* @__PURE__ */ n("div", { className: "activity-stream__date-label", children:
|
|
2300
|
+
}, y = B(
|
|
2301
|
+
(b) => {
|
|
2302
|
+
if ("type" in b && b.type === "date-separator") {
|
|
2303
|
+
const O = b;
|
|
2304
|
+
return /* @__PURE__ */ m("div", { className: "activity-stream__date-separator", children: [
|
|
2305
|
+
/* @__PURE__ */ n("div", { className: "activity-stream__date-label", children: O.label }),
|
|
2306
2306
|
/* @__PURE__ */ n("div", { className: "activity-stream__date-line" })
|
|
2307
|
-
] },
|
|
2307
|
+
] }, O.id);
|
|
2308
2308
|
}
|
|
2309
|
-
return q(
|
|
2309
|
+
return q(b);
|
|
2310
2310
|
},
|
|
2311
2311
|
// Intentionally omitting renderGroupedEvent from dependencies:
|
|
2312
2312
|
// renderGroupedEvent is an inline function that changes on every render, but its behavior
|
|
2313
2313
|
// only depends on these stable values. Including it would cause unnecessary re-renders.
|
|
2314
2314
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2315
|
-
[
|
|
2316
|
-
),
|
|
2317
|
-
/* @__PURE__ */ n("div", { className: "activity-stream__date-label", children:
|
|
2315
|
+
[T, u, P, z, D]
|
|
2316
|
+
), j = (b) => /* @__PURE__ */ m("div", { className: "activity-stream__date-separator", children: [
|
|
2317
|
+
/* @__PURE__ */ n("div", { className: "activity-stream__date-label", children: b.label }),
|
|
2318
2318
|
/* @__PURE__ */ n("div", { className: "activity-stream__date-line" })
|
|
2319
|
-
] },
|
|
2320
|
-
({ index:
|
|
2321
|
-
const V = G[
|
|
2322
|
-
return V ? /* @__PURE__ */ n("div", { style:
|
|
2319
|
+
] }, b.id), F = B(
|
|
2320
|
+
({ index: b, style: O }) => {
|
|
2321
|
+
const V = G[b];
|
|
2322
|
+
return V ? /* @__PURE__ */ n("div", { style: O, className: "activity-stream__virtual-row", children: y(V) }) : null;
|
|
2323
2323
|
},
|
|
2324
|
-
[G,
|
|
2325
|
-
), Z = l?.hasMore !== void 0 ? l.hasMore : l?.totalItems !== void 0 ? t.length < l.totalItems : !0, de = "activity-stream", K = `${de}--${e}`, pe = u ? `${de}--with-timeline` : "",
|
|
2326
|
-
let ue = `${de} ${K} ${pe} ${
|
|
2327
|
-
|
|
2328
|
-
const
|
|
2324
|
+
[G, y]
|
|
2325
|
+
), Z = l?.hasMore !== void 0 ? l.hasMore : l?.totalItems !== void 0 ? t.length < l.totalItems : !0, de = "activity-stream", K = `${de}--${e}`, pe = u ? `${de}--with-timeline` : "", ye = `${de}--${H}`;
|
|
2326
|
+
let ue = `${de} ${K} ${pe} ${ye} ${r}`.trim();
|
|
2327
|
+
h !== void 0 && h < 1 && (ue = `${ue} ${de}--scale-compact`), h !== void 0 && h > 1 && (ue = `${ue} ${de}--scale-spacious`);
|
|
2328
|
+
const ke = $ ? { maxHeight: $ } : void 0, _e = h !== void 0 ? { "--activity-stream-scale": h } : {};
|
|
2329
2329
|
return /* @__PURE__ */ n(or, { value: { density: H, showMeta: he }, children: /* @__PURE__ */ n(
|
|
2330
2330
|
"div",
|
|
2331
2331
|
{
|
|
2332
2332
|
ref: J,
|
|
2333
|
-
className: `${ue}${
|
|
2333
|
+
className: `${ue}${A ? " activity-stream--virtualized" : ""}`,
|
|
2334
2334
|
"data-theme": e,
|
|
2335
2335
|
"data-density": H,
|
|
2336
2336
|
"data-show-meta": he,
|
|
2337
|
-
"data-virtualized":
|
|
2337
|
+
"data-virtualized": A,
|
|
2338
2338
|
style: i,
|
|
2339
|
-
children:
|
|
2339
|
+
children: A ? (
|
|
2340
2340
|
// Virtualized rendering with react-window
|
|
2341
|
-
/* @__PURE__ */
|
|
2341
|
+
/* @__PURE__ */ m(
|
|
2342
2342
|
"div",
|
|
2343
2343
|
{
|
|
2344
2344
|
className: "activity-stream__container activity-stream__container--virtualized",
|
|
2345
2345
|
style: _e,
|
|
2346
2346
|
children: [
|
|
2347
|
-
G.length === 0 ? /* @__PURE__ */ n("div", { className: "activity-stream__empty", children:
|
|
2347
|
+
G.length === 0 ? /* @__PURE__ */ n("div", { className: "activity-stream__empty", children: k }) : /* @__PURE__ */ n(
|
|
2348
2348
|
vt,
|
|
2349
2349
|
{
|
|
2350
2350
|
ref: ce,
|
|
2351
2351
|
className: "activity-stream__items activity-stream__items--virtualized",
|
|
2352
|
-
height:
|
|
2352
|
+
height: M,
|
|
2353
2353
|
itemCount: G.length,
|
|
2354
2354
|
itemSize: R,
|
|
2355
2355
|
width: "100%",
|
|
@@ -2357,17 +2357,17 @@ const lr = (t) => {
|
|
|
2357
2357
|
children: F
|
|
2358
2358
|
}
|
|
2359
2359
|
),
|
|
2360
|
-
c && /* @__PURE__ */
|
|
2360
|
+
c && /* @__PURE__ */ m("div", { className: "activity-stream__loading", children: [
|
|
2361
2361
|
/* @__PURE__ */ n("div", { className: "activity-stream__spinner" }),
|
|
2362
2362
|
/* @__PURE__ */ n("span", { children: "Loading..." })
|
|
2363
2363
|
] }),
|
|
2364
2364
|
a && !c && Z && s && /* @__PURE__ */ n(
|
|
2365
2365
|
"div",
|
|
2366
2366
|
{
|
|
2367
|
-
className: `activity-stream__load-more ${
|
|
2367
|
+
className: `activity-stream__load-more ${f ? "activity-stream__load-more--visible" : ""}`,
|
|
2368
2368
|
onClick: s,
|
|
2369
|
-
onKeyDown: (
|
|
2370
|
-
(
|
|
2369
|
+
onKeyDown: (b) => {
|
|
2370
|
+
(b.key === "Enter" || b.key === " ") && (b.preventDefault(), s());
|
|
2371
2371
|
},
|
|
2372
2372
|
role: "button",
|
|
2373
2373
|
tabIndex: 0,
|
|
@@ -2380,30 +2380,30 @@ const lr = (t) => {
|
|
|
2380
2380
|
)
|
|
2381
2381
|
) : (
|
|
2382
2382
|
// Standard rendering without virtualization
|
|
2383
|
-
/* @__PURE__ */
|
|
2383
|
+
/* @__PURE__ */ m(
|
|
2384
2384
|
"div",
|
|
2385
2385
|
{
|
|
2386
2386
|
ref: re,
|
|
2387
2387
|
className: "activity-stream__container",
|
|
2388
2388
|
style: {
|
|
2389
|
-
...
|
|
2389
|
+
...ke,
|
|
2390
2390
|
..._e
|
|
2391
2391
|
},
|
|
2392
2392
|
children: [
|
|
2393
|
-
G.length === 0 ? /* @__PURE__ */ n("div", { className: "activity-stream__empty", children:
|
|
2394
|
-
(
|
|
2393
|
+
G.length === 0 ? /* @__PURE__ */ n("div", { className: "activity-stream__empty", children: k }) : /* @__PURE__ */ n("div", { className: "activity-stream__items", children: G.map(
|
|
2394
|
+
(b) => "type" in b && b.type === "date-separator" ? j(b) : q(b)
|
|
2395
2395
|
) }),
|
|
2396
|
-
c && /* @__PURE__ */
|
|
2396
|
+
c && /* @__PURE__ */ m("div", { className: "activity-stream__loading", children: [
|
|
2397
2397
|
/* @__PURE__ */ n("div", { className: "activity-stream__spinner" }),
|
|
2398
2398
|
/* @__PURE__ */ n("span", { children: "Loading..." })
|
|
2399
2399
|
] }),
|
|
2400
2400
|
a && !c && Z && s && /* @__PURE__ */ n(
|
|
2401
2401
|
"div",
|
|
2402
2402
|
{
|
|
2403
|
-
className: `activity-stream__load-more ${
|
|
2403
|
+
className: `activity-stream__load-more ${f ? "activity-stream__load-more--visible" : ""}`,
|
|
2404
2404
|
onClick: s,
|
|
2405
|
-
onKeyDown: (
|
|
2406
|
-
(
|
|
2405
|
+
onKeyDown: (b) => {
|
|
2406
|
+
(b.key === "Enter" || b.key === " ") && (b.preventDefault(), s());
|
|
2407
2407
|
},
|
|
2408
2408
|
role: "button",
|
|
2409
2409
|
tabIndex: 0,
|
|
@@ -2714,7 +2714,7 @@ const lr = (t) => {
|
|
|
2714
2714
|
const i = r.toString();
|
|
2715
2715
|
return `https://fast.wistia.net/embed/iframe/${t}${i ? `?${i}` : ""}`;
|
|
2716
2716
|
}
|
|
2717
|
-
},
|
|
2717
|
+
}, Nr = {
|
|
2718
2718
|
name: "brightcove",
|
|
2719
2719
|
displayName: "Brightcove",
|
|
2720
2720
|
domains: ["brightcove.com", "bcove.video"],
|
|
@@ -2741,7 +2741,7 @@ const lr = (t) => {
|
|
|
2741
2741
|
const [r, ...i] = e, a = i.join(":");
|
|
2742
2742
|
return `https://players.brightcove.net/${r}/default_default/index.html?videoId=${a}`;
|
|
2743
2743
|
}
|
|
2744
|
-
},
|
|
2744
|
+
}, Cr = {
|
|
2745
2745
|
name: "kaltura",
|
|
2746
2746
|
displayName: "Kaltura",
|
|
2747
2747
|
domains: ["kaltura.com"],
|
|
@@ -2768,7 +2768,7 @@ const lr = (t) => {
|
|
|
2768
2768
|
const [r, i, a] = e;
|
|
2769
2769
|
return `https://cdnapisec.kaltura.com/p/${r}/sp/${r}00/embedIframeJs/uiconf_id/${i}/partner_id/${r}?iframeembed=true&entry_id=${a}`;
|
|
2770
2770
|
}
|
|
2771
|
-
},
|
|
2771
|
+
}, kr = {
|
|
2772
2772
|
name: "panopto",
|
|
2773
2773
|
displayName: "Panopto",
|
|
2774
2774
|
domains: ["panopto.com"],
|
|
@@ -2879,7 +2879,7 @@ const lr = (t) => {
|
|
|
2879
2879
|
}
|
|
2880
2880
|
},
|
|
2881
2881
|
getEmbedUrl: (t) => `https://${t}.channel.ivs.aws/stream.m3u8`
|
|
2882
|
-
},
|
|
2882
|
+
}, Dr = {
|
|
2883
2883
|
name: "azure-media",
|
|
2884
2884
|
displayName: "Azure Media Services",
|
|
2885
2885
|
domains: ["azure.net", "azureedge.net"],
|
|
@@ -2906,7 +2906,7 @@ const lr = (t) => {
|
|
|
2906
2906
|
const [r, ...i] = e, a = i.join(":");
|
|
2907
2907
|
return `https://${r}/${a}/manifest`;
|
|
2908
2908
|
}
|
|
2909
|
-
},
|
|
2909
|
+
}, Er = {
|
|
2910
2910
|
name: "google-drive",
|
|
2911
2911
|
displayName: "Google Drive",
|
|
2912
2912
|
domains: ["drive.google.com"],
|
|
@@ -2950,7 +2950,7 @@ const lr = (t) => {
|
|
|
2950
2950
|
return t;
|
|
2951
2951
|
}
|
|
2952
2952
|
}
|
|
2953
|
-
},
|
|
2953
|
+
}, zr = {
|
|
2954
2954
|
name: "facebook",
|
|
2955
2955
|
displayName: "Facebook Video",
|
|
2956
2956
|
domains: ["facebook.com", "fb.watch"],
|
|
@@ -2976,7 +2976,7 @@ const lr = (t) => {
|
|
|
2976
2976
|
}
|
|
2977
2977
|
},
|
|
2978
2978
|
getEmbedUrl: (t) => `https://www.facebook.com/plugins/video.php?href=https%3A%2F%2Fwww.facebook.com%2Fwatch%2F%3Fv%3D${t}`
|
|
2979
|
-
},
|
|
2979
|
+
}, Or = {
|
|
2980
2980
|
name: "instagram",
|
|
2981
2981
|
displayName: "Instagram",
|
|
2982
2982
|
domains: ["instagram.com"],
|
|
@@ -3077,7 +3077,7 @@ const lr = (t) => {
|
|
|
3077
3077
|
}
|
|
3078
3078
|
},
|
|
3079
3079
|
getEmbedUrl: (t) => `https://embed.redtube.com/?id=${t}`
|
|
3080
|
-
},
|
|
3080
|
+
}, jr = {
|
|
3081
3081
|
name: "xhamster",
|
|
3082
3082
|
displayName: "XHamster",
|
|
3083
3083
|
domains: ["xhamster.com"],
|
|
@@ -3096,7 +3096,7 @@ const lr = (t) => {
|
|
|
3096
3096
|
}
|
|
3097
3097
|
},
|
|
3098
3098
|
getEmbedUrl: (t) => `https://xhamster.com/xembed.php?video=${t}`
|
|
3099
|
-
},
|
|
3099
|
+
}, Tr = {
|
|
3100
3100
|
name: "spankbang",
|
|
3101
3101
|
displayName: "SpankBang",
|
|
3102
3102
|
domains: ["spankbang.com"],
|
|
@@ -3130,28 +3130,28 @@ const lr = (t) => {
|
|
|
3130
3130
|
Ir,
|
|
3131
3131
|
// Tier 2: Professional/Enterprise platforms
|
|
3132
3132
|
xr,
|
|
3133
|
+
Nr,
|
|
3133
3134
|
Cr,
|
|
3134
3135
|
kr,
|
|
3135
|
-
Nr,
|
|
3136
3136
|
Sr,
|
|
3137
3137
|
Mr,
|
|
3138
3138
|
Lr,
|
|
3139
3139
|
Ar,
|
|
3140
|
-
Er,
|
|
3141
|
-
// Tier 3: Cloud storage
|
|
3142
3140
|
Dr,
|
|
3141
|
+
// Tier 3: Cloud storage
|
|
3142
|
+
Er,
|
|
3143
3143
|
Pr,
|
|
3144
3144
|
// Tier 4: Social media
|
|
3145
|
-
Or,
|
|
3146
3145
|
zr,
|
|
3146
|
+
Or,
|
|
3147
3147
|
Ur,
|
|
3148
3148
|
// Tier 5: Adult content
|
|
3149
3149
|
Vr,
|
|
3150
3150
|
Rr,
|
|
3151
3151
|
Br,
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
],
|
|
3152
|
+
jr,
|
|
3153
|
+
Tr
|
|
3154
|
+
], Oe = Ge.reduce(
|
|
3155
3155
|
(t, e) => (t[e.name] = e, t),
|
|
3156
3156
|
{}
|
|
3157
3157
|
);
|
|
@@ -3179,14 +3179,14 @@ function Je(t) {
|
|
|
3179
3179
|
videoId: r
|
|
3180
3180
|
} : null;
|
|
3181
3181
|
}
|
|
3182
|
-
function
|
|
3182
|
+
function fn(t, e) {
|
|
3183
3183
|
const r = Je(t);
|
|
3184
3184
|
return r ? r.provider.getEmbedUrl(r.videoId, e) : null;
|
|
3185
3185
|
}
|
|
3186
|
-
function
|
|
3186
|
+
function pn(t) {
|
|
3187
3187
|
return Ye(t)?.tier === "adult";
|
|
3188
3188
|
}
|
|
3189
|
-
const Hr = () => /* @__PURE__ */
|
|
3189
|
+
const Hr = () => /* @__PURE__ */ m(
|
|
3190
3190
|
"svg",
|
|
3191
3191
|
{
|
|
3192
3192
|
width: "64",
|
|
@@ -3200,7 +3200,7 @@ const Hr = () => /* @__PURE__ */ b(
|
|
|
3200
3200
|
/* @__PURE__ */ n("path", { d: "M26 20L46 32L26 44V20Z", fill: "currentColor", style: { color: "#3b82f6" } })
|
|
3201
3201
|
]
|
|
3202
3202
|
}
|
|
3203
|
-
), Wr = () => /* @__PURE__ */
|
|
3203
|
+
), Wr = () => /* @__PURE__ */ m(
|
|
3204
3204
|
"svg",
|
|
3205
3205
|
{
|
|
3206
3206
|
width: "20",
|
|
@@ -3214,7 +3214,7 @@ const Hr = () => /* @__PURE__ */ b(
|
|
|
3214
3214
|
/* @__PURE__ */ n("path", { d: "M8 7l5 3-5 3V7z" })
|
|
3215
3215
|
]
|
|
3216
3216
|
}
|
|
3217
|
-
),
|
|
3217
|
+
), vn = ({
|
|
3218
3218
|
title: t,
|
|
3219
3219
|
description: e,
|
|
3220
3220
|
url: r,
|
|
@@ -3223,28 +3223,28 @@ const Hr = () => /* @__PURE__ */ b(
|
|
|
3223
3223
|
provider: c,
|
|
3224
3224
|
videoId: s,
|
|
3225
3225
|
autoplay: l = !1,
|
|
3226
|
-
muted:
|
|
3227
|
-
loop:
|
|
3228
|
-
startTime:
|
|
3229
|
-
controls:
|
|
3230
|
-
thumbnailUrl:
|
|
3226
|
+
muted: $ = !1,
|
|
3227
|
+
loop: w = !1,
|
|
3228
|
+
startTime: N,
|
|
3229
|
+
controls: k = !0,
|
|
3230
|
+
thumbnailUrl: x,
|
|
3231
3231
|
onPlay: d,
|
|
3232
|
-
onError:
|
|
3232
|
+
onError: _,
|
|
3233
3233
|
onReady: o,
|
|
3234
3234
|
className: u = "",
|
|
3235
|
-
overlayIcon:
|
|
3236
|
-
aspectRatio:
|
|
3237
|
-
width:
|
|
3238
|
-
height:
|
|
3239
|
-
maxHeight:
|
|
3240
|
-
responsive:
|
|
3241
|
-
hideHeader:
|
|
3242
|
-
allowAdultContent:
|
|
3243
|
-
fallback:
|
|
3235
|
+
overlayIcon: h,
|
|
3236
|
+
aspectRatio: g = "16:9",
|
|
3237
|
+
width: L,
|
|
3238
|
+
height: E,
|
|
3239
|
+
maxHeight: S,
|
|
3240
|
+
responsive: C = !1,
|
|
3241
|
+
hideHeader: P = !1,
|
|
3242
|
+
allowAdultContent: z = !1,
|
|
3243
|
+
fallback: A
|
|
3244
3244
|
}) => {
|
|
3245
|
-
const [R,
|
|
3245
|
+
const [R, T] = X(!1), [v, f] = X(null), I = Q(null), M = se(() => {
|
|
3246
3246
|
if (c && s) {
|
|
3247
|
-
const q =
|
|
3247
|
+
const q = Oe[c];
|
|
3248
3248
|
if (q)
|
|
3249
3249
|
return { provider: q, videoId: s, method: "explicit" };
|
|
3250
3250
|
}
|
|
@@ -3254,68 +3254,68 @@ const Hr = () => /* @__PURE__ */ b(
|
|
|
3254
3254
|
return { ...q, method: "url" };
|
|
3255
3255
|
}
|
|
3256
3256
|
if (i) {
|
|
3257
|
-
const q =
|
|
3257
|
+
const q = Oe.youtube;
|
|
3258
3258
|
if (q)
|
|
3259
3259
|
return { provider: q, videoId: i, method: "legacy" };
|
|
3260
3260
|
}
|
|
3261
3261
|
if (a) {
|
|
3262
|
-
const q =
|
|
3262
|
+
const q = Oe.vimeo;
|
|
3263
3263
|
if (q)
|
|
3264
3264
|
return { provider: q, videoId: a, method: "legacy" };
|
|
3265
3265
|
}
|
|
3266
3266
|
return null;
|
|
3267
|
-
}, [r, c, s, i, a]), ae = se(() =>
|
|
3267
|
+
}, [r, c, s, i, a]), ae = se(() => M ? M.provider.tier === "adult" : !1, [M]), J = se(
|
|
3268
3268
|
() => ({
|
|
3269
3269
|
// When user clicks to play, enable autoplay automatically
|
|
3270
3270
|
autoplay: R ? !0 : l,
|
|
3271
|
-
muted:
|
|
3272
|
-
loop:
|
|
3273
|
-
startTime:
|
|
3274
|
-
controls:
|
|
3271
|
+
muted: $,
|
|
3272
|
+
loop: w,
|
|
3273
|
+
startTime: N,
|
|
3274
|
+
controls: k
|
|
3275
3275
|
}),
|
|
3276
|
-
[l,
|
|
3276
|
+
[l, $, w, N, k, R]
|
|
3277
3277
|
), oe = se(() => {
|
|
3278
|
-
if (!
|
|
3278
|
+
if (!M) return "";
|
|
3279
3279
|
try {
|
|
3280
|
-
return
|
|
3280
|
+
return M.provider.getEmbedUrl(M.videoId, J);
|
|
3281
3281
|
} catch (q) {
|
|
3282
3282
|
return console.error("Error generating embed URL:", q), "";
|
|
3283
3283
|
}
|
|
3284
|
-
}, [
|
|
3285
|
-
if (
|
|
3286
|
-
if (
|
|
3287
|
-
return `https://img.youtube.com/vi/${
|
|
3288
|
-
}, [
|
|
3289
|
-
|
|
3290
|
-
}, [
|
|
3284
|
+
}, [M, J]), re = se(() => {
|
|
3285
|
+
if (x) return x;
|
|
3286
|
+
if (M?.provider.name === "youtube")
|
|
3287
|
+
return `https://img.youtube.com/vi/${M.videoId}/maxresdefault.jpg`;
|
|
3288
|
+
}, [x, M]), ce = B(() => {
|
|
3289
|
+
M && (T(!0), d && d(M.videoId, M.provider.name), o && o(M.videoId, M.provider.name));
|
|
3290
|
+
}, [M, d, o]), le = B(
|
|
3291
3291
|
(q) => {
|
|
3292
|
-
|
|
3292
|
+
f(q), _ && M && _(new Error(q), M.provider.name);
|
|
3293
3293
|
},
|
|
3294
|
-
[
|
|
3294
|
+
[_, M]
|
|
3295
3295
|
);
|
|
3296
|
-
if (!
|
|
3297
|
-
return
|
|
3298
|
-
if (ae && !
|
|
3296
|
+
if (!M)
|
|
3297
|
+
return A ? /* @__PURE__ */ n(ge, { children: A }) : (console.warn("UIForgeVideo: No valid video source provided"), null);
|
|
3298
|
+
if (ae && !z) {
|
|
3299
3299
|
const q = "Adult content must be explicitly enabled with allowAdultContent prop";
|
|
3300
|
-
return
|
|
3300
|
+
return A ? /* @__PURE__ */ n(ge, { children: A }) : (console.warn(`UIForgeVideo: ${q}`), /* @__PURE__ */ n("div", { className: "uiforge-video", children: /* @__PURE__ */ n("div", { className: "uiforge-video__error", children: /* @__PURE__ */ n("p", { children: q }) }) }));
|
|
3301
3301
|
}
|
|
3302
|
-
if (
|
|
3303
|
-
return
|
|
3304
|
-
const H = "uiforge-video", he =
|
|
3305
|
-
aspectRatio:
|
|
3306
|
-
width:
|
|
3307
|
-
height:
|
|
3308
|
-
maxHeight:
|
|
3309
|
-
}, me = t || `${
|
|
3310
|
-
return /* @__PURE__ */
|
|
3311
|
-
!
|
|
3302
|
+
if (v)
|
|
3303
|
+
return A ? /* @__PURE__ */ n(ge, { children: A }) : /* @__PURE__ */ n("div", { className: "uiforge-video", children: /* @__PURE__ */ n("div", { className: "uiforge-video__error", children: /* @__PURE__ */ n("p", { children: v }) }) });
|
|
3304
|
+
const H = "uiforge-video", he = C ? `${H}--responsive` : "", G = `${H} ${he} ${u}`.trim(), ne = {
|
|
3305
|
+
aspectRatio: g !== "auto" ? g.replace(":", "/") : void 0,
|
|
3306
|
+
width: L ? typeof L == "number" ? `${L}px` : L : void 0,
|
|
3307
|
+
height: E ? typeof E == "number" ? `${E}px` : E : void 0,
|
|
3308
|
+
maxHeight: S ? typeof S == "number" ? `${S}px` : S : void 0
|
|
3309
|
+
}, me = t || `${M.provider.displayName} Video`;
|
|
3310
|
+
return /* @__PURE__ */ m("div", { className: G, children: [
|
|
3311
|
+
!P && (t || e) && /* @__PURE__ */ m("div", { className: `${H}__header`, children: [
|
|
3312
3312
|
t && /* @__PURE__ */ n("h3", { className: `${H}__title`, children: t }),
|
|
3313
3313
|
e && /* @__PURE__ */ n("p", { className: `${H}__description`, children: e })
|
|
3314
3314
|
] }),
|
|
3315
3315
|
/* @__PURE__ */ n("div", { className: `${H}__player-container`, style: ne, children: R ? /* @__PURE__ */ n(
|
|
3316
3316
|
"iframe",
|
|
3317
3317
|
{
|
|
3318
|
-
ref:
|
|
3318
|
+
ref: I,
|
|
3319
3319
|
src: oe,
|
|
3320
3320
|
title: me,
|
|
3321
3321
|
className: `${H}__iframe`,
|
|
@@ -3323,7 +3323,7 @@ const Hr = () => /* @__PURE__ */ b(
|
|
|
3323
3323
|
allowFullScreen: !0,
|
|
3324
3324
|
onError: () => le("Failed to load video")
|
|
3325
3325
|
}
|
|
3326
|
-
) : /* @__PURE__ */
|
|
3326
|
+
) : /* @__PURE__ */ m(ge, { children: [
|
|
3327
3327
|
re && /* @__PURE__ */ n("img", { src: re, alt: me, className: `${H}__thumbnail` }),
|
|
3328
3328
|
/* @__PURE__ */ n(
|
|
3329
3329
|
"button",
|
|
@@ -3332,25 +3332,25 @@ const Hr = () => /* @__PURE__ */ b(
|
|
|
3332
3332
|
onClick: ce,
|
|
3333
3333
|
"aria-label": `Play video: ${me}`,
|
|
3334
3334
|
type: "button",
|
|
3335
|
-
children:
|
|
3335
|
+
children: h || /* @__PURE__ */ n(Hr, {})
|
|
3336
3336
|
}
|
|
3337
3337
|
)
|
|
3338
3338
|
] }) })
|
|
3339
3339
|
] });
|
|
3340
|
-
},
|
|
3340
|
+
}, gn = ({
|
|
3341
3341
|
title: t,
|
|
3342
3342
|
icon: e,
|
|
3343
3343
|
className: r = "",
|
|
3344
3344
|
onClick: i
|
|
3345
3345
|
}) => {
|
|
3346
3346
|
const a = "uiforge-video-preview", c = `${a} ${r}`.trim();
|
|
3347
|
-
return /* @__PURE__ */
|
|
3347
|
+
return /* @__PURE__ */ m(i ? "button" : "div", { className: c, ...i ? {
|
|
3348
3348
|
type: "button",
|
|
3349
3349
|
onClick: () => {
|
|
3350
3350
|
i && i();
|
|
3351
3351
|
},
|
|
3352
|
-
onKeyDown: (
|
|
3353
|
-
i && (
|
|
3352
|
+
onKeyDown: (N) => {
|
|
3353
|
+
i && (N.key === "Enter" || N.key === " ") && (N.preventDefault(), i());
|
|
3354
3354
|
}
|
|
3355
3355
|
} : {}, children: [
|
|
3356
3356
|
/* @__PURE__ */ n("div", { className: `${a}__icon-container`, children: e || /* @__PURE__ */ n(Wr, {}) }),
|
|
@@ -3366,7 +3366,7 @@ const Hr = () => /* @__PURE__ */ b(
|
|
|
3366
3366
|
'[tabindex]:not([tabindex="-1"])'
|
|
3367
3367
|
].join(", ");
|
|
3368
3368
|
return Array.from(t.querySelectorAll(e));
|
|
3369
|
-
},
|
|
3369
|
+
}, yn = ({
|
|
3370
3370
|
id: t,
|
|
3371
3371
|
variant: e = "static",
|
|
3372
3372
|
open: r = !0,
|
|
@@ -3375,57 +3375,57 @@ const Hr = () => /* @__PURE__ */ b(
|
|
|
3375
3375
|
className: c = "",
|
|
3376
3376
|
ariaLabel: s = "Sidebar navigation",
|
|
3377
3377
|
width: l = "280px",
|
|
3378
|
-
height:
|
|
3379
|
-
position:
|
|
3380
|
-
showBackdrop:
|
|
3381
|
-
closeOnBackdropClick:
|
|
3382
|
-
closeOnEscape:
|
|
3378
|
+
height: $ = "200px",
|
|
3379
|
+
position: w = "left",
|
|
3380
|
+
showBackdrop: N = !0,
|
|
3381
|
+
closeOnBackdropClick: k = !0,
|
|
3382
|
+
closeOnEscape: x = !0,
|
|
3383
3383
|
trapFocus: d = !0
|
|
3384
3384
|
}) => {
|
|
3385
|
-
const
|
|
3386
|
-
|
|
3387
|
-
}, [
|
|
3385
|
+
const _ = Q(null), o = Q(null), u = e === "drawer" || e === "bottom", h = B(() => {
|
|
3386
|
+
k && i && i(!1);
|
|
3387
|
+
}, [k, i]);
|
|
3388
3388
|
ie(() => {
|
|
3389
|
-
if (!u || !r || !
|
|
3390
|
-
const
|
|
3391
|
-
|
|
3389
|
+
if (!u || !r || !x) return;
|
|
3390
|
+
const P = (z) => {
|
|
3391
|
+
z.key === "Escape" && (z.preventDefault(), i?.(!1));
|
|
3392
3392
|
};
|
|
3393
|
-
return document.addEventListener("keydown",
|
|
3394
|
-
}, [u, r,
|
|
3393
|
+
return document.addEventListener("keydown", P), () => document.removeEventListener("keydown", P);
|
|
3394
|
+
}, [u, r, x, i]), ie(() => {
|
|
3395
3395
|
if (!u || !r || !d) return;
|
|
3396
|
-
const
|
|
3397
|
-
if (!
|
|
3396
|
+
const P = _.current;
|
|
3397
|
+
if (!P) return;
|
|
3398
3398
|
o.current = document.activeElement;
|
|
3399
|
-
const
|
|
3400
|
-
|
|
3401
|
-
const
|
|
3399
|
+
const z = Ke(P);
|
|
3400
|
+
z.length > 0 ? z[0].focus() : P.focus();
|
|
3401
|
+
const A = (R) => {
|
|
3402
3402
|
if (R.key !== "Tab") return;
|
|
3403
|
-
const
|
|
3404
|
-
if (
|
|
3405
|
-
const
|
|
3406
|
-
R.shiftKey ? document.activeElement ===
|
|
3403
|
+
const T = Ke(P);
|
|
3404
|
+
if (T.length === 0) return;
|
|
3405
|
+
const v = T[0], f = T[T.length - 1];
|
|
3406
|
+
R.shiftKey ? document.activeElement === v && (R.preventDefault(), f.focus()) : document.activeElement === f && (R.preventDefault(), v.focus());
|
|
3407
3407
|
};
|
|
3408
|
-
return document.addEventListener("keydown",
|
|
3409
|
-
document.removeEventListener("keydown",
|
|
3408
|
+
return document.addEventListener("keydown", A), () => {
|
|
3409
|
+
document.removeEventListener("keydown", A), o.current && typeof o.current.focus == "function" && o.current.focus();
|
|
3410
3410
|
};
|
|
3411
3411
|
}, [u, r, d]), ie(() => {
|
|
3412
3412
|
if (!u || !r) return;
|
|
3413
|
-
const
|
|
3413
|
+
const P = document.body.style.overflow;
|
|
3414
3414
|
return document.body.style.overflow = "hidden", () => {
|
|
3415
|
-
document.body.style.overflow =
|
|
3415
|
+
document.body.style.overflow = P;
|
|
3416
3416
|
};
|
|
3417
3417
|
}, [u, r]);
|
|
3418
|
-
const
|
|
3419
|
-
|
|
3420
|
-
`${
|
|
3421
|
-
`${
|
|
3422
|
-
u && r && `${
|
|
3423
|
-
u && !r && `${
|
|
3418
|
+
const g = "uiforge-sidebar", L = [
|
|
3419
|
+
g,
|
|
3420
|
+
`${g}--${e}`,
|
|
3421
|
+
`${g}--${w}`,
|
|
3422
|
+
u && r && `${g}--open`,
|
|
3423
|
+
u && !r && `${g}--closed`,
|
|
3424
3424
|
c
|
|
3425
|
-
].filter(Boolean).join(" "),
|
|
3425
|
+
].filter(Boolean).join(" "), E = {
|
|
3426
3426
|
"--sidebar-width": l,
|
|
3427
|
-
"--sidebar-height":
|
|
3428
|
-
},
|
|
3427
|
+
"--sidebar-height": $
|
|
3428
|
+
}, C = e === "static" ? {
|
|
3429
3429
|
role: "navigation",
|
|
3430
3430
|
"aria-label": s
|
|
3431
3431
|
} : {
|
|
@@ -3439,18 +3439,18 @@ const Hr = () => /* @__PURE__ */ b(
|
|
|
3439
3439
|
"aside",
|
|
3440
3440
|
{
|
|
3441
3441
|
id: t,
|
|
3442
|
-
ref:
|
|
3443
|
-
className:
|
|
3444
|
-
style:
|
|
3445
|
-
|
|
3446
|
-
children: /* @__PURE__ */ n("div", { className: `${
|
|
3447
|
-
}
|
|
3448
|
-
) : /* @__PURE__ */
|
|
3449
|
-
|
|
3442
|
+
ref: _,
|
|
3443
|
+
className: L,
|
|
3444
|
+
style: E,
|
|
3445
|
+
...C,
|
|
3446
|
+
children: /* @__PURE__ */ n("div", { className: `${g}__content`, children: a })
|
|
3447
|
+
}
|
|
3448
|
+
) : /* @__PURE__ */ m(ge, { children: [
|
|
3449
|
+
N && /* @__PURE__ */ n(
|
|
3450
3450
|
"div",
|
|
3451
3451
|
{
|
|
3452
|
-
className: `${
|
|
3453
|
-
onClick:
|
|
3452
|
+
className: `${g}__backdrop ${r ? `${g}__backdrop--visible` : ""}`,
|
|
3453
|
+
onClick: h,
|
|
3454
3454
|
"aria-hidden": "true"
|
|
3455
3455
|
}
|
|
3456
3456
|
),
|
|
@@ -3458,12 +3458,12 @@ const Hr = () => /* @__PURE__ */ b(
|
|
|
3458
3458
|
"aside",
|
|
3459
3459
|
{
|
|
3460
3460
|
id: t,
|
|
3461
|
-
ref:
|
|
3462
|
-
className:
|
|
3463
|
-
style:
|
|
3461
|
+
ref: _,
|
|
3462
|
+
className: L,
|
|
3463
|
+
style: E,
|
|
3464
3464
|
tabIndex: -1,
|
|
3465
|
-
|
|
3466
|
-
children: /* @__PURE__ */ n("div", { className: `${
|
|
3465
|
+
...C,
|
|
3466
|
+
children: /* @__PURE__ */ n("div", { className: `${g}__content`, children: a })
|
|
3467
3467
|
}
|
|
3468
3468
|
)
|
|
3469
3469
|
] });
|
|
@@ -3476,7 +3476,7 @@ const Hr = () => /* @__PURE__ */ b(
|
|
|
3476
3476
|
className: c = "",
|
|
3477
3477
|
...s
|
|
3478
3478
|
}) => {
|
|
3479
|
-
const l = "uiforge-safe-area-container",
|
|
3479
|
+
const l = "uiforge-safe-area-container", $ = [
|
|
3480
3480
|
l,
|
|
3481
3481
|
e && `${l}--disable-top`,
|
|
3482
3482
|
a && `${l}--disable-right`,
|
|
@@ -3484,8 +3484,8 @@ const Hr = () => /* @__PURE__ */ b(
|
|
|
3484
3484
|
i && `${l}--disable-left`,
|
|
3485
3485
|
c
|
|
3486
3486
|
].filter(Boolean).join(" ");
|
|
3487
|
-
return /* @__PURE__ */ n("div", { className:
|
|
3488
|
-
},
|
|
3487
|
+
return /* @__PURE__ */ n("div", { className: $, ...s, children: t });
|
|
3488
|
+
}, bn = ({
|
|
3489
3489
|
left: t,
|
|
3490
3490
|
title: e,
|
|
3491
3491
|
right: r,
|
|
@@ -3493,13 +3493,13 @@ const Hr = () => /* @__PURE__ */ b(
|
|
|
3493
3493
|
className: a = "",
|
|
3494
3494
|
...c
|
|
3495
3495
|
}) => {
|
|
3496
|
-
const s = "uiforge-mobile-header-layout", l = [s, i && `${s}--hide-on-desktop`, a].filter(Boolean).join(" "),
|
|
3497
|
-
return /* @__PURE__ */ n(Fr, { disableBottom: !0, disableLeft: !0, disableRight: !0, children: /* @__PURE__ */
|
|
3496
|
+
const s = "uiforge-mobile-header-layout", l = [s, i && `${s}--hide-on-desktop`, a].filter(Boolean).join(" "), $ = typeof e == "string";
|
|
3497
|
+
return /* @__PURE__ */ n(Fr, { disableBottom: !0, disableLeft: !0, disableRight: !0, children: /* @__PURE__ */ m("header", { className: l, ...c, children: [
|
|
3498
3498
|
/* @__PURE__ */ n("div", { className: `${s}__left`, children: t }),
|
|
3499
|
-
/* @__PURE__ */ n("div", { className: `${s}__center`, children:
|
|
3499
|
+
/* @__PURE__ */ n("div", { className: `${s}__center`, children: $ ? /* @__PURE__ */ n("span", { className: `${s}__title`, children: e }) : e }),
|
|
3500
3500
|
/* @__PURE__ */ n("div", { className: `${s}__right`, children: r })
|
|
3501
3501
|
] }) });
|
|
3502
|
-
},
|
|
3502
|
+
}, wn = ({
|
|
3503
3503
|
items: t,
|
|
3504
3504
|
onSelect: e,
|
|
3505
3505
|
ariaLabel: r = "More actions",
|
|
@@ -3508,217 +3508,390 @@ const Hr = () => /* @__PURE__ */ b(
|
|
|
3508
3508
|
disabled: c = !1,
|
|
3509
3509
|
size: s = "medium",
|
|
3510
3510
|
className: l = "",
|
|
3511
|
-
"data-testid":
|
|
3511
|
+
"data-testid": $
|
|
3512
3512
|
}) => {
|
|
3513
|
-
const [
|
|
3514
|
-
c || (
|
|
3515
|
-
}, [c]),
|
|
3516
|
-
|
|
3517
|
-
}, [i]),
|
|
3518
|
-
(
|
|
3519
|
-
|
|
3513
|
+
const [w, N] = X(!1), [k, x] = X(-1), d = Q(null), _ = Q(null), o = Q(null), u = Q(null), g = `overflow-menu-${tt()}`, L = t.filter((f) => !f.disabled), E = B(() => {
|
|
3514
|
+
c || (N(!0), x(0));
|
|
3515
|
+
}, [c]), S = B(() => {
|
|
3516
|
+
N(!1), x(-1), i ? o.current?.focus() : _.current?.focus();
|
|
3517
|
+
}, [i]), C = B(
|
|
3518
|
+
(f) => {
|
|
3519
|
+
f.disabled || (f.onClick ? f.onClick() : e && e(f), S());
|
|
3520
3520
|
},
|
|
3521
|
-
[e,
|
|
3521
|
+
[e, S]
|
|
3522
3522
|
);
|
|
3523
3523
|
ie(() => {
|
|
3524
|
-
if (!
|
|
3525
|
-
const
|
|
3526
|
-
d.current && !d.current.contains(
|
|
3524
|
+
if (!w) return;
|
|
3525
|
+
const f = (I) => {
|
|
3526
|
+
d.current && !d.current.contains(I.target) && S();
|
|
3527
3527
|
};
|
|
3528
|
-
return document.addEventListener("mousedown",
|
|
3529
|
-
}, [
|
|
3530
|
-
const
|
|
3531
|
-
(
|
|
3528
|
+
return document.addEventListener("mousedown", f), () => document.removeEventListener("mousedown", f);
|
|
3529
|
+
}, [w, S]);
|
|
3530
|
+
const P = B(
|
|
3531
|
+
(f) => {
|
|
3532
3532
|
if (!c)
|
|
3533
|
-
switch (
|
|
3533
|
+
switch (f.key) {
|
|
3534
3534
|
case "Enter":
|
|
3535
3535
|
case " ":
|
|
3536
|
-
if (
|
|
3537
|
-
|
|
3538
|
-
else if (
|
|
3539
|
-
const
|
|
3540
|
-
|
|
3536
|
+
if (f.preventDefault(), !w)
|
|
3537
|
+
E();
|
|
3538
|
+
else if (k >= 0) {
|
|
3539
|
+
const I = L[k];
|
|
3540
|
+
I && C(I);
|
|
3541
3541
|
}
|
|
3542
3542
|
break;
|
|
3543
3543
|
case "ArrowDown":
|
|
3544
|
-
|
|
3544
|
+
f.preventDefault(), w ? x((I) => I < L.length - 1 ? I + 1 : 0) : E();
|
|
3545
3545
|
break;
|
|
3546
3546
|
case "ArrowUp":
|
|
3547
|
-
|
|
3547
|
+
f.preventDefault(), w && x((I) => I > 0 ? I - 1 : L.length - 1);
|
|
3548
3548
|
break;
|
|
3549
3549
|
case "Escape":
|
|
3550
|
-
|
|
3550
|
+
f.preventDefault(), w && S();
|
|
3551
3551
|
break;
|
|
3552
3552
|
case "Tab":
|
|
3553
|
-
|
|
3553
|
+
w && S();
|
|
3554
3554
|
break;
|
|
3555
3555
|
case "Home":
|
|
3556
|
-
|
|
3556
|
+
w && (f.preventDefault(), x(0));
|
|
3557
3557
|
break;
|
|
3558
3558
|
case "End":
|
|
3559
|
-
|
|
3559
|
+
w && (f.preventDefault(), x(L.length - 1));
|
|
3560
3560
|
break;
|
|
3561
3561
|
}
|
|
3562
3562
|
},
|
|
3563
|
-
[c,
|
|
3563
|
+
[c, w, k, L, E, S, C]
|
|
3564
3564
|
);
|
|
3565
3565
|
ie(() => {
|
|
3566
|
-
if (
|
|
3567
|
-
const
|
|
3568
|
-
|
|
3569
|
-
}
|
|
3570
|
-
}, [
|
|
3571
|
-
const
|
|
3572
|
-
c || (
|
|
3573
|
-
},
|
|
3574
|
-
return /* @__PURE__ */
|
|
3566
|
+
if (w && u.current && k >= 0) {
|
|
3567
|
+
const f = u.current.querySelector(`[data-index="${k}"]`);
|
|
3568
|
+
f && typeof f.scrollIntoView == "function" && f.scrollIntoView({ block: "nearest" });
|
|
3569
|
+
}
|
|
3570
|
+
}, [k, w]);
|
|
3571
|
+
const z = () => {
|
|
3572
|
+
c || (w ? S() : E());
|
|
3573
|
+
}, A = "uiforge-overflow-menu", R = [A, c && `${A}--disabled`, l].filter(Boolean).join(" "), T = [`${A}__menu`, `${A}__menu--${a}`].filter(Boolean).join(" "), v = (f) => L.findIndex((I) => I.id === f.id);
|
|
3574
|
+
return /* @__PURE__ */ m(
|
|
3575
3575
|
"div",
|
|
3576
3576
|
{
|
|
3577
3577
|
ref: d,
|
|
3578
3578
|
className: R,
|
|
3579
|
-
onKeyDown:
|
|
3580
|
-
"data-testid":
|
|
3579
|
+
onKeyDown: P,
|
|
3580
|
+
"data-testid": $,
|
|
3581
3581
|
children: [
|
|
3582
3582
|
i ? /* @__PURE__ */ n(
|
|
3583
3583
|
"div",
|
|
3584
3584
|
{
|
|
3585
|
-
onClick:
|
|
3585
|
+
onClick: z,
|
|
3586
3586
|
role: "button",
|
|
3587
3587
|
tabIndex: c ? -1 : 0,
|
|
3588
3588
|
"aria-haspopup": "menu",
|
|
3589
|
-
"aria-expanded":
|
|
3590
|
-
"aria-controls":
|
|
3589
|
+
"aria-expanded": w,
|
|
3590
|
+
"aria-controls": w ? g : void 0,
|
|
3591
3591
|
"aria-label": r,
|
|
3592
3592
|
"aria-disabled": c,
|
|
3593
3593
|
ref: o,
|
|
3594
|
-
className: `${
|
|
3594
|
+
className: `${A}__custom-trigger`,
|
|
3595
3595
|
children: i
|
|
3596
3596
|
}
|
|
3597
3597
|
) : /* @__PURE__ */ n(
|
|
3598
3598
|
"button",
|
|
3599
3599
|
{
|
|
3600
|
-
ref:
|
|
3600
|
+
ref: _,
|
|
3601
3601
|
type: "button",
|
|
3602
|
-
className: `${
|
|
3603
|
-
onClick:
|
|
3602
|
+
className: `${A}__trigger ${A}__trigger--${s}`,
|
|
3603
|
+
onClick: z,
|
|
3604
3604
|
"aria-haspopup": "menu",
|
|
3605
|
-
"aria-expanded":
|
|
3606
|
-
"aria-controls":
|
|
3605
|
+
"aria-expanded": w,
|
|
3606
|
+
"aria-controls": w ? g : void 0,
|
|
3607
3607
|
"aria-label": r,
|
|
3608
3608
|
disabled: c,
|
|
3609
|
-
children: /* @__PURE__ */ n("span", { className: `${
|
|
3609
|
+
children: /* @__PURE__ */ n("span", { className: `${A}__trigger-icon`, "aria-hidden": "true", children: "•••" })
|
|
3610
3610
|
}
|
|
3611
3611
|
),
|
|
3612
|
-
|
|
3613
|
-
const
|
|
3614
|
-
`${
|
|
3615
|
-
|
|
3616
|
-
|
|
3612
|
+
w && /* @__PURE__ */ n("div", { ref: u, id: g, className: T, role: "menu", "aria-label": r, children: t.map((f) => {
|
|
3613
|
+
const I = v(f), M = !f.disabled && I === k, ae = [
|
|
3614
|
+
`${A}__item`,
|
|
3615
|
+
f.disabled && `${A}__item--disabled`,
|
|
3616
|
+
M && `${A}__item--highlighted`
|
|
3617
3617
|
].filter(Boolean).join(" ");
|
|
3618
|
-
return /* @__PURE__ */
|
|
3618
|
+
return /* @__PURE__ */ m(
|
|
3619
3619
|
"div",
|
|
3620
3620
|
{
|
|
3621
3621
|
className: ae,
|
|
3622
3622
|
role: "menuitem",
|
|
3623
3623
|
tabIndex: -1,
|
|
3624
|
-
"aria-disabled":
|
|
3625
|
-
"data-index":
|
|
3626
|
-
onClick: () =>
|
|
3624
|
+
"aria-disabled": f.disabled,
|
|
3625
|
+
"data-index": f.disabled ? void 0 : I,
|
|
3626
|
+
onClick: () => C(f),
|
|
3627
3627
|
onMouseEnter: () => {
|
|
3628
|
-
|
|
3628
|
+
f.disabled || x(I);
|
|
3629
3629
|
},
|
|
3630
3630
|
children: [
|
|
3631
|
-
|
|
3632
|
-
/* @__PURE__ */ n("span", { className: `${
|
|
3631
|
+
f.icon && /* @__PURE__ */ n("span", { className: `${A}__item-icon`, "aria-hidden": "true", children: f.icon }),
|
|
3632
|
+
/* @__PURE__ */ n("span", { className: `${A}__item-label`, children: f.label })
|
|
3633
3633
|
]
|
|
3634
3634
|
},
|
|
3635
|
-
|
|
3635
|
+
f.id
|
|
3636
3636
|
);
|
|
3637
3637
|
}) })
|
|
3638
3638
|
]
|
|
3639
3639
|
}
|
|
3640
3640
|
);
|
|
3641
|
+
}, _n = ({
|
|
3642
|
+
title: t,
|
|
3643
|
+
subtitle: e,
|
|
3644
|
+
mediaUrl: r,
|
|
3645
|
+
mediaAlt: i,
|
|
3646
|
+
meta: a,
|
|
3647
|
+
actions: c,
|
|
3648
|
+
variant: s = "default",
|
|
3649
|
+
className: l = "",
|
|
3650
|
+
theme: $ = "light",
|
|
3651
|
+
renderBody: w,
|
|
3652
|
+
renderFooter: N,
|
|
3653
|
+
onClick: k,
|
|
3654
|
+
tabIndex: x,
|
|
3655
|
+
ariaLabel: d
|
|
3656
|
+
}) => {
|
|
3657
|
+
const _ = "uiforge-media-card", o = `${_}--${s}`, u = `${_}--${$}`, h = k ? `${_}--clickable` : "", g = [_, o, u, h, l].filter(Boolean).join(" ");
|
|
3658
|
+
return /* @__PURE__ */ m(
|
|
3659
|
+
"div",
|
|
3660
|
+
{
|
|
3661
|
+
className: g,
|
|
3662
|
+
"data-theme": $,
|
|
3663
|
+
onClick: k,
|
|
3664
|
+
onKeyDown: (E) => {
|
|
3665
|
+
k && (E.key === "Enter" || E.key === " ") && (E.preventDefault(), k());
|
|
3666
|
+
},
|
|
3667
|
+
role: k ? "button" : void 0,
|
|
3668
|
+
tabIndex: k ? x ?? 0 : x,
|
|
3669
|
+
"aria-label": d || t,
|
|
3670
|
+
children: [
|
|
3671
|
+
/* @__PURE__ */ n("div", { className: `${_}__media`, children: /* @__PURE__ */ n("img", { src: r, alt: i, className: `${_}__image`, loading: "lazy" }) }),
|
|
3672
|
+
/* @__PURE__ */ n("div", { className: `${_}__content`, children: w ? w() : /* @__PURE__ */ m(ge, { children: [
|
|
3673
|
+
/* @__PURE__ */ m("div", { className: `${_}__body`, children: [
|
|
3674
|
+
/* @__PURE__ */ n("h3", { className: `${_}__title`, children: t }),
|
|
3675
|
+
e && /* @__PURE__ */ n("p", { className: `${_}__subtitle`, children: e }),
|
|
3676
|
+
a && Object.keys(a).length > 0 && /* @__PURE__ */ n("dl", { className: `${_}__meta`, children: Object.entries(a).map(([E, S]) => /* @__PURE__ */ m("div", { className: `${_}__meta-item`, children: [
|
|
3677
|
+
/* @__PURE__ */ m("dt", { className: `${_}__meta-key`, children: [
|
|
3678
|
+
E,
|
|
3679
|
+
":"
|
|
3680
|
+
] }),
|
|
3681
|
+
/* @__PURE__ */ n("dd", { className: `${_}__meta-value`, children: S })
|
|
3682
|
+
] }, E)) })
|
|
3683
|
+
] }),
|
|
3684
|
+
(c || N) && /* @__PURE__ */ n("div", { className: `${_}__footer`, children: N ? N() : c })
|
|
3685
|
+
] }) })
|
|
3686
|
+
]
|
|
3687
|
+
}
|
|
3688
|
+
);
|
|
3641
3689
|
};
|
|
3642
|
-
function
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3690
|
+
function qr(t) {
|
|
3691
|
+
if (!t) return "?";
|
|
3692
|
+
const e = t.trim().split(/\s+/);
|
|
3693
|
+
return e.length === 1 ? e[0].charAt(0).toUpperCase() : (e[0].charAt(0) + e[e.length - 1].charAt(0)).toUpperCase();
|
|
3694
|
+
}
|
|
3695
|
+
const Kr = () => /* @__PURE__ */ m(
|
|
3696
|
+
"svg",
|
|
3697
|
+
{
|
|
3698
|
+
width: "40",
|
|
3699
|
+
height: "40",
|
|
3700
|
+
viewBox: "0 0 24 24",
|
|
3701
|
+
fill: "none",
|
|
3702
|
+
stroke: "currentColor",
|
|
3703
|
+
strokeWidth: "2",
|
|
3704
|
+
strokeLinecap: "round",
|
|
3705
|
+
strokeLinejoin: "round",
|
|
3706
|
+
children: [
|
|
3707
|
+
/* @__PURE__ */ n("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2" }),
|
|
3708
|
+
/* @__PURE__ */ n("circle", { cx: "8.5", cy: "8.5", r: "1.5" }),
|
|
3709
|
+
/* @__PURE__ */ n("polyline", { points: "21 15 16 10 5 21" })
|
|
3710
|
+
]
|
|
3711
|
+
}
|
|
3712
|
+
), $n = ({
|
|
3713
|
+
type: t = "icon",
|
|
3714
|
+
icon: e,
|
|
3715
|
+
name: r = "",
|
|
3716
|
+
initials: i,
|
|
3717
|
+
gradientColor: a = "blue",
|
|
3718
|
+
size: c = "medium",
|
|
3719
|
+
borderRadius: s = "medium",
|
|
3720
|
+
className: l = "",
|
|
3721
|
+
alt: $ = "Media placeholder",
|
|
3722
|
+
theme: w = "light"
|
|
3723
|
+
}) => {
|
|
3724
|
+
const N = "uif-media-placeholder", k = `${N}--${t}`, x = `${N}--${c}`, d = `${N}--radius-${s}`, _ = `${N}--${w}`, o = t === "gradient" ? `${N}--gradient-${a}` : "", u = [
|
|
3725
|
+
N,
|
|
3726
|
+
k,
|
|
3727
|
+
x,
|
|
3728
|
+
d,
|
|
3729
|
+
_,
|
|
3730
|
+
o,
|
|
3731
|
+
l
|
|
3732
|
+
].filter(Boolean).join(" ");
|
|
3733
|
+
let h;
|
|
3734
|
+
if (t === "initials") {
|
|
3735
|
+
const g = i || qr(r);
|
|
3736
|
+
h = /* @__PURE__ */ n("span", { className: `${N}__initials`, children: g });
|
|
3737
|
+
} else t === "icon" ? h = e || /* @__PURE__ */ n(Kr, {}) : h = null;
|
|
3738
|
+
return /* @__PURE__ */ n("div", { className: u, role: "img", "aria-label": $, "data-theme": w, children: h });
|
|
3739
|
+
}, In = ({
|
|
3740
|
+
count: t = 3,
|
|
3741
|
+
theme: e = "light",
|
|
3742
|
+
className: r = "",
|
|
3743
|
+
ariaLabel: i = "Loading media items"
|
|
3744
|
+
}) => {
|
|
3745
|
+
const a = "uiforge-media-list-skeleton", c = `${a}--${e}`, s = [a, c, r].filter(Boolean).join(" "), l = Array.from({ length: t }, ($, w) => w);
|
|
3746
|
+
return /* @__PURE__ */ n("div", { className: s, "data-theme": e, role: "status", "aria-label": i, children: l.map(($) => /* @__PURE__ */ m("div", { className: `${a}__item`, children: [
|
|
3747
|
+
/* @__PURE__ */ n("div", { className: `${a}__media`, children: /* @__PURE__ */ n("div", { className: `${a}__shimmer` }) }),
|
|
3748
|
+
/* @__PURE__ */ m("div", { className: `${a}__content`, children: [
|
|
3749
|
+
/* @__PURE__ */ m("div", { className: `${a}__body`, children: [
|
|
3750
|
+
/* @__PURE__ */ n("div", { className: `${a}__line ${a}__line--title`, children: /* @__PURE__ */ n("div", { className: `${a}__shimmer` }) }),
|
|
3751
|
+
/* @__PURE__ */ n("div", { className: `${a}__line ${a}__line--subtitle`, children: /* @__PURE__ */ n("div", { className: `${a}__shimmer` }) }),
|
|
3752
|
+
/* @__PURE__ */ m("div", { className: `${a}__meta`, children: [
|
|
3753
|
+
/* @__PURE__ */ n("div", { className: `${a}__line ${a}__line--meta`, children: /* @__PURE__ */ n("div", { className: `${a}__shimmer` }) }),
|
|
3754
|
+
/* @__PURE__ */ n("div", { className: `${a}__line ${a}__line--meta`, children: /* @__PURE__ */ n("div", { className: `${a}__shimmer` }) })
|
|
3755
|
+
] })
|
|
3756
|
+
] }),
|
|
3757
|
+
/* @__PURE__ */ m("div", { className: `${a}__footer`, children: [
|
|
3758
|
+
/* @__PURE__ */ n("div", { className: `${a}__line ${a}__line--action`, children: /* @__PURE__ */ n("div", { className: `${a}__shimmer` }) }),
|
|
3759
|
+
/* @__PURE__ */ n("div", { className: `${a}__line ${a}__line--action`, children: /* @__PURE__ */ n("div", { className: `${a}__shimmer` }) })
|
|
3760
|
+
] })
|
|
3761
|
+
] })
|
|
3762
|
+
] }, $)) });
|
|
3763
|
+
};
|
|
3764
|
+
function xn(t, e) {
|
|
3765
|
+
const { sampleCount: r = 3, min: i = 3, max: a = 15, approxItemHeight: c = 120 } = e ?? {}, [s, l] = X(i), $ = Q(i), w = B(() => {
|
|
3766
|
+
const N = t?.current;
|
|
3767
|
+
if (!N)
|
|
3646
3768
|
return i;
|
|
3647
|
-
const
|
|
3648
|
-
if (
|
|
3769
|
+
const k = N.clientHeight;
|
|
3770
|
+
if (k === 0)
|
|
3649
3771
|
return i;
|
|
3650
|
-
const
|
|
3772
|
+
const x = Array.from(N.children).filter((u) => u instanceof HTMLElement && u.offsetHeight > 0);
|
|
3651
3773
|
let d = c;
|
|
3652
|
-
if (
|
|
3653
|
-
const u = Math.min(r,
|
|
3654
|
-
let
|
|
3655
|
-
for (let
|
|
3656
|
-
|
|
3657
|
-
d =
|
|
3658
|
-
}
|
|
3659
|
-
const
|
|
3660
|
-
return Math.max(i, Math.min(a,
|
|
3774
|
+
if (x.length > 0) {
|
|
3775
|
+
const u = Math.min(r, x.length);
|
|
3776
|
+
let h = 0;
|
|
3777
|
+
for (let g = 0; g < u; g++)
|
|
3778
|
+
h += x[g].offsetHeight;
|
|
3779
|
+
d = h / u;
|
|
3780
|
+
}
|
|
3781
|
+
const _ = Math.floor(k / d);
|
|
3782
|
+
return Math.max(i, Math.min(a, _));
|
|
3661
3783
|
}, [t, r, i, a, c]);
|
|
3662
3784
|
return ie(() => {
|
|
3663
|
-
const
|
|
3664
|
-
if (!
|
|
3785
|
+
const N = t?.current;
|
|
3786
|
+
if (!N)
|
|
3665
3787
|
return;
|
|
3666
|
-
const
|
|
3667
|
-
const
|
|
3668
|
-
|
|
3788
|
+
const k = () => {
|
|
3789
|
+
const _ = w();
|
|
3790
|
+
_ !== $.current && ($.current = _, l(_));
|
|
3669
3791
|
};
|
|
3670
|
-
|
|
3671
|
-
let
|
|
3672
|
-
typeof ResizeObserver < "u" && (
|
|
3673
|
-
|
|
3674
|
-
}),
|
|
3792
|
+
k();
|
|
3793
|
+
let x;
|
|
3794
|
+
typeof ResizeObserver < "u" && (x = new ResizeObserver(() => {
|
|
3795
|
+
k();
|
|
3796
|
+
}), x.observe(N));
|
|
3675
3797
|
let d;
|
|
3676
3798
|
return typeof MutationObserver < "u" && (d = new MutationObserver(() => {
|
|
3677
|
-
|
|
3678
|
-
}), d.observe(
|
|
3799
|
+
k();
|
|
3800
|
+
}), d.observe(N, {
|
|
3679
3801
|
childList: !0,
|
|
3680
3802
|
subtree: !1
|
|
3681
3803
|
})), () => {
|
|
3682
|
-
|
|
3804
|
+
x?.disconnect(), d?.disconnect();
|
|
3683
3805
|
};
|
|
3684
|
-
}, [t,
|
|
3806
|
+
}, [t, w]), s;
|
|
3807
|
+
}
|
|
3808
|
+
function Nn(t) {
|
|
3809
|
+
const {
|
|
3810
|
+
src: e,
|
|
3811
|
+
alt: r,
|
|
3812
|
+
srcSet: i,
|
|
3813
|
+
sizes: a,
|
|
3814
|
+
loading: c = "lazy",
|
|
3815
|
+
decoding: s = "async",
|
|
3816
|
+
aspectRatio: l,
|
|
3817
|
+
width: $,
|
|
3818
|
+
height: w,
|
|
3819
|
+
className: N,
|
|
3820
|
+
style: k = {}
|
|
3821
|
+
} = t, x = {
|
|
3822
|
+
src: e,
|
|
3823
|
+
alt: r,
|
|
3824
|
+
loading: c,
|
|
3825
|
+
decoding: s,
|
|
3826
|
+
className: N,
|
|
3827
|
+
style: {
|
|
3828
|
+
...k,
|
|
3829
|
+
// Ensure image fills container when aspectRatio is used
|
|
3830
|
+
...l ? { width: "100%", height: "100%", objectFit: "cover" } : {}
|
|
3831
|
+
}
|
|
3832
|
+
};
|
|
3833
|
+
i && (x.srcSet = i), a && (x.sizes = a), $ && (x.width = $), w && (x.height = w);
|
|
3834
|
+
let d;
|
|
3835
|
+
return l && (d = {
|
|
3836
|
+
style: {
|
|
3837
|
+
position: "relative",
|
|
3838
|
+
width: "100%",
|
|
3839
|
+
aspectRatio: l,
|
|
3840
|
+
overflow: "hidden"
|
|
3841
|
+
},
|
|
3842
|
+
className: "optimized-image-container"
|
|
3843
|
+
}, x.style = {
|
|
3844
|
+
...x.style,
|
|
3845
|
+
position: "absolute",
|
|
3846
|
+
top: 0,
|
|
3847
|
+
left: 0,
|
|
3848
|
+
width: "100%",
|
|
3849
|
+
height: "100%",
|
|
3850
|
+
objectFit: "cover"
|
|
3851
|
+
}), {
|
|
3852
|
+
imgProps: x,
|
|
3853
|
+
containerProps: d
|
|
3854
|
+
};
|
|
3685
3855
|
}
|
|
3686
3856
|
export {
|
|
3687
|
-
|
|
3857
|
+
Ne as ActivityIcons,
|
|
3688
3858
|
or as ActivityItemProvider,
|
|
3689
3859
|
Ft as AlienIcon,
|
|
3690
3860
|
Qt as BriefcaseIcon,
|
|
3691
|
-
|
|
3861
|
+
jt as BugIcon,
|
|
3692
3862
|
ir as BuildIcon,
|
|
3693
|
-
|
|
3694
|
-
|
|
3863
|
+
dn as BusinessIcons,
|
|
3864
|
+
Yr as Button,
|
|
3695
3865
|
Jt as CalendarIcon,
|
|
3696
3866
|
Zt as ChartIcon,
|
|
3697
3867
|
Mt as CheckIcon,
|
|
3698
3868
|
St as CloseIcon,
|
|
3699
3869
|
Rt as CloudIcon,
|
|
3700
|
-
|
|
3870
|
+
Tt as CodeIcon,
|
|
3701
3871
|
wt as CommentIcon,
|
|
3702
3872
|
gt as CommitIcon,
|
|
3703
3873
|
Vt as DatabaseIcon,
|
|
3704
|
-
|
|
3874
|
+
Nt as DeployIcon,
|
|
3705
3875
|
rr as DeploymentIcon,
|
|
3706
|
-
|
|
3876
|
+
un as DevProcessIcons,
|
|
3707
3877
|
Yt as DocumentIcon,
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3878
|
+
Et as DumbbellIcon,
|
|
3879
|
+
sn as FitnessIcons,
|
|
3880
|
+
kt as FoldIcon,
|
|
3711
3881
|
$t as ForkIcon,
|
|
3712
3882
|
Xt as GitBranchIcon,
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3883
|
+
Jr as HamburgerButton,
|
|
3884
|
+
zt as HeartRateIcon,
|
|
3885
|
+
Qr as IconButton,
|
|
3716
3886
|
bt as IssueIcon,
|
|
3887
|
+
_n as MediaCard,
|
|
3888
|
+
In as MediaListSkeleton,
|
|
3889
|
+
$n as MediaPlaceholder,
|
|
3717
3890
|
At as MeditationIcon,
|
|
3718
3891
|
Gt as MeetingIcon,
|
|
3719
3892
|
It as MergeIcon,
|
|
3720
|
-
|
|
3721
|
-
|
|
3893
|
+
bn as MobileHeaderLayout,
|
|
3894
|
+
wn as OverflowMenu,
|
|
3722
3895
|
qt as PlanetIcon,
|
|
3723
3896
|
er as PullRequestDraftIcon,
|
|
3724
3897
|
yt as PullRequestIcon,
|
|
@@ -3729,36 +3902,37 @@ export {
|
|
|
3729
3902
|
Fr as SafeAreaContainer,
|
|
3730
3903
|
Wt as SatelliteIcon,
|
|
3731
3904
|
Ut as ServerIcon,
|
|
3732
|
-
|
|
3905
|
+
cn as SpaceIcons,
|
|
3733
3906
|
_t as StarIcon,
|
|
3734
|
-
|
|
3907
|
+
Ot as StrengthIcon,
|
|
3735
3908
|
Lt as TaiChiIcon,
|
|
3736
|
-
|
|
3909
|
+
ln as TechIcons,
|
|
3737
3910
|
Kt as TelescopeIcon,
|
|
3738
3911
|
Bt as TerminalIcon,
|
|
3739
3912
|
tr as TestingIcon,
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
|
|
3913
|
+
hn as UIForgeActivityItem,
|
|
3914
|
+
mn as UIForgeActivityStream,
|
|
3915
|
+
en as UIForgeBlocksEditor,
|
|
3916
|
+
an as UIForgeComboBox,
|
|
3917
|
+
Xr as UIForgeGrid,
|
|
3918
|
+
yn as UIForgeSidebar,
|
|
3919
|
+
vn as UIForgeVideo,
|
|
3920
|
+
gn as UIForgeVideoPreview,
|
|
3921
|
+
Ce as UIIcons,
|
|
3922
|
+
Ct as UnfoldIcon,
|
|
3923
|
+
on as WellnessIcons,
|
|
3924
|
+
Dt as YogaIcon,
|
|
3925
|
+
tn as blocksToHTML,
|
|
3926
|
+
nn as blocksToJSON,
|
|
3927
|
+
rn as blocksToMarkdown,
|
|
3755
3928
|
Ye as detectProvider,
|
|
3756
3929
|
Je as extractVideoId,
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3930
|
+
fn as getEmbedUrlFromVideoUrl,
|
|
3931
|
+
pn as isAdultContent,
|
|
3932
|
+
Oe as providersByName,
|
|
3760
3933
|
sr as useActivityItemContext,
|
|
3761
|
-
|
|
3934
|
+
xn as useDynamicPageCount,
|
|
3935
|
+
Nn as useOptimizedImage,
|
|
3762
3936
|
ar as useResponsive,
|
|
3763
3937
|
Ge as videoProviders
|
|
3764
3938
|
};
|