@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,167 @@
|
|
|
1
|
+
import { InkeepSearchSettings } from '../../types/index.ts';
|
|
2
|
+
export declare const defaultInkeepAIChatSettings: {
|
|
3
|
+
placeholder: string;
|
|
4
|
+
aiAssistantName: undefined;
|
|
5
|
+
shouldOpenLinksInNewTab: true;
|
|
6
|
+
disclaimerSettings: {
|
|
7
|
+
isEnabled: false;
|
|
8
|
+
label: string;
|
|
9
|
+
};
|
|
10
|
+
isShareButtonVisible: false;
|
|
11
|
+
isViewOnly: false;
|
|
12
|
+
exampleQuestionsLabel: string;
|
|
13
|
+
exampleQuestions: never[];
|
|
14
|
+
isFirstExampleQuestionHighlighted: true;
|
|
15
|
+
isCopyChatButtonVisible: false;
|
|
16
|
+
getHelpOptions: never[];
|
|
17
|
+
workflowsHeader: string;
|
|
18
|
+
workflows: never[];
|
|
19
|
+
toolbarButtonLabels: {
|
|
20
|
+
clear: string;
|
|
21
|
+
share: string;
|
|
22
|
+
getHelp: string;
|
|
23
|
+
stop: string;
|
|
24
|
+
copyChat: string;
|
|
25
|
+
};
|
|
26
|
+
context: {};
|
|
27
|
+
};
|
|
28
|
+
export declare const defaultInkeepBaseSettings: {
|
|
29
|
+
shouldBypassCaptcha: false;
|
|
30
|
+
tags: never[];
|
|
31
|
+
userProperties: {};
|
|
32
|
+
primaryBrandColor: string;
|
|
33
|
+
theme: {
|
|
34
|
+
colors: {
|
|
35
|
+
whiteAlpha: {
|
|
36
|
+
50: string;
|
|
37
|
+
100: string;
|
|
38
|
+
200: string;
|
|
39
|
+
300: string;
|
|
40
|
+
400: string;
|
|
41
|
+
500: string;
|
|
42
|
+
600: string;
|
|
43
|
+
700: string;
|
|
44
|
+
800: string;
|
|
45
|
+
900: string;
|
|
46
|
+
950: string;
|
|
47
|
+
1000: string;
|
|
48
|
+
};
|
|
49
|
+
blackAlpha: {
|
|
50
|
+
50: string;
|
|
51
|
+
100: string;
|
|
52
|
+
200: string;
|
|
53
|
+
300: string;
|
|
54
|
+
400: string;
|
|
55
|
+
500: string;
|
|
56
|
+
600: string;
|
|
57
|
+
700: string;
|
|
58
|
+
800: string;
|
|
59
|
+
900: string;
|
|
60
|
+
950: string;
|
|
61
|
+
1000: string;
|
|
62
|
+
};
|
|
63
|
+
gray: {
|
|
64
|
+
50: string;
|
|
65
|
+
100: string;
|
|
66
|
+
200: string;
|
|
67
|
+
300: string;
|
|
68
|
+
400: string;
|
|
69
|
+
500: string;
|
|
70
|
+
600: string;
|
|
71
|
+
700: string;
|
|
72
|
+
800: string;
|
|
73
|
+
900: string;
|
|
74
|
+
950: string;
|
|
75
|
+
1000: string;
|
|
76
|
+
};
|
|
77
|
+
grayDark: {
|
|
78
|
+
1000: string;
|
|
79
|
+
950: string;
|
|
80
|
+
900: string;
|
|
81
|
+
800: string;
|
|
82
|
+
700: string;
|
|
83
|
+
600: string;
|
|
84
|
+
500: string;
|
|
85
|
+
400: string;
|
|
86
|
+
300: string;
|
|
87
|
+
200: string;
|
|
88
|
+
100: string;
|
|
89
|
+
50: string;
|
|
90
|
+
};
|
|
91
|
+
overlay: {
|
|
92
|
+
light: string;
|
|
93
|
+
dark: string;
|
|
94
|
+
};
|
|
95
|
+
inkeepPrimary: {
|
|
96
|
+
textColorOnPrimary: string;
|
|
97
|
+
};
|
|
98
|
+
inkeepExpandedPrimary: {
|
|
99
|
+
"50": string;
|
|
100
|
+
"100": string;
|
|
101
|
+
"200": string;
|
|
102
|
+
"300": string;
|
|
103
|
+
"400": string;
|
|
104
|
+
"500": string;
|
|
105
|
+
"600": string;
|
|
106
|
+
"700": string;
|
|
107
|
+
"800": string;
|
|
108
|
+
"900": string;
|
|
109
|
+
"950": string;
|
|
110
|
+
"1000": string;
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
fontFamily: {
|
|
114
|
+
heading: string;
|
|
115
|
+
body: string;
|
|
116
|
+
mono: string;
|
|
117
|
+
};
|
|
118
|
+
fontSize: {
|
|
119
|
+
'3xs': string;
|
|
120
|
+
'2xs': string;
|
|
121
|
+
'1xs': string;
|
|
122
|
+
xs: string;
|
|
123
|
+
'1sm': string;
|
|
124
|
+
sm: string;
|
|
125
|
+
'2sm': string;
|
|
126
|
+
md: string;
|
|
127
|
+
lg: string;
|
|
128
|
+
xl: string;
|
|
129
|
+
'2xl': string;
|
|
130
|
+
'3xl': string;
|
|
131
|
+
'4xl': string;
|
|
132
|
+
'5xl': string;
|
|
133
|
+
'6xl': string;
|
|
134
|
+
'7xl': string;
|
|
135
|
+
'8xl': string;
|
|
136
|
+
'9xl': string;
|
|
137
|
+
};
|
|
138
|
+
zIndex: {
|
|
139
|
+
hide: number;
|
|
140
|
+
auto: string;
|
|
141
|
+
base: number;
|
|
142
|
+
start: number;
|
|
143
|
+
docked: number;
|
|
144
|
+
dropdown: number;
|
|
145
|
+
sticky: number;
|
|
146
|
+
banner: number;
|
|
147
|
+
overlay: number;
|
|
148
|
+
modal: number;
|
|
149
|
+
popover: number;
|
|
150
|
+
skipLink: number;
|
|
151
|
+
toast: number;
|
|
152
|
+
tooltip: number;
|
|
153
|
+
};
|
|
154
|
+
varsClassName: string;
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
export declare const defaultInkeepSearchSettings: {
|
|
158
|
+
shouldOpenLinksInNewTab: false;
|
|
159
|
+
defaultQuery: string;
|
|
160
|
+
debounceTimeMs: number;
|
|
161
|
+
tabs: string[];
|
|
162
|
+
placeholder: string;
|
|
163
|
+
view: InkeepSearchSettings["view"];
|
|
164
|
+
};
|
|
165
|
+
export type DefaultInkeepAIChatSettings = typeof defaultInkeepAIChatSettings;
|
|
166
|
+
export type DefaultInkeepBaseSettings = typeof defaultInkeepBaseSettings;
|
|
167
|
+
export type DefaultInkeepSearchSettings = typeof defaultInkeepSearchSettings;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { MessageAttachment, MessageAttributes, Workflow } from '../../types/index.ts';
|
|
2
|
+
export declare function getMessageMetadata(workflow: Workflow | null, attachments: MessageAttachment[], isNewChat: boolean): {
|
|
3
|
+
context: string | undefined;
|
|
4
|
+
attributes: MessageAttributes;
|
|
5
|
+
} | undefined;
|
|
6
|
+
export declare function serializeWorkflow(workflow: Workflow): string | undefined;
|
|
7
|
+
export declare function stringifyAttachments(attachments: MessageAttachment[] | undefined): string | undefined;
|
|
8
|
+
export declare function serializeAttachments(_attachments: MessageAttachment[]): string | undefined;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
[key: string]: any;
|
|
3
|
+
}
|
|
4
|
+
type TupleTypes<T extends any[]> = T[number];
|
|
5
|
+
type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
|
|
6
|
+
export declare function mergeProps<T extends Props>(...args: T[]): UnionToIntersection<TupleTypes<T[]>>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Message } from '../../types/index.ts';
|
|
2
|
+
export declare const callAll: <T extends (...a: any[]) => void>(...fns: (T | undefined)[]) => (...a: Parameters<T>) => void;
|
|
3
|
+
export declare const isString: (v: any) => v is string;
|
|
4
|
+
/**
|
|
5
|
+
* Converts camelCase or PascalCase strings to kebab-case.
|
|
6
|
+
*/
|
|
7
|
+
export declare function toKebabCase(input: string): string;
|
|
8
|
+
export type Booleanish = boolean | 'true' | 'false';
|
|
9
|
+
export declare const dataAttr: (guard: boolean | undefined) => Booleanish;
|
|
10
|
+
export declare function getInitials(name: string): string;
|
|
11
|
+
export declare function maybeRender<T>(children: ((param: T) => React.ReactNode) | React.ReactNode, param: T): React.ReactNode;
|
|
12
|
+
export declare const getMessageContent: (message: Message) => string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generic utility to split props based on specified keys.
|
|
3
|
+
* Useful for separating component configuration props from DOM props.
|
|
4
|
+
*
|
|
5
|
+
* @param props - The props object to split
|
|
6
|
+
* @param keys - Array of keys to extract from props
|
|
7
|
+
* @returns Tuple of [extracted props, remaining props]
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* const CONFIG_KEYS = ['variant', 'size', 'disabled'] as const
|
|
12
|
+
* const [configProps, domProps] = splitProps(props, CONFIG_KEYS)
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
export declare function splitProps<T extends Record<string, unknown>, K extends keyof T>(props: T, keys: readonly K[]): [Pick<T, K>, Omit<T, K>];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { InkeepAIChatSettings, InkeepModalSettings } from '../types/index.ts';
|
|
2
|
+
import { InkeepEmbeddedSearchAndChatProps } from './embedded-search-and-chat';
|
|
3
|
+
export interface InkeepChatButtonProps extends Omit<InkeepEmbeddedSearchAndChatProps, 'onToggleView'> {
|
|
4
|
+
modalSettings?: InkeepModalSettings;
|
|
5
|
+
label?: string;
|
|
6
|
+
avatar?: InkeepAIChatSettings['aiAssistantAvatar'];
|
|
7
|
+
canToggleView?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare function InkeepChatButton(props: InkeepChatButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
interface ChatButtonImplProps extends Pick<InkeepChatButtonProps, 'label' | 'avatar'> {
|
|
11
|
+
onOpenChange?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
12
|
+
}
|
|
13
|
+
export declare function ChatButtonImpl({ label, avatar, onOpenChange }: ChatButtonImplProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { WidgetView, InkeepConfig } from '../types/index.ts';
|
|
2
|
+
import { default as React, PropsWithChildren } from 'react';
|
|
3
|
+
import { EmbeddedChatProviderProps } from '../styled';
|
|
4
|
+
type ChatConfig = Pick<InkeepConfig, 'baseSettings' | 'aiChatSettings'>;
|
|
5
|
+
type InkeepEmbeddedChatImplProps = EmbeddedChatProviderProps & WidgetView & {
|
|
6
|
+
variant?: 'no-shadow' | 'container-with-shadow';
|
|
7
|
+
header?: React.ComponentType<InkeepEmbeddedChatProps>;
|
|
8
|
+
};
|
|
9
|
+
export type InkeepEmbeddedChatProps = InkeepEmbeddedChatImplProps & Partial<ChatConfig>;
|
|
10
|
+
export declare function InkeepEmbeddedChat(props: InkeepEmbeddedChatProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare function InkeepEmbeddedChatProvider(props: PropsWithChildren<InkeepEmbeddedChatImplProps>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare function InkeepEmbeddedChatImpl(props: InkeepEmbeddedChatImplProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare function InkeepEmbeddedChatImplContent(props: InkeepEmbeddedChatImplProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { useWidgetImpl } from './embedded-search-and-chat.impl';
|
|
2
|
+
import { ModalViewTypes, InkeepConfig, WidgetView } from '../types/index.ts';
|
|
3
|
+
import { RefObject } from 'react';
|
|
4
|
+
export interface InkeepEmbeddedSearchAndChatFunctions {
|
|
5
|
+
setView: (view: ModalViewTypes) => void;
|
|
6
|
+
}
|
|
7
|
+
export interface InkeepEmbeddedSearchAndChatProps extends Partial<Omit<InkeepConfig, 'componentType'>>, WidgetView {
|
|
8
|
+
/**
|
|
9
|
+
* The default view to show when the widget is loaded.
|
|
10
|
+
* @default 'search'
|
|
11
|
+
*/
|
|
12
|
+
defaultView?: ModalViewTypes;
|
|
13
|
+
/**
|
|
14
|
+
* Whether to always open the widget in the default view. (Modal only)
|
|
15
|
+
*
|
|
16
|
+
* By default, subsequent opens will remember the last view.
|
|
17
|
+
* This prop will force the widget to always open in the default view.
|
|
18
|
+
*
|
|
19
|
+
* @default false
|
|
20
|
+
*/
|
|
21
|
+
forceDefaultView?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Whether to show the Ask AI card.
|
|
24
|
+
* @default false
|
|
25
|
+
*/
|
|
26
|
+
shouldShowAskAICard?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Whether to auto focus the input.
|
|
29
|
+
* @default false
|
|
30
|
+
*/
|
|
31
|
+
shouldAutoFocusInput?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* A ref to the component functions.
|
|
34
|
+
*/
|
|
35
|
+
ref?: RefObject<InkeepEmbeddedSearchAndChatFunctions>;
|
|
36
|
+
}
|
|
37
|
+
export declare function InkeepEmbeddedSearchAndChat(props: InkeepEmbeddedSearchAndChatProps): import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
type InkeepEmbeddedSearchAndChatImplProps = Omit<ReturnType<typeof useWidgetImpl>, 'config'>;
|
|
39
|
+
export declare function InkeepEmbeddedSearchAndChatImpl(props: InkeepEmbeddedSearchAndChatImplProps): import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { InkeepEmbeddedSearchAndChatProps } from './embedded-search-and-chat';
|
|
2
|
+
import { ModalViewTypes, InkeepConfig } from '../types/index.ts';
|
|
3
|
+
interface UseWidgetImpReturn extends InkeepEmbeddedSearchAndChatProps {
|
|
4
|
+
config: InkeepConfig;
|
|
5
|
+
view: ModalViewTypes;
|
|
6
|
+
setView: (view: ModalViewTypes) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function useWidgetImpl<T extends InkeepEmbeddedSearchAndChatProps>(props: T): UseWidgetImpReturn;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { WidgetView, InkeepConfig } from '../types/index.ts';
|
|
2
|
+
import { PropsWithChildren } from 'react';
|
|
3
|
+
import { EmbeddedSearchProviderProps } from '../styled';
|
|
4
|
+
type SearchConfig = Pick<InkeepConfig, 'baseSettings' | 'searchSettings'>;
|
|
5
|
+
type InkeepEmbeddedSearchImplProps = EmbeddedSearchProviderProps & WidgetView & {
|
|
6
|
+
/**
|
|
7
|
+
* Whether to show the Ask AI card.
|
|
8
|
+
* @default false
|
|
9
|
+
*/
|
|
10
|
+
shouldShowAskAICard?: boolean;
|
|
11
|
+
};
|
|
12
|
+
export type InkeepEmbeddedSearchProps = InkeepEmbeddedSearchImplProps & Partial<SearchConfig>;
|
|
13
|
+
export declare function InkeepEmbeddedSearch(props: InkeepEmbeddedSearchProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare function InkeepEmbeddedSearchProvider(props: PropsWithChildren<InkeepEmbeddedSearchImplProps>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare function InkeepEmbeddedSearchImpl(props: InkeepEmbeddedSearchImplProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare function InkeepEmbeddedSearchImplContent(props: InkeepEmbeddedSearchImplProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from './embedded-chat';
|
|
2
|
+
export * from './sidebar-chat';
|
|
3
|
+
export * from './embedded-search-and-chat';
|
|
4
|
+
export * from './embedded-search';
|
|
5
|
+
export * from './modal.chat';
|
|
6
|
+
export * from './modal.search-and-chat';
|
|
7
|
+
export * from './modal.search';
|
|
8
|
+
export * from './modal';
|
|
9
|
+
export * from './chat-button';
|
|
10
|
+
export * from './searchbar';
|
|
11
|
+
export * from '../styled';
|
|
12
|
+
export * from '../color-mode';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { InkeepModalSettings } from '../types/index.ts';
|
|
2
|
+
import { InkeepEmbeddedChatProps } from './embedded-chat';
|
|
3
|
+
export interface InkeepModalChatProps extends Omit<InkeepEmbeddedChatProps, 'onToggleView'> {
|
|
4
|
+
modalSettings?: InkeepModalSettings;
|
|
5
|
+
}
|
|
6
|
+
export declare function InkeepModalChat(props: InkeepModalChatProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { InkeepModalSettings } from '../types/index.ts';
|
|
2
|
+
import { WebWidgetInteractionType, RootProviderProps } from '../styled';
|
|
3
|
+
import { PropsWithChildren } from 'react';
|
|
4
|
+
type RootConfig = RootProviderProps['config'];
|
|
5
|
+
interface ModalConfig extends RootConfig {
|
|
6
|
+
/**
|
|
7
|
+
* The configuration for the modal.
|
|
8
|
+
*/
|
|
9
|
+
modalSettings?: InkeepModalSettings;
|
|
10
|
+
}
|
|
11
|
+
export interface InkeepModalProps extends ModalConfig {
|
|
12
|
+
/**
|
|
13
|
+
* The content of the modal.
|
|
14
|
+
*/
|
|
15
|
+
children: React.ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* The interaction type for the modal widget.
|
|
18
|
+
*/
|
|
19
|
+
componentType: (typeof WebWidgetInteractionType)[keyof typeof WebWidgetInteractionType];
|
|
20
|
+
}
|
|
21
|
+
export declare function InkeepModal(props: InkeepModalProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare function ModalContent(props: PropsWithChildren): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { InkeepModalSettings } from '../types/index.ts';
|
|
2
|
+
import { InkeepEmbeddedSearchAndChatProps } from './embedded-search-and-chat';
|
|
3
|
+
export interface InkeepModalSearchAndChatProps extends InkeepEmbeddedSearchAndChatProps {
|
|
4
|
+
modalSettings?: InkeepModalSettings;
|
|
5
|
+
}
|
|
6
|
+
export declare function InkeepModalSearchAndChat(props: InkeepModalSearchAndChatProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { InkeepModalSettings } from '../types/index.ts';
|
|
2
|
+
import { InkeepEmbeddedSearchProps } from './embedded-search';
|
|
3
|
+
export interface InkeepModalSearchProps extends Omit<InkeepEmbeddedSearchProps, 'onToggleView'> {
|
|
4
|
+
modalSettings?: InkeepModalSettings;
|
|
5
|
+
}
|
|
6
|
+
export declare function InkeepModalSearch(props: InkeepModalSearchProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { InkeepModalSettings } from '../types/index.ts';
|
|
2
|
+
import { InkeepEmbeddedSearchAndChatProps } from './embedded-search-and-chat';
|
|
3
|
+
export interface InkeepSearchBarProps extends Omit<InkeepEmbeddedSearchAndChatProps, 'onToggleView'> {
|
|
4
|
+
modalSettings?: InkeepModalSettings;
|
|
5
|
+
canToggleView?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare function InkeepSearchBar(props: InkeepSearchBarProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
interface SearchBarImplProps {
|
|
9
|
+
onOpenChange?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
10
|
+
modalSettings: InkeepSearchBarProps['modalSettings'];
|
|
11
|
+
}
|
|
12
|
+
export declare function SearchBarImpl({ onOpenChange, modalSettings }: SearchBarImplProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { InkeepConfig } from '../types/index.ts';
|
|
2
|
+
import { EmbeddedChatProviderProps, SidebarChatProps } from '../styled';
|
|
3
|
+
type ChatConfig = Pick<InkeepConfig, 'baseSettings' | 'aiChatSettings'>;
|
|
4
|
+
export type InkeepSidebarChatProps = Omit<EmbeddedChatProviderProps, 'isHidden'> & Partial<ChatConfig> & SidebarChatProps;
|
|
5
|
+
export declare function InkeepSidebarChat(props: InkeepSidebarChatProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
type PossibleRef<T> = React.Ref<T | null> | undefined;
|
|
2
|
+
export declare function composeRefs<T>(...refs: PossibleRef<T>[]): (node: T | null) => void;
|
|
3
|
+
export declare function composeEventHandlers<E>(originalEventHandler?: (event: E) => void, ourEventHandler?: (event: E) => void, { checkForDefaultPrevented }?: {
|
|
4
|
+
checkForDefaultPrevented?: boolean | undefined;
|
|
5
|
+
}): (event: E) => void;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ModalViewTypes, OnToggleView } from '../types/index.ts';
|
|
2
|
+
export declare function WidgetToggle(props: {
|
|
3
|
+
onToggleView: OnToggleView;
|
|
4
|
+
query?: string;
|
|
5
|
+
askAILabel?: string;
|
|
6
|
+
searchLabel?: string;
|
|
7
|
+
view: ModalViewTypes;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare function useToggleView(props: {
|
|
10
|
+
onToggleView?: OnToggleView;
|
|
11
|
+
query?: string;
|
|
12
|
+
}): {
|
|
13
|
+
handleToggle: (view: ModalViewTypes, autoSubmit?: boolean) => void;
|
|
14
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ChatButtonPrimitive } from '../../primitives';
|
|
2
|
+
import { ComponentPropsWithRef } from 'react';
|
|
3
|
+
declare const ChatButtonContainer: ({ className, ...props }: ComponentPropsWithRef<typeof ChatButtonPrimitive.ChatButtonContainer>) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare const ChatButton: ({ className, ...props }: ComponentPropsWithRef<typeof ChatButtonPrimitive.ChatButton>) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare const ChatButtonText: ({ className, ...props }: ComponentPropsWithRef<typeof ChatButtonPrimitive.ChatButtonText>) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare const ChatButtonAvatarImage: ({ className, ...props }: React.ComponentPropsWithRef<typeof ChatButtonPrimitive.ChatButtonAvatarImage>) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare const ChatButtonAvatarContent: ({ className, ...props }: React.ComponentPropsWithRef<typeof ChatButtonPrimitive.ChatButtonAvatarContent>) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export { ChatButtonContainer as Container, ChatButton, ChatButtonText, ChatButtonAvatarImage, ChatButtonAvatarContent, };
|