@voxket-ai/voxket-live 1.0.62 → 1.0.64

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.js CHANGED
@@ -11201,7 +11201,7 @@ var Zh = m.forwardRef(function(e, t) {
11201
11201
  return m.createElement(Ko, Et({}, e, { ref: t, sideCar: cw }));
11202
11202
  });
11203
11203
  Zh.classNames = Ko.classNames;
11204
- var lw = [" ", "Enter", "ArrowUp", "ArrowDown"], dw = [" ", "Enter"], vn = "Select", [Yo, Go, uw] = Mb(vn), [sr, NE] = Da(vn, [
11204
+ var lw = [" ", "Enter", "ArrowUp", "ArrowDown"], dw = [" ", "Enter"], vn = "Select", [Yo, Go, uw] = Mb(vn), [sr, VE] = Da(vn, [
11205
11205
  uw,
11206
11206
  Th
11207
11207
  ]), qo = Th(), [fw, tn] = sr(vn), [hw, mw] = sr(vn), Kh = (e) => {
@@ -20060,7 +20060,7 @@ class F6 {
20060
20060
  });
20061
20061
  }
20062
20062
  }
20063
- function RE(e) {
20063
+ function IE(e) {
20064
20064
  return e;
20065
20065
  }
20066
20066
  function tp(e, t, n) {
@@ -20077,7 +20077,7 @@ function tp(e, t, n) {
20077
20077
  onAgentResponse: n.onMessage
20078
20078
  };
20079
20079
  }
20080
- const VE = {
20080
+ const DE = {
20081
20081
  name: "analytics",
20082
20082
  version: "1.0.0",
20083
20083
  description: "Built-in analytics tracking",
@@ -20090,7 +20090,7 @@ const VE = {
20090
20090
  console.log("Analytics: User message sent", t.content.length);
20091
20091
  });
20092
20092
  }
20093
- }, IE = {
20093
+ }, OE = {
20094
20094
  name: "debug",
20095
20095
  version: "1.0.0",
20096
20096
  description: "Debug logging and development tools",
@@ -20099,7 +20099,7 @@ const VE = {
20099
20099
  const t = e.emit;
20100
20100
  e.emit = (n, ...r) => (console.log(`[Debug] Event: ${String(n)}`, r), t(n, ...r));
20101
20101
  }
20102
- }, DE = {
20102
+ }, $E = {
20103
20103
  name: "metrics",
20104
20104
  version: "1.0.0",
20105
20105
  description: "Advanced metrics collection",
@@ -21814,7 +21814,36 @@ function rp(e) {
21814
21814
  }
21815
21815
  ) }));
21816
21816
  }
21817
- function OE({ logs: e, onClear: t, onExport: n }) {
21817
+ class K6 extends m.Component {
21818
+ constructor(t) {
21819
+ super(t), this.state = { hasError: !1 };
21820
+ }
21821
+ static getDerivedStateFromError(t) {
21822
+ return { hasError: !0, error: t };
21823
+ }
21824
+ componentDidCatch(t, n) {
21825
+ console.error("VoxketWidget Error:", t, n);
21826
+ }
21827
+ render() {
21828
+ if (this.state.hasError) {
21829
+ if (this.props.fallback) {
21830
+ const t = this.props.fallback;
21831
+ return m.createElement(t, { error: this.state.error });
21832
+ }
21833
+ return m.createElement("div", {
21834
+ style: {
21835
+ padding: "20px",
21836
+ border: "1px solid #ff4444",
21837
+ borderRadius: "8px",
21838
+ background: "#fff5f5",
21839
+ color: "#cc0000"
21840
+ }
21841
+ }, "VoxketWidget encountered an error. Please check the console for details.");
21842
+ }
21843
+ return this.props.children;
21844
+ }
21845
+ }
21846
+ function LE({ logs: e, onClear: t, onExport: n }) {
21818
21847
  const [r, o] = oe.useState(!1), [s, i] = oe.useState(""), a = e.filter(
21819
21848
  (c) => !s || c.event.toLowerCase().includes(s.toLowerCase())
21820
21849
  );
@@ -21886,7 +21915,7 @@ function OE({ logs: e, onClear: t, onExport: n }) {
21886
21915
  }
21887
21916
  );
21888
21917
  }
