@copilotkit/react-ui 1.51.5-next.0 → 1.51.5-next.2
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/.attw.json +3 -0
- package/CHANGELOG.md +17 -0
- package/dist/index.cjs +2737 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.css +258 -70
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +781 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +781 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +2685 -81
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +2750 -25
- package/dist/index.umd.js.map +1 -1
- package/package.json +19 -18
- package/src/components/chat/Popup.tsx +1 -1
- package/src/components/chat/Sidebar.tsx +1 -1
- package/tsdown.config.ts +58 -0
- package/vitest.config.mjs +11 -0
- package/dist/chunk-2QEDCM6H.mjs +0 -150
- package/dist/chunk-2QEDCM6H.mjs.map +0 -1
- package/dist/chunk-6SMTHXVA.mjs +0 -28
- package/dist/chunk-6SMTHXVA.mjs.map +0 -1
- package/dist/chunk-6TLDRWAD.mjs +0 -95
- package/dist/chunk-6TLDRWAD.mjs.map +0 -1
- package/dist/chunk-72FQQMQ2.mjs +0 -25
- package/dist/chunk-72FQQMQ2.mjs.map +0 -1
- package/dist/chunk-AOUHT4JR.mjs +0 -34
- package/dist/chunk-AOUHT4JR.mjs.map +0 -1
- package/dist/chunk-BNJX66OH.mjs +0 -118
- package/dist/chunk-BNJX66OH.mjs.map +0 -1
- package/dist/chunk-C27LZFA5.mjs +0 -97
- package/dist/chunk-C27LZFA5.mjs.map +0 -1
- package/dist/chunk-C7WM7GM3.mjs +0 -235
- package/dist/chunk-C7WM7GM3.mjs.map +0 -1
- package/dist/chunk-CNIC5HO5.mjs +0 -36
- package/dist/chunk-CNIC5HO5.mjs.map +0 -1
- package/dist/chunk-CQCXH5LY.mjs +0 -143
- package/dist/chunk-CQCXH5LY.mjs.map +0 -1
- package/dist/chunk-DM2V5WTG.mjs +0 -34
- package/dist/chunk-DM2V5WTG.mjs.map +0 -1
- package/dist/chunk-DSHTRV2R.mjs +0 -140
- package/dist/chunk-DSHTRV2R.mjs.map +0 -1
- package/dist/chunk-EACIYBQH.mjs +0 -32
- package/dist/chunk-EACIYBQH.mjs.map +0 -1
- package/dist/chunk-EFZPSZWO.mjs +0 -1
- package/dist/chunk-EFZPSZWO.mjs.map +0 -1
- package/dist/chunk-GBAPANZE.mjs +0 -323
- package/dist/chunk-GBAPANZE.mjs.map +0 -1
- package/dist/chunk-GFE5ZSPV.mjs +0 -112
- package/dist/chunk-GFE5ZSPV.mjs.map +0 -1
- package/dist/chunk-HHLX4MQN.mjs +0 -31
- package/dist/chunk-HHLX4MQN.mjs.map +0 -1
- package/dist/chunk-ICA2EXIX.mjs +0 -187
- package/dist/chunk-ICA2EXIX.mjs.map +0 -1
- package/dist/chunk-IU3WTXLQ.mjs +0 -1
- package/dist/chunk-IU3WTXLQ.mjs.map +0 -1
- package/dist/chunk-IWOCQACI.mjs +0 -73
- package/dist/chunk-IWOCQACI.mjs.map +0 -1
- package/dist/chunk-JGMFJZMG.mjs +0 -11
- package/dist/chunk-JGMFJZMG.mjs.map +0 -1
- package/dist/chunk-JYHRHKV5.mjs +0 -90
- package/dist/chunk-JYHRHKV5.mjs.map +0 -1
- package/dist/chunk-KXE2JCUH.mjs +0 -1
- package/dist/chunk-KXE2JCUH.mjs.map +0 -1
- package/dist/chunk-LIXN3OVQ.mjs +0 -405
- package/dist/chunk-LIXN3OVQ.mjs.map +0 -1
- package/dist/chunk-MC6PY7XH.mjs +0 -456
- package/dist/chunk-MC6PY7XH.mjs.map +0 -1
- package/dist/chunk-MMVDU6DF.mjs +0 -1
- package/dist/chunk-MMVDU6DF.mjs.map +0 -1
- package/dist/chunk-MRXNTQOX.mjs +0 -59
- package/dist/chunk-MRXNTQOX.mjs.map +0 -1
- package/dist/chunk-OQWEOBRX.mjs +0 -120
- package/dist/chunk-OQWEOBRX.mjs.map +0 -1
- package/dist/chunk-P34CL4LC.mjs +0 -82
- package/dist/chunk-P34CL4LC.mjs.map +0 -1
- package/dist/chunk-PF3QBO7V.mjs +0 -133
- package/dist/chunk-PF3QBO7V.mjs.map +0 -1
- package/dist/chunk-PLHTVHUW.mjs +0 -82
- package/dist/chunk-PLHTVHUW.mjs.map +0 -1
- package/dist/chunk-PP2A5RP6.mjs +0 -21
- package/dist/chunk-PP2A5RP6.mjs.map +0 -1
- package/dist/chunk-Q64GLWPQ.mjs +0 -30
- package/dist/chunk-Q64GLWPQ.mjs.map +0 -1
- package/dist/chunk-SC6JRFAJ.mjs +0 -1
- package/dist/chunk-SC6JRFAJ.mjs.map +0 -1
- package/dist/chunk-T26KLXLH.mjs +0 -1
- package/dist/chunk-T26KLXLH.mjs.map +0 -1
- package/dist/chunk-T4NNQG6T.mjs +0 -231
- package/dist/chunk-T4NNQG6T.mjs.map +0 -1
- package/dist/chunk-TGM5PKBF.mjs +0 -44
- package/dist/chunk-TGM5PKBF.mjs.map +0 -1
- package/dist/chunk-V7W6IM2V.mjs +0 -1
- package/dist/chunk-V7W6IM2V.mjs.map +0 -1
- package/dist/chunk-WB3YULQ4.mjs +0 -1
- package/dist/chunk-WB3YULQ4.mjs.map +0 -1
- package/dist/chunk-Y4FKRAKJ.mjs +0 -12
- package/dist/chunk-Y4FKRAKJ.mjs.map +0 -1
- package/dist/chunk-YDJ4YUUF.mjs +0 -141
- package/dist/chunk-YDJ4YUUF.mjs.map +0 -1
- package/dist/components/chat/Button.d.ts +0 -9
- package/dist/components/chat/Button.js +0 -73
- package/dist/components/chat/Button.js.map +0 -1
- package/dist/components/chat/Button.mjs +0 -10
- package/dist/components/chat/Button.mjs.map +0 -1
- package/dist/components/chat/Chat.d.ts +0 -204
- package/dist/components/chat/Chat.js +0 -2428
- package/dist/components/chat/Chat.js.map +0 -1
- package/dist/components/chat/Chat.mjs +0 -29
- package/dist/components/chat/Chat.mjs.map +0 -1
- package/dist/components/chat/ChatContext.d.ts +0 -145
- package/dist/components/chat/ChatContext.js +0 -383
- package/dist/components/chat/ChatContext.js.map +0 -1
- package/dist/components/chat/ChatContext.mjs +0 -13
- package/dist/components/chat/ChatContext.mjs.map +0 -1
- package/dist/components/chat/CodeBlock.d.ts +0 -14
- package/dist/components/chat/CodeBlock.js +0 -524
- package/dist/components/chat/CodeBlock.js.map +0 -1
- package/dist/components/chat/CodeBlock.mjs +0 -14
- package/dist/components/chat/CodeBlock.mjs.map +0 -1
- package/dist/components/chat/Header.d.ts +0 -9
- package/dist/components/chat/Header.js +0 -642
- package/dist/components/chat/Header.js.map +0 -1
- package/dist/components/chat/Header.mjs +0 -17
- package/dist/components/chat/Header.mjs.map +0 -1
- package/dist/components/chat/Icons.d.ts +0 -20
- package/dist/components/chat/Icons.js +0 -362
- package/dist/components/chat/Icons.js.map +0 -1
- package/dist/components/chat/Icons.mjs +0 -38
- package/dist/components/chat/Icons.mjs.map +0 -1
- package/dist/components/chat/ImageUploadQueue.d.ts +0 -13
- package/dist/components/chat/ImageUploadQueue.js +0 -106
- package/dist/components/chat/ImageUploadQueue.js.map +0 -1
- package/dist/components/chat/ImageUploadQueue.mjs +0 -8
- package/dist/components/chat/ImageUploadQueue.mjs.map +0 -1
- package/dist/components/chat/Input.d.ts +0 -9
- package/dist/components/chat/Input.js +0 -424
- package/dist/components/chat/Input.js.map +0 -1
- package/dist/components/chat/Input.mjs +0 -14
- package/dist/components/chat/Input.mjs.map +0 -1
- package/dist/components/chat/Markdown.d.ts +0 -10
- package/dist/components/chat/Markdown.js +0 -678
- package/dist/components/chat/Markdown.js.map +0 -1
- package/dist/components/chat/Markdown.mjs +0 -11
- package/dist/components/chat/Markdown.mjs.map +0 -1
- package/dist/components/chat/Messages.d.ts +0 -13
- package/dist/components/chat/Messages.js +0 -1242
- package/dist/components/chat/Messages.js.map +0 -1
- package/dist/components/chat/Messages.mjs +0 -20
- package/dist/components/chat/Messages.mjs.map +0 -1
- package/dist/components/chat/Modal.d.ts +0 -51
- package/dist/components/chat/Modal.js +0 -3294
- package/dist/components/chat/Modal.js.map +0 -1
- package/dist/components/chat/Modal.mjs +0 -38
- package/dist/components/chat/Modal.mjs.map +0 -1
- package/dist/components/chat/Popup.d.ts +0 -13
- package/dist/components/chat/Popup.js +0 -3305
- package/dist/components/chat/Popup.js.map +0 -1
- package/dist/components/chat/Popup.mjs +0 -39
- package/dist/components/chat/Popup.mjs.map +0 -1
- package/dist/components/chat/PoweredByTag.d.ts +0 -7
- package/dist/components/chat/PoweredByTag.js +0 -63
- package/dist/components/chat/PoweredByTag.js.map +0 -1
- package/dist/components/chat/PoweredByTag.mjs +0 -9
- package/dist/components/chat/PoweredByTag.mjs.map +0 -1
- package/dist/components/chat/Sidebar.d.ts +0 -13
- package/dist/components/chat/Sidebar.js +0 -3314
- package/dist/components/chat/Sidebar.js.map +0 -1
- package/dist/components/chat/Sidebar.mjs +0 -39
- package/dist/components/chat/Sidebar.mjs.map +0 -1
- package/dist/components/chat/Suggestion.d.ts +0 -12
- package/dist/components/chat/Suggestion.js +0 -68
- package/dist/components/chat/Suggestion.js.map +0 -1
- package/dist/components/chat/Suggestion.mjs +0 -9
- package/dist/components/chat/Suggestion.mjs.map +0 -1
- package/dist/components/chat/Suggestions.d.ts +0 -9
- package/dist/components/chat/Suggestions.js +0 -93
- package/dist/components/chat/Suggestions.js.map +0 -1
- package/dist/components/chat/Suggestions.mjs +0 -10
- package/dist/components/chat/Suggestions.mjs.map +0 -1
- package/dist/components/chat/Textarea.d.ts +0 -15
- package/dist/components/chat/Textarea.js +0 -87
- package/dist/components/chat/Textarea.js.map +0 -1
- package/dist/components/chat/Textarea.mjs +0 -8
- package/dist/components/chat/Textarea.mjs.map +0 -1
- package/dist/components/chat/Window.d.ts +0 -9
- package/dist/components/chat/Window.js +0 -166
- package/dist/components/chat/Window.js.map +0 -1
- package/dist/components/chat/Window.mjs +0 -10
- package/dist/components/chat/Window.mjs.map +0 -1
- package/dist/components/chat/index.d.ts +0 -18
- package/dist/components/chat/index.js +0 -3341
- package/dist/components/chat/index.js.map +0 -1
- package/dist/components/chat/index.mjs +0 -69
- package/dist/components/chat/index.mjs.map +0 -1
- package/dist/components/chat/messages/AssistantMessage.d.ts +0 -9
- package/dist/components/chat/messages/AssistantMessage.js +0 -807
- package/dist/components/chat/messages/AssistantMessage.js.map +0 -1
- package/dist/components/chat/messages/AssistantMessage.mjs +0 -13
- package/dist/components/chat/messages/AssistantMessage.mjs.map +0 -1
- package/dist/components/chat/messages/ErrorMessage.d.ts +0 -9
- package/dist/components/chat/messages/ErrorMessage.js +0 -756
- package/dist/components/chat/messages/ErrorMessage.js.map +0 -1
- package/dist/components/chat/messages/ErrorMessage.mjs +0 -72
- package/dist/components/chat/messages/ErrorMessage.mjs.map +0 -1
- package/dist/components/chat/messages/ImageRenderer.d.ts +0 -12
- package/dist/components/chat/messages/ImageRenderer.js +0 -68
- package/dist/components/chat/messages/ImageRenderer.js.map +0 -1
- package/dist/components/chat/messages/ImageRenderer.mjs +0 -8
- package/dist/components/chat/messages/ImageRenderer.mjs.map +0 -1
- package/dist/components/chat/messages/LegacyRenderMessage.d.ts +0 -28
- package/dist/components/chat/messages/LegacyRenderMessage.js +0 -1067
- package/dist/components/chat/messages/LegacyRenderMessage.js.map +0 -1
- package/dist/components/chat/messages/LegacyRenderMessage.mjs +0 -17
- package/dist/components/chat/messages/LegacyRenderMessage.mjs.map +0 -1
- package/dist/components/chat/messages/RenderMessage.d.ts +0 -9
- package/dist/components/chat/messages/RenderMessage.js +0 -942
- package/dist/components/chat/messages/RenderMessage.js.map +0 -1
- package/dist/components/chat/messages/RenderMessage.mjs +0 -16
- package/dist/components/chat/messages/RenderMessage.mjs.map +0 -1
- package/dist/components/chat/messages/UserMessage.d.ts +0 -9
- package/dist/components/chat/messages/UserMessage.js +0 -58
- package/dist/components/chat/messages/UserMessage.js.map +0 -1
- package/dist/components/chat/messages/UserMessage.mjs +0 -8
- package/dist/components/chat/messages/UserMessage.mjs.map +0 -1
- package/dist/components/chat/props.d.ts +0 -298
- package/dist/components/chat/props.js +0 -19
- package/dist/components/chat/props.js.map +0 -1
- package/dist/components/chat/props.mjs +0 -2
- package/dist/components/chat/props.mjs.map +0 -1
- package/dist/components/dev-console/console.d.ts +0 -11
- package/dist/components/dev-console/console.js +0 -595
- package/dist/components/dev-console/console.js.map +0 -1
- package/dist/components/dev-console/console.mjs +0 -17
- package/dist/components/dev-console/console.mjs.map +0 -1
- package/dist/components/dev-console/icons.d.ts +0 -9
- package/dist/components/dev-console/icons.js +0 -140
- package/dist/components/dev-console/icons.js.map +0 -1
- package/dist/components/dev-console/icons.mjs +0 -16
- package/dist/components/dev-console/icons.mjs.map +0 -1
- package/dist/components/dev-console/index.d.ts +0 -3
- package/dist/components/dev-console/index.js +0 -595
- package/dist/components/dev-console/index.js.map +0 -1
- package/dist/components/dev-console/index.mjs +0 -18
- package/dist/components/dev-console/index.mjs.map +0 -1
- package/dist/components/dev-console/types.d.ts +0 -9
- package/dist/components/dev-console/types.js +0 -19
- package/dist/components/dev-console/types.js.map +0 -1
- package/dist/components/dev-console/types.mjs +0 -1
- package/dist/components/dev-console/types.mjs.map +0 -1
- package/dist/components/dev-console/utils.d.ts +0 -10
- package/dist/components/dev-console/utils.js +0 -183
- package/dist/components/dev-console/utils.js.map +0 -1
- package/dist/components/dev-console/utils.mjs +0 -16
- package/dist/components/dev-console/utils.mjs.map +0 -1
- package/dist/components/help-modal/icons.d.ts +0 -9
- package/dist/components/help-modal/icons.js +0 -116
- package/dist/components/help-modal/icons.js.map +0 -1
- package/dist/components/help-modal/icons.mjs +0 -12
- package/dist/components/help-modal/icons.mjs.map +0 -1
- package/dist/components/help-modal/index.d.ts +0 -2
- package/dist/components/help-modal/index.js +0 -144
- package/dist/components/help-modal/index.js.map +0 -1
- package/dist/components/help-modal/index.mjs +0 -10
- package/dist/components/help-modal/index.mjs.map +0 -1
- package/dist/components/help-modal/modal.d.ts +0 -5
- package/dist/components/help-modal/modal.js +0 -142
- package/dist/components/help-modal/modal.js.map +0 -1
- package/dist/components/help-modal/modal.mjs +0 -9
- package/dist/components/help-modal/modal.mjs.map +0 -1
- package/dist/components/index.d.ts +0 -19
- package/dist/components/index.js +0 -3345
- package/dist/components/index.js.map +0 -1
- package/dist/components/index.mjs +0 -76
- package/dist/components/index.mjs.map +0 -1
- package/dist/context/index.d.ts +0 -2
- package/dist/context/index.js +0 -19
- package/dist/context/index.js.map +0 -1
- package/dist/context/index.mjs +0 -2
- package/dist/context/index.mjs.map +0 -1
- package/dist/hooks/index.d.ts +0 -2
- package/dist/hooks/index.js +0 -36
- package/dist/hooks/index.js.map +0 -1
- package/dist/hooks/index.mjs +0 -9
- package/dist/hooks/index.mjs.map +0 -1
- package/dist/hooks/use-copilot-chat-suggestions.d.ts +0 -66
- package/dist/hooks/use-copilot-chat-suggestions.js +0 -34
- package/dist/hooks/use-copilot-chat-suggestions.js.map +0 -1
- package/dist/hooks/use-copilot-chat-suggestions.mjs +0 -8
- package/dist/hooks/use-copilot-chat-suggestions.mjs.map +0 -1
- package/dist/hooks/use-copy-to-clipboard.d.ts +0 -9
- package/dist/hooks/use-copy-to-clipboard.js +0 -62
- package/dist/hooks/use-copy-to-clipboard.js.map +0 -1
- package/dist/hooks/use-copy-to-clipboard.mjs +0 -8
- package/dist/hooks/use-copy-to-clipboard.mjs.map +0 -1
- package/dist/hooks/use-dark-mode.d.ts +0 -3
- package/dist/hooks/use-dark-mode.js +0 -35
- package/dist/hooks/use-dark-mode.js.map +0 -1
- package/dist/hooks/use-dark-mode.mjs +0 -8
- package/dist/hooks/use-dark-mode.mjs.map +0 -1
- package/dist/hooks/use-push-to-talk.d.ts +0 -19
- package/dist/hooks/use-push-to-talk.js +0 -202
- package/dist/hooks/use-push-to-talk.js.map +0 -1
- package/dist/hooks/use-push-to-talk.mjs +0 -12
- package/dist/hooks/use-push-to-talk.mjs.map +0 -1
- package/dist/index.d.ts +0 -21
- package/dist/index.js +0 -3354
- package/dist/index.js.map +0 -1
- package/dist/lib/utils.d.ts +0 -4
- package/dist/lib/utils.js +0 -76
- package/dist/lib/utils.js.map +0 -1
- package/dist/lib/utils.mjs +0 -34
- package/dist/lib/utils.mjs.map +0 -1
- package/dist/types/css.d.ts +0 -22
- package/dist/types/css.js +0 -19
- package/dist/types/css.js.map +0 -1
- package/dist/types/css.mjs +0 -1
- package/dist/types/css.mjs.map +0 -1
- package/dist/types/index.d.ts +0 -3
- package/dist/types/index.js +0 -19
- package/dist/types/index.js.map +0 -1
- package/dist/types/index.mjs +0 -2
- package/dist/types/index.mjs.map +0 -1
- package/dist/types/suggestions.d.ts +0 -9
- package/dist/types/suggestions.js +0 -19
- package/dist/types/suggestions.js.map +0 -1
- package/dist/types/suggestions.mjs +0 -1
- package/dist/types/suggestions.mjs.map +0 -1
- package/dist/v2/index.css +0 -4
- package/dist/v2/index.css.map +0 -1
- package/dist/v2/index.d.ts +0 -2
- package/dist/v2/index.js +0 -2
- package/dist/v2/index.js.map +0 -1
- package/dist/v2/index.mjs +0 -2
- package/dist/v2/index.mjs.map +0 -1
- package/jest.config.js +0 -5
- package/rollup.config.mjs +0 -64
- package/tsup.config.ts +0 -15
package/dist/lib/utils.js
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var __async = (__this, __arguments, generator) => {
|
|
20
|
-
return new Promise((resolve, reject) => {
|
|
21
|
-
var fulfilled = (value) => {
|
|
22
|
-
try {
|
|
23
|
-
step(generator.next(value));
|
|
24
|
-
} catch (e) {
|
|
25
|
-
reject(e);
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
var rejected = (value) => {
|
|
29
|
-
try {
|
|
30
|
-
step(generator.throw(value));
|
|
31
|
-
} catch (e) {
|
|
32
|
-
reject(e);
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
36
|
-
step((generator = generator.apply(__this, __arguments)).next());
|
|
37
|
-
});
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
// src/lib/utils.ts
|
|
41
|
-
var utils_exports = {};
|
|
42
|
-
__export(utils_exports, {
|
|
43
|
-
fetcher: () => fetcher,
|
|
44
|
-
formatDate: () => formatDate
|
|
45
|
-
});
|
|
46
|
-
module.exports = __toCommonJS(utils_exports);
|
|
47
|
-
function fetcher(input, init) {
|
|
48
|
-
return __async(this, null, function* () {
|
|
49
|
-
const res = yield fetch(input, init);
|
|
50
|
-
if (!res.ok) {
|
|
51
|
-
const json = yield res.json();
|
|
52
|
-
if (json.error) {
|
|
53
|
-
const error = new Error(json.error);
|
|
54
|
-
error.status = res.status;
|
|
55
|
-
throw error;
|
|
56
|
-
} else {
|
|
57
|
-
throw new Error("An unexpected error occurred");
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
return res.json();
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
function formatDate(input) {
|
|
64
|
-
const date = new Date(input);
|
|
65
|
-
return date.toLocaleDateString("en-US", {
|
|
66
|
-
month: "long",
|
|
67
|
-
day: "numeric",
|
|
68
|
-
year: "numeric"
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
72
|
-
0 && (module.exports = {
|
|
73
|
-
fetcher,
|
|
74
|
-
formatDate
|
|
75
|
-
});
|
|
76
|
-
//# sourceMappingURL=utils.js.map
|
package/dist/lib/utils.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/utils.ts"],"sourcesContent":["export async function fetcher<JSON = any>(\n input: RequestInfo,\n init?: RequestInit,\n): Promise<JSON> {\n const res = await fetch(input, init);\n\n if (!res.ok) {\n const json = await res.json();\n if (json.error) {\n const error = new Error(json.error) as Error & {\n status: number;\n };\n error.status = res.status;\n throw error;\n } else {\n throw new Error(\"An unexpected error occurred\");\n }\n }\n\n return res.json();\n}\n\nexport function formatDate(input: string | number | Date): string {\n const date = new Date(input);\n return date.toLocaleDateString(\"en-US\", {\n month: \"long\",\n day: \"numeric\",\n year: \"numeric\",\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAAsB,QACpB,OACA,MACe;AAAA;AACf,UAAM,MAAM,MAAM,MAAM,OAAO,IAAI;AAEnC,QAAI,CAAC,IAAI,IAAI;AACX,YAAM,OAAO,MAAM,IAAI,KAAK;AAC5B,UAAI,KAAK,OAAO;AACd,cAAM,QAAQ,IAAI,MAAM,KAAK,KAAK;AAGlC,cAAM,SAAS,IAAI;AACnB,cAAM;AAAA,MACR,OAAO;AACL,cAAM,IAAI,MAAM,8BAA8B;AAAA,MAChD;AAAA,IACF;AAEA,WAAO,IAAI,KAAK;AAAA,EAClB;AAAA;AAEO,SAAS,WAAW,OAAuC;AAChE,QAAM,OAAO,IAAI,KAAK,KAAK;AAC3B,SAAO,KAAK,mBAAmB,SAAS;AAAA,IACtC,OAAO;AAAA,IACP,KAAK;AAAA,IACL,MAAM;AAAA,EACR,CAAC;AACH;","names":[]}
|
package/dist/lib/utils.mjs
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__async
|
|
3
|
-
} from "../chunk-MRXNTQOX.mjs";
|
|
4
|
-
|
|
5
|
-
// src/lib/utils.ts
|
|
6
|
-
function fetcher(input, init) {
|
|
7
|
-
return __async(this, null, function* () {
|
|
8
|
-
const res = yield fetch(input, init);
|
|
9
|
-
if (!res.ok) {
|
|
10
|
-
const json = yield res.json();
|
|
11
|
-
if (json.error) {
|
|
12
|
-
const error = new Error(json.error);
|
|
13
|
-
error.status = res.status;
|
|
14
|
-
throw error;
|
|
15
|
-
} else {
|
|
16
|
-
throw new Error("An unexpected error occurred");
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
return res.json();
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
function formatDate(input) {
|
|
23
|
-
const date = new Date(input);
|
|
24
|
-
return date.toLocaleDateString("en-US", {
|
|
25
|
-
month: "long",
|
|
26
|
-
day: "numeric",
|
|
27
|
-
year: "numeric"
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
export {
|
|
31
|
-
fetcher,
|
|
32
|
-
formatDate
|
|
33
|
-
};
|
|
34
|
-
//# sourceMappingURL=utils.mjs.map
|
package/dist/lib/utils.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/utils.ts"],"sourcesContent":["export async function fetcher<JSON = any>(\n input: RequestInfo,\n init?: RequestInit,\n): Promise<JSON> {\n const res = await fetch(input, init);\n\n if (!res.ok) {\n const json = await res.json();\n if (json.error) {\n const error = new Error(json.error) as Error & {\n status: number;\n };\n error.status = res.status;\n throw error;\n } else {\n throw new Error(\"An unexpected error occurred\");\n }\n }\n\n return res.json();\n}\n\nexport function formatDate(input: string | number | Date): string {\n const date = new Date(input);\n return date.toLocaleDateString(\"en-US\", {\n month: \"long\",\n day: \"numeric\",\n year: \"numeric\",\n });\n}\n"],"mappings":";;;;;AAAA,SAAsB,QACpB,OACA,MACe;AAAA;AACf,UAAM,MAAM,MAAM,MAAM,OAAO,IAAI;AAEnC,QAAI,CAAC,IAAI,IAAI;AACX,YAAM,OAAO,MAAM,IAAI,KAAK;AAC5B,UAAI,KAAK,OAAO;AACd,cAAM,QAAQ,IAAI,MAAM,KAAK,KAAK;AAGlC,cAAM,SAAS,IAAI;AACnB,cAAM;AAAA,MACR,OAAO;AACL,cAAM,IAAI,MAAM,8BAA8B;AAAA,MAChD;AAAA,IACF;AAEA,WAAO,IAAI,KAAK;AAAA,EAClB;AAAA;AAEO,SAAS,WAAW,OAAuC;AAChE,QAAM,OAAO,IAAI,KAAK,KAAK;AAC3B,SAAO,KAAK,mBAAmB,SAAS;AAAA,IACtC,OAAO;AAAA,IACP,KAAK;AAAA,IACL,MAAM;AAAA,EACR,CAAC;AACH;","names":[]}
|
package/dist/types/css.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { CSSProperties } from 'react';
|
|
2
|
-
|
|
3
|
-
interface CopilotKitCSSProperties extends CSSProperties {
|
|
4
|
-
"--copilot-kit-primary-color"?: string;
|
|
5
|
-
"--copilot-kit-contrast-color"?: string;
|
|
6
|
-
"--copilot-kit-background-color"?: string;
|
|
7
|
-
"--copilot-kit-input-background-color"?: string;
|
|
8
|
-
"--copilot-kit-secondary-color"?: string;
|
|
9
|
-
"--copilot-kit-secondary-contrast-color"?: string;
|
|
10
|
-
"--copilot-kit-separator-color"?: string;
|
|
11
|
-
"--copilot-kit-muted-color"?: string;
|
|
12
|
-
"--copilot-kit-error-background"?: string;
|
|
13
|
-
"--copilot-kit-error-border"?: string;
|
|
14
|
-
"--copilot-kit-error-text"?: string;
|
|
15
|
-
"--copilot-kit-shadow-sm"?: string;
|
|
16
|
-
"--copilot-kit-shadow-md"?: string;
|
|
17
|
-
"--copilot-kit-shadow-lg"?: string;
|
|
18
|
-
"--copilot-kit-dev-console-bg"?: string;
|
|
19
|
-
"--copilot-kit-dev-console-text"?: string;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export { CopilotKitCSSProperties };
|
package/dist/types/css.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
-
|
|
16
|
-
// src/types/css.ts
|
|
17
|
-
var css_exports = {};
|
|
18
|
-
module.exports = __toCommonJS(css_exports);
|
|
19
|
-
//# sourceMappingURL=css.js.map
|
package/dist/types/css.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/css.ts"],"sourcesContent":["// autogenerated (see postcss.config.js) - do not edit\nimport { CSSProperties } from \"react\";\n\nexport interface CopilotKitCSSProperties extends CSSProperties {\n \"--copilot-kit-primary-color\"?: string;\n \"--copilot-kit-contrast-color\"?: string;\n \"--copilot-kit-background-color\"?: string;\n \"--copilot-kit-input-background-color\"?: string;\n \"--copilot-kit-secondary-color\"?: string;\n \"--copilot-kit-secondary-contrast-color\"?: string;\n \"--copilot-kit-separator-color\"?: string;\n \"--copilot-kit-muted-color\"?: string;\n \"--copilot-kit-error-background\"?: string;\n \"--copilot-kit-error-border\"?: string;\n \"--copilot-kit-error-text\"?: string;\n \"--copilot-kit-shadow-sm\"?: string;\n \"--copilot-kit-shadow-md\"?: string;\n \"--copilot-kit-shadow-lg\"?: string;\n \"--copilot-kit-dev-console-bg\"?: string;\n \"--copilot-kit-dev-console-text\"?: string;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
package/dist/types/css.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=css.mjs.map
|
package/dist/types/css.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/types/index.d.ts
DELETED
package/dist/types/index.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
-
|
|
16
|
-
// src/types/index.ts
|
|
17
|
-
var types_exports = {};
|
|
18
|
-
module.exports = __toCommonJS(types_exports);
|
|
19
|
-
//# sourceMappingURL=index.js.map
|
package/dist/types/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/index.ts"],"sourcesContent":["export type { CopilotKitCSSProperties } from \"./css\";\nexport type { CopilotChatSuggestion } from \"./suggestions\";\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
package/dist/types/index.mjs
DELETED
package/dist/types/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
-
|
|
16
|
-
// src/types/suggestions.ts
|
|
17
|
-
var suggestions_exports = {};
|
|
18
|
-
module.exports = __toCommonJS(suggestions_exports);
|
|
19
|
-
//# sourceMappingURL=suggestions.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/suggestions.ts"],"sourcesContent":["export interface CopilotChatSuggestion {\n title: string;\n message: string;\n partial?: boolean;\n isLoading?: boolean;\n className?: string;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=suggestions.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/v2/index.css
DELETED
package/dist/v2/index.css.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/v2/index.d.ts
DELETED
package/dist/v2/index.js
DELETED
package/dist/v2/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/v2/index.mjs
DELETED
package/dist/v2/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/jest.config.js
DELETED
package/rollup.config.mjs
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import resolve from '@rollup/plugin-node-resolve';
|
|
2
|
-
import commonjs from '@rollup/plugin-commonjs';
|
|
3
|
-
import typescript from '@rollup/plugin-typescript';
|
|
4
|
-
import terser from '@rollup/plugin-terser';
|
|
5
|
-
import json from '@rollup/plugin-json';
|
|
6
|
-
import postcss from 'rollup-plugin-postcss';
|
|
7
|
-
|
|
8
|
-
function onwarn(warning, warn) {
|
|
9
|
-
// Ignore circular dependency warnings from node_modules
|
|
10
|
-
if (warning.code === 'CIRCULAR_DEPENDENCY' && warning.ids?.some(id => id.includes('node_modules'))) return;
|
|
11
|
-
// Ignore "this" rewritten to "undefined" warnings from node_modules
|
|
12
|
-
if (warning.code === 'THIS_IS_UNDEFINED' && warning.id?.includes('node_modules')) return;
|
|
13
|
-
// Ignore TypeScript plugin warnings (module mismatch, tslib, type errors during UMD build)
|
|
14
|
-
if (warning.code === 'PLUGIN_WARNING' && warning.plugin === 'typescript') return;
|
|
15
|
-
// Ignore "use client" directive warnings (expected for React Server Components)
|
|
16
|
-
if (warning.code === 'MODULE_LEVEL_DIRECTIVE' && warning.message?.includes('"use client"')) return;
|
|
17
|
-
warn(warning);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export default {
|
|
21
|
-
input: 'src/index.tsx',
|
|
22
|
-
output: {
|
|
23
|
-
file: 'dist/index.umd.js',
|
|
24
|
-
format: 'umd',
|
|
25
|
-
name: 'CopilotKitReactUI',
|
|
26
|
-
sourcemap: true,
|
|
27
|
-
inlineDynamicImports: true,
|
|
28
|
-
globals: {
|
|
29
|
-
'react': 'React',
|
|
30
|
-
'react-dom': 'ReactDOM',
|
|
31
|
-
'@copilotkit/react-core': 'CopilotKitReactCore',
|
|
32
|
-
'@copilotkit/shared': 'CopilotKitShared',
|
|
33
|
-
'@copilotkit/runtime-client-gql': 'CopilotKitRuntimeClientGQL',
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
external: [
|
|
37
|
-
'react',
|
|
38
|
-
'react-dom',
|
|
39
|
-
'@copilotkit/react-core',
|
|
40
|
-
'@copilotkit/shared',
|
|
41
|
-
'@copilotkit/runtime-client-gql',
|
|
42
|
-
],
|
|
43
|
-
onwarn,
|
|
44
|
-
plugins: [
|
|
45
|
-
postcss({ inject: true, minimize: true }),
|
|
46
|
-
resolve({ browser: true }),
|
|
47
|
-
commonjs(),
|
|
48
|
-
json(),
|
|
49
|
-
typescript({
|
|
50
|
-
tsconfig: './tsconfig.json',
|
|
51
|
-
declaration: false,
|
|
52
|
-
declarationMap: false,
|
|
53
|
-
declarationDir: undefined,
|
|
54
|
-
compilerOptions: {
|
|
55
|
-
declaration: false,
|
|
56
|
-
declarationMap: false,
|
|
57
|
-
declarationDir: undefined,
|
|
58
|
-
target: 'ES2017',
|
|
59
|
-
module: 'ESNext',
|
|
60
|
-
},
|
|
61
|
-
}),
|
|
62
|
-
terser(),
|
|
63
|
-
],
|
|
64
|
-
};
|
package/tsup.config.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { defineConfig, Options } from "tsup";
|
|
2
|
-
|
|
3
|
-
export default defineConfig((options: Options) => ({
|
|
4
|
-
entry: [
|
|
5
|
-
"src/**/*.{ts,tsx}",
|
|
6
|
-
"!src/**/*.test.{ts,tsx}",
|
|
7
|
-
"!src/**/__tests__/**/*",
|
|
8
|
-
],
|
|
9
|
-
format: ["esm", "cjs"],
|
|
10
|
-
dts: true,
|
|
11
|
-
minify: false,
|
|
12
|
-
external: ["react", "@copilotkitnext/core", "@copilotkitnext/react"],
|
|
13
|
-
sourcemap: true,
|
|
14
|
-
...options,
|
|
15
|
-
}));
|