@skippr/live-agent-sdk 0.6.0 → 0.7.0

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.
@@ -210,7 +210,7 @@ import { Bot, X } from "lucide-react";
210
210
 
211
211
  // src/components/ui/button.tsx
212
212
  import { forwardRef } from "react";
213
- import { jsxDEV } from "react/jsx-dev-runtime";
213
+ import { jsx } from "react/jsx-runtime";
214
214
  var variantClasses = {
215
215
  default: "skippr:bg-primary skippr:text-primary-foreground skippr:hover:bg-primary/90",
216
216
  destructive: "skippr:bg-destructive skippr:text-white skippr:hover:bg-destructive/90",
@@ -229,44 +229,44 @@ var sizeClasses = {
229
229
  "icon-lg": "skippr:size-10"
230
230
  };
231
231
  var Button = forwardRef(({ className, variant = "default", size = "default", ...props }, ref) => {
232
- return /* @__PURE__ */ jsxDEV("button", {
232
+ return /* @__PURE__ */ jsx("button", {
233
233
  className: cn("skippr:inline-flex skippr:items-center skippr:justify-center skippr:gap-2 skippr:whitespace-nowrap skippr:rounded-md skippr:text-sm skippr:font-medium skippr:ring-offset-background skippr:transition-all skippr:focus-visible:outline-none skippr:focus-visible:ring-2 skippr:focus-visible:ring-ring skippr:focus-visible:ring-offset-2 skippr:disabled:pointer-events-none skippr:disabled:opacity-50 skippr:shrink-0 skippr:[&_svg]:pointer-events-none skippr:[&_svg:not([class*='size-'])]:size-4 skippr:[&_svg]:shrink-0", variantClasses[variant], sizeClasses[size], className),
234
234
  ref,
235
235
  ...props
236
- }, undefined, false, undefined, this);
236
+ });
237
237
  });
238
238
  Button.displayName = "Button";
239
239
 
240
240
  // src/components/ChatHeader.tsx
241
- import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
241
+ import { jsx as jsx2, jsxs } from "react/jsx-runtime";
242
242
  function ChatHeader({ onClose }) {
243
- return /* @__PURE__ */ jsxDEV2("div", {
243
+ return /* @__PURE__ */ jsxs("div", {
244
244
  className: "skippr:flex skippr:items-center skippr:gap-3 skippr:bg-primary skippr:px-4 skippr:py-3 skippr:text-primary-foreground",
245
245
  children: [
246
- /* @__PURE__ */ jsxDEV2("div", {
246
+ /* @__PURE__ */ jsx2("div", {
247
247
  className: "skippr:flex skippr:size-6 skippr:items-center skippr:justify-center skippr:rounded-full skippr:bg-primary-foreground/20",
248
- children: /* @__PURE__ */ jsxDEV2(Bot, {
248
+ children: /* @__PURE__ */ jsx2(Bot, {
249
249
  className: "skippr:size-3.5 skippr:text-primary-foreground"
250
- }, undefined, false, undefined, this)
251
- }, undefined, false, undefined, this),
252
- /* @__PURE__ */ jsxDEV2("div", {
250
+ })
251
+ }),
252
+ /* @__PURE__ */ jsx2("div", {
253
253
  className: "skippr:flex-1",
254
- children: /* @__PURE__ */ jsxDEV2("p", {
254
+ children: /* @__PURE__ */ jsx2("p", {
255
255
  className: "skippr:text-sm skippr:font-semibold skippr:leading-none",
256
256
  children: "AI Agent"
257
- }, undefined, false, undefined, this)
258
- }, undefined, false, undefined, this),
259
- /* @__PURE__ */ jsxDEV2(Button, {
257
+ })
258
+ }),
259
+ /* @__PURE__ */ jsx2(Button, {
260
260
  variant: "ghost",
261
261
  size: "icon-xs",
262
262
  onClick: onClose,
263
263
  className: "skippr:text-primary-foreground skippr:hover:bg-primary-foreground/20 skippr:hover:text-primary-foreground",
264
- children: /* @__PURE__ */ jsxDEV2(X, {
264
+ children: /* @__PURE__ */ jsx2(X, {
265
265
  className: "skippr:size-4"
266
- }, undefined, false, undefined, this)
267
- }, undefined, false, undefined, this)
266
+ })
267
+ })
268
268
  ]
269
- }, undefined, true, undefined, this);
269
+ });
270
270
  }
271
271
 
272
272
  // src/components/MeetingControls.tsx
@@ -283,7 +283,7 @@ function formatTime(seconds) {
283
283
  }
284
284
 
285
285
  // src/components/MeetingControls.tsx
286
- import { jsxDEV as jsxDEV3 } from "react/jsx-dev-runtime";
286
+ import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
287
287
  function MeetingControls({ onHangUp }) {
288
288
  const { localParticipant } = useLocalParticipant2();
289
289
  const isMuted = !localParticipant.isMicrophoneEnabled;
@@ -314,197 +314,197 @@ function MeetingControls({ onHangUp }) {
314
314
  useEffect2(() => {
315
315
  toggleMute().then(() => toggleScreenShare());
316
316
  }, []);
317
- return /* @__PURE__ */ jsxDEV3("div", {
317
+ return /* @__PURE__ */ jsxs2("div", {
318
318
  className: "skippr:flex skippr:items-center skippr:justify-between skippr:border-b skippr:px-4 skippr:py-3",
319
319
  children: [
320
- /* @__PURE__ */ jsxDEV3("div", {
320
+ /* @__PURE__ */ jsxs2("div", {
321
321
  className: "skippr:flex skippr:items-center skippr:gap-2",
322
322
  children: [
323
- /* @__PURE__ */ jsxDEV3(Button, {
323
+ /* @__PURE__ */ jsx3(Button, {
324
324
  size: "icon-sm",
325
325
  variant: isMuted ? "destructive" : "outline",
326
326
  onClick: toggleMute,
327
327
  "aria-label": isMuted ? "Unmute" : "Mute",
328
- children: isMuted ? /* @__PURE__ */ jsxDEV3(MicOff, {
328
+ children: isMuted ? /* @__PURE__ */ jsx3(MicOff, {
329
329
  className: "skippr:size-4"
330
- }, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV3(Mic, {
330
+ }) : /* @__PURE__ */ jsx3(Mic, {
331
331
  className: "skippr:size-4"
332
- }, undefined, false, undefined, this)
333
- }, undefined, false, undefined, this),
334
- /* @__PURE__ */ jsxDEV3(Button, {
332
+ })
333
+ }),
334
+ /* @__PURE__ */ jsx3(Button, {
335
335
  size: "icon-sm",
336
336
  variant: isScreenSharing ? "default" : "outline",
337
337
  onClick: toggleScreenShare,
338
338
  "aria-label": isScreenSharing ? "Stop sharing" : "Share screen",
339
- children: isScreenSharing ? /* @__PURE__ */ jsxDEV3(MonitorOff, {
339
+ children: isScreenSharing ? /* @__PURE__ */ jsx3(MonitorOff, {
340
340
  className: "skippr:size-4"
341
- }, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV3(Monitor, {
341
+ }) : /* @__PURE__ */ jsx3(Monitor, {
342
342
  className: "skippr:size-4"
343
- }, undefined, false, undefined, this)
344
- }, undefined, false, undefined, this)
343
+ })
344
+ })
345
345
  ]
346
- }, undefined, true, undefined, this),
347
- /* @__PURE__ */ jsxDEV3("span", {
346
+ }),
347
+ /* @__PURE__ */ jsx3("span", {
348
348
  className: "skippr:text-sm skippr:font-medium skippr:tabular-nums skippr:text-muted-foreground",
349
349
  children: formatTime(elapsed)
350
- }, undefined, false, undefined, this),
351
- /* @__PURE__ */ jsxDEV3(Button, {
350
+ }),
351
+ /* @__PURE__ */ jsx3(Button, {
352
352
  size: "icon-sm",
353
353
  variant: "destructive",
354
354
  onClick: onHangUp,
355
355
  "aria-label": "Hang up",
356
- children: /* @__PURE__ */ jsxDEV3(PhoneOff, {
356
+ children: /* @__PURE__ */ jsx3(PhoneOff, {
357
357
  className: "skippr:size-4"
358
- }, undefined, false, undefined, this)
359
- }, undefined, false, undefined, this)
358
+ })
359
+ })
360
360
  ]
361
- }, undefined, true, undefined, this);
361
+ });
362
362
  }
363
363
 
364
364
  // src/components/MessageList.tsx
365
365
  import { useCallback as useCallback5 } from "react";
366
366
 
367
367
  // src/components/ChatMessage.tsx
368
- import { jsxDEV as jsxDEV4 } from "react/jsx-dev-runtime";
368
+ import { jsx as jsx4 } from "react/jsx-runtime";
369
369
  function ChatMessage({ message }) {
370
370
  const isUser = message.role === "user";
371
- return /* @__PURE__ */ jsxDEV4("div", {
371
+ return /* @__PURE__ */ jsx4("div", {
372
372
  className: cn("skippr:flex skippr:w-full skippr:px-4 skippr:py-1", isUser ? "skippr:justify-end" : "skippr:justify-start"),
373
- children: /* @__PURE__ */ jsxDEV4("div", {
373
+ children: /* @__PURE__ */ jsx4("div", {
374
374
  className: cn("skippr:max-w-[85%] skippr:whitespace-pre-wrap skippr:rounded-2xl skippr:px-4 skippr:py-2.5 skippr:text-sm skippr:leading-relaxed", isUser ? "skippr:rounded-br-sm skippr:bg-primary skippr:text-primary-foreground" : "skippr:rounded-bl-sm skippr:bg-muted skippr:text-foreground"),
375
375
  children: message.content
376
- }, undefined, false, undefined, this)
377
- }, undefined, false, undefined, this);
376
+ })
377
+ });
378
378
  }
379
379
 
380
380
  // src/components/TypingIndicator.tsx
381
- import { jsxDEV as jsxDEV5 } from "react/jsx-dev-runtime";
381
+ import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
382
382
  function TypingIndicator() {
383
- return /* @__PURE__ */ jsxDEV5("div", {
383
+ return /* @__PURE__ */ jsx5("div", {
384
384
  className: "skippr:flex skippr:items-center skippr:gap-1 skippr:px-4 skippr:py-3",
385
- children: /* @__PURE__ */ jsxDEV5("div", {
385
+ children: /* @__PURE__ */ jsxs3("div", {
386
386
  className: "skippr:flex skippr:items-center skippr:gap-1 skippr:rounded-2xl skippr:rounded-bl-sm skippr:bg-muted skippr:px-4 skippr:py-2.5",
387
387
  children: [
388
- /* @__PURE__ */ jsxDEV5("span", {
388
+ /* @__PURE__ */ jsx5("span", {
389
389
  className: "skippr:size-1.5 skippr:animate-bounce skippr:rounded-full skippr:bg-muted-foreground/60 skippr:[animation-delay:0ms]"
390
- }, undefined, false, undefined, this),
391
- /* @__PURE__ */ jsxDEV5("span", {
390
+ }),
391
+ /* @__PURE__ */ jsx5("span", {
392
392
  className: "skippr:size-1.5 skippr:animate-bounce skippr:rounded-full skippr:bg-muted-foreground/60 skippr:[animation-delay:150ms]"
393
- }, undefined, false, undefined, this),
394
- /* @__PURE__ */ jsxDEV5("span", {
393
+ }),
394
+ /* @__PURE__ */ jsx5("span", {
395
395
  className: "skippr:size-1.5 skippr:animate-bounce skippr:rounded-full skippr:bg-muted-foreground/60 skippr:[animation-delay:300ms]"
396
- }, undefined, false, undefined, this)
396
+ })
397
397
  ]
398
- }, undefined, true, undefined, this)
399
- }, undefined, false, undefined, this);
398
+ })
399
+ });
400
400
  }
401
401
 
402
402
  // src/components/MessageList.tsx
403
- import { jsxDEV as jsxDEV6 } from "react/jsx-dev-runtime";
403
+ import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
404
404
  function MessageList({ messages, isStreaming }) {
405
405
  const scrollRef = useCallback5((node) => {
406
406
  node?.scrollIntoView({ behavior: "smooth" });
407
407
  }, []);
408
408
  const lastMessage = messages.length > 0 ? messages[messages.length - 1] : undefined;
409
409
  const showTyping = isStreaming && lastMessage?.role === "assistant" && lastMessage.content === "";
410
- return /* @__PURE__ */ jsxDEV6("div", {
410
+ return /* @__PURE__ */ jsx6("div", {
411
411
  className: "skippr:flex-1 skippr:overflow-y-auto",
412
- children: /* @__PURE__ */ jsxDEV6("div", {
412
+ children: /* @__PURE__ */ jsxs4("div", {
413
413
  className: "skippr:flex skippr:flex-col skippr:gap-1 skippr:py-3",
414
414
  children: [
415
- messages.map((message) => /* @__PURE__ */ jsxDEV6(ChatMessage, {
415
+ messages.map((message) => /* @__PURE__ */ jsx6(ChatMessage, {
416
416
  message
417
- }, message.id, false, undefined, this)),
418
- showTyping && /* @__PURE__ */ jsxDEV6(TypingIndicator, {}, undefined, false, undefined, this),
419
- /* @__PURE__ */ jsxDEV6("div", {
417
+ }, message.id)),
418
+ showTyping && /* @__PURE__ */ jsx6(TypingIndicator, {}),
419
+ /* @__PURE__ */ jsx6("div", {
420
420
  ref: scrollRef
421
- }, `scroll-${messages.length}`, false, undefined, this)
421
+ }, `scroll-${messages.length}`)
422
422
  ]
423
- }, undefined, true, undefined, this)
424
- }, undefined, false, undefined, this);
423
+ })
424
+ });
425
425
  }
426
426
 
427
427
  // src/components/QuickActions.tsx
428
428
  import { Loader2, MessageCircleQuestion } from "lucide-react";
429
- import { jsxDEV as jsxDEV7 } from "react/jsx-dev-runtime";
429
+ import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
430
430
  function QuickActions({ onStartSession, isStarting, error }) {
431
- return /* @__PURE__ */ jsxDEV7("div", {
431
+ return /* @__PURE__ */ jsxs5("div", {
432
432
  className: "skippr:flex skippr:flex-1 skippr:flex-col skippr:items-center skippr:gap-6 skippr:overflow-y-auto skippr:px-4 skippr:py-4",
433
433
  children: [
434
- /* @__PURE__ */ jsxDEV7("p", {
434
+ /* @__PURE__ */ jsx7("p", {
435
435
  className: "skippr:mb-1 skippr:text-sm skippr:text-muted-foreground",
436
436
  children: "How can I help you today?"
437
- }, undefined, false, undefined, this),
438
- /* @__PURE__ */ jsxDEV7(Button, {
437
+ }),
438
+ /* @__PURE__ */ jsxs5(Button, {
439
439
  variant: "outline",
440
440
  className: "skippr:h-auto skippr:flex-col skippr:gap-1.5 skippr:whitespace-normal skippr:py-3 skippr:text-xs",
441
441
  onClick: onStartSession,
442
442
  disabled: isStarting,
443
443
  children: [
444
- isStarting ? /* @__PURE__ */ jsxDEV7(Loader2, {
444
+ isStarting ? /* @__PURE__ */ jsx7(Loader2, {
445
445
  className: "skippr:size-4 skippr:animate-spin skippr:text-primary"
446
- }, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV7(MessageCircleQuestion, {
446
+ }) : /* @__PURE__ */ jsx7(MessageCircleQuestion, {
447
447
  className: "skippr:size-4 skippr:text-primary"
448
- }, undefined, false, undefined, this),
448
+ }),
449
449
  isStarting ? "Starting..." : "Start Session"
450
450
  ]
451
- }, undefined, true, undefined, this),
452
- error && /* @__PURE__ */ jsxDEV7("p", {
451
+ }),
452
+ error && /* @__PURE__ */ jsx7("p", {
453
453
  className: "skippr:text-xs skippr:text-destructive",
454
454
  children: error
455
- }, undefined, false, undefined, this)
455
+ })
456
456
  ]
457
- }, undefined, true, undefined, this);
457
+ });
458
458
  }
459
459
 
460
460
  // src/components/SessionAgenda.tsx
461
461
  import { Check, Circle, Loader2 as Loader22 } from "lucide-react";
462
- import { jsxDEV as jsxDEV8 } from "react/jsx-dev-runtime";
462
+ import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
463
463
  function SessionAgenda({ phases, questions = [] }) {
464
464
  if (phases.length === 0) {
465
- return /* @__PURE__ */ jsxDEV8("div", {
465
+ return /* @__PURE__ */ jsxs6("div", {
466
466
  className: "skippr:flex skippr:flex-col skippr:gap-3 skippr:p-4",
467
467
  children: [
468
- /* @__PURE__ */ jsxDEV8("h3", {
468
+ /* @__PURE__ */ jsx8("h3", {
469
469
  className: "skippr:text-sm skippr:font-semibold",
470
470
  children: "Agenda"
471
- }, undefined, false, undefined, this),
472
- /* @__PURE__ */ jsxDEV8("p", {
471
+ }),
472
+ /* @__PURE__ */ jsx8("p", {
473
473
  className: "skippr:text-xs skippr:text-muted-foreground",
474
474
  children: "Waiting for session..."
475
- }, undefined, false, undefined, this)
475
+ })
476
476
  ]
477
- }, undefined, true, undefined, this);
477
+ });
478
478
  }
479
- return /* @__PURE__ */ jsxDEV8("div", {
479
+ return /* @__PURE__ */ jsxs6("div", {
480
480
  className: "skippr:flex skippr:flex-col skippr:gap-3 skippr:p-4",
481
481
  children: [
482
- /* @__PURE__ */ jsxDEV8("h3", {
482
+ /* @__PURE__ */ jsx8("h3", {
483
483
  className: "skippr:text-sm skippr:font-semibold",
484
484
  children: "Agenda"
485
- }, undefined, false, undefined, this),
486
- /* @__PURE__ */ jsxDEV8("ul", {
485
+ }),
486
+ /* @__PURE__ */ jsx8("ul", {
487
487
  className: "skippr:flex skippr:flex-col skippr:gap-2",
488
488
  children: phases.map((phase) => {
489
489
  const phaseQuestions = questions.filter((q) => q.phaseName === phase.name);
490
490
  const answeredCount = phaseQuestions.filter((q) => q.status === "answered").length;
491
491
  const totalCount = phaseQuestions.length;
492
- return /* @__PURE__ */ jsxDEV8("li", {
492
+ return /* @__PURE__ */ jsxs6("li", {
493
493
  className: "skippr:flex skippr:flex-col skippr:gap-0.5",
494
494
  children: [
495
- /* @__PURE__ */ jsxDEV8("div", {
495
+ /* @__PURE__ */ jsxs6("div", {
496
496
  className: "skippr:flex skippr:items-center skippr:gap-2 skippr:text-sm",
497
497
  children: [
498
- /* @__PURE__ */ jsxDEV8(PhaseIcon, {
498
+ /* @__PURE__ */ jsx8(PhaseIcon, {
499
499
  status: phase.status
500
- }, undefined, false, undefined, this),
501
- /* @__PURE__ */ jsxDEV8("span", {
500
+ }),
501
+ /* @__PURE__ */ jsx8("span", {
502
502
  className: cn(phase.status === "completed" && "skippr:text-muted-foreground skippr:line-through", phase.status === "active" && "skippr:font-medium skippr:text-primary"),
503
503
  children: phase.name
504
- }, undefined, false, undefined, this)
504
+ })
505
505
  ]
506
- }, undefined, true, undefined, this),
507
- totalCount > 0 && /* @__PURE__ */ jsxDEV8("span", {
506
+ }),
507
+ totalCount > 0 && /* @__PURE__ */ jsxs6("span", {
508
508
  className: "skippr:ml-6 skippr:text-xs skippr:text-muted-foreground",
509
509
  children: [
510
510
  answeredCount,
@@ -512,36 +512,36 @@ function SessionAgenda({ phases, questions = [] }) {
512
512
  totalCount,
513
513
  " answered"
514
514
  ]
515
- }, undefined, true, undefined, this)
515
+ })
516
516
  ]
517
- }, phase.name, true, undefined, this);
517
+ }, phase.name);
518
518
  })
519
- }, undefined, false, undefined, this)
519
+ })
520
520
  ]
521
- }, undefined, true, undefined, this);
521
+ });
522
522
  }
523
523
  function PhaseIcon({ status }) {
524
524
  if (status === "completed") {
525
- return /* @__PURE__ */ jsxDEV8("div", {
525
+ return /* @__PURE__ */ jsx8("div", {
526
526
  className: "skippr:flex skippr:size-4 skippr:shrink-0 skippr:items-center skippr:justify-center skippr:rounded-full skippr:bg-primary",
527
- children: /* @__PURE__ */ jsxDEV8(Check, {
527
+ children: /* @__PURE__ */ jsx8(Check, {
528
528
  className: "skippr:size-2.5 skippr:text-primary-foreground",
529
529
  strokeWidth: 3
530
- }, undefined, false, undefined, this)
531
- }, undefined, false, undefined, this);
530
+ })
531
+ });
532
532
  }
533
533
  if (status === "active") {
534
- return /* @__PURE__ */ jsxDEV8(Loader22, {
534
+ return /* @__PURE__ */ jsx8(Loader22, {
535
535
  className: "skippr:size-4 skippr:shrink-0 skippr:text-primary skippr:animate-spin"
536
- }, undefined, false, undefined, this);
536
+ });
537
537
  }
538
- return /* @__PURE__ */ jsxDEV8(Circle, {
538
+ return /* @__PURE__ */ jsx8(Circle, {
539
539
  className: "skippr:size-4 skippr:shrink-0 skippr:text-muted-foreground"
540
- }, undefined, false, undefined, this);
540
+ });
541
541
  }
542
542
 
543
543
  // src/components/Sidebar.tsx
544
- import { jsxDEV as jsxDEV9, Fragment } from "react/jsx-dev-runtime";
544
+ import { jsx as jsx9, jsxs as jsxs7, Fragment } from "react/jsx-runtime";
545
545
  function Sidebar() {
546
546
  const { isConnected, isStarting, error, startSession, disconnect, isPanelOpen, closePanel } = useLiveAgent();
547
547
  useEffect3(() => {
@@ -554,31 +554,31 @@ function Sidebar() {
554
554
  document.body.style.transition = "";
555
555
  };
556
556
  }, []);
557
- return /* @__PURE__ */ jsxDEV9("div", {
557
+ return /* @__PURE__ */ jsx9("div", {
558
558
  className: cn("skippr:fixed skippr:top-0 skippr:right-0 skippr:h-full skippr:z-[9999]", "skippr:bg-background skippr:border-l skippr:border-border", "skippr:flex skippr:flex-col", "skippr:transition-all skippr:duration-300 skippr:ease-in-out skippr:overflow-hidden", !isPanelOpen && "skippr:w-0 skippr:border-l-0"),
559
559
  style: { width: isPanelOpen ? SIDEBAR_WIDTH : undefined },
560
- children: isConnected ? /* @__PURE__ */ jsxDEV9(Fragment, {
560
+ children: isConnected ? /* @__PURE__ */ jsxs7(Fragment, {
561
561
  children: [
562
- /* @__PURE__ */ jsxDEV9(ChatHeader, {
562
+ /* @__PURE__ */ jsx9(ChatHeader, {
563
563
  onClose: closePanel
564
- }, undefined, false, undefined, this),
565
- /* @__PURE__ */ jsxDEV9(ConnectedContent, {
564
+ }),
565
+ /* @__PURE__ */ jsx9(ConnectedContent, {
566
566
  onDisconnect: disconnect
567
- }, undefined, false, undefined, this)
567
+ })
568
568
  ]
569
- }, undefined, true, undefined, this) : /* @__PURE__ */ jsxDEV9(Fragment, {
569
+ }) : /* @__PURE__ */ jsxs7(Fragment, {
570
570
  children: [
571
- /* @__PURE__ */ jsxDEV9(ChatHeader, {
571
+ /* @__PURE__ */ jsx9(ChatHeader, {
572
572
  onClose: closePanel
573
- }, undefined, false, undefined, this),
574
- /* @__PURE__ */ jsxDEV9(QuickActions, {
573
+ }),
574
+ /* @__PURE__ */ jsx9(QuickActions, {
575
575
  onStartSession: startSession,
576
576
  isStarting,
577
577
  error
578
- }, undefined, false, undefined, this)
578
+ })
579
579
  ]
580
- }, undefined, true, undefined, this)
581
- }, undefined, false, undefined, this);
580
+ })
581
+ });
582
582
  }
583
583
  function ConnectedContent({ onDisconnect }) {
584
584
  const connectionState = useConnectionState();
@@ -587,66 +587,66 @@ function ConnectedContent({ onDisconnect }) {
587
587
  const { phases } = usePhaseUpdates();
588
588
  const { questions } = useQuestionUpdates();
589
589
  if (!isConnected) {
590
- return /* @__PURE__ */ jsxDEV9("div", {
590
+ return /* @__PURE__ */ jsx9("div", {
591
591
  className: "skippr:flex skippr:flex-1 skippr:items-center skippr:justify-center",
592
- children: /* @__PURE__ */ jsxDEV9("p", {
592
+ children: /* @__PURE__ */ jsx9("p", {
593
593
  className: "skippr:text-sm skippr:text-muted-foreground",
594
594
  children: "Connecting..."
595
- }, undefined, false, undefined, this)
596
- }, undefined, false, undefined, this);
595
+ })
596
+ });
597
597
  }
598
598
  const isAgentSpeaking = agentState === "speaking";
599
- return /* @__PURE__ */ jsxDEV9(Fragment, {
599
+ return /* @__PURE__ */ jsxs7(Fragment, {
600
600
  children: [
601
- /* @__PURE__ */ jsxDEV9(MeetingControls, {
601
+ /* @__PURE__ */ jsx9(MeetingControls, {
602
602
  onHangUp: onDisconnect
603
- }, undefined, false, undefined, this),
604
- /* @__PURE__ */ jsxDEV9("div", {
603
+ }),
604
+ /* @__PURE__ */ jsxs7("div", {
605
605
  className: "skippr:flex skippr:min-h-0 skippr:flex-1",
606
606
  children: [
607
- /* @__PURE__ */ jsxDEV9("div", {
607
+ /* @__PURE__ */ jsx9("div", {
608
608
  className: "skippr:w-[260px] skippr:shrink-0 skippr:overflow-y-auto skippr:border-r",
609
- children: /* @__PURE__ */ jsxDEV9(SessionAgenda, {
609
+ children: /* @__PURE__ */ jsx9(SessionAgenda, {
610
610
  phases,
611
611
  questions
612
- }, undefined, false, undefined, this)
613
- }, undefined, false, undefined, this),
614
- /* @__PURE__ */ jsxDEV9("div", {
612
+ })
613
+ }),
614
+ /* @__PURE__ */ jsx9("div", {
615
615
  className: "skippr:flex skippr:min-w-0 skippr:flex-1 skippr:flex-col",
616
- children: /* @__PURE__ */ jsxDEV9(MessageList, {
616
+ children: /* @__PURE__ */ jsx9(MessageList, {
617
617
  messages,
618
618
  isStreaming: isAgentSpeaking
619
- }, undefined, false, undefined, this)
620
- }, undefined, false, undefined, this)
619
+ })
620
+ })
621
621
  ]
622
- }, undefined, true, undefined, this)
622
+ })
623
623
  ]
624
- }, undefined, true, undefined, this);
624
+ });
625
625
  }
626
626
 
627
627
  // src/components/SidebarTrigger.tsx
628
628
  import { MessageCircle, X as X2 } from "lucide-react";
629
- import { jsxDEV as jsxDEV10 } from "react/jsx-dev-runtime";
629
+ import { jsx as jsx10 } from "react/jsx-runtime";
630
630
  var TRIGGER_GAP = 16;
631
631
  var TRIGGER_DEFAULT_RIGHT = 24;
632
632
  function SidebarTrigger() {
633
633
  const { isPanelOpen, togglePanel } = useLiveAgent();
634
- return /* @__PURE__ */ jsxDEV10(Button, {
634
+ return /* @__PURE__ */ jsx10(Button, {
635
635
  size: "icon-lg",
636
636
  onClick: togglePanel,
637
637
  className: "skippr:fixed skippr:bottom-6 skippr:z-[9998] skippr:size-14 skippr:rounded-full skippr:shadow-lg skippr:transition-all skippr:duration-300",
638
638
  style: { right: isPanelOpen ? SIDEBAR_WIDTH + TRIGGER_GAP : TRIGGER_DEFAULT_RIGHT },
639
639
  title: isPanelOpen ? "Close chat" : "Chat with us",
640
- children: isPanelOpen ? /* @__PURE__ */ jsxDEV10(X2, {
640
+ children: isPanelOpen ? /* @__PURE__ */ jsx10(X2, {
641
641
  className: "skippr:size-6"
642
- }, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV10(MessageCircle, {
642
+ }) : /* @__PURE__ */ jsx10(MessageCircle, {
643
643
  className: "skippr:size-6"
644
- }, undefined, false, undefined, this)
645
- }, undefined, false, undefined, this);
644
+ })
645
+ });
646
646
  }
647
647
 
648
648
  // src/components/LiveAgent.tsx
649
- import { jsxDEV as jsxDEV11, Fragment as Fragment2 } from "react/jsx-dev-runtime";
649
+ import { jsx as jsx11, jsxs as jsxs8, Fragment as Fragment2 } from "react/jsx-runtime";
650
650
  function LiveAgent({
651
651
  organizationId,
652
652
  agentId,
@@ -687,25 +687,25 @@ function LiveAgent({
687
687
  closePanel,
688
688
  togglePanel
689
689
  ]);
690
- const widgetContent = /* @__PURE__ */ jsxDEV11(Fragment2, {
690
+ const widgetContent = /* @__PURE__ */ jsxs8(Fragment2, {
691
691
  children: [
692
- connection && /* @__PURE__ */ jsxDEV11(RoomAudioRenderer, {}, undefined, false, undefined, this),
693
- /* @__PURE__ */ jsxDEV11(SidebarTrigger, {}, undefined, false, undefined, this),
694
- /* @__PURE__ */ jsxDEV11(Sidebar, {}, undefined, false, undefined, this),
692
+ connection && /* @__PURE__ */ jsx11(RoomAudioRenderer, {}),
693
+ /* @__PURE__ */ jsx11(SidebarTrigger, {}),
694
+ /* @__PURE__ */ jsx11(Sidebar, {}),
695
695
  children
696
696
  ]
697
- }, undefined, true, undefined, this);
698
- return /* @__PURE__ */ jsxDEV11(LiveAgentContext.Provider, {
697
+ });
698
+ return /* @__PURE__ */ jsx11(LiveAgentContext.Provider, {
699
699
  value: ctx,
700
- children: connection ? /* @__PURE__ */ jsxDEV11(LiveKitRoom, {
700
+ children: connection ? /* @__PURE__ */ jsx11(LiveKitRoom, {
701
701
  serverUrl: connection.livekitUrl,
702
702
  token: connection.token,
703
703
  connect: shouldConnect,
704
704
  audio: true,
705
705
  onDisconnected: disconnect,
706
706
  children: widgetContent
707
- }, undefined, false, undefined, this) : widgetContent
708
- }, undefined, false, undefined, this);
707
+ }) : widgetContent
708
+ });
709
709
  }
710
710
  export {
711
711
  useLiveAgent,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skippr/live-agent-sdk",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "type": "module",
5
5
  "main": "dist/esm/lib-exports.js",
6
6
  "module": "dist/esm/lib-exports.js",