@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.
- package/cdn/index.js +28 -32
- package/dist/chatbot.d.ts +2 -2
- package/dist/chatbot.dom.d.ts +1 -2
- package/dist/chatbot.state.d.ts +2 -2
- package/dist/chatbot.utils.d.ts +5 -5
- package/dist/{index-1808db67.js → index-b616116f.js} +481 -3424
- package/dist/{index-09e54786.cjs → index-efb34443.cjs} +481 -3424
- package/dist/interpreter.d.ts +1 -1
- package/dist/{job-application-content-43128b7f.cjs → job-application-content-8b7e62bb.cjs} +25 -23
- package/dist/{job-application-content-205c66b2.js → job-application-content-b9799966.js} +25 -23
- package/dist/plugin-chatbot.cjs +1 -1
- package/dist/plugin-chatbot.js +1 -1
- package/package.json +5 -3
package/dist/interpreter.d.ts
CHANGED
|
@@ -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 './
|
|
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-
|
|
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-
|
|
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
|
-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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]
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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
|
|
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-
|
|
2731
|
-
right: "ml-auto bg-accent-
|
|
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-
|
|
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.
|
|
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
|
|
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-
|
|
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-
|
|
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(
|
|
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-
|
|
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-
|
|
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
|
-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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]
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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
|
|
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-
|
|
2729
|
-
right: "ml-auto bg-accent-
|
|
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-
|
|
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.
|
|
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
|
|
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-
|
|
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-
|
|
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(
|
|
3069
|
+
children: o$1(Conversation, {
|
|
3068
3070
|
isBotTyping,
|
|
3069
3071
|
messages: currentApplication.data.messages
|
|
3070
3072
|
})
|
package/dist/plugin-chatbot.cjs
CHANGED
package/dist/plugin-chatbot.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inploi/plugin-chatbot",
|
|
3
|
-
"version": "3.
|
|
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": "^
|
|
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
|
},
|