@copilotkit/react-ui 0.0.0-0.0.0-max-changeset-10101010101010-20260109191632
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/CHANGELOG.md +17415 -0
- package/LICENSE +21 -0
- package/README.md +141 -0
- package/dist/chunk-3W6J75HS.mjs +126 -0
- package/dist/chunk-3W6J75HS.mjs.map +1 -0
- package/dist/chunk-54JAUBUJ.mjs +26 -0
- package/dist/chunk-54JAUBUJ.mjs.map +1 -0
- package/dist/chunk-7OURDQZJ.mjs +133 -0
- package/dist/chunk-7OURDQZJ.mjs.map +1 -0
- package/dist/chunk-7PR2KJDO.mjs +222 -0
- package/dist/chunk-7PR2KJDO.mjs.map +1 -0
- package/dist/chunk-BH6PCAAL.mjs +81 -0
- package/dist/chunk-BH6PCAAL.mjs.map +1 -0
- package/dist/chunk-C3GSYRC3.mjs +118 -0
- package/dist/chunk-C3GSYRC3.mjs.map +1 -0
- package/dist/chunk-DBKRAOH7.mjs +34 -0
- package/dist/chunk-DBKRAOH7.mjs.map +1 -0
- package/dist/chunk-EFZPSZWO.mjs +1 -0
- package/dist/chunk-EFZPSZWO.mjs.map +1 -0
- package/dist/chunk-ELGRNEAO.mjs +32 -0
- package/dist/chunk-ELGRNEAO.mjs.map +1 -0
- package/dist/chunk-ELUJRANC.mjs +21 -0
- package/dist/chunk-ELUJRANC.mjs.map +1 -0
- package/dist/chunk-FFJHOZX6.mjs +202 -0
- package/dist/chunk-FFJHOZX6.mjs.map +1 -0
- package/dist/chunk-GDSZGYCE.mjs +32 -0
- package/dist/chunk-GDSZGYCE.mjs.map +1 -0
- package/dist/chunk-HIW7RXCD.mjs +184 -0
- package/dist/chunk-HIW7RXCD.mjs.map +1 -0
- package/dist/chunk-IEMQ2SQW.mjs +93 -0
- package/dist/chunk-IEMQ2SQW.mjs.map +1 -0
- package/dist/chunk-IHFR6PYG.mjs +116 -0
- package/dist/chunk-IHFR6PYG.mjs.map +1 -0
- package/dist/chunk-IK2BPURM.mjs +400 -0
- package/dist/chunk-IK2BPURM.mjs.map +1 -0
- package/dist/chunk-IU3WTXLQ.mjs +1 -0
- package/dist/chunk-IU3WTXLQ.mjs.map +1 -0
- package/dist/chunk-JGMFJZMG.mjs +11 -0
- package/dist/chunk-JGMFJZMG.mjs.map +1 -0
- package/dist/chunk-JY2CSDKN.mjs +135 -0
- package/dist/chunk-JY2CSDKN.mjs.map +1 -0
- package/dist/chunk-JZ3RFQQ6.mjs +128 -0
- package/dist/chunk-JZ3RFQQ6.mjs.map +1 -0
- package/dist/chunk-KXE2JCUH.mjs +1 -0
- package/dist/chunk-KXE2JCUH.mjs.map +1 -0
- package/dist/chunk-LQEFRHRT.mjs +30 -0
- package/dist/chunk-LQEFRHRT.mjs.map +1 -0
- package/dist/chunk-MMVDU6DF.mjs +1 -0
- package/dist/chunk-MMVDU6DF.mjs.map +1 -0
- package/dist/chunk-MRXNTQOX.mjs +59 -0
- package/dist/chunk-MRXNTQOX.mjs.map +1 -0
- package/dist/chunk-NCIAFFQ2.mjs +82 -0
- package/dist/chunk-NCIAFFQ2.mjs.map +1 -0
- package/dist/chunk-NGJ32FAP.mjs +30 -0
- package/dist/chunk-NGJ32FAP.mjs.map +1 -0
- package/dist/chunk-NRA3CFEE.mjs +97 -0
- package/dist/chunk-NRA3CFEE.mjs.map +1 -0
- package/dist/chunk-O72ZB5V3.mjs +140 -0
- package/dist/chunk-O72ZB5V3.mjs.map +1 -0
- package/dist/chunk-PLHTVHUW.mjs +82 -0
- package/dist/chunk-PLHTVHUW.mjs.map +1 -0
- package/dist/chunk-Q5V6S67N.mjs +103 -0
- package/dist/chunk-Q5V6S67N.mjs.map +1 -0
- package/dist/chunk-QB3GUN2N.mjs +31 -0
- package/dist/chunk-QB3GUN2N.mjs.map +1 -0
- package/dist/chunk-QIOJXTIQ.mjs +64 -0
- package/dist/chunk-QIOJXTIQ.mjs.map +1 -0
- package/dist/chunk-QPQRLXN3.mjs +435 -0
- package/dist/chunk-QPQRLXN3.mjs.map +1 -0
- package/dist/chunk-RYUCX3ZK.mjs +32 -0
- package/dist/chunk-RYUCX3ZK.mjs.map +1 -0
- package/dist/chunk-SC6JRFAJ.mjs +1 -0
- package/dist/chunk-SC6JRFAJ.mjs.map +1 -0
- package/dist/chunk-T26KLXLH.mjs +1 -0
- package/dist/chunk-T26KLXLH.mjs.map +1 -0
- package/dist/chunk-UFN2VWSR.mjs +25 -0
- package/dist/chunk-UFN2VWSR.mjs.map +1 -0
- package/dist/chunk-V7W6IM2V.mjs +1 -0
- package/dist/chunk-V7W6IM2V.mjs.map +1 -0
- package/dist/chunk-WB3YULQ4.mjs +1 -0
- package/dist/chunk-WB3YULQ4.mjs.map +1 -0
- package/dist/chunk-XWG3L6QC.mjs +258 -0
- package/dist/chunk-XWG3L6QC.mjs.map +1 -0
- package/dist/chunk-Y4FKRAKJ.mjs +12 -0
- package/dist/chunk-Y4FKRAKJ.mjs.map +1 -0
- package/dist/components/chat/Button.d.ts +9 -0
- package/dist/components/chat/Button.js +71 -0
- package/dist/components/chat/Button.js.map +1 -0
- package/dist/components/chat/Button.mjs +10 -0
- package/dist/components/chat/Button.mjs.map +1 -0
- package/dist/components/chat/Chat.d.ts +204 -0
- package/dist/components/chat/Chat.js +2270 -0
- package/dist/components/chat/Chat.js.map +1 -0
- package/dist/components/chat/Chat.mjs +29 -0
- package/dist/components/chat/Chat.mjs.map +1 -0
- package/dist/components/chat/ChatContext.d.ts +145 -0
- package/dist/components/chat/ChatContext.js +329 -0
- package/dist/components/chat/ChatContext.js.map +1 -0
- package/dist/components/chat/ChatContext.mjs +13 -0
- package/dist/components/chat/ChatContext.mjs.map +1 -0
- package/dist/components/chat/CodeBlock.d.ts +14 -0
- package/dist/components/chat/CodeBlock.js +510 -0
- package/dist/components/chat/CodeBlock.js.map +1 -0
- package/dist/components/chat/CodeBlock.mjs +14 -0
- package/dist/components/chat/CodeBlock.mjs.map +1 -0
- package/dist/components/chat/Header.d.ts +9 -0
- package/dist/components/chat/Header.js +582 -0
- package/dist/components/chat/Header.js.map +1 -0
- package/dist/components/chat/Header.mjs +17 -0
- package/dist/components/chat/Header.mjs.map +1 -0
- package/dist/components/chat/Icons.d.ts +20 -0
- package/dist/components/chat/Icons.js +297 -0
- package/dist/components/chat/Icons.js.map +1 -0
- package/dist/components/chat/Icons.mjs +38 -0
- package/dist/components/chat/Icons.mjs.map +1 -0
- package/dist/components/chat/ImageUploadQueue.d.ts +13 -0
- package/dist/components/chat/ImageUploadQueue.js +106 -0
- package/dist/components/chat/ImageUploadQueue.js.map +1 -0
- package/dist/components/chat/ImageUploadQueue.mjs +8 -0
- package/dist/components/chat/ImageUploadQueue.mjs.map +1 -0
- package/dist/components/chat/Input.d.ts +9 -0
- package/dist/components/chat/Input.js +396 -0
- package/dist/components/chat/Input.js.map +1 -0
- package/dist/components/chat/Input.mjs +14 -0
- package/dist/components/chat/Input.mjs.map +1 -0
- package/dist/components/chat/Markdown.d.ts +10 -0
- package/dist/components/chat/Markdown.js +652 -0
- package/dist/components/chat/Markdown.js.map +1 -0
- package/dist/components/chat/Markdown.mjs +11 -0
- package/dist/components/chat/Markdown.mjs.map +1 -0
- package/dist/components/chat/Messages.d.ts +13 -0
- package/dist/components/chat/Messages.js +1195 -0
- package/dist/components/chat/Messages.js.map +1 -0
- package/dist/components/chat/Messages.mjs +20 -0
- package/dist/components/chat/Messages.mjs.map +1 -0
- package/dist/components/chat/Modal.d.ts +51 -0
- package/dist/components/chat/Modal.js +3075 -0
- package/dist/components/chat/Modal.js.map +1 -0
- package/dist/components/chat/Modal.mjs +38 -0
- package/dist/components/chat/Modal.mjs.map +1 -0
- package/dist/components/chat/Popup.d.ts +13 -0
- package/dist/components/chat/Popup.js +3086 -0
- package/dist/components/chat/Popup.js.map +1 -0
- package/dist/components/chat/Popup.mjs +39 -0
- package/dist/components/chat/Popup.mjs.map +1 -0
- package/dist/components/chat/PoweredByTag.d.ts +7 -0
- package/dist/components/chat/PoweredByTag.js +61 -0
- package/dist/components/chat/PoweredByTag.js.map +1 -0
- package/dist/components/chat/PoweredByTag.mjs +9 -0
- package/dist/components/chat/PoweredByTag.mjs.map +1 -0
- package/dist/components/chat/Sidebar.d.ts +13 -0
- package/dist/components/chat/Sidebar.js +3095 -0
- package/dist/components/chat/Sidebar.js.map +1 -0
- package/dist/components/chat/Sidebar.mjs +39 -0
- package/dist/components/chat/Sidebar.mjs.map +1 -0
- package/dist/components/chat/Suggestion.d.ts +12 -0
- package/dist/components/chat/Suggestion.js +56 -0
- package/dist/components/chat/Suggestion.js.map +1 -0
- package/dist/components/chat/Suggestion.mjs +9 -0
- package/dist/components/chat/Suggestion.mjs.map +1 -0
- package/dist/components/chat/Suggestions.d.ts +9 -0
- package/dist/components/chat/Suggestions.js +81 -0
- package/dist/components/chat/Suggestions.js.map +1 -0
- package/dist/components/chat/Suggestions.mjs +10 -0
- package/dist/components/chat/Suggestions.mjs.map +1 -0
- package/dist/components/chat/Textarea.d.ts +15 -0
- package/dist/components/chat/Textarea.js +84 -0
- package/dist/components/chat/Textarea.js.map +1 -0
- package/dist/components/chat/Textarea.mjs +8 -0
- package/dist/components/chat/Textarea.mjs.map +1 -0
- package/dist/components/chat/Window.d.ts +9 -0
- package/dist/components/chat/Window.js +164 -0
- package/dist/components/chat/Window.js.map +1 -0
- package/dist/components/chat/Window.mjs +10 -0
- package/dist/components/chat/Window.mjs.map +1 -0
- package/dist/components/chat/index.d.ts +18 -0
- package/dist/components/chat/index.js +3122 -0
- package/dist/components/chat/index.js.map +1 -0
- package/dist/components/chat/index.mjs +69 -0
- package/dist/components/chat/index.mjs.map +1 -0
- package/dist/components/chat/messages/AssistantMessage.d.ts +9 -0
- package/dist/components/chat/messages/AssistantMessage.js +775 -0
- package/dist/components/chat/messages/AssistantMessage.js.map +1 -0
- package/dist/components/chat/messages/AssistantMessage.mjs +13 -0
- package/dist/components/chat/messages/AssistantMessage.mjs.map +1 -0
- package/dist/components/chat/messages/ErrorMessage.d.ts +9 -0
- package/dist/components/chat/messages/ErrorMessage.js +722 -0
- package/dist/components/chat/messages/ErrorMessage.js.map +1 -0
- package/dist/components/chat/messages/ErrorMessage.mjs +66 -0
- package/dist/components/chat/messages/ErrorMessage.mjs.map +1 -0
- package/dist/components/chat/messages/ImageRenderer.d.ts +12 -0
- package/dist/components/chat/messages/ImageRenderer.js +58 -0
- package/dist/components/chat/messages/ImageRenderer.js.map +1 -0
- package/dist/components/chat/messages/ImageRenderer.mjs +8 -0
- package/dist/components/chat/messages/ImageRenderer.mjs.map +1 -0
- package/dist/components/chat/messages/LegacyRenderMessage.d.ts +28 -0
- package/dist/components/chat/messages/LegacyRenderMessage.js +1023 -0
- package/dist/components/chat/messages/LegacyRenderMessage.js.map +1 -0
- package/dist/components/chat/messages/LegacyRenderMessage.mjs +17 -0
- package/dist/components/chat/messages/LegacyRenderMessage.mjs.map +1 -0
- package/dist/components/chat/messages/RenderMessage.d.ts +9 -0
- package/dist/components/chat/messages/RenderMessage.js +898 -0
- package/dist/components/chat/messages/RenderMessage.js.map +1 -0
- package/dist/components/chat/messages/RenderMessage.mjs +16 -0
- package/dist/components/chat/messages/RenderMessage.mjs.map +1 -0
- package/dist/components/chat/messages/UserMessage.d.ts +9 -0
- package/dist/components/chat/messages/UserMessage.js +56 -0
- package/dist/components/chat/messages/UserMessage.js.map +1 -0
- package/dist/components/chat/messages/UserMessage.mjs +8 -0
- package/dist/components/chat/messages/UserMessage.mjs.map +1 -0
- package/dist/components/chat/props.d.ts +298 -0
- package/dist/components/chat/props.js +19 -0
- package/dist/components/chat/props.js.map +1 -0
- package/dist/components/chat/props.mjs +2 -0
- package/dist/components/chat/props.mjs.map +1 -0
- package/dist/components/dev-console/console.d.ts +11 -0
- package/dist/components/dev-console/console.js +537 -0
- package/dist/components/dev-console/console.js.map +1 -0
- package/dist/components/dev-console/console.mjs +17 -0
- package/dist/components/dev-console/console.mjs.map +1 -0
- package/dist/components/dev-console/icons.d.ts +9 -0
- package/dist/components/dev-console/icons.js +131 -0
- package/dist/components/dev-console/icons.js.map +1 -0
- package/dist/components/dev-console/icons.mjs +16 -0
- package/dist/components/dev-console/icons.mjs.map +1 -0
- package/dist/components/dev-console/index.d.ts +3 -0
- package/dist/components/dev-console/index.js +537 -0
- package/dist/components/dev-console/index.js.map +1 -0
- package/dist/components/dev-console/index.mjs +18 -0
- package/dist/components/dev-console/index.mjs.map +1 -0
- package/dist/components/dev-console/types.d.ts +9 -0
- package/dist/components/dev-console/types.js +19 -0
- package/dist/components/dev-console/types.js.map +1 -0
- package/dist/components/dev-console/types.mjs +1 -0
- package/dist/components/dev-console/types.mjs.map +1 -0
- package/dist/components/dev-console/utils.d.ts +10 -0
- package/dist/components/dev-console/utils.js +177 -0
- package/dist/components/dev-console/utils.js.map +1 -0
- package/dist/components/dev-console/utils.mjs +16 -0
- package/dist/components/dev-console/utils.mjs.map +1 -0
- package/dist/components/help-modal/icons.d.ts +9 -0
- package/dist/components/help-modal/icons.js +107 -0
- package/dist/components/help-modal/icons.js.map +1 -0
- package/dist/components/help-modal/icons.mjs +12 -0
- package/dist/components/help-modal/icons.mjs.map +1 -0
- package/dist/components/help-modal/index.d.ts +2 -0
- package/dist/components/help-modal/index.js +137 -0
- package/dist/components/help-modal/index.js.map +1 -0
- package/dist/components/help-modal/index.mjs +10 -0
- package/dist/components/help-modal/index.mjs.map +1 -0
- package/dist/components/help-modal/modal.d.ts +5 -0
- package/dist/components/help-modal/modal.js +135 -0
- package/dist/components/help-modal/modal.js.map +1 -0
- package/dist/components/help-modal/modal.mjs +9 -0
- package/dist/components/help-modal/modal.mjs.map +1 -0
- package/dist/components/index.d.ts +19 -0
- package/dist/components/index.js +3126 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/index.mjs +76 -0
- package/dist/components/index.mjs.map +1 -0
- package/dist/context/index.d.ts +2 -0
- package/dist/context/index.js +19 -0
- package/dist/context/index.js.map +1 -0
- package/dist/context/index.mjs +2 -0
- package/dist/context/index.mjs.map +1 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.js +36 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/index.mjs +9 -0
- package/dist/hooks/index.mjs.map +1 -0
- package/dist/hooks/use-copilot-chat-suggestions.d.ts +66 -0
- package/dist/hooks/use-copilot-chat-suggestions.js +34 -0
- package/dist/hooks/use-copilot-chat-suggestions.js.map +1 -0
- package/dist/hooks/use-copilot-chat-suggestions.mjs +8 -0
- package/dist/hooks/use-copilot-chat-suggestions.mjs.map +1 -0
- package/dist/hooks/use-copy-to-clipboard.d.ts +9 -0
- package/dist/hooks/use-copy-to-clipboard.js +60 -0
- package/dist/hooks/use-copy-to-clipboard.js.map +1 -0
- package/dist/hooks/use-copy-to-clipboard.mjs +8 -0
- package/dist/hooks/use-copy-to-clipboard.mjs.map +1 -0
- package/dist/hooks/use-dark-mode.d.ts +3 -0
- package/dist/hooks/use-dark-mode.js +35 -0
- package/dist/hooks/use-dark-mode.js.map +1 -0
- package/dist/hooks/use-dark-mode.mjs +8 -0
- package/dist/hooks/use-dark-mode.mjs.map +1 -0
- package/dist/hooks/use-push-to-talk.d.ts +19 -0
- package/dist/hooks/use-push-to-talk.js +195 -0
- package/dist/hooks/use-push-to-talk.js.map +1 -0
- package/dist/hooks/use-push-to-talk.mjs +12 -0
- package/dist/hooks/use-push-to-talk.mjs.map +1 -0
- package/dist/index.css +1258 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.js +3135 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +84 -0
- package/dist/index.mjs.map +1 -0
- package/dist/lib/utils.d.ts +4 -0
- package/dist/lib/utils.js +76 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/lib/utils.mjs +34 -0
- package/dist/lib/utils.mjs.map +1 -0
- package/dist/types/css.d.ts +22 -0
- package/dist/types/css.js +19 -0
- package/dist/types/css.js.map +1 -0
- package/dist/types/css.mjs +1 -0
- package/dist/types/css.mjs.map +1 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.js +19 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/index.mjs +2 -0
- package/dist/types/index.mjs.map +1 -0
- package/dist/types/suggestions.d.ts +9 -0
- package/dist/types/suggestions.js +19 -0
- package/dist/types/suggestions.js.map +1 -0
- package/dist/types/suggestions.mjs +1 -0
- package/dist/types/suggestions.mjs.map +1 -0
- package/dist/v2/index.css +4 -0
- package/dist/v2/index.css.map +1 -0
- package/dist/v2/index.d.ts +2 -0
- package/dist/v2/index.js +2 -0
- package/dist/v2/index.js.map +1 -0
- package/dist/v2/index.mjs +2 -0
- package/dist/v2/index.mjs.map +1 -0
- package/jest.config.js +5 -0
- package/package.json +83 -0
- package/postcss.config.js +60 -0
- package/src/components/chat/Button.tsx +18 -0
- package/src/components/chat/Chat.tsx +795 -0
- package/src/components/chat/ChatContext.tsx +248 -0
- package/src/components/chat/CodeBlock.tsx +418 -0
- package/src/components/chat/Header.tsx +24 -0
- package/src/components/chat/Icons.tsx +237 -0
- package/src/components/chat/ImageUploadQueue.tsx +77 -0
- package/src/components/chat/Input.tsx +156 -0
- package/src/components/chat/Markdown.tsx +144 -0
- package/src/components/chat/Messages.tsx +206 -0
- package/src/components/chat/Modal.tsx +220 -0
- package/src/components/chat/Popup.tsx +77 -0
- package/src/components/chat/PoweredByTag.tsx +42 -0
- package/src/components/chat/Sidebar.tsx +96 -0
- package/src/components/chat/Suggestion.tsx +29 -0
- package/src/components/chat/Suggestions.tsx +23 -0
- package/src/components/chat/Textarea.tsx +77 -0
- package/src/components/chat/Window.tsx +152 -0
- package/src/components/chat/index.tsx +11 -0
- package/src/components/chat/messages/AssistantMessage.tsx +118 -0
- package/src/components/chat/messages/ErrorMessage.tsx +59 -0
- package/src/components/chat/messages/ImageRenderer.tsx +37 -0
- package/src/components/chat/messages/LegacyRenderMessage.tsx +150 -0
- package/src/components/chat/messages/RenderMessage.tsx +61 -0
- package/src/components/chat/messages/UserMessage.tsx +46 -0
- package/src/components/chat/props.ts +353 -0
- package/src/components/dev-console/console.tsx +242 -0
- package/src/components/dev-console/icons.tsx +99 -0
- package/src/components/dev-console/index.tsx +2 -0
- package/src/components/dev-console/types.ts +7 -0
- package/src/components/dev-console/utils.ts +142 -0
- package/src/components/help-modal/icons.tsx +68 -0
- package/src/components/help-modal/index.tsx +1 -0
- package/src/components/help-modal/modal.tsx +101 -0
- package/src/components/index.ts +2 -0
- package/src/context/index.ts +1 -0
- package/src/css/animations.css +35 -0
- package/src/css/button.css +67 -0
- package/src/css/colors.css +78 -0
- package/src/css/console.css +166 -0
- package/src/css/crew.css +277 -0
- package/src/css/header.css +65 -0
- package/src/css/input.css +152 -0
- package/src/css/markdown.css +150 -0
- package/src/css/messages.css +244 -0
- package/src/css/panel.css +39 -0
- package/src/css/popup.css +22 -0
- package/src/css/sidebar.css +34 -0
- package/src/css/suggestions.css +43 -0
- package/src/css/window.css +60 -0
- package/src/hooks/index.ts +1 -0
- package/src/hooks/use-copilot-chat-suggestions.tsx +71 -0
- package/src/hooks/use-copy-to-clipboard.tsx +29 -0
- package/src/hooks/use-dark-mode.ts +10 -0
- package/src/hooks/use-push-to-talk.tsx +167 -0
- package/src/index.tsx +7 -0
- package/src/lib/utils.test.ts +7 -0
- package/src/lib/utils.ts +27 -0
- package/src/styles.css +14 -0
- package/src/types/css.ts +21 -0
- package/src/types/index.ts +2 -0
- package/src/types/suggestions.ts +7 -0
- package/src/v2/index.ts +1 -0
- package/src/v2/styles.css +1 -0
- package/tailwind.config.js +7 -0
- package/tsconfig.json +12 -0
- package/tsup.config.ts +11 -0
- package/typedoc.json +4 -0
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import "./chunk-EFZPSZWO.mjs";
|
|
3
|
+
import "./chunk-MMVDU6DF.mjs";
|
|
4
|
+
import "./chunk-SC6JRFAJ.mjs";
|
|
5
|
+
import "./chunk-WB3YULQ4.mjs";
|
|
6
|
+
import {
|
|
7
|
+
CopilotPopup
|
|
8
|
+
} from "./chunk-ELUJRANC.mjs";
|
|
9
|
+
import {
|
|
10
|
+
CopilotSidebar
|
|
11
|
+
} from "./chunk-LQEFRHRT.mjs";
|
|
12
|
+
import "./chunk-7PR2KJDO.mjs";
|
|
13
|
+
import "./chunk-C3GSYRC3.mjs";
|
|
14
|
+
import "./chunk-GDSZGYCE.mjs";
|
|
15
|
+
import "./chunk-V7W6IM2V.mjs";
|
|
16
|
+
import {
|
|
17
|
+
CopilotDevConsole
|
|
18
|
+
} from "./chunk-FFJHOZX6.mjs";
|
|
19
|
+
import "./chunk-Q5V6S67N.mjs";
|
|
20
|
+
import {
|
|
21
|
+
shouldShowDevConsole
|
|
22
|
+
} from "./chunk-JY2CSDKN.mjs";
|
|
23
|
+
import "./chunk-KXE2JCUH.mjs";
|
|
24
|
+
import "./chunk-NRA3CFEE.mjs";
|
|
25
|
+
import "./chunk-BH6PCAAL.mjs";
|
|
26
|
+
import "./chunk-UFN2VWSR.mjs";
|
|
27
|
+
import {
|
|
28
|
+
CopilotChat
|
|
29
|
+
} from "./chunk-QPQRLXN3.mjs";
|
|
30
|
+
import {
|
|
31
|
+
Suggestions
|
|
32
|
+
} from "./chunk-QB3GUN2N.mjs";
|
|
33
|
+
import {
|
|
34
|
+
Suggestion
|
|
35
|
+
} from "./chunk-NGJ32FAP.mjs";
|
|
36
|
+
import "./chunk-PLHTVHUW.mjs";
|
|
37
|
+
import "./chunk-3W6J75HS.mjs";
|
|
38
|
+
import "./chunk-ELGRNEAO.mjs";
|
|
39
|
+
import "./chunk-QIOJXTIQ.mjs";
|
|
40
|
+
import "./chunk-HIW7RXCD.mjs";
|
|
41
|
+
import "./chunk-7OURDQZJ.mjs";
|
|
42
|
+
import "./chunk-NCIAFFQ2.mjs";
|
|
43
|
+
import {
|
|
44
|
+
AssistantMessage
|
|
45
|
+
} from "./chunk-IHFR6PYG.mjs";
|
|
46
|
+
import {
|
|
47
|
+
ImageRenderer
|
|
48
|
+
} from "./chunk-DBKRAOH7.mjs";
|
|
49
|
+
import {
|
|
50
|
+
UserMessage
|
|
51
|
+
} from "./chunk-RYUCX3ZK.mjs";
|
|
52
|
+
import {
|
|
53
|
+
Markdown
|
|
54
|
+
} from "./chunk-JZ3RFQQ6.mjs";
|
|
55
|
+
import "./chunk-IK2BPURM.mjs";
|
|
56
|
+
import {
|
|
57
|
+
useChatContext
|
|
58
|
+
} from "./chunk-IEMQ2SQW.mjs";
|
|
59
|
+
import "./chunk-XWG3L6QC.mjs";
|
|
60
|
+
import "./chunk-IU3WTXLQ.mjs";
|
|
61
|
+
import "./chunk-T26KLXLH.mjs";
|
|
62
|
+
import {
|
|
63
|
+
useCopilotChatSuggestions
|
|
64
|
+
} from "./chunk-Y4FKRAKJ.mjs";
|
|
65
|
+
import "./chunk-54JAUBUJ.mjs";
|
|
66
|
+
import "./chunk-JGMFJZMG.mjs";
|
|
67
|
+
import "./chunk-O72ZB5V3.mjs";
|
|
68
|
+
import "./chunk-MRXNTQOX.mjs";
|
|
69
|
+
export {
|
|
70
|
+
AssistantMessage,
|
|
71
|
+
CopilotChat,
|
|
72
|
+
CopilotDevConsole,
|
|
73
|
+
CopilotPopup,
|
|
74
|
+
CopilotSidebar,
|
|
75
|
+
ImageRenderer,
|
|
76
|
+
Markdown,
|
|
77
|
+
Suggestion as RenderSuggestion,
|
|
78
|
+
Suggestions as RenderSuggestionsList,
|
|
79
|
+
UserMessage,
|
|
80
|
+
shouldShowDevConsole,
|
|
81
|
+
useChatContext,
|
|
82
|
+
useCopilotChatSuggestions
|
|
83
|
+
};
|
|
84
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,76 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/utils.ts"],"sourcesContent":["export async function fetcher<JSON = any>(input: RequestInfo, init?: RequestInit): 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,QAAoB,OAAoB,MAAmC;AAAA;AAC/F,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":[]}
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/utils.ts"],"sourcesContent":["export async function fetcher<JSON = any>(input: RequestInfo, init?: RequestInit): 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,QAAoB,OAAoB,MAAmC;AAAA;AAC/F,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":[]}
|
|
@@ -0,0 +1,22 @@
|
|
|
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 };
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=css.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/types/index.ts"],"sourcesContent":["export type { CopilotKitCSSProperties } from \"./css\";\nexport type { CopilotChatSuggestion } from \"./suggestions\";\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=suggestions.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/v2/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/jest.config.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@copilotkit/react-ui",
|
|
3
|
+
"private": false,
|
|
4
|
+
"homepage": "https://github.com/CopilotKit/CopilotKit",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/CopilotKit/CopilotKit.git"
|
|
8
|
+
},
|
|
9
|
+
"publishConfig": {
|
|
10
|
+
"access": "public"
|
|
11
|
+
},
|
|
12
|
+
"version": "0.0.0-0.0.0-max-changeset-10101010101010-20260109191632",
|
|
13
|
+
"sideEffects": [
|
|
14
|
+
"**/*.css"
|
|
15
|
+
],
|
|
16
|
+
"main": "./dist/index.js",
|
|
17
|
+
"module": "./dist/index.mjs",
|
|
18
|
+
"exports": {
|
|
19
|
+
".": {
|
|
20
|
+
"import": "./dist/index.mjs",
|
|
21
|
+
"require": "./dist/index.js",
|
|
22
|
+
"types": "./dist/index.d.ts"
|
|
23
|
+
},
|
|
24
|
+
"./styles.css": "./dist/index.css",
|
|
25
|
+
"./v2/styles.css": "./dist/v2/index.css"
|
|
26
|
+
},
|
|
27
|
+
"types": "./dist/index.d.ts",
|
|
28
|
+
"license": "MIT",
|
|
29
|
+
"peerDependencies": {
|
|
30
|
+
"react": "^18 || ^19 || ^19.0.0-rc",
|
|
31
|
+
"@copilotkit/react-core": "0.0.0-0.0.0-max-changeset-10101010101010-20260109191632",
|
|
32
|
+
"@copilotkit/runtime-client-gql": "0.0.0-0.0.0-max-changeset-10101010101010-20260109191632",
|
|
33
|
+
"@copilotkit/shared": "0.0.0-0.0.0-max-changeset-10101010101010-20260109191632"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@types/jest": "^29.5.4",
|
|
37
|
+
"@types/react": "^19.1.0",
|
|
38
|
+
"@types/react-syntax-highlighter": "^15.5.7",
|
|
39
|
+
"eslint": "^8.56.0",
|
|
40
|
+
"jest": "^29.6.4",
|
|
41
|
+
"postcss": "^8.4.20",
|
|
42
|
+
"react": "^18.2.0",
|
|
43
|
+
"tailwindcss": "^3.3.0",
|
|
44
|
+
"ts-jest": "^29.1.1",
|
|
45
|
+
"tsup": "^6.7.0",
|
|
46
|
+
"typescript": "^5.2.3",
|
|
47
|
+
"@copilotkit/react-core": "0.0.0-0.0.0-max-changeset-10101010101010-20260109191632",
|
|
48
|
+
"@copilotkit/runtime-client-gql": "0.0.0-0.0.0-max-changeset-10101010101010-20260109191632",
|
|
49
|
+
"eslint-config-custom": "1.4.6",
|
|
50
|
+
"@copilotkit/shared": "0.0.0-0.0.0-max-changeset-10101010101010-20260109191632",
|
|
51
|
+
"tailwind-config": "1.4.6",
|
|
52
|
+
"tsconfig": "1.4.6"
|
|
53
|
+
},
|
|
54
|
+
"dependencies": {
|
|
55
|
+
"@headlessui/react": "^2.2.9",
|
|
56
|
+
"react-markdown": "^10.1.0",
|
|
57
|
+
"react-syntax-highlighter": "^15.6.1",
|
|
58
|
+
"rehype-raw": "^7.0.0",
|
|
59
|
+
"remark-gfm": "^4.0.1",
|
|
60
|
+
"remark-math": "^6.0.0"
|
|
61
|
+
},
|
|
62
|
+
"keywords": [
|
|
63
|
+
"copilotkit",
|
|
64
|
+
"copilot",
|
|
65
|
+
"react",
|
|
66
|
+
"nextjs",
|
|
67
|
+
"nodejs",
|
|
68
|
+
"ai",
|
|
69
|
+
"assistant",
|
|
70
|
+
"javascript",
|
|
71
|
+
"automation",
|
|
72
|
+
"textarea"
|
|
73
|
+
],
|
|
74
|
+
"scripts": {
|
|
75
|
+
"build": "tsup --clean",
|
|
76
|
+
"dev": "tsup --watch --no-splitting",
|
|
77
|
+
"test": "jest",
|
|
78
|
+
"check-types": "tsc --noEmit",
|
|
79
|
+
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist && rm -rf .next",
|
|
80
|
+
"link:global": "pnpm link --global",
|
|
81
|
+
"unlink:global": "pnpm unlink --global"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
const path = require("path");
|
|
2
|
+
const fs = require("fs");
|
|
3
|
+
|
|
4
|
+
let didCreateInterface = false;
|
|
5
|
+
|
|
6
|
+
module.exports = {
|
|
7
|
+
plugins: [
|
|
8
|
+
{
|
|
9
|
+
postcssPlugin: "postcss-collect-all-variables",
|
|
10
|
+
Once(root) {
|
|
11
|
+
if (didCreateInterface) return;
|
|
12
|
+
|
|
13
|
+
const filename = path.basename(root.source.input.file);
|
|
14
|
+
if (filename === "colors.css") {
|
|
15
|
+
const variables = {};
|
|
16
|
+
|
|
17
|
+
root.walkDecls((decl) => {
|
|
18
|
+
if (decl.prop.startsWith("--")) {
|
|
19
|
+
variables[decl.prop] = decl.value;
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
// Create TypeScript interface
|
|
24
|
+
const interfaceContent = generateInterface(variables);
|
|
25
|
+
|
|
26
|
+
// Ensure the directory exists
|
|
27
|
+
const dir = path.resolve(__dirname, "src/types");
|
|
28
|
+
if (!fs.existsSync(dir)) {
|
|
29
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Write the interface to the file
|
|
33
|
+
const filePath = path.resolve(dir, "css.ts");
|
|
34
|
+
fs.writeFileSync(filePath, interfaceContent);
|
|
35
|
+
|
|
36
|
+
didCreateInterface = true;
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
// require("tailwindcss"),
|
|
41
|
+
// require("autoprefixer"),
|
|
42
|
+
],
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
function generateInterface(variables) {
|
|
46
|
+
const interfaceLines = [
|
|
47
|
+
"// autogenerated (see postcss.config.js) - do not edit",
|
|
48
|
+
'import { CSSProperties } from "react";',
|
|
49
|
+
"",
|
|
50
|
+
"export interface CopilotKitCSSProperties extends CSSProperties {",
|
|
51
|
+
];
|
|
52
|
+
|
|
53
|
+
for (const [prop, value] of Object.entries(variables)) {
|
|
54
|
+
interfaceLines.push(` "${prop}"?: string;`);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
interfaceLines.push("}");
|
|
58
|
+
|
|
59
|
+
return interfaceLines.join("\n") + "\n";
|
|
60
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ButtonProps } from "./props";
|
|
2
|
+
import { useChatContext } from "./ChatContext";
|
|
3
|
+
|
|
4
|
+
export const Button = ({}: ButtonProps) => {
|
|
5
|
+
const { open, setOpen, icons } = useChatContext();
|
|
6
|
+
|
|
7
|
+
return (
|
|
8
|
+
<div onClick={() => setOpen(!open)}>
|
|
9
|
+
<button
|
|
10
|
+
className={`copilotKitButton ${open ? "open" : ""}`}
|
|
11
|
+
aria-label={open ? "Close Chat" : "Open Chat"}
|
|
12
|
+
>
|
|
13
|
+
<div className="copilotKitButtonIcon copilotKitButtonIconOpen">{icons.openIcon}</div>
|
|
14
|
+
<div className="copilotKitButtonIcon copilotKitButtonIconClose">{icons.closeIcon}</div>
|
|
15
|
+
</button>
|
|
16
|
+
</div>
|
|
17
|
+
);
|
|
18
|
+
};
|