@nlxai/touchpoint-ui 1.2.2-alpha.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/VoiceMini.d.ts +1 -0
- package/lib/index.js +79 -47
- package/lib/index.umd.js +4 -4
- package/package.json +2 -2
|
@@ -4,6 +4,7 @@ import { CustomModalityComponent } from '../interface';
|
|
|
4
4
|
export declare const VoiceMini: FC<{
|
|
5
5
|
modalityComponents: Record<string, CustomModalityComponent<unknown>>;
|
|
6
6
|
handler: ConversationHandler;
|
|
7
|
+
brandIcon?: string;
|
|
7
8
|
renderCollapse: boolean;
|
|
8
9
|
onClose: (event: Event) => void;
|
|
9
10
|
context?: Context;
|
package/lib/index.js
CHANGED
|
@@ -5997,7 +5997,7 @@ var Bw = /* @__PURE__ */ Ip(/* @__PURE__ */ ky([], Uw, function(n, e) {
|
|
|
5997
5997
|
l = e[o], a = n(l), t.add(a) && r.push(l), o += 1;
|
|
5998
5998
|
return r;
|
|
5999
5999
|
})), Vw = /* @__PURE__ */ Bw(Dw);
|
|
6000
|
-
const zw = "1.2.2
|
|
6000
|
+
const zw = "1.2.2", Ww = {
|
|
6001
6001
|
version: zw
|
|
6002
6002
|
};
|
|
6003
6003
|
var _n = typeof globalThis < "u" && globalThis || typeof self < "u" && self || // eslint-disable-next-line no-undef
|
|
@@ -7793,7 +7793,14 @@ const Ky = (n) => {
|
|
|
7793
7793
|
"@3xl/main:absolute @3xl/main:left-0 @3xl/main:right-0 @3xl/main:top-0": n === "full" || n === "embedded"
|
|
7794
7794
|
}),
|
|
7795
7795
|
children: [
|
|
7796
|
-
u != null ? /* @__PURE__ */ R.jsx(
|
|
7796
|
+
u != null ? /* @__PURE__ */ R.jsx(
|
|
7797
|
+
"img",
|
|
7798
|
+
{
|
|
7799
|
+
className: "w-10 h-10 block flex-none",
|
|
7800
|
+
src: u,
|
|
7801
|
+
role: "presentation"
|
|
7802
|
+
}
|
|
7803
|
+
) : null,
|
|
7797
7804
|
/* @__PURE__ */ R.jsx(
|
|
7798
7805
|
xn,
|
|
7799
7806
|
{
|
|
@@ -27795,48 +27802,68 @@ const ny = 8, zE = ({
|
|
|
27795
27802
|
),
|
|
27796
27803
|
children: n
|
|
27797
27804
|
}
|
|
27798
|
-
), GE = ({
|
|
27799
|
-
|
|
27805
|
+
), GE = ({
|
|
27806
|
+
handler: n,
|
|
27807
|
+
context: e,
|
|
27808
|
+
onClose: t,
|
|
27809
|
+
modalityComponents: r,
|
|
27810
|
+
renderCollapse: o,
|
|
27811
|
+
brandIcon: a
|
|
27812
|
+
}) => {
|
|
27813
|
+
const [l, u] = be.useState(!0), [f, p] = be.useState(!0), g = () => {
|
|
27800
27814
|
t(new Event("close"));
|
|
27801
27815
|
}, {
|
|
27802
|
-
roomState:
|
|
27803
|
-
isUserSpeaking:
|
|
27804
|
-
isApplicationSpeaking:
|
|
27805
|
-
retry:
|
|
27806
|
-
modalities:
|
|
27816
|
+
roomState: C,
|
|
27817
|
+
isUserSpeaking: _,
|
|
27818
|
+
isApplicationSpeaking: T,
|
|
27819
|
+
retry: N,
|
|
27820
|
+
modalities: A
|
|
27807
27821
|
} = U1({
|
|
27808
|
-
micEnabled:
|
|
27809
|
-
speakersEnabled:
|
|
27822
|
+
micEnabled: l,
|
|
27823
|
+
speakersEnabled: f,
|
|
27810
27824
|
handler: n,
|
|
27811
27825
|
context: e
|
|
27812
27826
|
});
|
|
27813
|
-
|
|
27814
|
-
/* @__PURE__ */ R.
|
|
27815
|
-
|
|
27816
|
-
|
|
27817
|
-
|
|
27818
|
-
|
|
27819
|
-
|
|
27820
|
-
|
|
27821
|
-
|
|
27822
|
-
|
|
27827
|
+
if (C === "error")
|
|
27828
|
+
return /* @__PURE__ */ R.jsxs(ry, { renderCollapse: o, onClose: g, children: [
|
|
27829
|
+
/* @__PURE__ */ R.jsx(hc, { message: "I couldn’t connect" }),
|
|
27830
|
+
/* @__PURE__ */ R.jsx(
|
|
27831
|
+
As,
|
|
27832
|
+
{
|
|
27833
|
+
type: "ghost",
|
|
27834
|
+
label: "Retry",
|
|
27835
|
+
Icon: sc,
|
|
27836
|
+
onClick: () => {
|
|
27837
|
+
N();
|
|
27838
|
+
}
|
|
27823
27839
|
}
|
|
27824
|
-
|
|
27825
|
-
)
|
|
27826
|
-
|
|
27827
|
-
/* @__PURE__ */ R.
|
|
27828
|
-
|
|
27829
|
-
|
|
27830
|
-
|
|
27831
|
-
|
|
27832
|
-
|
|
27833
|
-
|
|
27834
|
-
|
|
27835
|
-
|
|
27840
|
+
)
|
|
27841
|
+
] });
|
|
27842
|
+
if (C === "noAudioPermissions")
|
|
27843
|
+
return /* @__PURE__ */ R.jsxs(ry, { renderCollapse: o, onClose: g, children: [
|
|
27844
|
+
/* @__PURE__ */ R.jsx(hc, { message: "Connect your microphone and speaker" }),
|
|
27845
|
+
/* @__PURE__ */ R.jsx(
|
|
27846
|
+
As,
|
|
27847
|
+
{
|
|
27848
|
+
type: "ghost",
|
|
27849
|
+
label: "Retry",
|
|
27850
|
+
Icon: sc,
|
|
27851
|
+
onClick: () => {
|
|
27852
|
+
N();
|
|
27853
|
+
}
|
|
27836
27854
|
}
|
|
27837
|
-
|
|
27838
|
-
)
|
|
27839
|
-
|
|
27855
|
+
)
|
|
27856
|
+
] });
|
|
27857
|
+
const H = a != null ? /* @__PURE__ */ R.jsx(
|
|
27858
|
+
"img",
|
|
27859
|
+
{
|
|
27860
|
+
className: "w-10 h-10 block flex-none",
|
|
27861
|
+
src: a,
|
|
27862
|
+
role: "presentation"
|
|
27863
|
+
}
|
|
27864
|
+
) : null;
|
|
27865
|
+
return C === "pending" ? /* @__PURE__ */ R.jsxs(iy, { className: "relative", children: [
|
|
27866
|
+
H,
|
|
27840
27867
|
/* @__PURE__ */ R.jsx(
|
|
27841
27868
|
xn,
|
|
27842
27869
|
{
|
|
@@ -27866,30 +27893,31 @@ const ny = 8, zE = ({
|
|
|
27866
27893
|
),
|
|
27867
27894
|
/* @__PURE__ */ R.jsx("span", { className: "w-6 h-6 block text-accent absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2", children: /* @__PURE__ */ R.jsx(jp, {}) })
|
|
27868
27895
|
] }) : /* @__PURE__ */ R.jsxs(iy, { children: [
|
|
27896
|
+
H,
|
|
27869
27897
|
/* @__PURE__ */ R.jsxs("div", { className: "w-fit relative", children: [
|
|
27870
|
-
|
|
27898
|
+
_ ? /* @__PURE__ */ R.jsx(ac, { className: "rounded-inner" }) : null,
|
|
27871
27899
|
/* @__PURE__ */ R.jsx(
|
|
27872
27900
|
xn,
|
|
27873
27901
|
{
|
|
27874
|
-
Icon:
|
|
27902
|
+
Icon: l ? sd : Dp,
|
|
27875
27903
|
label: "Microphone",
|
|
27876
|
-
type:
|
|
27904
|
+
type: l ? "activated" : "ghost",
|
|
27877
27905
|
onClick: () => {
|
|
27878
|
-
|
|
27906
|
+
u((z) => !z);
|
|
27879
27907
|
}
|
|
27880
27908
|
}
|
|
27881
27909
|
)
|
|
27882
27910
|
] }),
|
|
27883
27911
|
/* @__PURE__ */ R.jsxs("div", { className: "w-fit relative", children: [
|
|
27884
|
-
|
|
27912
|
+
T ? /* @__PURE__ */ R.jsx(ac, { className: "rounded-inner" }) : null,
|
|
27885
27913
|
/* @__PURE__ */ R.jsx(
|
|
27886
27914
|
xn,
|
|
27887
27915
|
{
|
|
27888
|
-
Icon:
|
|
27916
|
+
Icon: f ? ad : Np,
|
|
27889
27917
|
label: "Speakers",
|
|
27890
|
-
type:
|
|
27918
|
+
type: f ? "activated" : "ghost",
|
|
27891
27919
|
onClick: () => {
|
|
27892
|
-
|
|
27920
|
+
p((z) => !z);
|
|
27893
27921
|
}
|
|
27894
27922
|
}
|
|
27895
27923
|
)
|
|
@@ -27901,7 +27929,7 @@ const ny = 8, zE = ({
|
|
|
27901
27929
|
Icon: oc,
|
|
27902
27930
|
type: "error",
|
|
27903
27931
|
onClick: () => {
|
|
27904
|
-
|
|
27932
|
+
g();
|
|
27905
27933
|
}
|
|
27906
27934
|
}
|
|
27907
27935
|
),
|
|
@@ -27912,7 +27940,7 @@ const ny = 8, zE = ({
|
|
|
27912
27940
|
X1,
|
|
27913
27941
|
"absolute right-0 -top-2 transform translate-x-0 -translate-y-full max-h-[360px] overflow-auto"
|
|
27914
27942
|
),
|
|
27915
|
-
modalities:
|
|
27943
|
+
modalities: A,
|
|
27916
27944
|
modalityComponents: r,
|
|
27917
27945
|
handler: n
|
|
27918
27946
|
}
|
|
@@ -34490,6 +34518,7 @@ const YP = ({ restored: n }) => {
|
|
|
34490
34518
|
{
|
|
34491
34519
|
handler: o,
|
|
34492
34520
|
context: n.initialContext,
|
|
34521
|
+
brandIcon: n.brandIcon,
|
|
34493
34522
|
onClose: () => {
|
|
34494
34523
|
ee(new Event("close"));
|
|
34495
34524
|
},
|
|
@@ -34600,7 +34629,10 @@ const YP = ({ restored: n }) => {
|
|
|
34600
34629
|
setEnabled: We
|
|
34601
34630
|
} : void 0,
|
|
34602
34631
|
colorMode: f,
|
|
34603
|
-
brandIcon:
|
|
34632
|
+
brandIcon: (
|
|
34633
|
+
/* In fullscreen voice mode, a separate header brand icon is not necessary because a brand icon+ripple are rendered in the middle */
|
|
34634
|
+
A === "text" ? n.brandIcon : void 0
|
|
34635
|
+
),
|
|
34604
34636
|
isSettingsOpen: _,
|
|
34605
34637
|
enabled: n.enabled,
|
|
34606
34638
|
toggleSettings: n.enableSettings ? () => {
|