@kingsimba/nc-ui 0.1.41 → 0.1.43
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 +28 -27
- package/dist/code-editor.cjs +36 -0
- package/dist/code-editor.cjs.map +1 -0
- package/dist/code-editor.d.ts +34 -0
- package/dist/code-editor.js +266 -0
- package/dist/code-editor.js.map +1 -0
- package/dist/index-BZJJwrMY.js +3089 -0
- package/dist/index-BZJJwrMY.js.map +1 -0
- package/dist/index-Isl3QL-U.cjs +47 -0
- package/dist/index-Isl3QL-U.cjs.map +1 -0
- package/dist/index.cjs +5 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +225 -225
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/yaml.cjs +111 -156
- package/dist/yaml.cjs.map +1 -1
- package/dist/yaml.js +1840 -4920
- package/dist/yaml.js.map +1 -1
- package/package.json +6 -1
package/dist/index.js
CHANGED
|
@@ -3,10 +3,10 @@ var mt = (e, t, n) => t in e ? ht(e, t, { enumerable: !0, configurable: !0, writ
|
|
|
3
3
|
var se = (e, t, n) => mt(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
4
|
import { jsx as s, jsxs as A, Fragment as Pe } from "react/jsx-runtime";
|
|
5
5
|
import { d as Le, E as gt, R as bt, T as vt, g as wt, V as yt, b as xt, a as kt, c as Nt } from "./GeneratedIcons-HFZmBTBT.js";
|
|
6
|
-
import ze, { useState as E, useRef as Y, useEffect as V, useMemo as
|
|
6
|
+
import ze, { useState as E, useRef as Y, useEffect as V, useMemo as $e, createContext as ge, useContext as ae, Children as At, isValidElement as St, forwardRef as Ct, useImperativeHandle as Mt, useCallback as X, Suspense as $t } from "react";
|
|
7
7
|
import { createPortal as Ae } from "react-dom";
|
|
8
8
|
import { useTranslation as oe } from "react-i18next";
|
|
9
|
-
import
|
|
9
|
+
import It from "i18next";
|
|
10
10
|
import { c as Rt } from "./clsx-OuTLNxxd.js";
|
|
11
11
|
function Qe({
|
|
12
12
|
size: e = "default",
|
|
@@ -37,7 +37,7 @@ function Qe({
|
|
|
37
37
|
);
|
|
38
38
|
return n ? /* @__PURE__ */ s("div", { className: "nc-activity-indicator-overlay", children: o }) : o;
|
|
39
39
|
}
|
|
40
|
-
function ne({ variant: e = "default", block: t, size: n = "default", appearance: r = "default", className: o, disabled: i, textSelectable: a, loading: c, onClick: l, children: u, ...
|
|
40
|
+
function ne({ variant: e = "default", block: t, size: n = "default", appearance: r = "default", className: o, disabled: i, textSelectable: a, loading: c, onClick: l, children: u, ...p }) {
|
|
41
41
|
const w = [
|
|
42
42
|
"nc-button",
|
|
43
43
|
e !== "default" ? `nc-${e}` : "",
|
|
@@ -65,7 +65,7 @@ function ne({ variant: e = "default", block: t, size: n = "default", appearance:
|
|
|
65
65
|
l == null || l(g);
|
|
66
66
|
}
|
|
67
67
|
},
|
|
68
|
-
...
|
|
68
|
+
...p,
|
|
69
69
|
children: [
|
|
70
70
|
c && /* @__PURE__ */ s(
|
|
71
71
|
Qe,
|
|
@@ -136,7 +136,7 @@ function qn({
|
|
|
136
136
|
const o = Math.max(0, Math.min(1, Number(e) || 0)), i = o === 0 ? "-" : String(Math.round(o * 100));
|
|
137
137
|
let a;
|
|
138
138
|
r ? o < 0.1 ? a = "var(--nc-danger)" : o < 0.2 ? a = "var(--nc-warning)" : a = "var(--nc-success)" : a = n ? "rgba(255,255,255,0.35)" : "#000000";
|
|
139
|
-
const c = "var(--nc-battery-shell-bg)", l = 24, u = 14,
|
|
139
|
+
const c = "var(--nc-battery-shell-bg)", l = 24, u = 14, p = 2, w = 0, d = 12, g = 0, k = 0, b = 0, v = l, y = u, h = y - g * 2, f = v - g * 2, m = Math.max(1, Math.min(4, y / 4)), N = o === 0 ? 0 : 0.05 + o * 0.95, C = l + p + d, P = 20, B = 0.65, S = Math.max(u, P * B), L = l + p + 1, x = (u - P * B) / 2;
|
|
140
140
|
return /* @__PURE__ */ A(
|
|
141
141
|
"svg",
|
|
142
142
|
{
|
|
@@ -147,7 +147,7 @@ function qn({
|
|
|
147
147
|
role: "img",
|
|
148
148
|
"aria-label": `Battery ${i === "-" ? "-" : `${i}%`} ${t}`,
|
|
149
149
|
children: [
|
|
150
|
-
/* @__PURE__ */ s("defs", { children: /* @__PURE__ */ s("mask", { id: `nc-battery-fill-mask-${o}`, children: /* @__PURE__ */ s("rect", { x: "0", y: "0", width:
|
|
150
|
+
/* @__PURE__ */ s("defs", { children: /* @__PURE__ */ s("mask", { id: `nc-battery-fill-mask-${o}`, children: /* @__PURE__ */ s("rect", { x: "0", y: "0", width: f * N, height: h, fill: "white" }) }) }),
|
|
151
151
|
/* @__PURE__ */ s(
|
|
152
152
|
"rect",
|
|
153
153
|
{
|
|
@@ -165,7 +165,7 @@ function qn({
|
|
|
165
165
|
{
|
|
166
166
|
x: k + g,
|
|
167
167
|
y: b + g,
|
|
168
|
-
width:
|
|
168
|
+
width: f,
|
|
169
169
|
height: h,
|
|
170
170
|
fill: a,
|
|
171
171
|
rx: m,
|
|
@@ -190,7 +190,7 @@ function qn({
|
|
|
190
190
|
{
|
|
191
191
|
x: l + w,
|
|
192
192
|
y: u * 0.26,
|
|
193
|
-
width:
|
|
193
|
+
width: p,
|
|
194
194
|
height: u * 0.48,
|
|
195
195
|
rx: 0.8,
|
|
196
196
|
ry: 0.8,
|
|
@@ -209,7 +209,7 @@ function Xn({
|
|
|
209
209
|
disabled: r,
|
|
210
210
|
size: o = "default"
|
|
211
211
|
}) {
|
|
212
|
-
return /* @__PURE__ */ s("div", { className: `nc-button-group ${o === "small" ? "nc-small" : ""}`, children: n.map((i) => {
|
|
212
|
+
return /* @__PURE__ */ s("div", { className: `nc-button-group ${o === "small" ? "nc-small" : o === "tiny" ? "nc-tiny" : ""}`, children: n.map((i) => {
|
|
213
213
|
const a = r || !!i.disabled;
|
|
214
214
|
return /* @__PURE__ */ s(
|
|
215
215
|
"button",
|
|
@@ -225,7 +225,7 @@ function Xn({
|
|
|
225
225
|
}) });
|
|
226
226
|
}
|
|
227
227
|
function Et({ size: e }) {
|
|
228
|
-
return /* @__PURE__ */ s("svg", { className: `nc-checkbox-icon ${e === "small" ? "nc-small" : ""}`, viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ s(
|
|
228
|
+
return /* @__PURE__ */ s("svg", { className: `nc-checkbox-icon ${e === "small" ? "nc-small" : e === "tiny" ? "nc-tiny" : ""}`, viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ s(
|
|
229
229
|
"path",
|
|
230
230
|
{
|
|
231
231
|
d: "M2 6L5 9L10 3",
|
|
@@ -237,14 +237,14 @@ function Et({ size: e }) {
|
|
|
237
237
|
) });
|
|
238
238
|
}
|
|
239
239
|
function Jn({ checked: e, onChange: t, disabled: n, label: r, size: o = "default", labelColor: i, style: a, className: c = "" }) {
|
|
240
|
-
const l = o === "small";
|
|
240
|
+
const l = o === "small", u = o === "tiny";
|
|
241
241
|
return /* @__PURE__ */ A(
|
|
242
242
|
"label",
|
|
243
243
|
{
|
|
244
|
-
className: `nc-checkbox-label ${l ? "nc-small" : ""} ${n ? "nc-disabled" : ""} ${c}`.trim(),
|
|
244
|
+
className: `nc-checkbox-label ${l ? "nc-small" : ""} ${u ? "nc-tiny" : ""} ${n ? "nc-disabled" : ""} ${c}`.trim(),
|
|
245
245
|
style: a,
|
|
246
|
-
onClick: (
|
|
247
|
-
n || (
|
|
246
|
+
onClick: (p) => {
|
|
247
|
+
n || (p.preventDefault(), t(!e));
|
|
248
248
|
},
|
|
249
249
|
children: [
|
|
250
250
|
/* @__PURE__ */ s(
|
|
@@ -253,9 +253,9 @@ function Jn({ checked: e, onChange: t, disabled: n, label: r, size: o = "default
|
|
|
253
253
|
role: "checkbox",
|
|
254
254
|
"aria-checked": e,
|
|
255
255
|
tabIndex: 0,
|
|
256
|
-
className: `nc-checkbox-box ${l ? "nc-small" : ""} ${e ? "nc-checked" : ""}`,
|
|
257
|
-
onKeyDown: (
|
|
258
|
-
n || (
|
|
256
|
+
className: `nc-checkbox-box ${l ? "nc-small" : ""} ${u ? "nc-tiny" : ""} ${e ? "nc-checked" : ""}`,
|
|
257
|
+
onKeyDown: (p) => {
|
|
258
|
+
n || (p.key === "Enter" || p.key === " ") && (p.preventDefault(), t(!e));
|
|
259
259
|
},
|
|
260
260
|
children: e && /* @__PURE__ */ s(Et, { size: o })
|
|
261
261
|
}
|
|
@@ -307,7 +307,7 @@ function Lt({
|
|
|
307
307
|
highlightedIndex: c = -1,
|
|
308
308
|
renderOption: l
|
|
309
309
|
}) {
|
|
310
|
-
const [u,
|
|
310
|
+
const [u, p] = E({ top: 0, left: 0, width: 0 }), [w, d] = E(o), { t: g } = oe();
|
|
311
311
|
if (V(() => {
|
|
312
312
|
if (e && i.current) {
|
|
313
313
|
const b = i.current.getBoundingClientRect();
|
|
@@ -316,7 +316,7 @@ function Lt({
|
|
|
316
316
|
const y = window.innerHeight - b.bottom, h = b.top;
|
|
317
317
|
y < 320 && h > y && (v = "top");
|
|
318
318
|
}
|
|
319
|
-
d(v),
|
|
319
|
+
d(v), p({
|
|
320
320
|
top: v === "top" ? b.top - 4 : b.bottom + 4,
|
|
321
321
|
left: b.left,
|
|
322
322
|
width: b.width
|
|
@@ -383,7 +383,7 @@ function Qn({
|
|
|
383
383
|
selectedOption: c,
|
|
384
384
|
disabled: l,
|
|
385
385
|
label: u,
|
|
386
|
-
clearable:
|
|
386
|
+
clearable: p = !0,
|
|
387
387
|
allowTyping: w = !1,
|
|
388
388
|
placement: d = "bottom",
|
|
389
389
|
size: g = "default",
|
|
@@ -392,7 +392,7 @@ function Qn({
|
|
|
392
392
|
style: v,
|
|
393
393
|
className: y
|
|
394
394
|
}) {
|
|
395
|
-
const [h,
|
|
395
|
+
const [h, f] = E(!1), [m, N] = E(""), [C, P] = E(-1), B = Y(null), S = Y(null), L = Y(null), x = g === "small", { t: M } = oe(), z = !!o, F = w || z, [I, T] = E([]), [H, q] = E(() => {
|
|
396
396
|
if (r && e) {
|
|
397
397
|
const R = r.find((j) => j.value === e);
|
|
398
398
|
return R ? R.label : "";
|
|
@@ -421,33 +421,33 @@ function Qn({
|
|
|
421
421
|
}
|
|
422
422
|
};
|
|
423
423
|
j ? W() : L.current = setTimeout(W, 200);
|
|
424
|
-
}, _ =
|
|
425
|
-
if (z) return
|
|
424
|
+
}, _ = $e(() => {
|
|
425
|
+
if (z) return I;
|
|
426
426
|
const R = m.toLowerCase();
|
|
427
427
|
return F ? (r || []).filter((j) => j.label.toLowerCase().includes(R)) : r || [];
|
|
428
|
-
}, [r, m, F, z,
|
|
428
|
+
}, [r, m, F, z, I]);
|
|
429
429
|
V(() => {
|
|
430
430
|
h && P(-1);
|
|
431
431
|
}, [h, _]), V(() => {
|
|
432
|
-
if (!
|
|
432
|
+
if (!p && !e && r && r.length > 0 && t) {
|
|
433
433
|
const R = r.find((j) => j.default) || r[0];
|
|
434
434
|
t(R.value);
|
|
435
435
|
}
|
|
436
|
-
}, [
|
|
436
|
+
}, [p, e, r, t]), V(() => {
|
|
437
437
|
function R(j) {
|
|
438
438
|
var W;
|
|
439
|
-
j.target instanceof Node && B.current && ((W = B.current.parentElement) != null && W.contains(j.target) ||
|
|
439
|
+
j.target instanceof Node && B.current && ((W = B.current.parentElement) != null && W.contains(j.target) || f(!1));
|
|
440
440
|
}
|
|
441
441
|
return document.addEventListener("mousedown", R), () => document.removeEventListener("mousedown", R);
|
|
442
442
|
}, []);
|
|
443
|
-
const D = c ?? (r ? r.find((R) => R.value === e) : e ? { label: H, value: e } : void 0), J = D &&
|
|
443
|
+
const D = c ?? (r ? r.find((R) => R.value === e) : e ? { label: H, value: e } : void 0), J = D && p, le = !l && !J, pe = `nc-align-${b}`, ve = !(h && F) && !!D, de = (R, j, W = !1) => {
|
|
444
444
|
var U;
|
|
445
|
-
q(j), t == null || t(R),
|
|
445
|
+
q(j), t == null || t(R), f(!1), N(""), W && ((U = B.current) == null || U.blur());
|
|
446
446
|
}, we = () => {
|
|
447
|
-
t == null || t(void 0), N(""),
|
|
447
|
+
t == null || t(void 0), N(""), f(!1);
|
|
448
448
|
}, ye = (R) => {
|
|
449
449
|
if (!h) {
|
|
450
|
-
(R.key === "ArrowDown" || R.key === "ArrowUp") && (
|
|
450
|
+
(R.key === "ArrowDown" || R.key === "ArrowUp") && (f(!0), R.preventDefault());
|
|
451
451
|
return;
|
|
452
452
|
}
|
|
453
453
|
const j = (W, U) => {
|
|
@@ -481,7 +481,7 @@ function Qn({
|
|
|
481
481
|
R.preventDefault(), C >= 0 && C < _.length && !_[C].disabled && de(_[C].value, _[C].label, !0);
|
|
482
482
|
break;
|
|
483
483
|
case "Escape":
|
|
484
|
-
R.preventDefault(),
|
|
484
|
+
R.preventDefault(), f(!1), N("");
|
|
485
485
|
break;
|
|
486
486
|
}
|
|
487
487
|
};
|
|
@@ -495,7 +495,7 @@ function Qn({
|
|
|
495
495
|
onMouseDown: (R) => {
|
|
496
496
|
if (l || F && R.target === B.current) return;
|
|
497
497
|
const j = !h;
|
|
498
|
-
if (
|
|
498
|
+
if (f((W) => (!W && F && D && N(D.label), !W)), z && j) {
|
|
499
499
|
const W = F && D ? D.label : "";
|
|
500
500
|
T([]), setTimeout(() => O(W, !0), 0);
|
|
501
501
|
}
|
|
@@ -513,7 +513,7 @@ function Qn({
|
|
|
513
513
|
placeholder: n,
|
|
514
514
|
onFocus: () => {
|
|
515
515
|
if (!l && F) {
|
|
516
|
-
|
|
516
|
+
f(!0);
|
|
517
517
|
const R = D ? D.label : "";
|
|
518
518
|
D && (N(R), setTimeout(() => {
|
|
519
519
|
var j;
|
|
@@ -656,11 +656,11 @@ function rr({
|
|
|
656
656
|
const d = u.getBoundingClientRect(), g = a.current.getBoundingClientRect(), k = window.innerHeight, b = window.innerWidth, v = d.bottom + 8, y = v + g.height <= k - 8;
|
|
657
657
|
let h = i;
|
|
658
658
|
(!y && i === "down" || i === "up" && y) && (h = "up");
|
|
659
|
-
let
|
|
660
|
-
h === "down" ?
|
|
659
|
+
let f;
|
|
660
|
+
h === "down" ? f = v : f = d.top - g.height - 8;
|
|
661
661
|
let m = d.left;
|
|
662
662
|
m + g.width > b - 8 && (m = d.right - g.width), l({
|
|
663
|
-
top: Math.max(8,
|
|
663
|
+
top: Math.max(8, f),
|
|
664
664
|
// Ensure minimum 8px from top
|
|
665
665
|
left: Math.max(8, m)
|
|
666
666
|
// Ensure minimum 8px from left
|
|
@@ -676,7 +676,7 @@ function rr({
|
|
|
676
676
|
document.removeEventListener("mousedown", d), document.removeEventListener("keydown", g);
|
|
677
677
|
};
|
|
678
678
|
}, [e, t, u]), !e) return null;
|
|
679
|
-
const
|
|
679
|
+
const p = (d) => {
|
|
680
680
|
d.type !== "separator" && !d.disabled && d.onClick && (d.onClick(), t());
|
|
681
681
|
}, w = n.some((d) => d.icon);
|
|
682
682
|
return Ae(
|
|
@@ -712,7 +712,7 @@ function rr({
|
|
|
712
712
|
"button",
|
|
713
713
|
{
|
|
714
714
|
className: g,
|
|
715
|
-
onClick: () =>
|
|
715
|
+
onClick: () => p(d),
|
|
716
716
|
disabled: d.disabled,
|
|
717
717
|
role: "menuitem",
|
|
718
718
|
children: [
|
|
@@ -752,7 +752,7 @@ function or({
|
|
|
752
752
|
onOk: c,
|
|
753
753
|
onSave: l,
|
|
754
754
|
onDelete: u,
|
|
755
|
-
onCancel:
|
|
755
|
+
onCancel: p,
|
|
756
756
|
onConnect: w,
|
|
757
757
|
closeOnOverlay: d = !0,
|
|
758
758
|
primaryDisabled: g = !1,
|
|
@@ -761,20 +761,20 @@ function or({
|
|
|
761
761
|
className: v = "",
|
|
762
762
|
onContentHeightChange: y
|
|
763
763
|
}) {
|
|
764
|
-
const h = Y(null),
|
|
764
|
+
const h = Y(null), f = Y(null), { t: m } = oe(), N = { close: t }, C = (S) => {
|
|
765
765
|
d && S.target === S.currentTarget && t();
|
|
766
766
|
};
|
|
767
767
|
if (V(() => {
|
|
768
768
|
e && h.current && h.current.focus();
|
|
769
769
|
}, [e]), V(() => {
|
|
770
|
-
if (!y || !
|
|
770
|
+
if (!y || !f.current) return;
|
|
771
771
|
const S = new ResizeObserver((L) => {
|
|
772
772
|
for (const x of L) {
|
|
773
773
|
const M = x.contentRect.height;
|
|
774
774
|
y(M);
|
|
775
775
|
}
|
|
776
776
|
});
|
|
777
|
-
return S.observe(
|
|
777
|
+
return S.observe(f.current), () => {
|
|
778
778
|
S.disconnect();
|
|
779
779
|
};
|
|
780
780
|
}, [y]), !e) return null;
|
|
@@ -784,22 +784,22 @@ function or({
|
|
|
784
784
|
return /* @__PURE__ */ s("div", { className: "nc-dialog-footer", children: /* @__PURE__ */ s(ne, { variant: "primary", onClick: c ?? t, disabled: g, children: m("common.ok") }) });
|
|
785
785
|
case "ok-cancel":
|
|
786
786
|
return /* @__PURE__ */ A("div", { className: "nc-dialog-footer", children: [
|
|
787
|
-
/* @__PURE__ */ s(fe, { onClick:
|
|
787
|
+
/* @__PURE__ */ s(fe, { onClick: p, children: m("common.cancel") }),
|
|
788
788
|
/* @__PURE__ */ s(ne, { variant: "primary", onClick: c ?? t, disabled: g, children: m("common.ok") })
|
|
789
789
|
] });
|
|
790
790
|
case "save-cancel":
|
|
791
791
|
return /* @__PURE__ */ A("div", { className: "nc-dialog-footer", children: [
|
|
792
|
-
/* @__PURE__ */ s(fe, { onClick:
|
|
792
|
+
/* @__PURE__ */ s(fe, { onClick: p, children: m("common.cancel") }),
|
|
793
793
|
/* @__PURE__ */ s(ne, { variant: "primary", onClick: l, disabled: g, children: m("common.save") })
|
|
794
794
|
] });
|
|
795
795
|
case "delete-cancel":
|
|
796
796
|
return /* @__PURE__ */ A("div", { className: "nc-dialog-footer", children: [
|
|
797
|
-
/* @__PURE__ */ s(fe, { onClick:
|
|
797
|
+
/* @__PURE__ */ s(fe, { onClick: p, children: m("common.cancel") }),
|
|
798
798
|
/* @__PURE__ */ s(ne, { variant: "danger", onClick: u, disabled: g, children: m("common.delete") })
|
|
799
799
|
] });
|
|
800
800
|
case "connect":
|
|
801
801
|
return /* @__PURE__ */ A("div", { className: "nc-dialog-footer", children: [
|
|
802
|
-
/* @__PURE__ */ s(fe, { onClick:
|
|
802
|
+
/* @__PURE__ */ s(fe, { onClick: p, children: m("common.cancel") }),
|
|
803
803
|
/* @__PURE__ */ s(ne, { variant: "primary", onClick: w, disabled: g, children: m("common.connect") })
|
|
804
804
|
] });
|
|
805
805
|
case "close":
|
|
@@ -828,7 +828,7 @@ function or({
|
|
|
828
828
|
/* @__PURE__ */ s("h3", { id: "nc-dialog-title", className: "nc-dialog-title", children: n }),
|
|
829
829
|
/* @__PURE__ */ s(Ze, { onClick: t, "aria-label": "Close dialog" })
|
|
830
830
|
] }),
|
|
831
|
-
/* @__PURE__ */ s("div", { ref:
|
|
831
|
+
/* @__PURE__ */ s("div", { ref: f, className: "nc-dialog-content", children: r }),
|
|
832
832
|
P()
|
|
833
833
|
]
|
|
834
834
|
}
|
|
@@ -903,7 +903,7 @@ function sr({
|
|
|
903
903
|
disabled: c,
|
|
904
904
|
label: l,
|
|
905
905
|
clearable: u = !0,
|
|
906
|
-
type:
|
|
906
|
+
type: p = "text",
|
|
907
907
|
className: w = "",
|
|
908
908
|
size: d = "default",
|
|
909
909
|
appearance: g = "default",
|
|
@@ -912,14 +912,14 @@ function sr({
|
|
|
912
912
|
showPasswordToggle: v = !1,
|
|
913
913
|
multiline: y = !1,
|
|
914
914
|
rows: h = 3,
|
|
915
|
-
validator:
|
|
915
|
+
validator: f,
|
|
916
916
|
showErrorMessage: m = !0
|
|
917
917
|
}) {
|
|
918
|
-
const N = Y(null), C = Y(null), P = Y(!1), [B, S] = E(!1), [L, x] = E(!1), [M, z] = E(!1), F = e !== void 0, [
|
|
918
|
+
const N = Y(null), C = Y(null), P = Y(!1), [B, S] = E(!1), [L, x] = E(!1), [M, z] = E(!1), F = e !== void 0, [I, T] = E(t), H = F ? e : I, [q, O] = E(H), _ = f ? f(H) : null, D = !!_, J = !y && g === "plain", le = J && L, pe = le ? q : H;
|
|
919
919
|
V(() => {
|
|
920
920
|
le || O(H);
|
|
921
921
|
}, [H, le]);
|
|
922
|
-
const ve =
|
|
922
|
+
const ve = p === "password", de = ve && v && !c && !y, we = u && pe && !c && (L || M), ye = d === "small" ? 32 : 44;
|
|
923
923
|
let R = 12;
|
|
924
924
|
we && de ? R = ye * 2 : (we || de) && (R = ye);
|
|
925
925
|
const W = b ? d === "small" ? 28 : 34 : void 0, U = () => {
|
|
@@ -997,7 +997,7 @@ function sr({
|
|
|
997
997
|
"input",
|
|
998
998
|
{
|
|
999
999
|
ref: N,
|
|
1000
|
-
type: ve && B ? "text" :
|
|
1000
|
+
type: ve && B ? "text" : p,
|
|
1001
1001
|
className: je,
|
|
1002
1002
|
placeholder: a,
|
|
1003
1003
|
value: pe,
|
|
@@ -1074,7 +1074,7 @@ function cr({ title: e, titleTools: t, children: n, style: r }) {
|
|
|
1074
1074
|
] });
|
|
1075
1075
|
}
|
|
1076
1076
|
function ar({ values: e, onChange: t, options: n, placeholder: r = "Select…", label: o }) {
|
|
1077
|
-
const [i, a] = E(!1), [c, l] = E(""), u = Y(null),
|
|
1077
|
+
const [i, a] = E(!1), [c, l] = E(""), u = Y(null), p = $e(() => n.filter((d) => d.label.toLowerCase().includes(c.toLowerCase())), [n, c]);
|
|
1078
1078
|
V(() => {
|
|
1079
1079
|
function d(g) {
|
|
1080
1080
|
!(g.target instanceof Node) || !u.current || u.current.contains(g.target) || a(!1);
|
|
@@ -1116,14 +1116,14 @@ function ar({ values: e, onChange: t, options: n, placeholder: r = "Select…",
|
|
|
1116
1116
|
)
|
|
1117
1117
|
] }),
|
|
1118
1118
|
i && /* @__PURE__ */ A("div", { className: "nc-combo-dropdown", style: { position: "absolute", top: "100%", left: 0, right: 0, zIndex: 10, marginTop: 4, boxShadow: "0 4px 12px var(--nc-shadow)" }, children: [
|
|
1119
|
-
|
|
1119
|
+
p.map((d) => {
|
|
1120
1120
|
const g = e.includes(d.value);
|
|
1121
1121
|
return /* @__PURE__ */ A("div", { className: "nc-section nc-row", style: { justifyContent: "space-between", cursor: "pointer", padding: 12 }, onMouseDown: () => w(d.value), children: [
|
|
1122
1122
|
/* @__PURE__ */ s("span", { children: d.label }),
|
|
1123
1123
|
/* @__PURE__ */ s("span", { children: g ? "✔️" : "" })
|
|
1124
1124
|
] }, d.value);
|
|
1125
1125
|
}),
|
|
1126
|
-
|
|
1126
|
+
p.length === 0 && /* @__PURE__ */ s("div", { className: "nc-section nc-label", children: "No results" })
|
|
1127
1127
|
] })
|
|
1128
1128
|
] });
|
|
1129
1129
|
}
|
|
@@ -1167,7 +1167,7 @@ function lr({
|
|
|
1167
1167
|
disabled: i = !1,
|
|
1168
1168
|
size: a = "default"
|
|
1169
1169
|
}) {
|
|
1170
|
-
const [c, l] = E(!1), [u,
|
|
1170
|
+
const [c, l] = E(!1), [u, p] = E(""), [w, d] = E(""), [g, k] = E({ top: 0, left: 0, width: 0, right: void 0 }), b = Y(null), v = Y(null);
|
|
1171
1171
|
V(() => {
|
|
1172
1172
|
if (c && b.current) {
|
|
1173
1173
|
const x = b.current.getBoundingClientRect(), z = Math.max(x.width, 400);
|
|
@@ -1192,10 +1192,10 @@ function lr({
|
|
|
1192
1192
|
return document.addEventListener("mousedown", x), () => document.removeEventListener("mousedown", x);
|
|
1193
1193
|
}, [c]);
|
|
1194
1194
|
const y = () => {
|
|
1195
|
-
|
|
1195
|
+
p(e || Ke()), d(t || Ke()), l(!0);
|
|
1196
1196
|
}, h = () => {
|
|
1197
1197
|
l(!1);
|
|
1198
|
-
},
|
|
1198
|
+
}, f = () => {
|
|
1199
1199
|
const x = Se(u), M = Se(w);
|
|
1200
1200
|
if (x || M)
|
|
1201
1201
|
return;
|
|
@@ -1224,7 +1224,7 @@ function lr({
|
|
|
1224
1224
|
type: "text",
|
|
1225
1225
|
className: `nc-month-input ${N ? "nc-error" : ""}`,
|
|
1226
1226
|
value: u,
|
|
1227
|
-
onChange: (x) =>
|
|
1227
|
+
onChange: (x) => p(x.target.value),
|
|
1228
1228
|
placeholder: "YY-M(M) or YYYY-M(M)"
|
|
1229
1229
|
}
|
|
1230
1230
|
),
|
|
@@ -1251,7 +1251,7 @@ function lr({
|
|
|
1251
1251
|
ne,
|
|
1252
1252
|
{
|
|
1253
1253
|
variant: "primary",
|
|
1254
|
-
onClick:
|
|
1254
|
+
onClick: f,
|
|
1255
1255
|
disabled: !u || !w || !!N || !!C || !!S,
|
|
1256
1256
|
children: "Apply"
|
|
1257
1257
|
}
|
|
@@ -1280,68 +1280,68 @@ function lr({
|
|
|
1280
1280
|
}
|
|
1281
1281
|
const Vt = 5, Ft = 3;
|
|
1282
1282
|
function dr({ value: e, onChange: t, min: n, max: r, step: o = 1, label: i, disabled: a, className: c = "", style: l, size: u = "default" }) {
|
|
1283
|
-
const
|
|
1284
|
-
const T =
|
|
1283
|
+
const p = u === "small", w = (String(o).split(".")[1] || "").length, d = Y(null), g = Y(!1), k = Y(null), [b, v] = E(!1), [y, h] = E(() => String(e)), f = (I) => parseFloat(I.toFixed(w)), m = (I) => {
|
|
1284
|
+
const T = f(I);
|
|
1285
1285
|
h(String(T)), t(T);
|
|
1286
1286
|
}, N = () => {
|
|
1287
|
-
const
|
|
1288
|
-
n !== void 0 &&
|
|
1287
|
+
const I = e - o;
|
|
1288
|
+
n !== void 0 && I < n || m(parseFloat(I.toFixed(10)));
|
|
1289
1289
|
}, C = () => {
|
|
1290
|
-
const
|
|
1291
|
-
r !== void 0 &&
|
|
1292
|
-
}, P = (
|
|
1293
|
-
const T =
|
|
1290
|
+
const I = e + o;
|
|
1291
|
+
r !== void 0 && I > r || m(parseFloat(I.toFixed(10)));
|
|
1292
|
+
}, P = (I) => {
|
|
1293
|
+
const T = I.target.value;
|
|
1294
1294
|
if (h(T), T === "") return;
|
|
1295
1295
|
const H = parseFloat(T);
|
|
1296
1296
|
isNaN(H) || t(H);
|
|
1297
1297
|
}, B = () => {
|
|
1298
|
-
const
|
|
1299
|
-
if (
|
|
1298
|
+
const I = y;
|
|
1299
|
+
if (I === "") {
|
|
1300
1300
|
m(n !== void 0 ? n : 0);
|
|
1301
1301
|
return;
|
|
1302
1302
|
}
|
|
1303
|
-
const T = parseFloat(
|
|
1303
|
+
const T = parseFloat(I);
|
|
1304
1304
|
if (isNaN(T)) {
|
|
1305
1305
|
m(n !== void 0 ? n : 0);
|
|
1306
1306
|
return;
|
|
1307
1307
|
}
|
|
1308
|
-
let H =
|
|
1308
|
+
let H = f(T);
|
|
1309
1309
|
n !== void 0 && (H = Math.max(n, H)), r !== void 0 && (H = Math.min(r, H)), H !== T ? m(H) : h(String(H));
|
|
1310
|
-
}, S = (
|
|
1311
|
-
a ||
|
|
1312
|
-
startY:
|
|
1310
|
+
}, S = (I) => {
|
|
1311
|
+
a || I.button !== 0 || (g.current = !1, d.current = {
|
|
1312
|
+
startY: I.clientY,
|
|
1313
1313
|
startValue: e,
|
|
1314
|
-
pointerId:
|
|
1314
|
+
pointerId: I.pointerId,
|
|
1315
1315
|
hasMoved: !1,
|
|
1316
1316
|
lastValue: e
|
|
1317
1317
|
}, k.current = setTimeout(() => {
|
|
1318
1318
|
g.current = !0, v(!0);
|
|
1319
|
-
}, 200),
|
|
1320
|
-
}, L = (
|
|
1319
|
+
}, 200), I.currentTarget.setPointerCapture(I.pointerId));
|
|
1320
|
+
}, L = (I) => {
|
|
1321
1321
|
const T = d.current;
|
|
1322
|
-
if (!T || T.pointerId !==
|
|
1323
|
-
const H = T.startY -
|
|
1322
|
+
if (!T || T.pointerId !== I.pointerId) return;
|
|
1323
|
+
const H = T.startY - I.clientY;
|
|
1324
1324
|
if (Math.abs(H) >= Ft && (T.hasMoved = !0, g.current = !0, k.current && (clearTimeout(k.current), k.current = null), v(!0)), !T.hasMoved) return;
|
|
1325
1325
|
const q = Math.trunc(H / Vt);
|
|
1326
1326
|
let O = T.startValue + q * o;
|
|
1327
|
-
n !== void 0 && (O = Math.max(n, O)), r !== void 0 && (O = Math.min(r, O)), O =
|
|
1328
|
-
}, x = (
|
|
1327
|
+
n !== void 0 && (O = Math.max(n, O)), r !== void 0 && (O = Math.min(r, O)), O = f(O), O !== T.lastValue && (T.lastValue = O, h(String(O)), t(O));
|
|
1328
|
+
}, x = (I) => {
|
|
1329
1329
|
const T = d.current;
|
|
1330
|
-
!T || T.pointerId !==
|
|
1331
|
-
}, M = (
|
|
1330
|
+
!T || T.pointerId !== I.pointerId || (k.current && (clearTimeout(k.current), k.current = null), I.currentTarget.hasPointerCapture(I.pointerId) && I.currentTarget.releasePointerCapture(I.pointerId), d.current = null, v(!1));
|
|
1331
|
+
}, M = (I) => (T) => {
|
|
1332
1332
|
if (g.current) {
|
|
1333
1333
|
g.current = !1, T.preventDefault();
|
|
1334
1334
|
return;
|
|
1335
1335
|
}
|
|
1336
|
-
|
|
1336
|
+
I();
|
|
1337
1337
|
}, z = y === "" ? NaN : parseFloat(y), F = y === "" || isNaN(z) || n !== void 0 && z < n || r !== void 0 && z > r;
|
|
1338
|
-
return /* @__PURE__ */ A("div", { className: `nc-col nc-number-input-col ${
|
|
1339
|
-
i && /* @__PURE__ */ s("span", { className: `nc-label ${
|
|
1340
|
-
/* @__PURE__ */ A("div", { className: `nc-number-input-container ${
|
|
1338
|
+
return /* @__PURE__ */ A("div", { className: `nc-col nc-number-input-col ${p ? "nc-small" : ""}`, children: [
|
|
1339
|
+
i && /* @__PURE__ */ s("span", { className: `nc-label ${p ? "nc-small" : ""}`, children: i }),
|
|
1340
|
+
/* @__PURE__ */ A("div", { className: `nc-number-input-container ${p ? "nc-small" : ""} ${c}`, style: l, children: [
|
|
1341
1341
|
/* @__PURE__ */ s(
|
|
1342
1342
|
"input",
|
|
1343
1343
|
{
|
|
1344
|
-
className: `nc-input nc-number-input ${
|
|
1344
|
+
className: `nc-input nc-number-input ${p ? "nc-small" : ""} ${F ? "nc-error" : ""}`,
|
|
1345
1345
|
type: "number",
|
|
1346
1346
|
value: y,
|
|
1347
1347
|
onChange: P,
|
|
@@ -1355,12 +1355,12 @@ function dr({ value: e, onChange: t, min: n, max: r, step: o = 1, label: i, disa
|
|
|
1355
1355
|
/* @__PURE__ */ A(
|
|
1356
1356
|
"div",
|
|
1357
1357
|
{
|
|
1358
|
-
className: `nc-number-input-spinners ${
|
|
1358
|
+
className: `nc-number-input-spinners ${p ? "nc-small" : ""} ${a ? "nc-disabled" : ""} ${b ? "nc-dragging" : ""}`,
|
|
1359
1359
|
children: [
|
|
1360
1360
|
/* @__PURE__ */ s(
|
|
1361
1361
|
"button",
|
|
1362
1362
|
{
|
|
1363
|
-
className: `nc-number-input-spin nc-number-input-spin-up ${
|
|
1363
|
+
className: `nc-number-input-spin nc-number-input-spin-up ${p ? "nc-small" : ""}`,
|
|
1364
1364
|
onClick: M(C),
|
|
1365
1365
|
onPointerDown: S,
|
|
1366
1366
|
onPointerMove: L,
|
|
@@ -1374,7 +1374,7 @@ function dr({ value: e, onChange: t, min: n, max: r, step: o = 1, label: i, disa
|
|
|
1374
1374
|
/* @__PURE__ */ s(
|
|
1375
1375
|
"button",
|
|
1376
1376
|
{
|
|
1377
|
-
className: `nc-number-input-spin nc-number-input-spin-down ${
|
|
1377
|
+
className: `nc-number-input-spin nc-number-input-spin-down ${p ? "nc-small" : ""}`,
|
|
1378
1378
|
onClick: M(N),
|
|
1379
1379
|
onPointerDown: S,
|
|
1380
1380
|
onPointerMove: L,
|
|
@@ -1400,10 +1400,10 @@ function ur({
|
|
|
1400
1400
|
label: i,
|
|
1401
1401
|
disabled: a,
|
|
1402
1402
|
showValue: c = !0,
|
|
1403
|
-
formatValue: l = (
|
|
1403
|
+
formatValue: l = (p) => p.toString(),
|
|
1404
1404
|
width: u = 200
|
|
1405
1405
|
}) {
|
|
1406
|
-
const
|
|
1406
|
+
const p = (d) => {
|
|
1407
1407
|
const g = parseFloat(d.target.value);
|
|
1408
1408
|
t(g);
|
|
1409
1409
|
}, w = (e - n) / (r - n) * 100;
|
|
@@ -1416,7 +1416,7 @@ function ur({
|
|
|
1416
1416
|
type: "range",
|
|
1417
1417
|
className: "nc-slider",
|
|
1418
1418
|
value: e,
|
|
1419
|
-
onChange:
|
|
1419
|
+
onChange: p,
|
|
1420
1420
|
min: n,
|
|
1421
1421
|
max: r,
|
|
1422
1422
|
step: o,
|
|
@@ -1469,36 +1469,36 @@ function pr({ active: e, children: t, keepMounted: n = !1, className: r = "", st
|
|
|
1469
1469
|
return /* @__PURE__ */ s("div", { className: `nc-tab-panels ${r}`, style: o, children: a });
|
|
1470
1470
|
}
|
|
1471
1471
|
function fr({ tabs: e, active: t, onChange: n, onClose: r, permanentTabs: o, className: i, toolbar: a, multiline: c, orientation: l = "horizontal", style: u }) {
|
|
1472
|
-
const
|
|
1472
|
+
const p = Y(null), [w, d] = E(!1), [g, k] = E(!1), b = l === "verticalLeft" || l === "verticalRight", v = Y(!1), y = Y(0), h = Y(0), f = Y(!1);
|
|
1473
1473
|
V(() => {
|
|
1474
1474
|
const S = () => {
|
|
1475
|
-
if (
|
|
1475
|
+
if (p.current)
|
|
1476
1476
|
if (b) {
|
|
1477
|
-
const { scrollTop: x, scrollHeight: M, clientHeight: z } =
|
|
1477
|
+
const { scrollTop: x, scrollHeight: M, clientHeight: z } = p.current;
|
|
1478
1478
|
d(x > 1), k(x < M - z - 1);
|
|
1479
1479
|
} else {
|
|
1480
|
-
const { scrollLeft: x, scrollWidth: M, clientWidth: z } =
|
|
1480
|
+
const { scrollLeft: x, scrollWidth: M, clientWidth: z } = p.current;
|
|
1481
1481
|
d(x > 1), k(x < M - z - 1);
|
|
1482
1482
|
}
|
|
1483
|
-
}, L =
|
|
1483
|
+
}, L = p.current;
|
|
1484
1484
|
if (L)
|
|
1485
1485
|
return S(), L.addEventListener("scroll", S), window.addEventListener("resize", S), () => {
|
|
1486
1486
|
L.removeEventListener("scroll", S), window.removeEventListener("resize", S);
|
|
1487
1487
|
};
|
|
1488
1488
|
}, [e, b]);
|
|
1489
1489
|
const m = (S) => {
|
|
1490
|
-
|
|
1490
|
+
p.current && (v.current = !0, f.current = !1, y.current = b ? S.clientY : S.clientX, h.current = b ? p.current.scrollTop : p.current.scrollLeft, p.current.style.cursor = "grabbing", p.current.style.userSelect = "none");
|
|
1491
1491
|
}, N = (S) => {
|
|
1492
|
-
if (!v.current || !
|
|
1492
|
+
if (!v.current || !p.current) return;
|
|
1493
1493
|
const L = b ? S.clientY : S.clientX, x = y.current - L;
|
|
1494
|
-
Math.abs(x) > 3 && (
|
|
1494
|
+
Math.abs(x) > 3 && (f.current = !0), b ? p.current.scrollTop = h.current + x : p.current.scrollLeft = h.current + x;
|
|
1495
1495
|
}, C = () => {
|
|
1496
|
-
|
|
1496
|
+
p.current && (v.current = !1, p.current.style.cursor = "", p.current.style.userSelect = "");
|
|
1497
1497
|
}, P = () => {
|
|
1498
1498
|
C();
|
|
1499
1499
|
};
|
|
1500
1500
|
V(() => {
|
|
1501
|
-
const S =
|
|
1501
|
+
const S = p.current;
|
|
1502
1502
|
if (!S || b) return;
|
|
1503
1503
|
const L = (x) => {
|
|
1504
1504
|
x.deltaY !== 0 && (x.preventDefault(), S.scrollLeft += x.deltaY * 0.3);
|
|
@@ -1508,7 +1508,7 @@ function fr({ tabs: e, active: t, onChange: n, onClose: r, permanentTabs: o, cla
|
|
|
1508
1508
|
};
|
|
1509
1509
|
}, [b]);
|
|
1510
1510
|
const B = (S) => {
|
|
1511
|
-
|
|
1511
|
+
f.current || n(S);
|
|
1512
1512
|
};
|
|
1513
1513
|
return /* @__PURE__ */ A("div", { className: `nc-tab-container ${b ? `nc-vertical nc-${l}` : ""} ${i || ""}`, style: u, children: [
|
|
1514
1514
|
/* @__PURE__ */ A("div", { className: "nc-tab-scroll-wrapper", children: [
|
|
@@ -1516,7 +1516,7 @@ function fr({ tabs: e, active: t, onChange: n, onClose: r, permanentTabs: o, cla
|
|
|
1516
1516
|
/* @__PURE__ */ s(
|
|
1517
1517
|
"div",
|
|
1518
1518
|
{
|
|
1519
|
-
ref:
|
|
1519
|
+
ref: p,
|
|
1520
1520
|
className: `nc-tab-scroll ${c ? "nc-multiline" : ""}`,
|
|
1521
1521
|
onMouseDown: m,
|
|
1522
1522
|
onMouseMove: N,
|
|
@@ -1646,8 +1646,8 @@ function Gt(e, t, n, r) {
|
|
|
1646
1646
|
const l = o[i - 1].split(" "), u = Math.max(1, Math.min(n, l.length));
|
|
1647
1647
|
for (let w = 0; w < u - 1; w++)
|
|
1648
1648
|
a += l[w].length + 1;
|
|
1649
|
-
const
|
|
1650
|
-
return a +=
|
|
1649
|
+
const p = Math.max(1, Math.min(r, l[u - 1].length + 1));
|
|
1650
|
+
return a += p - 1, a;
|
|
1651
1651
|
}
|
|
1652
1652
|
function Kt(e, t) {
|
|
1653
1653
|
const n = e.split(`
|
|
@@ -1659,46 +1659,46 @@ function Kt(e, t) {
|
|
|
1659
1659
|
}
|
|
1660
1660
|
const mr = Ct(
|
|
1661
1661
|
function({ value: t, onChange: n, placeholder: r, className: o, style: i, showLineNumbers: a = !1, onCursorChange: c, highlightLine: l }, u) {
|
|
1662
|
-
const
|
|
1662
|
+
const p = Y(null), w = Y(null), d = Y(null);
|
|
1663
1663
|
Mt(u, () => ({
|
|
1664
1664
|
goToLine(h) {
|
|
1665
|
-
const
|
|
1666
|
-
if (!
|
|
1665
|
+
const f = p.current;
|
|
1666
|
+
if (!f) return;
|
|
1667
1667
|
const m = Kt(t, h);
|
|
1668
|
-
|
|
1669
|
-
const N = parseFloat(getComputedStyle(
|
|
1670
|
-
|
|
1668
|
+
f.focus(), f.setSelectionRange(m, m);
|
|
1669
|
+
const N = parseFloat(getComputedStyle(f).lineHeight) || 18;
|
|
1670
|
+
f.scrollTop = (Math.max(1, h) - 1) * N, k(), g();
|
|
1671
1671
|
},
|
|
1672
|
-
goToPosition(h,
|
|
1673
|
-
const N =
|
|
1672
|
+
goToPosition(h, f, m) {
|
|
1673
|
+
const N = p.current;
|
|
1674
1674
|
if (!N) return;
|
|
1675
|
-
const C = Gt(t, h,
|
|
1675
|
+
const C = Gt(t, h, f, m);
|
|
1676
1676
|
N.focus(), N.setSelectionRange(C, C);
|
|
1677
1677
|
const P = parseFloat(getComputedStyle(N).lineHeight) || 18;
|
|
1678
1678
|
N.scrollTop = (Math.max(1, h) - 1) * P, k(), g();
|
|
1679
1679
|
}
|
|
1680
1680
|
}), [t]);
|
|
1681
1681
|
const g = X(() => {
|
|
1682
|
-
if (!c || !
|
|
1683
|
-
const h = Yt(t,
|
|
1682
|
+
if (!c || !p.current) return;
|
|
1683
|
+
const h = Yt(t, p.current.selectionStart);
|
|
1684
1684
|
c(h);
|
|
1685
1685
|
}, [c, t]), k = X(() => {
|
|
1686
|
-
const h =
|
|
1686
|
+
const h = p.current;
|
|
1687
1687
|
h && (w.current && (w.current.scrollTop = h.scrollTop, w.current.scrollLeft = h.scrollLeft), d.current && (d.current.scrollTop = h.scrollTop));
|
|
1688
1688
|
}, []);
|
|
1689
1689
|
V(() => {
|
|
1690
1690
|
if (l == null || l < 1) return;
|
|
1691
|
-
const h =
|
|
1691
|
+
const h = p.current;
|
|
1692
1692
|
if (!h) return;
|
|
1693
|
-
const
|
|
1694
|
-
(m < h.scrollTop || N > h.scrollTop + h.clientHeight) && (h.scrollTop = m - h.clientHeight / 2 +
|
|
1693
|
+
const f = parseFloat(getComputedStyle(h).lineHeight) || 18, m = (l - 1) * f, N = m + f;
|
|
1694
|
+
(m < h.scrollTop || N > h.scrollTop + h.clientHeight) && (h.scrollTop = m - h.clientHeight / 2 + f / 2), k();
|
|
1695
1695
|
}, [l]);
|
|
1696
|
-
const b =
|
|
1696
|
+
const b = $e(() => t.split(`
|
|
1697
1697
|
`).length, [t]), v = () => {
|
|
1698
1698
|
const h = [];
|
|
1699
|
-
for (let
|
|
1699
|
+
for (let f = 1; f <= b; f++)
|
|
1700
1700
|
h.push(
|
|
1701
|
-
/* @__PURE__ */ s("div", { className: `nc-csv-line-number ${l ===
|
|
1701
|
+
/* @__PURE__ */ s("div", { className: `nc-csv-line-number ${l === f ? "nc-csv-highlight" : ""}`, children: f }, f)
|
|
1702
1702
|
);
|
|
1703
1703
|
return /* @__PURE__ */ s("div", { className: "nc-csv-gutter", ref: d, children: h });
|
|
1704
1704
|
}, y = (h) => h ? h.split(`
|
|
@@ -1720,7 +1720,7 @@ const mr = Ct(
|
|
|
1720
1720
|
/* @__PURE__ */ s(
|
|
1721
1721
|
"textarea",
|
|
1722
1722
|
{
|
|
1723
|
-
ref:
|
|
1723
|
+
ref: p,
|
|
1724
1724
|
className: "nc-csv-textarea-input",
|
|
1725
1725
|
value: t,
|
|
1726
1726
|
onChange: (h) => {
|
|
@@ -1864,7 +1864,7 @@ function Xt({ notification: e }) {
|
|
|
1864
1864
|
function gr() {
|
|
1865
1865
|
const [e, t] = E([]), [n, r] = E(/* @__PURE__ */ new Map()), [o, i] = E(/* @__PURE__ */ new Set()), a = Y(null), c = Y([]);
|
|
1866
1866
|
return V(() => _t((u) => {
|
|
1867
|
-
const
|
|
1867
|
+
const p = new Set(c.current.map((d) => d.id)), w = u.filter((d) => !p.has(d.id)).map((d) => d.id);
|
|
1868
1868
|
w.length > 0 ? (t(u), i(new Set(w)), requestAnimationFrame(() => {
|
|
1869
1869
|
requestAnimationFrame(() => {
|
|
1870
1870
|
i(/* @__PURE__ */ new Set());
|
|
@@ -1874,10 +1874,10 @@ function gr() {
|
|
|
1874
1874
|
if (!a.current) return;
|
|
1875
1875
|
const l = /* @__PURE__ */ new Map();
|
|
1876
1876
|
let u = 0;
|
|
1877
|
-
const
|
|
1877
|
+
const p = a.current.children;
|
|
1878
1878
|
e.forEach((w, d) => {
|
|
1879
|
-
if (l.set(w.id, u),
|
|
1880
|
-
const g =
|
|
1879
|
+
if (l.set(w.id, u), p[d]) {
|
|
1880
|
+
const g = p[d].offsetHeight;
|
|
1881
1881
|
w.isRemoving || (u += g + 12);
|
|
1882
1882
|
}
|
|
1883
1883
|
}), r(l);
|
|
@@ -1902,7 +1902,7 @@ function gr() {
|
|
|
1902
1902
|
width: "100%"
|
|
1903
1903
|
},
|
|
1904
1904
|
children: e.map((l) => {
|
|
1905
|
-
const u = o.has(l.id),
|
|
1905
|
+
const u = o.has(l.id), p = l.isRemoving, w = n.get(l.id) || 0;
|
|
1906
1906
|
return /* @__PURE__ */ s(
|
|
1907
1907
|
"div",
|
|
1908
1908
|
{
|
|
@@ -1912,8 +1912,8 @@ function gr() {
|
|
|
1912
1912
|
left: 0,
|
|
1913
1913
|
transform: u ? `translate3d(-40px, ${w}px, 0)` : `translate3d(0, ${w}px, 0)`,
|
|
1914
1914
|
// Only animate transform when not leaving, animate opacity always
|
|
1915
|
-
transition:
|
|
1916
|
-
opacity:
|
|
1915
|
+
transition: p ? "opacity 300ms ease-out" : "transform 300ms ease-out, opacity 300ms ease-out",
|
|
1916
|
+
opacity: p ? 0 : 1,
|
|
1917
1917
|
width: "100%"
|
|
1918
1918
|
},
|
|
1919
1919
|
children: /* @__PURE__ */ s(Xt, { notification: l })
|
|
@@ -1933,7 +1933,7 @@ const br = {
|
|
|
1933
1933
|
show: (e) => Jt(e)
|
|
1934
1934
|
};
|
|
1935
1935
|
function vr(e) {
|
|
1936
|
-
const t =
|
|
1936
|
+
const t = It.createInstance(), n = {};
|
|
1937
1937
|
for (const o in e)
|
|
1938
1938
|
n[o] = { translation: e[o] };
|
|
1939
1939
|
const r = typeof document < "u" && document.documentElement.lang || "en";
|
|
@@ -2226,7 +2226,7 @@ class on extends ze.Component {
|
|
|
2226
2226
|
}
|
|
2227
2227
|
}
|
|
2228
2228
|
function rt({ appId: e, isActive: t, onClose: n }) {
|
|
2229
|
-
const { t: r } = oe(), o = me.get(e), [i, a] = E(""), [c, l] = E(null), [u,
|
|
2229
|
+
const { t: r } = oe(), o = me.get(e), [i, a] = E(""), [c, l] = E(null), [u, p] = E(null), [w, d] = E(!1), [g, k] = E(!1);
|
|
2230
2230
|
ze.useEffect(() => {
|
|
2231
2231
|
o != null && o.titleKey && a(r(o.titleKey));
|
|
2232
2232
|
}, [o, r]);
|
|
@@ -2237,23 +2237,23 @@ function rt({ appId: e, isActive: t, onClose: n }) {
|
|
|
2237
2237
|
}, []), y = X(() => {
|
|
2238
2238
|
l(null);
|
|
2239
2239
|
}, []), h = X((S) => {
|
|
2240
|
-
|
|
2241
|
-
}, []),
|
|
2242
|
-
|
|
2240
|
+
p(S);
|
|
2241
|
+
}, []), f = X(() => {
|
|
2242
|
+
p(null);
|
|
2243
2243
|
}, []), m = X((S) => {
|
|
2244
2244
|
d(S);
|
|
2245
2245
|
}, []), N = X((S) => {
|
|
2246
2246
|
k(S);
|
|
2247
|
-
}, []), C =
|
|
2247
|
+
}, []), C = $e(() => ({
|
|
2248
2248
|
setTitle: b,
|
|
2249
2249
|
setBackHandler: v,
|
|
2250
2250
|
clearBackHandler: y,
|
|
2251
2251
|
setToolbar: h,
|
|
2252
|
-
clearToolbar:
|
|
2252
|
+
clearToolbar: f,
|
|
2253
2253
|
setHideBackButton: m,
|
|
2254
2254
|
setHideTitleBar: N,
|
|
2255
2255
|
close: n
|
|
2256
|
-
}), [b, v, y, h,
|
|
2256
|
+
}), [b, v, y, h, f, m, N, n]);
|
|
2257
2257
|
if (!o)
|
|
2258
2258
|
return null;
|
|
2259
2259
|
const P = o.component, B = !o.hideTitleBar && !g;
|
|
@@ -2281,7 +2281,7 @@ function rt({ appId: e, isActive: t, onClose: n }) {
|
|
|
2281
2281
|
overflowY: B ? "auto" : void 0
|
|
2282
2282
|
},
|
|
2283
2283
|
children: /* @__PURE__ */ s(nt.Provider, { value: C, children: /* @__PURE__ */ s(on, { appId: e, children: /* @__PURE__ */ s(
|
|
2284
|
-
|
|
2284
|
+
$t,
|
|
2285
2285
|
{
|
|
2286
2286
|
fallback: /* @__PURE__ */ s("div", { className: "nc-app-loading", children: /* @__PURE__ */ s(Qe, {}) }),
|
|
2287
2287
|
children: /* @__PURE__ */ s(P, {})
|
|
@@ -2437,12 +2437,12 @@ const Be = "-", sn = (e) => {
|
|
|
2437
2437
|
experimentalParseClassName: n
|
|
2438
2438
|
} = e, r = t.length === 1, o = t[0], i = t.length, a = (c) => {
|
|
2439
2439
|
const l = [];
|
|
2440
|
-
let u = 0,
|
|
2440
|
+
let u = 0, p = 0, w;
|
|
2441
2441
|
for (let v = 0; v < c.length; v++) {
|
|
2442
2442
|
let y = c[v];
|
|
2443
2443
|
if (u === 0) {
|
|
2444
2444
|
if (y === o && (r || c.slice(v, v + i) === t)) {
|
|
2445
|
-
l.push(c.slice(
|
|
2445
|
+
l.push(c.slice(p, v)), p = v + i;
|
|
2446
2446
|
continue;
|
|
2447
2447
|
}
|
|
2448
2448
|
if (y === "/") {
|
|
@@ -2452,7 +2452,7 @@ const Be = "-", sn = (e) => {
|
|
|
2452
2452
|
}
|
|
2453
2453
|
y === "[" ? u++ : y === "]" && u--;
|
|
2454
2454
|
}
|
|
2455
|
-
const d = l.length === 0 ? c : c.substring(
|
|
2455
|
+
const d = l.length === 0 ? c : c.substring(p), g = d.startsWith(at), k = g ? d.substring(1) : d, b = w && w > p ? w - p : void 0;
|
|
2456
2456
|
return {
|
|
2457
2457
|
modifiers: l,
|
|
2458
2458
|
hasImportantModifier: g,
|
|
@@ -2485,7 +2485,7 @@ const Be = "-", sn = (e) => {
|
|
|
2485
2485
|
let c = "";
|
|
2486
2486
|
for (let l = a.length - 1; l >= 0; l -= 1) {
|
|
2487
2487
|
const u = a[l], {
|
|
2488
|
-
modifiers:
|
|
2488
|
+
modifiers: p,
|
|
2489
2489
|
hasImportantModifier: w,
|
|
2490
2490
|
baseClassName: d,
|
|
2491
2491
|
maybePostfixModifierPosition: g
|
|
@@ -2502,13 +2502,13 @@ const Be = "-", sn = (e) => {
|
|
|
2502
2502
|
}
|
|
2503
2503
|
k = !1;
|
|
2504
2504
|
}
|
|
2505
|
-
const v = fn(
|
|
2505
|
+
const v = fn(p).join(":"), y = w ? v + at : v, h = y + b;
|
|
2506
2506
|
if (i.includes(h))
|
|
2507
2507
|
continue;
|
|
2508
2508
|
i.push(h);
|
|
2509
|
-
const
|
|
2510
|
-
for (let m = 0; m <
|
|
2511
|
-
const N =
|
|
2509
|
+
const f = o(b, k);
|
|
2510
|
+
for (let m = 0; m < f.length; ++m) {
|
|
2511
|
+
const N = f[m];
|
|
2512
2512
|
i.push(y + N);
|
|
2513
2513
|
}
|
|
2514
2514
|
c = u + (c.length > 0 ? " " + c : c);
|
|
@@ -2532,15 +2532,15 @@ const lt = (e) => {
|
|
|
2532
2532
|
function vn(e, ...t) {
|
|
2533
2533
|
let n, r, o, i = a;
|
|
2534
2534
|
function a(l) {
|
|
2535
|
-
const u = t.reduce((
|
|
2535
|
+
const u = t.reduce((p, w) => w(p), e());
|
|
2536
2536
|
return n = hn(u), r = n.cache.get, o = n.cache.set, i = c, c(l);
|
|
2537
2537
|
}
|
|
2538
2538
|
function c(l) {
|
|
2539
2539
|
const u = r(l);
|
|
2540
2540
|
if (u)
|
|
2541
2541
|
return u;
|
|
2542
|
-
const
|
|
2543
|
-
return o(l,
|
|
2542
|
+
const p = gn(l, n);
|
|
2543
|
+
return o(l, p), p;
|
|
2544
2544
|
}
|
|
2545
2545
|
return function() {
|
|
2546
2546
|
return i(bn.apply(null, arguments));
|
|
@@ -2549,7 +2549,7 @@ function vn(e, ...t) {
|
|
|
2549
2549
|
const K = (e) => {
|
|
2550
2550
|
const t = (n) => n[e] || [];
|
|
2551
2551
|
return t.isThemeGetter = !0, t;
|
|
2552
|
-
}, dt = /^\[(?:([a-z-]+):)?(.+)\]$/i, wn = /^\d+\/\d+$/, yn = /* @__PURE__ */ new Set(["px", "full", "screen"]), xn = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, kn = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, Nn = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, An = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Sn = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, te = (e) => he(e) || yn.has(e) || wn.test(e), ie = (e) => be(e, "length", Pn), he = (e) => !!e && !Number.isNaN(Number(e)),
|
|
2552
|
+
}, dt = /^\[(?:([a-z-]+):)?(.+)\]$/i, wn = /^\d+\/\d+$/, yn = /* @__PURE__ */ new Set(["px", "full", "screen"]), xn = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, kn = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, Nn = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, An = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Sn = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, te = (e) => he(e) || yn.has(e) || wn.test(e), ie = (e) => be(e, "length", Pn), he = (e) => !!e && !Number.isNaN(Number(e)), Ie = (e) => be(e, "number", he), xe = (e) => !!e && Number.isInteger(Number(e)), Cn = (e) => e.endsWith("%") && he(e.slice(0, -1)), $ = (e) => dt.test(e), ce = (e) => xn.test(e), Mn = /* @__PURE__ */ new Set(["length", "size", "percentage"]), $n = (e) => be(e, Mn, ut), In = (e) => be(e, "position", ut), Rn = /* @__PURE__ */ new Set(["image", "url"]), Tn = (e) => be(e, Rn, zn), En = (e) => be(e, "", Ln), ke = () => !0, be = (e, t, n) => {
|
|
2553
2553
|
const r = dt.exec(e);
|
|
2554
2554
|
return r ? r[1] ? typeof t == "string" ? r[1] === t : t.has(r[1]) : n(r[2]) : !1;
|
|
2555
2555
|
}, Pn = (e) => (
|
|
@@ -2558,17 +2558,17 @@ const K = (e) => {
|
|
|
2558
2558
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
2559
2559
|
kn.test(e) && !Nn.test(e)
|
|
2560
2560
|
), ut = () => !1, Ln = (e) => An.test(e), zn = (e) => Sn.test(e), Bn = () => {
|
|
2561
|
-
const e = K("colors"), t = K("spacing"), n = K("blur"), r = K("brightness"), o = K("borderColor"), i = K("borderRadius"), a = K("borderSpacing"), c = K("borderWidth"), l = K("contrast"), u = K("grayscale"),
|
|
2561
|
+
const e = K("colors"), t = K("spacing"), n = K("blur"), r = K("brightness"), o = K("borderColor"), i = K("borderRadius"), a = K("borderSpacing"), c = K("borderWidth"), l = K("contrast"), u = K("grayscale"), p = K("hueRotate"), w = K("invert"), d = K("gap"), g = K("gradientColorStops"), k = K("gradientColorStopPositions"), b = K("inset"), v = K("margin"), y = K("opacity"), h = K("padding"), f = K("saturate"), m = K("scale"), N = K("sepia"), C = K("skew"), P = K("space"), B = K("translate"), S = () => ["auto", "contain", "none"], L = () => ["auto", "hidden", "clip", "visible", "scroll"], x = () => ["auto", $, t], M = () => [$, t], z = () => ["", te, ie], F = () => ["auto", he, $], I = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], T = () => ["solid", "dashed", "dotted", "double", "none"], H = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], q = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], O = () => ["", "0", $], _ = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], D = () => [he, $];
|
|
2562
2562
|
return {
|
|
2563
2563
|
cacheSize: 500,
|
|
2564
2564
|
separator: ":",
|
|
2565
2565
|
theme: {
|
|
2566
2566
|
colors: [ke],
|
|
2567
2567
|
spacing: [te, ie],
|
|
2568
|
-
blur: ["none", "", ce,
|
|
2568
|
+
blur: ["none", "", ce, $],
|
|
2569
2569
|
brightness: D(),
|
|
2570
2570
|
borderColor: [e],
|
|
2571
|
-
borderRadius: ["none", "", "full", ce,
|
|
2571
|
+
borderRadius: ["none", "", "full", ce, $],
|
|
2572
2572
|
borderSpacing: M(),
|
|
2573
2573
|
borderWidth: z(),
|
|
2574
2574
|
contrast: D(),
|
|
@@ -2596,7 +2596,7 @@ const K = (e) => {
|
|
|
2596
2596
|
* @see https://tailwindcss.com/docs/aspect-ratio
|
|
2597
2597
|
*/
|
|
2598
2598
|
aspect: [{
|
|
2599
|
-
aspect: ["auto", "square", "video",
|
|
2599
|
+
aspect: ["auto", "square", "video", $]
|
|
2600
2600
|
}],
|
|
2601
2601
|
/**
|
|
2602
2602
|
* Container
|
|
@@ -2681,7 +2681,7 @@ const K = (e) => {
|
|
|
2681
2681
|
* @see https://tailwindcss.com/docs/object-position
|
|
2682
2682
|
*/
|
|
2683
2683
|
"object-position": [{
|
|
2684
|
-
object: [
|
|
2684
|
+
object: [...I(), $]
|
|
2685
2685
|
}],
|
|
2686
2686
|
/**
|
|
2687
2687
|
* Overflow
|
|
@@ -2803,7 +2803,7 @@ const K = (e) => {
|
|
|
2803
2803
|
* @see https://tailwindcss.com/docs/z-index
|
|
2804
2804
|
*/
|
|
2805
2805
|
z: [{
|
|
2806
|
-
z: ["auto", xe,
|
|
2806
|
+
z: ["auto", xe, $]
|
|
2807
2807
|
}],
|
|
2808
2808
|
// Flexbox and Grid
|
|
2809
2809
|
/**
|
|
@@ -2832,7 +2832,7 @@ const K = (e) => {
|
|
|
2832
2832
|
* @see https://tailwindcss.com/docs/flex
|
|
2833
2833
|
*/
|
|
2834
2834
|
flex: [{
|
|
2835
|
-
flex: ["1", "auto", "initial", "none",
|
|
2835
|
+
flex: ["1", "auto", "initial", "none", $]
|
|
2836
2836
|
}],
|
|
2837
2837
|
/**
|
|
2838
2838
|
* Flex Grow
|
|
@@ -2853,7 +2853,7 @@ const K = (e) => {
|
|
|
2853
2853
|
* @see https://tailwindcss.com/docs/order
|
|
2854
2854
|
*/
|
|
2855
2855
|
order: [{
|
|
2856
|
-
order: ["first", "last", "none", xe,
|
|
2856
|
+
order: ["first", "last", "none", xe, $]
|
|
2857
2857
|
}],
|
|
2858
2858
|
/**
|
|
2859
2859
|
* Grid Template Columns
|
|
@@ -2868,8 +2868,8 @@ const K = (e) => {
|
|
|
2868
2868
|
*/
|
|
2869
2869
|
"col-start-end": [{
|
|
2870
2870
|
col: ["auto", {
|
|
2871
|
-
span: ["full", xe,
|
|
2872
|
-
},
|
|
2871
|
+
span: ["full", xe, $]
|
|
2872
|
+
}, $]
|
|
2873
2873
|
}],
|
|
2874
2874
|
/**
|
|
2875
2875
|
* Grid Column Start
|
|
@@ -2898,8 +2898,8 @@ const K = (e) => {
|
|
|
2898
2898
|
*/
|
|
2899
2899
|
"row-start-end": [{
|
|
2900
2900
|
row: ["auto", {
|
|
2901
|
-
span: [xe,
|
|
2902
|
-
},
|
|
2901
|
+
span: [xe, $]
|
|
2902
|
+
}, $]
|
|
2903
2903
|
}],
|
|
2904
2904
|
/**
|
|
2905
2905
|
* Grid Row Start
|
|
@@ -2927,14 +2927,14 @@ const K = (e) => {
|
|
|
2927
2927
|
* @see https://tailwindcss.com/docs/grid-auto-columns
|
|
2928
2928
|
*/
|
|
2929
2929
|
"auto-cols": [{
|
|
2930
|
-
"auto-cols": ["auto", "min", "max", "fr",
|
|
2930
|
+
"auto-cols": ["auto", "min", "max", "fr", $]
|
|
2931
2931
|
}],
|
|
2932
2932
|
/**
|
|
2933
2933
|
* Grid Auto Rows
|
|
2934
2934
|
* @see https://tailwindcss.com/docs/grid-auto-rows
|
|
2935
2935
|
*/
|
|
2936
2936
|
"auto-rows": [{
|
|
2937
|
-
"auto-rows": ["auto", "min", "max", "fr",
|
|
2937
|
+
"auto-rows": ["auto", "min", "max", "fr", $]
|
|
2938
2938
|
}],
|
|
2939
2939
|
/**
|
|
2940
2940
|
* Gap
|
|
@@ -3177,21 +3177,21 @@ const K = (e) => {
|
|
|
3177
3177
|
* @see https://tailwindcss.com/docs/width
|
|
3178
3178
|
*/
|
|
3179
3179
|
w: [{
|
|
3180
|
-
w: ["auto", "min", "max", "fit", "svw", "lvw", "dvw",
|
|
3180
|
+
w: ["auto", "min", "max", "fit", "svw", "lvw", "dvw", $, t]
|
|
3181
3181
|
}],
|
|
3182
3182
|
/**
|
|
3183
3183
|
* Min-Width
|
|
3184
3184
|
* @see https://tailwindcss.com/docs/min-width
|
|
3185
3185
|
*/
|
|
3186
3186
|
"min-w": [{
|
|
3187
|
-
"min-w": [
|
|
3187
|
+
"min-w": [$, t, "min", "max", "fit"]
|
|
3188
3188
|
}],
|
|
3189
3189
|
/**
|
|
3190
3190
|
* Max-Width
|
|
3191
3191
|
* @see https://tailwindcss.com/docs/max-width
|
|
3192
3192
|
*/
|
|
3193
3193
|
"max-w": [{
|
|
3194
|
-
"max-w": [
|
|
3194
|
+
"max-w": [$, t, "none", "full", "min", "max", "fit", "prose", {
|
|
3195
3195
|
screen: [ce]
|
|
3196
3196
|
}, ce]
|
|
3197
3197
|
}],
|
|
@@ -3200,28 +3200,28 @@ const K = (e) => {
|
|
|
3200
3200
|
* @see https://tailwindcss.com/docs/height
|
|
3201
3201
|
*/
|
|
3202
3202
|
h: [{
|
|
3203
|
-
h: [
|
|
3203
|
+
h: [$, t, "auto", "min", "max", "fit", "svh", "lvh", "dvh"]
|
|
3204
3204
|
}],
|
|
3205
3205
|
/**
|
|
3206
3206
|
* Min-Height
|
|
3207
3207
|
* @see https://tailwindcss.com/docs/min-height
|
|
3208
3208
|
*/
|
|
3209
3209
|
"min-h": [{
|
|
3210
|
-
"min-h": [
|
|
3210
|
+
"min-h": [$, t, "min", "max", "fit", "svh", "lvh", "dvh"]
|
|
3211
3211
|
}],
|
|
3212
3212
|
/**
|
|
3213
3213
|
* Max-Height
|
|
3214
3214
|
* @see https://tailwindcss.com/docs/max-height
|
|
3215
3215
|
*/
|
|
3216
3216
|
"max-h": [{
|
|
3217
|
-
"max-h": [
|
|
3217
|
+
"max-h": [$, t, "min", "max", "fit", "svh", "lvh", "dvh"]
|
|
3218
3218
|
}],
|
|
3219
3219
|
/**
|
|
3220
3220
|
* Size
|
|
3221
3221
|
* @see https://tailwindcss.com/docs/size
|
|
3222
3222
|
*/
|
|
3223
3223
|
size: [{
|
|
3224
|
-
size: [
|
|
3224
|
+
size: [$, t, "auto", "min", "max", "fit"]
|
|
3225
3225
|
}],
|
|
3226
3226
|
// Typography
|
|
3227
3227
|
/**
|
|
@@ -3246,7 +3246,7 @@ const K = (e) => {
|
|
|
3246
3246
|
* @see https://tailwindcss.com/docs/font-weight
|
|
3247
3247
|
*/
|
|
3248
3248
|
"font-weight": [{
|
|
3249
|
-
font: ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black",
|
|
3249
|
+
font: ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black", Ie]
|
|
3250
3250
|
}],
|
|
3251
3251
|
/**
|
|
3252
3252
|
* Font Family
|
|
@@ -3290,35 +3290,35 @@ const K = (e) => {
|
|
|
3290
3290
|
* @see https://tailwindcss.com/docs/letter-spacing
|
|
3291
3291
|
*/
|
|
3292
3292
|
tracking: [{
|
|
3293
|
-
tracking: ["tighter", "tight", "normal", "wide", "wider", "widest",
|
|
3293
|
+
tracking: ["tighter", "tight", "normal", "wide", "wider", "widest", $]
|
|
3294
3294
|
}],
|
|
3295
3295
|
/**
|
|
3296
3296
|
* Line Clamp
|
|
3297
3297
|
* @see https://tailwindcss.com/docs/line-clamp
|
|
3298
3298
|
*/
|
|
3299
3299
|
"line-clamp": [{
|
|
3300
|
-
"line-clamp": ["none", he,
|
|
3300
|
+
"line-clamp": ["none", he, Ie]
|
|
3301
3301
|
}],
|
|
3302
3302
|
/**
|
|
3303
3303
|
* Line Height
|
|
3304
3304
|
* @see https://tailwindcss.com/docs/line-height
|
|
3305
3305
|
*/
|
|
3306
3306
|
leading: [{
|
|
3307
|
-
leading: ["none", "tight", "snug", "normal", "relaxed", "loose", te,
|
|
3307
|
+
leading: ["none", "tight", "snug", "normal", "relaxed", "loose", te, $]
|
|
3308
3308
|
}],
|
|
3309
3309
|
/**
|
|
3310
3310
|
* List Style Image
|
|
3311
3311
|
* @see https://tailwindcss.com/docs/list-style-image
|
|
3312
3312
|
*/
|
|
3313
3313
|
"list-image": [{
|
|
3314
|
-
"list-image": ["none",
|
|
3314
|
+
"list-image": ["none", $]
|
|
3315
3315
|
}],
|
|
3316
3316
|
/**
|
|
3317
3317
|
* List Style Type
|
|
3318
3318
|
* @see https://tailwindcss.com/docs/list-style-type
|
|
3319
3319
|
*/
|
|
3320
3320
|
"list-style-type": [{
|
|
3321
|
-
list: ["none", "disc", "decimal",
|
|
3321
|
+
list: ["none", "disc", "decimal", $]
|
|
3322
3322
|
}],
|
|
3323
3323
|
/**
|
|
3324
3324
|
* List Style Position
|
|
@@ -3387,7 +3387,7 @@ const K = (e) => {
|
|
|
3387
3387
|
* @see https://tailwindcss.com/docs/text-underline-offset
|
|
3388
3388
|
*/
|
|
3389
3389
|
"underline-offset": [{
|
|
3390
|
-
"underline-offset": ["auto", te,
|
|
3390
|
+
"underline-offset": ["auto", te, $]
|
|
3391
3391
|
}],
|
|
3392
3392
|
/**
|
|
3393
3393
|
* Text Decoration Color
|
|
@@ -3425,7 +3425,7 @@ const K = (e) => {
|
|
|
3425
3425
|
* @see https://tailwindcss.com/docs/vertical-align
|
|
3426
3426
|
*/
|
|
3427
3427
|
"vertical-align": [{
|
|
3428
|
-
align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super",
|
|
3428
|
+
align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", $]
|
|
3429
3429
|
}],
|
|
3430
3430
|
/**
|
|
3431
3431
|
* Whitespace
|
|
@@ -3453,7 +3453,7 @@ const K = (e) => {
|
|
|
3453
3453
|
* @see https://tailwindcss.com/docs/content
|
|
3454
3454
|
*/
|
|
3455
3455
|
content: [{
|
|
3456
|
-
content: ["none",
|
|
3456
|
+
content: ["none", $]
|
|
3457
3457
|
}],
|
|
3458
3458
|
// Backgrounds
|
|
3459
3459
|
/**
|
|
@@ -3490,7 +3490,7 @@ const K = (e) => {
|
|
|
3490
3490
|
* @see https://tailwindcss.com/docs/background-position
|
|
3491
3491
|
*/
|
|
3492
3492
|
"bg-position": [{
|
|
3493
|
-
bg: [
|
|
3493
|
+
bg: [...I(), In]
|
|
3494
3494
|
}],
|
|
3495
3495
|
/**
|
|
3496
3496
|
* Background Repeat
|
|
@@ -3506,7 +3506,7 @@ const K = (e) => {
|
|
|
3506
3506
|
* @see https://tailwindcss.com/docs/background-size
|
|
3507
3507
|
*/
|
|
3508
3508
|
"bg-size": [{
|
|
3509
|
-
bg: ["auto", "cover", "contain",
|
|
3509
|
+
bg: ["auto", "cover", "contain", $n]
|
|
3510
3510
|
}],
|
|
3511
3511
|
/**
|
|
3512
3512
|
* Background Image
|
|
@@ -3869,7 +3869,7 @@ const K = (e) => {
|
|
|
3869
3869
|
* @see https://tailwindcss.com/docs/outline-offset
|
|
3870
3870
|
*/
|
|
3871
3871
|
"outline-offset": [{
|
|
3872
|
-
"outline-offset": [te,
|
|
3872
|
+
"outline-offset": [te, $]
|
|
3873
3873
|
}],
|
|
3874
3874
|
/**
|
|
3875
3875
|
* Outline Width
|
|
@@ -3996,7 +3996,7 @@ const K = (e) => {
|
|
|
3996
3996
|
* @see https://tailwindcss.com/docs/drop-shadow
|
|
3997
3997
|
*/
|
|
3998
3998
|
"drop-shadow": [{
|
|
3999
|
-
"drop-shadow": ["", "none", ce,
|
|
3999
|
+
"drop-shadow": ["", "none", ce, $]
|
|
4000
4000
|
}],
|
|
4001
4001
|
/**
|
|
4002
4002
|
* Grayscale
|
|
@@ -4010,7 +4010,7 @@ const K = (e) => {
|
|
|
4010
4010
|
* @see https://tailwindcss.com/docs/hue-rotate
|
|
4011
4011
|
*/
|
|
4012
4012
|
"hue-rotate": [{
|
|
4013
|
-
"hue-rotate": [
|
|
4013
|
+
"hue-rotate": [p]
|
|
4014
4014
|
}],
|
|
4015
4015
|
/**
|
|
4016
4016
|
* Invert
|
|
@@ -4024,7 +4024,7 @@ const K = (e) => {
|
|
|
4024
4024
|
* @see https://tailwindcss.com/docs/saturate
|
|
4025
4025
|
*/
|
|
4026
4026
|
saturate: [{
|
|
4027
|
-
saturate: [
|
|
4027
|
+
saturate: [f]
|
|
4028
4028
|
}],
|
|
4029
4029
|
/**
|
|
4030
4030
|
* Sepia
|
|
@@ -4074,7 +4074,7 @@ const K = (e) => {
|
|
|
4074
4074
|
* @see https://tailwindcss.com/docs/backdrop-hue-rotate
|
|
4075
4075
|
*/
|
|
4076
4076
|
"backdrop-hue-rotate": [{
|
|
4077
|
-
"backdrop-hue-rotate": [
|
|
4077
|
+
"backdrop-hue-rotate": [p]
|
|
4078
4078
|
}],
|
|
4079
4079
|
/**
|
|
4080
4080
|
* Backdrop Invert
|
|
@@ -4095,7 +4095,7 @@ const K = (e) => {
|
|
|
4095
4095
|
* @see https://tailwindcss.com/docs/backdrop-saturate
|
|
4096
4096
|
*/
|
|
4097
4097
|
"backdrop-saturate": [{
|
|
4098
|
-
"backdrop-saturate": [
|
|
4098
|
+
"backdrop-saturate": [f]
|
|
4099
4099
|
}],
|
|
4100
4100
|
/**
|
|
4101
4101
|
* Backdrop Sepia
|
|
@@ -4153,7 +4153,7 @@ const K = (e) => {
|
|
|
4153
4153
|
* @see https://tailwindcss.com/docs/transition-property
|
|
4154
4154
|
*/
|
|
4155
4155
|
transition: [{
|
|
4156
|
-
transition: ["none", "all", "", "colors", "opacity", "shadow", "transform",
|
|
4156
|
+
transition: ["none", "all", "", "colors", "opacity", "shadow", "transform", $]
|
|
4157
4157
|
}],
|
|
4158
4158
|
/**
|
|
4159
4159
|
* Transition Duration
|
|
@@ -4167,7 +4167,7 @@ const K = (e) => {
|
|
|
4167
4167
|
* @see https://tailwindcss.com/docs/transition-timing-function
|
|
4168
4168
|
*/
|
|
4169
4169
|
ease: [{
|
|
4170
|
-
ease: ["linear", "in", "out", "in-out",
|
|
4170
|
+
ease: ["linear", "in", "out", "in-out", $]
|
|
4171
4171
|
}],
|
|
4172
4172
|
/**
|
|
4173
4173
|
* Transition Delay
|
|
@@ -4181,7 +4181,7 @@ const K = (e) => {
|
|
|
4181
4181
|
* @see https://tailwindcss.com/docs/animation
|
|
4182
4182
|
*/
|
|
4183
4183
|
animate: [{
|
|
4184
|
-
animate: ["none", "spin", "ping", "pulse", "bounce",
|
|
4184
|
+
animate: ["none", "spin", "ping", "pulse", "bounce", $]
|
|
4185
4185
|
}],
|
|
4186
4186
|
// Transforms
|
|
4187
4187
|
/**
|
|
@@ -4217,7 +4217,7 @@ const K = (e) => {
|
|
|
4217
4217
|
* @see https://tailwindcss.com/docs/rotate
|
|
4218
4218
|
*/
|
|
4219
4219
|
rotate: [{
|
|
4220
|
-
rotate: [xe,
|
|
4220
|
+
rotate: [xe, $]
|
|
4221
4221
|
}],
|
|
4222
4222
|
/**
|
|
4223
4223
|
* Translate X
|
|
@@ -4252,7 +4252,7 @@ const K = (e) => {
|
|
|
4252
4252
|
* @see https://tailwindcss.com/docs/transform-origin
|
|
4253
4253
|
*/
|
|
4254
4254
|
"transform-origin": [{
|
|
4255
|
-
origin: ["center", "top", "top-right", "right", "bottom-right", "bottom", "bottom-left", "left", "top-left",
|
|
4255
|
+
origin: ["center", "top", "top-right", "right", "bottom-right", "bottom", "bottom-left", "left", "top-left", $]
|
|
4256
4256
|
}],
|
|
4257
4257
|
// Interactivity
|
|
4258
4258
|
/**
|
|
@@ -4274,7 +4274,7 @@ const K = (e) => {
|
|
|
4274
4274
|
* @see https://tailwindcss.com/docs/cursor
|
|
4275
4275
|
*/
|
|
4276
4276
|
cursor: [{
|
|
4277
|
-
cursor: ["auto", "default", "pointer", "wait", "text", "move", "help", "not-allowed", "none", "context-menu", "progress", "cell", "crosshair", "vertical-text", "alias", "copy", "no-drop", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out",
|
|
4277
|
+
cursor: ["auto", "default", "pointer", "wait", "text", "move", "help", "not-allowed", "none", "context-menu", "progress", "cell", "crosshair", "vertical-text", "alias", "copy", "no-drop", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out", $]
|
|
4278
4278
|
}],
|
|
4279
4279
|
/**
|
|
4280
4280
|
* Caret Color
|
|
@@ -4496,7 +4496,7 @@ const K = (e) => {
|
|
|
4496
4496
|
* @see https://tailwindcss.com/docs/will-change
|
|
4497
4497
|
*/
|
|
4498
4498
|
"will-change": [{
|
|
4499
|
-
"will-change": ["auto", "scroll", "contents", "transform",
|
|
4499
|
+
"will-change": ["auto", "scroll", "contents", "transform", $]
|
|
4500
4500
|
}],
|
|
4501
4501
|
// SVG
|
|
4502
4502
|
/**
|
|
@@ -4511,7 +4511,7 @@ const K = (e) => {
|
|
|
4511
4511
|
* @see https://tailwindcss.com/docs/stroke-width
|
|
4512
4512
|
*/
|
|
4513
4513
|
"stroke-w": [{
|
|
4514
|
-
stroke: [te, ie,
|
|
4514
|
+
stroke: [te, ie, Ie]
|
|
4515
4515
|
}],
|
|
4516
4516
|
/**
|
|
4517
4517
|
* Stroke
|
|
@@ -4634,21 +4634,21 @@ function xr({
|
|
|
4634
4634
|
side: r = "left",
|
|
4635
4635
|
getBadge: o
|
|
4636
4636
|
}) {
|
|
4637
|
-
const { t: i } = oe(), { isMobile: a } = it(), [c, l] = E(() => re.getActiveAppId()), [u,
|
|
4637
|
+
const { t: i } = oe(), { isMobile: a } = it(), [c, l] = E(() => re.getActiveAppId()), [u, p] = E(() => Z.getRunningApps());
|
|
4638
4638
|
V(() => {
|
|
4639
|
-
const
|
|
4639
|
+
const f = re.subscribe("activeAppId", (m) => {
|
|
4640
4640
|
l(m);
|
|
4641
4641
|
});
|
|
4642
4642
|
return () => {
|
|
4643
|
-
|
|
4643
|
+
f();
|
|
4644
4644
|
};
|
|
4645
4645
|
}, []), V(() => Z.subscribe(() => {
|
|
4646
|
-
|
|
4646
|
+
p(Z.getRunningApps());
|
|
4647
4647
|
}), []);
|
|
4648
|
-
const w = (
|
|
4649
|
-
c ===
|
|
4650
|
-
}, d = e.map((
|
|
4651
|
-
const N = o == null ? void 0 : o(
|
|
4648
|
+
const w = (f) => {
|
|
4649
|
+
c === f ? Z.setActiveApp(null) : Z.launchApp(f);
|
|
4650
|
+
}, d = e.map((f) => me.get(f)).filter((f) => !!f), g = u.filter((f) => !e.includes(f.appId)).map((f) => ({ running: f, def: me.get(f.appId) })).filter((f) => !!f.def), k = (f) => u.some((m) => m.appId === f), b = (f) => f.titleKey ? String(i(f.titleKey)) : f.id, v = (f) => typeof f == "number" && f > 99 ? "99+" : f, y = (f, m) => {
|
|
4651
|
+
const N = o == null ? void 0 : o(f, m);
|
|
4652
4652
|
return N ? /* @__PURE__ */ s(
|
|
4653
4653
|
"span",
|
|
4654
4654
|
{
|
|
@@ -4659,31 +4659,31 @@ function xr({
|
|
|
4659
4659
|
) : null;
|
|
4660
4660
|
}, h = a ? 24 : 28;
|
|
4661
4661
|
return /* @__PURE__ */ A("div", { className: `nc-app-taskbar ${a ? "nc-mobile" : "nc-desktop"} nc-${r} ${t}`, children: [
|
|
4662
|
-
d.map((
|
|
4663
|
-
const m =
|
|
4662
|
+
d.map((f) => {
|
|
4663
|
+
const m = f.icon, N = c === f.id, C = k(f.id), P = { isActive: N, isRunning: C, isPinned: !0 };
|
|
4664
4664
|
return /* @__PURE__ */ A(
|
|
4665
4665
|
"button",
|
|
4666
4666
|
{
|
|
4667
4667
|
className: `nc-app-taskbar-button ${N ? "nc-active" : ""} ${C ? "nc-running" : ""}`,
|
|
4668
|
-
onClick: () => w(
|
|
4669
|
-
title: b(
|
|
4668
|
+
onClick: () => w(f.id),
|
|
4669
|
+
title: b(f),
|
|
4670
4670
|
children: [
|
|
4671
4671
|
/* @__PURE__ */ s(m, { size: h }),
|
|
4672
|
-
y(
|
|
4672
|
+
y(f, P),
|
|
4673
4673
|
n && C && /* @__PURE__ */ s("span", { className: "nc-app-taskbar-indicator" })
|
|
4674
4674
|
]
|
|
4675
4675
|
},
|
|
4676
|
-
|
|
4676
|
+
f.id
|
|
4677
4677
|
);
|
|
4678
4678
|
}),
|
|
4679
4679
|
g.length > 0 && /* @__PURE__ */ s("div", { className: "nc-app-taskbar-separator" }),
|
|
4680
|
-
g.map(({ running:
|
|
4681
|
-
const N = m.icon, C = c ===
|
|
4680
|
+
g.map(({ running: f, def: m }) => {
|
|
4681
|
+
const N = m.icon, C = c === f.appId, P = { isActive: C, isRunning: !0, isPinned: !1 };
|
|
4682
4682
|
return /* @__PURE__ */ A(
|
|
4683
4683
|
"button",
|
|
4684
4684
|
{
|
|
4685
4685
|
className: `nc-app-taskbar-button ${C ? "nc-active" : ""} nc-running`,
|
|
4686
|
-
onClick: () => w(
|
|
4686
|
+
onClick: () => w(f.appId),
|
|
4687
4687
|
title: b(m),
|
|
4688
4688
|
children: [
|
|
4689
4689
|
/* @__PURE__ */ s(N, { size: h }),
|
|
@@ -4691,7 +4691,7 @@ function xr({
|
|
|
4691
4691
|
n && /* @__PURE__ */ s("span", { className: "nc-app-taskbar-indicator" })
|
|
4692
4692
|
]
|
|
4693
4693
|
},
|
|
4694
|
-
|
|
4694
|
+
f.appId
|
|
4695
4695
|
);
|
|
4696
4696
|
})
|
|
4697
4697
|
] });
|
|
@@ -4758,7 +4758,7 @@ function Sr({ rootView: e, children: t }) {
|
|
|
4758
4758
|
const C = [...N];
|
|
4759
4759
|
return C[m] = null, C;
|
|
4760
4760
|
});
|
|
4761
|
-
}, []),
|
|
4761
|
+
}, []), p = X((m) => {
|
|
4762
4762
|
i((N) => [...N, m]), c((N) => [...N, null]);
|
|
4763
4763
|
}, []), w = X(() => {
|
|
4764
4764
|
i((m) => m.length <= 1 ? m : m.slice(0, -1)), c((m) => m.slice(0, -1));
|
|
@@ -4774,20 +4774,20 @@ function Sr({ rootView: e, children: t }) {
|
|
|
4774
4774
|
m ? r.setToolbar(m) : r.clearToolbar();
|
|
4775
4775
|
}, [a, r]);
|
|
4776
4776
|
const h = {
|
|
4777
|
-
push:
|
|
4777
|
+
push: p,
|
|
4778
4778
|
pop: w,
|
|
4779
4779
|
reset: d,
|
|
4780
4780
|
depth: g,
|
|
4781
4781
|
canGoBack: k,
|
|
4782
4782
|
currentTitle: y
|
|
4783
|
-
},
|
|
4783
|
+
}, f = {
|
|
4784
4784
|
stack: o,
|
|
4785
4785
|
toolbarStack: a,
|
|
4786
4786
|
updateToolbar: l,
|
|
4787
4787
|
clearToolbarAt: u,
|
|
4788
4788
|
topIndex: b
|
|
4789
4789
|
};
|
|
4790
|
-
return /* @__PURE__ */ s(De.Provider, { value: h, children: /* @__PURE__ */ s(We.Provider, { value:
|
|
4790
|
+
return /* @__PURE__ */ s(De.Provider, { value: h, children: /* @__PURE__ */ s(We.Provider, { value: f, children: t }) });
|
|
4791
4791
|
}
|
|
4792
4792
|
function Hn({ index: e, children: t }) {
|
|
4793
4793
|
const n = ae(We);
|