@yext/chat-ui-react 0.11.0 → 0.11.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/bundle.css CHANGED
@@ -1 +1 @@
1
- .yext-chat { width: 100%; height: 100%; } /*! tailwindcss v3.3.2 | MIT License | https://tailwindcss.com*/.yext-chat *,.yext-chat :after,.yext-chat :before{box-sizing:border-box;border:0 solid #e5e7eb}.yext-chat :after,.yext-chat :before{--tw-content:""}.yext-chat {line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal}.yext-chat {margin:0;line-height:inherit}.yext-chat hr{height:0;color:inherit;border-top-width:1px}.yext-chat abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.yext-chat h1,.yext-chat h2,.yext-chat h3,.yext-chat h4,.yext-chat h5,.yext-chat h6{font-size:inherit;font-weight:inherit}.yext-chat a{color:inherit;text-decoration:inherit}.yext-chat b,.yext-chat strong{font-weight:bolder}.yext-chat code,.yext-chat kbd,.yext-chat pre,.yext-chat samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}.yext-chat small{font-size:80%}.yext-chat sub,.yext-chat sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}.yext-chat sub{bottom:-.25em}.yext-chat sup{top:-.5em}.yext-chat table{text-indent:0;border-color:inherit;border-collapse:collapse}.yext-chat button,.yext-chat input,.yext-chat optgroup,.yext-chat select,.yext-chat textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}.yext-chat button,.yext-chat select{text-transform:none}.yext-chat [type=button],.yext-chat [type=reset],.yext-chat [type=submit],.yext-chat button{-webkit-appearance:button;background-color:initial;background-image:none}.yext-chat :-moz-focusring{outline:auto}.yext-chat :-moz-ui-invalid{box-shadow:none}.yext-chat progress{vertical-align:initial}.yext-chat ::-webkit-inner-spin-button,.yext-chat ::-webkit-outer-spin-button{height:auto}.yext-chat [type=search]{-webkit-appearance:textfield;outline-offset:-2px}.yext-chat ::-webkit-search-decoration{-webkit-appearance:none}.yext-chat ::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}.yext-chat summary{display:list-item}.yext-chat blockquote,.yext-chat dd,.yext-chat dl,.yext-chat figure,.yext-chat h1,.yext-chat h2,.yext-chat h3,.yext-chat h4,.yext-chat h5,.yext-chat h6,.yext-chat hr,.yext-chat p,.yext-chat pre{margin:0}.yext-chat fieldset{margin:0}.yext-chat fieldset,.yext-chat legend{padding:0}.yext-chat menu,.yext-chat ol,.yext-chat ul{list-style:none;margin:0;padding:0}.yext-chat textarea{resize:vertical}.yext-chat input::-moz-placeholder,.yext-chat textarea::-moz-placeholder{opacity:1;color:#9ca3af}.yext-chat input::placeholder,.yext-chat textarea::placeholder{opacity:1;color:#9ca3af}.yext-chat [role=button],.yext-chat button{cursor:pointer}.yext-chat :disabled{cursor:default}.yext-chat audio,.yext-chat canvas,.yext-chat embed,.yext-chat iframe,.yext-chat img,.yext-chat object,.yext-chat svg,.yext-chat video{display:block;vertical-align:middle}.yext-chat img,.yext-chat video{max-width:100%;height:auto}.yext-chat [hidden]{display:none}.yext-chat *,.yext-chat ::backdrop,.yext-chat :after,.yext-chat :before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.yext-chat .container{width:100%}@media (min-width:640px){.yext-chat .container{max-width:640px}}@media (min-width:768px){.yext-chat .container{max-width:768px}}@media (min-width:1024px){.yext-chat .container{max-width:1024px}}@media (min-width:1280px){.yext-chat .container{max-width:1280px}}@media (min-width:1536px){.yext-chat .container{max-width:1536px}}.yext-chat .prose{color:var(--tw-prose-body);max-width:65ch}.yext-chat .prose :where(p):not(:where([class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.yext-chat .prose :where([class~=lead]):not(:where([class~=not-prose] *)){color:var(--tw-prose-lead);font-size:1.25em;line-height:1.6;margin-top:1.2em;margin-bottom:1.2em}.yext-chat .prose :where(a):not(:where([class~=not-prose] *)){color:var(--tw-prose-links);text-decoration:underline;font-weight:500}.yext-chat .prose :where(strong):not(:where([class~=not-prose] *)){color:var(--tw-prose-bold);font-weight:600}.yext-chat .prose :where(a strong):not(:where([class~=not-prose] *)){color:inherit}.yext-chat .prose :where(blockquote strong):not(:where([class~=not-prose] *)){color:inherit}.yext-chat .prose :where(thead th strong):not(:where([class~=not-prose] *)){color:inherit}.yext-chat .prose :where(ol):not(:where([class~=not-prose] *)){list-style-type:decimal;margin-top:1.25em;margin-bottom:1.25em;padding-left:1.625em}.yext-chat .prose :where(ol[type=A]):not(:where([class~=not-prose] *)){list-style-type:upper-alpha}.yext-chat .prose :where(ol[type=a]):not(:where([class~=not-prose] *)){list-style-type:lower-alpha}.yext-chat .prose :where(ol[type=A s]):not(:where([class~=not-prose] *)){list-style-type:upper-alpha}.yext-chat .prose :where(ol[type=a s]):not(:where([class~=not-prose] *)){list-style-type:lower-alpha}.yext-chat .prose :where(ol[type=I]):not(:where([class~=not-prose] *)){list-style-type:upper-roman}.yext-chat .prose :where(ol[type=i]):not(:where([class~=not-prose] *)){list-style-type:lower-roman}.yext-chat .prose :where(ol[type=I s]):not(:where([class~=not-prose] *)){list-style-type:upper-roman}.yext-chat .prose :where(ol[type=i s]):not(:where([class~=not-prose] *)){list-style-type:lower-roman}.yext-chat .prose :where(ol[type="1"]):not(:where([class~=not-prose] *)){list-style-type:decimal}.yext-chat .prose :where(ul):not(:where([class~=not-prose] *)){list-style-type:disc;margin-top:1.25em;margin-bottom:1.25em;padding-left:1.625em}.yext-chat .prose :where(ol>li):not(:where([class~=not-prose] *))::marker{font-weight:400;color:var(--tw-prose-counters)}.yext-chat .prose :where(ul>li):not(:where([class~=not-prose] *))::marker{color:var(--tw-prose-bullets)}.yext-chat .prose :where(hr):not(:where([class~=not-prose] *)){border-color:var(--tw-prose-hr);border-top-width:1px;margin-top:3em;margin-bottom:3em}.yext-chat .prose :where(blockquote):not(:where([class~=not-prose] *)){font-weight:500;font-style:italic;color:var(--tw-prose-quotes);border-left-width:.25rem;border-left-color:var(--tw-prose-quote-borders);quotes:"\201C""\201D""\2018""\2019";margin-top:1.6em;margin-bottom:1.6em;padding-left:1em}.yext-chat .prose :where(blockquote p:first-of-type):not(:where([class~=not-prose] *)):before{content:open-quote}.yext-chat .prose :where(blockquote p:last-of-type):not(:where([class~=not-prose] *)):after{content:close-quote}.yext-chat .prose :where(h1):not(:where([class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:800;font-size:2.25em;margin-top:0;margin-bottom:.8888889em;line-height:1.1111111}.yext-chat .prose :where(h1 strong):not(:where([class~=not-prose] *)){font-weight:900;color:inherit}.yext-chat .prose :where(h2):not(:where([class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:700;font-size:1.5em;margin-top:2em;margin-bottom:1em;line-height:1.3333333}.yext-chat .prose :where(h2 strong):not(:where([class~=not-prose] *)){font-weight:800;color:inherit}.yext-chat .prose :where(h3):not(:where([class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;font-size:1.25em;margin-top:1.6em;margin-bottom:.6em;line-height:1.6}.yext-chat .prose :where(h3 strong):not(:where([class~=not-prose] *)){font-weight:700;color:inherit}.yext-chat .prose :where(h4):not(:where([class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.5em;margin-bottom:.5em;line-height:1.5}.yext-chat .prose :where(h4 strong):not(:where([class~=not-prose] *)){font-weight:700;color:inherit}.yext-chat .prose :where(img):not(:where([class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.yext-chat .prose :where(figure>*):not(:where([class~=not-prose] *)){margin-top:0;margin-bottom:0}.yext-chat .prose :where(figcaption):not(:where([class~=not-prose] *)){color:var(--tw-prose-captions);font-size:.875em;line-height:1.4285714;margin-top:.8571429em}.yext-chat .prose :where(code):not(:where([class~=not-prose] *)){color:var(--tw-prose-code);font-weight:600;font-size:.875em}.yext-chat .prose :where(code):not(:where([class~=not-prose] *)):before{content:"`"}.yext-chat .prose :where(code):not(:where([class~=not-prose] *)):after{content:"`"}.yext-chat .prose :where(a code):not(:where([class~=not-prose] *)){color:inherit}.yext-chat .prose :where(h1 code):not(:where([class~=not-prose] *)){color:inherit}.yext-chat .prose :where(h2 code):not(:where([class~=not-prose] *)){color:inherit;font-size:.875em}.yext-chat .prose :where(h3 code):not(:where([class~=not-prose] *)){color:inherit;font-size:.9em}.yext-chat .prose :where(h4 code):not(:where([class~=not-prose] *)){color:inherit}.yext-chat .prose :where(blockquote code):not(:where([class~=not-prose] *)){color:inherit}.yext-chat .prose :where(thead th code):not(:where([class~=not-prose] *)){color:inherit}.yext-chat .prose :where(pre):not(:where([class~=not-prose] *)){color:var(--tw-prose-pre-code);background-color:var(--tw-prose-pre-bg);overflow-x:auto;font-weight:400;font-size:.875em;line-height:1.7142857;margin-top:1.7142857em;margin-bottom:1.7142857em;border-radius:.375rem;padding:.8571429em 1.1428571em}.yext-chat .prose :where(pre code):not(:where([class~=not-prose] *)){background-color:initial;border-width:0;border-radius:0;padding:0;font-weight:inherit;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit}.yext-chat .prose :where(pre code):not(:where([class~=not-prose] *)):before{content:none}.yext-chat .prose :where(pre code):not(:where([class~=not-prose] *)):after{content:none}.yext-chat .prose :where(table):not(:where([class~=not-prose] *)){width:100%;table-layout:auto;text-align:left;margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.7142857}.yext-chat .prose :where(thead):not(:where([class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-th-borders)}.yext-chat .prose :where(thead th):not(:where([class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;vertical-align:bottom;padding-right:.5714286em;padding-bottom:.5714286em;padding-left:.5714286em}.yext-chat .prose :where(tbody tr):not(:where([class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-td-borders)}.yext-chat .prose :where(tbody tr:last-child):not(:where([class~=not-prose] *)){border-bottom-width:0}.yext-chat .prose :where(tbody td):not(:where([class~=not-prose] *)){vertical-align:initial}.yext-chat .prose :where(tfoot):not(:where([class~=not-prose] *)){border-top-width:1px;border-top-color:var(--tw-prose-th-borders)}.yext-chat .prose :where(tfoot td):not(:where([class~=not-prose] *)){vertical-align:top}.yext-chat .prose{--tw-prose-body:#374151;--tw-prose-headings:#111827;--tw-prose-lead:#4b5563;--tw-prose-links:#111827;--tw-prose-bold:#111827;--tw-prose-counters:#6b7280;--tw-prose-bullets:#d1d5db;--tw-prose-hr:#e5e7eb;--tw-prose-quotes:#111827;--tw-prose-quote-borders:#e5e7eb;--tw-prose-captions:#6b7280;--tw-prose-code:#111827;--tw-prose-pre-code:#e5e7eb;--tw-prose-pre-bg:#1f2937;--tw-prose-th-borders:#d1d5db;--tw-prose-td-borders:#e5e7eb;--tw-prose-invert-body:#d1d5db;--tw-prose-invert-headings:#fff;--tw-prose-invert-lead:#9ca3af;--tw-prose-invert-links:#fff;--tw-prose-invert-bold:#fff;--tw-prose-invert-counters:#9ca3af;--tw-prose-invert-bullets:#4b5563;--tw-prose-invert-hr:#374151;--tw-prose-invert-quotes:#f3f4f6;--tw-prose-invert-quote-borders:#374151;--tw-prose-invert-captions:#9ca3af;--tw-prose-invert-code:#fff;--tw-prose-invert-pre-code:#d1d5db;--tw-prose-invert-pre-bg:#00000080;--tw-prose-invert-th-borders:#4b5563;--tw-prose-invert-td-borders:#374151;font-size:1rem;line-height:1.75}.yext-chat .prose :where(video):not(:where([class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.yext-chat .prose :where(figure):not(:where([class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.yext-chat .prose :where(li):not(:where([class~=not-prose] *)){margin-top:.5em;margin-bottom:.5em}.yext-chat .prose :where(ol>li):not(:where([class~=not-prose] *)){padding-left:.375em}.yext-chat .prose :where(ul>li):not(:where([class~=not-prose] *)){padding-left:.375em}.yext-chat .prose :where(.prose>ul>li p):not(:where([class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.yext-chat .prose :where(.prose>ul>li>:first-child):not(:where([class~=not-prose] *)){margin-top:1.25em}.yext-chat .prose :where(.prose>ul>li>:last-child):not(:where([class~=not-prose] *)){margin-bottom:1.25em}.yext-chat .prose :where(.prose>ol>li>:first-child):not(:where([class~=not-prose] *)){margin-top:1.25em}.yext-chat .prose :where(.prose>ol>li>:last-child):not(:where([class~=not-prose] *)){margin-bottom:1.25em}.yext-chat .prose :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.yext-chat .prose :where(hr+*):not(:where([class~=not-prose] *)){margin-top:0}.yext-chat .prose :where(h2+*):not(:where([class~=not-prose] *)){margin-top:0}.yext-chat .prose :where(h3+*):not(:where([class~=not-prose] *)){margin-top:0}.yext-chat .prose :where(h4+*):not(:where([class~=not-prose] *)){margin-top:0}.yext-chat .prose :where(thead th:first-child):not(:where([class~=not-prose] *)){padding-left:0}.yext-chat .prose :where(thead th:last-child):not(:where([class~=not-prose] *)){padding-right:0}.yext-chat .prose :where(tbody td,tfoot td):not(:where([class~=not-prose] *)){padding:.5714286em}.yext-chat .prose :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose] *)){padding-left:0}.yext-chat .prose :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose] *)){padding-right:0}.yext-chat .prose :where(.prose>:first-child):not(:where([class~=not-prose] *)){margin-top:0}.yext-chat .prose :where(.prose>:last-child):not(:where([class~=not-prose] *)){margin-bottom:0}.yext-chat .invisible{visibility:hidden}.yext-chat .fixed{position:fixed}.yext-chat .absolute{position:absolute}.yext-chat .relative{position:relative}.yext-chat .-right-1{right:-.25rem}.yext-chat .-top-3{top:-.75rem}.yext-chat .bottom-2{bottom:.5rem}.yext-chat .bottom-2\.5{bottom:.625rem}.yext-chat .bottom-6{bottom:1.5rem}.yext-chat .right-4{right:1rem}.yext-chat .top-0{top:0}.yext-chat .z-50{z-index:50}.yext-chat .-mr-8{margin-right:-2rem}.yext-chat .mb-3{margin-bottom:.75rem}.yext-chat .mb-4{margin-bottom:1rem}.yext-chat .ml-4{margin-left:1rem}.yext-chat .ml-auto{margin-left:auto}.yext-chat .mt-1{margin-top:.25rem}.yext-chat .mt-auto{margin-top:auto}.yext-chat .line-clamp-1{-webkit-line-clamp:1}.yext-chat .line-clamp-1,.yext-chat .line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical}.yext-chat .line-clamp-2{-webkit-line-clamp:2}.yext-chat .flex{display:flex}.yext-chat .hidden{display:none}.yext-chat .h-10{height:2.5rem}.yext-chat .h-12{height:3rem}.yext-chat .h-2{height:.5rem}.yext-chat .h-4{height:1rem}.yext-chat .h-5{height:1.25rem}.yext-chat .h-6{height:1.5rem}.yext-chat .h-8{height:2rem}.yext-chat .h-\[22px\]{height:22px}.yext-chat .h-\[26px\]{height:26px}.yext-chat .h-\[28px\]{height:28px}.yext-chat .h-\[75vh\]{height:75vh}.yext-chat .h-fit{height:-moz-fit-content;height:fit-content}.yext-chat .h-full{height:100%}.yext-chat .w-12{width:3rem}.yext-chat .w-2{width:.5rem}.yext-chat .w-4{width:1rem}.yext-chat .w-5{width:1.25rem}.yext-chat .w-6{width:1.5rem}.yext-chat .w-60{width:15rem}.yext-chat .w-8{width:2rem}.yext-chat .w-80{width:20rem}.yext-chat .w-\[22px\]{width:22px}.yext-chat .w-\[26px\]{width:26px}.yext-chat .w-\[28px\]{width:28px}.yext-chat .w-fit{width:-moz-fit-content;width:fit-content}.yext-chat .w-full{width:100%}.yext-chat .max-w-\[80\%\]{max-width:80%}.yext-chat .shrink-0{flex-shrink:0}.yext-chat .translate-y-0{--tw-translate-y:0px}.yext-chat .translate-y-0,.yext-chat .translate-y-\[20\%\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.yext-chat .translate-y-\[20\%\]{--tw-translate-y:20%}.yext-chat .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.yext-chat .animate-\[bounce_1s_infinite\]{animation:bounce 1s infinite}.yext-chat .animate-\[bounce_1s_infinite_0\.3s\]{animation:bounce 1s .3s infinite}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}.yext-chat .animate-\[bounce_1s_infinite_0\.6s\]{animation:bounce 1s .6s infinite}@keyframes spin{to{transform:rotate(1turn)}}.yext-chat .animate-\[spin_0\.3s_linear\]{animation:spin .3s linear}@keyframes expand-left{0%{margin-left:100%}to{margin-left:0}}.yext-chat .animate-expand-left{animation:expand-left .5s}@keyframes fade-in{0%{opacity:0}to{opacity:1}}.yext-chat .animate-fade-in{animation:fade-in .4s}@keyframes heartbeat{0%{transform:scale(1)}80%{transform:scale(1)}90%{transform:scale(1.1)}to{transform:scale(1)}}.yext-chat .animate-heartbeat{animation:heartbeat 2s ease-out infinite}.yext-chat .cursor-pointer{cursor:pointer}.yext-chat .resize-none{resize:none}.yext-chat .flex-row{flex-direction:row}.yext-chat .flex-col{flex-direction:column}.yext-chat .flex-wrap{flex-wrap:wrap}.yext-chat .items-center{align-items:center}.yext-chat .justify-center{justify-content:center}.yext-chat .justify-between{justify-content:space-between}.yext-chat .gap-1{gap:.25rem}.yext-chat .gap-2{gap:.5rem}.yext-chat .gap-x-1{-moz-column-gap:.25rem;column-gap:.25rem}.yext-chat .gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.yext-chat .gap-x-2\.5{-moz-column-gap:.625rem;column-gap:.625rem}.yext-chat .gap-y-1{row-gap:.25rem}.yext-chat .overflow-auto{overflow:auto}.yext-chat .overflow-hidden{overflow:hidden}.yext-chat .overflow-x-auto{overflow-x:auto}.yext-chat .truncate{overflow:hidden;text-overflow:ellipsis}.yext-chat .truncate,.yext-chat .whitespace-nowrap{white-space:nowrap}.yext-chat .whitespace-pre-wrap{white-space:pre-wrap}.yext-chat .break-words{overflow-wrap:break-word}.yext-chat .rounded-2xl{border-radius:1rem}.yext-chat .rounded-3xl{border-radius:1.5rem}.yext-chat .rounded-full{border-radius:9999px}.yext-chat .rounded-md{border-radius:.375rem}.yext-chat .rounded-xl{border-radius:.75rem}.yext-chat .rounded-b-3xl{border-bottom-right-radius:1.5rem;border-bottom-left-radius:1.5rem}.yext-chat .rounded-l-full{border-top-left-radius:9999px;border-bottom-left-radius:9999px}.yext-chat .rounded-t-3xl{border-top-left-radius:1.5rem;border-top-right-radius:1.5rem}.yext-chat .border{border-width:1px}.yext-chat .border-blue-700{--tw-border-opacity:1;border-color:rgb(29 78 216/var(--tw-border-opacity))}.yext-chat .border-slate-300{--tw-border-opacity:1;border-color:rgb(203 213 225/var(--tw-border-opacity))}.yext-chat .bg-blue-600{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity))}.yext-chat .bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity))}.yext-chat .bg-red-700{--tw-bg-opacity:1;background-color:rgb(185 28 28/var(--tw-bg-opacity))}.yext-chat .bg-slate-500{--tw-bg-opacity:1;background-color:rgb(100 116 139/var(--tw-bg-opacity))}.yext-chat .bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.yext-chat .bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.yext-chat .bg-gradient-to-tr{background-image:linear-gradient(to top right,var(--tw-gradient-stops))}.yext-chat .from-blue-600{--tw-gradient-from:#2563eb var(--tw-gradient-from-position);--tw-gradient-to:#2563eb00 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.yext-chat .from-slate-50{--tw-gradient-from:#f8fafc var(--tw-gradient-from-position);--tw-gradient-to:#f8fafc00 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.yext-chat .to-blue-700{--tw-gradient-to:#1d4ed8 var(--tw-gradient-to-position)}.yext-chat .to-blue-800{--tw-gradient-to:#1e40af var(--tw-gradient-to-position)}.yext-chat .to-slate-100{--tw-gradient-to:#f1f5f9 var(--tw-gradient-to-position)}.yext-chat .stroke-2{stroke-width:2}.yext-chat .stroke-\[0\.2\]{stroke-width:.2}.yext-chat .p-1{padding:.25rem}.yext-chat .p-1\.5{padding:.375rem}.yext-chat .p-2{padding:.5rem}.yext-chat .p-2\.5{padding:.625rem}.yext-chat .p-3{padding:.75rem}.yext-chat .p-4{padding:1rem}.yext-chat .px-2{padding-left:.5rem;padding-right:.5rem}.yext-chat .px-4{padding-left:1rem;padding-right:1rem}.yext-chat .py-1{padding-top:.25rem;padding-bottom:.25rem}.yext-chat .py-3{padding-top:.75rem;padding-bottom:.75rem}.yext-chat .pb-4{padding-bottom:1rem}.yext-chat .pl-4{padding-left:1rem}.yext-chat .pr-1{padding-right:.25rem}.yext-chat .pr-12{padding-right:3rem}.yext-chat .pr-3{padding-right:.75rem}.yext-chat .pr-8{padding-right:2rem}.yext-chat .text-center{text-align:center}.yext-chat .text-\[10px\]{font-size:10px}.yext-chat .text-\[12px\]{font-size:12px}.yext-chat .text-\[13px\]{font-size:13px}.yext-chat .text-sm{font-size:.875rem;line-height:1.25rem}.yext-chat .text-xl{font-size:1.25rem;line-height:1.75rem}.yext-chat .font-bold{font-weight:700}.yext-chat .font-medium{font-weight:500}.yext-chat .text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity))}.yext-chat .text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity))}.yext-chat .text-red-200{--tw-text-opacity:1;color:rgb(254 202 202/var(--tw-text-opacity))}.yext-chat .text-slate-400{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity))}.yext-chat .text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity))}.yext-chat .text-slate-700{--tw-text-opacity:1;color:rgb(51 65 85/var(--tw-text-opacity))}.yext-chat .text-slate-900{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity))}.yext-chat .text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.yext-chat .opacity-0{opacity:0}.yext-chat .shadow-2xl{--tw-shadow:0 25px 50px -12px #00000040;--tw-shadow-colored:0 25px 50px -12px var(--tw-shadow-color)}.yext-chat .shadow-2xl,.yext-chat .shadow-xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.yext-chat .shadow-xl{--tw-shadow:0 20px 25px -5px #0000001a,0 8px 10px -6px #0000001a;--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color)}.yext-chat .transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.yext-chat .duration-150,.yext-chat .transition-all{transition-duration:.15s}.yext-chat .duration-200{transition-duration:.2s}.yext-chat .duration-300{transition-duration:.3s}.yext-chat .\@container{container-type:inline-size}.yext-chat .placeholder\:text-\[13px\]::-moz-placeholder{font-size:13px}.yext-chat .placeholder\:text-\[13px\]::placeholder{font-size:13px}.yext-chat .hover\:-translate-y-2:hover{--tw-translate-y:-0.5rem}.yext-chat .hover\:-translate-y-2:hover,.yext-chat .hover\:scale-110:hover{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.yext-chat .hover\:scale-110:hover{--tw-scale-x:1.1;--tw-scale-y:1.1}.yext-chat .hover\:cursor-pointer:hover{cursor:pointer}.yext-chat .hover\:bg-blue-800:hover{--tw-bg-opacity:1;background-color:rgb(30 64 175/var(--tw-bg-opacity))}.yext-chat .hover\:bg-slate-300:hover{--tw-bg-opacity:1;background-color:rgb(203 213 225/var(--tw-bg-opacity))}.yext-chat .hover\:underline:hover{text-decoration-line:underline}.yext-chat .active\:scale-90:active{--tw-scale-x:.9;--tw-scale-y:.9;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.yext-chat .disabled\:bg-slate-200:disabled{--tw-bg-opacity:1;background-color:rgb(226 232 240/var(--tw-bg-opacity))}.yext-chat .group:hover .group-hover\:opacity-100,.yext-chat .peer:hover~.peer-hover\:opacity-100{opacity:1}@container (min-width: 32rem){.yext-chat .\@lg\:m-1{margin:.25rem}.yext-chat .\@lg\:ml-0{margin-left:0}.yext-chat .\@lg\:flex-row{flex-direction:row}.yext-chat .\@lg\:flex-row-reverse{flex-direction:row-reverse}.yext-chat .\@lg\:items-center{align-items:center}.yext-chat .\@lg\:gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}}@container (min-width: 480px){.yext-chat .\@\[480px\]\:bottom-3\.5{bottom:.875rem}.yext-chat .\@\[480px\]\:text-\[13px\]{font-size:13px}.yext-chat .\@\[480px\]\:text-base{font-size:1rem;line-height:1.5rem}.yext-chat .placeholder\:\@\[480px\]\:text-base::-moz-placeholder{font-size:1rem;line-height:1.5rem}.yext-chat .placeholder\:\@\[480px\]\:text-base::placeholder{font-size:1rem;line-height:1.5rem}}@media (max-width:480px){.yext-chat .max-\[480px\]\:bottom-0{bottom:0}.yext-chat .max-\[480px\]\:right-0{right:0}.yext-chat .max-\[480px\]\:h-full{height:100%}.yext-chat .max-\[480px\]\:w-full{width:100%}.yext-chat .max-\[480px\]\:rounded-none{border-radius:0}}@media (min-width:1024px){.yext-chat .lg\:bottom-14{bottom:3.5rem}.yext-chat .lg\:right-10{right:2.5rem}.yext-chat .lg\:h-14{height:3.5rem}.yext-chat .lg\:h-16{height:4rem}.yext-chat .lg\:h-6{height:1.5rem}.yext-chat .lg\:h-\[40px\]{height:40px}.yext-chat .lg\:w-16{width:4rem}.yext-chat .lg\:w-6{width:1.5rem}.yext-chat .lg\:w-96{width:24rem}.yext-chat .lg\:w-\[40px\]{width:40px}.yext-chat .lg\:text-base{font-size:1rem;line-height:1.5rem}}.yext-chat .\[\&\>\*\:first-child\]\:mt-3>:first-child{margin-top:.75rem}
1
+ .yext-chat { width: 100%; height: 100%; } /*! tailwindcss v3.3.2 | MIT License | https://tailwindcss.com*/.yext-chat *,.yext-chat :after,.yext-chat :before{box-sizing:border-box;border:0 solid #e5e7eb}.yext-chat :after,.yext-chat :before{--tw-content:""}.yext-chat {line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal}.yext-chat {margin:0;line-height:inherit}.yext-chat hr{height:0;color:inherit;border-top-width:1px}.yext-chat abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.yext-chat h1,.yext-chat h2,.yext-chat h3,.yext-chat h4,.yext-chat h5,.yext-chat h6{font-size:inherit;font-weight:inherit}.yext-chat a{color:inherit;text-decoration:inherit}.yext-chat b,.yext-chat strong{font-weight:bolder}.yext-chat code,.yext-chat kbd,.yext-chat pre,.yext-chat samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}.yext-chat small{font-size:80%}.yext-chat sub,.yext-chat sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}.yext-chat sub{bottom:-.25em}.yext-chat sup{top:-.5em}.yext-chat table{text-indent:0;border-color:inherit;border-collapse:collapse}.yext-chat button,.yext-chat input,.yext-chat optgroup,.yext-chat select,.yext-chat textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}.yext-chat button,.yext-chat select{text-transform:none}.yext-chat [type=button],.yext-chat [type=reset],.yext-chat [type=submit],.yext-chat button{-webkit-appearance:button;background-color:initial;background-image:none}.yext-chat :-moz-focusring{outline:auto}.yext-chat :-moz-ui-invalid{box-shadow:none}.yext-chat progress{vertical-align:initial}.yext-chat ::-webkit-inner-spin-button,.yext-chat ::-webkit-outer-spin-button{height:auto}.yext-chat [type=search]{-webkit-appearance:textfield;outline-offset:-2px}.yext-chat ::-webkit-search-decoration{-webkit-appearance:none}.yext-chat ::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}.yext-chat summary{display:list-item}.yext-chat blockquote,.yext-chat dd,.yext-chat dl,.yext-chat figure,.yext-chat h1,.yext-chat h2,.yext-chat h3,.yext-chat h4,.yext-chat h5,.yext-chat h6,.yext-chat hr,.yext-chat p,.yext-chat pre{margin:0}.yext-chat fieldset{margin:0}.yext-chat fieldset,.yext-chat legend{padding:0}.yext-chat menu,.yext-chat ol,.yext-chat ul{list-style:none;margin:0;padding:0}.yext-chat textarea{resize:vertical}.yext-chat input::-moz-placeholder,.yext-chat textarea::-moz-placeholder{opacity:1;color:#9ca3af}.yext-chat input::placeholder,.yext-chat textarea::placeholder{opacity:1;color:#9ca3af}.yext-chat [role=button],.yext-chat button{cursor:pointer}.yext-chat :disabled{cursor:default}.yext-chat audio,.yext-chat canvas,.yext-chat embed,.yext-chat iframe,.yext-chat img,.yext-chat object,.yext-chat svg,.yext-chat video{display:block;vertical-align:middle}.yext-chat img,.yext-chat video{max-width:100%;height:auto}.yext-chat [hidden]{display:none}.yext-chat *,.yext-chat ::backdrop,.yext-chat :after,.yext-chat :before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.yext-chat .container{width:100%}@media (min-width:640px){.yext-chat .container{max-width:640px}}@media (min-width:768px){.yext-chat .container{max-width:768px}}@media (min-width:1024px){.yext-chat .container{max-width:1024px}}@media (min-width:1280px){.yext-chat .container{max-width:1280px}}@media (min-width:1536px){.yext-chat .container{max-width:1536px}}.yext-chat .prose{color:var(--tw-prose-body);max-width:65ch}.yext-chat .prose :where(p):not(:where([class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.yext-chat .prose :where([class~=lead]):not(:where([class~=not-prose] *)){color:var(--tw-prose-lead);font-size:1.25em;line-height:1.6;margin-top:1.2em;margin-bottom:1.2em}.yext-chat .prose :where(a):not(:where([class~=not-prose] *)){color:var(--tw-prose-links);text-decoration:underline;font-weight:500}.yext-chat .prose :where(strong):not(:where([class~=not-prose] *)){color:var(--tw-prose-bold);font-weight:600}.yext-chat .prose :where(a strong):not(:where([class~=not-prose] *)){color:inherit}.yext-chat .prose :where(blockquote strong):not(:where([class~=not-prose] *)){color:inherit}.yext-chat .prose :where(thead th strong):not(:where([class~=not-prose] *)){color:inherit}.yext-chat .prose :where(ol):not(:where([class~=not-prose] *)){list-style-type:decimal;margin-top:1.25em;margin-bottom:1.25em;padding-left:1.625em}.yext-chat .prose :where(ol[type=A]):not(:where([class~=not-prose] *)){list-style-type:upper-alpha}.yext-chat .prose :where(ol[type=a]):not(:where([class~=not-prose] *)){list-style-type:lower-alpha}.yext-chat .prose :where(ol[type=A s]):not(:where([class~=not-prose] *)){list-style-type:upper-alpha}.yext-chat .prose :where(ol[type=a s]):not(:where([class~=not-prose] *)){list-style-type:lower-alpha}.yext-chat .prose :where(ol[type=I]):not(:where([class~=not-prose] *)){list-style-type:upper-roman}.yext-chat .prose :where(ol[type=i]):not(:where([class~=not-prose] *)){list-style-type:lower-roman}.yext-chat .prose :where(ol[type=I s]):not(:where([class~=not-prose] *)){list-style-type:upper-roman}.yext-chat .prose :where(ol[type=i s]):not(:where([class~=not-prose] *)){list-style-type:lower-roman}.yext-chat .prose :where(ol[type="1"]):not(:where([class~=not-prose] *)){list-style-type:decimal}.yext-chat .prose :where(ul):not(:where([class~=not-prose] *)){list-style-type:disc;margin-top:1.25em;margin-bottom:1.25em;padding-left:1.625em}.yext-chat .prose :where(ol>li):not(:where([class~=not-prose] *))::marker{font-weight:400;color:var(--tw-prose-counters)}.yext-chat .prose :where(ul>li):not(:where([class~=not-prose] *))::marker{color:var(--tw-prose-bullets)}.yext-chat .prose :where(hr):not(:where([class~=not-prose] *)){border-color:var(--tw-prose-hr);border-top-width:1px;margin-top:3em;margin-bottom:3em}.yext-chat .prose :where(blockquote):not(:where([class~=not-prose] *)){font-weight:500;font-style:italic;color:var(--tw-prose-quotes);border-left-width:.25rem;border-left-color:var(--tw-prose-quote-borders);quotes:"\201C""\201D""\2018""\2019";margin-top:1.6em;margin-bottom:1.6em;padding-left:1em}.yext-chat .prose :where(blockquote p:first-of-type):not(:where([class~=not-prose] *)):before{content:open-quote}.yext-chat .prose :where(blockquote p:last-of-type):not(:where([class~=not-prose] *)):after{content:close-quote}.yext-chat .prose :where(h1):not(:where([class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:800;font-size:2.25em;margin-top:0;margin-bottom:.8888889em;line-height:1.1111111}.yext-chat .prose :where(h1 strong):not(:where([class~=not-prose] *)){font-weight:900;color:inherit}.yext-chat .prose :where(h2):not(:where([class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:700;font-size:1.5em;margin-top:2em;margin-bottom:1em;line-height:1.3333333}.yext-chat .prose :where(h2 strong):not(:where([class~=not-prose] *)){font-weight:800;color:inherit}.yext-chat .prose :where(h3):not(:where([class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;font-size:1.25em;margin-top:1.6em;margin-bottom:.6em;line-height:1.6}.yext-chat .prose :where(h3 strong):not(:where([class~=not-prose] *)){font-weight:700;color:inherit}.yext-chat .prose :where(h4):not(:where([class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.5em;margin-bottom:.5em;line-height:1.5}.yext-chat .prose :where(h4 strong):not(:where([class~=not-prose] *)){font-weight:700;color:inherit}.yext-chat .prose :where(img):not(:where([class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.yext-chat .prose :where(figure>*):not(:where([class~=not-prose] *)){margin-top:0;margin-bottom:0}.yext-chat .prose :where(figcaption):not(:where([class~=not-prose] *)){color:var(--tw-prose-captions);font-size:.875em;line-height:1.4285714;margin-top:.8571429em}.yext-chat .prose :where(code):not(:where([class~=not-prose] *)){color:var(--tw-prose-code);font-weight:600;font-size:.875em}.yext-chat .prose :where(code):not(:where([class~=not-prose] *)):before{content:"`"}.yext-chat .prose :where(code):not(:where([class~=not-prose] *)):after{content:"`"}.yext-chat .prose :where(a code):not(:where([class~=not-prose] *)){color:inherit}.yext-chat .prose :where(h1 code):not(:where([class~=not-prose] *)){color:inherit}.yext-chat .prose :where(h2 code):not(:where([class~=not-prose] *)){color:inherit;font-size:.875em}.yext-chat .prose :where(h3 code):not(:where([class~=not-prose] *)){color:inherit;font-size:.9em}.yext-chat .prose :where(h4 code):not(:where([class~=not-prose] *)){color:inherit}.yext-chat .prose :where(blockquote code):not(:where([class~=not-prose] *)){color:inherit}.yext-chat .prose :where(thead th code):not(:where([class~=not-prose] *)){color:inherit}.yext-chat .prose :where(pre):not(:where([class~=not-prose] *)){color:var(--tw-prose-pre-code);background-color:var(--tw-prose-pre-bg);overflow-x:auto;font-weight:400;font-size:.875em;line-height:1.7142857;margin-top:1.7142857em;margin-bottom:1.7142857em;border-radius:.375rem;padding:.8571429em 1.1428571em}.yext-chat .prose :where(pre code):not(:where([class~=not-prose] *)){background-color:initial;border-width:0;border-radius:0;padding:0;font-weight:inherit;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit}.yext-chat .prose :where(pre code):not(:where([class~=not-prose] *)):before{content:none}.yext-chat .prose :where(pre code):not(:where([class~=not-prose] *)):after{content:none}.yext-chat .prose :where(table):not(:where([class~=not-prose] *)){width:100%;table-layout:auto;text-align:left;margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.7142857}.yext-chat .prose :where(thead):not(:where([class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-th-borders)}.yext-chat .prose :where(thead th):not(:where([class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;vertical-align:bottom;padding-right:.5714286em;padding-bottom:.5714286em;padding-left:.5714286em}.yext-chat .prose :where(tbody tr):not(:where([class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-td-borders)}.yext-chat .prose :where(tbody tr:last-child):not(:where([class~=not-prose] *)){border-bottom-width:0}.yext-chat .prose :where(tbody td):not(:where([class~=not-prose] *)){vertical-align:initial}.yext-chat .prose :where(tfoot):not(:where([class~=not-prose] *)){border-top-width:1px;border-top-color:var(--tw-prose-th-borders)}.yext-chat .prose :where(tfoot td):not(:where([class~=not-prose] *)){vertical-align:top}.yext-chat .prose{--tw-prose-body:#374151;--tw-prose-headings:#111827;--tw-prose-lead:#4b5563;--tw-prose-links:#111827;--tw-prose-bold:#111827;--tw-prose-counters:#6b7280;--tw-prose-bullets:#d1d5db;--tw-prose-hr:#e5e7eb;--tw-prose-quotes:#111827;--tw-prose-quote-borders:#e5e7eb;--tw-prose-captions:#6b7280;--tw-prose-code:#111827;--tw-prose-pre-code:#e5e7eb;--tw-prose-pre-bg:#1f2937;--tw-prose-th-borders:#d1d5db;--tw-prose-td-borders:#e5e7eb;--tw-prose-invert-body:#d1d5db;--tw-prose-invert-headings:#fff;--tw-prose-invert-lead:#9ca3af;--tw-prose-invert-links:#fff;--tw-prose-invert-bold:#fff;--tw-prose-invert-counters:#9ca3af;--tw-prose-invert-bullets:#4b5563;--tw-prose-invert-hr:#374151;--tw-prose-invert-quotes:#f3f4f6;--tw-prose-invert-quote-borders:#374151;--tw-prose-invert-captions:#9ca3af;--tw-prose-invert-code:#fff;--tw-prose-invert-pre-code:#d1d5db;--tw-prose-invert-pre-bg:#00000080;--tw-prose-invert-th-borders:#4b5563;--tw-prose-invert-td-borders:#374151;font-size:1rem;line-height:1.75}.yext-chat .prose :where(video):not(:where([class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.yext-chat .prose :where(figure):not(:where([class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.yext-chat .prose :where(li):not(:where([class~=not-prose] *)){margin-top:.5em;margin-bottom:.5em}.yext-chat .prose :where(ol>li):not(:where([class~=not-prose] *)){padding-left:.375em}.yext-chat .prose :where(ul>li):not(:where([class~=not-prose] *)){padding-left:.375em}.yext-chat .prose :where(.prose>ul>li p):not(:where([class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.yext-chat .prose :where(.prose>ul>li>:first-child):not(:where([class~=not-prose] *)){margin-top:1.25em}.yext-chat .prose :where(.prose>ul>li>:last-child):not(:where([class~=not-prose] *)){margin-bottom:1.25em}.yext-chat .prose :where(.prose>ol>li>:first-child):not(:where([class~=not-prose] *)){margin-top:1.25em}.yext-chat .prose :where(.prose>ol>li>:last-child):not(:where([class~=not-prose] *)){margin-bottom:1.25em}.yext-chat .prose :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.yext-chat .prose :where(hr+*):not(:where([class~=not-prose] *)){margin-top:0}.yext-chat .prose :where(h2+*):not(:where([class~=not-prose] *)){margin-top:0}.yext-chat .prose :where(h3+*):not(:where([class~=not-prose] *)){margin-top:0}.yext-chat .prose :where(h4+*):not(:where([class~=not-prose] *)){margin-top:0}.yext-chat .prose :where(thead th:first-child):not(:where([class~=not-prose] *)){padding-left:0}.yext-chat .prose :where(thead th:last-child):not(:where([class~=not-prose] *)){padding-right:0}.yext-chat .prose :where(tbody td,tfoot td):not(:where([class~=not-prose] *)){padding:.5714286em}.yext-chat .prose :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose] *)){padding-left:0}.yext-chat .prose :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose] *)){padding-right:0}.yext-chat .prose :where(.prose>:first-child):not(:where([class~=not-prose] *)){margin-top:0}.yext-chat .prose :where(.prose>:last-child):not(:where([class~=not-prose] *)){margin-bottom:0}.yext-chat .invisible{visibility:hidden}.yext-chat .fixed{position:fixed}.yext-chat .absolute{position:absolute}.yext-chat .relative{position:relative}.yext-chat .-right-1{right:-.25rem}.yext-chat .-top-3{top:-.75rem}.yext-chat .bottom-2{bottom:.5rem}.yext-chat .bottom-2\.5{bottom:.625rem}.yext-chat .bottom-6{bottom:1.5rem}.yext-chat .right-4{right:1rem}.yext-chat .top-0{top:0}.yext-chat .z-50{z-index:50}.yext-chat .-mr-8{margin-right:-2rem}.yext-chat .mb-3{margin-bottom:.75rem}.yext-chat .mb-4{margin-bottom:1rem}.yext-chat .ml-4{margin-left:1rem}.yext-chat .ml-auto{margin-left:auto}.yext-chat .mt-1{margin-top:.25rem}.yext-chat .mt-auto{margin-top:auto}.yext-chat .line-clamp-1{-webkit-line-clamp:1}.yext-chat .line-clamp-1,.yext-chat .line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical}.yext-chat .line-clamp-2{-webkit-line-clamp:2}.yext-chat .flex{display:flex}.yext-chat .hidden{display:none}.yext-chat .h-10{height:2.5rem}.yext-chat .h-12{height:3rem}.yext-chat .h-2{height:.5rem}.yext-chat .h-4{height:1rem}.yext-chat .h-5{height:1.25rem}.yext-chat .h-6{height:1.5rem}.yext-chat .h-8{height:2rem}.yext-chat .h-\[22px\]{height:22px}.yext-chat .h-\[26px\]{height:26px}.yext-chat .h-\[28px\]{height:28px}.yext-chat .h-\[75vh\]{height:75vh}.yext-chat .h-fit{height:-moz-fit-content;height:fit-content}.yext-chat .h-full{height:100%}.yext-chat .w-12{width:3rem}.yext-chat .w-2{width:.5rem}.yext-chat .w-4{width:1rem}.yext-chat .w-5{width:1.25rem}.yext-chat .w-6{width:1.5rem}.yext-chat .w-60{width:15rem}.yext-chat .w-8{width:2rem}.yext-chat .w-80{width:20rem}.yext-chat .w-\[22px\]{width:22px}.yext-chat .w-\[26px\]{width:26px}.yext-chat .w-\[28px\]{width:28px}.yext-chat .w-fit{width:-moz-fit-content;width:fit-content}.yext-chat .w-full{width:100%}.yext-chat .max-w-\[80\%\]{max-width:80%}.yext-chat .shrink-0{flex-shrink:0}.yext-chat .translate-y-0{--tw-translate-y:0px}.yext-chat .translate-y-0,.yext-chat .translate-y-\[20\%\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.yext-chat .translate-y-\[20\%\]{--tw-translate-y:20%}.yext-chat .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.yext-chat .animate-\[bounce_1s_infinite\]{animation:bounce 1s infinite}.yext-chat .animate-\[bounce_1s_infinite_0\.3s\]{animation:bounce 1s .3s infinite}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}.yext-chat .animate-\[bounce_1s_infinite_0\.6s\]{animation:bounce 1s .6s infinite}@keyframes spin{to{transform:rotate(1turn)}}.yext-chat .animate-\[spin_0\.3s_linear\]{animation:spin .3s linear}@keyframes expand-left{0%{margin-left:100%}to{margin-left:0}}.yext-chat .animate-expand-left{animation:expand-left .5s}@keyframes fade-in{0%{opacity:0}to{opacity:1}}.yext-chat .animate-fade-in{animation:fade-in .4s}@keyframes heartbeat{0%{transform:scale(1)}80%{transform:scale(1)}90%{transform:scale(1.1)}to{transform:scale(1)}}.yext-chat .animate-heartbeat{animation:heartbeat 2s ease-out infinite}.yext-chat .cursor-pointer{cursor:pointer}.yext-chat .resize-none{resize:none}.yext-chat .flex-row{flex-direction:row}.yext-chat .flex-col{flex-direction:column}.yext-chat .flex-wrap{flex-wrap:wrap}.yext-chat .items-center{align-items:center}.yext-chat .justify-center{justify-content:center}.yext-chat .justify-between{justify-content:space-between}.yext-chat .gap-1{gap:.25rem}.yext-chat .gap-2{gap:.5rem}.yext-chat .gap-x-1{-moz-column-gap:.25rem;column-gap:.25rem}.yext-chat .gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.yext-chat .gap-x-2\.5{-moz-column-gap:.625rem;column-gap:.625rem}.yext-chat .gap-y-1{row-gap:.25rem}.yext-chat .overflow-auto{overflow:auto}.yext-chat .overflow-hidden{overflow:hidden}.yext-chat .overflow-x-auto{overflow-x:auto}.yext-chat .truncate{overflow:hidden;text-overflow:ellipsis}.yext-chat .truncate,.yext-chat .whitespace-nowrap{white-space:nowrap}.yext-chat .whitespace-pre-wrap{white-space:pre-wrap}.yext-chat .break-words{overflow-wrap:break-word}.yext-chat .rounded-2xl{border-radius:1rem}.yext-chat .rounded-3xl{border-radius:1.5rem}.yext-chat .rounded-full{border-radius:9999px}.yext-chat .rounded-md{border-radius:.375rem}.yext-chat .rounded-xl{border-radius:.75rem}.yext-chat .rounded-b-3xl{border-bottom-right-radius:1.5rem;border-bottom-left-radius:1.5rem}.yext-chat .rounded-l-full{border-top-left-radius:9999px;border-bottom-left-radius:9999px}.yext-chat .rounded-t-3xl{border-top-left-radius:1.5rem;border-top-right-radius:1.5rem}.yext-chat .border{border-width:1px}.yext-chat .border-blue-700{--tw-border-opacity:1;border-color:rgb(29 78 216/var(--tw-border-opacity))}.yext-chat .border-slate-300{--tw-border-opacity:1;border-color:rgb(203 213 225/var(--tw-border-opacity))}.yext-chat .bg-blue-600{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity))}.yext-chat .bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity))}.yext-chat .bg-red-700{--tw-bg-opacity:1;background-color:rgb(185 28 28/var(--tw-bg-opacity))}.yext-chat .bg-slate-500{--tw-bg-opacity:1;background-color:rgb(100 116 139/var(--tw-bg-opacity))}.yext-chat .bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.yext-chat .bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.yext-chat .bg-gradient-to-tr{background-image:linear-gradient(to top right,var(--tw-gradient-stops))}.yext-chat .from-blue-600{--tw-gradient-from:#2563eb var(--tw-gradient-from-position);--tw-gradient-to:#2563eb00 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.yext-chat .from-slate-50{--tw-gradient-from:#f8fafc var(--tw-gradient-from-position);--tw-gradient-to:#f8fafc00 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.yext-chat .to-blue-700{--tw-gradient-to:#1d4ed8 var(--tw-gradient-to-position)}.yext-chat .to-blue-800{--tw-gradient-to:#1e40af var(--tw-gradient-to-position)}.yext-chat .to-slate-100{--tw-gradient-to:#f1f5f9 var(--tw-gradient-to-position)}.yext-chat .stroke-2{stroke-width:2}.yext-chat .stroke-\[0\.2\]{stroke-width:.2}.yext-chat .p-1{padding:.25rem}.yext-chat .p-1\.5{padding:.375rem}.yext-chat .p-2{padding:.5rem}.yext-chat .p-2\.5{padding:.625rem}.yext-chat .p-3{padding:.75rem}.yext-chat .p-4{padding:1rem}.yext-chat .px-2{padding-left:.5rem;padding-right:.5rem}.yext-chat .px-4{padding-left:1rem;padding-right:1rem}.yext-chat .py-1{padding-top:.25rem;padding-bottom:.25rem}.yext-chat .py-3{padding-top:.75rem;padding-bottom:.75rem}.yext-chat .pb-4{padding-bottom:1rem}.yext-chat .pl-4{padding-left:1rem}.yext-chat .pr-1{padding-right:.25rem}.yext-chat .pr-12{padding-right:3rem}.yext-chat .pr-3{padding-right:.75rem}.yext-chat .pr-8{padding-right:2rem}.yext-chat .text-center{text-align:center}.yext-chat .text-\[10px\]{font-size:10px}.yext-chat .text-\[12px\]{font-size:12px}.yext-chat .text-\[13px\]{font-size:13px}.yext-chat .text-sm{font-size:.875rem;line-height:1.25rem}.yext-chat .text-xl{font-size:1.25rem;line-height:1.75rem}.yext-chat .font-bold{font-weight:700}.yext-chat .font-medium{font-weight:500}.yext-chat .text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity))}.yext-chat .text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity))}.yext-chat .text-red-200{--tw-text-opacity:1;color:rgb(254 202 202/var(--tw-text-opacity))}.yext-chat .text-slate-400{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity))}.yext-chat .text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity))}.yext-chat .text-slate-700{--tw-text-opacity:1;color:rgb(51 65 85/var(--tw-text-opacity))}.yext-chat .text-slate-900{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity))}.yext-chat .text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.yext-chat .opacity-0{opacity:0}.yext-chat .shadow-2xl{--tw-shadow:0 25px 50px -12px #00000040;--tw-shadow-colored:0 25px 50px -12px var(--tw-shadow-color)}.yext-chat .shadow-2xl,.yext-chat .shadow-xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.yext-chat .shadow-xl{--tw-shadow:0 20px 25px -5px #0000001a,0 8px 10px -6px #0000001a;--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color)}.yext-chat .transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.yext-chat .duration-150,.yext-chat .transition-all{transition-duration:.15s}.yext-chat .duration-200{transition-duration:.2s}.yext-chat .duration-300{transition-duration:.3s}.yext-chat .\@container{container-type:inline-size}.yext-chat .placeholder\:text-\[13px\]::-moz-placeholder{font-size:13px}.yext-chat .placeholder\:text-\[13px\]::placeholder{font-size:13px}@media (hover:hover) and (pointer:fine){.yext-chat .hover\:-translate-y-2:hover{--tw-translate-y:-0.5rem}.yext-chat .hover\:-translate-y-2:hover,.yext-chat .hover\:scale-110:hover{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.yext-chat .hover\:scale-110:hover{--tw-scale-x:1.1;--tw-scale-y:1.1}.yext-chat .hover\:cursor-pointer:hover{cursor:pointer}.yext-chat .hover\:bg-blue-800:hover{--tw-bg-opacity:1;background-color:rgb(30 64 175/var(--tw-bg-opacity))}.yext-chat .hover\:bg-slate-300:hover{--tw-bg-opacity:1;background-color:rgb(203 213 225/var(--tw-bg-opacity))}.yext-chat .hover\:underline:hover{text-decoration-line:underline}}.yext-chat .active\:scale-90:active{--tw-scale-x:.9;--tw-scale-y:.9;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.yext-chat .disabled\:bg-slate-200:disabled{--tw-bg-opacity:1;background-color:rgb(226 232 240/var(--tw-bg-opacity))}@media (hover:hover) and (pointer:fine){.yext-chat .group:hover .group-hover\:opacity-100,.yext-chat .peer:hover~.peer-hover\:opacity-100{opacity:1}}@container (min-width: 32rem){.yext-chat .\@lg\:m-1{margin:.25rem}.yext-chat .\@lg\:ml-0{margin-left:0}.yext-chat .\@lg\:flex-row{flex-direction:row}.yext-chat .\@lg\:flex-row-reverse{flex-direction:row-reverse}.yext-chat .\@lg\:items-center{align-items:center}.yext-chat .\@lg\:gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}}@container (min-width: 480px){.yext-chat .\@\[480px\]\:bottom-3\.5{bottom:.875rem}.yext-chat .\@\[480px\]\:text-\[13px\]{font-size:13px}.yext-chat .\@\[480px\]\:text-base{font-size:1rem;line-height:1.5rem}.yext-chat .placeholder\:\@\[480px\]\:text-base::-moz-placeholder{font-size:1rem;line-height:1.5rem}.yext-chat .placeholder\:\@\[480px\]\:text-base::placeholder{font-size:1rem;line-height:1.5rem}}@media (max-width:480px){.yext-chat .max-\[480px\]\:bottom-0{bottom:0}.yext-chat .max-\[480px\]\:right-0{right:0}.yext-chat .max-\[480px\]\:h-full{height:100%}.yext-chat .max-\[480px\]\:w-full{width:100%}.yext-chat .max-\[480px\]\:rounded-none{border-radius:0}}@media (min-width:1024px){.yext-chat .lg\:bottom-14{bottom:3.5rem}.yext-chat .lg\:right-10{right:2.5rem}.yext-chat .lg\:h-14{height:3.5rem}.yext-chat .lg\:h-16{height:4rem}.yext-chat .lg\:h-6{height:1.5rem}.yext-chat .lg\:h-\[40px\]{height:40px}.yext-chat .lg\:w-16{width:4rem}.yext-chat .lg\:w-6{width:1.5rem}.yext-chat .lg\:w-96{width:24rem}.yext-chat .lg\:w-\[40px\]{width:40px}.yext-chat .lg\:text-base{font-size:1rem;line-height:1.5rem}}.yext-chat .\[\&\>\*\:first-child\]\:mt-3>:first-child{margin-top:.75rem}@media (hover:hover){.yext-chat .\[\@media\(hover\:hover\)\]\:opacity-0{opacity:0}}
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "0.11.0";
3
+ var version = "0.11.2";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ChatInput.d.ts","sourceRoot":"","sources":["../../../../src/components/ChatInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;AASrD;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAaD;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,8DAA8D;IAC9D,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;OAGG;IACH,WAAW,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC,uCAAuC;IACvC,cAAc,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IAC7B,yDAAyD;IACzD,gBAAgB,CAAC,EAAE,mBAAmB,CAAC;IACvC,4DAA4D;IAC5D,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;CAChC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,SAAS,CAAC,EACxB,WAAiC,EACjC,MAAc,EACd,cAAsB,EACtB,WAAW,EACX,cAA8B,EAC9B,gBAAgB,EAChB,MAAM,EACN,OAAO,GACR,EAAE,cAAc,qBAuEhB"}
1
+ {"version":3,"file":"ChatInput.d.ts","sourceRoot":"","sources":["../../../../src/components/ChatInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;AASrD;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAaD;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,8DAA8D;IAC9D,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;OAGG;IACH,WAAW,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC,uCAAuC;IACvC,cAAc,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IAC7B,yDAAyD;IACzD,gBAAgB,CAAC,EAAE,mBAAmB,CAAC;IACvC,4DAA4D;IAC5D,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;CAChC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,SAAS,CAAC,EACxB,WAAiC,EACjC,MAAc,EACd,cAAqB,EACrB,WAAW,EACX,cAA8B,EAC9B,gBAAgB,EAChB,MAAM,EACN,OAAO,GACR,EAAE,cAAc,qBAuEhB"}
@@ -30,7 +30,7 @@ const builtInCssClasses = withStylelessCssClasses.withStylelessCssClasses("Input
30
30
  *
31
31
  * @param props - {@link ChatInputProps}
32
32
  */
33
- function ChatInput({ placeholder = "Type a message...", stream = false, inputAutoFocus = false, handleError, sendButtonIcon = React__default.default.createElement(Arrow.ArrowIcon, null), customCssClasses, onSend, onRetry, }) {
33
+ function ChatInput({ placeholder = "Type a message...", stream = false, inputAutoFocus = true, handleError, sendButtonIcon = React__default.default.createElement(Arrow.ArrowIcon, null), customCssClasses, onSend, onRetry, }) {
34
34
  const [input, setInput] = React.useState("");
35
35
  const canSendMessage = chatHeadlessReact.useChatState((state) => state.conversation.canSendMessage);
36
36
  const defaultHandleApiError = useDefaultHandleApiError.useDefaultHandleApiError();
@@ -1 +1 @@
1
- {"version":3,"file":"ChatInput.js","sources":["../../../../src/components/ChatInput.tsx"],"sourcesContent":["import React, { useCallback, useState } from \"react\";\nimport { useChatState } from \"@yext/chat-headless-react\";\nimport { ArrowIcon } from \"../icons/Arrow\";\nimport { useComposedCssClasses } from \"../hooks\";\nimport TextareaAutosize from \"react-textarea-autosize\";\nimport { useDefaultHandleApiError } from \"../hooks/useDefaultHandleApiError\";\nimport { withStylelessCssClasses } from \"../utils/withStylelessCssClasses\";\nimport { useSendMessageWithRetries } from \"../hooks/useSendMessageWithRetries\";\n\n/**\n * The CSS class interface for the {@link ChatInput} component.\n *\n * @public\n */\nexport interface ChatInputCssClasses {\n container?: string;\n textArea?: string;\n sendButton?: string;\n}\n\nconst builtInCssClasses: ChatInputCssClasses = withStylelessCssClasses(\n \"Input\",\n {\n container: \"w-full h-fit flex flex-row relative @container\",\n textArea:\n \"w-full p-4 pr-12 border border-slate-300 rounded-3xl resize-none text-[13px] @[480px]:text-base placeholder:text-[13px] placeholder:@[480px]:text-base text-slate-900\",\n sendButton:\n \"rounded-full p-1.5 w-8 h-8 stroke-2 text-white bg-blue-600 disabled:bg-slate-200 hover:bg-blue-800 active:scale-90 transition-all absolute right-4 bottom-2.5 @[480px]:bottom-3.5\",\n }\n);\n\n/**\n * The props for the {@link ChatInput} component.\n *\n * @public\n */\nexport interface ChatInputProps {\n /**\n * The input's placeholder text when no text has been entered by the user.\n * Defaults to \"Type a message...\".\n */\n placeholder?: string;\n /**\n * Enable streaming behavior by making a request to Chat Streaming API.\n * This feature is experimental, and is subject to change.\n * Defaults to false.\n */\n stream?: boolean;\n /** Enable auto focus for the input box. Defaults to false. */\n inputAutoFocus?: boolean;\n /**\n * A function which is called when an error occurs from Chat API while processing the user's message.\n * By default, the error is logged to the console and an error message is added to state.\n */\n handleError?: (e: unknown) => void;\n /** Custom icon for the send button. */\n sendButtonIcon?: JSX.Element;\n /** CSS classes for customizing the component styling. */\n customCssClasses?: ChatInputCssClasses;\n /** A callback which is called when user sends a message. */\n onSend?: (message: string) => void;\n /**\n * A function which is called when a retryable error occurs from\n * Chat API while processing the user's message.\n */\n onRetry?: (e: unknown) => void;\n}\n\n/**\n * A component that allows user to input message and send to Chat API.\n *\n * @remarks\n * Pressing \"Enter\" key will send the current message.\n * To add a newline, press \"Shift\" and \"Enter\".\n *\n * @public\n *\n * @param props - {@link ChatInputProps}\n */\nexport function ChatInput({\n placeholder = \"Type a message...\",\n stream = false,\n inputAutoFocus = false,\n handleError,\n sendButtonIcon = <ArrowIcon />,\n customCssClasses,\n onSend,\n onRetry,\n}: ChatInputProps) {\n const [input, setInput] = useState(\"\");\n const canSendMessage = useChatState(\n (state) => state.conversation.canSendMessage\n );\n const defaultHandleApiError = useDefaultHandleApiError();\n const sendMessageWithRetries = useSendMessageWithRetries(stream, 1, onRetry);\n const cssClasses = useComposedCssClasses(builtInCssClasses, customCssClasses);\n\n const sendMessage = useCallback(async () => {\n setInput(\"\");\n sendMessageWithRetries(input)\n .catch(handleError ?? defaultHandleApiError)\n .finally(() => {\n onSend?.(input);\n });\n }, [\n sendMessageWithRetries,\n input,\n handleError,\n defaultHandleApiError,\n onSend,\n ]);\n\n const handleKeyDown = useCallback(\n (e: React.KeyboardEvent<HTMLTextAreaElement>) => {\n if (\n !e.shiftKey &&\n e.key === \"Enter\" &&\n // The Japanese Keyboard uses \"Enter\" key to convert from Hiragana to Kanji.\n // \"isComposing\" is a flag that indicates whether the event is part of an ongoing composition session.\n // Safari does not support `isComposing` with the Japanese IME event,\n // so we have to additionally check for the keyCode to handle that edge case.\n !(e.nativeEvent.isComposing || e.keyCode === 229)\n ) {\n e.preventDefault();\n if (canSendMessage && input.trim().length !== 0) {\n sendMessage();\n }\n }\n },\n [sendMessage, canSendMessage, input]\n );\n\n const onInputChange = useCallback(\n (e: React.ChangeEvent<HTMLTextAreaElement>) => {\n setInput(e.target.value);\n },\n []\n );\n\n return (\n <div className={cssClasses.container}>\n <TextareaAutosize\n autoFocus={inputAutoFocus}\n onKeyDown={handleKeyDown}\n value={input}\n onChange={onInputChange}\n className={cssClasses.textArea}\n placeholder={placeholder}\n />\n <button\n aria-label=\"Send Message\"\n disabled={!canSendMessage || input.trim().length === 0}\n onClick={sendMessage}\n className={cssClasses.sendButton}\n >\n {sendButtonIcon}\n </button>\n </div>\n );\n}\n"],"names":["withStylelessCssClasses","React","ArrowIcon","useState","useChatState","useDefaultHandleApiError","useSendMessageWithRetries","useComposedCssClasses","useCallback","TextareaAutosize"],"mappings":";;;;;;;;;;;;;;;;AAoBA,MAAM,iBAAiB,GAAwBA,+CAAuB,CACpE,OAAO,EACP;AACE,IAAA,SAAS,EAAE,gDAAgD;AAC3D,IAAA,QAAQ,EACN,uKAAuK;AACzK,IAAA,UAAU,EACR,mLAAmL;AACtL,CAAA,CACF,CAAC;AAuCF;;;;;;;;;;AAUG;AACa,SAAA,SAAS,CAAC,EACxB,WAAW,GAAG,mBAAmB,EACjC,MAAM,GAAG,KAAK,EACd,cAAc,GAAG,KAAK,EACtB,WAAW,EACX,cAAc,GAAGC,sBAAC,CAAA,aAAA,CAAAC,eAAS,EAAG,IAAA,CAAA,EAC9B,gBAAgB,EAChB,MAAM,EACN,OAAO,GACQ,EAAA;IACf,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAGC,cAAQ,CAAC,EAAE,CAAC,CAAC;AACvC,IAAA,MAAM,cAAc,GAAGC,8BAAY,CACjC,CAAC,KAAK,KAAK,KAAK,CAAC,YAAY,CAAC,cAAc,CAC7C,CAAC;AACF,IAAA,MAAM,qBAAqB,GAAGC,iDAAwB,EAAE,CAAC;IACzD,MAAM,sBAAsB,GAAGC,mDAAyB,CAAC,MAAM,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC;IAC7E,MAAM,UAAU,GAAGC,2CAAqB,CAAC,iBAAiB,EAAE,gBAAgB,CAAC,CAAC;AAE9E,IAAA,MAAM,WAAW,GAAGC,iBAAW,CAAC,YAAW;QACzC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W,EAAE,WAAW,EACxB,CAAA;AACF,QAAAR,sBAAA,CAAA,aAAA,CAAA,QAAA,EAAA,EAAA,YAAA,EACa,cAAc,EACzB,QAAQ,EAAE,CAAC,cAAc,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EACtD,OAAO,EAAE,WAAW,EACpB,SAAS,EAAE,UAAU,CAAC,UAAU,EAE/B,EAAA,cAAc,CACR,CACL,EACN;AACJ;;;;"}
1
+ {"version":3,"file":"ChatInput.js","sources":["../../../../src/components/ChatInput.tsx"],"sourcesContent":["import React, { useCallback, useState } from \"react\";\nimport { useChatState } from \"@yext/chat-headless-react\";\nimport { ArrowIcon } from \"../icons/Arrow\";\nimport { useComposedCssClasses } from \"../hooks\";\nimport TextareaAutosize from \"react-textarea-autosize\";\nimport { useDefaultHandleApiError } from \"../hooks/useDefaultHandleApiError\";\nimport { withStylelessCssClasses } from \"../utils/withStylelessCssClasses\";\nimport { useSendMessageWithRetries } from \"../hooks/useSendMessageWithRetries\";\n\n/**\n * The CSS class interface for the {@link ChatInput} component.\n *\n * @public\n */\nexport interface ChatInputCssClasses {\n container?: string;\n textArea?: string;\n sendButton?: string;\n}\n\nconst builtInCssClasses: ChatInputCssClasses = withStylelessCssClasses(\n \"Input\",\n {\n container: \"w-full h-fit flex flex-row relative @container\",\n textArea:\n \"w-full p-4 pr-12 border border-slate-300 rounded-3xl resize-none text-[13px] @[480px]:text-base placeholder:text-[13px] placeholder:@[480px]:text-base text-slate-900\",\n sendButton:\n \"rounded-full p-1.5 w-8 h-8 stroke-2 text-white bg-blue-600 disabled:bg-slate-200 hover:bg-blue-800 active:scale-90 transition-all absolute right-4 bottom-2.5 @[480px]:bottom-3.5\",\n }\n);\n\n/**\n * The props for the {@link ChatInput} component.\n *\n * @public\n */\nexport interface ChatInputProps {\n /**\n * The input's placeholder text when no text has been entered by the user.\n * Defaults to \"Type a message...\".\n */\n placeholder?: string;\n /**\n * Enable streaming behavior by making a request to Chat Streaming API.\n * This feature is experimental, and is subject to change.\n * Defaults to false.\n */\n stream?: boolean;\n /** Enable auto focus for the input box. Defaults to false. */\n inputAutoFocus?: boolean;\n /**\n * A function which is called when an error occurs from Chat API while processing the user's message.\n * By default, the error is logged to the console and an error message is added to state.\n */\n handleError?: (e: unknown) => void;\n /** Custom icon for the send button. */\n sendButtonIcon?: JSX.Element;\n /** CSS classes for customizing the component styling. */\n customCssClasses?: ChatInputCssClasses;\n /** A callback which is called when user sends a message. */\n onSend?: (message: string) => void;\n /**\n * A function which is called when a retryable error occurs from\n * Chat API while processing the user's message.\n */\n onRetry?: (e: unknown) => void;\n}\n\n/**\n * A component that allows user to input message and send to Chat API.\n *\n * @remarks\n * Pressing \"Enter\" key will send the current message.\n * To add a newline, press \"Shift\" and \"Enter\".\n *\n * @public\n *\n * @param props - {@link ChatInputProps}\n */\nexport function ChatInput({\n placeholder = \"Type a message...\",\n stream = false,\n inputAutoFocus = true,\n handleError,\n sendButtonIcon = <ArrowIcon />,\n customCssClasses,\n onSend,\n onRetry,\n}: ChatInputProps) {\n const [input, setInput] = useState(\"\");\n const canSendMessage = useChatState(\n (state) => state.conversation.canSendMessage\n );\n const defaultHandleApiError = useDefaultHandleApiError();\n const sendMessageWithRetries = useSendMessageWithRetries(stream, 1, onRetry);\n const cssClasses = useComposedCssClasses(builtInCssClasses, customCssClasses);\n\n const sendMessage = useCallback(async () => {\n setInput(\"\");\n sendMessageWithRetries(input)\n .catch(handleError ?? defaultHandleApiError)\n .finally(() => {\n onSend?.(input);\n });\n }, [\n sendMessageWithRetries,\n input,\n handleError,\n defaultHandleApiError,\n onSend,\n ]);\n\n const handleKeyDown = useCallback(\n (e: React.KeyboardEvent<HTMLTextAreaElement>) => {\n if (\n !e.shiftKey &&\n e.key === \"Enter\" &&\n // The Japanese Keyboard uses \"Enter\" key to convert from Hiragana to Kanji.\n // \"isComposing\" is a flag that indicates whether the event is part of an ongoing composition session.\n // Safari does not support `isComposing` with the Japanese IME event,\n // so we have to additionally check for the keyCode to handle that edge case.\n !(e.nativeEvent.isComposing || e.keyCode === 229)\n ) {\n e.preventDefault();\n if (canSendMessage && input.trim().length !== 0) {\n sendMessage();\n }\n }\n },\n [sendMessage, canSendMessage, input]\n );\n\n const onInputChange = useCallback(\n (e: React.ChangeEvent<HTMLTextAreaElement>) => {\n setInput(e.target.value);\n },\n []\n );\n\n return (\n <div className={cssClasses.container}>\n <TextareaAutosize\n autoFocus={inputAutoFocus}\n onKeyDown={handleKeyDown}\n value={input}\n onChange={onInputChange}\n className={cssClasses.textArea}\n placeholder={placeholder}\n />\n <button\n aria-label=\"Send Message\"\n disabled={!canSendMessage || input.trim().length === 0}\n onClick={sendMessage}\n className={cssClasses.sendButton}\n >\n {sendButtonIcon}\n </button>\n </div>\n );\n}\n"],"names":["withStylelessCssClasses","React","ArrowIcon","useState","useChatState","useDefaultHandleApiError","useSendMessageWithRetries","useComposedCssClasses","useCallback","TextareaAutosize"],"mappings":";;;;;;;;;;;;;;;;AAoBA,MAAM,iBAAiB,GAAwBA,+CAAuB,CACpE,OAAO,EACP;AACE,IAAA,SAAS,EAAE,gDAAgD;AAC3D,IAAA,QAAQ,EACN,uKAAuK;AACzK,IAAA,UAAU,EACR,mLAAmL;AACtL,CAAA,CACF,CAAC;AAuCF;;;;;;;;;;AAUG;AACa,SAAA,SAAS,CAAC,EACxB,WAAW,GAAG,mBAAmB,EACjC,MAAM,GAAG,KAAK,EACd,cAAc,GAAG,IAAI,EACrB,WAAW,EACX,cAAc,GAAGC,sBAAC,CAAA,aAAA,CAAAC,eAAS,EAAG,IAAA,CAAA,EAC9B,gBAAgB,EAChB,MAAM,EACN,OAAO,GACQ,EAAA;IACf,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAGC,cAAQ,CAAC,EAAE,CAAC,CAAC;AACvC,IAAA,MAAM,cAAc,GAAGC,8BAAY,CACjC,CAAC,KAAK,KAAK,KAAK,CAAC,YAAY,CAAC,cAAc,CAC7C,CAAC;AACF,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AAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,UAAU,CAAC,SAAS,EAAA;QAClCA,sBAAC,CAAA,aAAA,CAAAQ,iCAAgB,EACf,EAAA,SAAS,EAAE,cAAc,EACzB,SAAS,EAAE,aAAa,EACxB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,aAAa,EACvB,SAAS,EAAE,UAAU,CAAC,QAAQ,EAC9B,WAAW,EAAE,WAAW,EACxB,CAAA;AACF,QAAAR,sBAAA,CAAA,aAAA,CAAA,QAAA,EAAA,EAAA,YAAA,EACa,cAAc,EACzB,QAAQ,EAAE,CAAC,cAAc,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EACtD,OAAO,EAAE,WAAW,EACpB,SAAS,EAAE,UAAU,CAAC,UAAU,EAE/B,EAAA,cAAc,CACR,CACL,EACN;AACJ;;;;"}
@@ -14,7 +14,7 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
14
14
  var React__default = /*#__PURE__*/_interopDefault(React);
15
15
 
16
16
  const builtInCssClasses = withStylelessCssClasses.withStylelessCssClasses("FeedbackButtons", {
17
- container: "flex gap-x-1 absolute -right-1 -top-3 opacity-0 group-hover:opacity-100 duration-200",
17
+ container: "flex gap-x-1 absolute -right-1 -top-3 [@media(hover:hover)]:opacity-0 group-hover:opacity-100 duration-200",
18
18
  thumbsUpButton: "w-6 h-6 bg-gray-700 rounded-md flex justify-center items-center",
19
19
  thumbsUpIcon: "text-white w-[22px] h-[22px] stroke-[0.2]",
20
20
  thumbsUpFillIcon: "text-white w-[22px] h-[22px] stroke-[0.2]",
@@ -1 +1 @@
1
- {"version":3,"file":"FeedbackButtons.js","sources":["../../../../src/components/FeedbackButtons.tsx"],"sourcesContent":["import { ThumbsDownIcon } from \"../icons/ThumbsDown\";\nimport { ThumbsUpIcon } from \"../icons/ThumbsUp\";\nimport React, { useCallback, useState } from \"react\";\nimport { ThumbsUpFillIcon } from \"../icons/ThumbsUpFill\";\nimport { ThumbsDownFillIcon } from \"../icons/ThumbsDownFill\";\nimport { withStylelessCssClasses } from \"../utils/withStylelessCssClasses\";\nimport { useComposedCssClasses } from \"../hooks\";\nimport { useReportAnalyticsEvent } from \"../hooks/useReportAnalyticsEvent\";\n\n/**\n * The CSS class interface for the FeedbackButtons component.\n *\n * @public\n */\nexport interface FeedbackButtonsCssClasses {\n container?: string;\n thumbsUpButton?: string;\n thumbsUpIcon?: string;\n thumbsUpFillIcon?: string;\n thumbsDownButton?: string;\n thumbsDownIcon?: string;\n thumbsDownFillIcon?: string;\n}\n\nconst builtInCssClasses: FeedbackButtonsCssClasses =\n withStylelessCssClasses<FeedbackButtonsCssClasses>(\"FeedbackButtons\", {\n container:\n \"flex gap-x-1 absolute -right-1 -top-3 opacity-0 group-hover:opacity-100 duration-200\",\n thumbsUpButton:\n \"w-6 h-6 bg-gray-700 rounded-md flex justify-center items-center\",\n thumbsUpIcon: \"text-white w-[22px] h-[22px] stroke-[0.2]\",\n thumbsUpFillIcon: \"text-white w-[22px] h-[22px] stroke-[0.2]\",\n thumbsDownButton:\n \"w-6 h-6 bg-gray-700 rounded-md flex justify-center items-center\",\n thumbsDownIcon: \"text-white w-[22px] h-[22px] stroke-[0.2]\",\n thumbsDownFillIcon: \"text-white w-[22px] h-[22px] stroke-[0.2]\",\n });\n\n/**\n * The props for the FeedbackButtons component.\n *\n * @internal\n */\ninterface FeedbackButtonsProps {\n /** The response ID correlates to the current message to give feedback on. */\n responseId?: string;\n /** CSS classes for customizing the component styling. */\n customCssClasses?: FeedbackButtonsCssClasses;\n}\n\n/**\n * Displays feedback buttons (e.g. thumbs up and thumbs down) that will\n * report analytic events on click.\n *\n * @internal\n */\nexport function FeedbackButtons({\n customCssClasses,\n responseId,\n}: FeedbackButtonsProps) {\n const reportAnalyticsEvent = useReportAnalyticsEvent();\n const cssClasses = useComposedCssClasses(builtInCssClasses, customCssClasses);\n const [selectedThumb, setSelectedThumb] = useState<\n \"UP\" | \"DOWN\" | undefined\n >();\n const onClickThumbsUp = useCallback(() => {\n setSelectedThumb(\"UP\");\n reportAnalyticsEvent({\n action: \"THUMBS_UP\",\n chat: {\n responseId,\n },\n });\n }, [reportAnalyticsEvent, responseId]);\n\n const onClickThumbsDown = useCallback(() => {\n setSelectedThumb(\"DOWN\");\n reportAnalyticsEvent({\n action: \"THUMBS_DOWN\",\n chat: {\n responseId,\n },\n });\n }, [reportAnalyticsEvent, responseId]);\n\n return (\n <div className={cssClasses.container}>\n <button className={cssClasses.thumbsUpButton} onClick={onClickThumbsUp}>\n {selectedThumb === \"UP\" ? (\n <ThumbsUpFillIcon className={cssClasses.thumbsUpFillIcon} />\n ) : (\n <ThumbsUpIcon className={cssClasses.thumbsUpIcon} />\n )}\n </button>\n <button\n className={cssClasses.thumbsDownButton}\n onClick={onClickThumbsDown}\n >\n {selectedThumb === \"DOWN\" ? (\n <ThumbsDownFillIcon className={cssClasses.thumbsDownFillIcon} />\n ) : (\n <ThumbsDownIcon className={cssClasses.thumbsDownIcon} />\n )}\n </button>\n </div>\n );\n}\n"],"names":["withStylelessCssClasses","useReportAnalyticsEvent","useComposedCssClasses","useState","useCallback","React","ThumbsUpFillIcon","ThumbsUpIcon","ThumbsDownFillIcon","ThumbsDownIcon"],"mappings":";;;;;;;;;;;;;;;AAwBA,MAAM,iBAAiB,GACrBA,+CAAuB,CAA4B,iBAAiB,EAAE;AACpE,IAAA,SAAS,EACP,sFAAsF;AACxF,IAAA,cAAc,EACZ,iEAAiE;AACnE,IAAA,YAAY,EAAE,2CAA2C;AACzD,IAAA,gBAAgB,EAAE,2CAA2C;AAC7D,IAAA,gBAAgB,EACd,iEAAiE;AACnE,IAAA,cAAc,EAAE,2CAA2C;AAC3D,IAAA,kBAAkB,EAAE,2CAA2C;AAChE,CAAA,CAAC,CAAC;AAcL;;;;;AAKG;SACa,eAAe,CAAC,EAC9B,gBAAgB,EAChB,UAAU,GACW,EAAA;AACrB,IAAA,MAAM,oBAAoB,GAAG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BAAiB,EAAA,EAEzB,aAAa,KAAK,MAAM,IACvBA,sBAAC,CAAA,aAAA,CAAAG,iCAAkB,IAAC,SAAS,EAAE,UAAU,CAAC,kBAAkB,GAAI,KAEhEH,qCAACI,yBAAc,EAAA,EAAC,SAAS,EAAE,UAAU,CAAC,cAAc,EAAA,CAAI,CACzD,CACM,CACL,EACN;AACJ;;;;"}
1
+ {"version":3,"file":"FeedbackButtons.js","sources":["../../../../src/components/FeedbackButtons.tsx"],"sourcesContent":["import { ThumbsDownIcon } from \"../icons/ThumbsDown\";\nimport { ThumbsUpIcon } from \"../icons/ThumbsUp\";\nimport React, { useCallback, useState } from \"react\";\nimport { ThumbsUpFillIcon } from \"../icons/ThumbsUpFill\";\nimport { ThumbsDownFillIcon } from \"../icons/ThumbsDownFill\";\nimport { withStylelessCssClasses } from \"../utils/withStylelessCssClasses\";\nimport { useComposedCssClasses } from \"../hooks\";\nimport { useReportAnalyticsEvent } from \"../hooks/useReportAnalyticsEvent\";\n\n/**\n * The CSS class interface for the FeedbackButtons component.\n *\n * @public\n */\nexport interface FeedbackButtonsCssClasses {\n container?: string;\n thumbsUpButton?: string;\n thumbsUpIcon?: string;\n thumbsUpFillIcon?: string;\n thumbsDownButton?: string;\n thumbsDownIcon?: string;\n thumbsDownFillIcon?: string;\n}\n\nconst builtInCssClasses: FeedbackButtonsCssClasses =\n withStylelessCssClasses<FeedbackButtonsCssClasses>(\"FeedbackButtons\", {\n container:\n \"flex gap-x-1 absolute -right-1 -top-3 [@media(hover:hover)]:opacity-0 group-hover:opacity-100 duration-200\",\n thumbsUpButton:\n \"w-6 h-6 bg-gray-700 rounded-md flex justify-center items-center\",\n thumbsUpIcon: \"text-white w-[22px] h-[22px] stroke-[0.2]\",\n thumbsUpFillIcon: \"text-white w-[22px] h-[22px] stroke-[0.2]\",\n thumbsDownButton:\n \"w-6 h-6 bg-gray-700 rounded-md flex justify-center items-center\",\n thumbsDownIcon: \"text-white w-[22px] h-[22px] stroke-[0.2]\",\n thumbsDownFillIcon: \"text-white w-[22px] h-[22px] stroke-[0.2]\",\n });\n\n/**\n * The props for the FeedbackButtons component.\n *\n * @internal\n */\ninterface FeedbackButtonsProps {\n /** The response ID correlates to the current message to give feedback on. */\n responseId?: string;\n /** CSS classes for customizing the component styling. */\n customCssClasses?: FeedbackButtonsCssClasses;\n}\n\n/**\n * Displays feedback buttons (e.g. thumbs up and thumbs down) that will\n * report analytic events on click.\n *\n * @internal\n */\nexport function FeedbackButtons({\n customCssClasses,\n responseId,\n}: FeedbackButtonsProps) {\n const reportAnalyticsEvent = useReportAnalyticsEvent();\n const cssClasses = useComposedCssClasses(builtInCssClasses, customCssClasses);\n const [selectedThumb, setSelectedThumb] = useState<\n \"UP\" | \"DOWN\" | undefined\n >();\n const onClickThumbsUp = useCallback(() => {\n setSelectedThumb(\"UP\");\n reportAnalyticsEvent({\n action: \"THUMBS_UP\",\n chat: {\n responseId,\n },\n });\n }, [reportAnalyticsEvent, responseId]);\n\n const onClickThumbsDown = useCallback(() => {\n setSelectedThumb(\"DOWN\");\n reportAnalyticsEvent({\n action: \"THUMBS_DOWN\",\n chat: {\n responseId,\n },\n });\n }, [reportAnalyticsEvent, responseId]);\n\n return (\n <div className={cssClasses.container}>\n <button className={cssClasses.thumbsUpButton} onClick={onClickThumbsUp}>\n {selectedThumb === \"UP\" ? (\n <ThumbsUpFillIcon className={cssClasses.thumbsUpFillIcon} />\n ) : (\n <ThumbsUpIcon className={cssClasses.thumbsUpIcon} />\n )}\n </button>\n <button\n className={cssClasses.thumbsDownButton}\n onClick={onClickThumbsDown}\n >\n {selectedThumb === \"DOWN\" ? (\n <ThumbsDownFillIcon className={cssClasses.thumbsDownFillIcon} />\n ) : (\n <ThumbsDownIcon className={cssClasses.thumbsDownIcon} />\n )}\n </button>\n </div>\n );\n}\n"],"names":["withStylelessCssClasses","useReportAnalyticsEvent","useComposedCssClasses","useState","useCallback","React","ThumbsUpFillIcon","ThumbsUpIcon","ThumbsDownFillIcon","Thum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,yDAAyD;IACzD,WAAW,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CACvC;AAED;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,CAAC,EACvB,OAAO,EACP,UAAU,EACV,gBAAgB,EAChB,cAAkC,EAClC,UAAU,EACV,WAAW,GACZ,EAAE,aAAa,qBAgDf"}
1
+ {"version":3,"file":"Markdown.d.ts","sourceRoot":"","sources":["../../../../src/components/Markdown.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAevC;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAMD,UAAU,aAAa;IACrB,4BAA4B;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,yDAAyD;IACzD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,yDAAyD;IACzD,gBAAgB,CAAC,EAAE,kBAAkB,CAAC;IACtC;;;OAGG;IACH,cAAc,CAAC,EAAE,SAAS,GAAG,iBAAiB,CAAC;IAC/C,0CAA0C;IAC1C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,yDAAyD;IACzD,WAAW,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CACvC;AAED;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,CAAC,EACvB,OAAO,EACP,UAAU,EACV,gBAAgB,EAChB,cAAkC,EAClC,UAAU,EACV,WAAW,GACZ,EAAE,aAAa,qBAgDf"}
@@ -1 +1 @@
1
- {"version":3,"file":"Markdown.js","sources":["../../../../src/components/Markdown.tsx"],"sourcesContent":["import ReactMarkdown, {\n PluggableList,\n ReactMarkdownOptions,\n} from \"react-markdown\";\nimport remarkGfm from \"remark-gfm\";\nimport rehypeRaw from \"rehype-raw\";\nimport rehypeSanitize from \"rehype-sanitize\";\nimport React, { useMemo } from \"react\";\nimport { useReportAnalyticsEvent } from \"../hooks/useReportAnalyticsEvent\";\nimport { useComposedCssClasses } from \"../hooks/useComposedCssClasses\";\n\n// The Remark and Rehype plugins to use in conjunction with ReactMarkdown.\nconst unifiedPlugins: { remark?: PluggableList; rehype: PluggableList } = {\n remark: [\n remarkGfm, //renders Github-Flavored Markdown\n ],\n rehype: [\n rehypeRaw, //to support HTML embedded in markdown\n rehypeSanitize, //to sanitize HTML content\n ],\n};\n\n/**\n * The CSS class interface for the Markdown component.\n *\n * @internal\n */\nexport interface MarkdownCssClasses {\n container?: string;\n link?: string;\n}\n\nconst builtInCssClasses: MarkdownCssClasses = {\n link: \"cursor-pointer\",\n};\n\ninterface MarkdownProps {\n /** Stringified markdown. */\n content: string;\n /** The response ID correlates to the current message. */\n responseId?: string;\n /** CSS classes for customizing the component styling. */\n customCssClasses?: MarkdownCssClasses;\n /**\n * Action to report for analytics event when a link is clicked.\n * Defaults to 'CHAT_LINK_CLICK'.\n */\n linkClickEvent?: \"WEBSITE\" | \"CHAT_LINK_CLICK\";\n /** Link target open behavior on click. */\n linkTarget?: string;\n /** A callback which is called when a link is clicked. */\n onLinkClick?: (href?: string) => void;\n}\n\n/**\n * Renders Github-Flavored Markdown from the Knowledge Graph. This Markdown can include\n * arbitrary HTML. Any HTML will be sanitized according to Rehype's default Schema.\n *\n * @remarks\n * A link click will send a CHAT_LINK_CLICK analytics event\n *\n * @internal\n */\nexport function Markdown({\n content,\n responseId,\n customCssClasses,\n linkClickEvent = \"CHAT_LINK_CLICK\",\n linkTarget,\n onLinkClick,\n}: MarkdownProps) {\n const reportAnalyticsEvent = useReportAnalyticsEvent();\n const cssClasses = useComposedCssClasses(builtInCssClasses, customCssClasses);\n\n const components: ReactMarkdownOptions[\"components\"] = useMemo(() => {\n const createClickHandlerFn = (href?: string) => () => {\n reportAnalyticsEvent({\n action: linkClickEvent,\n destinationUrl: href,\n chat: {\n responseId,\n },\n });\n onLinkClick?.(href);\n };\n return {\n a: ({ node: _, children, ...props }) => {\n return (\n <a\n {...props}\n onClick={createClickHandlerFn(props.href)}\n target={linkTarget}\n rel=\"noopener noreferrer\"\n className={cssClasses.link}\n >\n {children}\n </a>\n );\n },\n };\n }, [\n reportAnalyticsEvent,\n linkClickEvent,\n responseId,\n cssClasses,\n linkTarget,\n onLinkClick,\n ]);\n\n return (\n <ReactMarkdown\n className={cssClasses.container}\n children={content}\n remarkPlugins={unifiedPlugins.remark}\n rehypePlugins={unifiedPlugins.rehype}\n components={components}\n />\n );\n}\n"],"names":["remarkGfm","rehypeRaw","rehypeSanitize","useReportAnalyticsEvent","useComposedCssClasses","useMemo","React","ReactMarkdown"],"mappings":";;;;;;;;;;;;;;;;;;AAWA;AACA,MAAM,cAAc,GAAsD;AACxE,IAAA,MAAM,EAAE;AACN,QAAAA,0BAAS;AACV,KAAA;AACD,IAAA,MAAM,EAAE;QACNC,0BAAS;AACT,QAAAC,+BAAc;AACf,KAAA;CACF,CAAC;AAYF,MAAM,iBAAiB,GAAuB;AAC5C,IAAA,IAAI,EAAE,gBAAgB;CACvB,CAAC;AAoBF;;;;;;;;AAQG;SACa,QAAQ,CAAC,EACvB,OAAO,EACP,UAAU,EACV,gBAAgB,EAChB,cAAc,GAAG,iBAAiB,EAClC,UAAU,EACV,WAAW,GACG,EAAA;AACd,IAAA,MAAM,oBAAoB,GAAGC,+CAAuB,EAAE,CAAC;IACvD,MAAM,UAAU,GAAGC,2CAAqB,CAAC,iBAAiB,EAAE,gBAAgB,CAAC,CAAC;AAE9E,IAAA,MAAM,UAAU,GAAuCC,aAAO,CAAC,MAAK;QAClE,MAAM,oBAAoB,GAAG,CAAC,IAAa,KAAK,MAAK;AACnD,YAAA,oBAAoB,CAAC;AACnB,gBAAA,MAAM,EAAE,cAAc;AACtB,gBAAA,cAAc,EAAE,IAAI;AACpB,gBAAA,IAAI,EAAE;oBACJ,UAAU;AACX,iBAAA;AACF,aAAA,CAAC,CAAC;AACH,YAAA,WAAW,GAAG,IAAI,CAAC,CAAC;AACtB,SAAC,CAAC;QACF,OAAO;AACL,YAAA,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,KAAI;AACrC,gBAAA,QACEC,sBAAA,CAAA,aAAA,CAAA,GAAA,EAAA,EAAA,GACM,KAAK,EACT,OAAO,EAAE,oBAAoB,CAAC,KAAK,CAAC,IAAI,CAAC,EACzC,MAAM,EAAE,UAAU,EAClB,GAAG,EAAC,qBAAqB,EACzB,SAAS,EAAE,UAAU,CAAC,IAAI,EAAA,EAEzB,QAAQ,CACP,EACJ;aACH;SACF,CAAC;AACJ,KAAC,EAAE;QACD,oBAAoB;QACpB,cAAc;QACd,UAAU;QACV,UAAU;QACV,UAAU;QACV,WAAW;AACZ,KAAA,CAAC,CAAC;AAEH,IAAA,QACEA,sBAAA,CAAA,aAAA,CAACC,8BAAa,EAAA,EACZ,SAAS,EAAE,UAAU,CAAC,SAAS,EAC/B,QAAQ,EAAE,OAAO,EACjB,aAAa,EAAE,cAAc,CAAC,MAAM,EACpC,aAAa,EAAE,cAAc,CAAC,MAAM,EACpC,UAAU,EAAE,UAAU,EAAA,CACtB,EACF;AACJ;;;;"}
1
+ {"version":3,"file":"Markdown.js","sources":["../../../../src/components/Markdown.tsx"],"sourcesContent":["import ReactMarkdown, { Options } from \"react-markdown\";\nimport remarkGfm from \"remark-gfm\";\nimport rehypeRaw from \"rehype-raw\";\nimport rehypeSanitize from \"rehype-sanitize\";\nimport React, { useMemo } from \"react\";\nimport { useReportAnalyticsEvent } from \"../hooks/useReportAnalyticsEvent\";\nimport { useComposedCssClasses } from \"../hooks/useComposedCssClasses\";\n\n// The Remark and Rehype plugins to use in conjunction with ReactMarkdown.\nconst unifiedPlugins: { remark?: Options['remarkPlugins']; rehype: Options['rehypePlugins'] } = {\n remark: [\n remarkGfm, //renders Github-Flavored Markdown\n ],\n rehype: [\n rehypeRaw, //to support HTML embedded in markdown\n rehypeSanitize, //to sanitize HTML content\n ],\n};\n\n/**\n * The CSS class interface for the Markdown component.\n *\n * @internal\n */\nexport interface MarkdownCssClasses {\n container?: string;\n link?: string;\n}\n\nconst builtInCssClasses: MarkdownCssClasses = {\n link: \"cursor-pointer\",\n};\n\ninterface MarkdownProps {\n /** Stringified markdown. */\n content: string;\n /** The response ID correlates to the current message. */\n responseId?: string;\n /** CSS classes for customizing the component styling. */\n customCssClasses?: MarkdownCssClasses;\n /**\n * Action to report for analytics event when a link is clicked.\n * Defaults to 'CHAT_LINK_CLICK'.\n */\n linkClickEvent?: \"WEBSITE\" | \"CHAT_LINK_CLICK\";\n /** Link target open behavior on click. */\n linkTarget?: string;\n /** A callback which is called when a link is clicked. */\n onLinkClick?: (href?: string) => void;\n}\n\n/**\n * Renders Github-Flavored Markdown from the Knowledge Graph. This Markdown can include\n * arbitrary HTML. Any HTML will be sanitized according to Rehype's default Schema.\n *\n * @remarks\n * A link click will send a CHAT_LINK_CLICK analytics event\n *\n * @internal\n */\nexport function Markdown({\n content,\n responseId,\n customCssClasses,\n linkClickEvent = \"CHAT_LINK_CLICK\",\n linkTarget,\n onLinkClick,\n}: MarkdownProps) {\n const reportAnalyticsEvent = useReportAnalyticsEvent();\n const cssClasses = useComposedCssClasses(builtInCssClasses, customCssClasses);\n\n const components: Options[\"components\"] = useMemo(() => {\n const createClickHandlerFn = (href?: string) => () => {\n reportAnalyticsEvent({\n action: linkClickEvent,\n destinationUrl: href,\n chat: {\n responseId,\n },\n });\n onLinkClick?.(href);\n };\n return {\n a: ({ node: _, children, ...props }) => {\n return (\n <a\n {...props}\n onClick={createClickHandlerFn(props.href)}\n target={linkTarget}\n rel=\"noopener noreferrer\"\n className={cssClasses.link}\n >\n {children}\n </a>\n );\n },\n };\n }, [\n reportAnalyticsEvent,\n linkClickEvent,\n responseId,\n cssClasses,\n linkTarget,\n onLinkClick,\n ]);\n\n return (\n <ReactMarkdown\n className={cssClasses.container}\n children={content}\n remarkPlugins={unifiedPlugins.remark}\n rehypePlugins={unifiedPlugins.rehype}\n components={components}\n />\n );\n}\n"],"names":["remarkGfm","rehypeRaw","rehypeSanitize","useReportAnalyticsEvent","useComposedCssClasses","useMemo","React","ReactMarkdown"],"mappings":";;;;;;;;;;;;;;;;;;AAQA;AACA,MAAM,cAAc,GAA4E;AAC9F,IAAA,MAAM,EAAE;AACN,QAAAA,0BAAS;AACV,KAAA;AACD,IAAA,MAAM,EAAE;QACNC,0BAAS;AACT,QAAAC,+BAAc;AACf,KAAA;CACF,CAAC;AAYF,MAAM,iBAAiB,GAAuB;AAC5C,IAAA,IAAI,EAAE,gBAAgB;CACvB,CAAC;AAoBF;;;;;;;;AAQG;SACa,QAAQ,CAAC,EACvB,OAAO,EACP,UAAU,EACV,gBAAgB,EAChB,cAAc,GAAG,iBAAiB,EAClC,UAAU,EACV,WAAW,GACG,EAAA;AACd,IAAA,MAAM,oBAAoB,GAAGC,+CAAuB,EAAE,CAAC;IACvD,MAAM,UAAU,GAAGC,2CAAqB,CAAC,iBAAiB,EAAE,gBAAgB,CAAC,CAAC;AAE9E,IAAA,MAAM,UAAU,GAA0BC,aAAO,CAAC,MAAK;QACrD,MAAM,oBAAoB,GAAG,CAAC,IAAa,KAAK,MAAK;AACnD,YAAA,oBAAoB,CAAC;AACnB,gBAAA,MAAM,EAAE,cAAc;AACtB,gBAAA,cAAc,EAAE,IAAI;AACpB,gBAAA,IAAI,EAAE;oBACJ,UAAU;AACX,iBAAA;AACF,aAAA,CAAC,CAAC;AACH,YAAA,WAAW,GAAG,IAAI,CAAC,CAAC;AACtB,SAAC,CAAC;QACF,OAAO;AACL,YAAA,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,KAAI;AACrC,gBAAA,QACEC,sBAAA,CAAA,aAAA,CAAA,GAAA,EAAA,EAAA,GACM,KAAK,EACT,OAAO,EAAE,oBAAoB,CAAC,KAAK,CAAC,IAAI,CAAC,EACzC,MAAM,EAAE,UAAU,EAClB,GAAG,EAAC,qBAAqB,EACzB,SAAS,EAAE,UAAU,CAAC,IAAI,EAAA,EAEzB,QAAQ,CACP,EACJ;aACH;SACF,CAAC;AACJ,KAAC,EAAE;QACD,oBAAoB;QACpB,cAAc;QACd,UAAU;QACV,UAAU;QACV,UAAU;QACV,WAAW;AACZ,KAAA,CAAC,CAAC;AAEH,IAAA,QACEA,sBAAA,CAAA,aAAA,CAACC,8BAAa,EAAA,EACZ,SAAS,EAAE,UAAU,CAAC,SAAS,EAC/B,QAAQ,EAAE,OAAO,EACjB,aAAa,EAAE,cAAc,CAAC,MAAM,EACpC,aAAa,EAAE,cAAc,CAAC,MAAM,EACpC,UAAU,EAAE,UAAU,EAAA,CACtB,EACF;AACJ;;;;"}
@@ -1,4 +1,4 @@
1
- var version = "0.11.0";
1
+ var version = "0.11.2";
2
2
 
3
3
  export { version };
4
4
  //# sourceMappingURL=package.json.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ChatInput.d.ts","sourceRoot":"","sources":["../../../../src/components/ChatInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;AASrD;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAaD;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,8DAA8D;IAC9D,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;OAGG;IACH,WAAW,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC,uCAAuC;IACvC,cAAc,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IAC7B,yDAAyD;IACzD,gBAAgB,CAAC,EAAE,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AAC,EACxB,WAAiC,EACjC,MAAc,EACd,cAAqB,EACrB,WAAW,EACX,cAA8B,EAC9B,gBAAgB,EAChB,MAAM,EACN,OAAO,GACR,EAAE,cAAc,qBAuEhB"}
@@ -23,7 +23,7 @@ const builtInCssClasses = withStylelessCssClasses("Input", {
23
23
  *
24
24
  * @param props - {@link ChatInputProps}
25
25
  */
26
- function ChatInput({ placeholder = "Type a message...", stream = false, inputAutoFocus = false, handleError, sendButtonIcon = React.createElement(ArrowIcon, null), customCssClasses, onSend, onRetry, }) {
26
+ function ChatInput({ placeholder = "Type a message...", stream = false, inputAutoFocus = true, handleError, sendButtonIcon = React.createElement(ArrowIcon, null), customCssClasses, onSend, onRetry, }) {
27
27
  const [input, setInput] = useState("");
28
28
  const canSendMessage = useChatState((state) => state.conversation.canSendMessage);
29
29
  const defaultHandleApiError = useDefaultHandleApiError();
@@ -1 +1 @@
1
- {"version":3,"file":"ChatInput.mjs","sources":["../../../../src/components/ChatInput.tsx"],"sourcesContent":["import React, { useCallback, useState } from \"react\";\nimport { useChatState } from \"@yext/chat-headless-react\";\nimport { ArrowIcon } from \"../icons/Arrow\";\nimport { useComposedCssClasses } from \"../hooks\";\nimport TextareaAutosize from \"react-textarea-autosize\";\nimport { useDefaultHandleApiError } from \"../hooks/useDefaultHandleApiError\";\nimport { withStylelessCssClasses } from \"../utils/withStylelessCssClasses\";\nimport { useSendMessageWithRetries } from \"../hooks/useSendMessageWithRetries\";\n\n/**\n * The CSS class interface for the {@link ChatInput} component.\n *\n * @public\n */\nexport interface ChatInputCssClasses {\n container?: string;\n textArea?: string;\n sendButton?: string;\n}\n\nconst builtInCssClasses: ChatInputCssClasses = withStylelessCssClasses(\n \"Input\",\n {\n container: \"w-full h-fit flex flex-row relative @container\",\n textArea:\n \"w-full p-4 pr-12 border border-slate-300 rounded-3xl resize-none text-[13px] @[480px]:text-base placeholder:text-[13px] placeholder:@[480px]:text-base text-slate-900\",\n sendButton:\n \"rounded-full p-1.5 w-8 h-8 stroke-2 text-white bg-blue-600 disabled:bg-slate-200 hover:bg-blue-800 active:scale-90 transition-all absolute right-4 bottom-2.5 @[480px]:bottom-3.5\",\n }\n);\n\n/**\n * The props for the {@link ChatInput} component.\n *\n * @public\n */\nexport interface ChatInputProps {\n /**\n * The input's placeholder text when no text has been entered by the user.\n * Defaults to \"Type a message...\".\n */\n placeholder?: string;\n /**\n * Enable streaming behavior by making a request to Chat Streaming API.\n * This feature is experimental, and is subject to change.\n * Defaults to false.\n */\n stream?: boolean;\n /** Enable auto focus for the input box. Defaults to false. */\n inputAutoFocus?: boolean;\n /**\n * A function which is called when an error occurs from Chat API while processing the user's message.\n * By default, the error is logged to the console and an error message is added to state.\n */\n handleError?: (e: unknown) => void;\n /** Custom icon for the send button. */\n sendButtonIcon?: JSX.Element;\n /** CSS classes for customizing the component styling. */\n customCssClasses?: ChatInputCssClasses;\n /** A callback which is called when user sends a message. */\n onSend?: (message: string) => void;\n /**\n * A function which is called when a retryable error occurs from\n * Chat API while processing the user's message.\n */\n onRetry?: (e: unknown) => void;\n}\n\n/**\n * A component that allows user to input message and send to Chat API.\n *\n * @remarks\n * Pressing \"Enter\" key will send the current message.\n * To add a newline, press \"Shift\" and \"Enter\".\n *\n * @public\n *\n * @param props - {@link ChatInputProps}\n */\nexport function ChatInput({\n placeholder = \"Type a message...\",\n stream = false,\n inputAutoFocus = false,\n handleError,\n sendButtonIcon = <ArrowIcon />,\n customCssClasses,\n onSend,\n onRetry,\n}: ChatInputProps) {\n const [input, setInput] = useState(\"\");\n const canSendMessage = useChatState(\n (state) => state.conversation.canSendMessage\n );\n const defaultHandleApiError = useDefaultHandleApiError();\n const sendMessageWithRetries = useSendMessageWithRetries(stream, 1, onRetry);\n const cssClasses = useComposedCssClasses(builtInCssClasses, customCssClasses);\n\n const sendMessage = useCallback(async () => {\n setInput(\"\");\n sendMessageWithRetries(input)\n .catch(handleError ?? defaultHandleApiError)\n .finally(() => {\n onSend?.(input);\n });\n }, [\n sendMessageWithRetries,\n input,\n handleError,\n defaultHandleApiError,\n onSend,\n ]);\n\n const handleKeyDown = useCallback(\n (e: React.KeyboardEvent<HTMLTextAreaElement>) => {\n if (\n !e.shiftKey &&\n e.key === \"Enter\" &&\n // The Japanese Keyboard uses \"Enter\" key to convert from Hiragana to Kanji.\n // \"isComposing\" is a flag that indicates whether the event is part of an ongoing composition session.\n // Safari does not support `isComposing` with the Japanese IME event,\n // so we have to additionally check for the keyCode to handle that edge case.\n !(e.nativeEvent.isComposing || e.keyCode === 229)\n ) {\n e.preventDefault();\n if (canSendMessage && input.trim().length !== 0) {\n sendMessage();\n }\n }\n },\n [sendMessage, canSendMessage, input]\n );\n\n const onInputChange = useCallback(\n (e: React.ChangeEvent<HTMLTextAreaElement>) => {\n setInput(e.target.value);\n },\n []\n );\n\n return (\n <div className={cssClasses.container}>\n <TextareaAutosize\n autoFocus={inputAutoFocus}\n onKeyDown={handleKeyDown}\n value={input}\n onChange={onInputChange}\n className={cssClasses.textArea}\n placeholder={placeholder}\n />\n <button\n aria-label=\"Send Message\"\n disabled={!canSendMessage || input.trim().length === 0}\n onClick={sendMessage}\n className={cssClasses.sendButton}\n >\n {sendButtonIcon}\n </button>\n </div>\n );\n}\n"],"names":[],"mappings":";;;;;;;;;AAoBA,MAAM,iBAAiB,GAAwB,uBAAuB,CACpE,OAAO,EACP;AACE,IAAA,SAAS,EAAE,gDAAgD;AAC3D,IAAA,QAAQ,EACN,uKAAuK;AACzK,IAAA,UAAU,EACR,mLAAmL;AACtL,CAAA,CACF,CAAC;AAuCF;;;;;;;;;;AAUG;AACa,SAAA,SAAS,CAAC,EACxB,WAAW,GAAG,mBAAmB,EACjC,MAAM,GAAG,KAAK,EACd,cAAc,GAAG,KAAK,EACtB,WAAW,EACX,cAAc,GAAG,KAAC,CAAA,aAAA,CAAA,SAAS,EAAG,IAAA,CAAA,EAC9B,gBAAgB,EAChB,MAAM,EACN,OAAO,GACQ,EAAA;IACf,MAAM,CAAC,KAAK,EAAE,QAA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,CAAC,CAAyC,KAAI;AAC5C,QAAA,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;KAC1B,EACD,EAAE,CACH,CAAC;AAEF,IAAA,QACE,KAAK,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,UAAU,CAAC,SAAS,EAAA;QAClC,KAAC,CAAA,aAAA,CAAA,gBAAgB,EACf,EAAA,SAAS,EAAE,cAAc,EACzB,SAAS,EAAE,aAAa,EACxB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,aAAa,EACvB,SAAS,EAAE,UAAU,CAAC,QAAQ,EAC9B,WAAW,EAAE,WAAW,EACxB,CAAA;AACF,QAAA,KAAA,CAAA,aAAA,CAAA,QAAA,EAAA,EAAA,YAAA,EACa,cAAc,EACzB,QAAQ,EAAE,CAAC,cAAc,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EACtD,OAAO,EAAE,WAAW,EACpB,SAAS,EAAE,UAAU,CAAC,UAAU,EAE/B,EAAA,cAAc,CACR,CACL,EACN;AACJ;;;;"}
1
+ {"version":3,"file":"ChatInput.mjs","sources":["../../../../src/components/ChatInput.tsx"],"sourcesContent":["import React, { useCallback, useState } from \"react\";\nimport { useChatState } from \"@yext/chat-headless-react\";\nimport { ArrowIcon } from \"../icons/Arrow\";\nimport { useComposedCssClasses } from \"../hooks\";\nimport TextareaAutosize from \"react-textarea-autosize\";\nimport { useDefaultHandleApiError } from \"../hooks/useDefaultHandleApiError\";\nimport { withStylelessCssClasses } from \"../utils/withStylelessCssClasses\";\nimport { useSendMessageWithRetries } from \"../hooks/useSendMessageWithRetries\";\n\n/**\n * The CSS class interface for the {@link ChatInput} component.\n *\n * @public\n */\nexport interface ChatInputCssClasses {\n container?: string;\n textArea?: string;\n sendButton?: string;\n}\n\nconst builtInCssClasses: ChatInputCssClasses = withStylelessCssClasses(\n \"Input\",\n {\n container: \"w-full h-fit flex flex-row relative @container\",\n textArea:\n \"w-full p-4 pr-12 border border-slate-300 rounded-3xl resize-none text-[13px] @[480px]:text-base placeholder:text-[13px] placeholder:@[480px]:text-base text-slate-900\",\n sendButton:\n \"rounded-full p-1.5 w-8 h-8 stroke-2 text-white bg-blue-600 disabled:bg-slate-200 hover:bg-blue-800 active:scale-90 transition-all absolute right-4 bottom-2.5 @[480px]:bottom-3.5\",\n }\n);\n\n/**\n * The props for the {@link ChatInput} component.\n *\n * @public\n */\nexport interface ChatInputProps {\n /**\n * The input's placeholder text when no text has been entered by the user.\n * Defaults to \"Type a message...\".\n */\n placeholder?: string;\n /**\n * Enable streaming behavior by making a request to Chat Streaming API.\n * This feature is experimental, and is subject to change.\n * Defaults to false.\n */\n stream?: boolean;\n /** Enable auto focus for the input box. Defaults to false. */\n inputAutoFocus?: boolean;\n /**\n * A function which is called when an error occurs from Chat API while processing the user's message.\n * By default, the error is logged to the console and an error message is added to state.\n */\n handleError?: (e: unknown) => void;\n /** Custom icon for the send button. */\n sendButtonIcon?: JSX.Element;\n /** CSS classes for customizing the component styling. */\n customCssClasses?: ChatInputCssClasses;\n /** A callback which is called when user sends a message. */\n onSend?: (message: string) => void;\n /**\n * A function which is called when a retryable error occurs from\n * Chat API while processing the user's message.\n */\n onRetry?: (e: unknown) => void;\n}\n\n/**\n * A component that allows user to input message and send to Chat API.\n *\n * @remarks\n * Pressing \"Enter\" key will send the current message.\n * To add a newline, press \"Shift\" and \"Enter\".\n *\n * @public\n *\n * @param props - {@link ChatInputProps}\n */\nexport function ChatInput({\n placeholder = \"Type a message...\",\n stream = false,\n inputAutoFocus = true,\n handleError,\n sendButtonIcon = <ArrowIcon />,\n customCssClasses,\n onSend,\n onRetry,\n}: ChatInputProps) {\n const [input, setInput] = useState(\"\");\n const canSendMessage = useChatState(\n (state) => state.conversation.canSendMessage\n );\n const defaultHandleApiError = useDefaultHandleApiError();\n const sendMessageWithRetries = useSendMessageWithRetries(stream, 1, onRetry);\n const cssClasses = useComposedCssClasses(builtInCssClasses, customCssClasses);\n\n const sendMessage = useCallback(async () => {\n setInput(\"\");\n sendMessageWithRetries(input)\n .catch(handleError ?? defaultHandleApiError)\n .finally(() => {\n onSend?.(input);\n });\n }, [\n sendMessageWithRetries,\n input,\n handleError,\n defaultHandleApiError,\n onSend,\n ]);\n\n const handleKeyDown = useCallback(\n (e: React.KeyboardEvent<HTMLTextAreaElement>) => {\n if (\n !e.shiftKey &&\n e.key === \"Enter\" &&\n // The Japanese Keyboard uses \"Enter\" key to convert from Hiragana to Kanji.\n // \"isComposing\" is a flag that indicates whether the event is part of an ongoing composition session.\n // Safari does not support `isComposing` with the Japanese IME event,\n // so we have to additionally check for the keyCode to handle that edge case.\n !(e.nativeEvent.isComposing || e.keyCode === 229)\n ) {\n e.preventDefault();\n if (canSendMessage && input.trim().length !== 0) {\n sendMessage();\n }\n }\n },\n [sendMessage, canSendMessage, input]\n );\n\n const onInputChange = useCallback(\n (e: React.ChangeEvent<HTMLTextAreaElement>) => {\n setInput(e.target.value);\n },\n []\n );\n\n return (\n <div className={cssClasses.container}>\n <TextareaAutosize\n autoFocus={inputAutoFocus}\n onKeyDown={handleKeyDown}\n value={input}\n onChange={onInputChange}\n className={cssClasses.textArea}\n placeholder={placeholder}\n />\n <button\n aria-label=\"Send Message\"\n disabled={!canSendMessage || input.trim().length === 0}\n onClick={sendMessage}\n className={cssClasses.sendButton}\n >\n {sendButtonIcon}\n </button>\n </div>\n );\n}\n"],"names":[],"mappings":";;;;;;;;;AAoBA,MAAM,iBAAiB,GAAwB,uBAAuB,CACpE,OAAO,EACP;AACE,IAAA,SAAS,EAAE,gDAAgD;AAC3D,IAAA,QAAQ,EACN,uKAAuK;AACzK,IAAA,UAAU,EACR,mLAAmL;AACtL,CAAA,CACF,CAAC;AAuCF;;;;;;;;;;AAUG;AACa,SAAA,SAAS,CAAC,EACxB,WAAW,GAAG,mBAAmB,EACjC,MAAM,GAAG,KAAK,EACd,cAAc,GAAG,IAAI,EACrB,WAAW,EACX,cAAc,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AE,CAAC;AACf,aAAA;AACF,SAAA;KACF,EACD,CAAC,WAAW,EAAE,cAAc,EAAE,KAAK,CAAC,CACrC,CAAC;AAEF,IAAA,MAAM,aAAa,GAAG,WAAW,CAC/B,CAAC,CAAyC,KAAI;AAC5C,QAAA,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;KAC1B,EACD,EAAE,CACH,CAAC;AAEF,IAAA,QACE,KAAK,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,UAAU,CAAC,SAAS,EAAA;QAClC,KAAC,CAAA,aAAA,CAAA,gBAAgB,EACf,EAAA,SAAS,EAAE,cAAc,EACzB,SAAS,EAAE,aAAa,EACxB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,aAAa,EACvB,SAAS,EAAE,UAAU,CAAC,QAAQ,EAC9B,WAAW,EAAE,WAAW,EACxB,CAAA;AACF,QAAA,KAAA,CAAA,aAAA,CAAA,QAAA,EAAA,EAAA,YAAA,EACa,cAAc,EACzB,QAAQ,EAAE,CAAC,cAAc,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EACtD,OAAO,EAAE,WAAW,EACpB,SAAS,EAAE,UAAU,CAAC,UAAU,EAE/B,EAAA,cAAc,CACR,CACL,EACN;AACJ;;;;"}
@@ -8,7 +8,7 @@ import { useComposedCssClasses } from '../hooks/useComposedCssClasses.mjs';
8
8
  import { useReportAnalyticsEvent } from '../hooks/useReportAnalyticsEvent.mjs';
9
9
 
10
10
  const builtInCssClasses = withStylelessCssClasses("FeedbackButtons", {
11
- container: "flex gap-x-1 absolute -right-1 -top-3 opacity-0 group-hover:opacity-100 duration-200",
11
+ container: "flex gap-x-1 absolute -right-1 -top-3 [@media(hover:hover)]:opacity-0 group-hover:opacity-100 duration-200",
12
12
  thumbsUpButton: "w-6 h-6 bg-gray-700 rounded-md flex justify-center items-center",
13
13
  thumbsUpIcon: "text-white w-[22px] h-[22px] stroke-[0.2]",
14
14
  thumbsUpFillIcon: "text-white w-[22px] h-[22px] stroke-[0.2]",
@@ -1 +1 @@
1
- {"version":3,"file":"FeedbackButtons.mjs","sources":["../../../../src/components/FeedbackButtons.tsx"],"sourcesContent":["import { ThumbsDownIcon } from \"../icons/ThumbsDown\";\nimport { ThumbsUpIcon } from \"../icons/ThumbsUp\";\nimport React, { useCallback, useState } from \"react\";\nimport { ThumbsUpFillIcon } from \"../icons/ThumbsUpFill\";\nimport { ThumbsDownFillIcon } from \"../icons/ThumbsDownFill\";\nimport { withStylelessCssClasses } from \"../utils/withStylelessCssClasses\";\nimport { useComposedCssClasses } from \"../hooks\";\nimport { useReportAnalyticsEvent } from \"../hooks/useReportAnalyticsEvent\";\n\n/**\n * The CSS class interface for the FeedbackButtons component.\n *\n * @public\n */\nexport interface FeedbackButtonsCssClasses {\n container?: string;\n thumbsUpButton?: string;\n thumbsUpIcon?: string;\n thumbsUpFillIcon?: string;\n thumbsDownButton?: string;\n thumbsDownIcon?: string;\n thumbsDownFillIcon?: string;\n}\n\nconst builtInCssClasses: FeedbackButtonsCssClasses =\n withStylelessCssClasses<FeedbackButtonsCssClasses>(\"FeedbackButtons\", {\n container:\n \"flex gap-x-1 absolute -right-1 -top-3 opacity-0 group-hover:opacity-100 duration-200\",\n thumbsUpButton:\n \"w-6 h-6 bg-gray-700 rounded-md flex justify-center items-center\",\n thumbsUpIcon: \"text-white w-[22px] h-[22px] stroke-[0.2]\",\n thumbsUpFillIcon: \"text-white w-[22px] h-[22px] stroke-[0.2]\",\n thumbsDownButton:\n \"w-6 h-6 bg-gray-700 rounded-md flex justify-center items-center\",\n thumbsDownIcon: \"text-white w-[22px] h-[22px] stroke-[0.2]\",\n thumbsDownFillIcon: \"text-white w-[22px] h-[22px] stroke-[0.2]\",\n });\n\n/**\n * The props for the FeedbackButtons component.\n *\n * @internal\n */\ninterface FeedbackButtonsProps {\n /** The response ID correlates to the current message to give feedback on. */\n responseId?: string;\n /** CSS classes for customizing the component styling. */\n customCssClasses?: FeedbackButtonsCssClasses;\n}\n\n/**\n * Displays feedback buttons (e.g. thumbs up and thumbs down) that will\n * report analytic events on click.\n *\n * @internal\n */\nexport function FeedbackButtons({\n customCssClasses,\n responseId,\n}: FeedbackButtonsProps) {\n const reportAnalyticsEvent = useReportAnalyticsEvent();\n const cssClasses = useComposedCssClasses(builtInCssClasses, customCssClasses);\n const [selectedThumb, setSelectedThumb] = useState<\n \"UP\" | \"DOWN\" | undefined\n >();\n const onClickThumbsUp = useCallback(() => {\n setSelectedThumb(\"UP\");\n reportAnalyticsEvent({\n action: \"THUMBS_UP\",\n chat: {\n responseId,\n },\n });\n }, [reportAnalyticsEvent, responseId]);\n\n const onClickThumbsDown = useCallback(() => {\n setSelectedThumb(\"DOWN\");\n reportAnalyticsEvent({\n action: \"THUMBS_DOWN\",\n chat: {\n responseId,\n },\n });\n }, [reportAnalyticsEvent, responseId]);\n\n return (\n <div className={cssClasses.container}>\n <button className={cssClasses.thumbsUpButton} onClick={onClickThumbsUp}>\n {selectedThumb === \"UP\" ? (\n <ThumbsUpFillIcon className={cssClasses.thumbsUpFillIcon} />\n ) : (\n <ThumbsUpIcon className={cssClasses.thumbsUpIcon} />\n )}\n </button>\n <button\n className={cssClasses.thumbsDownButton}\n onClick={onClickThumbsDown}\n >\n {selectedThumb === \"DOWN\" ? (\n <ThumbsDownFillIcon className={cssClasses.thumbsDownFillIcon} />\n ) : (\n <ThumbsDownIcon className={cssClasses.thumbsDownIcon} />\n )}\n </button>\n </div>\n );\n}\n"],"names":[],"mappings":";;;;;;;;;AAwBA,MAAM,iBAAiB,GACrB,uBAAuB,CAA4B,iBAAiB,EAAE;AACpE,IAAA,SAAS,EACP,sFAAsF;AACxF,IAAA,cAAc,EACZ,iEAAiE;AACnE,IAAA,YAAY,EAAE,2CAA2C;AACzD,IAAA,gBAAgB,EAAE,2CAA2C;AAC7D,IAAA,gBAAgB,EACd,iEAAiE;AACnE,IAAA,cAAc,EAAE,2CAA2C;A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AAE,UAAU,CAAC,YAAY,EAAA,CAAI,CACrD,CACM;QACT,KACE,CAAA,aAAA,CAAA,QAAA,EAAA,EAAA,SAAS,EAAE,UAAU,CAAC,gBAAgB,EACtC,OAAO,EAAE,iBAAiB,EAAA,EAEzB,aAAa,KAAK,MAAM,IACvB,KAAC,CAAA,aAAA,CAAA,kBAAkB,IAAC,SAAS,EAAE,UAAU,CAAC,kBAAkB,GAAI,KAEhE,oBAAC,cAAc,EAAA,EAAC,SAAS,EAAE,UAAU,CAAC,cAAc,EAAA,CAAI,CACzD,CACM,CACL,EACN;AACJ;;;;"}
1
+ {"version":3,"file":"FeedbackButtons.mjs","sources":["../../../../src/components/FeedbackButtons.tsx"],"sourcesContent":["import { ThumbsDownIcon } from \"../icons/ThumbsDown\";\nimport { ThumbsUpIcon } from \"../icons/ThumbsUp\";\nimport React, { useCallback, useState } from \"react\";\nimport { ThumbsUpFillIcon } from \"../icons/ThumbsUpFill\";\nimport { ThumbsDownFillIcon } from \"../icons/ThumbsDownFill\";\nimport { withStylelessCssClasses } from \"../utils/withStylelessCssClasses\";\nimport { useComposedCssClasses } from \"../hooks\";\nimport { useReportAnalyticsEvent } from \"../hooks/useReportAnalyticsEvent\";\n\n/**\n * The CSS class interface for the FeedbackButtons component.\n *\n * @public\n */\nexport interface FeedbackButtonsCssClasses {\n container?: string;\n thumbsUpButton?: string;\n thumbsUpIcon?: string;\n thumbsUpFillIcon?: string;\n thumbsDownButton?: string;\n thumbsDownIcon?: string;\n thumbsDownFillIcon?: string;\n}\n\nconst builtInCssClasses: FeedbackButtonsCssClasses =\n withStylelessCssClasses<FeedbackButtonsCssClasses>(\"FeedbackButtons\", {\n container:\n \"flex gap-x-1 absolute -right-1 -top-3 [@media(hover:hover)]:opacity-0 group-hover:opacity-100 duration-200\",\n thumbsUpButton:\n \"w-6 h-6 bg-gray-700 rounded-md flex justify-center items-center\",\n thumbsUpIcon: \"text-white w-[22px] h-[22px] stroke-[0.2]\",\n thumbsUpFillIcon: \"text-white w-[22px] h-[22px] stroke-[0.2]\",\n thumbsDownButton:\n \"w-6 h-6 bg-gray-700 rounded-md flex justify-center items-center\",\n thumbsDownIcon: \"text-white w-[22px] h-[22px] stroke-[0.2]\",\n thumbsDownFillIcon: \"text-white w-[22px] h-[22px] stroke-[0.2]\",\n });\n\n/**\n * The props for the FeedbackButtons component.\n *\n * @internal\n */\ninterface FeedbackButtonsProps {\n /** The response ID correlates to the current message to give feedback on. */\n responseId?: string;\n /** CSS classes for customizing the component styling. */\n customCssClasses?: FeedbackButtonsCssClasses;\n}\n\n/**\n * Displays feedback buttons (e.g. thumbs up and thumbs down) that will\n * report analytic events on click.\n *\n * @internal\n */\nexport function FeedbackButtons({\n customCssClasses,\n responseId,\n}: FeedbackButtonsProps) {\n const reportAnalyticsEvent = useReportAnalyticsEvent();\n const cssClasses = useComposedCssClasses(builtInCssClasses, customCssClasses);\n const [selectedThumb, setSelectedThumb] = useState<\n \"UP\" | \"DOWN\" | undefined\n >();\n const onClickThumbsUp = useCallback(() => {\n setSelectedThumb(\"UP\");\n reportAnalyticsEvent({\n action: \"THUMBS_UP\",\n chat: {\n responseId,\n },\n });\n }, [reportAnalyticsEvent, responseId]);\n\n const onClickThumbsDown = useCallback(() => {\n setSelectedThumb(\"DOWN\");\n reportAnalyticsEvent({\n action: \"THUMBS_DOWN\",\n chat: {\n responseId,\n },\n });\n }, [reportAnalyticsEvent, responseId]);\n\n return (\n <div className={cssClasses.container}>\n <button className={cssClasses.thumbsUpButton} onClick={onClickThumbsUp}>\n {selectedThumb === \"UP\" ? (\n <ThumbsUpFillIcon className={cssClasses.thumbsUpFillIcon} />\n ) : (\n <ThumbsUpIcon className={cssClasses.thumbsUpIcon} />\n )}\n </button>\n <button\n className={cssClasses.thumbsDownButton}\n onClick={onClickThumbsDown}\n >\n {selectedThumb === \"DOWN\" ? (\n <ThumbsDownFillIcon className={cssClasses.thumbsDownFillIcon} />\n ) : (\n <ThumbsDownIcon className={cssClasses.thumbsDownI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AyD;IACzD,WAAW,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CACvC;AAED;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,CAAC,EACvB,OAAO,EACP,UAAU,EACV,gBAAgB,EAChB,cAAkC,EAClC,UAAU,EACV,WAAW,GACZ,EAAE,aAAa,qBAgDf"}
1
+ {"version":3,"file":"Markdown.d.ts","sourceRoot":"","sources":["../../../../src/components/Markdown.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAevC;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAMD,UAAU,aAAa;IACrB,4BAA4B;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,yDAAyD;IACzD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,yDAAyD;IACzD,gBAAgB,CAAC,EAAE,kBAAkB,CAAC;IACtC;;;OAGG;IACH,cAAc,CAAC,EAAE,SAAS,GAAG,iBAAiB,CAAC;IAC/C,0CAA0C;IAC1C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,yDAAyD;IACzD,WAAW,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CACvC;AAED;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,CAAC,EACvB,OAAO,EACP,UAAU,EACV,gBAAgB,EAChB,cAAkC,EAClC,UAAU,EACV,WAAW,GACZ,EAAE,aAAa,qBAgDf"}
@@ -1 +1 @@
1
- {"version":3,"file":"Markdown.mjs","sources":["../../../../src/components/Markdown.tsx"],"sourcesContent":["import ReactMarkdown, {\n PluggableList,\n ReactMarkdownOptions,\n} from \"react-markdown\";\nimport remarkGfm from \"remark-gfm\";\nimport rehypeRaw from \"rehype-raw\";\nimport rehypeSanitize from \"rehype-sanitize\";\nimport React, { useMemo } from \"react\";\nimport { useReportAnalyticsEvent } from \"../hooks/useReportAnalyticsEvent\";\nimport { useComposedCssClasses } from \"../hooks/useComposedCssClasses\";\n\n// The Remark and Rehype plugins to use in conjunction with ReactMarkdown.\nconst unifiedPlugins: { remark?: PluggableList; rehype: PluggableList } = {\n remark: [\n remarkGfm, //renders Github-Flavored Markdown\n ],\n rehype: [\n rehypeRaw, //to support HTML embedded in markdown\n rehypeSanitize, //to sanitize HTML content\n ],\n};\n\n/**\n * The CSS class interface for the Markdown component.\n *\n * @internal\n */\nexport interface MarkdownCssClasses {\n container?: string;\n link?: string;\n}\n\nconst builtInCssClasses: MarkdownCssClasses = {\n link: \"cursor-pointer\",\n};\n\ninterface MarkdownProps {\n /** Stringified markdown. */\n content: string;\n /** The response ID correlates to the current message. */\n responseId?: string;\n /** CSS classes for customizing the component styling. */\n customCssClasses?: MarkdownCssClasses;\n /**\n * Action to report for analytics event when a link is clicked.\n * Defaults to 'CHAT_LINK_CLICK'.\n */\n linkClickEvent?: \"WEBSITE\" | \"CHAT_LINK_CLICK\";\n /** Link target open behavior on click. */\n linkTarget?: string;\n /** A callback which is called when a link is clicked. */\n onLinkClick?: (href?: string) => void;\n}\n\n/**\n * Renders Github-Flavored Markdown from the Knowledge Graph. This Markdown can include\n * arbitrary HTML. Any HTML will be sanitized according to Rehype's default Schema.\n *\n * @remarks\n * A link click will send a CHAT_LINK_CLICK analytics event\n *\n * @internal\n */\nexport function Markdown({\n content,\n responseId,\n customCssClasses,\n linkClickEvent = \"CHAT_LINK_CLICK\",\n linkTarget,\n onLinkClick,\n}: MarkdownProps) {\n const reportAnalyticsEvent = useReportAnalyticsEvent();\n const cssClasses = useComposedCssClasses(builtInCssClasses, customCssClasses);\n\n const components: ReactMarkdownOptions[\"components\"] = useMemo(() => {\n const createClickHandlerFn = (href?: string) => () => {\n reportAnalyticsEvent({\n action: linkClickEvent,\n destinationUrl: href,\n chat: {\n responseId,\n },\n });\n onLinkClick?.(href);\n };\n return {\n a: ({ node: _, children, ...props }) => {\n return (\n <a\n {...props}\n onClick={createClickHandlerFn(props.href)}\n target={linkTarget}\n rel=\"noopener noreferrer\"\n className={cssClasses.link}\n >\n {children}\n </a>\n );\n },\n };\n }, [\n reportAnalyticsEvent,\n linkClickEvent,\n responseId,\n cssClasses,\n linkTarget,\n onLinkClick,\n ]);\n\n return (\n <ReactMarkdown\n className={cssClasses.container}\n children={content}\n remarkPlugins={unifiedPlugins.remark}\n rehypePlugins={unifiedPlugins.rehype}\n components={components}\n />\n );\n}\n"],"names":[],"mappings":";;;;;;;;AAWA;AACA,MAAM,cAAc,GAAsD;AACxE,IAAA,MAAM,EAAE;AACN,QAAA,SAAS;AACV,KAAA;AACD,IAAA,MAAM,EAAE;QACN,SAAS;AACT,QAAA,cAAc;AACf,KAAA;CACF,CAAC;AAYF,MAAM,iBAAiB,GAAuB;AAC5C,IAAA,IAAI,EAAE,gBAAgB;CACvB,CAAC;AAoBF;;;;;;;;AAQG;SACa,QAAQ,CAAC,EACvB,OAAO,EACP,UAAU,EACV,gBAAgB,EAChB,cAAc,GAAG,iBAAiB,EAClC,UAAU,EACV,WAAW,GACG,EAAA;AACd,IAAA,MAAM,oBAAoB,GAAG,uBAAuB,EAAE,CAAC;IACvD,MAAM,UAAU,GAAG,qBAAqB,CAAC,iBAAiB,EAAE,gBAAgB,CAAC,CAAC;AAE9E,IAAA,MAAM,UAAU,GAAuC,OAAO,CAAC,MAAK;QAClE,MAAM,oBAAoB,GAAG,CAAC,IAAa,KAAK,MAAK;AACnD,YAAA,oBAAoB,CAAC;AACnB,gBAAA,MAAM,EAAE,cAAc;AACtB,gBAAA,cAAc,EAAE,IAAI;AACpB,gBAAA,IAAI,EAAE;oBACJ,UAAU;AACX,iBAAA;AACF,aAAA,CAAC,CAAC;AACH,YAAA,WAAW,GAAG,IAAI,CAAC,CAAC;AACtB,SAAC,CAAC;QACF,OAAO;AACL,YAAA,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,KAAI;AACrC,gBAAA,QACE,KAAA,CAAA,aAAA,CAAA,GAAA,EAAA,EAAA,GACM,KAAK,EACT,OAAO,EAAE,oBAAoB,CAAC,KAAK,CAAC,IAAI,CAAC,EACzC,MAAM,EAAE,UAAU,EAClB,GAAG,EAAC,qBAAqB,EACzB,SAAS,EAAE,UAAU,CAAC,IAAI,EAAA,EAEzB,QAAQ,CACP,EACJ;aACH;SACF,CAAC;AACJ,KAAC,EAAE;QACD,oBAAoB;QACpB,cAAc;QACd,UAAU;QACV,UAAU;QACV,UAAU;QACV,WAAW;AACZ,KAAA,CAAC,CAAC;AAEH,IAAA,QACE,KAAA,CAAA,aAAA,CAAC,aAAa,EAAA,EACZ,SAAS,EAAE,UAAU,CAAC,SAAS,EAC/B,QAAQ,EAAE,OAAO,EACjB,aAAa,EAAE,cAAc,CAAC,MAAM,EACpC,aAAa,EAAE,cAAc,CAAC,MAAM,EACpC,UAAU,EAAE,UAAU,EAAA,CACtB,EACF;AACJ;;;;"}
1
+ {"version":3,"file":"Markdown.mjs","sources":["../../../../src/components/Markdown.tsx"],"sourcesContent":["import ReactMarkdown, { Options } from \"react-markdown\";\nimport remarkGfm from \"remark-gfm\";\nimport rehypeRaw from \"rehype-raw\";\nimport rehypeSanitize from \"rehype-sanitize\";\nimport React, { useMemo } from \"react\";\nimport { useReportAnalyticsEvent } from \"../hooks/useReportAnalyticsEvent\";\nimport { useComposedCssClasses } from \"../hooks/useComposedCssClasses\";\n\n// The Remark and Rehype plugins to use in conjunction with ReactMarkdown.\nconst unifiedPlugins: { remark?: Options['remarkPlugins']; rehype: Options['rehypePlugins'] } = {\n remark: [\n remarkGfm, //renders Github-Flavored Markdown\n ],\n rehype: [\n rehypeRaw, //to support HTML embedded in markdown\n rehypeSanitize, //to sanitize HTML content\n ],\n};\n\n/**\n * The CSS class interface for the Markdown component.\n *\n * @internal\n */\nexport interface MarkdownCssClasses {\n container?: string;\n link?: string;\n}\n\nconst builtInCssClasses: MarkdownCssClasses = {\n link: \"cursor-pointer\",\n};\n\ninterface MarkdownProps {\n /** Stringified markdown. */\n content: string;\n /** The response ID correlates to the current message. */\n responseId?: string;\n /** CSS classes for customizing the component styling. */\n customCssClasses?: MarkdownCssClasses;\n /**\n * Action to report for analytics event when a link is clicked.\n * Defaults to 'CHAT_LINK_CLICK'.\n */\n linkClickEvent?: \"WEBSITE\" | \"CHAT_LINK_CLICK\";\n /** Link target open behavior on click. */\n linkTarget?: string;\n /** A callback which is called when a link is clicked. */\n onLinkClick?: (href?: string) => void;\n}\n\n/**\n * Renders Github-Flavored Markdown from the Knowledge Graph. This Markdown can include\n * arbitrary HTML. Any HTML will be sanitized according to Rehype's default Schema.\n *\n * @remarks\n * A link click will send a CHAT_LINK_CLICK analytics event\n *\n * @internal\n */\nexport function Markdown({\n content,\n responseId,\n customCssClasses,\n linkClickEvent = \"CHAT_LINK_CLICK\",\n linkTarget,\n onLinkClick,\n}: MarkdownProps) {\n const reportAnalyticsEvent = useReportAnalyticsEvent();\n const cssClasses = useComposedCssClasses(builtInCssClasses, customCssClasses);\n\n const components: Options[\"components\"] = useMemo(() => {\n const createClickHandlerFn = (href?: string) => () => {\n reportAnalyticsEvent({\n action: linkClickEvent,\n destinationUrl: href,\n chat: {\n responseId,\n },\n });\n onLinkClick?.(href);\n };\n return {\n a: ({ node: _, children, ...props }) => {\n return (\n <a\n {...props}\n onClick={createClickHandlerFn(props.href)}\n target={linkTarget}\n rel=\"noopener noreferrer\"\n className={cssClasses.link}\n >\n {children}\n </a>\n );\n },\n };\n }, [\n reportAnalyticsEvent,\n linkClickEvent,\n responseId,\n cssClasses,\n linkTarget,\n onLinkClick,\n ]);\n\n return (\n <ReactMarkdown\n className={cssClasses.container}\n children={content}\n remarkPlugins={unifiedPlugins.remark}\n rehypePlugins={unifiedPlugins.rehype}\n components={components}\n />\n );\n}\n"],"names":[],"mappings":";;;;;;;;AAQA;AACA,MAAM,cAAc,GAA4E;AAC9F,IAAA,MA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CAAC,CAAC;AAEH,IAAA,QACE,KAAA,CAAA,aAAA,CAAC,aAAa,EAAA,EACZ,SAAS,EAAE,UAAU,CAAC,SAAS,EAC/B,QAAQ,EAAE,OAAO,EACjB,aAAa,EAAE,cAAc,CAAC,MAAM,EACpC,aAAa,EAAE,cAAc,CAAC,MAAM,EACpC,UAAU,EAAE,UAAU,EAAA,CACtB,EACF;AACJ;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yext/chat-ui-react",
3
- "version": "0.11.0",
3
+ "version": "0.11.2",
4
4
  "description": "A library of React Components for powering Yext Chat integrations.",
5
5
  "author": "clippy@yext.com",
6
6
  "main": "./lib/commonjs/src/index.js",
@@ -96,7 +96,7 @@
96
96
  "react-dom": "^16.14 || ^17 || || ^18"
97
97
  },
98
98
  "dependencies": {
99
- "react-markdown": "^6.0.3",
99
+ "react-markdown": "^8.0.7",
100
100
  "react-textarea-autosize": "^8.5.3",
101
101
  "rehype-raw": "^5.0.0",
102
102
  "rehype-sanitize": "^4.0.0",
@@ -80,7 +80,7 @@ export interface ChatInputProps {
80
80
  export function ChatInput({
81
81
  placeholder = "Type a message...",
82
82
  stream = false,
83
- inputAutoFocus = false,
83
+ inputAutoFocus = true,
84
84
  handleError,
85
85
  sendButtonIcon = <ArrowIcon />,
86
86
  customCssClasses,
@@ -25,7 +25,7 @@ export interface FeedbackButtonsCssClasses {
25
25
  const builtInCssClasses: FeedbackButtonsCssClasses =
26
26
  withStylelessCssClasses<FeedbackButtonsCssClasses>("FeedbackButtons", {
27
27
  container:
28
- "flex gap-x-1 absolute -right-1 -top-3 opacity-0 group-hover:opacity-100 duration-200",
28
+ "flex gap-x-1 absolute -right-1 -top-3 [@media(hover:hover)]:opacity-0 group-hover:opacity-100 duration-200",
29
29
  thumbsUpButton:
30
30
  "w-6 h-6 bg-gray-700 rounded-md flex justify-center items-center",
31
31
  thumbsUpIcon: "text-white w-[22px] h-[22px] stroke-[0.2]",
@@ -1,7 +1,4 @@
1
- import ReactMarkdown, {
2
- PluggableList,
3
- ReactMarkdownOptions,
4
- } from "react-markdown";
1
+ import ReactMarkdown, { Options } from "react-markdown";
5
2
  import remarkGfm from "remark-gfm";
6
3
  import rehypeRaw from "rehype-raw";
7
4
  import rehypeSanitize from "rehype-sanitize";
@@ -10,7 +7,7 @@ import { useReportAnalyticsEvent } from "../hooks/useReportAnalyticsEvent";
10
7
  import { useComposedCssClasses } from "../hooks/useComposedCssClasses";
11
8
 
12
9
  // The Remark and Rehype plugins to use in conjunction with ReactMarkdown.
13
- const unifiedPlugins: { remark?: PluggableList; rehype: PluggableList } = {
10
+ const unifiedPlugins: { remark?: Options['remarkPlugins']; rehype: Options['rehypePlugins'] } = {
14
11
  remark: [
15
12
  remarkGfm, //renders Github-Flavored Markdown
16
13
  ],
@@ -72,7 +69,7 @@ export function Markdown({
72
69
  const reportAnalyticsEvent = useReportAnalyticsEvent();
73
70
  const cssClasses = useComposedCssClasses(builtInCssClasses, customCssClasses);
74
71
 
75
- const components: ReactMarkdownOptions["components"] = useMemo(() => {
72
+ const components: Options["components"] = useMemo(() => {
76
73
  const createClickHandlerFn = (href?: string) => () => {
77
74
  reportAnalyticsEvent({
78
75
  action: linkClickEvent,