@liveblocks/react-ui 2.25.0-aiprivatebeta0 → 2.25.0-aiprivatebeta10
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/_private/index.cjs +18 -10
- package/dist/_private/index.cjs.map +1 -1
- package/dist/_private/index.d.cts +204 -172
- package/dist/_private/index.d.ts +204 -172
- package/dist/_private/index.js +12 -5
- package/dist/_private/index.js.map +1 -1
- package/dist/components/AiChat.cjs +185 -0
- package/dist/components/AiChat.cjs.map +1 -0
- package/dist/components/AiChat.js +183 -0
- package/dist/components/AiChat.js.map +1 -0
- package/dist/components/AiTool.cjs +164 -0
- package/dist/components/AiTool.cjs.map +1 -0
- package/dist/components/AiTool.js +162 -0
- package/dist/components/AiTool.js.map +1 -0
- package/dist/components/Comment.cjs +7 -5
- package/dist/components/Comment.cjs.map +1 -1
- package/dist/components/Comment.js +7 -5
- package/dist/components/Comment.js.map +1 -1
- package/dist/components/Composer.cjs +1 -2
- package/dist/components/Composer.cjs.map +1 -1
- package/dist/components/Composer.js +1 -2
- package/dist/components/Composer.js.map +1 -1
- package/dist/components/InboxNotificationList.cjs +11 -3
- package/dist/components/InboxNotificationList.cjs.map +1 -1
- package/dist/components/InboxNotificationList.js +12 -4
- package/dist/components/InboxNotificationList.js.map +1 -1
- package/dist/components/Thread.cjs +3 -3
- package/dist/components/Thread.cjs.map +1 -1
- package/dist/components/Thread.js +3 -3
- package/dist/components/Thread.js.map +1 -1
- package/dist/components/internal/AiChatAssistantMessage.cjs +74 -291
- package/dist/components/internal/AiChatAssistantMessage.cjs.map +1 -1
- package/dist/components/internal/AiChatAssistantMessage.js +76 -293
- package/dist/components/internal/AiChatAssistantMessage.js.map +1 -1
- package/dist/components/internal/AiChatComposer.cjs +58 -282
- package/dist/components/internal/AiChatComposer.cjs.map +1 -1
- package/dist/components/internal/AiChatComposer.js +63 -283
- package/dist/components/internal/AiChatComposer.js.map +1 -1
- package/dist/components/internal/AiChatUserMessage.cjs +26 -169
- package/dist/components/internal/AiChatUserMessage.cjs.map +1 -1
- package/dist/components/internal/AiChatUserMessage.js +28 -171
- package/dist/components/internal/AiChatUserMessage.js.map +1 -1
- package/dist/components/internal/Button.cjs.map +1 -1
- package/dist/components/internal/Button.js.map +1 -1
- package/dist/components/internal/CodeBlock.cjs +72 -0
- package/dist/components/internal/CodeBlock.cjs.map +1 -0
- package/dist/components/internal/CodeBlock.js +70 -0
- package/dist/components/internal/CodeBlock.js.map +1 -0
- package/dist/components/internal/Emoji.cjs +12 -4
- package/dist/components/internal/Emoji.cjs.map +1 -1
- package/dist/components/internal/Emoji.js +12 -4
- package/dist/components/internal/Emoji.js.map +1 -1
- package/dist/components/internal/Prose.cjs +37 -0
- package/dist/components/internal/Prose.cjs.map +1 -0
- package/dist/components/internal/Prose.js +35 -0
- package/dist/components/internal/Prose.js.map +1 -0
- package/dist/constants.cjs +2 -0
- package/dist/constants.cjs.map +1 -1
- package/dist/constants.js +2 -1
- package/dist/constants.js.map +1 -1
- package/dist/icon.cjs +6 -0
- package/dist/icon.cjs.map +1 -1
- package/dist/icon.js +3 -0
- package/dist/icon.js.map +1 -1
- package/dist/icons/{Resolve.cjs → CheckCircle.cjs} +3 -3
- package/dist/icons/CheckCircle.cjs.map +1 -0
- package/dist/icons/{Resolve.js → CheckCircle.js} +3 -3
- package/dist/icons/CheckCircle.js.map +1 -0
- package/dist/icons/{Resolved.cjs → CheckCircleFill.cjs} +3 -3
- package/dist/icons/CheckCircleFill.cjs.map +1 -0
- package/dist/icons/{Resolved.js → CheckCircleFill.js} +3 -3
- package/dist/icons/CheckCircleFill.js.map +1 -0
- package/dist/icons/Copy.cjs +8 -9
- package/dist/icons/Copy.cjs.map +1 -1
- package/dist/icons/Copy.js +8 -9
- package/dist/icons/Copy.js.map +1 -1
- package/dist/icons/Retry.cjs +21 -0
- package/dist/icons/Retry.cjs.map +1 -0
- package/dist/icons/Retry.js +19 -0
- package/dist/icons/Retry.js.map +1 -0
- package/dist/icons/index.cjs +8 -4
- package/dist/icons/index.cjs.map +1 -1
- package/dist/icons/index.js +4 -2
- package/dist/icons/index.js.map +1 -1
- package/dist/index.cjs +3 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +102 -43
- package/dist/index.d.ts +102 -43
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/overrides.cjs +6 -12
- package/dist/overrides.cjs.map +1 -1
- package/dist/overrides.js +6 -12
- package/dist/overrides.js.map +1 -1
- package/dist/primitives/AiChatComposer/index.cjs +202 -0
- package/dist/primitives/AiChatComposer/index.cjs.map +1 -0
- package/dist/primitives/AiChatComposer/index.js +195 -0
- package/dist/primitives/AiChatComposer/index.js.map +1 -0
- package/dist/primitives/AiMessage/contexts.cjs +18 -0
- package/dist/primitives/AiMessage/contexts.cjs.map +1 -0
- package/dist/primitives/AiMessage/contexts.js +15 -0
- package/dist/primitives/AiMessage/contexts.js.map +1 -0
- package/dist/primitives/AiMessage/index.cjs +134 -0
- package/dist/primitives/AiMessage/index.cjs.map +1 -0
- package/dist/primitives/AiMessage/index.js +132 -0
- package/dist/primitives/AiMessage/index.js.map +1 -0
- package/dist/primitives/Collapsible/index.cjs +127 -0
- package/dist/primitives/Collapsible/index.cjs.map +1 -0
- package/dist/primitives/Collapsible/index.js +123 -0
- package/dist/primitives/Collapsible/index.js.map +1 -0
- package/dist/primitives/Comment/index.cjs +2 -2
- package/dist/primitives/Comment/index.cjs.map +1 -1
- package/dist/primitives/Comment/index.js +1 -1
- package/dist/primitives/Comment/index.js.map +1 -1
- package/dist/primitives/Composer/index.cjs +19 -14
- package/dist/primitives/Composer/index.cjs.map +1 -1
- package/dist/primitives/Composer/index.js +18 -13
- package/dist/primitives/Composer/index.js.map +1 -1
- package/dist/{slate → primitives/Composer/slate}/plugins/auto-formatting.cjs +3 -3
- package/dist/primitives/Composer/slate/plugins/auto-formatting.cjs.map +1 -0
- package/dist/{slate → primitives/Composer/slate}/plugins/auto-formatting.js +3 -3
- package/dist/primitives/Composer/slate/plugins/auto-formatting.js.map +1 -0
- package/dist/{slate → primitives/Composer/slate}/plugins/auto-links.cjs +7 -2
- package/dist/primitives/Composer/slate/plugins/auto-links.cjs.map +1 -0
- package/dist/{slate → primitives/Composer/slate}/plugins/auto-links.js +8 -3
- package/dist/primitives/Composer/slate/plugins/auto-links.js.map +1 -0
- package/dist/{slate → primitives/Composer/slate}/plugins/custom-links.cjs +8 -3
- package/dist/primitives/Composer/slate/plugins/custom-links.cjs.map +1 -0
- package/dist/{slate → primitives/Composer/slate}/plugins/custom-links.js +9 -4
- package/dist/primitives/Composer/slate/plugins/custom-links.js.map +1 -0
- package/dist/{slate → primitives/Composer/slate}/plugins/mentions.cjs +9 -10
- package/dist/primitives/Composer/slate/plugins/mentions.cjs.map +1 -0
- package/dist/{slate → primitives/Composer/slate}/plugins/mentions.js +6 -6
- package/dist/primitives/Composer/slate/plugins/mentions.js.map +1 -0
- package/dist/{slate → primitives/Composer/slate}/plugins/paste.cjs +1 -1
- package/dist/primitives/Composer/slate/plugins/paste.cjs.map +1 -0
- package/dist/{slate → primitives/Composer/slate}/plugins/paste.js +1 -1
- package/dist/primitives/Composer/slate/plugins/paste.js.map +1 -0
- package/dist/primitives/Composer/utils.cjs +4 -4
- package/dist/primitives/Composer/utils.cjs.map +1 -1
- package/dist/primitives/Composer/utils.js +4 -4
- package/dist/primitives/Composer/utils.js.map +1 -1
- package/dist/primitives/{internal/Markdown.cjs → Markdown.cjs} +150 -83
- package/dist/primitives/Markdown.cjs.map +1 -0
- package/dist/primitives/{internal/Markdown.js → Markdown.js} +151 -83
- package/dist/primitives/Markdown.js.map +1 -0
- package/dist/primitives/index.cjs +4 -9
- package/dist/primitives/index.cjs.map +1 -1
- package/dist/primitives/index.d.cts +4 -110
- package/dist/primitives/index.d.ts +4 -110
- package/dist/primitives/index.js +0 -1
- package/dist/primitives/index.js.map +1 -1
- package/dist/primitives/slate/plugins/empty-clear-formatting.cjs.map +1 -0
- package/dist/primitives/slate/plugins/empty-clear-formatting.js.map +1 -0
- package/dist/{slate → primitives/slate}/plugins/normalize.cjs +0 -5
- package/dist/primitives/slate/plugins/normalize.cjs.map +1 -0
- package/dist/{slate → primitives/slate}/plugins/normalize.js +0 -5
- package/dist/primitives/slate/plugins/normalize.js.map +1 -0
- package/dist/primitives/slate/utils/get-character.cjs.map +1 -0
- package/dist/primitives/slate/utils/get-character.js.map +1 -0
- package/dist/primitives/slate/utils/get-dom-range.cjs.map +1 -0
- package/dist/primitives/slate/utils/get-dom-range.js.map +1 -0
- package/dist/primitives/slate/utils/get-match-range.cjs.map +1 -0
- package/dist/primitives/slate/utils/get-match-range.js.map +1 -0
- package/dist/primitives/slate/utils/is-empty-string.cjs.map +1 -0
- package/dist/primitives/slate/utils/is-empty-string.js.map +1 -0
- package/dist/primitives/slate/utils/is-empty.cjs.map +1 -0
- package/dist/primitives/slate/utils/is-empty.js.map +1 -0
- package/dist/primitives/slate/utils/is-text.cjs.map +1 -0
- package/dist/primitives/slate/utils/is-text.js.map +1 -0
- package/dist/primitives/slate/utils/is-whitespace-character.cjs.map +1 -0
- package/dist/primitives/slate/utils/is-whitespace-character.js.map +1 -0
- package/dist/{slate → primitives/slate}/utils/marks.cjs +9 -9
- package/dist/primitives/slate/utils/marks.cjs.map +1 -0
- package/dist/{slate → primitives/slate}/utils/marks.js +9 -9
- package/dist/primitives/slate/utils/marks.js.map +1 -0
- package/dist/primitives/slate/utils/selection-contains-inlines.cjs.map +1 -0
- package/dist/primitives/slate/utils/selection-contains-inlines.js.map +1 -0
- package/dist/utils/ErrorBoundary.cjs +48 -0
- package/dist/utils/ErrorBoundary.cjs.map +1 -0
- package/dist/utils/ErrorBoundary.js +45 -0
- package/dist/utils/ErrorBoundary.js.map +1 -0
- package/dist/utils/use-visible.cjs +63 -45
- package/dist/utils/use-visible.cjs.map +1 -1
- package/dist/utils/use-visible.js +64 -46
- package/dist/utils/use-visible.js.map +1 -1
- package/dist/version.cjs +1 -1
- package/dist/version.cjs.map +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/package.json +18 -6
- package/src/styles/constants.css +1 -1
- package/src/styles/dark/index.css +7 -3
- package/src/styles/index.css +640 -307
- package/src/styles/utils.css +8 -3
- package/styles/dark/attributes.css +1 -1
- package/styles/dark/attributes.css.map +1 -1
- package/styles/dark/media-query.css +1 -1
- package/styles/dark/media-query.css.map +1 -1
- package/styles.css +1 -1
- package/styles.css.map +1 -1
- package/dist/components/AiChat/AiChat.cjs +0 -200
- package/dist/components/AiChat/AiChat.cjs.map +0 -1
- package/dist/components/AiChat/AiChat.js +0 -198
- package/dist/components/AiChat/AiChat.js.map +0 -1
- package/dist/icons/Resolve.cjs.map +0 -1
- package/dist/icons/Resolve.js.map +0 -1
- package/dist/icons/Resolved.cjs.map +0 -1
- package/dist/icons/Resolved.js.map +0 -1
- package/dist/primitives/Chat/Composer/index.cjs +0 -323
- package/dist/primitives/Chat/Composer/index.cjs.map +0 -1
- package/dist/primitives/Chat/Composer/index.js +0 -315
- package/dist/primitives/Chat/Composer/index.js.map +0 -1
- package/dist/primitives/internal/Collapsible.cjs +0 -99
- package/dist/primitives/internal/Collapsible.cjs.map +0 -1
- package/dist/primitives/internal/Collapsible.js +0 -95
- package/dist/primitives/internal/Collapsible.js.map +0 -1
- package/dist/primitives/internal/Emoji.cjs +0 -32
- package/dist/primitives/internal/Emoji.cjs.map +0 -1
- package/dist/primitives/internal/Emoji.js +0 -30
- package/dist/primitives/internal/Emoji.js.map +0 -1
- package/dist/primitives/internal/Markdown.cjs.map +0 -1
- package/dist/primitives/internal/Markdown.js.map +0 -1
- package/dist/slate/plugins/auto-formatting.cjs.map +0 -1
- package/dist/slate/plugins/auto-formatting.js.map +0 -1
- package/dist/slate/plugins/auto-links.cjs.map +0 -1
- package/dist/slate/plugins/auto-links.js.map +0 -1
- package/dist/slate/plugins/custom-links.cjs.map +0 -1
- package/dist/slate/plugins/custom-links.js.map +0 -1
- package/dist/slate/plugins/empty-clear-formatting.cjs.map +0 -1
- package/dist/slate/plugins/empty-clear-formatting.js.map +0 -1
- package/dist/slate/plugins/mentions.cjs.map +0 -1
- package/dist/slate/plugins/mentions.js.map +0 -1
- package/dist/slate/plugins/normalize.cjs.map +0 -1
- package/dist/slate/plugins/normalize.js.map +0 -1
- package/dist/slate/plugins/paste.cjs.map +0 -1
- package/dist/slate/plugins/paste.js.map +0 -1
- package/dist/slate/utils/get-character.cjs.map +0 -1
- package/dist/slate/utils/get-character.js.map +0 -1
- package/dist/slate/utils/get-dom-range.cjs.map +0 -1
- package/dist/slate/utils/get-dom-range.js.map +0 -1
- package/dist/slate/utils/get-match-range.cjs.map +0 -1
- package/dist/slate/utils/get-match-range.js.map +0 -1
- package/dist/slate/utils/is-empty-string.cjs.map +0 -1
- package/dist/slate/utils/is-empty-string.js.map +0 -1
- package/dist/slate/utils/is-empty.cjs.map +0 -1
- package/dist/slate/utils/is-empty.js.map +0 -1
- package/dist/slate/utils/is-text.cjs.map +0 -1
- package/dist/slate/utils/is-text.js.map +0 -1
- package/dist/slate/utils/is-whitespace-character.cjs.map +0 -1
- package/dist/slate/utils/is-whitespace-character.js.map +0 -1
- package/dist/slate/utils/marks.cjs.map +0 -1
- package/dist/slate/utils/marks.js.map +0 -1
- package/dist/slate/utils/selection-contains-inlines.cjs.map +0 -1
- package/dist/slate/utils/selection-contains-inlines.js.map +0 -1
- /package/dist/{slate → primitives/slate}/plugins/empty-clear-formatting.cjs +0 -0
- /package/dist/{slate → primitives/slate}/plugins/empty-clear-formatting.js +0 -0
- /package/dist/{slate → primitives/slate}/utils/get-character.cjs +0 -0
- /package/dist/{slate → primitives/slate}/utils/get-character.js +0 -0
- /package/dist/{slate → primitives/slate}/utils/get-dom-range.cjs +0 -0
- /package/dist/{slate → primitives/slate}/utils/get-dom-range.js +0 -0
- /package/dist/{slate → primitives/slate}/utils/get-match-range.cjs +0 -0
- /package/dist/{slate → primitives/slate}/utils/get-match-range.js +0 -0
- /package/dist/{slate → primitives/slate}/utils/is-empty-string.cjs +0 -0
- /package/dist/{slate → primitives/slate}/utils/is-empty-string.js +0 -0
- /package/dist/{slate → primitives/slate}/utils/is-empty.cjs +0 -0
- /package/dist/{slate → primitives/slate}/utils/is-empty.js +0 -0
- /package/dist/{slate → primitives/slate}/utils/is-text.cjs +0 -0
- /package/dist/{slate → primitives/slate}/utils/is-text.js +0 -0
- /package/dist/{slate → primitives/slate}/utils/is-whitespace-character.cjs +0 -0
- /package/dist/{slate → primitives/slate}/utils/is-whitespace-character.js +0 -0
- /package/dist/{slate → primitives/slate}/utils/selection-contains-inlines.cjs +0 -0
- /package/dist/{slate → primitives/slate}/utils/selection-contains-inlines.js +0 -0
package/dist/icons/index.cjs
CHANGED
|
@@ -10,12 +10,15 @@ var BellCrossed = require('./BellCrossed.cjs');
|
|
|
10
10
|
var Blockquote = require('./Blockquote.cjs');
|
|
11
11
|
var Bold = require('./Bold.cjs');
|
|
12
12
|
var Check = require('./Check.cjs');
|
|
13
|
+
var CheckCircle = require('./CheckCircle.cjs');
|
|
14
|
+
var CheckCircleFill = require('./CheckCircleFill.cjs');
|
|
13
15
|
var ChevronDown = require('./ChevronDown.cjs');
|
|
14
16
|
var ChevronLeft = require('./ChevronLeft.cjs');
|
|
15
17
|
var ChevronRight = require('./ChevronRight.cjs');
|
|
16
18
|
var ChevronUp = require('./ChevronUp.cjs');
|
|
17
19
|
var Code = require('./Code.cjs');
|
|
18
20
|
var Comment = require('./Comment.cjs');
|
|
21
|
+
var Copy = require('./Copy.cjs');
|
|
19
22
|
var Cross = require('./Cross.cjs');
|
|
20
23
|
var Delete = require('./Delete.cjs');
|
|
21
24
|
var Edit = require('./Edit.cjs');
|
|
@@ -32,9 +35,8 @@ var ListUnordered = require('./ListUnordered.cjs');
|
|
|
32
35
|
var Mention = require('./Mention.cjs');
|
|
33
36
|
var QuestionMark = require('./QuestionMark.cjs');
|
|
34
37
|
var Redo = require('./Redo.cjs');
|
|
35
|
-
var Resolve = require('./Resolve.cjs');
|
|
36
|
-
var Resolved = require('./Resolved.cjs');
|
|
37
38
|
var Restore = require('./Restore.cjs');
|
|
39
|
+
var Retry = require('./Retry.cjs');
|
|
38
40
|
var Search = require('./Search.cjs');
|
|
39
41
|
var Send = require('./Send.cjs');
|
|
40
42
|
var Shorten = require('./Shorten.cjs');
|
|
@@ -61,12 +63,15 @@ exports.BellCrossedIcon = BellCrossed.BellCrossedIcon;
|
|
|
61
63
|
exports.BlockquoteIcon = Blockquote.BlockquoteIcon;
|
|
62
64
|
exports.BoldIcon = Bold.BoldIcon;
|
|
63
65
|
exports.CheckIcon = Check.CheckIcon;
|
|
66
|
+
exports.CheckCircleIcon = CheckCircle.CheckCircleIcon;
|
|
67
|
+
exports.CheckCircleFillIcon = CheckCircleFill.CheckCircleFillIcon;
|
|
64
68
|
exports.ChevronDownIcon = ChevronDown.ChevronDownIcon;
|
|
65
69
|
exports.ChevronLeftIcon = ChevronLeft.ChevronLeftIcon;
|
|
66
70
|
exports.ChevronRightIcon = ChevronRight.ChevronRightIcon;
|
|
67
71
|
exports.ChevronUpIcon = ChevronUp.ChevronUpIcon;
|
|
68
72
|
exports.CodeIcon = Code.CodeIcon;
|
|
69
73
|
exports.CommentIcon = Comment.CommentIcon;
|
|
74
|
+
exports.CopyIcon = Copy.CopyIcon;
|
|
70
75
|
exports.CrossIcon = Cross.CrossIcon;
|
|
71
76
|
exports.DeleteIcon = Delete.DeleteIcon;
|
|
72
77
|
exports.EditIcon = Edit.EditIcon;
|
|
@@ -83,9 +88,8 @@ exports.ListUnorderedIcon = ListUnordered.ListUnorderedIcon;
|
|
|
83
88
|
exports.MentionIcon = Mention.MentionIcon;
|
|
84
89
|
exports.QuestionMarkIcon = QuestionMark.QuestionMarkIcon;
|
|
85
90
|
exports.RedoIcon = Redo.RedoIcon;
|
|
86
|
-
exports.ResolveIcon = Resolve.ResolveIcon;
|
|
87
|
-
exports.ResolvedIcon = Resolved.ResolvedIcon;
|
|
88
91
|
exports.RestoreIcon = Restore.RestoreIcon;
|
|
92
|
+
exports.RetryIcon = Retry.RetryIcon;
|
|
89
93
|
exports.SearchIcon = Search.SearchIcon;
|
|
90
94
|
exports.SendIcon = Send.SendIcon;
|
|
91
95
|
exports.ShortenIcon = Shorten.ShortenIcon;
|
package/dist/icons/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/icons/index.js
CHANGED
|
@@ -8,12 +8,15 @@ export { BellCrossedIcon } from './BellCrossed.js';
|
|
|
8
8
|
export { BlockquoteIcon } from './Blockquote.js';
|
|
9
9
|
export { BoldIcon } from './Bold.js';
|
|
10
10
|
export { CheckIcon } from './Check.js';
|
|
11
|
+
export { CheckCircleIcon } from './CheckCircle.js';
|
|
12
|
+
export { CheckCircleFillIcon } from './CheckCircleFill.js';
|
|
11
13
|
export { ChevronDownIcon } from './ChevronDown.js';
|
|
12
14
|
export { ChevronLeftIcon } from './ChevronLeft.js';
|
|
13
15
|
export { ChevronRightIcon } from './ChevronRight.js';
|
|
14
16
|
export { ChevronUpIcon } from './ChevronUp.js';
|
|
15
17
|
export { CodeIcon } from './Code.js';
|
|
16
18
|
export { CommentIcon } from './Comment.js';
|
|
19
|
+
export { CopyIcon } from './Copy.js';
|
|
17
20
|
export { CrossIcon } from './Cross.js';
|
|
18
21
|
export { DeleteIcon } from './Delete.js';
|
|
19
22
|
export { EditIcon } from './Edit.js';
|
|
@@ -30,9 +33,8 @@ export { ListUnorderedIcon } from './ListUnordered.js';
|
|
|
30
33
|
export { MentionIcon } from './Mention.js';
|
|
31
34
|
export { QuestionMarkIcon } from './QuestionMark.js';
|
|
32
35
|
export { RedoIcon } from './Redo.js';
|
|
33
|
-
export { ResolveIcon } from './Resolve.js';
|
|
34
|
-
export { ResolvedIcon } from './Resolved.js';
|
|
35
36
|
export { RestoreIcon } from './Restore.js';
|
|
37
|
+
export { RetryIcon } from './Retry.js';
|
|
36
38
|
export { SearchIcon } from './Search.js';
|
|
37
39
|
export { SendIcon } from './Send.js';
|
|
38
40
|
export { ShortenIcon } from './Shorten.js';
|
package/dist/icons/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index.cjs
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
var core = require('@liveblocks/core');
|
|
4
4
|
var version = require('./version.cjs');
|
|
5
|
-
var AiChat = require('./components/AiChat
|
|
5
|
+
var AiChat = require('./components/AiChat.cjs');
|
|
6
|
+
var AiTool = require('./components/AiTool.cjs');
|
|
6
7
|
var Comment = require('./components/Comment.cjs');
|
|
7
8
|
var Composer = require('./components/Composer.cjs');
|
|
8
9
|
var HistoryVersionSummary = require('./components/HistoryVersionSummary.cjs');
|
|
@@ -17,6 +18,7 @@ var overrides = require('./overrides.cjs');
|
|
|
17
18
|
core.detectDupes(version.PKG_NAME, version.PKG_VERSION, version.PKG_FORMAT);
|
|
18
19
|
|
|
19
20
|
exports.AiChat = AiChat.AiChat;
|
|
21
|
+
exports.AiTool = AiTool.AiTool;
|
|
20
22
|
exports.Comment = Comment.Comment;
|
|
21
23
|
exports.Composer = Composer.Composer;
|
|
22
24
|
exports.HistoryVersionSummary = HistoryVersionSummary.HistoryVersionSummary;
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../src/index.ts"],"sourcesContent":["import { detectDupes } from \"@liveblocks/core\";\n\nimport { PKG_FORMAT, PKG_NAME, PKG_VERSION } from \"./version\";\n\ndetectDupes(PKG_NAME, PKG_VERSION, PKG_FORMAT);\n\nexport { AiChat
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../src/index.ts"],"sourcesContent":["import { detectDupes } from \"@liveblocks/core\";\n\nimport { PKG_FORMAT, PKG_NAME, PKG_VERSION } from \"./version\";\n\ndetectDupes(PKG_NAME, PKG_VERSION, PKG_FORMAT);\n\nexport type {\n AiChatComponents,\n AiChatComponentsEmptyProps,\n AiChatComponentsLoadingProps,\n AiChatProps,\n} from \"./components/AiChat\";\nexport { AiChat } from \"./components/AiChat\";\nexport type { AiToolIconProps, AiToolProps } from \"./components/AiTool\";\nexport { AiTool } from \"./components/AiTool\";\nexport type { CommentProps } from \"./components/Comment\";\nexport { Comment } from \"./components/Comment\";\nexport type { ComposerProps } from \"./components/Composer\";\nexport { Composer } from \"./components/Composer\";\nexport type { HistoryVersionSummaryProps } from \"./components/HistoryVersionSummary\";\nexport { HistoryVersionSummary } from \"./components/HistoryVersionSummary\";\nexport type { HistoryVersionSummaryListProps } from \"./components/HistoryVersionSummaryList\";\nexport { HistoryVersionSummaryList } from \"./components/HistoryVersionSummaryList\";\nexport type {\n InboxNotificationAvatarProps,\n InboxNotificationCustomKindProps,\n InboxNotificationCustomProps,\n InboxNotificationIconProps,\n InboxNotificationProps,\n InboxNotificationTextMentionKindProps,\n InboxNotificationTextMentionProps,\n InboxNotificationThreadKindProps,\n InboxNotificationThreadProps,\n} from \"./components/InboxNotification\";\nexport { InboxNotification } from \"./components/InboxNotification\";\nexport type { InboxNotificationListProps } from \"./components/InboxNotificationList\";\nexport { InboxNotificationList } from \"./components/InboxNotificationList\";\nexport type { ThreadProps } from \"./components/Thread\";\nexport { Thread } from \"./components/Thread\";\nexport { LiveblocksUIConfig } from \"./config\";\nexport * as Icon from \"./icon\";\nexport type {\n CommentOverrides,\n ComposerOverrides,\n GlobalOverrides,\n InboxNotificationOverrides,\n LocalizationOverrides,\n Overrides,\n ThreadOverrides,\n} from \"./overrides\";\nexport { useOverrides } from \"./overrides\";\nexport type { ComposerSubmitComment } from \"./primitives\";\nexport type {\n CommentAttachmentArgs,\n ComposerBodyMark,\n ComposerBodyMarks,\n} from \"./types\";\n"],"names":["detectDupes","PKG_NAME","PKG_VERSION","PKG_FORMAT"],"mappings":";;;;;;;;;;;;;;;;;AAIAA,gBAAY,CAAAC,gBAAA,EAAUC,qBAAaC,kBAAU,CAAA;;;;;;;;;;;;;;;"}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { CommentAttachment,
|
|
2
|
+
import { ComponentType, ComponentPropsWithoutRef, ElementType, ReactNode, ComponentProps, FormEvent, RefAttributes, MouseEvent, PropsWithChildren } from 'react';
|
|
3
|
+
import { CommentAttachment, AiKnowledgeSource, AiOpaqueToolDefinition, AiToolTypePack, JsonObject, ToolResultData, NoInfr, AiToolExecuteCallback, CommentBody, BaseMetadata, DM, CommentData, HistoryVersion, InboxNotificationData, InboxNotificationThreadData, InboxNotificationTextMentionData, InboxNotificationCustomData, KDAD, ThreadData } from '@liveblocks/core';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
|
|
6
|
+
interface GlobalComponents {
|
|
7
|
+
Anchor: ComponentType<ComponentPropsWithoutRef<"a">> | "a";
|
|
8
|
+
}
|
|
9
|
+
type Components = GlobalComponents;
|
|
10
|
+
|
|
6
11
|
type Direction = "ltr" | "rtl";
|
|
7
12
|
type SlotProp = {
|
|
8
13
|
/**
|
|
@@ -73,21 +78,17 @@ interface ComposerOverrides {
|
|
|
73
78
|
COMPOSER_SEND: string;
|
|
74
79
|
COMPOSER_TOGGLE_MARK: (mark: ComposerBodyMark) => string;
|
|
75
80
|
}
|
|
76
|
-
interface
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
CHAT_COMPOSER_REMOVE_ATTACHMENT: string;
|
|
81
|
-
CHAT_COMPOSER_ABORT: string;
|
|
81
|
+
interface AiChatComposerOverrides {
|
|
82
|
+
AI_CHAT_COMPOSER_PLACEHOLDER: string;
|
|
83
|
+
AI_CHAT_COMPOSER_SEND: string;
|
|
84
|
+
AI_CHAT_COMPOSER_ABORT: string;
|
|
82
85
|
}
|
|
83
|
-
interface
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
CHAT_MESSAGE_COPY: string;
|
|
87
|
-
CHAT_MESSAGE_TRY_AGAIN: string;
|
|
86
|
+
interface AiChatMessageOverrides {
|
|
87
|
+
AI_CHAT_MESSAGE_DELETED: string;
|
|
88
|
+
AI_CHAT_MESSAGE_THINKING: string;
|
|
88
89
|
}
|
|
89
|
-
interface
|
|
90
|
-
|
|
90
|
+
interface AiChatOverrides {
|
|
91
|
+
AI_CHAT_MESSAGES_ERROR: (error: Error) => ReactNode;
|
|
91
92
|
}
|
|
92
93
|
interface ThreadOverrides {
|
|
93
94
|
THREAD_RESOLVE: string;
|
|
@@ -113,53 +114,107 @@ interface HistoryVersionPreviewOverrides {
|
|
|
113
114
|
HISTORY_VERSION_PREVIEW_EMPTY: ReactNode;
|
|
114
115
|
HISTORY_VERSION_PREVIEW_ERROR: (error: Error) => ReactNode;
|
|
115
116
|
}
|
|
116
|
-
type Overrides = LocalizationOverrides & GlobalOverrides & ComposerOverrides & CommentOverrides & ThreadOverrides & InboxNotificationOverrides & HistoryVersionPreviewOverrides &
|
|
117
|
+
type Overrides = LocalizationOverrides & GlobalOverrides & ComposerOverrides & CommentOverrides & ThreadOverrides & InboxNotificationOverrides & HistoryVersionPreviewOverrides & AiChatComposerOverrides & AiChatMessageOverrides & AiChatOverrides;
|
|
117
118
|
declare function useOverrides(overrides?: Partial<Overrides>): Overrides;
|
|
118
119
|
|
|
119
|
-
type
|
|
120
|
+
type AiChatComponentsEmptyProps = {
|
|
120
121
|
/**
|
|
121
|
-
* The id
|
|
122
|
+
* The chat id provided to the `AiChat` component.
|
|
122
123
|
*/
|
|
123
124
|
chatId: string;
|
|
124
125
|
/**
|
|
125
|
-
* The
|
|
126
|
-
*/
|
|
127
|
-
copilotId?: CopilotId;
|
|
128
|
-
/**
|
|
129
|
-
* The contextual information to include in the chat. Used by the assistant when generating responses.
|
|
126
|
+
* The copilot id provided to the `AiChat` component.
|
|
130
127
|
*/
|
|
131
|
-
|
|
128
|
+
copilotId?: string;
|
|
129
|
+
};
|
|
130
|
+
type AiChatComponentsLoadingProps = Record<string, never>;
|
|
131
|
+
type AiChatComponents = {
|
|
132
132
|
/**
|
|
133
|
-
* The
|
|
133
|
+
* The component used to render the empty state of the chat.
|
|
134
134
|
*/
|
|
135
|
-
|
|
135
|
+
Empty: ComponentType<AiChatComponentsEmptyProps>;
|
|
136
136
|
/**
|
|
137
|
-
*
|
|
137
|
+
* The component used to render the loading state of the chat.
|
|
138
138
|
*/
|
|
139
|
-
|
|
139
|
+
Loading: ComponentType<AiChatComponentsLoadingProps>;
|
|
140
140
|
};
|
|
141
|
-
|
|
141
|
+
interface AiChatProps extends ComponentProps<"div"> {
|
|
142
142
|
/**
|
|
143
143
|
* The id of the chat the composer belongs to.
|
|
144
144
|
*/
|
|
145
145
|
chatId: string;
|
|
146
|
+
/**
|
|
147
|
+
* Whether to focus the chat composer on mount.
|
|
148
|
+
*/
|
|
149
|
+
autoFocus?: boolean;
|
|
146
150
|
/**
|
|
147
151
|
* The id of the copilot to use to send the message.
|
|
148
152
|
*/
|
|
149
|
-
copilotId?:
|
|
153
|
+
copilotId?: string;
|
|
154
|
+
/**
|
|
155
|
+
* The contextual knowledge to include in the chat. May be used by the assistant when generating responses.
|
|
156
|
+
* Any knowledge you provide via this prop will be added to any already globally registered knowledge via <RegisterAiKnowledge />.
|
|
157
|
+
*/
|
|
158
|
+
knowledge?: AiKnowledgeSource[];
|
|
150
159
|
/**
|
|
151
|
-
*
|
|
160
|
+
* Tool definitions to make available within this chat. May be used by the assistant when generating responses.
|
|
152
161
|
*/
|
|
153
|
-
|
|
162
|
+
tools?: Record<string, AiOpaqueToolDefinition>;
|
|
154
163
|
/**
|
|
155
|
-
* The
|
|
164
|
+
* The layout of the chat and its composer.
|
|
156
165
|
*/
|
|
157
|
-
|
|
166
|
+
layout?: "inset" | "compact";
|
|
158
167
|
/**
|
|
159
168
|
* Override the component's strings.
|
|
160
169
|
*/
|
|
161
|
-
overrides?: Partial<GlobalOverrides &
|
|
162
|
-
|
|
170
|
+
overrides?: Partial<GlobalOverrides & AiChatMessageOverrides & AiChatComposerOverrides & AiChatOverrides>;
|
|
171
|
+
/**
|
|
172
|
+
* Override the component's components.
|
|
173
|
+
*/
|
|
174
|
+
components?: Partial<GlobalComponents & AiChatComponents>;
|
|
175
|
+
}
|
|
176
|
+
declare const AiChat: react.ForwardRefExoticComponent<Omit<AiChatProps, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
177
|
+
|
|
178
|
+
interface AiToolProps extends Omit<ComponentProps<"div">, "title" | "children"> {
|
|
179
|
+
/**
|
|
180
|
+
* The tool's title.
|
|
181
|
+
*
|
|
182
|
+
* By default, a human-readable version of the tool's name is used:
|
|
183
|
+
* - `"showTodo"` → "Show todo"
|
|
184
|
+
* - `"get_weather"` → "Get weather"
|
|
185
|
+
*/
|
|
186
|
+
title?: string;
|
|
187
|
+
/**
|
|
188
|
+
* An optional icon displayed next to the title.
|
|
189
|
+
*/
|
|
190
|
+
icon?: ReactNode;
|
|
191
|
+
/**
|
|
192
|
+
* The content shown in the tool.
|
|
193
|
+
*/
|
|
194
|
+
children?: ReactNode;
|
|
195
|
+
}
|
|
196
|
+
type AiToolIconProps = ComponentProps<"div">;
|
|
197
|
+
type AiToolInspectorProps = ComponentProps<"div">;
|
|
198
|
+
/**
|
|
199
|
+
* @private This API will change, and is not considered stable. DO NOT RELY on it.
|
|
200
|
+
*
|
|
201
|
+
* This component can be used to build human-in-the-loop interfaces.
|
|
202
|
+
*/
|
|
203
|
+
interface AiToolConfirmationProps<A extends JsonObject, R extends ToolResultData> extends ComponentProps<"div"> {
|
|
204
|
+
types?: NoInfr<AiToolTypePack<A, R>>;
|
|
205
|
+
args?: A;
|
|
206
|
+
confirm: AiToolExecuteCallback<A, R>;
|
|
207
|
+
cancel: AiToolExecuteCallback<A, R>;
|
|
208
|
+
variant?: "default" | "destructive";
|
|
209
|
+
}
|
|
210
|
+
declare function AiToolIcon({ className, ...props }: AiToolIconProps): react_jsx_runtime.JSX.Element;
|
|
211
|
+
declare function AiToolInspector({ className, ...props }: AiToolInspectorProps): react_jsx_runtime.JSX.Element;
|
|
212
|
+
declare function AiToolConfirmation<TPack extends AiToolTypePack, A extends JsonObject = TPack["A"], R extends ToolResultData = TPack["R"]>({ children, variant, confirm, cancel, className, ...props }: AiToolConfirmationProps<A, R>): react_jsx_runtime.JSX.Element | null;
|
|
213
|
+
declare const AiTool: react.ForwardRefExoticComponent<Omit<AiToolProps, "ref"> & react.RefAttributes<HTMLDivElement>> & {
|
|
214
|
+
Icon: typeof AiToolIcon;
|
|
215
|
+
Inspector: typeof AiToolInspector;
|
|
216
|
+
Confirmation: typeof AiToolConfirmation;
|
|
217
|
+
};
|
|
163
218
|
|
|
164
219
|
interface ComposerEditorMentionProps {
|
|
165
220
|
/**
|
|
@@ -214,7 +269,7 @@ interface ComposerEditorComponents {
|
|
|
214
269
|
*/
|
|
215
270
|
FloatingToolbar?: ComponentType<ComposerEditorFloatingToolbarProps>;
|
|
216
271
|
}
|
|
217
|
-
interface ComposerEditorProps extends Omit<ComponentPropsWithoutRef<"div">, "defaultValue"> {
|
|
272
|
+
interface ComposerEditorProps extends Omit<ComponentPropsWithoutRef<"div">, "defaultValue" | "children"> {
|
|
218
273
|
/**
|
|
219
274
|
* The reading direction of the editor and related elements.
|
|
220
275
|
*/
|
|
@@ -454,11 +509,6 @@ type HistoryVersionSummaryListProps = ComponentPropsWithoutRef<"ol">;
|
|
|
454
509
|
*/
|
|
455
510
|
declare const HistoryVersionSummaryList: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, "ref"> & react.RefAttributes<HTMLOListElement>>;
|
|
456
511
|
|
|
457
|
-
interface GlobalComponents {
|
|
458
|
-
Anchor: ComponentType<ComponentPropsWithoutRef<"a">> | "a";
|
|
459
|
-
}
|
|
460
|
-
type Components = GlobalComponents;
|
|
461
|
-
|
|
462
512
|
interface AvatarProps extends ComponentProps<"div"> {
|
|
463
513
|
/**
|
|
464
514
|
* The user ID to display the avatar for.
|
|
@@ -762,6 +812,8 @@ declare function BoldIcon(props: ComponentProps<"svg">): react_jsx_runtime.JSX.E
|
|
|
762
812
|
|
|
763
813
|
declare function CheckIcon(props: ComponentProps<"svg">): react_jsx_runtime.JSX.Element;
|
|
764
814
|
|
|
815
|
+
declare function CheckCircleIcon(props: ComponentProps<"svg">): react_jsx_runtime.JSX.Element;
|
|
816
|
+
|
|
765
817
|
declare function ChevronDownIcon(props: ComponentProps<"svg">): react_jsx_runtime.JSX.Element;
|
|
766
818
|
|
|
767
819
|
declare function ChevronLeftIcon(props: ComponentProps<"svg">): react_jsx_runtime.JSX.Element;
|
|
@@ -774,6 +826,8 @@ declare function CodeIcon(props: ComponentProps<"svg">): react_jsx_runtime.JSX.E
|
|
|
774
826
|
|
|
775
827
|
declare function CommentIcon(props: ComponentProps<"svg">): react_jsx_runtime.JSX.Element;
|
|
776
828
|
|
|
829
|
+
declare function CopyIcon(props: ComponentProps<"svg">): react_jsx_runtime.JSX.Element;
|
|
830
|
+
|
|
777
831
|
declare function CrossIcon(props: ComponentProps<"svg">): react_jsx_runtime.JSX.Element;
|
|
778
832
|
|
|
779
833
|
declare function EllipsisIcon(props: ComponentProps<"svg">): react_jsx_runtime.JSX.Element;
|
|
@@ -802,6 +856,8 @@ declare function QuestionMarkIcon(props: ComponentProps<"svg">): react_jsx_runti
|
|
|
802
856
|
|
|
803
857
|
declare function RedoIcon(props: ComponentProps<"svg">): react_jsx_runtime.JSX.Element;
|
|
804
858
|
|
|
859
|
+
declare function RetryIcon(props: ComponentProps<"svg">): react_jsx_runtime.JSX.Element;
|
|
860
|
+
|
|
805
861
|
declare function SearchIcon(props: ComponentProps<"svg">): react_jsx_runtime.JSX.Element;
|
|
806
862
|
|
|
807
863
|
declare function SendIcon(props: ComponentProps<"svg">): react_jsx_runtime.JSX.Element;
|
|
@@ -838,12 +894,14 @@ declare namespace icon {
|
|
|
838
894
|
BlockquoteIcon as Blockquote,
|
|
839
895
|
BoldIcon as Bold,
|
|
840
896
|
CheckIcon as Check,
|
|
897
|
+
CheckCircleIcon as CheckCircle,
|
|
841
898
|
ChevronDownIcon as ChevronDown,
|
|
842
899
|
ChevronLeftIcon as ChevronLeft,
|
|
843
900
|
ChevronRightIcon as ChevronRight,
|
|
844
901
|
ChevronUpIcon as ChevronUp,
|
|
845
902
|
CodeIcon as Code,
|
|
846
903
|
CommentIcon as Comment,
|
|
904
|
+
CopyIcon as Copy,
|
|
847
905
|
CrossIcon as Cross,
|
|
848
906
|
EllipsisIcon as Ellipsis,
|
|
849
907
|
EmojiIcon as Emoji,
|
|
@@ -858,6 +916,7 @@ declare namespace icon {
|
|
|
858
916
|
MentionIcon as Mention,
|
|
859
917
|
QuestionMarkIcon as QuestionMark,
|
|
860
918
|
RedoIcon as Redo,
|
|
919
|
+
RetryIcon as Retry,
|
|
861
920
|
SearchIcon as Search,
|
|
862
921
|
SendIcon as Send,
|
|
863
922
|
ShortenIcon as Shorten,
|
|
@@ -873,4 +932,4 @@ declare namespace icon {
|
|
|
873
932
|
};
|
|
874
933
|
}
|
|
875
934
|
|
|
876
|
-
export { AiChat, AiChatProps,
|
|
935
|
+
export { AiChat, AiChatComponents, AiChatComponentsEmptyProps, AiChatComponentsLoadingProps, AiChatProps, AiTool, AiToolIconProps, AiToolProps, Comment, CommentAttachmentArgs, CommentOverrides, CommentProps, Composer, ComposerBodyMark, ComposerBodyMarks, ComposerOverrides, ComposerProps, ComposerSubmitComment, GlobalOverrides, HistoryVersionSummary, HistoryVersionSummaryList, HistoryVersionSummaryListProps, HistoryVersionSummaryProps, icon as Icon, InboxNotification, InboxNotificationAvatarProps, InboxNotificationCustomKindProps, InboxNotificationCustomProps, InboxNotificationIconProps, InboxNotificationList, InboxNotificationListProps, InboxNotificationOverrides, InboxNotificationProps, InboxNotificationTextMentionKindProps, InboxNotificationTextMentionProps, InboxNotificationThreadKindProps, InboxNotificationThreadProps, LiveblocksUIConfig, LocalizationOverrides, Overrides, Thread, ThreadOverrides, ThreadProps, useOverrides };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { CommentAttachment,
|
|
2
|
+
import { ComponentType, ComponentPropsWithoutRef, ElementType, ReactNode, ComponentProps, FormEvent, RefAttributes, MouseEvent, PropsWithChildren } from 'react';
|
|
3
|
+
import { CommentAttachment, AiKnowledgeSource, AiOpaqueToolDefinition, AiToolTypePack, JsonObject, ToolResultData, NoInfr, AiToolExecuteCallback, CommentBody, BaseMetadata, DM, CommentData, HistoryVersion, InboxNotificationData, InboxNotificationThreadData, InboxNotificationTextMentionData, InboxNotificationCustomData, KDAD, ThreadData } from '@liveblocks/core';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
|
|
6
|
+
interface GlobalComponents {
|
|
7
|
+
Anchor: ComponentType<ComponentPropsWithoutRef<"a">> | "a";
|
|
8
|
+
}
|
|
9
|
+
type Components = GlobalComponents;
|
|
10
|
+
|
|
6
11
|
type Direction = "ltr" | "rtl";
|
|
7
12
|
type SlotProp = {
|
|
8
13
|
/**
|
|
@@ -73,21 +78,17 @@ interface ComposerOverrides {
|
|
|
73
78
|
COMPOSER_SEND: string;
|
|
74
79
|
COMPOSER_TOGGLE_MARK: (mark: ComposerBodyMark) => string;
|
|
75
80
|
}
|
|
76
|
-
interface
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
CHAT_COMPOSER_REMOVE_ATTACHMENT: string;
|
|
81
|
-
CHAT_COMPOSER_ABORT: string;
|
|
81
|
+
interface AiChatComposerOverrides {
|
|
82
|
+
AI_CHAT_COMPOSER_PLACEHOLDER: string;
|
|
83
|
+
AI_CHAT_COMPOSER_SEND: string;
|
|
84
|
+
AI_CHAT_COMPOSER_ABORT: string;
|
|
82
85
|
}
|
|
83
|
-
interface
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
CHAT_MESSAGE_COPY: string;
|
|
87
|
-
CHAT_MESSAGE_TRY_AGAIN: string;
|
|
86
|
+
interface AiChatMessageOverrides {
|
|
87
|
+
AI_CHAT_MESSAGE_DELETED: string;
|
|
88
|
+
AI_CHAT_MESSAGE_THINKING: string;
|
|
88
89
|
}
|
|
89
|
-
interface
|
|
90
|
-
|
|
90
|
+
interface AiChatOverrides {
|
|
91
|
+
AI_CHAT_MESSAGES_ERROR: (error: Error) => ReactNode;
|
|
91
92
|
}
|
|
92
93
|
interface ThreadOverrides {
|
|
93
94
|
THREAD_RESOLVE: string;
|
|
@@ -113,53 +114,107 @@ interface HistoryVersionPreviewOverrides {
|
|
|
113
114
|
HISTORY_VERSION_PREVIEW_EMPTY: ReactNode;
|
|
114
115
|
HISTORY_VERSION_PREVIEW_ERROR: (error: Error) => ReactNode;
|
|
115
116
|
}
|
|
116
|
-
type Overrides = LocalizationOverrides & GlobalOverrides & ComposerOverrides & CommentOverrides & ThreadOverrides & InboxNotificationOverrides & HistoryVersionPreviewOverrides &
|
|
117
|
+
type Overrides = LocalizationOverrides & GlobalOverrides & ComposerOverrides & CommentOverrides & ThreadOverrides & InboxNotificationOverrides & HistoryVersionPreviewOverrides & AiChatComposerOverrides & AiChatMessageOverrides & AiChatOverrides;
|
|
117
118
|
declare function useOverrides(overrides?: Partial<Overrides>): Overrides;
|
|
118
119
|
|
|
119
|
-
type
|
|
120
|
+
type AiChatComponentsEmptyProps = {
|
|
120
121
|
/**
|
|
121
|
-
* The id
|
|
122
|
+
* The chat id provided to the `AiChat` component.
|
|
122
123
|
*/
|
|
123
124
|
chatId: string;
|
|
124
125
|
/**
|
|
125
|
-
* The
|
|
126
|
-
*/
|
|
127
|
-
copilotId?: CopilotId;
|
|
128
|
-
/**
|
|
129
|
-
* The contextual information to include in the chat. Used by the assistant when generating responses.
|
|
126
|
+
* The copilot id provided to the `AiChat` component.
|
|
130
127
|
*/
|
|
131
|
-
|
|
128
|
+
copilotId?: string;
|
|
129
|
+
};
|
|
130
|
+
type AiChatComponentsLoadingProps = Record<string, never>;
|
|
131
|
+
type AiChatComponents = {
|
|
132
132
|
/**
|
|
133
|
-
* The
|
|
133
|
+
* The component used to render the empty state of the chat.
|
|
134
134
|
*/
|
|
135
|
-
|
|
135
|
+
Empty: ComponentType<AiChatComponentsEmptyProps>;
|
|
136
136
|
/**
|
|
137
|
-
*
|
|
137
|
+
* The component used to render the loading state of the chat.
|
|
138
138
|
*/
|
|
139
|
-
|
|
139
|
+
Loading: ComponentType<AiChatComponentsLoadingProps>;
|
|
140
140
|
};
|
|
141
|
-
|
|
141
|
+
interface AiChatProps extends ComponentProps<"div"> {
|
|
142
142
|
/**
|
|
143
143
|
* The id of the chat the composer belongs to.
|
|
144
144
|
*/
|
|
145
145
|
chatId: string;
|
|
146
|
+
/**
|
|
147
|
+
* Whether to focus the chat composer on mount.
|
|
148
|
+
*/
|
|
149
|
+
autoFocus?: boolean;
|
|
146
150
|
/**
|
|
147
151
|
* The id of the copilot to use to send the message.
|
|
148
152
|
*/
|
|
149
|
-
copilotId?:
|
|
153
|
+
copilotId?: string;
|
|
154
|
+
/**
|
|
155
|
+
* The contextual knowledge to include in the chat. May be used by the assistant when generating responses.
|
|
156
|
+
* Any knowledge you provide via this prop will be added to any already globally registered knowledge via <RegisterAiKnowledge />.
|
|
157
|
+
*/
|
|
158
|
+
knowledge?: AiKnowledgeSource[];
|
|
150
159
|
/**
|
|
151
|
-
*
|
|
160
|
+
* Tool definitions to make available within this chat. May be used by the assistant when generating responses.
|
|
152
161
|
*/
|
|
153
|
-
|
|
162
|
+
tools?: Record<string, AiOpaqueToolDefinition>;
|
|
154
163
|
/**
|
|
155
|
-
* The
|
|
164
|
+
* The layout of the chat and its composer.
|
|
156
165
|
*/
|
|
157
|
-
|
|
166
|
+
layout?: "inset" | "compact";
|
|
158
167
|
/**
|
|
159
168
|
* Override the component's strings.
|
|
160
169
|
*/
|
|
161
|
-
overrides?: Partial<GlobalOverrides &
|
|
162
|
-
|
|
170
|
+
overrides?: Partial<GlobalOverrides & AiChatMessageOverrides & AiChatComposerOverrides & AiChatOverrides>;
|
|
171
|
+
/**
|
|
172
|
+
* Override the component's components.
|
|
173
|
+
*/
|
|
174
|
+
components?: Partial<GlobalComponents & AiChatComponents>;
|
|
175
|
+
}
|
|
176
|
+
declare const AiChat: react.ForwardRefExoticComponent<Omit<AiChatProps, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
177
|
+
|
|
178
|
+
interface AiToolProps extends Omit<ComponentProps<"div">, "title" | "children"> {
|
|
179
|
+
/**
|
|
180
|
+
* The tool's title.
|
|
181
|
+
*
|
|
182
|
+
* By default, a human-readable version of the tool's name is used:
|
|
183
|
+
* - `"showTodo"` → "Show todo"
|
|
184
|
+
* - `"get_weather"` → "Get weather"
|
|
185
|
+
*/
|
|
186
|
+
title?: string;
|
|
187
|
+
/**
|
|
188
|
+
* An optional icon displayed next to the title.
|
|
189
|
+
*/
|
|
190
|
+
icon?: ReactNode;
|
|
191
|
+
/**
|
|
192
|
+
* The content shown in the tool.
|
|
193
|
+
*/
|
|
194
|
+
children?: ReactNode;
|
|
195
|
+
}
|
|
196
|
+
type AiToolIconProps = ComponentProps<"div">;
|
|
197
|
+
type AiToolInspectorProps = ComponentProps<"div">;
|
|
198
|
+
/**
|
|
199
|
+
* @private This API will change, and is not considered stable. DO NOT RELY on it.
|
|
200
|
+
*
|
|
201
|
+
* This component can be used to build human-in-the-loop interfaces.
|
|
202
|
+
*/
|
|
203
|
+
interface AiToolConfirmationProps<A extends JsonObject, R extends ToolResultData> extends ComponentProps<"div"> {
|
|
204
|
+
types?: NoInfr<AiToolTypePack<A, R>>;
|
|
205
|
+
args?: A;
|
|
206
|
+
confirm: AiToolExecuteCallback<A, R>;
|
|
207
|
+
cancel: AiToolExecuteCallback<A, R>;
|
|
208
|
+
variant?: "default" | "destructive";
|
|
209
|
+
}
|
|
210
|
+
declare function AiToolIcon({ className, ...props }: AiToolIconProps): react_jsx_runtime.JSX.Element;
|
|
211
|
+
declare function AiToolInspector({ className, ...props }: AiToolInspectorProps): react_jsx_runtime.JSX.Element;
|
|
212
|
+
declare function AiToolConfirmation<TPack extends AiToolTypePack, A extends JsonObject = TPack["A"], R extends ToolResultData = TPack["R"]>({ children, variant, confirm, cancel, className, ...props }: AiToolConfirmationProps<A, R>): react_jsx_runtime.JSX.Element | null;
|
|
213
|
+
declare const AiTool: react.ForwardRefExoticComponent<Omit<AiToolProps, "ref"> & react.RefAttributes<HTMLDivElement>> & {
|
|
214
|
+
Icon: typeof AiToolIcon;
|
|
215
|
+
Inspector: typeof AiToolInspector;
|
|
216
|
+
Confirmation: typeof AiToolConfirmation;
|
|
217
|
+
};
|
|
163
218
|
|
|
164
219
|
interface ComposerEditorMentionProps {
|
|
165
220
|
/**
|
|
@@ -214,7 +269,7 @@ interface ComposerEditorComponents {
|
|
|
214
269
|
*/
|
|
215
270
|
FloatingToolbar?: ComponentType<ComposerEditorFloatingToolbarProps>;
|
|
216
271
|
}
|
|
217
|
-
interface ComposerEditorProps extends Omit<ComponentPropsWithoutRef<"div">, "defaultValue"> {
|
|
272
|
+
interface ComposerEditorProps extends Omit<ComponentPropsWithoutRef<"div">, "defaultValue" | "children"> {
|
|
218
273
|
/**
|
|
219
274
|
* The reading direction of the editor and related elements.
|
|
220
275
|
*/
|
|
@@ -454,11 +509,6 @@ type HistoryVersionSummaryListProps = ComponentPropsWithoutRef<"ol">;
|
|
|
454
509
|
*/
|
|
455
510
|
declare const HistoryVersionSummaryList: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, "ref"> & react.RefAttributes<HTMLOListElement>>;
|
|
456
511
|
|
|
457
|
-
interface GlobalComponents {
|
|
458
|
-
Anchor: ComponentType<ComponentPropsWithoutRef<"a">> | "a";
|
|
459
|
-
}
|
|
460
|
-
type Components = GlobalComponents;
|
|
461
|
-
|
|
462
512
|
interface AvatarProps extends ComponentProps<"div"> {
|
|
463
513
|
/**
|
|
464
514
|
* The user ID to display the avatar for.
|
|
@@ -762,6 +812,8 @@ declare function BoldIcon(props: ComponentProps<"svg">): react_jsx_runtime.JSX.E
|
|
|
762
812
|
|
|
763
813
|
declare function CheckIcon(props: ComponentProps<"svg">): react_jsx_runtime.JSX.Element;
|
|
764
814
|
|
|
815
|
+
declare function CheckCircleIcon(props: ComponentProps<"svg">): react_jsx_runtime.JSX.Element;
|
|
816
|
+
|
|
765
817
|
declare function ChevronDownIcon(props: ComponentProps<"svg">): react_jsx_runtime.JSX.Element;
|
|
766
818
|
|
|
767
819
|
declare function ChevronLeftIcon(props: ComponentProps<"svg">): react_jsx_runtime.JSX.Element;
|
|
@@ -774,6 +826,8 @@ declare function CodeIcon(props: ComponentProps<"svg">): react_jsx_runtime.JSX.E
|
|
|
774
826
|
|
|
775
827
|
declare function CommentIcon(props: ComponentProps<"svg">): react_jsx_runtime.JSX.Element;
|
|
776
828
|
|
|
829
|
+
declare function CopyIcon(props: ComponentProps<"svg">): react_jsx_runtime.JSX.Element;
|
|
830
|
+
|
|
777
831
|
declare function CrossIcon(props: ComponentProps<"svg">): react_jsx_runtime.JSX.Element;
|
|
778
832
|
|
|
779
833
|
declare function EllipsisIcon(props: ComponentProps<"svg">): react_jsx_runtime.JSX.Element;
|
|
@@ -802,6 +856,8 @@ declare function QuestionMarkIcon(props: ComponentProps<"svg">): react_jsx_runti
|
|
|
802
856
|
|
|
803
857
|
declare function RedoIcon(props: ComponentProps<"svg">): react_jsx_runtime.JSX.Element;
|
|
804
858
|
|
|
859
|
+
declare function RetryIcon(props: ComponentProps<"svg">): react_jsx_runtime.JSX.Element;
|
|
860
|
+
|
|
805
861
|
declare function SearchIcon(props: ComponentProps<"svg">): react_jsx_runtime.JSX.Element;
|
|
806
862
|
|
|
807
863
|
declare function SendIcon(props: ComponentProps<"svg">): react_jsx_runtime.JSX.Element;
|
|
@@ -838,12 +894,14 @@ declare namespace icon {
|
|
|
838
894
|
BlockquoteIcon as Blockquote,
|
|
839
895
|
BoldIcon as Bold,
|
|
840
896
|
CheckIcon as Check,
|
|
897
|
+
CheckCircleIcon as CheckCircle,
|
|
841
898
|
ChevronDownIcon as ChevronDown,
|
|
842
899
|
ChevronLeftIcon as ChevronLeft,
|
|
843
900
|
ChevronRightIcon as ChevronRight,
|
|
844
901
|
ChevronUpIcon as ChevronUp,
|
|
845
902
|
CodeIcon as Code,
|
|
846
903
|
CommentIcon as Comment,
|
|
904
|
+
CopyIcon as Copy,
|
|
847
905
|
CrossIcon as Cross,
|
|
848
906
|
EllipsisIcon as Ellipsis,
|
|
849
907
|
EmojiIcon as Emoji,
|
|
@@ -858,6 +916,7 @@ declare namespace icon {
|
|
|
858
916
|
MentionIcon as Mention,
|
|
859
917
|
QuestionMarkIcon as QuestionMark,
|
|
860
918
|
RedoIcon as Redo,
|
|
919
|
+
RetryIcon as Retry,
|
|
861
920
|
SearchIcon as Search,
|
|
862
921
|
SendIcon as Send,
|
|
863
922
|
ShortenIcon as Shorten,
|
|
@@ -873,4 +932,4 @@ declare namespace icon {
|
|
|
873
932
|
};
|
|
874
933
|
}
|
|
875
934
|
|
|
876
|
-
export { AiChat, AiChatProps,
|
|
935
|
+
export { AiChat, AiChatComponents, AiChatComponentsEmptyProps, AiChatComponentsLoadingProps, AiChatProps, AiTool, AiToolIconProps, AiToolProps, Comment, CommentAttachmentArgs, CommentOverrides, CommentProps, Composer, ComposerBodyMark, ComposerBodyMarks, ComposerOverrides, ComposerProps, ComposerSubmitComment, GlobalOverrides, HistoryVersionSummary, HistoryVersionSummaryList, HistoryVersionSummaryListProps, HistoryVersionSummaryProps, icon as Icon, InboxNotification, InboxNotificationAvatarProps, InboxNotificationCustomKindProps, InboxNotificationCustomProps, InboxNotificationIconProps, InboxNotificationList, InboxNotificationListProps, InboxNotificationOverrides, InboxNotificationProps, InboxNotificationTextMentionKindProps, InboxNotificationTextMentionProps, InboxNotificationThreadKindProps, InboxNotificationThreadProps, LiveblocksUIConfig, LocalizationOverrides, Overrides, Thread, ThreadOverrides, ThreadProps, useOverrides };
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { detectDupes } from '@liveblocks/core';
|
|
2
2
|
import { PKG_NAME, PKG_VERSION, PKG_FORMAT } from './version.js';
|
|
3
|
-
export { AiChat } from './components/AiChat
|
|
3
|
+
export { AiChat } from './components/AiChat.js';
|
|
4
|
+
export { AiTool } from './components/AiTool.js';
|
|
4
5
|
export { Comment } from './components/Comment.js';
|
|
5
6
|
export { Composer } from './components/Composer.js';
|
|
6
7
|
export { HistoryVersionSummary } from './components/HistoryVersionSummary.js';
|