@inploi/plugin-chatbot 3.7.0 → 3.8.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.
@@ -1,6 +1,6 @@
1
1
  import { FlowNode } from '@inploi/core/flows';
2
2
  import { AnalyticsService, ApiClient, Logger } from '@inploi/sdk';
3
- import { ChatInput } from './ui/chat-input/chat-input';
3
+ import { ChatInput } from './components/chat-input/chat-input';
4
4
  import { ApplicationSubmission, ChatMessage, KeyToSubmissionMap } from './chatbot.state';
5
5
  export declare const followNodes: ({ node, nodes, stopWhen, }: {
6
6
  node: FlowNode;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("./index-09e54786.cjs");
3
+ const index = require("./index-efb34443.cjs");
4
4
  require("@inploi/sdk");
5
5
  const getHeadOrThrow = (nodes) => {
6
6
  const head = nodes.find((n2) => n2.isHead);
@@ -581,7 +581,8 @@ const SendButton = ({
581
581
  class: className,
582
582
  ...props
583
583
  }) => index.o("button", {
584
- class: index.clsx("bg-accent-7 active:bg-accent-10 active:text-accent-2 text-lowest pointer-coarse:touch-hitbox focus-visible:ring-accent-7/50 flex-shrink-0 rounded-full p-2 transition-all focus:outline-none focus-visible:ring-4 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", className),
584
+ class: index.clsx("bg-accent-9 active:bg-accent-10 pointer-coarse:touch-hitbox fr flex-shrink-0 rounded-full p-2 text-white transition-all disabled:cursor-not-allowed disabled:opacity-50", className),
585
+ type: "submit",
585
586
  ...props,
586
587
  children: index.o("svg", {
587
588
  class: "block",
@@ -605,7 +606,8 @@ const SkipButton = ({
605
606
  class: className,
606
607
  ...props
607
608
  }) => index.o("button", {
608
- class: index.clsx("focus-visible:ring-accent-7/50 text-neutral-9 flex flex-shrink-0 items-center justify-center gap-1 rounded-full py-[6px] pl-2 pr-3 text-sm underline-offset-2 transition-all focus:outline-none focus-visible:ring-4 focus-visible:ring-offset-2", className),
609
+ type: "button",
610
+ class: index.clsx("fr text-neutral-9 flex flex-shrink-0 items-center justify-center gap-1 rounded-full py-[6px] pl-2 pr-3 text-sm underline-offset-2 transition-all", className),
609
611
  ...props,
610
612
  children: [index.o("svg", {
611
613
  class: "block",
@@ -668,7 +670,7 @@ const ChatInputBoolean = ({
668
670
  type: "submit",
669
671
  name: FIELD_NAME,
670
672
  value,
671
- class: "bg-lowest ease-expo-out ring-neutral-12/5 text-neutral-12 active:ring-accent-7 active:bg-accent-2 active:text-accent-11 fr duration-snappy block flex-1 overflow-hidden rounded-2xl px-2.5 py-2.5 ring-2 transition-all selection:bg-transparent",
673
+ class: "bg-lowest ease-expo-out ring-divider text-neutral-12 active:ring-accent-7 active:bg-accent-2 active:text-accent-11 fr block flex-1 overflow-hidden rounded-2xl px-2.5 py-2.5 ring-2 transition-all selection:bg-transparent",
672
674
  children: index.o("p", {
673
675
  class: "truncate text-center text-base",
674
676
  children: input.config.labels[value]
@@ -700,7 +702,7 @@ const InputError = ({
700
702
  role: "alert",
701
703
  class: "text-error-11 flex max-w-full items-center gap-1 overflow-hidden rounded-full px-2 py-2",
702
704
  children: [index.o("svg", {
703
- class: "text-error-10 h-4 w-4",
705
+ class: "text-error-9 h-4 w-4",
704
706
  viewBox: "0 0 16 16",
705
707
  fill: "none",
706
708
  xmlns: "http://www.w3.org/2000/svg",
@@ -751,7 +753,7 @@ const FileThumbnail = ({
751
753
  const extension = file.name.split(".").pop();
752
754
  const fileName = file.name.replace(new RegExp(`.${extension}$`), "");
753
755
  return index.o("div", {
754
- class: index.clsx("bg-accent-1 outline-neutral-4 flex max-w-full gap-2 overflow-hidden rounded-lg px-3 py-2 text-sm outline", className),
756
+ class: index.clsx("bg-accent-1 outline-accent-4 flex max-w-full gap-2 overflow-hidden rounded-lg px-3 py-2 text-sm outline", className),
755
757
  ...props,
756
758
  children: [index.o("p", {
757
759
  "aria-label": "File name",
@@ -764,7 +766,7 @@ const FileThumbnail = ({
764
766
  })]
765
767
  }), index.o("p", {
766
768
  "aria-label": "File size",
767
- class: "text-neutral-10",
769
+ class: "text-accent-11",
768
770
  children: kbToReadableSize(file.sizeKb)
769
771
  })]
770
772
  });
@@ -858,7 +860,7 @@ const ChatInputFile = ({
858
860
  d: "M13 13h3a3 3 0 0 0 0-6h-.025A5.56 5.56 0 0 0 16 6.5 5.5 5.5 0 0 0 5.207 5.021C5.137 5.017 5.071 5 5 5a4 4 0 0 0 0 8h2.167M10 15V6m0 0L8 8m2-2 2 2"
859
861
  })
860
862
  }), index.o("p", {
861
- class: "text-neutral-12 tracking-[-0.01em] dark:text-gray-400",
863
+ class: "text-neutral-12 tracking-[-0.01em]",
862
864
  children: [input.config.allowMultiple ? "Select files" : "Select a file", " to upload"]
863
865
  }), input.config.fileSizeLimitKib ? index.o("p", {
864
866
  class: "text-neutral-10 text-xs",
@@ -2424,7 +2426,7 @@ const ChatInputMultipleChoice = ({
2424
2426
  resolver: getResolver$1(input.config)
2425
2427
  });
2426
2428
  const focusRef = useFocusOnMount();
2427
- const isSingleChoice = input.config.minSelected === 1 && input.config.maxSelected === 1;
2429
+ const isSingleChoice = (input.config.minSelected === 1 || input.config.minSelected === void 0) && input.config.maxSelected === 1;
2428
2430
  return index.o("form", {
2429
2431
  noValidate: true,
2430
2432
  class: "flex flex-col gap-1 pr-2.5",
@@ -2467,7 +2469,7 @@ const ChatInputMultipleChoice = ({
2467
2469
  class: "peer sr-only h-full",
2468
2470
  type: "checkbox"
2469
2471
  }), index.o("label", {
2470
- class: "bg-lowest peer-focus-visible:ring-accent-7 active:outline-neutral-10 ease-expo-out outline-neutral-12/5 text-neutral-11 peer-checked:outline-accent-7 peer-checked:bg-accent-2 peer-checked:text-accent-9 duration-snappy block rounded-2xl px-2.5 py-1 outline outline-2 ring-0 ring-transparent transition-all selection:bg-transparent peer-focus-visible:ring-4 peer-focus-visible:ring-offset-2",
2472
+ class: "bg-lowest peer-focus-visible:ring-accent-7 active:outline-neutral-10 ease-expo-out outline-divider text-neutral-11 peer-checked:outline-accent-7 peer-checked:bg-accent-2 peer-checked:text-accent-9 block rounded-2xl px-2.5 py-1 outline outline-2 ring-0 ring-transparent transition-all selection:bg-transparent peer-focus-visible:ring-4 peer-focus-visible:ring-offset-2",
2471
2473
  htmlFor: id,
2472
2474
  children: option.label
2473
2475
  })]
@@ -2582,7 +2584,7 @@ const ChatInputText = ({
2582
2584
  }
2583
2585
  setRef(element);
2584
2586
  },
2585
- class: "outline-neutral-12/5 ease-expo-out placeholder:text-neutral-5 focus-visible:outline-accent-7 caret-accent-9 duration-snappy w-full rounded-full px-3 py-1 text-base outline outline-2 transition-all",
2587
+ class: "outline-divider ease-expo-out placeholder:text-neutral-10 text-neutral-12 focus-visible:outline-accent-7 caret-accent-9 bg-lowest w-full rounded-full px-3 py-1 text-base outline outline-2 transition-all",
2586
2588
  placeholder: input.config.placeholder
2587
2589
  }), input.config.optional && index.o(SkipButton, {
2588
2590
  class: "absolute right-0 top-0",
@@ -2626,10 +2628,10 @@ const ChatInput = ({
2626
2628
  height: 0,
2627
2629
  opacity: 0
2628
2630
  },
2629
- class: "bg-neutral-2/80 absolute bottom-0 w-full overflow-hidden rounded-b-3xl backdrop-blur-md backdrop-saturate-150",
2631
+ class: "bg-statusbar absolute bottom-0 w-full overflow-hidden rounded-b-3xl backdrop-blur-md backdrop-saturate-150",
2630
2632
  children: index.o("div", {
2631
2633
  ref: inputWrapperRef,
2632
- class: "border-neutral-12/5 border-t",
2634
+ class: "border-divider border-t",
2633
2635
  children: index.N({
2634
2636
  application: index.application,
2635
2637
  input,
@@ -2641,7 +2643,7 @@ const ChatInput = ({
2641
2643
  children: [index.o("input", {
2642
2644
  "aria-hidden": "true",
2643
2645
  id: "chat-input",
2644
- class: "outline-neutral-12/5 placeholder:text-neutral-4 focus-visible:outline-accent-9 caret-accent-9 flex-grow rounded-full px-3 py-1 text-base outline outline-2",
2646
+ class: "outline-divider flex-grow rounded-full bg-transparent px-3 py-1 text-base outline outline-2",
2645
2647
  disabled: true
2646
2648
  }), index.o(SendButton, {
2647
2649
  disabled: true,
@@ -2724,11 +2726,11 @@ const cva = (base, config) => {
2724
2726
  return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
2725
2727
  };
2726
2728
  };
2727
- const chatBubbleVariants = cva("max-w-[min(100%,24rem)] [text-wrap:pretty] leading-snug flex-shrink-1 min-w-[2rem] text-md py-2 px-3 rounded-[18px] min-h-[36px] break-words", {
2729
+ const chatBubbleVariants = cva("max-w-[min(100%,24rem)] [text-wrap:pretty] leading-snug flex-shrink min-w-[2rem] py-2 px-3 rounded-[18px] min-h-[36px] break-words", {
2728
2730
  variants: {
2729
2731
  side: {
2730
- left: "bg-lowest text-neutral-12 shadow-surface-sm outline outline-1 outline-neutral-11/[.08] rounded-bl-md",
2731
- right: "ml-auto bg-accent-7 text-lowest rounded-br-md bubble-right"
2732
+ left: "bg-bubble-weak-bg text-neutral-12 shadow-surface-sm outline outline-1 outline-bubble-weak rounded-bl-md",
2733
+ right: "ml-auto bg-accent-9 text-white rounded-br-md shadow-surface-sm shadow-bubble-strong-shadow"
2732
2734
  },
2733
2735
  transitionState: {
2734
2736
  entering: "opacity-0 translate-y-8",
@@ -2791,7 +2793,7 @@ const TypingIndicator = ({
2791
2793
  children: Array.from({
2792
2794
  length: 3
2793
2795
  }, (_, i2) => index.o("div", {
2794
- class: "bg-accent-7 h-1.5 w-1.5 animate-bounce rounded-full",
2796
+ class: "bg-accent-9 h-1.5 w-1.5 animate-bounce rounded-full",
2795
2797
  style: {
2796
2798
  animationDelay: `${-i2 * 200}ms`
2797
2799
  }
@@ -2802,7 +2804,7 @@ const authorToSide = {
2802
2804
  bot: "left",
2803
2805
  user: "right"
2804
2806
  };
2805
- const systemMessageStyle = cva("w-full select-none py-2 text-center text-[10px] uppercase tracking-widest drop-shadow-[0_1.5px_white]", {
2807
+ const systemMessageStyle = cva("w-full select-none py-2 text-center text-[10px] uppercase tracking-widest drop-shadow-[0_1.5px_var(--i-color-n-1)]", {
2806
2808
  variants: {
2807
2809
  variant: {
2808
2810
  info: "text-neutral-8",
@@ -2812,7 +2814,7 @@ const systemMessageStyle = cva("w-full select-none py-2 text-center text-[10px]
2812
2814
  }
2813
2815
  }
2814
2816
  });
2815
- const JobApplicationMessages = ({
2817
+ const Conversation = ({
2816
2818
  messages,
2817
2819
  isBotTyping
2818
2820
  }) => {
@@ -2842,9 +2844,9 @@ const JobApplicationMessages = ({
2842
2844
  type: "link"
2843
2845
  }, (message2) => {
2844
2846
  return index.o("div", {
2845
- class: "bg-accent-8/5 flex w-full items-center justify-center overflow-hidden rounded-xl py-2",
2847
+ class: "bg-accent-3 flex w-full items-center justify-center overflow-hidden rounded-xl py-2",
2846
2848
  children: index.o("a", {
2847
- class: "bg-lowest shadow-surface-sm ring-accent-8/20 hover:ring-accent-8 active:bg-accent-2 active:text-accent-10 text-accent-9 focus-visible:ring-accent-7/50 flex items-center gap-1.5 truncate rounded-full py-2 pl-4 pr-2.5 no-underline ring-1 transition-all focus:outline-none focus-visible:ring-4 focus-visible:ring-offset-2",
2849
+ class: "bg-lowest shadow-surface-sm ring-accent-6 hover:ring-accent-8 active:bg-accent-2 active:text-accent-10 text-accent-9 focus-visible:ring-accent-7/50 flex items-center gap-1.5 truncate rounded-full py-2 pl-4 pr-2.5 no-underline ring-1 transition-all focus:outline-none focus-visible:ring-4 focus-visible:ring-offset-2",
2848
2850
  target: "_blank",
2849
2851
  href: message2.href,
2850
2852
  children: [message2.text, index.o("svg", {
@@ -3066,7 +3068,7 @@ const JobApplicationContent = ({
3066
3068
  paddingBottom: index.inputHeight.value
3067
3069
  },
3068
3070
  children: index.o(index.AnimatePresence, {
3069
- children: index.o(JobApplicationMessages, {
3071
+ children: index.o(Conversation, {
3070
3072
  isBotTyping,
3071
3073
  messages: currentApplication.data.messages
3072
3074
  })
@@ -1,4 +1,4 @@
1
- import { _, N, i as invariant, o as o$1, c as clsx, a as _$1, p, b as parse, d as picklist, y, e as application, h, k, C as Cn, f as parseAsync, V as ValiError, g as object, t as transform, m as maxLength, j as minLength, r as record, l as boolean, s as string, n as email, u as url, q as regex, T, v as inputHeight, w as m, A as AnimatePresence, F, x as viewState, E as ERROR_MESSAGES } from "./index-1808db67.js";
1
+ import { _, N, i as invariant, o as o$1, c as clsx, a as _$1, p, b as parse, d as picklist, y, e as application, h, k, C as Cn, f as parseAsync, V as ValiError, g as object, t as transform, m as maxLength, j as minLength, r as record, l as boolean, s as string, n as email, u as url, q as regex, T, v as inputHeight, w as m, A as AnimatePresence, F, x as viewState, E as ERROR_MESSAGES } from "./index-b616116f.js";
2
2
  import "@inploi/sdk";
3
3
  const getHeadOrThrow = (nodes) => {
4
4
  const head = nodes.find((n2) => n2.isHead);
@@ -579,7 +579,8 @@ const SendButton = ({
579
579
  class: className,
580
580
  ...props
581
581
  }) => o$1("button", {
582
- class: clsx("bg-accent-7 active:bg-accent-10 active:text-accent-2 text-lowest pointer-coarse:touch-hitbox focus-visible:ring-accent-7/50 flex-shrink-0 rounded-full p-2 transition-all focus:outline-none focus-visible:ring-4 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", className),
582
+ class: clsx("bg-accent-9 active:bg-accent-10 pointer-coarse:touch-hitbox fr flex-shrink-0 rounded-full p-2 text-white transition-all disabled:cursor-not-allowed disabled:opacity-50", className),
583
+ type: "submit",
583
584
  ...props,
584
585
  children: o$1("svg", {
585
586
  class: "block",
@@ -603,7 +604,8 @@ const SkipButton = ({
603
604
  class: className,
604
605
  ...props
605
606
  }) => o$1("button", {
606
- class: clsx("focus-visible:ring-accent-7/50 text-neutral-9 flex flex-shrink-0 items-center justify-center gap-1 rounded-full py-[6px] pl-2 pr-3 text-sm underline-offset-2 transition-all focus:outline-none focus-visible:ring-4 focus-visible:ring-offset-2", className),
607
+ type: "button",
608
+ class: clsx("fr text-neutral-9 flex flex-shrink-0 items-center justify-center gap-1 rounded-full py-[6px] pl-2 pr-3 text-sm underline-offset-2 transition-all", className),
607
609
  ...props,
608
610
  children: [o$1("svg", {
609
611
  class: "block",
@@ -666,7 +668,7 @@ const ChatInputBoolean = ({
666
668
  type: "submit",
667
669
  name: FIELD_NAME,
668
670
  value,
669
- class: "bg-lowest ease-expo-out ring-neutral-12/5 text-neutral-12 active:ring-accent-7 active:bg-accent-2 active:text-accent-11 fr duration-snappy block flex-1 overflow-hidden rounded-2xl px-2.5 py-2.5 ring-2 transition-all selection:bg-transparent",
671
+ class: "bg-lowest ease-expo-out ring-divider text-neutral-12 active:ring-accent-7 active:bg-accent-2 active:text-accent-11 fr block flex-1 overflow-hidden rounded-2xl px-2.5 py-2.5 ring-2 transition-all selection:bg-transparent",
670
672
  children: o$1("p", {
671
673
  class: "truncate text-center text-base",
672
674
  children: input.config.labels[value]
@@ -698,7 +700,7 @@ const InputError = ({
698
700
  role: "alert",
699
701
  class: "text-error-11 flex max-w-full items-center gap-1 overflow-hidden rounded-full px-2 py-2",
700
702
  children: [o$1("svg", {
701
- class: "text-error-10 h-4 w-4",
703
+ class: "text-error-9 h-4 w-4",
702
704
  viewBox: "0 0 16 16",
703
705
  fill: "none",
704
706
  xmlns: "http://www.w3.org/2000/svg",
@@ -749,7 +751,7 @@ const FileThumbnail = ({
749
751
  const extension = file.name.split(".").pop();
750
752
  const fileName = file.name.replace(new RegExp(`.${extension}$`), "");
751
753
  return o$1("div", {
752
- class: clsx("bg-accent-1 outline-neutral-4 flex max-w-full gap-2 overflow-hidden rounded-lg px-3 py-2 text-sm outline", className),
754
+ class: clsx("bg-accent-1 outline-accent-4 flex max-w-full gap-2 overflow-hidden rounded-lg px-3 py-2 text-sm outline", className),
753
755
  ...props,
754
756
  children: [o$1("p", {
755
757
  "aria-label": "File name",
@@ -762,7 +764,7 @@ const FileThumbnail = ({
762
764
  })]
763
765
  }), o$1("p", {
764
766
  "aria-label": "File size",
765
- class: "text-neutral-10",
767
+ class: "text-accent-11",
766
768
  children: kbToReadableSize(file.sizeKb)
767
769
  })]
768
770
  });
@@ -856,7 +858,7 @@ const ChatInputFile = ({
856
858
  d: "M13 13h3a3 3 0 0 0 0-6h-.025A5.56 5.56 0 0 0 16 6.5 5.5 5.5 0 0 0 5.207 5.021C5.137 5.017 5.071 5 5 5a4 4 0 0 0 0 8h2.167M10 15V6m0 0L8 8m2-2 2 2"
857
859
  })
858
860
  }), o$1("p", {
859
- class: "text-neutral-12 tracking-[-0.01em] dark:text-gray-400",
861
+ class: "text-neutral-12 tracking-[-0.01em]",
860
862
  children: [input.config.allowMultiple ? "Select files" : "Select a file", " to upload"]
861
863
  }), input.config.fileSizeLimitKib ? o$1("p", {
862
864
  class: "text-neutral-10 text-xs",
@@ -2422,7 +2424,7 @@ const ChatInputMultipleChoice = ({
2422
2424
  resolver: getResolver$1(input.config)
2423
2425
  });
2424
2426
  const focusRef = useFocusOnMount();
2425
- const isSingleChoice = input.config.minSelected === 1 && input.config.maxSelected === 1;
2427
+ const isSingleChoice = (input.config.minSelected === 1 || input.config.minSelected === void 0) && input.config.maxSelected === 1;
2426
2428
  return o$1("form", {
2427
2429
  noValidate: true,
2428
2430
  class: "flex flex-col gap-1 pr-2.5",
@@ -2465,7 +2467,7 @@ const ChatInputMultipleChoice = ({
2465
2467
  class: "peer sr-only h-full",
2466
2468
  type: "checkbox"
2467
2469
  }), o$1("label", {
2468
- class: "bg-lowest peer-focus-visible:ring-accent-7 active:outline-neutral-10 ease-expo-out outline-neutral-12/5 text-neutral-11 peer-checked:outline-accent-7 peer-checked:bg-accent-2 peer-checked:text-accent-9 duration-snappy block rounded-2xl px-2.5 py-1 outline outline-2 ring-0 ring-transparent transition-all selection:bg-transparent peer-focus-visible:ring-4 peer-focus-visible:ring-offset-2",
2470
+ class: "bg-lowest peer-focus-visible:ring-accent-7 active:outline-neutral-10 ease-expo-out outline-divider text-neutral-11 peer-checked:outline-accent-7 peer-checked:bg-accent-2 peer-checked:text-accent-9 block rounded-2xl px-2.5 py-1 outline outline-2 ring-0 ring-transparent transition-all selection:bg-transparent peer-focus-visible:ring-4 peer-focus-visible:ring-offset-2",
2469
2471
  htmlFor: id,
2470
2472
  children: option.label
2471
2473
  })]
@@ -2580,7 +2582,7 @@ const ChatInputText = ({
2580
2582
  }
2581
2583
  setRef(element);
2582
2584
  },
2583
- class: "outline-neutral-12/5 ease-expo-out placeholder:text-neutral-5 focus-visible:outline-accent-7 caret-accent-9 duration-snappy w-full rounded-full px-3 py-1 text-base outline outline-2 transition-all",
2585
+ class: "outline-divider ease-expo-out placeholder:text-neutral-10 text-neutral-12 focus-visible:outline-accent-7 caret-accent-9 bg-lowest w-full rounded-full px-3 py-1 text-base outline outline-2 transition-all",
2584
2586
  placeholder: input.config.placeholder
2585
2587
  }), input.config.optional && o$1(SkipButton, {
2586
2588
  class: "absolute right-0 top-0",
@@ -2624,10 +2626,10 @@ const ChatInput = ({
2624
2626
  height: 0,
2625
2627
  opacity: 0
2626
2628
  },
2627
- class: "bg-neutral-2/80 absolute bottom-0 w-full overflow-hidden rounded-b-3xl backdrop-blur-md backdrop-saturate-150",
2629
+ class: "bg-statusbar absolute bottom-0 w-full overflow-hidden rounded-b-3xl backdrop-blur-md backdrop-saturate-150",
2628
2630
  children: o$1("div", {
2629
2631
  ref: inputWrapperRef,
2630
- class: "border-neutral-12/5 border-t",
2632
+ class: "border-divider border-t",
2631
2633
  children: N({
2632
2634
  application,
2633
2635
  input,
@@ -2639,7 +2641,7 @@ const ChatInput = ({
2639
2641
  children: [o$1("input", {
2640
2642
  "aria-hidden": "true",
2641
2643
  id: "chat-input",
2642
- class: "outline-neutral-12/5 placeholder:text-neutral-4 focus-visible:outline-accent-9 caret-accent-9 flex-grow rounded-full px-3 py-1 text-base outline outline-2",
2644
+ class: "outline-divider flex-grow rounded-full bg-transparent px-3 py-1 text-base outline outline-2",
2643
2645
  disabled: true
2644
2646
  }), o$1(SendButton, {
2645
2647
  disabled: true,
@@ -2722,11 +2724,11 @@ const cva = (base, config) => {
2722
2724
  return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
2723
2725
  };
2724
2726
  };
2725
- const chatBubbleVariants = cva("max-w-[min(100%,24rem)] [text-wrap:pretty] leading-snug flex-shrink-1 min-w-[2rem] text-md py-2 px-3 rounded-[18px] min-h-[36px] break-words", {
2727
+ const chatBubbleVariants = cva("max-w-[min(100%,24rem)] [text-wrap:pretty] leading-snug flex-shrink min-w-[2rem] py-2 px-3 rounded-[18px] min-h-[36px] break-words", {
2726
2728
  variants: {
2727
2729
  side: {
2728
- left: "bg-lowest text-neutral-12 shadow-surface-sm outline outline-1 outline-neutral-11/[.08] rounded-bl-md",
2729
- right: "ml-auto bg-accent-7 text-lowest rounded-br-md bubble-right"
2730
+ left: "bg-bubble-weak-bg text-neutral-12 shadow-surface-sm outline outline-1 outline-bubble-weak rounded-bl-md",
2731
+ right: "ml-auto bg-accent-9 text-white rounded-br-md shadow-surface-sm shadow-bubble-strong-shadow"
2730
2732
  },
2731
2733
  transitionState: {
2732
2734
  entering: "opacity-0 translate-y-8",
@@ -2789,7 +2791,7 @@ const TypingIndicator = ({
2789
2791
  children: Array.from({
2790
2792
  length: 3
2791
2793
  }, (_2, i2) => o$1("div", {
2792
- class: "bg-accent-7 h-1.5 w-1.5 animate-bounce rounded-full",
2794
+ class: "bg-accent-9 h-1.5 w-1.5 animate-bounce rounded-full",
2793
2795
  style: {
2794
2796
  animationDelay: `${-i2 * 200}ms`
2795
2797
  }
@@ -2800,7 +2802,7 @@ const authorToSide = {
2800
2802
  bot: "left",
2801
2803
  user: "right"
2802
2804
  };
2803
- const systemMessageStyle = cva("w-full select-none py-2 text-center text-[10px] uppercase tracking-widest drop-shadow-[0_1.5px_white]", {
2805
+ const systemMessageStyle = cva("w-full select-none py-2 text-center text-[10px] uppercase tracking-widest drop-shadow-[0_1.5px_var(--i-color-n-1)]", {
2804
2806
  variants: {
2805
2807
  variant: {
2806
2808
  info: "text-neutral-8",
@@ -2810,7 +2812,7 @@ const systemMessageStyle = cva("w-full select-none py-2 text-center text-[10px]
2810
2812
  }
2811
2813
  }
2812
2814
  });
2813
- const JobApplicationMessages = ({
2815
+ const Conversation = ({
2814
2816
  messages,
2815
2817
  isBotTyping
2816
2818
  }) => {
@@ -2840,9 +2842,9 @@ const JobApplicationMessages = ({
2840
2842
  type: "link"
2841
2843
  }, (message2) => {
2842
2844
  return o$1("div", {
2843
- class: "bg-accent-8/5 flex w-full items-center justify-center overflow-hidden rounded-xl py-2",
2845
+ class: "bg-accent-3 flex w-full items-center justify-center overflow-hidden rounded-xl py-2",
2844
2846
  children: o$1("a", {
2845
- class: "bg-lowest shadow-surface-sm ring-accent-8/20 hover:ring-accent-8 active:bg-accent-2 active:text-accent-10 text-accent-9 focus-visible:ring-accent-7/50 flex items-center gap-1.5 truncate rounded-full py-2 pl-4 pr-2.5 no-underline ring-1 transition-all focus:outline-none focus-visible:ring-4 focus-visible:ring-offset-2",
2847
+ class: "bg-lowest shadow-surface-sm ring-accent-6 hover:ring-accent-8 active:bg-accent-2 active:text-accent-10 text-accent-9 focus-visible:ring-accent-7/50 flex items-center gap-1.5 truncate rounded-full py-2 pl-4 pr-2.5 no-underline ring-1 transition-all focus:outline-none focus-visible:ring-4 focus-visible:ring-offset-2",
2846
2848
  target: "_blank",
2847
2849
  href: message2.href,
2848
2850
  children: [message2.text, o$1("svg", {
@@ -3064,7 +3066,7 @@ const JobApplicationContent = ({
3064
3066
  paddingBottom: inputHeight.value
3065
3067
  },
3066
3068
  children: o$1(AnimatePresence, {
3067
- children: o$1(JobApplicationMessages, {
3069
+ children: o$1(Conversation, {
3068
3070
  isBotTyping,
3069
3071
  messages: currentApplication.data.messages
3070
3072
  })
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("./index-09e54786.cjs");
3
+ const index = require("./index-efb34443.cjs");
4
4
  require("@inploi/sdk");
5
5
  exports.chatbotPlugin = index.chatbotPlugin;
@@ -1,4 +1,4 @@
1
- import { z } from "./index-1808db67.js";
1
+ import { z } from "./index-b616116f.js";
2
2
  import "@inploi/sdk";
3
3
  export {
4
4
  z as chatbotPlugin
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inploi/plugin-chatbot",
3
- "version": "3.7.0",
3
+ "version": "3.8.0",
4
4
  "type": "module",
5
5
  "main": "dist/plugin-chatbot.js",
6
6
  "types": "dist/index.d.ts",
@@ -22,9 +22,8 @@
22
22
  "@inploi/sdk": "*"
23
23
  },
24
24
  "devDependencies": {
25
- "@happy-dom/global-registrator": "^12.6.0",
25
+ "@happy-dom/global-registrator": "^13.6.2",
26
26
  "@hookform/resolvers": "^3.3.2",
27
- "@playwright/test": "^1.40.1",
28
27
  "@preact/preset-vite": "^2.5.0",
29
28
  "@preact/signals": "^1.2.2",
30
29
  "@radix-ui/react-dialog": "^1.0.5",
@@ -32,12 +31,14 @@
32
31
  "@radix-ui/react-focus-scope": "^1.0.4",
33
32
  "@radix-ui/react-slot": "^1.0.2",
34
33
  "@total-typescript/ts-reset": "^0.5.1",
34
+ "@types/bun": "^1.0.8",
35
35
  "@types/culori": "^2.0.4",
36
36
  "@types/node": "^20.10.0",
37
37
  "@types/react-transition-group": "^4.4.9",
38
38
  "autoprefixer": "^10.4.16",
39
39
  "class-variance-authority": "^0.7.0",
40
40
  "clsx": "^2.0.0",
41
+ "eslint-plugin-tailwindcss": "^3.14.1",
41
42
  "concurrently": "^8.2.2",
42
43
  "culori": "^3.3.0",
43
44
  "dotenv": "^16.3.1",
@@ -65,6 +66,7 @@
65
66
  "vite-tsconfig-paths": "^4.2.1",
66
67
  "@inploi/core": "1.11.4",
67
68
  "@inploi/sdk": "1.11.4",
69
+ "@inploi/design-tokens": "0.2.0",
68
70
  "eslint-config-custom": "0.1.0",
69
71
  "tsconfig": "0.1.0"
70
72
  },