@refraction-ui/react 0.11.0 → 0.12.1
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.cjs +300 -166
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +300 -166
- package/dist/index.js.map +1 -1
- package/dist/internal/react-conversation/index.d.cts +4 -1
- package/dist/internal/react-conversation/index.d.ts +4 -1
- package/dist/internal/react-cookie-consent/index.d.cts +1 -2
- package/dist/internal/react-cookie-consent/index.d.ts +1 -2
- package/package.json +1 -1
|
@@ -57,6 +57,9 @@ interface ComposerProps {
|
|
|
57
57
|
emoji?: boolean;
|
|
58
58
|
/** Enable the attach button (default true) */
|
|
59
59
|
attachments?: boolean;
|
|
60
|
+
/** Error to surface above the input (with a Retry button) */
|
|
61
|
+
error?: string | null;
|
|
62
|
+
onRetry?: () => void;
|
|
60
63
|
onSubmit: (content: string, attachments?: MessageAttachment[]) => void;
|
|
61
64
|
onStop?: () => void;
|
|
62
65
|
/** Called when a `/` command without `insertText` is chosen */
|
|
@@ -67,7 +70,7 @@ interface ComposerProps {
|
|
|
67
70
|
* Composer — rich message input: markdown formatting toolbar + Cmd/Ctrl shortcuts,
|
|
68
71
|
* and `/` command, `@` mention, and `:` emoji autocomplete menus.
|
|
69
72
|
*/
|
|
70
|
-
declare function Composer({ placeholder, busy, slashCommands, mentions, toolbar, emoji, attachments, onSubmit, onStop, onSlashCommand, autoFocus, }: ComposerProps): React.DetailedReactHTMLElement<{
|
|
73
|
+
declare function Composer({ placeholder, busy, slashCommands, mentions, toolbar, emoji, attachments, error, onRetry, onSubmit, onStop, onSlashCommand, autoFocus, }: ComposerProps): React.DetailedReactHTMLElement<{
|
|
71
74
|
className: string;
|
|
72
75
|
}, HTMLElement>;
|
|
73
76
|
|
|
@@ -57,6 +57,9 @@ interface ComposerProps {
|
|
|
57
57
|
emoji?: boolean;
|
|
58
58
|
/** Enable the attach button (default true) */
|
|
59
59
|
attachments?: boolean;
|
|
60
|
+
/** Error to surface above the input (with a Retry button) */
|
|
61
|
+
error?: string | null;
|
|
62
|
+
onRetry?: () => void;
|
|
60
63
|
onSubmit: (content: string, attachments?: MessageAttachment[]) => void;
|
|
61
64
|
onStop?: () => void;
|
|
62
65
|
/** Called when a `/` command without `insertText` is chosen */
|
|
@@ -67,7 +70,7 @@ interface ComposerProps {
|
|
|
67
70
|
* Composer — rich message input: markdown formatting toolbar + Cmd/Ctrl shortcuts,
|
|
68
71
|
* and `/` command, `@` mention, and `:` emoji autocomplete menus.
|
|
69
72
|
*/
|
|
70
|
-
declare function Composer({ placeholder, busy, slashCommands, mentions, toolbar, emoji, attachments, onSubmit, onStop, onSlashCommand, autoFocus, }: ComposerProps): React.DetailedReactHTMLElement<{
|
|
73
|
+
declare function Composer({ placeholder, busy, slashCommands, mentions, toolbar, emoji, attachments, error, onRetry, onSubmit, onStop, onSlashCommand, autoFocus, }: ComposerProps): React.DetailedReactHTMLElement<{
|
|
71
74
|
className: string;
|
|
72
75
|
}, HTMLElement>;
|
|
73
76
|
|
|
@@ -33,8 +33,7 @@ interface CookieConsentProps {
|
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
35
|
* CookieConsent — batteries-included consent banner over `useCookieConsent()`.
|
|
36
|
-
*
|
|
37
|
-
* per-category toggles. Renders nothing once the user has consented.
|
|
36
|
+
* Renders nothing once the user has consented.
|
|
38
37
|
*/
|
|
39
38
|
declare function CookieConsent({ consent, position, title, description, policyUrl, policyLabel, className, }: CookieConsentProps): React.DetailedReactHTMLElement<{
|
|
40
39
|
className: string;
|
|
@@ -33,8 +33,7 @@ interface CookieConsentProps {
|
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
35
|
* CookieConsent — batteries-included consent banner over `useCookieConsent()`.
|
|
36
|
-
*
|
|
37
|
-
* per-category toggles. Renders nothing once the user has consented.
|
|
36
|
+
* Renders nothing once the user has consented.
|
|
38
37
|
*/
|
|
39
38
|
declare function CookieConsent({ consent, position, title, description, policyUrl, policyLabel, className, }: CookieConsentProps): React.DetailedReactHTMLElement<{
|
|
40
39
|
className: string;
|
package/package.json
CHANGED