@nice2dev/ui-ai 1.0.22 → 1.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +21 -21
- package/dist/index.mjs +66 -66
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as a, jsxs as s, Fragment as ce } from "react/jsx-runtime";
|
|
2
|
-
import { useRef as G, useCallback as E, useMemo as
|
|
2
|
+
import { useRef as G, useCallback as E, useMemo as Z, useContext as Me, createContext as te, useState as L, useEffect as re, forwardRef as We, memo as dr } from "react";
|
|
3
3
|
class pr {
|
|
4
4
|
constructor(e = {}, r) {
|
|
5
5
|
this.timestamps = [], this.tokenCount = 0, this.warningEmitted = !1, this.config = {
|
|
@@ -47,7 +47,7 @@ class pr {
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
const Ve = te(null);
|
|
50
|
-
function
|
|
50
|
+
function Za({
|
|
51
51
|
config: i,
|
|
52
52
|
rateLimits: e,
|
|
53
53
|
enabled: r = !0,
|
|
@@ -56,7 +56,7 @@ function Qa({
|
|
|
56
56
|
}) {
|
|
57
57
|
const c = G(null);
|
|
58
58
|
c.current || (c.current = new pr(e, t));
|
|
59
|
-
const l = E(() => c.current.getStatus(), []), o =
|
|
59
|
+
const l = E(() => c.current.getStatus(), []), o = Z(
|
|
60
60
|
() => ({
|
|
61
61
|
config: i,
|
|
62
62
|
enabled: r,
|
|
@@ -591,7 +591,7 @@ function Xe(i, e, r) {
|
|
|
591
591
|
customPrompt: "Suggest the most likely selection. Explain why this option is recommended."
|
|
592
592
|
};
|
|
593
593
|
}
|
|
594
|
-
function
|
|
594
|
+
function Ze(i, e, r) {
|
|
595
595
|
const t = e instanceof Date ? e.toISOString().split("T")[0] : e;
|
|
596
596
|
return {
|
|
597
597
|
fieldLabel: i,
|
|
@@ -605,7 +605,7 @@ function Qe(i, e, r) {
|
|
|
605
605
|
customPrompt: 'Suggest a date. For example: "next business day", "end of month", "in 2 weeks". Explain your suggestion briefly.'
|
|
606
606
|
};
|
|
607
607
|
}
|
|
608
|
-
function
|
|
608
|
+
function Qe(i, e, r) {
|
|
609
609
|
return {
|
|
610
610
|
fieldLabel: i,
|
|
611
611
|
fieldType: "color",
|
|
@@ -614,7 +614,7 @@ function Ze(i, e, r) {
|
|
|
614
614
|
customPrompt: r != null && r.industry ? `Industry: ${r.industry}. Suggest a color palette (3-5 hex colors) suitable for this context.` : "Suggest a color or palette of colors that works well for this context. Provide hex values."
|
|
615
615
|
};
|
|
616
616
|
}
|
|
617
|
-
function
|
|
617
|
+
function Qa(i, e) {
|
|
618
618
|
return {
|
|
619
619
|
fieldLabel: i,
|
|
620
620
|
fieldType: "data-grid",
|
|
@@ -660,49 +660,49 @@ function vr(i, e, r, t, n) {
|
|
|
660
660
|
};
|
|
661
661
|
}
|
|
662
662
|
function ri(i, e, r) {
|
|
663
|
-
const t =
|
|
663
|
+
const t = Z(
|
|
664
664
|
() => Ke(i, e, r),
|
|
665
665
|
[i, e, r == null ? void 0 : r.placeholder, r == null ? void 0 : r.maxLength, r == null ? void 0 : r.pattern]
|
|
666
666
|
);
|
|
667
667
|
return ae(t, r);
|
|
668
668
|
}
|
|
669
669
|
function ai(i, e, r) {
|
|
670
|
-
const t =
|
|
670
|
+
const t = Z(
|
|
671
671
|
() => Ye(i, e, r),
|
|
672
672
|
[i, e, r == null ? void 0 : r.min, r == null ? void 0 : r.max, r == null ? void 0 : r.step, r == null ? void 0 : r.unit]
|
|
673
673
|
);
|
|
674
674
|
return ae(t, r);
|
|
675
675
|
}
|
|
676
676
|
function ii(i, e, r) {
|
|
677
|
-
const t =
|
|
677
|
+
const t = Z(
|
|
678
678
|
() => Xe(i, e, r),
|
|
679
679
|
[i, e, r == null ? void 0 : r.multiple]
|
|
680
680
|
);
|
|
681
681
|
return ae(t, r);
|
|
682
682
|
}
|
|
683
683
|
function ti(i, e, r) {
|
|
684
|
-
const t =
|
|
685
|
-
() =>
|
|
684
|
+
const t = Z(
|
|
685
|
+
() => Ze(i, e, r),
|
|
686
686
|
[i, e, r == null ? void 0 : r.min, r == null ? void 0 : r.max, r == null ? void 0 : r.disableWeekends]
|
|
687
687
|
);
|
|
688
688
|
return ae(t, r);
|
|
689
689
|
}
|
|
690
690
|
function ni(i, e, r) {
|
|
691
|
-
const t =
|
|
692
|
-
() =>
|
|
691
|
+
const t = Z(
|
|
692
|
+
() => Qe(i, e, r),
|
|
693
693
|
[i, e, r == null ? void 0 : r.industry]
|
|
694
694
|
);
|
|
695
695
|
return ae(t, r);
|
|
696
696
|
}
|
|
697
697
|
function si(i, e, r, t, n) {
|
|
698
|
-
const c =
|
|
698
|
+
const c = Z(
|
|
699
699
|
() => t ? vr(i, e, r, t, n) : { fieldLabel: i, fieldType: e },
|
|
700
700
|
[i, e, r, t]
|
|
701
701
|
);
|
|
702
702
|
return ae(c, { ...n, disabled: !t || (n == null ? void 0 : n.disabled) });
|
|
703
703
|
}
|
|
704
704
|
function ci(i, e, r) {
|
|
705
|
-
const t =
|
|
705
|
+
const t = Z(
|
|
706
706
|
() => i ? br(i, e) : { fieldLabel: "Form" },
|
|
707
707
|
[i, e]
|
|
708
708
|
);
|
|
@@ -823,7 +823,7 @@ Return the ${(e == null ? void 0 : e.limit) ?? 5} most semantically relevant ico
|
|
|
823
823
|
};
|
|
824
824
|
}
|
|
825
825
|
function oi(i, e, r) {
|
|
826
|
-
const t =
|
|
826
|
+
const t = Z(
|
|
827
827
|
() => xr(i, e, r),
|
|
828
828
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
829
829
|
[i, e, r == null ? void 0 : r.cursorLine, r == null ? void 0 : r.cursorCol, r == null ? void 0 : r.framework]
|
|
@@ -831,7 +831,7 @@ function oi(i, e, r) {
|
|
|
831
831
|
return ae(t, r);
|
|
832
832
|
}
|
|
833
833
|
function li(i, e, r) {
|
|
834
|
-
const t =
|
|
834
|
+
const t = Z(
|
|
835
835
|
() => _r(i, e, r),
|
|
836
836
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
837
837
|
[i, e, r == null ? void 0 : r.mode, r == null ? void 0 : r.locale]
|
|
@@ -839,7 +839,7 @@ function li(i, e, r) {
|
|
|
839
839
|
return ae(t, r);
|
|
840
840
|
}
|
|
841
841
|
function di(i, e) {
|
|
842
|
-
const r =
|
|
842
|
+
const r = Z(
|
|
843
843
|
() => wr(i, e),
|
|
844
844
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
845
845
|
[i, e == null ? void 0 : e.bpm, e == null ? void 0 : e.key, e == null ? void 0 : e.duration, e == null ? void 0 : e.mode]
|
|
@@ -847,7 +847,7 @@ function di(i, e) {
|
|
|
847
847
|
return ae(r, e);
|
|
848
848
|
}
|
|
849
849
|
function pi(i, e) {
|
|
850
|
-
const r =
|
|
850
|
+
const r = Z(
|
|
851
851
|
() => kr(i, e),
|
|
852
852
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
853
853
|
[i, e == null ? void 0 : e.meshCount, e == null ? void 0 : e.triangleCount, e == null ? void 0 : e.targetDevice, e == null ? void 0 : e.mode]
|
|
@@ -855,7 +855,7 @@ function pi(i, e) {
|
|
|
855
855
|
return ae(r, e);
|
|
856
856
|
}
|
|
857
857
|
function ui(i, e) {
|
|
858
|
-
const r =
|
|
858
|
+
const r = Z(
|
|
859
859
|
() => Nr(i, e),
|
|
860
860
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
861
861
|
[i, e == null ? void 0 : e.width, e == null ? void 0 : e.height, e == null ? void 0 : e.mode, e == null ? void 0 : e.targetStyle]
|
|
@@ -863,7 +863,7 @@ function ui(i, e) {
|
|
|
863
863
|
return ae(r, e);
|
|
864
864
|
}
|
|
865
865
|
function mi(i, e) {
|
|
866
|
-
const r =
|
|
866
|
+
const r = Z(
|
|
867
867
|
() => Cr(i, e),
|
|
868
868
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
869
869
|
[i, e == null ? void 0 : e.limit, e == null ? void 0 : e.style]
|
|
@@ -892,7 +892,7 @@ function Sr(i, e) {
|
|
|
892
892
|
};
|
|
893
893
|
}
|
|
894
894
|
function fi(i, e) {
|
|
895
|
-
const r =
|
|
895
|
+
const r = Z(
|
|
896
896
|
() => Sr(i, e),
|
|
897
897
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
898
898
|
[
|
|
@@ -939,7 +939,7 @@ function Tr(i, e, r) {
|
|
|
939
939
|
};
|
|
940
940
|
}
|
|
941
941
|
function hi(i, e, r) {
|
|
942
|
-
const t =
|
|
942
|
+
const t = Z(
|
|
943
943
|
() => Tr(i, e, r),
|
|
944
944
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
945
945
|
[JSON.stringify(i), JSON.stringify(e), r == null ? void 0 : r.mode, r == null ? void 0 : r.diagramType]
|
|
@@ -969,7 +969,7 @@ function Rr(i, e) {
|
|
|
969
969
|
};
|
|
970
970
|
}
|
|
971
971
|
function gi(i, e) {
|
|
972
|
-
const r =
|
|
972
|
+
const r = Z(
|
|
973
973
|
() => Rr(i, e),
|
|
974
974
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
975
975
|
[i, e == null ? void 0 : e.mode, e == null ? void 0 : e.presentationType, e == null ? void 0 : e.duration, e == null ? void 0 : e.audience]
|
|
@@ -999,7 +999,7 @@ function Ar(i, e) {
|
|
|
999
999
|
};
|
|
1000
1000
|
}
|
|
1001
1001
|
function yi(i, e) {
|
|
1002
|
-
const r =
|
|
1002
|
+
const r = Z(
|
|
1003
1003
|
() => Ar(i, e),
|
|
1004
1004
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1005
1005
|
[JSON.stringify(i), e == null ? void 0 : e.mode, JSON.stringify(e == null ? void 0 : e.brandColors)]
|
|
@@ -1016,7 +1016,7 @@ function bi(i, e, r) {
|
|
|
1016
1016
|
aiShowOnHover: y = !1,
|
|
1017
1017
|
aiTriggerIcon: w,
|
|
1018
1018
|
...S
|
|
1019
|
-
} = n, T =
|
|
1019
|
+
} = n, T = Z(() => {
|
|
1020
1020
|
const P = e(S);
|
|
1021
1021
|
return f && (P.customPrompt = f), P;
|
|
1022
1022
|
}, [S, f]);
|
|
@@ -1056,13 +1056,13 @@ function _i(i) {
|
|
|
1056
1056
|
});
|
|
1057
1057
|
}
|
|
1058
1058
|
function wi(i) {
|
|
1059
|
-
return
|
|
1059
|
+
return Ze(i.label ?? "Date", i.value, {
|
|
1060
1060
|
min: i.min,
|
|
1061
1061
|
max: i.max
|
|
1062
1062
|
});
|
|
1063
1063
|
}
|
|
1064
1064
|
function ki(i) {
|
|
1065
|
-
return
|
|
1065
|
+
return Qe(i.label ?? "Color", i.value);
|
|
1066
1066
|
}
|
|
1067
1067
|
const Mr = (i, e) => e, $r = te(Mr);
|
|
1068
1068
|
function Pr() {
|
|
@@ -1454,7 +1454,7 @@ function H(i, e, r, t, n) {
|
|
|
1454
1454
|
transitions: nr
|
|
1455
1455
|
};
|
|
1456
1456
|
}
|
|
1457
|
-
function
|
|
1457
|
+
function Q(i, e, r, t, n) {
|
|
1458
1458
|
return {
|
|
1459
1459
|
name: i,
|
|
1460
1460
|
darkMode: "dark",
|
|
@@ -1785,7 +1785,7 @@ H(
|
|
|
1785
1785
|
{ primary: "#431407", secondary: "#9a3412", muted: "#fb923c" },
|
|
1786
1786
|
"#fdba74"
|
|
1787
1787
|
);
|
|
1788
|
-
|
|
1788
|
+
Q(
|
|
1789
1789
|
"Midnight",
|
|
1790
1790
|
{
|
|
1791
1791
|
primary: "#818cf8",
|
|
@@ -1799,7 +1799,7 @@ Z(
|
|
|
1799
1799
|
{ primary: "#f1f5f9", secondary: "#94a3b8", muted: "#475569" },
|
|
1800
1800
|
"#1e293b"
|
|
1801
1801
|
);
|
|
1802
|
-
|
|
1802
|
+
Q(
|
|
1803
1803
|
"Obsidian",
|
|
1804
1804
|
{
|
|
1805
1805
|
primary: "#a78bfa",
|
|
@@ -1813,7 +1813,7 @@ Z(
|
|
|
1813
1813
|
{ primary: "#fafafa", secondary: "#a1a1aa", muted: "#52525b" },
|
|
1814
1814
|
"#3f3f46"
|
|
1815
1815
|
);
|
|
1816
|
-
|
|
1816
|
+
Q(
|
|
1817
1817
|
"Eclipse",
|
|
1818
1818
|
{
|
|
1819
1819
|
primary: "#c084fc",
|
|
@@ -1827,7 +1827,7 @@ Z(
|
|
|
1827
1827
|
{ primary: "#f5f3ff", secondary: "#a78bfa", muted: "#6d5eac" },
|
|
1828
1828
|
"#3b3266"
|
|
1829
1829
|
);
|
|
1830
|
-
|
|
1830
|
+
Q(
|
|
1831
1831
|
"Onyx",
|
|
1832
1832
|
{
|
|
1833
1833
|
primary: "#60a5fa",
|
|
@@ -1841,7 +1841,7 @@ Z(
|
|
|
1841
1841
|
{ primary: "#ffffff", secondary: "#a3a3a3", muted: "#525252" },
|
|
1842
1842
|
"#262626"
|
|
1843
1843
|
);
|
|
1844
|
-
|
|
1844
|
+
Q(
|
|
1845
1845
|
"Carbon",
|
|
1846
1846
|
{
|
|
1847
1847
|
primary: "#38bdf8",
|
|
@@ -1855,7 +1855,7 @@ Z(
|
|
|
1855
1855
|
{ primary: "#f4f4f4", secondary: "#c6c6c6", muted: "#6f6f6f" },
|
|
1856
1856
|
"#525252"
|
|
1857
1857
|
);
|
|
1858
|
-
|
|
1858
|
+
Q(
|
|
1859
1859
|
"Cosmos",
|
|
1860
1860
|
{
|
|
1861
1861
|
primary: "#6366f1",
|
|
@@ -1869,7 +1869,7 @@ Z(
|
|
|
1869
1869
|
{ primary: "#e5e7eb", secondary: "#9ca3af", muted: "#4b5563" },
|
|
1870
1870
|
"#374151"
|
|
1871
1871
|
);
|
|
1872
|
-
|
|
1872
|
+
Q(
|
|
1873
1873
|
"Nebula",
|
|
1874
1874
|
{
|
|
1875
1875
|
primary: "#e879f9",
|
|
@@ -1883,7 +1883,7 @@ Z(
|
|
|
1883
1883
|
{ primary: "#fae8ff", secondary: "#d8b4fe", muted: "#7c3aed" },
|
|
1884
1884
|
"#581c87"
|
|
1885
1885
|
);
|
|
1886
|
-
|
|
1886
|
+
Q(
|
|
1887
1887
|
"Abyss",
|
|
1888
1888
|
{
|
|
1889
1889
|
primary: "#22d3ee",
|
|
@@ -1897,7 +1897,7 @@ Z(
|
|
|
1897
1897
|
{ primary: "#e0f2fe", secondary: "#7dd3fc", muted: "#0369a1" },
|
|
1898
1898
|
"#075985"
|
|
1899
1899
|
);
|
|
1900
|
-
|
|
1900
|
+
Q(
|
|
1901
1901
|
"Shadow",
|
|
1902
1902
|
{
|
|
1903
1903
|
primary: "#a3a3a3",
|
|
@@ -1911,7 +1911,7 @@ Z(
|
|
|
1911
1911
|
{ primary: "#e5e5e5", secondary: "#a3a3a3", muted: "#525252" },
|
|
1912
1912
|
"#404040"
|
|
1913
1913
|
);
|
|
1914
|
-
|
|
1914
|
+
Q(
|
|
1915
1915
|
"Emerald Dark",
|
|
1916
1916
|
{
|
|
1917
1917
|
primary: "#34d399",
|
|
@@ -2303,7 +2303,7 @@ H(
|
|
|
2303
2303
|
{ primary: "#2e3440", secondary: "#3b4252", muted: "#4c566a" },
|
|
2304
2304
|
"#d8dee9"
|
|
2305
2305
|
);
|
|
2306
|
-
|
|
2306
|
+
Q(
|
|
2307
2307
|
"Dracula",
|
|
2308
2308
|
{
|
|
2309
2309
|
primary: "#bd93f9",
|
|
@@ -2331,7 +2331,7 @@ H(
|
|
|
2331
2331
|
{ primary: "#073642", secondary: "#586e75", muted: "#93a1a1" },
|
|
2332
2332
|
"#eee8d5"
|
|
2333
2333
|
);
|
|
2334
|
-
|
|
2334
|
+
Q(
|
|
2335
2335
|
"Solarized Dark",
|
|
2336
2336
|
{
|
|
2337
2337
|
primary: "#268bd2",
|
|
@@ -2345,7 +2345,7 @@ Z(
|
|
|
2345
2345
|
{ primary: "#eee8d5", secondary: "#93a1a1", muted: "#586e75" },
|
|
2346
2346
|
"#073642"
|
|
2347
2347
|
);
|
|
2348
|
-
|
|
2348
|
+
Q(
|
|
2349
2349
|
"Monokai",
|
|
2350
2350
|
{
|
|
2351
2351
|
primary: "#66d9ef",
|
|
@@ -2359,7 +2359,7 @@ Z(
|
|
|
2359
2359
|
{ primary: "#f8f8f2", secondary: "#cfcfc2", muted: "#75715e" },
|
|
2360
2360
|
"#3e3d32"
|
|
2361
2361
|
);
|
|
2362
|
-
|
|
2362
|
+
Q(
|
|
2363
2363
|
"One Dark",
|
|
2364
2364
|
{
|
|
2365
2365
|
primary: "#61afef",
|
|
@@ -2373,7 +2373,7 @@ Z(
|
|
|
2373
2373
|
{ primary: "#abb2bf", secondary: "#828997", muted: "#545862" },
|
|
2374
2374
|
"#3e4452"
|
|
2375
2375
|
);
|
|
2376
|
-
|
|
2376
|
+
Q(
|
|
2377
2377
|
"Synthwave",
|
|
2378
2378
|
{
|
|
2379
2379
|
primary: "#ff7edb",
|
|
@@ -2401,7 +2401,7 @@ H(
|
|
|
2401
2401
|
{ primary: "#4a1a4e", secondary: "#7b3f7d", muted: "#c080c0" },
|
|
2402
2402
|
"#d8a8e8"
|
|
2403
2403
|
);
|
|
2404
|
-
|
|
2404
|
+
Q(
|
|
2405
2405
|
"Terminal Green",
|
|
2406
2406
|
{
|
|
2407
2407
|
primary: "#00ff41",
|
|
@@ -2443,7 +2443,7 @@ H(
|
|
|
2443
2443
|
{ primary: "#3e2723", secondary: "#5d4037", muted: "#a1887f" },
|
|
2444
2444
|
"#bcaaa4"
|
|
2445
2445
|
);
|
|
2446
|
-
|
|
2446
|
+
Q(
|
|
2447
2447
|
"Cyberpunk",
|
|
2448
2448
|
{
|
|
2449
2449
|
primary: "#00f0ff",
|
|
@@ -2457,7 +2457,7 @@ Z(
|
|
|
2457
2457
|
{ primary: "#e0fbfc", secondary: "#80d4dd", muted: "#3a6b72" },
|
|
2458
2458
|
"#1c3a44"
|
|
2459
2459
|
);
|
|
2460
|
-
|
|
2460
|
+
Q(
|
|
2461
2461
|
"Neon",
|
|
2462
2462
|
{
|
|
2463
2463
|
primary: "#ff00ff",
|
|
@@ -2471,7 +2471,7 @@ Z(
|
|
|
2471
2471
|
{ primary: "#ffffff", secondary: "#cccccc", muted: "#666666" },
|
|
2472
2472
|
"#333333"
|
|
2473
2473
|
);
|
|
2474
|
-
|
|
2474
|
+
Q(
|
|
2475
2475
|
"Retrowave",
|
|
2476
2476
|
{
|
|
2477
2477
|
primary: "#f77fbe",
|
|
@@ -2499,7 +2499,7 @@ H(
|
|
|
2499
2499
|
{ primary: "#3b0a0a", secondary: "#7f1d1d", muted: "#dc6868" },
|
|
2500
2500
|
"#e8a0a0"
|
|
2501
2501
|
);
|
|
2502
|
-
|
|
2502
|
+
Q(
|
|
2503
2503
|
"Halloween",
|
|
2504
2504
|
{
|
|
2505
2505
|
primary: "#ff6600",
|
|
@@ -2709,7 +2709,7 @@ H(
|
|
|
2709
2709
|
{ primary: "#2b1a0e", secondary: "#5c3d1e", muted: "#a08060" },
|
|
2710
2710
|
"#d4b896"
|
|
2711
2711
|
);
|
|
2712
|
-
|
|
2712
|
+
Q(
|
|
2713
2713
|
"High Contrast Dark",
|
|
2714
2714
|
{
|
|
2715
2715
|
primary: "#ffff00",
|
|
@@ -2765,7 +2765,7 @@ H(
|
|
|
2765
2765
|
{ primary: "#0a0a0a", secondary: "#404040", muted: "#a3a3a3" },
|
|
2766
2766
|
"#e5e5e5"
|
|
2767
2767
|
);
|
|
2768
|
-
|
|
2768
|
+
Q(
|
|
2769
2769
|
"Warm Dark",
|
|
2770
2770
|
{
|
|
2771
2771
|
primary: "#f59e0b",
|
|
@@ -2779,7 +2779,7 @@ Z(
|
|
|
2779
2779
|
{ primary: "#fafaf9", secondary: "#d6d3d1", muted: "#78716c" },
|
|
2780
2780
|
"#57534e"
|
|
2781
2781
|
);
|
|
2782
|
-
|
|
2782
|
+
Q(
|
|
2783
2783
|
"Soft Dark",
|
|
2784
2784
|
{
|
|
2785
2785
|
primary: "#a78bfa",
|
|
@@ -4766,7 +4766,7 @@ class Xr extends pe {
|
|
|
4766
4766
|
return r / 1e6 * l.input + t / 1e6 * l.output;
|
|
4767
4767
|
}
|
|
4768
4768
|
}
|
|
4769
|
-
class
|
|
4769
|
+
class Zr extends pe {
|
|
4770
4770
|
constructor(e) {
|
|
4771
4771
|
super(e), this.type = "anthropic", this.name = "Anthropic Claude", this.baseUrl = e.baseUrl || "https://api.anthropic.com/v1";
|
|
4772
4772
|
}
|
|
@@ -4901,7 +4901,7 @@ class Qr extends pe {
|
|
|
4901
4901
|
return r / 1e6 * l.input + t / 1e6 * l.output;
|
|
4902
4902
|
}
|
|
4903
4903
|
}
|
|
4904
|
-
class
|
|
4904
|
+
class Qr extends pe {
|
|
4905
4905
|
constructor(e) {
|
|
4906
4906
|
if (super(e), this.type = "azure-openai", this.name = "Azure OpenAI", !e.baseUrl || !e.deployment)
|
|
4907
4907
|
throw new Error("Azure OpenAI requires baseUrl and deployment");
|
|
@@ -5181,9 +5181,9 @@ function me(i) {
|
|
|
5181
5181
|
case "openai":
|
|
5182
5182
|
return new Xr(i);
|
|
5183
5183
|
case "anthropic":
|
|
5184
|
-
return new Qr(i);
|
|
5185
|
-
case "azure-openai":
|
|
5186
5184
|
return new Zr(i);
|
|
5185
|
+
case "azure-openai":
|
|
5186
|
+
return new Qr(i);
|
|
5187
5187
|
case "ollama":
|
|
5188
5188
|
return new ea(i);
|
|
5189
5189
|
case "groq":
|
|
@@ -6342,7 +6342,7 @@ function $i(i, e) {
|
|
|
6342
6342
|
}), sa(i, r);
|
|
6343
6343
|
}
|
|
6344
6344
|
function ca(i) {
|
|
6345
|
-
const { columns: e, config: r, onFilterGenerated: t, onSortGenerated: n, onError: c } = i, l = ne(), [o, f] = L(!1), [h, y] = L(null), [w, S] = L(null), [T, P] = L([]), N = G(null), z = r || (l == null ? void 0 : l.config), g =
|
|
6345
|
+
const { columns: e, config: r, onFilterGenerated: t, onSortGenerated: n, onError: c } = i, l = ne(), [o, f] = L(!1), [h, y] = L(null), [w, S] = L(null), [T, P] = L([]), N = G(null), z = r || (l == null ? void 0 : l.config), g = Z(() => e.map((m) => ({
|
|
6346
6346
|
id: m.id,
|
|
6347
6347
|
label: m.label,
|
|
6348
6348
|
type: m.type,
|
|
@@ -6464,7 +6464,7 @@ function Pi({
|
|
|
6464
6464
|
config: e,
|
|
6465
6465
|
onFilterGenerated: r,
|
|
6466
6466
|
onSortGenerated: t
|
|
6467
|
-
}), k =
|
|
6467
|
+
}), k = Z(() => {
|
|
6468
6468
|
if (!l || i.length === 0)
|
|
6469
6469
|
return [];
|
|
6470
6470
|
const u = [], _ = i.filter((p) => p.type === "string");
|
|
@@ -7438,7 +7438,7 @@ function ua({ config: i }) {
|
|
|
7438
7438
|
] });
|
|
7439
7439
|
}
|
|
7440
7440
|
function ma(i = {}) {
|
|
7441
|
-
const { config: e, dataFields: r, context: t, onChartGenerated: n, onError: c } = i, l = ne(), [o, f] = L(!1), [h, y] = L(null), [w, S] = L(null), [T, P] = L([]), N = G(null), z = e || (l == null ? void 0 : l.config), g =
|
|
7441
|
+
const { config: e, dataFields: r, context: t, onChartGenerated: n, onError: c } = i, l = ne(), [o, f] = L(!1), [h, y] = L(null), [w, S] = L(null), [T, P] = L([]), N = G(null), z = e || (l == null ? void 0 : l.config), g = Z(() => {
|
|
7442
7442
|
if (r)
|
|
7443
7443
|
return r.map((x) => {
|
|
7444
7444
|
var v;
|
|
@@ -13195,7 +13195,7 @@ Focus on semantic meaning and common UI patterns.`
|
|
|
13195
13195
|
svgPath: m.svgPath
|
|
13196
13196
|
})),
|
|
13197
13197
|
[r, t]
|
|
13198
|
-
), g =
|
|
13198
|
+
), g = Z(() => {
|
|
13199
13199
|
const C = /* @__PURE__ */ new Set();
|
|
13200
13200
|
return xe.forEach((m) => C.add(m.category)), Array.from(C);
|
|
13201
13201
|
}, []), d = E(() => {
|
|
@@ -13579,8 +13579,8 @@ function qe({ icon: i, size: e = 32 }) {
|
|
|
13579
13579
|
}
|
|
13580
13580
|
export {
|
|
13581
13581
|
Ee as ACCESSIBILITY_CHECKER_TEMPLATE,
|
|
13582
|
-
|
|
13583
|
-
|
|
13582
|
+
Zr as AnthropicProvider,
|
|
13583
|
+
Qr as AzureOpenAIProvider,
|
|
13584
13584
|
Ne as CHART_CONFIG_TEMPLATE,
|
|
13585
13585
|
Ce as CODE_COMPLETION_TEMPLATE,
|
|
13586
13586
|
ia as CostTracker,
|
|
@@ -13591,7 +13591,7 @@ export {
|
|
|
13591
13591
|
cr as InMemoryCostStorage,
|
|
13592
13592
|
aa as LocalStorageCostStorage,
|
|
13593
13593
|
Ge as NiceAIHintBubble,
|
|
13594
|
-
|
|
13594
|
+
Za as NiceAIProvider,
|
|
13595
13595
|
Ei as NiceAccessibilityAI,
|
|
13596
13596
|
Li as NiceChartAI,
|
|
13597
13597
|
Ii as NiceCodeEditorAI,
|
|
@@ -13619,9 +13619,9 @@ export {
|
|
|
13619
13619
|
wr as buildAudioContext,
|
|
13620
13620
|
ei as buildChartContext,
|
|
13621
13621
|
xr as buildCodeEditorContext,
|
|
13622
|
-
|
|
13623
|
-
|
|
13624
|
-
|
|
13622
|
+
Qe as buildColorPickerContext,
|
|
13623
|
+
Qa as buildDataGridContext,
|
|
13624
|
+
Ze as buildDatePickerContext,
|
|
13625
13625
|
Tr as buildDiagramLayoutContext,
|
|
13626
13626
|
br as buildFormFillContext,
|
|
13627
13627
|
Sr as buildGameEngineContext,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nice2dev/ui-ai",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.24",
|
|
4
4
|
"description": "Nice2Dev AI Hints — LLM-powered contextual suggestions for UI controls (OpenAI, Azure OpenAI, Ollama, custom endpoints)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -33,12 +33,12 @@
|
|
|
33
33
|
"prepublishOnly": "npm run build"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@nice2dev/ui-core": "^1.0.
|
|
36
|
+
"@nice2dev/ui-core": "^1.0.24",
|
|
37
37
|
"react": ">=17.0.0",
|
|
38
38
|
"react-dom": ">=17.0.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@nice2dev/ui-core": "^1.0.
|
|
41
|
+
"@nice2dev/ui-core": "^1.0.24",
|
|
42
42
|
"@testing-library/jest-dom": "^6.9.1",
|
|
43
43
|
"@testing-library/react": "^14.0.0",
|
|
44
44
|
"@types/react": "^18.2.0",
|