@kat-ai/react 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +46 -0
- package/dist/index.d.ts +46 -0
- package/dist/index.js +995 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +956 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +63 -0
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { Citation, MultiChoiceOption } from '@kbs/core';
|
|
3
|
+
|
|
4
|
+
interface CitationDialogProps {
|
|
5
|
+
url: string | null;
|
|
6
|
+
isOpen: boolean;
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
citation?: Citation;
|
|
9
|
+
}
|
|
10
|
+
declare function CitationDialog({ url, isOpen, onClose, citation }: CitationDialogProps): react_jsx_runtime.JSX.Element | null;
|
|
11
|
+
|
|
12
|
+
interface CitationDisplayProps {
|
|
13
|
+
citations: Citation[];
|
|
14
|
+
onCitationClick: (citation: Citation) => void;
|
|
15
|
+
chipColor?: string;
|
|
16
|
+
borderColor?: string;
|
|
17
|
+
/** Maximum length for reference summary text (default: 40) */
|
|
18
|
+
maxSummaryLength?: number;
|
|
19
|
+
}
|
|
20
|
+
declare function CitationDisplay({ citations, onCitationClick, chipColor, borderColor, maxSummaryLength }: CitationDisplayProps): react_jsx_runtime.JSX.Element | null;
|
|
21
|
+
|
|
22
|
+
interface MultiChoiceWidgetProps {
|
|
23
|
+
/** Array of options to display */
|
|
24
|
+
options: MultiChoiceOption[];
|
|
25
|
+
/** Callback when an option is selected */
|
|
26
|
+
onSelect: (value: string) => void;
|
|
27
|
+
/** Optional placeholder for the free text input */
|
|
28
|
+
freeTextPlaceholder?: string;
|
|
29
|
+
/** Background color for option chips */
|
|
30
|
+
chipColor?: string;
|
|
31
|
+
/** Border color for option chips */
|
|
32
|
+
borderColor?: string;
|
|
33
|
+
/** Accent color for hover and focus states */
|
|
34
|
+
accentColor?: string;
|
|
35
|
+
/** Text color */
|
|
36
|
+
textColor?: string;
|
|
37
|
+
/** Whether the widget is disabled (e.g., while sending) */
|
|
38
|
+
disabled?: boolean;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Multi-choice widget for disambiguation questions.
|
|
42
|
+
* Displays clickable option chips with an additional free-text input option.
|
|
43
|
+
*/
|
|
44
|
+
declare function MultiChoiceWidget({ options, onSelect, freeTextPlaceholder, chipColor, borderColor, accentColor, textColor, disabled, }: MultiChoiceWidgetProps): react_jsx_runtime.JSX.Element;
|
|
45
|
+
|
|
46
|
+
export { CitationDialog, type CitationDialogProps, CitationDisplay, type CitationDisplayProps, MultiChoiceWidget, type MultiChoiceWidgetProps };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { Citation, MultiChoiceOption } from '@kbs/core';
|
|
3
|
+
|
|
4
|
+
interface CitationDialogProps {
|
|
5
|
+
url: string | null;
|
|
6
|
+
isOpen: boolean;
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
citation?: Citation;
|
|
9
|
+
}
|
|
10
|
+
declare function CitationDialog({ url, isOpen, onClose, citation }: CitationDialogProps): react_jsx_runtime.JSX.Element | null;
|
|
11
|
+
|
|
12
|
+
interface CitationDisplayProps {
|
|
13
|
+
citations: Citation[];
|
|
14
|
+
onCitationClick: (citation: Citation) => void;
|
|
15
|
+
chipColor?: string;
|
|
16
|
+
borderColor?: string;
|
|
17
|
+
/** Maximum length for reference summary text (default: 40) */
|
|
18
|
+
maxSummaryLength?: number;
|
|
19
|
+
}
|
|
20
|
+
declare function CitationDisplay({ citations, onCitationClick, chipColor, borderColor, maxSummaryLength }: CitationDisplayProps): react_jsx_runtime.JSX.Element | null;
|
|
21
|
+
|
|
22
|
+
interface MultiChoiceWidgetProps {
|
|
23
|
+
/** Array of options to display */
|
|
24
|
+
options: MultiChoiceOption[];
|
|
25
|
+
/** Callback when an option is selected */
|
|
26
|
+
onSelect: (value: string) => void;
|
|
27
|
+
/** Optional placeholder for the free text input */
|
|
28
|
+
freeTextPlaceholder?: string;
|
|
29
|
+
/** Background color for option chips */
|
|
30
|
+
chipColor?: string;
|
|
31
|
+
/** Border color for option chips */
|
|
32
|
+
borderColor?: string;
|
|
33
|
+
/** Accent color for hover and focus states */
|
|
34
|
+
accentColor?: string;
|
|
35
|
+
/** Text color */
|
|
36
|
+
textColor?: string;
|
|
37
|
+
/** Whether the widget is disabled (e.g., while sending) */
|
|
38
|
+
disabled?: boolean;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Multi-choice widget for disambiguation questions.
|
|
42
|
+
* Displays clickable option chips with an additional free-text input option.
|
|
43
|
+
*/
|
|
44
|
+
declare function MultiChoiceWidget({ options, onSelect, freeTextPlaceholder, chipColor, borderColor, accentColor, textColor, disabled, }: MultiChoiceWidgetProps): react_jsx_runtime.JSX.Element;
|
|
45
|
+
|
|
46
|
+
export { CitationDialog, type CitationDialogProps, CitationDisplay, type CitationDisplayProps, MultiChoiceWidget, type MultiChoiceWidgetProps };
|