@chatsdk-dev/elements 0.0.1 → 0.1.3
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/README.md +3 -3
- package/dist/api-CIYPz72L.d.ts +10 -0
- package/dist/api-CIYPz72L.d.ts.map +1 -0
- package/dist/callbacks-PIvHXeEI.d.ts +24 -0
- package/dist/callbacks-PIvHXeEI.d.ts.map +1 -0
- package/dist/chat-element-CCsDDFif.js +441 -0
- package/dist/chat-element-CCsDDFif.js.map +1 -0
- package/dist/chat-element-CSpa62Te.d.ts +53 -0
- package/dist/chat-element-CSpa62Te.d.ts.map +1 -0
- package/dist/chatsdk-provider-BhlChLFd.d.ts +15 -0
- package/dist/chatsdk-provider-BhlChLFd.d.ts.map +1 -0
- package/dist/common/utils.d.ts +14 -0
- package/dist/common/utils.d.ts.map +1 -0
- package/dist/common/utils.js +26 -0
- package/dist/common/utils.js.map +1 -0
- package/dist/components/info-card.d.ts +20 -11
- package/dist/components/info-card.d.ts.map +1 -0
- package/dist/components/info-card.js +38 -1
- package/dist/components/info-card.js.map +1 -0
- package/dist/config-BigIL6TQ.js +29 -0
- package/dist/config-BigIL6TQ.js.map +1 -0
- package/dist/config-CqihvSgz.d.ts +150 -0
- package/dist/config-CqihvSgz.d.ts.map +1 -0
- package/dist/config-D_jVTH_D.d.ts +58 -0
- package/dist/config-D_jVTH_D.d.ts.map +1 -0
- package/dist/context-aSaHw-ac.d.ts +13 -0
- package/dist/context-aSaHw-ac.d.ts.map +1 -0
- package/dist/element-provider-C_nBsftD.d.ts +40 -0
- package/dist/element-provider-C_nBsftD.d.ts.map +1 -0
- package/dist/features/chat/chat-card.d.ts +5 -3
- package/dist/features/chat/chat-card.d.ts.map +1 -0
- package/dist/features/chat/chat-card.js +2 -14
- package/dist/features/chat/chat-element.d.ts +2 -0
- package/dist/features/chat/chat-element.js +2 -0
- package/dist/features/chat/chat-header/chat-header.d.ts +8 -4
- package/dist/features/chat/chat-header/chat-header.d.ts.map +1 -0
- package/dist/features/chat/chat-header/chat-header.js +2 -14
- package/dist/features/chat/chat-header/chat-menu.d.ts +5 -3
- package/dist/features/chat/chat-header/chat-menu.d.ts.map +1 -0
- package/dist/features/chat/chat-header/chat-menu.js +29 -2
- package/dist/features/chat/chat-header/chat-menu.js.map +1 -0
- package/dist/features/chat/chat-history/chat-history-empty.d.ts +5 -3
- package/dist/features/chat/chat-history/chat-history-empty.d.ts.map +1 -0
- package/dist/features/chat/chat-history/chat-history-empty.js +24 -1
- package/dist/features/chat/chat-history/chat-history-empty.js.map +1 -0
- package/dist/features/chat/chat-history/chat-history.d.ts +5 -3
- package/dist/features/chat/chat-history/chat-history.d.ts.map +1 -0
- package/dist/features/chat/chat-history/chat-history.js +2 -14
- package/dist/features/chat/chat-main/chat-main.d.ts +10 -0
- package/dist/features/chat/chat-main/chat-main.d.ts.map +1 -0
- package/dist/features/chat/chat-main/chat-main.js +3 -0
- package/dist/features/chat/chat-main/use-chat.d.ts +23 -0
- package/dist/features/chat/chat-main/use-chat.d.ts.map +1 -0
- package/dist/features/chat/chat-main/use-chat.js +3 -0
- package/dist/features/chat/chat-main/use-initial-messages.d.ts +22 -0
- package/dist/features/chat/chat-main/use-initial-messages.d.ts.map +1 -0
- package/dist/features/chat/chat-main/use-initial-messages.js +2 -0
- package/dist/features/chat/chat-prompt-input.d.ts +20 -12
- package/dist/features/chat/chat-prompt-input.d.ts.map +1 -0
- package/dist/features/chat/chat-prompt-input.js +3 -14
- package/dist/features/chat/chat.context.d.ts +17 -15
- package/dist/features/chat/chat.context.d.ts.map +1 -0
- package/dist/features/chat/chat.context.js +9 -12
- package/dist/features/chat/chat.context.js.map +1 -0
- package/dist/features/chat/index.d.ts +2 -14
- package/dist/features/chat/index.js +2 -14
- package/dist/features/chat/queries/query-keys.d.ts +7 -5
- package/dist/features/chat/queries/query-keys.d.ts.map +1 -0
- package/dist/features/chat/queries/query-keys.js +19 -1
- package/dist/features/chat/queries/query-keys.js.map +1 -0
- package/dist/features/chat/queries/use-create-conversation-mutation.d.ts +27 -23
- package/dist/features/chat/queries/use-create-conversation-mutation.d.ts.map +1 -0
- package/dist/features/chat/queries/use-create-conversation-mutation.js +17 -36
- package/dist/features/chat/queries/use-create-conversation-mutation.js.map +1 -0
- package/dist/features/chat/queries/use-get-chat-query.d.ts +9 -5
- package/dist/features/chat/queries/use-get-chat-query.d.ts.map +1 -0
- package/dist/features/chat/queries/use-get-chat-query.js +2 -14
- package/dist/features/chat/queries/use-get-conversation-query.d.ts +56 -46
- package/dist/features/chat/queries/use-get-conversation-query.d.ts.map +1 -0
- package/dist/features/chat/queries/use-get-conversation-query.js +2 -14
- package/dist/features/chat/queries/use-list-conversations-query.d.ts +27 -23
- package/dist/features/chat/queries/use-list-conversations-query.d.ts.map +1 -0
- package/dist/features/chat/queries/use-list-conversations-query.js +2 -14
- package/dist/features/chat/store.d.ts +10 -8
- package/dist/features/chat/store.d.ts.map +1 -0
- package/dist/features/chat/store.js +15 -1
- package/dist/features/chat/store.js.map +1 -0
- package/dist/features/chat/utils.d.ts +4 -2
- package/dist/features/chat/utils.d.ts.map +1 -0
- package/dist/features/chat/utils.js +15 -1
- package/dist/features/chat/utils.js.map +1 -0
- package/dist/features/data-fetching/use-api-client.d.ts +5 -3
- package/dist/features/data-fetching/use-api-client.d.ts.map +1 -0
- package/dist/features/data-fetching/use-api-client.js +2 -14
- package/dist/features/element/chatsdk-provider.d.ts +2 -0
- package/dist/features/element/chatsdk-provider.js +23 -0
- package/dist/features/element/chatsdk-provider.js.map +1 -0
- package/dist/features/element/constants.d.ts +5 -0
- package/dist/features/element/constants.d.ts.map +1 -0
- package/dist/features/element/constants.js +6 -0
- package/dist/features/element/constants.js.map +1 -0
- package/dist/features/element/element-provider.d.ts +2 -0
- package/dist/features/element/element-provider.js +83 -0
- package/dist/features/element/element-provider.js.map +1 -0
- package/dist/features/element/store.d.ts +2 -0
- package/dist/features/element/store.js +112 -0
- package/dist/features/element/store.js.map +1 -0
- package/dist/features/element/types/api.d.ts +2 -0
- package/dist/features/element/types/api.js +1 -0
- package/dist/features/element/types/callbacks.d.ts +2 -0
- package/dist/features/element/types/callbacks.js +1 -0
- package/dist/features/element/types/config.d.ts +2 -0
- package/dist/features/element/types/config.js +1 -0
- package/dist/features/element/types/context.d.ts +2 -0
- package/dist/features/element/types/context.js +1 -0
- package/dist/features/element/types/locale.d.ts +2 -0
- package/dist/features/element/types/locale.js +1 -0
- package/dist/features/element/types/theme.d.ts +2 -0
- package/dist/features/element/types/theme.js +1 -0
- package/dist/features/element/types/translations.d.ts +2 -0
- package/dist/features/element/types/translations.js +1 -0
- package/dist/features/element/use-element-config.d.ts +40 -0
- package/dist/features/element/use-element-config.d.ts.map +1 -0
- package/dist/features/element/use-element-config.js +39 -0
- package/dist/features/element/use-element-config.js.map +1 -0
- package/dist/features/element/use-merge-global-config.d.ts +20 -0
- package/dist/features/element/use-merge-global-config.d.ts.map +1 -0
- package/dist/features/element/use-merge-global-config.js +34 -0
- package/dist/features/element/use-merge-global-config.js.map +1 -0
- package/dist/features/element/utils.d.ts +2 -0
- package/dist/features/element/utils.js +86 -0
- package/dist/features/element/utils.js.map +1 -0
- package/dist/features/logger/logger.d.ts +2 -9
- package/dist/features/logger/logger.js +15 -1
- package/dist/features/logger/logger.js.map +1 -0
- package/dist/i18n/config.d.ts +2 -61
- package/dist/i18n/config.js +2 -1
- package/dist/i18n/i18next.d.ts +1382 -10
- package/dist/i18n/i18next.d.ts.map +1 -0
- package/dist/i18n/i18next.js +27 -2
- package/dist/i18n/i18next.js.map +1 -0
- package/dist/i18n/utils.d.ts +4 -3
- package/dist/i18n/utils.d.ts.map +1 -0
- package/dist/i18n/utils.js +10 -3
- package/dist/i18n/utils.js.map +1 -0
- package/dist/index.d.ts +5 -20
- package/dist/index.js +68 -20
- package/dist/index.js.map +1 -0
- package/dist/locale-W5Kyyi4X.d.ts +11 -0
- package/dist/locale-W5Kyyi4X.d.ts.map +1 -0
- package/dist/logger-BvmhODdq.d.ts +11 -0
- package/dist/logger-BvmhODdq.d.ts.map +1 -0
- package/dist/store-CGX9oRlE.d.ts +46 -0
- package/dist/store-CGX9oRlE.d.ts.map +1 -0
- package/dist/styles.css +1954 -1963
- package/dist/theme-Cb-RBWbR.d.ts +38 -0
- package/dist/theme-Cb-RBWbR.d.ts.map +1 -0
- package/package.json +18 -50
- package/dist/chunk-2LHKM7RD.js +0 -14
- package/dist/chunk-5UMYP6MD.js +0 -10
- package/dist/chunk-AP4MG32M.js +0 -36
- package/dist/chunk-CFM57HOS.js +0 -358
- package/dist/chunk-EGIUE7H2.js +0 -37
- package/dist/chunk-M5OONVIO.js +0 -90
- package/dist/chunk-MXTBCHYC.js +0 -31
- package/dist/chunk-NIC3MOMY.js +0 -55
- package/dist/chunk-QTRMNIG3.js +0 -83
- package/dist/chunk-R7G3RQLU.js +0 -36
- package/dist/chunk-RJG5D2TM.js +0 -113
- package/dist/chunk-SLJNKQ2G.js +0 -125
- package/dist/chunk-TDEFIW2L.js +0 -9
- package/dist/chunk-TDP6D7U7.js +0 -551
- package/dist/chunk-V2ITXC65.js +0 -24
- package/dist/chunk-VS55HRUS.js +0 -16
- package/dist/chunk-VYDYCGJL.js +0 -25
- package/dist/chunk-X5YUF2YM.js +0 -113
- package/dist/chunk-YX46JVQN.js +0 -78
- package/dist/chunk-YXAMLTTT.js +0 -16
- package/dist/chunk-YXFVHSY4.js +0 -51
- package/dist/chunk-ZCSZX3OI.js +0 -4
- package/dist/common/use-copy-to-clipboard.d.ts +0 -3
- package/dist/common/use-copy-to-clipboard.js +0 -33
- package/dist/common/utilts.d.ts +0 -8
- package/dist/common/utilts.js +0 -28
- package/dist/components/ai-elements/actions.d.ts +0 -13
- package/dist/components/ai-elements/actions.js +0 -42
- package/dist/components/ai-elements/agent.d.ts +0 -31
- package/dist/components/ai-elements/agent.js +0 -77
- package/dist/components/ai-elements/artifact.d.ts +0 -27
- package/dist/components/ai-elements/artifact.js +0 -108
- package/dist/components/ai-elements/attachments.d.ts +0 -57
- package/dist/components/ai-elements/attachments.js +0 -258
- package/dist/components/ai-elements/audio-player.d.ts +0 -33
- package/dist/components/ai-elements/audio-player.js +0 -199
- package/dist/components/ai-elements/canvas.d.ts +0 -10
- package/dist/components/ai-elements/canvas.js +0 -24
- package/dist/components/ai-elements/chain-of-thought.d.ts +0 -34
- package/dist/components/ai-elements/chain-of-thought.js +0 -159
- package/dist/components/ai-elements/checkpoint.d.ts +0 -16
- package/dist/components/ai-elements/checkpoint.js +0 -47
- package/dist/components/ai-elements/code-block.d.ts +0 -48
- package/dist/components/ai-elements/code-block.js +0 -1
- package/dist/components/ai-elements/commit.d.ts +0 -68
- package/dist/components/ai-elements/commit.js +0 -314
- package/dist/components/ai-elements/confirmation.d.ts +0 -52
- package/dist/components/ai-elements/confirmation.js +0 -76
- package/dist/components/ai-elements/connection.d.ts +0 -5
- package/dist/components/ai-elements/connection.js +0 -34
- package/dist/components/ai-elements/context.d.ts +0 -36
- package/dist/components/ai-elements/context.js +0 -320
- package/dist/components/ai-elements/controls.d.ts +0 -8
- package/dist/components/ai-elements/controls.js +0 -17
- package/dist/components/ai-elements/conversation.d.ts +0 -27
- package/dist/components/ai-elements/conversation.js +0 -119
- package/dist/components/ai-elements/edge.d.ts +0 -9
- package/dist/components/ai-elements/edge.js +0 -111
- package/dist/components/ai-elements/environment-variables.d.ts +0 -42
- package/dist/components/ai-elements/environment-variables.js +0 -208
- package/dist/components/ai-elements/file-tree.d.ts +0 -30
- package/dist/components/ai-elements/file-tree.js +0 -212
- package/dist/components/ai-elements/image.d.ts +0 -10
- package/dist/components/ai-elements/image.js +0 -23
- package/dist/components/ai-elements/inline-citation.d.ts +0 -42
- package/dist/components/ai-elements/inline-citation.js +0 -203
- package/dist/components/ai-elements/jsx-preview.d.ts +0 -33
- package/dist/components/ai-elements/jsx-preview.js +0 -206
- package/dist/components/ai-elements/loader.d.ts +0 -9
- package/dist/components/ai-elements/loader.js +0 -115
- package/dist/components/ai-elements/message.d.ts +0 -42
- package/dist/components/ai-elements/message.js +0 -259
- package/dist/components/ai-elements/mic-selector.d.ts +0 -49
- package/dist/components/ai-elements/mic-selector.js +0 -252
- package/dist/components/ai-elements/model-selector.d.ts +0 -39
- package/dist/components/ai-elements/model-selector.js +0 -73
- package/dist/components/ai-elements/node.d.ts +0 -25
- package/dist/components/ai-elements/node.js +0 -41
- package/dist/components/ai-elements/open-in-chat.d.ts +0 -32
- package/dist/components/ai-elements/open-in-chat.js +0 -366
- package/dist/components/ai-elements/package-info.d.ts +0 -32
- package/dist/components/ai-elements/package-info.js +0 -162
- package/dist/components/ai-elements/panel.d.ts +0 -8
- package/dist/components/ai-elements/panel.js +0 -17
- package/dist/components/ai-elements/persona.d.ts +0 -50
- package/dist/components/ai-elements/persona.js +0 -209
- package/dist/components/ai-elements/plan.d.ts +0 -29
- package/dist/components/ai-elements/plan.js +0 -95
- package/dist/components/ai-elements/prompt-input.d.ts +0 -153
- package/dist/components/ai-elements/prompt-input.js +0 -939
- package/dist/components/ai-elements/queue.d.ts +0 -65
- package/dist/components/ai-elements/queue.js +0 -179
- package/dist/components/ai-elements/reasoning.d.ts +0 -30
- package/dist/components/ai-elements/reasoning.js +0 -161
- package/dist/components/ai-elements/response.d.ts +0 -9
- package/dist/components/ai-elements/response.js +0 -33
- package/dist/components/ai-elements/sandbox.d.ts +0 -28
- package/dist/components/ai-elements/sandbox.js +0 -98
- package/dist/components/ai-elements/schema-display.d.ts +0 -58
- package/dist/components/ai-elements/schema-display.js +0 -313
- package/dist/components/ai-elements/shimmer.d.ts +0 -14
- package/dist/components/ai-elements/shimmer.js +0 -1
- package/dist/components/ai-elements/snippet.d.ts +0 -22
- package/dist/components/ai-elements/snippet.js +0 -90
- package/dist/components/ai-elements/sources.d.ts +0 -16
- package/dist/components/ai-elements/sources.js +0 -62
- package/dist/components/ai-elements/speech-input.d.ts +0 -57
- package/dist/components/ai-elements/speech-input.js +0 -206
- package/dist/components/ai-elements/stack-trace.d.ts +0 -42
- package/dist/components/ai-elements/stack-trace.js +0 -377
- package/dist/components/ai-elements/suggestion.d.ts +0 -14
- package/dist/components/ai-elements/suggestion.js +0 -41
- package/dist/components/ai-elements/task.d.ts +0 -18
- package/dist/components/ai-elements/task.js +0 -60
- package/dist/components/ai-elements/terminal.d.ts +0 -31
- package/dist/components/ai-elements/terminal.js +0 -203
- package/dist/components/ai-elements/test-results.d.ts +0 -61
- package/dist/components/ai-elements/test-results.js +0 -349
- package/dist/components/ai-elements/tool.d.ts +0 -35
- package/dist/components/ai-elements/tool.js +0 -2
- package/dist/components/ai-elements/toolbar.d.ts +0 -8
- package/dist/components/ai-elements/toolbar.js +0 -18
- package/dist/components/ai-elements/transcription.d.ts +0 -19
- package/dist/components/ai-elements/transcription.js +0 -90
- package/dist/components/ai-elements/voice-selector.d.ts +0 -66
- package/dist/components/ai-elements/voice-selector.js +0 -332
- package/dist/components/ai-elements/web-preview.d.ts +0 -38
- package/dist/components/ai-elements/web-preview.js +0 -214
- package/dist/components/responsive-alert-dialog.d.ts +0 -19
- package/dist/components/responsive-alert-dialog.js +0 -1
- package/dist/components/responsive-dialog.d.ts +0 -14
- package/dist/components/responsive-dialog.js +0 -1
- package/dist/config-IcWUmjwj.d.ts +0 -239
- package/dist/features/chat/chat-element/chat-element.d.ts +0 -8
- package/dist/features/chat/chat-element/chat-element.js +0 -14
- package/dist/features/chat/chat-element/use-chat.d.ts +0 -21
- package/dist/features/chat/chat-element/use-chat.js +0 -14
- package/dist/features/chat/chat-element/use-initial-messages.d.ts +0 -20
- package/dist/features/chat/chat-element/use-initial-messages.js +0 -14
- package/dist/features/chat/chat-message.d.ts +0 -10
- package/dist/features/chat/chat-message.js +0 -1
- package/dist/features/chat/chat-molecule.d.ts +0 -35
- package/dist/features/chat/chat-molecule.js +0 -14
- package/dist/features/molecule/chatsdk-provider.d.ts +0 -19
- package/dist/features/molecule/chatsdk-provider.js +0 -26
- package/dist/features/molecule/constants.d.ts +0 -3
- package/dist/features/molecule/constants.js +0 -1
- package/dist/features/molecule/molecule-provider.d.ts +0 -39
- package/dist/features/molecule/molecule-provider.js +0 -1
- package/dist/features/molecule/store.d.ts +0 -53
- package/dist/features/molecule/store.js +0 -3
- package/dist/features/molecule/types/api.d.ts +0 -8
- package/dist/features/molecule/types/api.js +0 -1
- package/dist/features/molecule/types/callbacks.d.ts +0 -22
- package/dist/features/molecule/types/callbacks.js +0 -1
- package/dist/features/molecule/types/config.d.ts +0 -10
- package/dist/features/molecule/types/config.js +0 -1
- package/dist/features/molecule/types/context.d.ts +0 -11
- package/dist/features/molecule/types/context.js +0 -1
- package/dist/features/molecule/types/locale.d.ts +0 -9
- package/dist/features/molecule/types/locale.js +0 -1
- package/dist/features/molecule/types/theme.d.ts +0 -38
- package/dist/features/molecule/types/theme.js +0 -1
- package/dist/features/molecule/types/translations.d.ts +0 -10
- package/dist/features/molecule/types/translations.js +0 -1
- package/dist/features/molecule/use-merge-global-config.d.ts +0 -22
- package/dist/features/molecule/use-merge-global-config.js +0 -5
- package/dist/features/molecule/use-molecule-config.d.ts +0 -41
- package/dist/features/molecule/use-molecule-config.js +0 -6
- package/dist/features/molecule/utils.d.ts +0 -10
- package/dist/features/molecule/utils.js +0 -1
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { Button } from '@chatsdk-dev/ui/components/button';
|
|
3
|
-
import { Collapsible, CollapsibleContent } from '@chatsdk-dev/ui/components/collapsible';
|
|
4
|
-
import { ScrollArea } from '@chatsdk-dev/ui/components/scroll-area';
|
|
5
|
-
import { ComponentProps } from 'react';
|
|
6
|
-
|
|
7
|
-
interface QueueMessagePart {
|
|
8
|
-
type: string;
|
|
9
|
-
text?: string;
|
|
10
|
-
url?: string;
|
|
11
|
-
filename?: string;
|
|
12
|
-
mediaType?: string;
|
|
13
|
-
}
|
|
14
|
-
interface QueueMessage {
|
|
15
|
-
id: string;
|
|
16
|
-
parts: QueueMessagePart[];
|
|
17
|
-
}
|
|
18
|
-
interface QueueTodo {
|
|
19
|
-
id: string;
|
|
20
|
-
title: string;
|
|
21
|
-
description?: string;
|
|
22
|
-
status?: "pending" | "completed";
|
|
23
|
-
}
|
|
24
|
-
type QueueItemProps = ComponentProps<"li">;
|
|
25
|
-
declare const QueueItem: ({ className, ...props }: QueueItemProps) => react_jsx_runtime.JSX.Element;
|
|
26
|
-
type QueueItemIndicatorProps = ComponentProps<"span"> & {
|
|
27
|
-
completed?: boolean;
|
|
28
|
-
};
|
|
29
|
-
declare const QueueItemIndicator: ({ completed, className, ...props }: QueueItemIndicatorProps) => react_jsx_runtime.JSX.Element;
|
|
30
|
-
type QueueItemContentProps = ComponentProps<"span"> & {
|
|
31
|
-
completed?: boolean;
|
|
32
|
-
};
|
|
33
|
-
declare const QueueItemContent: ({ completed, className, ...props }: QueueItemContentProps) => react_jsx_runtime.JSX.Element;
|
|
34
|
-
type QueueItemDescriptionProps = ComponentProps<"div"> & {
|
|
35
|
-
completed?: boolean;
|
|
36
|
-
};
|
|
37
|
-
declare const QueueItemDescription: ({ completed, className, ...props }: QueueItemDescriptionProps) => react_jsx_runtime.JSX.Element;
|
|
38
|
-
type QueueItemActionsProps = ComponentProps<"div">;
|
|
39
|
-
declare const QueueItemActions: ({ className, ...props }: QueueItemActionsProps) => react_jsx_runtime.JSX.Element;
|
|
40
|
-
type QueueItemActionProps = Omit<ComponentProps<typeof Button>, "variant" | "size">;
|
|
41
|
-
declare const QueueItemAction: ({ className, ...props }: QueueItemActionProps) => react_jsx_runtime.JSX.Element;
|
|
42
|
-
type QueueItemAttachmentProps = ComponentProps<"div">;
|
|
43
|
-
declare const QueueItemAttachment: ({ className, ...props }: QueueItemAttachmentProps) => react_jsx_runtime.JSX.Element;
|
|
44
|
-
type QueueItemImageProps = ComponentProps<"img">;
|
|
45
|
-
declare const QueueItemImage: ({ className, ...props }: QueueItemImageProps) => react_jsx_runtime.JSX.Element;
|
|
46
|
-
type QueueItemFileProps = ComponentProps<"span">;
|
|
47
|
-
declare const QueueItemFile: ({ children, className, ...props }: QueueItemFileProps) => react_jsx_runtime.JSX.Element;
|
|
48
|
-
type QueueListProps = ComponentProps<typeof ScrollArea>;
|
|
49
|
-
declare const QueueList: ({ children, className, ...props }: QueueListProps) => react_jsx_runtime.JSX.Element;
|
|
50
|
-
type QueueSectionProps = ComponentProps<typeof Collapsible>;
|
|
51
|
-
declare const QueueSection: ({ className, defaultOpen, ...props }: QueueSectionProps) => react_jsx_runtime.JSX.Element;
|
|
52
|
-
type QueueSectionTriggerProps = ComponentProps<"button">;
|
|
53
|
-
declare const QueueSectionTrigger: ({ children, className, ...props }: QueueSectionTriggerProps) => react_jsx_runtime.JSX.Element;
|
|
54
|
-
type QueueSectionLabelProps = ComponentProps<"span"> & {
|
|
55
|
-
count?: number;
|
|
56
|
-
label: string;
|
|
57
|
-
icon?: React.ReactNode;
|
|
58
|
-
};
|
|
59
|
-
declare const QueueSectionLabel: ({ count, label, icon, className, ...props }: QueueSectionLabelProps) => react_jsx_runtime.JSX.Element;
|
|
60
|
-
type QueueSectionContentProps = ComponentProps<typeof CollapsibleContent>;
|
|
61
|
-
declare const QueueSectionContent: ({ className, ...props }: QueueSectionContentProps) => react_jsx_runtime.JSX.Element;
|
|
62
|
-
type QueueProps = ComponentProps<"div">;
|
|
63
|
-
declare const Queue: ({ className, ...props }: QueueProps) => react_jsx_runtime.JSX.Element;
|
|
64
|
-
|
|
65
|
-
export { Queue, QueueItem, QueueItemAction, type QueueItemActionProps, QueueItemActions, type QueueItemActionsProps, QueueItemAttachment, type QueueItemAttachmentProps, QueueItemContent, type QueueItemContentProps, QueueItemDescription, type QueueItemDescriptionProps, QueueItemFile, type QueueItemFileProps, QueueItemImage, type QueueItemImageProps, QueueItemIndicator, type QueueItemIndicatorProps, type QueueItemProps, QueueList, type QueueListProps, type QueueMessage, type QueueMessagePart, type QueueProps, QueueSection, QueueSectionContent, type QueueSectionContentProps, QueueSectionLabel, type QueueSectionLabelProps, type QueueSectionProps, QueueSectionTrigger, type QueueSectionTriggerProps, type QueueTodo };
|
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
import { Button } from '@chatsdk-dev/ui/components/button';
|
|
2
|
-
import { Collapsible, CollapsibleTrigger, CollapsibleContent } from '@chatsdk-dev/ui/components/collapsible';
|
|
3
|
-
import { ScrollArea } from '@chatsdk-dev/ui/components/scroll-area';
|
|
4
|
-
import { cn } from '@chatsdk-dev/ui/lib/utils';
|
|
5
|
-
import { PaperclipIcon, ChevronDownIcon } from 'lucide-react';
|
|
6
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
|
-
|
|
8
|
-
var QueueItem = ({ className, ...props }) => /* @__PURE__ */ jsx(
|
|
9
|
-
"li",
|
|
10
|
-
{
|
|
11
|
-
className: cn(
|
|
12
|
-
"group flex flex-col gap-1 rounded-md px-3 py-1 text-sm transition-colors hover:bg-muted",
|
|
13
|
-
className
|
|
14
|
-
),
|
|
15
|
-
...props
|
|
16
|
-
}
|
|
17
|
-
);
|
|
18
|
-
var QueueItemIndicator = ({
|
|
19
|
-
completed = false,
|
|
20
|
-
className,
|
|
21
|
-
...props
|
|
22
|
-
}) => /* @__PURE__ */ jsx(
|
|
23
|
-
"span",
|
|
24
|
-
{
|
|
25
|
-
className: cn(
|
|
26
|
-
"mt-0.5 inline-block size-2.5 rounded-full border",
|
|
27
|
-
completed ? "border-muted-foreground/20 bg-muted-foreground/10" : "border-muted-foreground/50",
|
|
28
|
-
className
|
|
29
|
-
),
|
|
30
|
-
...props
|
|
31
|
-
}
|
|
32
|
-
);
|
|
33
|
-
var QueueItemContent = ({
|
|
34
|
-
completed = false,
|
|
35
|
-
className,
|
|
36
|
-
...props
|
|
37
|
-
}) => /* @__PURE__ */ jsx(
|
|
38
|
-
"span",
|
|
39
|
-
{
|
|
40
|
-
className: cn(
|
|
41
|
-
"line-clamp-1 grow break-words",
|
|
42
|
-
completed ? "text-muted-foreground/50 line-through" : "text-muted-foreground",
|
|
43
|
-
className
|
|
44
|
-
),
|
|
45
|
-
...props
|
|
46
|
-
}
|
|
47
|
-
);
|
|
48
|
-
var QueueItemDescription = ({
|
|
49
|
-
completed = false,
|
|
50
|
-
className,
|
|
51
|
-
...props
|
|
52
|
-
}) => /* @__PURE__ */ jsx(
|
|
53
|
-
"div",
|
|
54
|
-
{
|
|
55
|
-
className: cn(
|
|
56
|
-
"ml-6 text-xs",
|
|
57
|
-
completed ? "text-muted-foreground/40 line-through" : "text-muted-foreground",
|
|
58
|
-
className
|
|
59
|
-
),
|
|
60
|
-
...props
|
|
61
|
-
}
|
|
62
|
-
);
|
|
63
|
-
var QueueItemActions = ({
|
|
64
|
-
className,
|
|
65
|
-
...props
|
|
66
|
-
}) => /* @__PURE__ */ jsx("div", { className: cn("flex gap-1", className), ...props });
|
|
67
|
-
var QueueItemAction = ({
|
|
68
|
-
className,
|
|
69
|
-
...props
|
|
70
|
-
}) => /* @__PURE__ */ jsx(
|
|
71
|
-
Button,
|
|
72
|
-
{
|
|
73
|
-
className: cn(
|
|
74
|
-
"size-auto rounded p-1 text-muted-foreground opacity-0 transition-opacity hover:bg-muted-foreground/10 hover:text-foreground group-hover:opacity-100",
|
|
75
|
-
className
|
|
76
|
-
),
|
|
77
|
-
size: "icon",
|
|
78
|
-
type: "button",
|
|
79
|
-
variant: "ghost",
|
|
80
|
-
...props
|
|
81
|
-
}
|
|
82
|
-
);
|
|
83
|
-
var QueueItemAttachment = ({
|
|
84
|
-
className,
|
|
85
|
-
...props
|
|
86
|
-
}) => /* @__PURE__ */ jsx("div", { className: cn("mt-1 flex flex-wrap gap-2", className), ...props });
|
|
87
|
-
var QueueItemImage = ({
|
|
88
|
-
className,
|
|
89
|
-
...props
|
|
90
|
-
}) => /* @__PURE__ */ jsx(
|
|
91
|
-
"img",
|
|
92
|
-
{
|
|
93
|
-
alt: "",
|
|
94
|
-
className: cn("h-8 w-8 rounded border object-cover", className),
|
|
95
|
-
height: 32,
|
|
96
|
-
width: 32,
|
|
97
|
-
...props
|
|
98
|
-
}
|
|
99
|
-
);
|
|
100
|
-
var QueueItemFile = ({
|
|
101
|
-
children,
|
|
102
|
-
className,
|
|
103
|
-
...props
|
|
104
|
-
}) => /* @__PURE__ */ jsxs(
|
|
105
|
-
"span",
|
|
106
|
-
{
|
|
107
|
-
className: cn(
|
|
108
|
-
"flex items-center gap-1 rounded border bg-muted px-2 py-1 text-xs",
|
|
109
|
-
className
|
|
110
|
-
),
|
|
111
|
-
...props,
|
|
112
|
-
children: [
|
|
113
|
-
/* @__PURE__ */ jsx(PaperclipIcon, { size: 12 }),
|
|
114
|
-
/* @__PURE__ */ jsx("span", { className: "max-w-[100px] truncate", children })
|
|
115
|
-
]
|
|
116
|
-
}
|
|
117
|
-
);
|
|
118
|
-
var QueueList = ({
|
|
119
|
-
children,
|
|
120
|
-
className,
|
|
121
|
-
...props
|
|
122
|
-
}) => /* @__PURE__ */ jsx(ScrollArea, { className: cn("mt-2 -mb-1", className), ...props, children: /* @__PURE__ */ jsx("div", { className: "max-h-40 pr-4", children: /* @__PURE__ */ jsx("ul", { children }) }) });
|
|
123
|
-
var QueueSection = ({
|
|
124
|
-
className,
|
|
125
|
-
defaultOpen = true,
|
|
126
|
-
...props
|
|
127
|
-
}) => /* @__PURE__ */ jsx(Collapsible, { className: cn(className), defaultOpen, ...props });
|
|
128
|
-
var QueueSectionTrigger = ({
|
|
129
|
-
children,
|
|
130
|
-
className,
|
|
131
|
-
...props
|
|
132
|
-
}) => /* @__PURE__ */ jsx(
|
|
133
|
-
CollapsibleTrigger,
|
|
134
|
-
{
|
|
135
|
-
render: () => /* @__PURE__ */ jsx(
|
|
136
|
-
"button",
|
|
137
|
-
{
|
|
138
|
-
className: cn(
|
|
139
|
-
"group flex w-full items-center justify-between rounded-md bg-muted/40 px-3 py-2 text-left font-medium text-muted-foreground text-sm transition-colors hover:bg-muted",
|
|
140
|
-
className
|
|
141
|
-
),
|
|
142
|
-
type: "button",
|
|
143
|
-
...props,
|
|
144
|
-
children
|
|
145
|
-
}
|
|
146
|
-
)
|
|
147
|
-
}
|
|
148
|
-
);
|
|
149
|
-
var QueueSectionLabel = ({
|
|
150
|
-
count,
|
|
151
|
-
label,
|
|
152
|
-
icon,
|
|
153
|
-
className,
|
|
154
|
-
...props
|
|
155
|
-
}) => /* @__PURE__ */ jsxs("span", { className: cn("flex items-center gap-2", className), ...props, children: [
|
|
156
|
-
/* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-4 transition-transform group-data-[state=closed]:-rotate-90" }),
|
|
157
|
-
icon,
|
|
158
|
-
/* @__PURE__ */ jsxs("span", { children: [
|
|
159
|
-
count,
|
|
160
|
-
" ",
|
|
161
|
-
label
|
|
162
|
-
] })
|
|
163
|
-
] });
|
|
164
|
-
var QueueSectionContent = ({
|
|
165
|
-
className,
|
|
166
|
-
...props
|
|
167
|
-
}) => /* @__PURE__ */ jsx(CollapsibleContent, { className: cn(className), ...props });
|
|
168
|
-
var Queue = ({ className, ...props }) => /* @__PURE__ */ jsx(
|
|
169
|
-
"div",
|
|
170
|
-
{
|
|
171
|
-
className: cn(
|
|
172
|
-
"flex flex-col gap-2 rounded-xl border border-border bg-background px-3 pt-2 pb-2 shadow-xs",
|
|
173
|
-
className
|
|
174
|
-
),
|
|
175
|
-
...props
|
|
176
|
-
}
|
|
177
|
-
);
|
|
178
|
-
|
|
179
|
-
export { Queue, QueueItem, QueueItemAction, QueueItemActions, QueueItemAttachment, QueueItemContent, QueueItemDescription, QueueItemFile, QueueItemImage, QueueItemIndicator, QueueList, QueueSection, QueueSectionContent, QueueSectionLabel, QueueSectionTrigger };
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { ComponentProps, ReactNode } from 'react';
|
|
3
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
-
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '@chatsdk-dev/ui/components/collapsible';
|
|
5
|
-
|
|
6
|
-
interface ReasoningContextValue {
|
|
7
|
-
isStreaming: boolean;
|
|
8
|
-
isOpen: boolean;
|
|
9
|
-
setIsOpen: (open: boolean) => void;
|
|
10
|
-
duration: number | undefined;
|
|
11
|
-
}
|
|
12
|
-
declare const useReasoning: () => ReasoningContextValue;
|
|
13
|
-
type ReasoningProps = ComponentProps<typeof Collapsible> & {
|
|
14
|
-
isStreaming?: boolean;
|
|
15
|
-
open?: boolean;
|
|
16
|
-
defaultOpen?: boolean;
|
|
17
|
-
onOpenChange?: (open: boolean) => void;
|
|
18
|
-
duration?: number;
|
|
19
|
-
};
|
|
20
|
-
declare const Reasoning: react.MemoExoticComponent<({ className, isStreaming, open, defaultOpen, onOpenChange, duration: durationProp, children, ...props }: ReasoningProps) => react_jsx_runtime.JSX.Element>;
|
|
21
|
-
type ReasoningTriggerProps = ComponentProps<typeof CollapsibleTrigger> & {
|
|
22
|
-
getThinkingMessage?: (isStreaming: boolean, duration?: number) => ReactNode;
|
|
23
|
-
};
|
|
24
|
-
declare const ReasoningTrigger: react.MemoExoticComponent<({ className, children, getThinkingMessage, ...props }: ReasoningTriggerProps) => react_jsx_runtime.JSX.Element>;
|
|
25
|
-
type ReasoningContentProps = ComponentProps<typeof CollapsibleContent> & {
|
|
26
|
-
children: string;
|
|
27
|
-
};
|
|
28
|
-
declare const ReasoningContent: react.MemoExoticComponent<({ className, children, ...props }: ReasoningContentProps) => react_jsx_runtime.JSX.Element>;
|
|
29
|
-
|
|
30
|
-
export { Reasoning, ReasoningContent, type ReasoningContentProps, type ReasoningProps, ReasoningTrigger, type ReasoningTriggerProps, useReasoning };
|
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
import { Shimmer } from '../../chunk-NIC3MOMY.js';
|
|
2
|
-
import { useControllableState } from '@radix-ui/react-use-controllable-state';
|
|
3
|
-
import { Collapsible, CollapsibleTrigger, CollapsibleContent } from '@chatsdk-dev/ui/components/collapsible';
|
|
4
|
-
import { cn } from '@chatsdk-dev/ui/lib/utils';
|
|
5
|
-
import { cjk } from '@streamdown/cjk';
|
|
6
|
-
import { code } from '@streamdown/code';
|
|
7
|
-
import { math } from '@streamdown/math';
|
|
8
|
-
import { mermaid } from '@streamdown/mermaid';
|
|
9
|
-
import { BrainIcon, ChevronDownIcon } from 'lucide-react';
|
|
10
|
-
import { createContext, memo, useRef, useState, useEffect, useCallback, useMemo, useContext } from 'react';
|
|
11
|
-
import { Streamdown } from 'streamdown';
|
|
12
|
-
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
13
|
-
|
|
14
|
-
var ReasoningContext = createContext(null);
|
|
15
|
-
var useReasoning = () => {
|
|
16
|
-
const context = useContext(ReasoningContext);
|
|
17
|
-
if (!context) {
|
|
18
|
-
throw new Error("Reasoning components must be used within Reasoning");
|
|
19
|
-
}
|
|
20
|
-
return context;
|
|
21
|
-
};
|
|
22
|
-
var AUTO_CLOSE_DELAY = 1e3;
|
|
23
|
-
var MS_IN_S = 1e3;
|
|
24
|
-
var Reasoning = memo(
|
|
25
|
-
({
|
|
26
|
-
className,
|
|
27
|
-
isStreaming = false,
|
|
28
|
-
open,
|
|
29
|
-
defaultOpen,
|
|
30
|
-
onOpenChange,
|
|
31
|
-
duration: durationProp,
|
|
32
|
-
children,
|
|
33
|
-
...props
|
|
34
|
-
}) => {
|
|
35
|
-
const resolvedDefaultOpen = defaultOpen ?? isStreaming;
|
|
36
|
-
const isExplicitlyClosed = defaultOpen === false;
|
|
37
|
-
const [isOpen, setIsOpen] = useControllableState({
|
|
38
|
-
defaultProp: resolvedDefaultOpen,
|
|
39
|
-
onChange: onOpenChange,
|
|
40
|
-
prop: open
|
|
41
|
-
});
|
|
42
|
-
const [duration, setDuration] = useControllableState({
|
|
43
|
-
defaultProp: void 0,
|
|
44
|
-
prop: durationProp
|
|
45
|
-
});
|
|
46
|
-
const hasEverStreamedRef = useRef(isStreaming);
|
|
47
|
-
const [hasAutoClosed, setHasAutoClosed] = useState(false);
|
|
48
|
-
const startTimeRef = useRef(null);
|
|
49
|
-
useEffect(() => {
|
|
50
|
-
if (isStreaming) {
|
|
51
|
-
hasEverStreamedRef.current = true;
|
|
52
|
-
if (startTimeRef.current === null) {
|
|
53
|
-
startTimeRef.current = Date.now();
|
|
54
|
-
}
|
|
55
|
-
} else if (startTimeRef.current !== null) {
|
|
56
|
-
setDuration(Math.ceil((Date.now() - startTimeRef.current) / MS_IN_S));
|
|
57
|
-
startTimeRef.current = null;
|
|
58
|
-
}
|
|
59
|
-
}, [isStreaming, setDuration]);
|
|
60
|
-
useEffect(() => {
|
|
61
|
-
if (isStreaming && !isOpen && !isExplicitlyClosed) {
|
|
62
|
-
setIsOpen(true);
|
|
63
|
-
}
|
|
64
|
-
}, [isStreaming, isOpen, setIsOpen, isExplicitlyClosed]);
|
|
65
|
-
useEffect(() => {
|
|
66
|
-
if (hasEverStreamedRef.current && !isStreaming && isOpen && !hasAutoClosed) {
|
|
67
|
-
const timer = setTimeout(() => {
|
|
68
|
-
setIsOpen(false);
|
|
69
|
-
setHasAutoClosed(true);
|
|
70
|
-
}, AUTO_CLOSE_DELAY);
|
|
71
|
-
return () => clearTimeout(timer);
|
|
72
|
-
}
|
|
73
|
-
}, [isStreaming, isOpen, setIsOpen, hasAutoClosed]);
|
|
74
|
-
const handleOpenChange = useCallback(
|
|
75
|
-
(newOpen) => {
|
|
76
|
-
setIsOpen(newOpen);
|
|
77
|
-
},
|
|
78
|
-
[setIsOpen]
|
|
79
|
-
);
|
|
80
|
-
const contextValue = useMemo(
|
|
81
|
-
() => ({ duration, isOpen, isStreaming, setIsOpen }),
|
|
82
|
-
[duration, isOpen, isStreaming, setIsOpen]
|
|
83
|
-
);
|
|
84
|
-
return /* @__PURE__ */ jsx(ReasoningContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(
|
|
85
|
-
Collapsible,
|
|
86
|
-
{
|
|
87
|
-
className: cn("not-prose mb-4", className),
|
|
88
|
-
onOpenChange: handleOpenChange,
|
|
89
|
-
open: isOpen,
|
|
90
|
-
...props,
|
|
91
|
-
children
|
|
92
|
-
}
|
|
93
|
-
) });
|
|
94
|
-
}
|
|
95
|
-
);
|
|
96
|
-
var defaultGetThinkingMessage = (isStreaming, duration) => {
|
|
97
|
-
if (isStreaming || duration === 0) {
|
|
98
|
-
return /* @__PURE__ */ jsx(Shimmer, { duration: 1, children: "Thinking..." });
|
|
99
|
-
}
|
|
100
|
-
if (duration === void 0) {
|
|
101
|
-
return /* @__PURE__ */ jsx("p", { children: "Thought for a few seconds" });
|
|
102
|
-
}
|
|
103
|
-
return /* @__PURE__ */ jsxs("p", { children: [
|
|
104
|
-
"Thought for ",
|
|
105
|
-
duration,
|
|
106
|
-
" seconds"
|
|
107
|
-
] });
|
|
108
|
-
};
|
|
109
|
-
var ReasoningTrigger = memo(
|
|
110
|
-
({
|
|
111
|
-
className,
|
|
112
|
-
children,
|
|
113
|
-
getThinkingMessage = defaultGetThinkingMessage,
|
|
114
|
-
...props
|
|
115
|
-
}) => {
|
|
116
|
-
const { isStreaming, isOpen, duration } = useReasoning();
|
|
117
|
-
return /* @__PURE__ */ jsx(
|
|
118
|
-
CollapsibleTrigger,
|
|
119
|
-
{
|
|
120
|
-
className: cn(
|
|
121
|
-
"flex w-full items-center gap-2 text-muted-foreground text-sm transition-colors hover:text-foreground",
|
|
122
|
-
className
|
|
123
|
-
),
|
|
124
|
-
...props,
|
|
125
|
-
children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
126
|
-
/* @__PURE__ */ jsx(BrainIcon, { className: "size-4" }),
|
|
127
|
-
getThinkingMessage(isStreaming, duration),
|
|
128
|
-
/* @__PURE__ */ jsx(
|
|
129
|
-
ChevronDownIcon,
|
|
130
|
-
{
|
|
131
|
-
className: cn(
|
|
132
|
-
"size-4 transition-transform",
|
|
133
|
-
isOpen ? "rotate-180" : "rotate-0"
|
|
134
|
-
)
|
|
135
|
-
}
|
|
136
|
-
)
|
|
137
|
-
] })
|
|
138
|
-
}
|
|
139
|
-
);
|
|
140
|
-
}
|
|
141
|
-
);
|
|
142
|
-
var streamdownPlugins = { cjk, code, math, mermaid };
|
|
143
|
-
var ReasoningContent = memo(
|
|
144
|
-
({ className, children, ...props }) => /* @__PURE__ */ jsx(
|
|
145
|
-
CollapsibleContent,
|
|
146
|
-
{
|
|
147
|
-
className: cn(
|
|
148
|
-
"mt-4 text-sm",
|
|
149
|
-
"data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-muted-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",
|
|
150
|
-
className
|
|
151
|
-
),
|
|
152
|
-
...props,
|
|
153
|
-
children: /* @__PURE__ */ jsx(Streamdown, { plugins: streamdownPlugins, children })
|
|
154
|
-
}
|
|
155
|
-
)
|
|
156
|
-
);
|
|
157
|
-
Reasoning.displayName = "Reasoning";
|
|
158
|
-
ReasoningTrigger.displayName = "ReasoningTrigger";
|
|
159
|
-
ReasoningContent.displayName = "ReasoningContent";
|
|
160
|
-
|
|
161
|
-
export { Reasoning, ReasoningContent, ReasoningTrigger, useReasoning };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { ComponentProps } from 'react';
|
|
3
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
-
import { Streamdown } from 'streamdown';
|
|
5
|
-
|
|
6
|
-
type ResponseProps = ComponentProps<typeof Streamdown>;
|
|
7
|
-
declare const Response: react.MemoExoticComponent<({ className, ...props }: ResponseProps) => react_jsx_runtime.JSX.Element>;
|
|
8
|
-
|
|
9
|
-
export { Response };
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { memo } from 'react';
|
|
2
|
-
import { Streamdown } from 'streamdown';
|
|
3
|
-
import { cn } from '@chatsdk-dev/ui/lib/utils';
|
|
4
|
-
import { jsx } from 'react/jsx-runtime';
|
|
5
|
-
|
|
6
|
-
var Response = memo(
|
|
7
|
-
({ className, ...props }) => /* @__PURE__ */ jsx(
|
|
8
|
-
Streamdown,
|
|
9
|
-
{
|
|
10
|
-
className: cn(
|
|
11
|
-
"size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",
|
|
12
|
-
// "[&>*:first-child]:mt-0 [&>*:last-child]:mb-0",
|
|
13
|
-
// "[&_p]:my-2 [&_p]:leading-relaxed",
|
|
14
|
-
// "[&_h1]:mt-4 [&_h1]:mb-2 [&_h1]:text-sm [&_h1]:font-bold [&_h1:first-child]:mt-0",
|
|
15
|
-
// "[&_h2]:mt-3 [&_h2]:mb-2 [&_h2]:text-xs! [&_h2]:font-bold [&_h2:first-child]:mt-0",
|
|
16
|
-
// "[&_h3]:mt-2 [&_h3]:mb-1 [&_h3]:text-xs! [&_h3]:font-semibold [&_h3:first-child]:mt-0",
|
|
17
|
-
// "[&_h4]:mt-2 [&_h4]:mb-1 [&_h4]:text-xs! [&_h4]:font-medium [&_h4:first-child]:mt-0",
|
|
18
|
-
"[&_ul]:list-disc [&_ul]:pl-4",
|
|
19
|
-
"[&_ol]:list-decimal [&_ol]:pl-4",
|
|
20
|
-
"[&_li]:pl-1 [&_li]:leading-relaxed [&_li_p]:inline",
|
|
21
|
-
// "[&_table]:my-2 [&_table]:w-full [&_table]:border-collapse [&_table]:text-[12px]",
|
|
22
|
-
// "[&_th]:border-border [&_th]:border-b [&_th]:p-1.5 [&_th]:text-left [&_th]:text-[12px] [&_th]:font-semibold",
|
|
23
|
-
// "[&_td]:border-border [&_td]:border-b [&_td]:p-1.5 [&_td]:text-[12px]",
|
|
24
|
-
className
|
|
25
|
-
),
|
|
26
|
-
...props
|
|
27
|
-
}
|
|
28
|
-
),
|
|
29
|
-
(prevProps, nextProps) => prevProps.children === nextProps.children
|
|
30
|
-
);
|
|
31
|
-
Response.displayName = "Response";
|
|
32
|
-
|
|
33
|
-
export { Response };
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { Collapsible, CollapsibleContent } from '@chatsdk-dev/ui/components/collapsible';
|
|
3
|
-
import { TabsContent, Tabs, TabsList, TabsTrigger } from '@chatsdk-dev/ui/components/tabs';
|
|
4
|
-
import { ToolUIPart } from 'ai';
|
|
5
|
-
import { ComponentProps } from 'react';
|
|
6
|
-
|
|
7
|
-
type SandboxRootProps = ComponentProps<typeof Collapsible>;
|
|
8
|
-
declare const Sandbox: ({ className, ...props }: SandboxRootProps) => react_jsx_runtime.JSX.Element;
|
|
9
|
-
interface SandboxHeaderProps {
|
|
10
|
-
title?: string;
|
|
11
|
-
state: ToolUIPart["state"];
|
|
12
|
-
className?: string;
|
|
13
|
-
}
|
|
14
|
-
declare const SandboxHeader: ({ className, title, state, ...props }: SandboxHeaderProps) => react_jsx_runtime.JSX.Element;
|
|
15
|
-
type SandboxContentProps = ComponentProps<typeof CollapsibleContent>;
|
|
16
|
-
declare const SandboxContent: ({ className, ...props }: SandboxContentProps) => react_jsx_runtime.JSX.Element;
|
|
17
|
-
type SandboxTabsProps = ComponentProps<typeof Tabs>;
|
|
18
|
-
declare const SandboxTabs: ({ className, ...props }: SandboxTabsProps) => react_jsx_runtime.JSX.Element;
|
|
19
|
-
type SandboxTabsBarProps = ComponentProps<"div">;
|
|
20
|
-
declare const SandboxTabsBar: ({ className, ...props }: SandboxTabsBarProps) => react_jsx_runtime.JSX.Element;
|
|
21
|
-
type SandboxTabsListProps = ComponentProps<typeof TabsList>;
|
|
22
|
-
declare const SandboxTabsList: ({ className, ...props }: SandboxTabsListProps) => react_jsx_runtime.JSX.Element;
|
|
23
|
-
type SandboxTabsTriggerProps = ComponentProps<typeof TabsTrigger>;
|
|
24
|
-
declare const SandboxTabsTrigger: ({ className, ...props }: SandboxTabsTriggerProps) => react_jsx_runtime.JSX.Element;
|
|
25
|
-
type SandboxTabContentProps = ComponentProps<typeof TabsContent>;
|
|
26
|
-
declare const SandboxTabContent: ({ className, ...props }: SandboxTabContentProps) => react_jsx_runtime.JSX.Element;
|
|
27
|
-
|
|
28
|
-
export { Sandbox, SandboxContent, type SandboxContentProps, SandboxHeader, type SandboxHeaderProps, type SandboxRootProps, SandboxTabContent, type SandboxTabContentProps, SandboxTabs, SandboxTabsBar, type SandboxTabsBarProps, SandboxTabsList, type SandboxTabsListProps, type SandboxTabsProps, SandboxTabsTrigger, type SandboxTabsTriggerProps };
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import { getStatusBadge } from '../../chunk-X5YUF2YM.js';
|
|
2
|
-
import '../../chunk-CFM57HOS.js';
|
|
3
|
-
import { Collapsible, CollapsibleTrigger, CollapsibleContent } from '@chatsdk-dev/ui/components/collapsible';
|
|
4
|
-
import { Tabs, TabsList, TabsTrigger, TabsContent } from '@chatsdk-dev/ui/components/tabs';
|
|
5
|
-
import { cn } from '@chatsdk-dev/ui/lib/utils';
|
|
6
|
-
import { Code, ChevronDownIcon } from 'lucide-react';
|
|
7
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
8
|
-
|
|
9
|
-
var Sandbox = ({ className, ...props }) => /* @__PURE__ */ jsx(
|
|
10
|
-
Collapsible,
|
|
11
|
-
{
|
|
12
|
-
className: cn(
|
|
13
|
-
"not-prose group mb-4 w-full overflow-hidden rounded-md border",
|
|
14
|
-
className
|
|
15
|
-
),
|
|
16
|
-
defaultOpen: true,
|
|
17
|
-
...props
|
|
18
|
-
}
|
|
19
|
-
);
|
|
20
|
-
var SandboxHeader = ({
|
|
21
|
-
className,
|
|
22
|
-
title,
|
|
23
|
-
state,
|
|
24
|
-
...props
|
|
25
|
-
}) => /* @__PURE__ */ jsxs(
|
|
26
|
-
CollapsibleTrigger,
|
|
27
|
-
{
|
|
28
|
-
className: cn(
|
|
29
|
-
"flex w-full items-center justify-between gap-4 p-3",
|
|
30
|
-
className
|
|
31
|
-
),
|
|
32
|
-
...props,
|
|
33
|
-
children: [
|
|
34
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
35
|
-
/* @__PURE__ */ jsx(Code, { className: "size-4 text-muted-foreground" }),
|
|
36
|
-
/* @__PURE__ */ jsx("span", { className: "font-medium text-sm", children: title }),
|
|
37
|
-
getStatusBadge(state)
|
|
38
|
-
] }),
|
|
39
|
-
/* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-4 text-muted-foreground transition-transform group-data-[state=open]:rotate-180" })
|
|
40
|
-
]
|
|
41
|
-
}
|
|
42
|
-
);
|
|
43
|
-
var SandboxContent = ({
|
|
44
|
-
className,
|
|
45
|
-
...props
|
|
46
|
-
}) => /* @__PURE__ */ jsx(
|
|
47
|
-
CollapsibleContent,
|
|
48
|
-
{
|
|
49
|
-
className: cn(
|
|
50
|
-
"data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",
|
|
51
|
-
className
|
|
52
|
-
),
|
|
53
|
-
...props
|
|
54
|
-
}
|
|
55
|
-
);
|
|
56
|
-
var SandboxTabs = ({ className, ...props }) => /* @__PURE__ */ jsx(Tabs, { className: cn("w-full gap-0", className), ...props });
|
|
57
|
-
var SandboxTabsBar = ({
|
|
58
|
-
className,
|
|
59
|
-
...props
|
|
60
|
-
}) => /* @__PURE__ */ jsx(
|
|
61
|
-
"div",
|
|
62
|
-
{
|
|
63
|
-
className: cn(
|
|
64
|
-
"flex w-full items-center border-border border-t border-b",
|
|
65
|
-
className
|
|
66
|
-
),
|
|
67
|
-
...props
|
|
68
|
-
}
|
|
69
|
-
);
|
|
70
|
-
var SandboxTabsList = ({
|
|
71
|
-
className,
|
|
72
|
-
...props
|
|
73
|
-
}) => /* @__PURE__ */ jsx(
|
|
74
|
-
TabsList,
|
|
75
|
-
{
|
|
76
|
-
className: cn("h-auto rounded-none border-0 bg-transparent p-0", className),
|
|
77
|
-
...props
|
|
78
|
-
}
|
|
79
|
-
);
|
|
80
|
-
var SandboxTabsTrigger = ({
|
|
81
|
-
className,
|
|
82
|
-
...props
|
|
83
|
-
}) => /* @__PURE__ */ jsx(
|
|
84
|
-
TabsTrigger,
|
|
85
|
-
{
|
|
86
|
-
className: cn(
|
|
87
|
-
"rounded-none border-0 border-transparent border-b-2 px-4 py-2 font-medium text-muted-foreground text-sm transition-colors data-[state=active]:border-primary data-[state=active]:bg-transparent data-[state=active]:text-foreground data-[state=active]:shadow-none",
|
|
88
|
-
className
|
|
89
|
-
),
|
|
90
|
-
...props
|
|
91
|
-
}
|
|
92
|
-
);
|
|
93
|
-
var SandboxTabContent = ({
|
|
94
|
-
className,
|
|
95
|
-
...props
|
|
96
|
-
}) => /* @__PURE__ */ jsx(TabsContent, { className: cn("mt-0 text-sm", className), ...props });
|
|
97
|
-
|
|
98
|
-
export { Sandbox, SandboxContent, SandboxHeader, SandboxTabContent, SandboxTabs, SandboxTabsBar, SandboxTabsList, SandboxTabsTrigger };
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { Badge } from '@chatsdk-dev/ui/components/badge';
|
|
3
|
-
import { Collapsible } from '@chatsdk-dev/ui/components/collapsible';
|
|
4
|
-
import { HTMLAttributes, ComponentProps } from 'react';
|
|
5
|
-
|
|
6
|
-
type HttpMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
7
|
-
interface SchemaParameter {
|
|
8
|
-
name: string;
|
|
9
|
-
type: string;
|
|
10
|
-
required?: boolean;
|
|
11
|
-
description?: string;
|
|
12
|
-
location?: "path" | "query" | "header";
|
|
13
|
-
}
|
|
14
|
-
interface SchemaProperty {
|
|
15
|
-
name: string;
|
|
16
|
-
type: string;
|
|
17
|
-
required?: boolean;
|
|
18
|
-
description?: string;
|
|
19
|
-
properties?: SchemaProperty[];
|
|
20
|
-
items?: SchemaProperty;
|
|
21
|
-
}
|
|
22
|
-
type SchemaDisplayHeaderProps = HTMLAttributes<HTMLDivElement>;
|
|
23
|
-
declare const SchemaDisplayHeader: ({ className, children, ...props }: SchemaDisplayHeaderProps) => react_jsx_runtime.JSX.Element;
|
|
24
|
-
type SchemaDisplayMethodProps = ComponentProps<typeof Badge>;
|
|
25
|
-
declare const SchemaDisplayMethod: ({ className, children, ...props }: SchemaDisplayMethodProps) => react_jsx_runtime.JSX.Element;
|
|
26
|
-
type SchemaDisplayPathProps = HTMLAttributes<HTMLSpanElement>;
|
|
27
|
-
declare const SchemaDisplayPath: ({ className, children, ...props }: SchemaDisplayPathProps) => react_jsx_runtime.JSX.Element;
|
|
28
|
-
type SchemaDisplayDescriptionProps = HTMLAttributes<HTMLParagraphElement>;
|
|
29
|
-
declare const SchemaDisplayDescription: ({ className, children, ...props }: SchemaDisplayDescriptionProps) => react_jsx_runtime.JSX.Element;
|
|
30
|
-
type SchemaDisplayContentProps = HTMLAttributes<HTMLDivElement>;
|
|
31
|
-
declare const SchemaDisplayContent: ({ className, children, ...props }: SchemaDisplayContentProps) => react_jsx_runtime.JSX.Element;
|
|
32
|
-
type SchemaDisplayParameterProps = HTMLAttributes<HTMLDivElement> & SchemaParameter;
|
|
33
|
-
declare const SchemaDisplayParameter: ({ name, type, required, description, location, className, ...props }: SchemaDisplayParameterProps) => react_jsx_runtime.JSX.Element;
|
|
34
|
-
type SchemaDisplayParametersProps = ComponentProps<typeof Collapsible>;
|
|
35
|
-
declare const SchemaDisplayParameters: ({ className, children, ...props }: SchemaDisplayParametersProps) => react_jsx_runtime.JSX.Element;
|
|
36
|
-
type SchemaDisplayPropertyProps = HTMLAttributes<HTMLDivElement> & SchemaProperty & {
|
|
37
|
-
depth?: number;
|
|
38
|
-
};
|
|
39
|
-
declare const SchemaDisplayProperty: ({ name, type, required, description, properties, items, depth, className, ...props }: SchemaDisplayPropertyProps) => react_jsx_runtime.JSX.Element;
|
|
40
|
-
type SchemaDisplayRequestProps = ComponentProps<typeof Collapsible>;
|
|
41
|
-
declare const SchemaDisplayRequest: ({ className, children, ...props }: SchemaDisplayRequestProps) => react_jsx_runtime.JSX.Element;
|
|
42
|
-
type SchemaDisplayResponseProps = ComponentProps<typeof Collapsible>;
|
|
43
|
-
declare const SchemaDisplayResponse: ({ className, children, ...props }: SchemaDisplayResponseProps) => react_jsx_runtime.JSX.Element;
|
|
44
|
-
type SchemaDisplayProps = HTMLAttributes<HTMLDivElement> & {
|
|
45
|
-
method: HttpMethod;
|
|
46
|
-
path: string;
|
|
47
|
-
description?: string;
|
|
48
|
-
parameters?: SchemaParameter[];
|
|
49
|
-
requestBody?: SchemaProperty[];
|
|
50
|
-
responseBody?: SchemaProperty[];
|
|
51
|
-
};
|
|
52
|
-
declare const SchemaDisplay: ({ method, path, description, parameters, requestBody, responseBody, className, children, ...props }: SchemaDisplayProps) => react_jsx_runtime.JSX.Element;
|
|
53
|
-
type SchemaDisplayBodyProps = HTMLAttributes<HTMLDivElement>;
|
|
54
|
-
declare const SchemaDisplayBody: ({ className, children, ...props }: SchemaDisplayBodyProps) => react_jsx_runtime.JSX.Element;
|
|
55
|
-
type SchemaDisplayExampleProps = HTMLAttributes<HTMLPreElement>;
|
|
56
|
-
declare const SchemaDisplayExample: ({ className, children, ...props }: SchemaDisplayExampleProps) => react_jsx_runtime.JSX.Element;
|
|
57
|
-
|
|
58
|
-
export { SchemaDisplay, SchemaDisplayBody, type SchemaDisplayBodyProps, SchemaDisplayContent, type SchemaDisplayContentProps, SchemaDisplayDescription, type SchemaDisplayDescriptionProps, SchemaDisplayExample, type SchemaDisplayExampleProps, SchemaDisplayHeader, type SchemaDisplayHeaderProps, SchemaDisplayMethod, type SchemaDisplayMethodProps, SchemaDisplayParameter, type SchemaDisplayParameterProps, SchemaDisplayParameters, type SchemaDisplayParametersProps, SchemaDisplayPath, type SchemaDisplayPathProps, SchemaDisplayProperty, type SchemaDisplayPropertyProps, type SchemaDisplayProps, SchemaDisplayRequest, type SchemaDisplayRequestProps, SchemaDisplayResponse, type SchemaDisplayResponseProps };
|