@brainfish-ai/components 0.16.6 → 0.16.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/chunks/{ChatSearch.WhL-weaN.js → ChatSearch.BwlMSUvG.js} +27 -3
- package/dist/esm/chunks/{ChatSearch.WhL-weaN.js.map → ChatSearch.BwlMSUvG.js.map} +1 -1
- package/dist/esm/components/chat-search.js +1 -1
- package/dist/esm/index.css +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/stats.html +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import React__default, { useState, useCallback, useMemo, createContext, useContext, Fragment, useRef, useEffect, forwardRef, useImperativeHandle } from 'react';
|
|
2
2
|
import { motion, AnimatePresence } from 'framer-motion';
|
|
3
|
+
import rehypeRaw from 'rehype-raw';
|
|
4
|
+
import remarkGfm from 'remark-gfm';
|
|
3
5
|
import { TooltipProvider, Tooltip, TooltipTrigger, TooltipContent } from '../components/ui/tooltip.js';
|
|
4
6
|
import { Button } from '../components/ui/button.js';
|
|
5
7
|
import { XCircle, Check, Copy, CaretDown, ArrowSquareOut, CaretRight, ArrowsVertical, ArrowDown, Globe, LockSimple, MagnifyingGlass, X, Image, ArrowRight, ArrowLeft, ArrowsInSimple, ArrowsOutSimple } from '@phosphor-icons/react';
|
|
6
|
-
import { F as FormattedMessage, c as addPopupWidgetUtm } from './FormattedMessage.DdZqirSo.js';
|
|
8
|
+
import { F as FormattedMessage, c as addPopupWidgetUtm, M as MemoizedReactMarkdown } from './FormattedMessage.DdZqirSo.js';
|
|
7
9
|
import { appendErrors, useForm, Controller } from 'react-hook-form';
|
|
8
10
|
import { validateFieldsNatively, toNestErrors } from '@hookform/resolvers';
|
|
9
11
|
import require$$0 from 'ajv';
|
|
@@ -5417,6 +5419,11 @@ function useAutocomplete({
|
|
|
5417
5419
|
return { suggestions, isLoading, error };
|
|
5418
5420
|
}
|
|
5419
5421
|
|
|
5422
|
+
const markdownRemarkPlugins = [remarkGfm];
|
|
5423
|
+
const markdownRehypePlugins = [rehypeRaw];
|
|
5424
|
+
const markdownComponents = {
|
|
5425
|
+
p: ({ children }) => /* @__PURE__ */ React__default.createElement("span", null, children)
|
|
5426
|
+
};
|
|
5420
5427
|
const ChatSearchComponent = forwardRef(
|
|
5421
5428
|
({
|
|
5422
5429
|
suggestions: initialSuggestions = [],
|
|
@@ -6138,7 +6145,24 @@ const ChatSearchComponent = forwardRef(
|
|
|
6138
6145
|
},
|
|
6139
6146
|
offset
|
|
6140
6147
|
}
|
|
6141
|
-
)), disclaimer && isWidgetMode && !(showResults && showFollowUp) && /* @__PURE__ */ React__default.createElement(
|
|
6148
|
+
)), disclaimer && isWidgetMode && !(showResults && showFollowUp) && /* @__PURE__ */ React__default.createElement(
|
|
6149
|
+
"div",
|
|
6150
|
+
{
|
|
6151
|
+
"data-name": "disclaimer",
|
|
6152
|
+
className: "mt-2 px-3 @3xl:px-0 text-xs text-dark-500 dark:text-dark-400 flex items-center gap-1 absolute bottom-12 justify-center text-center w-full md:static md:mt-4 md:text-left md:flex md:gap-4 leading-5"
|
|
6153
|
+
},
|
|
6154
|
+
/* @__PURE__ */ React__default.createElement(MemoizedIcon, { iconName: "Info", className: "size-4" }),
|
|
6155
|
+
/* @__PURE__ */ React__default.createElement(
|
|
6156
|
+
MemoizedReactMarkdown,
|
|
6157
|
+
{
|
|
6158
|
+
className: "[&_a]:underline [&_a:hover]:no-underline",
|
|
6159
|
+
remarkPlugins: markdownRemarkPlugins,
|
|
6160
|
+
rehypePlugins: markdownRehypePlugins,
|
|
6161
|
+
components: markdownComponents
|
|
6162
|
+
},
|
|
6163
|
+
disclaimer
|
|
6164
|
+
)
|
|
6165
|
+
), /* @__PURE__ */ React__default.createElement("div", { ref: bottomRef })),
|
|
6142
6166
|
showResults && showFollowUp && /* @__PURE__ */ React__default.createElement(
|
|
6143
6167
|
FollowUpSearchBar,
|
|
6144
6168
|
{
|
|
@@ -6159,4 +6183,4 @@ const ChatSearch = forwardRef(({ featureFlags, ...props }, ref) => /* @__PURE__
|
|
|
6159
6183
|
ChatSearch.displayName = "ChatSearch";
|
|
6160
6184
|
|
|
6161
6185
|
export { ChatSearch as C, ChatSearchProvider as a, useIsChatSearchDirty as b, useChatSearch as u };
|
|
6162
|
-
//# sourceMappingURL=ChatSearch.
|
|
6186
|
+
//# sourceMappingURL=ChatSearch.BwlMSUvG.js.map
|