21889
- function $E({ metrics: e }) {
21918
+ function _E({ metrics: e }) {
21890
21919
  return e ? /* @__PURE__ */ T("div", { className: "bg-gray-100 p-4 rounded-lg", children: [
21891
21920
  /* @__PURE__ */ h("h3", { className: "font-semibold mb-2", children: "Current Session" }),
21892
21921
  /* @__PURE__ */ T("div", { className: "grid grid-cols-2 gap-4 text-sm", children: [
@@ -21941,7 +21970,7 @@ function cr() {
21941
21970
  stop: i
21942
21971
  };
21943
21972
  }
21944
- function K6() {
21973
+ function Y6() {
21945
21974
  const { sessionMetrics: e, currentSession: t } = zt();
21946
21975
  return {
21947
21976
  metrics: e,
@@ -21953,7 +21982,7 @@ function K6() {
21953
21982
  networkStats: e == null ? void 0 : e.networkStats
21954
21983
  };
21955
21984
  }
21956
- function Y6() {
21985
+ function G6() {
21957
21986
  const { setMicrophoneEnabled: e, client: t } = zt(), [n, r] = se(!1), [o, s] = se(!1), i = ve(async () => {
21958
21987
  if (!o) {
21959
21988
  s(!0);
@@ -21997,7 +22026,7 @@ function Y6() {
21997
22026
  disable: c
21998
22027
  };
21999
22028
  }
22000
- function G6() {
22029
+ function q6() {
22001
22030
  const { setCameraEnabled: e } = zt(), [t, n] = se(!1), [r, o] = se(!1), s = ve(async () => {
22002
22031
  if (!r) {
22003
22032
  o(!0);
@@ -22041,7 +22070,7 @@ function G6() {
22041
22070
  disable: a
22042
22071
  };
22043
22072
  }
22044
- function q6() {
22073
+ function X6() {
22045
22074
  const { startScreenShare: e, stopScreenShare: t } = zt(), [n, r] = se(!1), [o, s] = se(!1), i = ve(async () => {
22046
22075
  if (!(n || o)) {
22047
22076
  s(!0);
@@ -22075,7 +22104,7 @@ function q6() {
22075
22104
  toggle: c
22076
22105
  };
22077
22106
  }
22078
- function LE() {
22107
+ function FE() {
22079
22108
  const { client: e } = zt(), [t, n] = se({
22080
22109
  tracks: [],
22081
22110
  layout: { type: "grid", showLocalVideo: !0, aspectRatio: "16:9" },
@@ -22197,7 +22226,7 @@ function oc() {
22197
22226
  send: s
22198
22227
  };
22199
22228
  }
22200
- function _E() {
22229
+ function BE() {
22201
22230
  const { send: e, isSending: t, canSend: n } = oc(), [r, o] = se(""), s = ve(async () => {
22202
22231
  if (!(!r.trim() || !n))
22203
22232
  try {
@@ -22254,7 +22283,7 @@ function op() {
22254
22283
  disconnect: i
22255
22284
  };
22256
22285
  }
22257
- function X6() {
22286
+ function J6() {
22258
22287
  const { participants: e } = zt();
22259
22288
  return {
22260
22289
  participants: e,
@@ -22264,16 +22293,16 @@ function X6() {
22264
22293
  };
22265
22294
  }
22266
22295
  const sp = Rt({}), us = () => _e(sp);
22267
- function J6({ children: e, ...t }) {
22296
+ function Q6({ children: e, ...t }) {
22268
22297
  return /* @__PURE__ */ h(sp.Provider, { value: t, children: e });
22269
22298
  }
22270
22299
  function ni({ name: e, children: t, fallback: n, className: r }) {
22271
22300
  return /* @__PURE__ */ h("div", { className: `voxket-slot voxket-slot--${e} ${r || ""}`, children: t || n });
22272
22301
  }
22273
- function Q6(e, t = {}) {
22302
+ function eE(e, t = {}) {
22274
22303
  return Object.assign(e, t);
22275
22304
  }
22276
- function eE({
22305
+ function tE({
22277
22306
  showMicrophoneControl: e = !0,
22278
22307
  showCameraControl: t = !0,
22279
22308
  showScreenShareControl: n = !0,
@@ -22281,7 +22310,7 @@ function eE({
22281
22310
  customControls: o,
22282
22311
  className: s = ""
22283
22312
  }) {
22284
- const i = cr(), a = Y6(), c = G6(), l = q6(), d = us(), f = [
22313
+ const i = cr(), a = G6(), c = q6(), l = X6(), d = us(), f = [
22285
22314
  "voxket-session-controls",
22286
22315
  `voxket-session-controls--${d.variant || "default"}`,
22287
22316
  `voxket-session-controls--${d.size || "md"}`,
@@ -22296,7 +22325,7 @@ function eE({
22296
22325
  className: "voxket-button voxket-button--danger",
22297
22326
  children: "End Session"
22298
22327
  }
22299
- ) : /* @__PURE__ */ h(tE, {}) }),
22328
+ ) : /* @__PURE__ */ h(nE, {}) }),
22300
22329
  i.isActive && /* @__PURE__ */ T("div", { className: "voxket-media-controls", children: [
22301
22330
  e && /* @__PURE__ */ T(
22302
22331
  "button",
@@ -22341,7 +22370,7 @@ function eE({
22341
22370
  o && /* @__PURE__ */ h("div", { className: "voxket-custom-controls", children: o })
22342
22371
  ] });
22343
22372
  }
22344
- function tE() {
22373
+ function nE() {
22345
22374
  cr();
22346
22375
  const [e, t] = oe.useState(!1);
22347
22376
  return /* @__PURE__ */ h(
@@ -22437,7 +22466,7 @@ function ap({
22437
22466
  )),
22438
22467
  s.messages.length === 0 && /* @__PURE__ */ h("div", { className: "voxket-empty-messages", children: /* @__PURE__ */ h("p", { children: "No messages yet. Start the conversation!" }) })
22439
22468
  ] }),
22440
- /* @__PURE__ */ h(nE, {})
22469
+ /* @__PURE__ */ h(rE, {})
22441
22470
  ] }),
22442
22471
  t && /* @__PURE__ */ h("div", { className: "voxket-transcriptions", children: /* @__PURE__ */ h("div", { className: "voxket-transcription-placeholder", children: /* @__PURE__ */ h("p", { children: "Voice transcriptions will appear here" }) }) })
22443
22472
  ] }) }) : /* @__PURE__ */ h("div", { className: a, children: /* @__PURE__ */ h("div", { className: "voxket-inactive-state", children: /* @__PURE__ */ T("div", { className: "voxket-inactive-message", children: [
@@ -22445,7 +22474,7 @@ function ap({
22445
22474
  /* @__PURE__ */ h("p", { children: "Begin a session to start chatting with the AI agent" })
22446
22475
  ] }) }) });
22447
22476
  }
22448
- function nE() {
22477
+ function rE() {
22449
22478
  const e = oc(), [t, n] = oe.useState(""), r = async () => {
22450
22479
  if (!(!t.trim() || !e.canSend))
22451
22480
  try {
@@ -22487,7 +22516,7 @@ function cp({
22487
22516
  customFooter: r,
22488
22517
  className: o = ""
22489
22518
  }) {
22490
- const s = cr(), i = K6(), a = X6(), c = us(), l = [
22519
+ const s = cr(), i = Y6(), a = J6(), c = us(), l = [
22491
22520
  "voxket-session-footer",
22492
22521
  `voxket-session-footer--${c.variant || "default"}`,
22493
22522
  `voxket-session-footer--${c.size || "md"}`,
@@ -22501,7 +22530,7 @@ function cp({
22501
22530
  e && i.metrics && /* @__PURE__ */ T("div", { className: "voxket-session-metrics", children: [
22502
22531
  /* @__PURE__ */ T("div", { className: "voxket-metric", children: [
22503
22532
  /* @__PURE__ */ h("span", { className: "voxket-metric-label", children: "Duration:" }),
22504
- /* @__PURE__ */ h("span", { className: "voxket-metric-value", children: rE(i.duration || 0) })
22533
+ /* @__PURE__ */ h("span", { className: "voxket-metric-value", children: oE(i.duration || 0) })
22505
22534
  ] }),
22506
22535
  /* @__PURE__ */ T("div", { className: "voxket-metric", children: [
22507
22536
  /* @__PURE__ */ h("span", { className: "voxket-metric-label", children: "Messages:" }),
@@ -22518,11 +22547,11 @@ function cp({
22518
22547
  ] })
22519
22548
  ] }) }) : /* @__PURE__ */ h("div", { className: l, children: /* @__PURE__ */ h("div", { className: "voxket-footer-inactive", children: /* @__PURE__ */ h("span", { className: "voxket-status-text", children: "Ready to start session" }) }) });
22520
22549
  }
22521
- function rE(e) {
22550
+ function oE(e) {
22522
22551
  const t = Math.floor(e / 1e3), n = Math.floor(t / 60), r = Math.floor(n / 60);
22523
22552
  return r > 0 ? `${r}:${(n % 60).toString().padStart(2, "0")}:${(t % 60).toString().padStart(2, "0")}` : `${n}:${(t % 60).toString().padStart(2, "0")}`;
22524
22553
  }
22525
- function oE({
22554
+ function sE({
22526
22555
  agentId: e,
22527
22556
  sessionConfig: t,
22528
22557
  autoStart: n = !1,
@@ -22551,17 +22580,17 @@ function oE({
22551
22580
  d.isActive ? "voxket-session--active" : "voxket-session--inactive",
22552
22581
  c
22553
22582
  ].filter(Boolean).join(" ");
22554
- return /* @__PURE__ */ h(J6, { variant: s, size: i, theme: a, className: c, children: /* @__PURE__ */ h("div", { className: p, children: l || /* @__PURE__ */ T(dt, { children: [
22583
+ return /* @__PURE__ */ h(Q6, { variant: s, size: i, theme: a, className: c, children: /* @__PURE__ */ h("div", { className: p, children: l || /* @__PURE__ */ T(dt, { children: [
22555
22584
  /* @__PURE__ */ h(ni, { name: "header", fallback: /* @__PURE__ */ h(ip, {}) }),
22556
22585
  /* @__PURE__ */ h(ni, { name: "content", fallback: /* @__PURE__ */ h(ap, {}) }),
22557
22586
  /* @__PURE__ */ h(ni, { name: "footer", fallback: /* @__PURE__ */ h(cp, {}) })
22558
22587
  ] }) }) });
22559
22588
  }
22560
- const FE = Q6(oE, {
22589
+ const jE = eE(sE, {
22561
22590
  Header: ip,
22562
22591
  Content: ap,
22563
22592
  Footer: cp,
22564
- Controls: eE
22593
+ Controls: tE
22565
22594
  }), Wn = {
22566
22595
  name: "default",
22567
22596
  colors: {
@@ -22680,13 +22709,13 @@ const FE = Q6(oE, {
22680
22709
  lg: "0.375rem",
22681
22710
  full: "9999px"
22682
22711
  }
22683
- }, lp = Rt(null), sE = () => {
22712
+ }, lp = Rt(null), iE = () => {
22684
22713
  const e = _e(lp);
22685
22714
  if (!e)
22686
22715
  throw new Error("useTheme must be used within a ThemeProvider");
22687
22716
  return e;
22688
22717
  };
22689
- function BE({
22718
+ function HE({
22690
22719
  theme: e = "default",
22691
22720
  themes: t = {},
22692
22721
  children: n,
@@ -22716,7 +22745,7 @@ function BE({
22716
22745
  Ie(() => {
22717
22746
  if (r && typeof document < "u") {
22718
22747
  const p = document.documentElement;
22719
- Object.entries(iE(s)).forEach(([g, y]) => {
22748
+ Object.entries(aE(s)).forEach(([g, y]) => {
22720
22749
  p.style.setProperty(`--voxket-${g}`, y);
22721
22750
  });
22722
22751
  }
@@ -22729,7 +22758,7 @@ function BE({
22729
22758
  };
22730
22759
  return /* @__PURE__ */ h(lp.Provider, { value: f, children: /* @__PURE__ */ h("div", { className: `voxket-theme voxket-theme--${s.name} ${o}`, children: n }) });
22731
22760
  }
22732
- function iE(e) {
22761
+ function aE(e) {
22733
22762
  const t = {}, n = (r, o = "") => {
22734
22763
  for (const [s, i] of Object.entries(r)) {
22735
22764
  const a = o ? `${o}-${s}` : s;
@@ -22738,7 +22767,7 @@ function iE(e) {
22738
22767
  };
22739
22768
  return n(e), t;
22740
22769
  }
22741
- function jE(e = Wn, t) {
22770
+ function zE(e = Wn, t) {
22742
22771
  return {
22743
22772
  ...e,
22744
22773
  ...t,
@@ -22749,72 +22778,72 @@ function jE(e = Wn, t) {
22749
22778
  shadows: { ...e.shadows, ...t.shadows }
22750
22779
  };
22751
22780
  }
22752
- function HE(e) {
22781
+ function UE(e) {
22753
22782
  var n;
22754
- const { theme: t } = sE();
22783
+ const { theme: t } = iE();
22755
22784
  return ((n = t.components) == null ? void 0 : n[e]) || {};
22756
22785
  }
22757
- const zE = tp(
22786
+ const WE = tp(
22758
22787
  "voice-modality",
22759
22788
  "voice",
22760
22789
  {
22761
22790
  onActivate: async (e) => {
22762
22791
  const t = e.config;
22763
- t.enableTranscription && aE(e), t.enableVoiceActivation && cE(e, t), console.log("Voice modality activated", t);
22792
+ t.enableTranscription && cE(e), t.enableVoiceActivation && lE(e, t), console.log("Voice modality activated", t);
22764
22793
  },
22765
22794
  onDeactivate: async (e) => {
22766
22795
  console.log("Voice modality deactivated");
22767
22796
  },
22768
22797
  onMessage: async (e, t) => {
22769
- t.type === "audio" && lE(e, t);
22798
+ t.type === "audio" && dE(e, t);
22770
22799
  }
22771
22800
  }
22772
22801
  );
22773
- function aE(e, t) {
22802
+ function cE(e, t) {
22774
22803
  e.on("participant.speaking.started", (n) => {
22775
22804
  console.log("Transcription: Started for", n.name);
22776
22805
  }), e.on("participant.speaking.stopped", (n) => {
22777
22806
  console.log("Transcription: Stopped for", n.name);
22778
22807
  });
22779
22808
  }
22780
- function cE(e, t) {
22809
+ function lE(e, t) {
22781
22810
  const n = t.silenceThreshold || -50;
22782
22811
  console.log("Voice activation setup with threshold:", n);
22783
22812
  }
22784
- function lE(e, t) {
22813
+ function dE(e, t) {
22785
22814
  console.log("Playing audio response:", t.content);
22786
22815
  }
22787
- const UE = tp(
22816
+ const ZE = tp(
22788
22817
  "chat-modality",
22789
22818
  "chat",
22790
22819
  {
22791
22820
  onActivate: async (e) => {
22792
22821
  const t = e.config;
22793
- t.enableRichText && dE(), t.enableFileUpload && uE(e), t.enableCustomComponents && fE(), console.log("Chat modality activated", t);
22822
+ t.enableRichText && uE(), t.enableFileUpload && fE(e), t.enableCustomComponents && hE(), console.log("Chat modality activated", t);
22794
22823
  },
22795
22824
  onDeactivate: async (e) => {
22796
22825
  console.log("Chat modality deactivated");
22797
22826
  },
22798
22827
  onMessage: async (e, t) => {
22799
22828
  const n = e.config;
22800
- t.type === "ui_component" ? hE(e, t) : t.type === "text" && n.enableRichText && mE(e, t);
22829
+ t.type === "ui_component" ? mE(e, t) : t.type === "text" && n.enableRichText && pE(e, t);
22801
22830
  }
22802
22831
  }
22803
22832
  );
22804
- function dE(e) {
22833
+ function uE(e) {
22805
22834
  console.log("Rich text support enabled");
22806
22835
  }
22807
- function uE(e) {
22836
+ function fE(e) {
22808
22837
  console.log("File upload enabled"), e.on("chat.file.uploaded", (t) => {
22809
22838
  console.log("File uploaded:", t.name);
22810
22839
  });
22811
22840
  }
22812
- function fE(e) {
22841
+ function hE(e) {
22813
22842
  console.log("Custom components enabled");
22814
22843
  const t = /* @__PURE__ */ new Map();
22815
- t.set("quick-actions", pE), t.set("form", gE), t.set("card", yE), t.set("chart", vE);
22844
+ t.set("quick-actions", gE), t.set("form", yE), t.set("card", vE), t.set("chart", bE);
22816
22845
  }
22817
- function hE(e, t) {
22846
+ function mE(e, t) {
22818
22847
  const { componentType: n, props: r } = t.metadata;
22819
22848
  console.log("Rendering custom component:", n, r), e.emit("chat.component.render", {
22820
22849
  type: n,
@@ -22822,17 +22851,17 @@ function hE(e, t) {
22822
22851
  timestamp: /* @__PURE__ */ new Date()
22823
22852
  });
22824
22853
  }
22825
- function mE(e, t) {
22854
+ function pE(e, t) {
22826
22855
  console.log("Processing rich text message:", t.content);
22827
22856
  }
22828
- function pE(e) {
22857
+ function gE(e) {
22829
22858
  return {
22830
22859
  type: "quick-actions",
22831
22860
  actions: e.actions || [],
22832
22861
  layout: e.layout || "horizontal"
22833
22862
  };
22834
22863
  }
22835
- function gE(e) {
22864
+ function yE(e) {
22836
22865
  return {
22837
22866
  type: "form",
22838
22867
  fields: e.fields || [],
@@ -22840,7 +22869,7 @@ function gE(e) {
22840
22869
  validation: e.validation
22841
22870
  };
22842
22871
  }
22843
- function yE(e) {
22872
+ function vE(e) {
22844
22873
  return {
22845
22874
  type: "card",
22846
22875
  title: e.title,
@@ -22849,7 +22878,7 @@ function yE(e) {
22849
22878
  variant: e.variant || "default"
22850
22879
  };
22851
22880
  }
22852
- function vE(e) {
22881
+ function bE(e) {
22853
22882
  return {
22854
22883
  type: "chart",
22855
22884
  chartType: e.chartType || "line",
@@ -22940,7 +22969,7 @@ function ri({
22940
22969
  }
22941
22970
  );
22942
22971
  }
22943
- function WE({
22972
+ function KE({
22944
22973
  tracks: e,
22945
22974
  layout: t,
22946
22975
  className: n = "",
@@ -23012,7 +23041,7 @@ function WE({
23012
23041
  className: `voxket-layout-btn ${t.type === x ? "voxket-layout-btn--active" : ""}`,
23013
23042
  onClick: () => v(x),
23014
23043
  title: `Switch to ${x} layout`,
23015
- children: bE(x)
23044
+ children: xE(x)
23016
23045
  },
23017
23046
  x
23018
23047
  )) }),
@@ -23087,7 +23116,7 @@ function WE({
23087
23116
  ] })
23088
23117
  ] });
23089
23118
  }
23090
- function bE(e) {
23119
+ function xE(e) {
23091
23120
  switch (e) {
23092
23121
  case "grid":
23093
23122
  return "⊞";
@@ -23103,7 +23132,7 @@ function bE(e) {
23103
23132
  return "⊞";
23104
23133
  }
23105
23134
  }
23106
- function ZE({
23135
+ function YE({
23107
23136
  localTrack: e,
23108
23137
  onToggleCamera: t,
23109
23138
  onToggleScreenShare: n,
@@ -23229,7 +23258,7 @@ function ZE({
23229
23258
  ] })
23230
23259
  ] });
23231
23260
  }
23232
- const xE = ({ handler: e, loadData: t, data: n, client: r, addLocalMessage: o }) => {
23261
+ const wE = ({ handler: e, loadData: t, data: n, client: r, addLocalMessage: o }) => {
23233
23262
  const [s, i] = m.useState(null), [a, c] = m.useState(!0), [l, d] = m.useState(!1), [f] = m.useState(Date.now());
23234
23263
  m.useEffect(() => {
23235
23264
  (async () => {
@@ -23339,7 +23368,7 @@ const xE = ({ handler: e, loadData: t, data: n, client: r, addLocalMessage: o })
23339
23368
  /* @__PURE__ */ h("p", { className: "text-xs text-gray-600 mb-3", children: "Failed to load assignment details." })
23340
23369
  ] }) });
23341
23370
  };
23342
- function KE() {
23371
+ function GE() {
23343
23372
  const [e, t] = m.useState(null), [n, r] = m.useState([]);
23344
23373
  return m.useEffect(() => {
23345
23374
  const a = new rc({
@@ -23371,7 +23400,7 @@ function KE() {
23371
23400
  try {
23372
23401
  await e.registerFrontendRPC(
23373
23402
  "give_assignment",
23374
- xE,
23403
+ wE,
23375
23404
  "embedded"
23376
23405
  // or 'modal' or 'fullscreen'
23377
23406
  );
@@ -23581,7 +23610,7 @@ console.log('User response:', response);` })
23581
23610
  ] })
23582
23611
  ] });
23583
23612
  }
23584
- const YE = {
23613
+ const qE = {
23585
23614
  // 1. Agent checks what RPC methods are available
23586
23615
  async checkAvailableRpcs(e) {
23587
23616
  const t = e.getRegisteredRpcMethods();
@@ -23650,58 +23679,86 @@ const YE = {
23650
23679
  }
23651
23680
  };
23652
23681
  }
23653
- }, GE = (e) => typeof window > "u" ? null : m.createElement(rp, e);
23682
+ };
23683
+ function SE() {
23684
+ var t, n;
23685
+ const e = [];
23686
+ try {
23687
+ const r = (window == null ? void 0 : window.React) || (global == null ? void 0 : global.React);
23688
+ if (!r)
23689
+ return e.push("React not found in global scope"), { isCompatible: !1, warnings: e };
23690
+ const o = r.version;
23691
+ return parseInt((o == null ? void 0 : o.split(".")[0]) || "0") < 18 ? (e.push(`React version ${o} is not supported. Please use React 18 or higher.`), { isCompatible: !1, version: o, warnings: e }) : (((n = (t = window.__REACT_DEVTOOLS_GLOBAL_HOOK__) == null ? void 0 : t.renderers) == null ? void 0 : n.size) > 1 && e.push("Multiple React instances detected. This may cause issues."), { isCompatible: !0, version: o, warnings: e });
23692
+ } catch (r) {
23693
+ return e.push(`Error checking React: ${r}`), { isCompatible: !1, warnings: e };
23694
+ }
23695
+ }
23696
+ function XE(e, t) {
23697
+ return function(r) {
23698
+ const o = require("react");
23699
+ return o.useEffect(() => {
23700
+ const s = SE();
23701
+ !s.isCompatible && t ? t(new Error("React compatibility check failed"), s.warnings) : s.warnings.length > 0 && console.warn("VoxketWidget warnings:", s.warnings);
23702
+ }, []), o.createElement(e, r);
23703
+ };
23704
+ }
23705
+ const JE = (e) => typeof window > "u" ? null : m.createElement(K6, {
23706
+ children: m.createElement(rp, e)
23707
+ });
23654
23708
  export {
23655
- xE as AssignmentView,
23656
- J6 as CompoundProvider,
23709
+ wE as AssignmentView,
23710
+ Q6 as CompoundProvider,
23657
23711
  Rr as InteractiveComponent,
23658
23712
  F6 as PluginManager,
23659
- KE as RpcExamples,
23660
- FE as SessionContainer,
23713
+ GE as RpcExamples,
23714
+ jE as SessionContainer,
23661
23715
  ap as SessionContent,
23662
- eE as SessionControls,
23716
+ tE as SessionControls,
23663
23717
  cp as SessionFooter,
23664
23718
  ip as SessionHeader,
23665
- OE as SessionLogViewer,
23666
- $E as SessionMetricsComponent,
23719
+ LE as SessionLogViewer,
23720
+ _E as SessionMetricsComponent,
23667
23721
  ni as Slot,
23668
- BE as ThemeProvider,
23669
- ZE as VideoControls,
23670
- WE as VideoGrid,
23722
+ HE as ThemeProvider,
23723
+ YE as VideoControls,
23724
+ KE as VideoGrid,
23671
23725
  ri as VideoTile,
23672
23726
  rc as VoxketClient,
23727
+ K6 as VoxketErrorBoundary,
23673
23728
  ep as VoxketEventEmitter,
23674
23729
  B6 as VoxketProvider,
23675
23730
  rc as VoxketSDK,
23676
- FE as VoxketSessionComponent,
23677
- YE as agentRpcExample,
23678
- VE as analyticsPlugin,
23679
- UE as chatModalityPlugin,
23680
- jE as createCustomTheme,
23731
+ jE as VoxketSessionComponent,
23732
+ qE as agentRpcExample,
23733
+ DE as analyticsPlugin,
23734
+ ZE as chatModalityPlugin,
23735
+ SE as checkReactVersion,
23736
+ zE as createCustomTheme,
23681
23737
  tp as createModalityPlugin,
23682
- RE as createPlugin,
23738
+ IE as createPlugin,
23739
+ XE as createVoxketWithCheck,
23683
23740
  Yd as darkTheme,
23684
- IE as debugPlugin,
23685
- GE as default,
23741
+ OE as debugPlugin,
23742
+ JE as default,
23686
23743
  Wn as defaultTheme,
23687
23744
  Gd as enterpriseTheme,
23688
- iE as flattenTheme,
23689
- DE as metricsPlugin,
23690
- HE as useComponentTheme,
23745
+ aE as flattenTheme,
23746
+ $E as metricsPlugin,
23747
+ UE as useComponentTheme,
23691
23748
  us as useCompoundContext,
23692
23749
  $6 as useSessionLogging,
23693
- sE as useTheme,
23750
+ iE as useTheme,
23694
23751
  zt as useVoxket,
23695
- G6 as useVoxketCamera,
23752
+ q6 as useVoxketCamera,
23696
23753
  oc as useVoxketChat,
23697
- _E as useVoxketChatInput,
23754
+ BE as useVoxketChatInput,
23698
23755
  op as useVoxketConnection,
23699
- K6 as useVoxketMetrics,
23700
- Y6 as useVoxketMicrophone,
23701
- X6 as useVoxketParticipants,
23702
- q6 as useVoxketScreenShare,
23756
+ Y6 as useVoxketMetrics,
23757
+ G6 as useVoxketMicrophone,
23758
+ J6 as useVoxketParticipants,
23759
+ X6 as useVoxketScreenShare,
23703
23760
  cr as useVoxketSession,
23704
- LE as useVoxketVideo,
23705
- zE as voiceModalityPlugin,
23706
- Q6 as withCompoundComponent
23761
+ FE as useVoxketVideo,
23762
+ WE as voiceModalityPlugin,
23763
+ eE as withCompoundComponent
23707
23764
  };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Utility functions to help prevent React conflicts
3
+ */
4
+ export declare function checkReactVersion(): {
5
+ isCompatible: boolean;
6
+ version?: string;
7
+ warnings: string[];
8
+ };
9
+ export declare function createVoxketWithCheck<T>(component: React.ComponentType<T>, onError?: (error: Error, warnings: string[]) => void): React.ComponentType<T>;
@@ -1,4 +1,4 @@
1
- import { TranscriptionSegment } from 'livekit-client';
1
+ import { TranscriptionSegment } from '../../node_modules/livekit-client';
2
2
  export interface CombinedTranscription extends TranscriptionSegment {
3
3
  role: 'assistant' | 'user';
4
4
  receivedAtMediaTimestamp: number;
@@ -1,6 +1,6 @@
1
1
  import { ClassValue } from 'clsx';
2
- import { Room } from 'livekit-client';
3
- import { ReceivedChatMessage, TextStreamData } from '@livekit/components-react';
2
+ import { Room } from '../../node_modules/livekit-client';
3
+ import { ReceivedChatMessage, TextStreamData } from '../../node_modules/@livekit/components-react';
4
4
  export declare const THEME_STORAGE_KEY = "theme-mode";
5
5
  export declare const THEME_MEDIA_QUERY = "(prefers-color-scheme: dark)";
6
6
  export declare function cn(...inputs: ClassValue[]): string;
@@ -1,4 +1,4 @@
1
- import { Room, RemoteParticipant, LocalParticipant, ConnectionState } from 'livekit-client';
1
+ import { Room, RemoteParticipant, LocalParticipant, ConnectionState } from '../../node_modules/livekit-client';
2
2
  import { VideoTrack } from './video';
3
3
  export interface VoxketConfig {
4
4
  /** Your Voxket App ID */