@inkeep/agents-ui 0.14.20 → 0.14.21
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/color-mode/index.d.ts +21 -0
- package/dist/index.d.ts +1 -5103
- package/dist/primitives/atoms/avatars/ai.d.ts +3 -0
- package/dist/primitives/atoms/avatars/user.d.ts +3 -0
- package/dist/primitives/atoms/cmdk/command-score.d.ts +1 -0
- package/dist/primitives/atoms/cmdk/index.d.ts +460 -0
- package/dist/primitives/atoms/codeblock/index.d.ts +10 -0
- package/dist/primitives/atoms/custom-styles.d.ts +5 -0
- package/dist/primitives/atoms/dialog.d.ts +94 -0
- package/dist/primitives/atoms/error-boundary.d.ts +6 -0
- package/dist/primitives/atoms/icons/built-in-icon-renderer.d.ts +6 -0
- package/dist/primitives/atoms/icons/built-in-icons.d.ts +83 -0
- package/dist/primitives/atoms/icons/checkbox-icon.d.ts +1 -0
- package/dist/primitives/atoms/icons/collections/bi.d.ts +4 -0
- package/dist/primitives/atoms/icons/collections/fi.d.ts +2 -0
- package/dist/primitives/atoms/icons/collections/gr.d.ts +2 -0
- package/dist/primitives/atoms/icons/collections/io5.d.ts +34 -0
- package/dist/primitives/atoms/icons/collections/pi.d.ts +4 -0
- package/dist/primitives/atoms/icons/custom-icon.d.ts +6 -0
- package/dist/primitives/atoms/icons/generate-icon.d.ts +28 -0
- package/dist/primitives/atoms/icons/index.d.ts +2 -0
- package/dist/primitives/atoms/icons/inkeep-default-icons.d.ts +2 -0
- package/dist/primitives/atoms/link.d.ts +14 -0
- package/dist/primitives/atoms/markdown/components.d.ts +31 -0
- package/dist/primitives/atoms/markdown/index.d.ts +17 -0
- package/dist/primitives/atoms/markdown/rehype-inline-code-property.d.ts +1 -0
- package/dist/primitives/atoms/portal-with-theme.d.ts +2 -0
- package/dist/primitives/atoms/portal.d.ts +8 -0
- package/dist/primitives/atoms/select.d.ts +136 -0
- package/dist/primitives/atoms/shadow/context.d.ts +14 -0
- package/dist/primitives/atoms/shadow/create.d.ts +8 -0
- package/dist/primitives/atoms/shadow/index.d.ts +1 -0
- package/dist/primitives/atoms/shadow/root.d.ts +5 -0
- package/dist/primitives/atoms/shadow/use-ensured-forwarded-ref.d.ts +2 -0
- package/dist/primitives/atoms/shadow/utils.d.ts +9 -0
- package/dist/primitives/components/chat-button.d.ts +18 -0
- package/dist/primitives/components/embedded-chat/chat-provider.d.ts +19 -0
- package/dist/primitives/components/embedded-chat/use-captcha.d.ts +13 -0
- package/dist/primitives/components/embedded-chat/use-chat-action.d.ts +9 -0
- package/dist/primitives/components/embedded-chat/use-inkeep-chat.d.ts +27 -0
- package/dist/primitives/components/embedded-chat/use-stream-processor.cjs +1 -1
- package/dist/primitives/components/embedded-chat/use-stream-processor.d.ts +28 -0
- package/dist/primitives/components/embedded-chat/use-stream-processor.js +27 -28
- package/dist/primitives/components/embedded-chat.cjs +3 -3
- package/dist/primitives/components/embedded-chat.d.ts +431 -0
- package/dist/primitives/components/embedded-chat.js +775 -776
- package/dist/primitives/components/embedded-search/search-provider.d.ts +21 -0
- package/dist/primitives/components/embedded-search/transform-results.d.ts +3 -0
- package/dist/primitives/components/embedded-search/url-query.d.ts +4 -0
- package/dist/primitives/components/embedded-search/use-inkeep-search.d.ts +19 -0
- package/dist/primitives/components/embedded-search/use-search-filter.d.ts +1 -0
- package/dist/primitives/components/embedded-search.d.ts +249 -0
- package/dist/primitives/components/factory.d.ts +19 -0
- package/dist/primitives/components/index.d.ts +10 -0
- package/dist/primitives/components/modal/modal-provider.d.ts +12 -0
- package/dist/primitives/components/modal/use-inkeep-modal.d.ts +7 -0
- package/dist/primitives/components/modal/widget-auto-focus.d.ts +2 -0
- package/dist/primitives/components/modal.d.ts +18 -0
- package/dist/primitives/components/presence.d.ts +8 -0
- package/dist/primitives/components/searchbar.d.ts +23 -0
- package/dist/primitives/components/sidebar-chat/index.d.ts +9 -0
- package/dist/primitives/components/sidebar-chat/use-sidebar-chat-resizer.d.ts +5 -0
- package/dist/primitives/components/tagline-logo-icon.d.ts +1 -0
- package/dist/primitives/components/use-component-trigger.d.ts +5 -0
- package/dist/primitives/constants/search.d.ts +1 -0
- package/dist/primitives/hooks/index.d.ts +11 -0
- package/dist/primitives/hooks/use-boolean.d.ts +10 -0
- package/dist/primitives/hooks/use-component-classnames.d.ts +6 -0
- package/dist/primitives/hooks/use-container-size.d.ts +5 -0
- package/dist/primitives/hooks/use-copy-to-clipboard.d.ts +3 -0
- package/dist/primitives/hooks/use-debounce.d.ts +1 -0
- package/dist/primitives/hooks/use-instant-update.d.ts +17 -0
- package/dist/primitives/hooks/use-is-mounted.d.ts +1 -0
- package/dist/primitives/hooks/use-media-query.d.ts +1 -0
- package/dist/primitives/hooks/use-resize-observer.d.ts +12 -0
- package/dist/primitives/hooks/use-scrolling-fades.d.ts +2 -0
- package/dist/primitives/hooks/use-settle-action.d.ts +3 -0
- package/dist/primitives/hooks/use-simple-scroll.d.ts +5 -0
- package/dist/primitives/hooks/use-streaming-events.d.ts +8 -0
- package/dist/primitives/index.d.ts +13 -0
- package/dist/primitives/providers/attachment-item-provider.d.ts +9 -0
- package/dist/primitives/providers/attachments-bar-provider.d.ts +30 -0
- package/dist/primitives/providers/base-events-provider.cjs +1 -1
- package/dist/primitives/providers/base-events-provider.d.ts +8 -0
- package/dist/primitives/providers/base-events-provider.js +1 -1
- package/dist/primitives/providers/chat-form-provider.d.ts +26 -0
- package/dist/primitives/providers/config-provider.d.ts +25 -0
- package/dist/primitives/providers/feedback-item-provider.d.ts +10 -0
- package/dist/primitives/providers/feedback-provider.d.ts +16 -0
- package/dist/primitives/providers/form-field-provider.d.ts +15 -0
- package/dist/primitives/providers/help-menu-provider.d.ts +11 -0
- package/dist/primitives/providers/hover-popover-provider.d.ts +10 -0
- package/dist/primitives/providers/index.d.ts +17 -0
- package/dist/primitives/providers/markdown-provider.d.ts +9 -0
- package/dist/primitives/providers/message-attachments-provider.d.ts +13 -0
- package/dist/primitives/providers/message-provider.d.ts +10 -0
- package/dist/primitives/providers/root-provider.d.ts +8 -0
- package/dist/primitives/providers/search-events-provider.d.ts +8 -0
- package/dist/primitives/providers/sidebar-chat-provider.d.ts +83 -0
- package/dist/primitives/providers/source-item-provider.d.ts +12 -0
- package/dist/primitives/providers/theme-provider.d.ts +3 -0
- package/dist/primitives/providers/widget-provider.d.ts +10 -0
- package/dist/primitives/utils/component-ids.d.ts +572 -0
- package/dist/primitives/utils/compose-event-handlers.d.ts +3 -0
- package/dist/primitives/utils/compose-refs.d.ts +5 -0
- package/dist/primitives/utils/default-settings.d.ts +167 -0
- package/dist/primitives/utils/form.d.ts +3 -0
- package/dist/primitives/utils/generate-uid.d.ts +2 -0
- package/dist/primitives/utils/get-message-metadata.d.ts +8 -0
- package/dist/primitives/utils/get-source-icon.d.ts +2 -0
- package/dist/primitives/utils/highlight-emphasis.d.ts +4 -0
- package/dist/primitives/utils/merge-props.d.ts +7 -0
- package/dist/primitives/utils/misc.d.ts +12 -0
- package/dist/primitives/utils/split-props.d.ts +15 -0
- package/dist/react/chat-button.d.ts +14 -0
- package/dist/react/embedded-chat.d.ts +14 -0
- package/dist/react/embedded-search-and-chat.d.ts +40 -0
- package/dist/react/embedded-search-and-chat.impl.d.ts +9 -0
- package/dist/react/embedded-search.d.ts +17 -0
- package/dist/react/index.d.ts +12 -0
- package/dist/react/modal.chat.d.ts +6 -0
- package/dist/react/modal.d.ts +23 -0
- package/dist/react/modal.search-and-chat.d.ts +6 -0
- package/dist/react/modal.search.d.ts +6 -0
- package/dist/react/searchbar.d.ts +13 -0
- package/dist/react/sidebar-chat.d.ts +6 -0
- package/dist/react/utils.d.ts +6 -0
- package/dist/react/widget-toggle.d.ts +14 -0
- package/dist/styled/components/chat-button.d.ts +8 -0
- package/dist/styled/components/data-summary-group.d.ts +11 -0
- package/dist/styled/components/embedded-chat.d.ts +190 -0
- package/dist/styled/components/embedded-search/results-loading.d.ts +1 -0
- package/dist/styled/components/embedded-search.d.ts +73 -0
- package/dist/styled/components/index.d.ts +11 -0
- package/dist/styled/components/loading-indicator.d.ts +1 -0
- package/dist/styled/components/message.cjs +1 -1
- package/dist/styled/components/message.d.ts +4 -0
- package/dist/styled/components/message.js +46 -47
- package/dist/styled/components/modal.d.ts +6 -0
- package/dist/styled/components/searchbar.d.ts +11 -0
- package/dist/styled/components/shadow.d.ts +3 -0
- package/dist/styled/components/sidebar-chat.d.ts +6 -0
- package/dist/styled/components/ui/markdown-styles.d.ts +23 -0
- package/dist/styled/components/ui/recipes/ai-chat-page-wrapper.d.ts +7 -0
- package/dist/styled/components/ui/recipes/attachment.d.ts +4 -0
- package/dist/styled/components/ui/recipes/button.d.ts +6 -0
- package/dist/styled/components/ui/recipes/checkbox.d.ts +4 -0
- package/dist/styled/components/ui/recipes/citation.d.ts +4 -0
- package/dist/styled/components/ui/recipes/icon.d.ts +2 -0
- package/dist/styled/components/ui/recipes/index.d.ts +15 -0
- package/dist/styled/components/ui/recipes/input.d.ts +5 -0
- package/dist/styled/components/ui/recipes/link.d.ts +2 -0
- package/dist/styled/components/ui/recipes/markdown.cjs +1 -1
- package/dist/styled/components/ui/recipes/markdown.d.ts +16 -0
- package/dist/styled/components/ui/recipes/markdown.js +1 -1
- package/dist/styled/components/ui/recipes/modal.d.ts +4 -0
- package/dist/styled/components/ui/recipes/popover.d.ts +4 -0
- package/dist/styled/components/ui/recipes/scrollable.d.ts +4 -0
- package/dist/styled/components/ui/recipes/select.d.ts +4 -0
- package/dist/styled/components/ui/recipes/skeleton.d.ts +2 -0
- package/dist/styled/components/ui/recipes/widget-toggle.d.ts +4 -0
- package/dist/styled/index.d.ts +2 -0
- package/dist/styled/utils.d.ts +4 -0
- package/dist/theme/color-utils.d.ts +1 -0
- package/dist/theme/colors.d.ts +104 -0
- package/dist/theme/index.d.ts +125 -0
- package/dist/theme/utils/create-css-variables.d.ts +2 -0
- package/dist/theme/utils/generate-theme-variables.d.ts +3 -0
- package/dist/types/color-mode.d.ts +44 -0
- package/dist/types/config/ai.d.ts +243 -0
- package/dist/types/config/base.d.ts +344 -0
- package/dist/types/config/components.d.ts +10 -0
- package/dist/types/config/filters.d.ts +17 -0
- package/dist/types/config/index.d.ts +36 -0
- package/dist/types/config/modal.d.ts +33 -0
- package/dist/types/config/search.d.ts +95 -0
- package/dist/types/config/settings/actions.d.ts +37 -0
- package/dist/types/config/settings/form.d.ts +128 -0
- package/dist/types/config/settings/jsonschema.d.ts +105 -0
- package/dist/types/config/settings/workflow.d.ts +86 -0
- package/dist/types/events.d.ts +173 -0
- package/dist/types/icons/built-in.d.ts +1 -0
- package/dist/types/icons/custom.d.ts +29 -0
- package/dist/types/icons/index.d.ts +2 -0
- package/dist/types/index.d.ts +20 -0
- package/dist/types/js/index.d.ts +54 -0
- package/dist/types/message.d.ts +43 -0
- package/dist/types/shadow.d.ts +15 -0
- package/dist/types/sources.d.ts +108 -0
- package/dist/types/theme.d.ts +25 -0
- package/dist/types/widget.d.ts +28 -0
- package/package.json +2 -4
- package/dist/index.d.cts +0 -5103
- package/dist/types/message.cjs +0 -1
- package/dist/types/message.js +0 -5
- package/dist/types/types.d.cts +0 -1758
- package/dist/types/types.d.ts +0 -1758
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { GrBlog as FaBlog } from './collections/gr';
|
|
2
|
+
import { BiLogoDiscordAlt as FaDiscord, BiLogoDiscourse as FaDiscourse, BiLogoTelegram as FaTelegram } from './collections/bi';
|
|
3
|
+
import { PiFilePdfFill as FaFilePdf, PiFilePdf as FaRegFilePdf, PiCaretUpDownFill as FaSort } from './collections/pi';
|
|
4
|
+
import { FiEdit } from './collections/fi';
|
|
5
|
+
import { IoBookOutline, IoChatbubblesOutline, IoCheckmarkDoneOutline, IoCheckmarkOutline, IoChevronForwardOutline, IoCloseOutline, IoCopy, IoCopyOutline, IoDocumentSharp, IoDocumentTextOutline, IoDocumentTextSharp, IoHelpBuoyOutline, IoHomeOutline, IoInformationCircleOutline, IoLinkOutline, IoLogoDiscord, IoLogoGithub, IoMail, IoOpenOutline, IoPencilOutline, IoPeopleOutline, IoPlayCircleOutline, IoReaderOutline, IoReturnDownBackOutline, IoReturnDownForward, IoSearch, IoSend, IoTerminal, IoThumbsDownSharp, IoThumbsUpSharp, IoLogoStackoverflow as FaStackOverflow, IoLogoChrome as FaChrome, IoLogoSlack as FaSlack } from './collections/io5';
|
|
6
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
7
|
+
import { LucideProps } from 'lucide-react';
|
|
8
|
+
export declare const iconMap: {
|
|
9
|
+
FaBook: ForwardRefExoticComponent<Omit< LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
10
|
+
FaGithub: typeof IoLogoGithub;
|
|
11
|
+
FaDatabase: ForwardRefExoticComponent<Omit< LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
12
|
+
FaStackOverflow: typeof FaStackOverflow;
|
|
13
|
+
FaChrome: typeof FaChrome;
|
|
14
|
+
FaPhone: ForwardRefExoticComponent<Omit< LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
15
|
+
FaEnvelope: ForwardRefExoticComponent<Omit< LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
16
|
+
FaPencil: ForwardRefExoticComponent<Omit< LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
17
|
+
FaBlog: typeof FaBlog;
|
|
18
|
+
FaSort: typeof FaSort;
|
|
19
|
+
FaPenSquare: ForwardRefExoticComponent<Omit< LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
20
|
+
FaChevronRight: ForwardRefExoticComponent<Omit< LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
21
|
+
FaChevronUp: ForwardRefExoticComponent<Omit< LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
22
|
+
FaFilePdf: typeof FaFilePdf;
|
|
23
|
+
FaDiscourse: typeof FaDiscourse;
|
|
24
|
+
FaDiscord: typeof FaDiscord;
|
|
25
|
+
FaSlack: typeof FaSlack;
|
|
26
|
+
IoDocumentTextSharp: typeof IoDocumentTextSharp;
|
|
27
|
+
IoDocumentSharp: typeof IoDocumentSharp;
|
|
28
|
+
IoSend: typeof IoSend;
|
|
29
|
+
IoInformationCircleOutline: typeof IoInformationCircleOutline;
|
|
30
|
+
IoLinkOutline: typeof IoLinkOutline;
|
|
31
|
+
IoThumbsUpSharp: typeof IoThumbsUpSharp;
|
|
32
|
+
IoThumbsDownSharp: typeof IoThumbsDownSharp;
|
|
33
|
+
IoSearch: typeof IoSearch;
|
|
34
|
+
IoCopyOutline: typeof IoCopyOutline;
|
|
35
|
+
IoCopy: typeof IoCopy;
|
|
36
|
+
IoReturnDownBackOutline: typeof IoReturnDownBackOutline;
|
|
37
|
+
IoChevronForwardOutline: typeof IoChevronForwardOutline;
|
|
38
|
+
IoReturnDownForward: typeof IoReturnDownForward;
|
|
39
|
+
IoCloseOutline: typeof IoCloseOutline;
|
|
40
|
+
IoCheckmarkOutline: typeof IoCheckmarkOutline;
|
|
41
|
+
IoBookOutline: typeof IoBookOutline;
|
|
42
|
+
IoReaderOutline: typeof IoReaderOutline;
|
|
43
|
+
IoHelpBuoyOutline: typeof IoHelpBuoyOutline;
|
|
44
|
+
IoPeopleOutline: typeof IoPeopleOutline;
|
|
45
|
+
IoDocumentTextOutline: typeof IoDocumentTextOutline;
|
|
46
|
+
IoChatbubblesOutline: typeof IoChatbubblesOutline;
|
|
47
|
+
FaRegFilePdf: typeof FaRegFilePdf;
|
|
48
|
+
IoLogoDiscord: typeof IoLogoDiscord;
|
|
49
|
+
IoLogoGithub: typeof IoLogoGithub;
|
|
50
|
+
IoTerminal: typeof IoTerminal;
|
|
51
|
+
FaBriefcase: ForwardRefExoticComponent<Omit< LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
52
|
+
IoPlayCircleOutline: typeof IoPlayCircleOutline;
|
|
53
|
+
IoPencilOutline: typeof IoPencilOutline;
|
|
54
|
+
IoCheckmarkDoneOutline: typeof IoCheckmarkDoneOutline;
|
|
55
|
+
IoHomeOutline: typeof IoHomeOutline;
|
|
56
|
+
IoMail: typeof IoMail;
|
|
57
|
+
IoOpenOutline: typeof IoOpenOutline;
|
|
58
|
+
FaTelegram: typeof FaTelegram;
|
|
59
|
+
FaTable: ForwardRefExoticComponent<Omit< LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
60
|
+
FaMagnifyingGlass: ForwardRefExoticComponent<Omit< LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
61
|
+
LuArrowLeft: ForwardRefExoticComponent<Omit< LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
62
|
+
LuCircleCheck: ForwardRefExoticComponent<Omit< LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
63
|
+
LuCommand: ForwardRefExoticComponent<Omit< LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
64
|
+
LuCopy: ForwardRefExoticComponent<Omit< LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
65
|
+
LuCheck: ForwardRefExoticComponent<Omit< LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
66
|
+
LuCornerDownLeft: ForwardRefExoticComponent<Omit< LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
67
|
+
LuGlobe: ForwardRefExoticComponent<Omit< LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
68
|
+
LuLink: ForwardRefExoticComponent<Omit< LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
69
|
+
LuRepeat: ForwardRefExoticComponent<Omit< LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
70
|
+
LuThumbsDown: ForwardRefExoticComponent<Omit< LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
71
|
+
LuThumbsUp: ForwardRefExoticComponent<Omit< LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
72
|
+
LuUsers: ForwardRefExoticComponent<Omit< LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
73
|
+
LuUser: ForwardRefExoticComponent<Omit< LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
74
|
+
LuArrowUpRight: ForwardRefExoticComponent<Omit< LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
75
|
+
LuBookOpen: ForwardRefExoticComponent<Omit< LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
76
|
+
LuChevronDown: ForwardRefExoticComponent<Omit< LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
77
|
+
LuLoaderCircle: ForwardRefExoticComponent<Omit< LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
78
|
+
FiEdit: typeof FiEdit;
|
|
79
|
+
LuSparkles: ForwardRefExoticComponent<Omit< LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
80
|
+
LuCornerDownRight: ForwardRefExoticComponent<Omit< LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
81
|
+
LuCalendar: ForwardRefExoticComponent<Omit< LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
82
|
+
LuHeadset: ForwardRefExoticComponent<Omit< LucideProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
83
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function CheckboxIcon(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IconBaseProps } from '../generate-icon';
|
|
2
|
+
export declare function BiLogoDiscordAlt(props: IconBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare function BiLogoDiscourse(props: IconBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare function BiLogoTelegram(props: IconBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { IconBaseProps } from '../generate-icon';
|
|
2
|
+
export declare function IoBookOutline(props: IconBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare function IoChatbubblesOutline(props: IconBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare function IoCheckmarkDoneOutline(props: IconBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare function IoCheckmarkOutline(props: IconBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare function IoChevronForwardOutline(props: IconBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare function IoCloseOutline(props: IconBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare function IoCopyOutline(props: IconBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare function IoCopy(props: IconBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare function IoDocumentSharp(props: IconBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare function IoDocumentTextOutline(props: IconBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare function IoDocumentTextSharp(props: IconBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare function IoHelpBuoyOutline(props: IconBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare function IoHomeOutline(props: IconBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare function IoInformationCircleOutline(props: IconBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare function IoLinkOutline(props: IconBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare function IoLogoChrome(props: IconBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare function IoLogoDiscord(props: IconBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare function IoLogoGithub(props: IconBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare function IoLogoSlack(props: IconBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare function IoLogoStackoverflow(props: IconBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare function IoMail(props: IconBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export declare function IoOpenOutline(props: IconBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare function IoPencilOutline(props: IconBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export declare function IoPeopleOutline(props: IconBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export declare function IoPlayCircleOutline(props: IconBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export declare function IoReaderOutline(props: IconBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export declare function IoReturnDownBackOutline(props: IconBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export declare function IoReturnDownForward(props: IconBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
export declare function IoSearch(props: IconBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export declare function IoSend(props: IconBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export declare function IoTerminal(props: IconBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export declare function IoThumbsDownSharp(props: IconBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
export declare function IoThumbsUpSharp(props: IconBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IconBaseProps } from '../generate-icon';
|
|
2
|
+
export declare function PiFilePdfFill(props: IconBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare function PiFilePdf(props: IconBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare function PiCaretUpDownFill(props: IconBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface IconContext {
|
|
3
|
+
color?: string;
|
|
4
|
+
size?: string;
|
|
5
|
+
className?: string;
|
|
6
|
+
style?: React.CSSProperties;
|
|
7
|
+
attr?: React.SVGAttributes<SVGElement>;
|
|
8
|
+
}
|
|
9
|
+
export declare const DefaultContext: IconContext;
|
|
10
|
+
export declare const IconContext: React.Context<IconContext>;
|
|
11
|
+
export interface IconTree {
|
|
12
|
+
tag: string;
|
|
13
|
+
attr: {
|
|
14
|
+
[key: string]: string;
|
|
15
|
+
};
|
|
16
|
+
child: IconTree[];
|
|
17
|
+
}
|
|
18
|
+
export declare function GenIcon(data: IconTree): (props: IconBaseProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export interface IconBaseProps extends React.SVGAttributes<SVGElement> {
|
|
20
|
+
children?: React.ReactNode;
|
|
21
|
+
size?: string | number;
|
|
22
|
+
color?: string;
|
|
23
|
+
title?: string;
|
|
24
|
+
}
|
|
25
|
+
export type IconType = (props: IconBaseProps) => React.ReactNode;
|
|
26
|
+
export declare function IconBase(props: IconBaseProps & {
|
|
27
|
+
attr?: Record<string, string>;
|
|
28
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ComponentPropsWithRef, ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
2
|
+
import { UrlQueryParam } from '../../types/index.ts';
|
|
3
|
+
export interface LinkProps extends ComponentPropsWithRef<'a'> {
|
|
4
|
+
/**
|
|
5
|
+
* If `true`, the link will open in new tab
|
|
6
|
+
*
|
|
7
|
+
* @default false
|
|
8
|
+
*/
|
|
9
|
+
isExternal?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const Link: ForwardRefExoticComponent<Omit<LinkProps, "ref"> & RefAttributes<HTMLAnchorElement>>;
|
|
12
|
+
export declare const LinkWithQueryParams: ForwardRefExoticComponent<Omit<LinkProps & {
|
|
13
|
+
appendToUrl?: UrlQueryParam;
|
|
14
|
+
}, "ref"> & RefAttributes<HTMLAnchorElement>>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ForwardRefExoticComponent, DetailedHTMLProps, HTMLAttributes, LiHTMLAttributes, OlHTMLAttributes, RefAttributes, TableHTMLAttributes, ThHTMLAttributes, TdHTMLAttributes, ButtonHTMLAttributes, InputHTMLAttributes, ImgHTMLAttributes } from 'react';
|
|
2
|
+
import { PolymorphicProps } from '../..';
|
|
3
|
+
import { LinkProps } from '../link';
|
|
4
|
+
import { UrlQueryParam } from '../../../types';
|
|
5
|
+
export declare const MarkdownH1: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "_id">>>;
|
|
6
|
+
export declare const MarkdownH2: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "_id">>>;
|
|
7
|
+
export declare const MarkdownP: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "_id">>>;
|
|
8
|
+
export declare const MarkdownLi: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "_id"> & Partial<Pick< DetailedHTMLProps<LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "_id">>>;
|
|
9
|
+
export declare const MarkdownUl: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "_id">>>;
|
|
10
|
+
export declare const MarkdownOl: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, "_id"> & Partial<Pick< DetailedHTMLProps<OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, "_id">>>;
|
|
11
|
+
export declare const MarkdownLink: ForwardRefExoticComponent< PolymorphicProps & Omit<Omit< LinkProps & {
|
|
12
|
+
appendToUrl?: UrlQueryParam;
|
|
13
|
+
}, "ref"> & RefAttributes<HTMLAnchorElement>, "_id"> & Partial<Pick<Omit< LinkProps & {
|
|
14
|
+
appendToUrl?: UrlQueryParam;
|
|
15
|
+
}, "ref"> & RefAttributes<HTMLAnchorElement>, "_id">>>;
|
|
16
|
+
export declare const MarkdownSourceLink: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>, "_id">>>;
|
|
17
|
+
export declare const MarkdownTable: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, "_id"> & Partial<Pick< DetailedHTMLProps<TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, "_id">>>;
|
|
18
|
+
export declare const MarkdownTh: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>, "_id"> & Partial<Pick< DetailedHTMLProps<ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>, "_id">>>;
|
|
19
|
+
export declare const MarkdownTd: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, "_id"> & Partial<Pick< DetailedHTMLProps<TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, "_id">>>;
|
|
20
|
+
export declare const MarkdownCode: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>, "_id">>>;
|
|
21
|
+
export declare const CodeblockContainer: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id">>>;
|
|
22
|
+
export declare const CodeblockHeader: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id">>>;
|
|
23
|
+
export declare const CodeblockHeaderLanguage: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "_id">>>;
|
|
24
|
+
export declare const CodeblockCopyButton: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "type" | "_id"> & Partial<Pick< DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "type" | "_id">>>;
|
|
25
|
+
export declare const CodeblockHighlighterWrapper: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id">>>;
|
|
26
|
+
export declare const CodeblockHighlighter: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id">>>;
|
|
27
|
+
export declare const CodeblockCode: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>, "_id">>>;
|
|
28
|
+
export declare const MarkdownInput: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "_id"> & Partial<Pick< DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "_id">>>;
|
|
29
|
+
export declare const MarkdownSup: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "_id">>>;
|
|
30
|
+
export declare const MarkdownImg: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "_id"> & Partial<Pick< DetailedHTMLProps<ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "_id">>>;
|
|
31
|
+
export declare const MarkdownHr: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLHRElement>, HTMLHRElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLHRElement>, HTMLHRElement>, "_id">>>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ComponentPropsWithRef } from 'react';
|
|
2
|
+
import { CodeProps } from '../codeblock';
|
|
3
|
+
import { MarkdownComponentID } from '../../utils/component-ids';
|
|
4
|
+
import { ArtifactPart } from '../../../types/index.ts';
|
|
5
|
+
export interface MarkdownProps {
|
|
6
|
+
shouldOpenLinksInNewTab?: boolean;
|
|
7
|
+
componentStyles?: Partial<Record<MarkdownComponentID, string>>;
|
|
8
|
+
onCodeCopy?: CodeProps['onCopy'];
|
|
9
|
+
/**
|
|
10
|
+
* Callback when a link is clicked.
|
|
11
|
+
* @param href - the destination of the link
|
|
12
|
+
* @param label - the link text
|
|
13
|
+
*/
|
|
14
|
+
onLinkClick?: (href: string | undefined, label: string | undefined) => void;
|
|
15
|
+
artifacts?: ArtifactPart[];
|
|
16
|
+
}
|
|
17
|
+
export declare const Markdown: ({ children, componentStyles, shouldOpenLinksInNewTab, onLinkClick, onCodeCopy, artifacts, ...props }: ComponentPropsWithRef<"div"> & MarkdownProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function rehypeInlineCodeProperty(): (tree: any) => void;
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { DismissableLayer } from '@radix-ui/react-dismissable-layer';
|
|
2
|
+
import { FocusScope } from '@radix-ui/react-focus-scope';
|
|
3
|
+
import { Portal as PortalPrimitive } from '@radix-ui/react-portal';
|
|
4
|
+
import { Primitive } from '@radix-ui/react-primitive';
|
|
5
|
+
import { CreateScope } from '@radix-ui/react-context';
|
|
6
|
+
import * as React from 'react';
|
|
7
|
+
import * as PopperPrimitive from '@radix-ui/react-popper';
|
|
8
|
+
type Direction = 'ltr' | 'rtl';
|
|
9
|
+
declare const createSelectScope: CreateScope;
|
|
10
|
+
export interface SelectSharedProps {
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
open?: boolean;
|
|
13
|
+
defaultOpen?: boolean;
|
|
14
|
+
onOpenChange?(open: boolean): void;
|
|
15
|
+
dir?: Direction;
|
|
16
|
+
name?: string;
|
|
17
|
+
autoComplete?: string;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
required?: boolean;
|
|
20
|
+
form?: string;
|
|
21
|
+
}
|
|
22
|
+
type SelectProps = SelectSharedProps & {
|
|
23
|
+
value?: string;
|
|
24
|
+
defaultValue?: string;
|
|
25
|
+
onValueChange?(value: string): void;
|
|
26
|
+
};
|
|
27
|
+
declare const Select: React.FC<SelectProps>;
|
|
28
|
+
type PrimitiveButtonProps = React.ComponentPropsWithoutRef<typeof Primitive.button>;
|
|
29
|
+
interface SelectTriggerProps extends PrimitiveButtonProps {
|
|
30
|
+
}
|
|
31
|
+
declare const SelectTrigger: React.ForwardRefExoticComponent<SelectTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
32
|
+
type PrimitiveSpanProps = React.ComponentPropsWithoutRef<typeof Primitive.span>;
|
|
33
|
+
interface SelectValueProps extends Omit<PrimitiveSpanProps, 'placeholder'> {
|
|
34
|
+
placeholder?: React.ReactNode;
|
|
35
|
+
}
|
|
36
|
+
declare const SelectValue: React.ForwardRefExoticComponent<SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
|
|
37
|
+
interface SelectIconProps extends PrimitiveSpanProps {
|
|
38
|
+
}
|
|
39
|
+
declare const SelectIcon: React.ForwardRefExoticComponent<SelectIconProps & React.RefAttributes<HTMLSpanElement>>;
|
|
40
|
+
type PortalProps = React.ComponentPropsWithoutRef<typeof PortalPrimitive>;
|
|
41
|
+
interface SelectPortalProps {
|
|
42
|
+
children?: React.ReactNode;
|
|
43
|
+
/**
|
|
44
|
+
* Specify a container element to portal the content into.
|
|
45
|
+
*/
|
|
46
|
+
container?: PortalProps['container'];
|
|
47
|
+
}
|
|
48
|
+
declare const SelectPortal: React.FC<SelectPortalProps>;
|
|
49
|
+
interface SelectContentProps extends SelectContentImplProps {
|
|
50
|
+
}
|
|
51
|
+
declare const SelectContent: React.ForwardRefExoticComponent<SelectContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
52
|
+
type DismissableLayerProps = React.ComponentPropsWithoutRef<typeof DismissableLayer>;
|
|
53
|
+
type FocusScopeProps = React.ComponentPropsWithoutRef<typeof FocusScope>;
|
|
54
|
+
type SelectPopperPrivateProps = {
|
|
55
|
+
onPlaced?: PopperContentProps['onPlaced'];
|
|
56
|
+
};
|
|
57
|
+
interface SelectContentImplProps extends Omit<SelectPopperPositionProps, keyof SelectPopperPrivateProps>, Omit<SelectItemAlignedPositionProps, keyof SelectPopperPrivateProps> {
|
|
58
|
+
/**
|
|
59
|
+
* Event handler called when auto-focusing on close.
|
|
60
|
+
* Can be prevented.
|
|
61
|
+
*/
|
|
62
|
+
onCloseAutoFocus?: FocusScopeProps['onUnmountAutoFocus'];
|
|
63
|
+
/**
|
|
64
|
+
* Event handler called when the escape key is down.
|
|
65
|
+
* Can be prevented.
|
|
66
|
+
*/
|
|
67
|
+
onEscapeKeyDown?: DismissableLayerProps['onEscapeKeyDown'];
|
|
68
|
+
/**
|
|
69
|
+
* Event handler called when the a `pointerdown` event happens outside of the `DismissableLayer`.
|
|
70
|
+
* Can be prevented.
|
|
71
|
+
*/
|
|
72
|
+
onPointerDownOutside?: DismissableLayerProps['onPointerDownOutside'];
|
|
73
|
+
position?: 'item-aligned' | 'popper';
|
|
74
|
+
}
|
|
75
|
+
interface SelectItemAlignedPositionProps extends PrimitiveDivProps, SelectPopperPrivateProps {
|
|
76
|
+
}
|
|
77
|
+
type PopperContentProps = React.ComponentPropsWithoutRef<typeof PopperPrimitive.Content>;
|
|
78
|
+
interface SelectPopperPositionProps extends PopperContentProps, SelectPopperPrivateProps {
|
|
79
|
+
}
|
|
80
|
+
type PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
|
|
81
|
+
interface SelectViewportProps extends PrimitiveDivProps {
|
|
82
|
+
nonce?: string;
|
|
83
|
+
}
|
|
84
|
+
declare const SelectViewport: React.ForwardRefExoticComponent<SelectViewportProps & React.RefAttributes<HTMLDivElement>>;
|
|
85
|
+
interface SelectGroupProps extends PrimitiveDivProps {
|
|
86
|
+
}
|
|
87
|
+
declare const SelectGroup: React.ForwardRefExoticComponent<SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
88
|
+
interface SelectLabelProps extends PrimitiveDivProps {
|
|
89
|
+
}
|
|
90
|
+
declare const SelectLabel: React.ForwardRefExoticComponent<SelectLabelProps & React.RefAttributes<HTMLDivElement>>;
|
|
91
|
+
interface SelectItemProps extends PrimitiveDivProps {
|
|
92
|
+
value: string;
|
|
93
|
+
disabled?: boolean;
|
|
94
|
+
textValue?: string;
|
|
95
|
+
}
|
|
96
|
+
declare const SelectItem: React.ForwardRefExoticComponent<SelectItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
97
|
+
interface SelectItemTextProps extends PrimitiveSpanProps {
|
|
98
|
+
}
|
|
99
|
+
declare const SelectItemText: React.ForwardRefExoticComponent<SelectItemTextProps & React.RefAttributes<HTMLSpanElement>>;
|
|
100
|
+
interface SelectItemIndicatorProps extends PrimitiveSpanProps {
|
|
101
|
+
}
|
|
102
|
+
declare const SelectItemIndicator: React.ForwardRefExoticComponent<SelectItemIndicatorProps & React.RefAttributes<HTMLSpanElement>>;
|
|
103
|
+
interface SelectScrollUpButtonProps extends Omit<SelectScrollButtonImplProps, 'onAutoScroll'> {
|
|
104
|
+
}
|
|
105
|
+
declare const SelectScrollUpButton: React.ForwardRefExoticComponent<SelectScrollUpButtonProps & React.RefAttributes<HTMLDivElement>>;
|
|
106
|
+
interface SelectScrollDownButtonProps extends Omit<SelectScrollButtonImplProps, 'onAutoScroll'> {
|
|
107
|
+
}
|
|
108
|
+
declare const SelectScrollDownButton: React.ForwardRefExoticComponent<SelectScrollDownButtonProps & React.RefAttributes<HTMLDivElement>>;
|
|
109
|
+
interface SelectScrollButtonImplProps extends PrimitiveDivProps {
|
|
110
|
+
onAutoScroll(): void;
|
|
111
|
+
}
|
|
112
|
+
interface SelectSeparatorProps extends PrimitiveDivProps {
|
|
113
|
+
}
|
|
114
|
+
declare const SelectSeparator: React.ForwardRefExoticComponent<SelectSeparatorProps & React.RefAttributes<HTMLDivElement>>;
|
|
115
|
+
type PopperArrowProps = React.ComponentPropsWithoutRef<typeof PopperPrimitive.Arrow>;
|
|
116
|
+
interface SelectArrowProps extends PopperArrowProps {
|
|
117
|
+
}
|
|
118
|
+
declare const SelectArrow: React.ForwardRefExoticComponent<SelectArrowProps & React.RefAttributes<SVGSVGElement>>;
|
|
119
|
+
declare const Root: React.FC<SelectProps>;
|
|
120
|
+
declare const Trigger: React.ForwardRefExoticComponent<SelectTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
121
|
+
declare const Value: React.ForwardRefExoticComponent<SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
|
|
122
|
+
declare const Icon: React.ForwardRefExoticComponent<SelectIconProps & React.RefAttributes<HTMLSpanElement>>;
|
|
123
|
+
declare const Portal: React.FC<SelectPortalProps>;
|
|
124
|
+
declare const Content: React.ForwardRefExoticComponent<SelectContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
125
|
+
declare const Viewport: React.ForwardRefExoticComponent<SelectViewportProps & React.RefAttributes<HTMLDivElement>>;
|
|
126
|
+
declare const Group: React.ForwardRefExoticComponent<SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
127
|
+
declare const Label: React.ForwardRefExoticComponent<SelectLabelProps & React.RefAttributes<HTMLDivElement>>;
|
|
128
|
+
declare const Item: React.ForwardRefExoticComponent<SelectItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
129
|
+
declare const ItemText: React.ForwardRefExoticComponent<SelectItemTextProps & React.RefAttributes<HTMLSpanElement>>;
|
|
130
|
+
declare const ItemIndicator: React.ForwardRefExoticComponent<SelectItemIndicatorProps & React.RefAttributes<HTMLSpanElement>>;
|
|
131
|
+
declare const ScrollUpButton: React.ForwardRefExoticComponent<SelectScrollUpButtonProps & React.RefAttributes<HTMLDivElement>>;
|
|
132
|
+
declare const ScrollDownButton: React.ForwardRefExoticComponent<SelectScrollDownButtonProps & React.RefAttributes<HTMLDivElement>>;
|
|
133
|
+
declare const Separator: React.ForwardRefExoticComponent<SelectSeparatorProps & React.RefAttributes<HTMLDivElement>>;
|
|
134
|
+
declare const Arrow: React.ForwardRefExoticComponent<SelectArrowProps & React.RefAttributes<SVGSVGElement>>;
|
|
135
|
+
export { createSelectScope, Select, SelectTrigger, SelectValue, SelectIcon, SelectPortal, SelectContent, SelectViewport, SelectGroup, SelectLabel, SelectItem, SelectItemText, SelectItemIndicator, SelectScrollUpButton, SelectScrollDownButton, SelectSeparator, SelectArrow, Root, Trigger, Value, Icon, Portal, Content, Viewport, Group, Label, Item, ItemText, ItemIndicator, ScrollUpButton, ScrollDownButton, Separator, Arrow, };
|
|
136
|
+
export type { SelectProps, SelectTriggerProps, SelectValueProps, SelectIconProps, SelectPortalProps, SelectContentProps, SelectViewportProps, SelectGroupProps, SelectLabelProps, SelectItemProps, SelectItemTextProps, SelectItemIndicatorProps, SelectScrollUpButtonProps, SelectScrollDownButtonProps, SelectSeparatorProps, SelectArrowProps, };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { CSSProperties, PropsWithChildren, Context, ReactNode, ReactPortal, ReactElement, JSXElementConstructor } from 'react';
|
|
2
|
+
export declare const ShadowContext: Context<ShadowContextValue | undefined>;
|
|
3
|
+
export type ShadowContextValue = {
|
|
4
|
+
shadowHost: HTMLDivElement | null;
|
|
5
|
+
rootElement: HTMLDivElement | null;
|
|
6
|
+
};
|
|
7
|
+
export declare const useShadow: () => ShadowContextValue | undefined;
|
|
8
|
+
export interface InkeepShadowProps extends PropsWithChildren {
|
|
9
|
+
wrapperStyles?: CSSProperties;
|
|
10
|
+
customStyles?: React.ReactNode;
|
|
11
|
+
styles?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare function InkeepShadowProvider({ wrapperStyles, children, customStyles, styles, }: InkeepShadowProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare const InkeepShadow: (props: InkeepShadowProps) => string | number | bigint | boolean | Iterable< ReactNode> | Promise<string | number | bigint | boolean | ReactPortal | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable< ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { RenderFn, ShadowRootProps } from '../../../types/index.ts';
|
|
3
|
+
interface CreateOptions {
|
|
4
|
+
tag: React.ElementType;
|
|
5
|
+
render: RenderFn;
|
|
6
|
+
}
|
|
7
|
+
export declare function create(options: CreateOptions): React.ForwardRefExoticComponent<ShadowRootProps & React.RefAttributes<Element>>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './context';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Context } from 'react';
|
|
2
|
+
export declare const Context: Context<ShadowRoot | null>;
|
|
3
|
+
interface ErrorWithStyleSheets {
|
|
4
|
+
error: Error;
|
|
5
|
+
styleSheets: CSSStyleSheet[];
|
|
6
|
+
root: ShadowRoot | null;
|
|
7
|
+
}
|
|
8
|
+
export declare function handleError({ error, styleSheets, root }: ErrorWithStyleSheets): void;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ComponentPropsWithRef, ForwardRefExoticComponent, DetailedHTMLProps, HTMLAttributes, ButtonHTMLAttributes, RefAttributes, MemoExoticComponent } from 'react';
|
|
2
|
+
import { InkeepAIChatSettings } from '../../types/index.ts';
|
|
3
|
+
import { PolymorphicProps } from './factory';
|
|
4
|
+
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
5
|
+
declare const ChatButtonPrimitiveContainer: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id">>>;
|
|
6
|
+
declare const ChatButtonPrimitiveButton: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "_id"> & Partial<Pick< DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "_id">>>;
|
|
7
|
+
declare const ChatButtonPrimitiveText: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id">>>;
|
|
8
|
+
declare const PrimitiveChatButtonAvatarContent: ForwardRefExoticComponent< PolymorphicProps & Omit<AvatarPrimitive.AvatarProps & RefAttributes<HTMLSpanElement>, "_id"> & Partial<Pick<AvatarPrimitive.AvatarProps & RefAttributes<HTMLSpanElement>, "_id">>>;
|
|
9
|
+
declare const PrimitiveChatButtonAvatarImage: ForwardRefExoticComponent< PolymorphicProps & Omit<AvatarPrimitive.AvatarImageProps & RefAttributes<HTMLImageElement>, "_id"> & Partial<Pick<AvatarPrimitive.AvatarImageProps & RefAttributes<HTMLImageElement>, "_id">>>;
|
|
10
|
+
type OnLoadingStatusChange = AvatarPrimitive.AvatarImageProps['onLoadingStatusChange'];
|
|
11
|
+
type AvatarImageProps = {
|
|
12
|
+
onLoadingStatusChange?: OnLoadingStatusChange;
|
|
13
|
+
} & (ComponentPropsWithRef<'svg'> | ComponentPropsWithRef<typeof PrimitiveChatButtonAvatarImage>);
|
|
14
|
+
type ChatButtonPrimitiveAvatarImageProps = AvatarImageProps & {
|
|
15
|
+
avatar?: InkeepAIChatSettings['aiAssistantAvatar'];
|
|
16
|
+
};
|
|
17
|
+
export declare const ChatButtonPrimitiveAvatarImage: MemoExoticComponent<(props: ChatButtonPrimitiveAvatarImageProps) => import("react/jsx-runtime").JSX.Element>;
|
|
18
|
+
export { ChatButtonPrimitiveContainer as ChatButtonContainer, ChatButtonPrimitiveText as ChatButtonText, ChatButtonPrimitiveButton as ChatButton, ChatButtonPrimitiveAvatarImage as ChatButtonAvatarImage, PrimitiveChatButtonAvatarContent as ChatButtonAvatarContent, };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { useInkeepChat } from './use-inkeep-chat';
|
|
2
|
+
export interface EmbeddedChatProviderProps {
|
|
3
|
+
/**
|
|
4
|
+
* Whether to show the chat.
|
|
5
|
+
* @default false
|
|
6
|
+
*/
|
|
7
|
+
isHidden?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Whether to autofocus the chat input on load.
|
|
10
|
+
* @default true
|
|
11
|
+
*/
|
|
12
|
+
shouldAutoFocusInput?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export type ChatContextValue = ReturnType<typeof useInkeepChat> & Omit<ChatProviderProps, 'children'>;
|
|
15
|
+
export interface ChatProviderProps extends Pick<EmbeddedChatProviderProps, 'shouldAutoFocusInput' | 'isHidden'> {
|
|
16
|
+
children: React.ReactNode;
|
|
17
|
+
}
|
|
18
|
+
export declare const ChatProvider: React.FC<ChatProviderProps>;
|
|
19
|
+
export declare const useChat: () => ChatContextValue;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Payload } from 'altcha-lib/types';
|
|
2
|
+
interface UseCaptchaOptions {
|
|
3
|
+
fetchUrl: string;
|
|
4
|
+
shouldBypassCaptcha?: boolean;
|
|
5
|
+
shouldMakeInitialRequest?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const fetchAndSolveChallenge: (fetchUrl: string) => Promise<Payload | undefined>;
|
|
8
|
+
export declare const useCaptcha: ({ fetchUrl, shouldBypassCaptcha, shouldMakeInitialRequest, }: UseCaptchaOptions) => {
|
|
9
|
+
getSolution: () => Promise<Payload | undefined>;
|
|
10
|
+
prefetchSolution: () => void;
|
|
11
|
+
invalidateSolution: () => void;
|
|
12
|
+
};
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IkpChatAction } from '../../../types/index.ts';
|
|
2
|
+
interface HandleAction {
|
|
3
|
+
onOpenForm?: Function;
|
|
4
|
+
}
|
|
5
|
+
export declare const useChatAction: (chatAction: IkpChatAction) => {
|
|
6
|
+
handleAction: (opts?: HandleAction) => void;
|
|
7
|
+
logHelpAction: () => void;
|
|
8
|
+
};
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { KeyboardEvent, Dispatch, SetStateAction, RefObject } from 'react';
|
|
2
|
+
import { Message, MessageAttachment, Workflow } from '../../../types/index.ts';
|
|
3
|
+
export declare const DEFAULT_ERROR_MESSAGE = "Hmm.. \n\nIt seems I might be having some issues right now. Please clear the chat and try again.";
|
|
4
|
+
export declare const useInkeepChat: () => {
|
|
5
|
+
messages: Message[];
|
|
6
|
+
isLoading: boolean;
|
|
7
|
+
isStreaming: boolean;
|
|
8
|
+
error: Error | null;
|
|
9
|
+
setError: Dispatch<SetStateAction<Error | null>>;
|
|
10
|
+
isSubmitDisabled: boolean;
|
|
11
|
+
input: string;
|
|
12
|
+
handleInputChange: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
13
|
+
handleInputKeyDown: (event: KeyboardEvent<HTMLElement>) => void;
|
|
14
|
+
handleSubmit: (content?: string) => Promise<void>;
|
|
15
|
+
stop: () => void;
|
|
16
|
+
clear: () => void;
|
|
17
|
+
messageButtons: Record<string, any[]>;
|
|
18
|
+
isEmpty: boolean;
|
|
19
|
+
inputRef: RefObject<HTMLTextAreaElement | null>;
|
|
20
|
+
isMobile: boolean;
|
|
21
|
+
messageAttachments: MessageAttachment[];
|
|
22
|
+
setMessageAttachments: Dispatch<SetStateAction<MessageAttachment[]>>;
|
|
23
|
+
selectedWorkflow: Workflow | null;
|
|
24
|
+
setSelectedWorkflow: Dispatch<SetStateAction<Workflow | null>>;
|
|
25
|
+
isNewChat: boolean;
|
|
26
|
+
conversationId: string;
|
|
27
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react"),
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react"),E=require("./use-inkeep-chat.cjs");function L(f,u,d){const[p,D]=n.useState([]),[h,w]=n.useState(new Map),[x,T]=n.useState(Date.now()),[A,y]=n.useState(!1),C=n.useRef(0),S=n.useRef(0),R=n.useRef([]),m=n.useRef(h);m.current=h;const b=n.useCallback(()=>{const t=[];let e="",a=[],i=!1;f.length>C.current&&(T(Date.now()),C.current=f.length),S.current=0;const c=new Map,l=(s=!1)=>{if(a.length>0){const r=`group-${S.current++}`,o=m.current.get(r);o?c.set(r,{...o,isCompleted:s}):c.set(r,{isCompleted:s}),t.push({type:"summary-group",summaries:[...a],groupKey:r}),a=[]}};for(const s of f)if(s.type==="text")l(!0),e+=s.text||"";else if(s.type==="data-summary")e.trim()&&(t.push({type:"text",text:e}),e=""),a.push(s.data);else if(s.type==="data-operation"){e.trim()&&(t.push({type:"text",text:e}),e="");const r=s.data;if(r?.type)switch(r.type){case"agent_initializing":break;case"completion":l(!0);break;case"error":{const o=r.message||"Unknown error";if(console.warn("Data operation error:",o),!t.length)l(!0),d(new Error(o)),i||(t.push({type:"text",text:E.DEFAULT_ERROR_MESSAGE}),i=!0);else{const{type:g,label:v}=r;a.push({type:g,label:v})}break}default:{const{type:o,label:g}=r;a.push({type:o,label:g});break}}}else if(s.type==="data-artifact")if(s.data?.type?.toLowerCase()==="citation"){const r=s.data,o=r.artifactSummary||{title:r.name};e+=` ^${o?.title||r.name}^`}else e.trim()&&(t.push({type:"text",text:e}),e=""),t.push(s);else s.type==="data-component"&&(e.trim()&&(t.push({type:"text",text:e}),e=""),l(!0),t.push(s));return l(!u),e.trim()&&t.push({type:"text",text:e}),{processed:t,newTimings:c}},[f,u,d]);n.useEffect(()=>{if(R.current===f)return;R.current=f;const{processed:t,newTimings:e}=b();D(t),(e.size!==m.current.size||Array.from(e.entries()).some(([i,c])=>{const l=m.current.get(i);return!l||l.isCompleted!==c.isCompleted}))&&w(e)},[b,f]),n.useEffect(()=>{u||w(t=>{const e=new Map(t);let a=!1;for(const[i,c]of e.entries())c.isCompleted||(e.set(i,{...c,isCompleted:!0}),a=!0);return a?e:t})},[u]);const k=n.useCallback(()=>{const t=Date.now()-x,e=Array.from(m.current.values()).some(i=>!i.isCompleted),a=t>1e3&&!e;y(a)},[x]);n.useEffect(()=>{if(!u){y(!1);return}if(!(p.length>0)){y(!1);return}const e=setInterval(k,200);return()=>clearInterval(e)},[u,k,p.length]);const P=n.useMemo(()=>!!(!(p.length>0)&&u),[p.length,u]);return{processedParts:p,summaryTimings:h,shouldShowInitialLoading:P,shouldShowStreamDelayLoading:A}}exports.useStreamProcessor=L;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Message } from '../../../types/index.ts';
|
|
2
|
+
interface SummaryTiming {
|
|
3
|
+
isCompleted: boolean;
|
|
4
|
+
}
|
|
5
|
+
interface DataSummary {
|
|
6
|
+
type: string;
|
|
7
|
+
label?: string;
|
|
8
|
+
details?: Record<string, unknown>;
|
|
9
|
+
}
|
|
10
|
+
interface TextPart {
|
|
11
|
+
type: 'text';
|
|
12
|
+
text?: string;
|
|
13
|
+
}
|
|
14
|
+
interface SummaryGroupPart {
|
|
15
|
+
type: 'summary-group';
|
|
16
|
+
summaries?: DataSummary[];
|
|
17
|
+
groupKey: string;
|
|
18
|
+
}
|
|
19
|
+
type SummaryPart = TextPart | SummaryGroupPart;
|
|
20
|
+
type ProcessedPart = SummaryPart | Message['parts'][number];
|
|
21
|
+
export interface UseStreamProcessorReturn {
|
|
22
|
+
processedParts: ProcessedPart[];
|
|
23
|
+
summaryTimings: Map<string, SummaryTiming>;
|
|
24
|
+
shouldShowInitialLoading: boolean;
|
|
25
|
+
shouldShowStreamDelayLoading: boolean;
|
|
26
|
+
}
|
|
27
|
+
export declare function useStreamProcessor(parts: Message['parts'], isStreaming: boolean, setError: (error: Error) => void): UseStreamProcessorReturn;
|
|
28
|
+
export {};
|