@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,119 +0,0 @@
|
|
|
1
|
-
import { Button } from '@chatsdk-dev/ui/components/button';
|
|
2
|
-
import { cn } from '@chatsdk-dev/ui/lib/utils';
|
|
3
|
-
import { ArrowDownIcon, DownloadIcon } from 'lucide-react';
|
|
4
|
-
import { useCallback } from 'react';
|
|
5
|
-
import { StickToBottom, useStickToBottomContext } from 'use-stick-to-bottom';
|
|
6
|
-
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
7
|
-
|
|
8
|
-
var Conversation = ({ className, ...props }) => /* @__PURE__ */ jsx(
|
|
9
|
-
StickToBottom,
|
|
10
|
-
{
|
|
11
|
-
className: cn("relative flex-1 overflow-y-hidden", className),
|
|
12
|
-
initial: "smooth",
|
|
13
|
-
resize: "smooth",
|
|
14
|
-
role: "log",
|
|
15
|
-
...props
|
|
16
|
-
}
|
|
17
|
-
);
|
|
18
|
-
var ConversationContent = ({
|
|
19
|
-
className,
|
|
20
|
-
...props
|
|
21
|
-
}) => /* @__PURE__ */ jsx(
|
|
22
|
-
StickToBottom.Content,
|
|
23
|
-
{
|
|
24
|
-
className: cn("flex flex-col gap-8 p-4", className),
|
|
25
|
-
...props
|
|
26
|
-
}
|
|
27
|
-
);
|
|
28
|
-
var ConversationEmptyState = ({
|
|
29
|
-
className,
|
|
30
|
-
title = "No messages yet",
|
|
31
|
-
description = "Start a conversation to see messages here",
|
|
32
|
-
icon,
|
|
33
|
-
children,
|
|
34
|
-
...props
|
|
35
|
-
}) => /* @__PURE__ */ jsx(
|
|
36
|
-
"div",
|
|
37
|
-
{
|
|
38
|
-
className: cn(
|
|
39
|
-
"flex size-full flex-col items-center justify-center gap-3 p-8 text-center",
|
|
40
|
-
className
|
|
41
|
-
),
|
|
42
|
-
...props,
|
|
43
|
-
children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
44
|
-
icon && /* @__PURE__ */ jsx("div", { className: "text-muted-foreground", children: icon }),
|
|
45
|
-
/* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
|
|
46
|
-
/* @__PURE__ */ jsx("h3", { className: "font-medium text-sm", children: title }),
|
|
47
|
-
description && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-sm", children: description })
|
|
48
|
-
] })
|
|
49
|
-
] })
|
|
50
|
-
}
|
|
51
|
-
);
|
|
52
|
-
var ConversationScrollButton = ({
|
|
53
|
-
className,
|
|
54
|
-
...props
|
|
55
|
-
}) => {
|
|
56
|
-
const { isAtBottom, scrollToBottom } = useStickToBottomContext();
|
|
57
|
-
const handleScrollToBottom = useCallback(() => {
|
|
58
|
-
scrollToBottom();
|
|
59
|
-
}, [scrollToBottom]);
|
|
60
|
-
return !isAtBottom && /* @__PURE__ */ jsx(
|
|
61
|
-
Button,
|
|
62
|
-
{
|
|
63
|
-
className: cn(
|
|
64
|
-
"absolute bottom-4 left-[50%] translate-x-[-50%] rounded-full dark:bg-background dark:hover:bg-muted",
|
|
65
|
-
className
|
|
66
|
-
),
|
|
67
|
-
onClick: handleScrollToBottom,
|
|
68
|
-
size: "icon",
|
|
69
|
-
type: "button",
|
|
70
|
-
variant: "outline",
|
|
71
|
-
...props,
|
|
72
|
-
children: /* @__PURE__ */ jsx(ArrowDownIcon, { className: "size-4" })
|
|
73
|
-
}
|
|
74
|
-
);
|
|
75
|
-
};
|
|
76
|
-
var getMessageText = (message) => message.parts.filter((part) => part.type === "text").map((part) => part.text).join("");
|
|
77
|
-
var defaultFormatMessage = (message) => {
|
|
78
|
-
const roleLabel = message.role.charAt(0).toUpperCase() + message.role.slice(1);
|
|
79
|
-
return `**${roleLabel}:** ${getMessageText(message)}`;
|
|
80
|
-
};
|
|
81
|
-
var messagesToMarkdown = (messages, formatMessage = defaultFormatMessage) => messages.map((msg, i) => formatMessage(msg, i)).join("\n\n");
|
|
82
|
-
var ConversationDownload = ({
|
|
83
|
-
messages,
|
|
84
|
-
filename = "conversation.md",
|
|
85
|
-
formatMessage = defaultFormatMessage,
|
|
86
|
-
className,
|
|
87
|
-
children,
|
|
88
|
-
...props
|
|
89
|
-
}) => {
|
|
90
|
-
const handleDownload = useCallback(() => {
|
|
91
|
-
const markdown = messagesToMarkdown(messages, formatMessage);
|
|
92
|
-
const blob = new Blob([markdown], { type: "text/markdown" });
|
|
93
|
-
const url = URL.createObjectURL(blob);
|
|
94
|
-
const link = document.createElement("a");
|
|
95
|
-
link.href = url;
|
|
96
|
-
link.download = filename;
|
|
97
|
-
document.body.append(link);
|
|
98
|
-
link.click();
|
|
99
|
-
link.remove();
|
|
100
|
-
URL.revokeObjectURL(url);
|
|
101
|
-
}, [messages, filename, formatMessage]);
|
|
102
|
-
return /* @__PURE__ */ jsx(
|
|
103
|
-
Button,
|
|
104
|
-
{
|
|
105
|
-
className: cn(
|
|
106
|
-
"absolute top-4 right-4 rounded-full dark:bg-background dark:hover:bg-muted",
|
|
107
|
-
className
|
|
108
|
-
),
|
|
109
|
-
onClick: handleDownload,
|
|
110
|
-
size: "icon",
|
|
111
|
-
type: "button",
|
|
112
|
-
variant: "outline",
|
|
113
|
-
...props,
|
|
114
|
-
children: children ?? /* @__PURE__ */ jsx(DownloadIcon, { className: "size-4" })
|
|
115
|
-
}
|
|
116
|
-
);
|
|
117
|
-
};
|
|
118
|
-
|
|
119
|
-
export { Conversation, ConversationContent, ConversationDownload, ConversationEmptyState, ConversationScrollButton, messagesToMarkdown };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { EdgeProps } from '@xyflow/react';
|
|
3
|
-
|
|
4
|
-
declare const Edge: {
|
|
5
|
-
Animated: ({ id, source, target, markerEnd, style }: EdgeProps) => react_jsx_runtime.JSX.Element | null;
|
|
6
|
-
Temporary: ({ id, sourceX, sourceY, targetX, targetY, sourcePosition, targetPosition, }: EdgeProps) => react_jsx_runtime.JSX.Element;
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
export { Edge };
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import { getSimpleBezierPath, BaseEdge, useInternalNode, getBezierPath, Position } from '@xyflow/react';
|
|
2
|
-
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
3
|
-
|
|
4
|
-
// src/components/ai-elements/edge.tsx
|
|
5
|
-
var Temporary = ({
|
|
6
|
-
id,
|
|
7
|
-
sourceX,
|
|
8
|
-
sourceY,
|
|
9
|
-
targetX,
|
|
10
|
-
targetY,
|
|
11
|
-
sourcePosition,
|
|
12
|
-
targetPosition
|
|
13
|
-
}) => {
|
|
14
|
-
const [edgePath] = getSimpleBezierPath({
|
|
15
|
-
sourcePosition,
|
|
16
|
-
sourceX,
|
|
17
|
-
sourceY,
|
|
18
|
-
targetPosition,
|
|
19
|
-
targetX,
|
|
20
|
-
targetY
|
|
21
|
-
});
|
|
22
|
-
return /* @__PURE__ */ jsx(
|
|
23
|
-
BaseEdge,
|
|
24
|
-
{
|
|
25
|
-
className: "stroke-1 stroke-ring",
|
|
26
|
-
id,
|
|
27
|
-
path: edgePath,
|
|
28
|
-
style: {
|
|
29
|
-
strokeDasharray: "5, 5"
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
);
|
|
33
|
-
};
|
|
34
|
-
var getHandleCoordsByPosition = (node, handlePosition) => {
|
|
35
|
-
const handleType = handlePosition === Position.Left ? "target" : "source";
|
|
36
|
-
const handle = node.internals.handleBounds?.[handleType]?.find(
|
|
37
|
-
(h) => h.position === handlePosition
|
|
38
|
-
);
|
|
39
|
-
if (!handle) {
|
|
40
|
-
return [0, 0];
|
|
41
|
-
}
|
|
42
|
-
let offsetX = handle.width / 2;
|
|
43
|
-
let offsetY = handle.height / 2;
|
|
44
|
-
switch (handlePosition) {
|
|
45
|
-
case Position.Left: {
|
|
46
|
-
offsetX = 0;
|
|
47
|
-
break;
|
|
48
|
-
}
|
|
49
|
-
case Position.Right: {
|
|
50
|
-
offsetX = handle.width;
|
|
51
|
-
break;
|
|
52
|
-
}
|
|
53
|
-
case Position.Top: {
|
|
54
|
-
offsetY = 0;
|
|
55
|
-
break;
|
|
56
|
-
}
|
|
57
|
-
case Position.Bottom: {
|
|
58
|
-
offsetY = handle.height;
|
|
59
|
-
break;
|
|
60
|
-
}
|
|
61
|
-
default: {
|
|
62
|
-
throw new Error(`Invalid handle position: ${handlePosition}`);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
const x = node.internals.positionAbsolute.x + handle.x + offsetX;
|
|
66
|
-
const y = node.internals.positionAbsolute.y + handle.y + offsetY;
|
|
67
|
-
return [x, y];
|
|
68
|
-
};
|
|
69
|
-
var getEdgeParams = (source, target) => {
|
|
70
|
-
const sourcePos = Position.Right;
|
|
71
|
-
const [sx, sy] = getHandleCoordsByPosition(source, sourcePos);
|
|
72
|
-
const targetPos = Position.Left;
|
|
73
|
-
const [tx, ty] = getHandleCoordsByPosition(target, targetPos);
|
|
74
|
-
return {
|
|
75
|
-
sourcePos,
|
|
76
|
-
sx,
|
|
77
|
-
sy,
|
|
78
|
-
targetPos,
|
|
79
|
-
tx,
|
|
80
|
-
ty
|
|
81
|
-
};
|
|
82
|
-
};
|
|
83
|
-
var Animated = ({ id, source, target, markerEnd, style }) => {
|
|
84
|
-
const sourceNode = useInternalNode(source);
|
|
85
|
-
const targetNode = useInternalNode(target);
|
|
86
|
-
if (!(sourceNode && targetNode)) {
|
|
87
|
-
return null;
|
|
88
|
-
}
|
|
89
|
-
const { sx, sy, tx, ty, sourcePos, targetPos } = getEdgeParams(
|
|
90
|
-
sourceNode,
|
|
91
|
-
targetNode
|
|
92
|
-
);
|
|
93
|
-
const [edgePath] = getBezierPath({
|
|
94
|
-
sourcePosition: sourcePos,
|
|
95
|
-
sourceX: sx,
|
|
96
|
-
sourceY: sy,
|
|
97
|
-
targetPosition: targetPos,
|
|
98
|
-
targetX: tx,
|
|
99
|
-
targetY: ty
|
|
100
|
-
});
|
|
101
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
102
|
-
/* @__PURE__ */ jsx(BaseEdge, { id, markerEnd, path: edgePath, style }),
|
|
103
|
-
/* @__PURE__ */ jsx("circle", { fill: "var(--primary)", r: "4", children: /* @__PURE__ */ jsx("animateMotion", { dur: "2s", path: edgePath, repeatCount: "indefinite" }) })
|
|
104
|
-
] });
|
|
105
|
-
};
|
|
106
|
-
var Edge = {
|
|
107
|
-
Animated,
|
|
108
|
-
Temporary
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
export { Edge };
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { Badge } from '@chatsdk-dev/ui/components/badge';
|
|
3
|
-
import { Button } from '@chatsdk-dev/ui/components/button';
|
|
4
|
-
import { Switch } from '@chatsdk-dev/ui/components/switch';
|
|
5
|
-
import { HTMLAttributes, ComponentProps } from 'react';
|
|
6
|
-
|
|
7
|
-
type EnvironmentVariablesProps = HTMLAttributes<HTMLDivElement> & {
|
|
8
|
-
showValues?: boolean;
|
|
9
|
-
defaultShowValues?: boolean;
|
|
10
|
-
onShowValuesChange?: (show: boolean) => void;
|
|
11
|
-
};
|
|
12
|
-
declare const EnvironmentVariables: ({ showValues: controlledShowValues, defaultShowValues, onShowValuesChange, className, children, ...props }: EnvironmentVariablesProps) => react_jsx_runtime.JSX.Element;
|
|
13
|
-
type EnvironmentVariablesHeaderProps = HTMLAttributes<HTMLDivElement>;
|
|
14
|
-
declare const EnvironmentVariablesHeader: ({ className, children, ...props }: EnvironmentVariablesHeaderProps) => react_jsx_runtime.JSX.Element;
|
|
15
|
-
type EnvironmentVariablesTitleProps = HTMLAttributes<HTMLHeadingElement>;
|
|
16
|
-
declare const EnvironmentVariablesTitle: ({ className, children, ...props }: EnvironmentVariablesTitleProps) => react_jsx_runtime.JSX.Element;
|
|
17
|
-
type EnvironmentVariablesToggleProps = ComponentProps<typeof Switch>;
|
|
18
|
-
declare const EnvironmentVariablesToggle: ({ className, ...props }: EnvironmentVariablesToggleProps) => react_jsx_runtime.JSX.Element;
|
|
19
|
-
type EnvironmentVariablesContentProps = HTMLAttributes<HTMLDivElement>;
|
|
20
|
-
declare const EnvironmentVariablesContent: ({ className, children, ...props }: EnvironmentVariablesContentProps) => react_jsx_runtime.JSX.Element;
|
|
21
|
-
type EnvironmentVariableGroupProps = HTMLAttributes<HTMLDivElement>;
|
|
22
|
-
declare const EnvironmentVariableGroup: ({ className, children, ...props }: EnvironmentVariableGroupProps) => react_jsx_runtime.JSX.Element;
|
|
23
|
-
type EnvironmentVariableNameProps = HTMLAttributes<HTMLSpanElement>;
|
|
24
|
-
declare const EnvironmentVariableName: ({ className, children, ...props }: EnvironmentVariableNameProps) => react_jsx_runtime.JSX.Element;
|
|
25
|
-
type EnvironmentVariableValueProps = HTMLAttributes<HTMLSpanElement>;
|
|
26
|
-
declare const EnvironmentVariableValue: ({ className, children, ...props }: EnvironmentVariableValueProps) => react_jsx_runtime.JSX.Element;
|
|
27
|
-
type EnvironmentVariableProps = HTMLAttributes<HTMLDivElement> & {
|
|
28
|
-
name: string;
|
|
29
|
-
value: string;
|
|
30
|
-
};
|
|
31
|
-
declare const EnvironmentVariable: ({ name, value, className, children, ...props }: EnvironmentVariableProps) => react_jsx_runtime.JSX.Element;
|
|
32
|
-
type EnvironmentVariableCopyButtonProps = ComponentProps<typeof Button> & {
|
|
33
|
-
onCopy?: () => void;
|
|
34
|
-
onError?: (error: Error) => void;
|
|
35
|
-
timeout?: number;
|
|
36
|
-
copyFormat?: "name" | "value" | "export";
|
|
37
|
-
};
|
|
38
|
-
declare const EnvironmentVariableCopyButton: ({ onCopy, onError, timeout, copyFormat, children, className, ...props }: EnvironmentVariableCopyButtonProps) => react_jsx_runtime.JSX.Element;
|
|
39
|
-
type EnvironmentVariableRequiredProps = ComponentProps<typeof Badge>;
|
|
40
|
-
declare const EnvironmentVariableRequired: ({ className, children, ...props }: EnvironmentVariableRequiredProps) => react_jsx_runtime.JSX.Element;
|
|
41
|
-
|
|
42
|
-
export { EnvironmentVariable, EnvironmentVariableCopyButton, type EnvironmentVariableCopyButtonProps, EnvironmentVariableGroup, type EnvironmentVariableGroupProps, EnvironmentVariableName, type EnvironmentVariableNameProps, type EnvironmentVariableProps, EnvironmentVariableRequired, type EnvironmentVariableRequiredProps, EnvironmentVariableValue, type EnvironmentVariableValueProps, EnvironmentVariables, EnvironmentVariablesContent, type EnvironmentVariablesContentProps, EnvironmentVariablesHeader, type EnvironmentVariablesHeaderProps, type EnvironmentVariablesProps, EnvironmentVariablesTitle, type EnvironmentVariablesTitleProps, EnvironmentVariablesToggle, type EnvironmentVariablesToggleProps };
|
|
@@ -1,208 +0,0 @@
|
|
|
1
|
-
import { Badge } from '@chatsdk-dev/ui/components/badge';
|
|
2
|
-
import { Button } from '@chatsdk-dev/ui/components/button';
|
|
3
|
-
import { Switch } from '@chatsdk-dev/ui/components/switch';
|
|
4
|
-
import { cn } from '@chatsdk-dev/ui/lib/utils';
|
|
5
|
-
import { EyeIcon, EyeOffIcon, CheckIcon, CopyIcon } from 'lucide-react';
|
|
6
|
-
import { createContext, useState, useCallback, useMemo, useContext, useRef, useEffect } from 'react';
|
|
7
|
-
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
8
|
-
|
|
9
|
-
var noop = () => {
|
|
10
|
-
};
|
|
11
|
-
var EnvironmentVariablesContext = createContext({
|
|
12
|
-
setShowValues: noop,
|
|
13
|
-
showValues: false
|
|
14
|
-
});
|
|
15
|
-
var EnvironmentVariables = ({
|
|
16
|
-
showValues: controlledShowValues,
|
|
17
|
-
defaultShowValues = false,
|
|
18
|
-
onShowValuesChange,
|
|
19
|
-
className,
|
|
20
|
-
children,
|
|
21
|
-
...props
|
|
22
|
-
}) => {
|
|
23
|
-
const [internalShowValues, setInternalShowValues] = useState(defaultShowValues);
|
|
24
|
-
const showValues = controlledShowValues ?? internalShowValues;
|
|
25
|
-
const setShowValues = useCallback(
|
|
26
|
-
(show) => {
|
|
27
|
-
setInternalShowValues(show);
|
|
28
|
-
onShowValuesChange?.(show);
|
|
29
|
-
},
|
|
30
|
-
[onShowValuesChange]
|
|
31
|
-
);
|
|
32
|
-
const contextValue = useMemo(
|
|
33
|
-
() => ({ setShowValues, showValues }),
|
|
34
|
-
[setShowValues, showValues]
|
|
35
|
-
);
|
|
36
|
-
return /* @__PURE__ */ jsx(EnvironmentVariablesContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(
|
|
37
|
-
"div",
|
|
38
|
-
{
|
|
39
|
-
className: cn("rounded-lg border bg-background", className),
|
|
40
|
-
...props,
|
|
41
|
-
children
|
|
42
|
-
}
|
|
43
|
-
) });
|
|
44
|
-
};
|
|
45
|
-
var EnvironmentVariablesHeader = ({
|
|
46
|
-
className,
|
|
47
|
-
children,
|
|
48
|
-
...props
|
|
49
|
-
}) => /* @__PURE__ */ jsx(
|
|
50
|
-
"div",
|
|
51
|
-
{
|
|
52
|
-
className: cn(
|
|
53
|
-
"flex items-center justify-between border-b px-4 py-3",
|
|
54
|
-
className
|
|
55
|
-
),
|
|
56
|
-
...props,
|
|
57
|
-
children
|
|
58
|
-
}
|
|
59
|
-
);
|
|
60
|
-
var EnvironmentVariablesTitle = ({
|
|
61
|
-
className,
|
|
62
|
-
children,
|
|
63
|
-
...props
|
|
64
|
-
}) => /* @__PURE__ */ jsx("h3", { className: cn("font-medium text-sm", className), ...props, children: children ?? "Environment Variables" });
|
|
65
|
-
var EnvironmentVariablesToggle = ({
|
|
66
|
-
className,
|
|
67
|
-
...props
|
|
68
|
-
}) => {
|
|
69
|
-
const { showValues, setShowValues } = useContext(EnvironmentVariablesContext);
|
|
70
|
-
return /* @__PURE__ */ jsxs("div", { className: cn("flex items-center gap-2", className), children: [
|
|
71
|
-
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground text-xs", children: showValues ? /* @__PURE__ */ jsx(EyeIcon, { size: 14 }) : /* @__PURE__ */ jsx(EyeOffIcon, { size: 14 }) }),
|
|
72
|
-
/* @__PURE__ */ jsx(
|
|
73
|
-
Switch,
|
|
74
|
-
{
|
|
75
|
-
"aria-label": "Toggle value visibility",
|
|
76
|
-
checked: showValues,
|
|
77
|
-
onCheckedChange: setShowValues,
|
|
78
|
-
...props
|
|
79
|
-
}
|
|
80
|
-
)
|
|
81
|
-
] });
|
|
82
|
-
};
|
|
83
|
-
var EnvironmentVariablesContent = ({
|
|
84
|
-
className,
|
|
85
|
-
children,
|
|
86
|
-
...props
|
|
87
|
-
}) => /* @__PURE__ */ jsx("div", { className: cn("divide-y", className), ...props, children });
|
|
88
|
-
var EnvironmentVariableContext = createContext({
|
|
89
|
-
name: "",
|
|
90
|
-
value: ""
|
|
91
|
-
});
|
|
92
|
-
var EnvironmentVariableGroup = ({
|
|
93
|
-
className,
|
|
94
|
-
children,
|
|
95
|
-
...props
|
|
96
|
-
}) => /* @__PURE__ */ jsx("div", { className: cn("flex items-center gap-2", className), ...props, children });
|
|
97
|
-
var EnvironmentVariableName = ({
|
|
98
|
-
className,
|
|
99
|
-
children,
|
|
100
|
-
...props
|
|
101
|
-
}) => {
|
|
102
|
-
const { name } = useContext(EnvironmentVariableContext);
|
|
103
|
-
return /* @__PURE__ */ jsx("span", { className: cn("font-mono text-sm", className), ...props, children: children ?? name });
|
|
104
|
-
};
|
|
105
|
-
var EnvironmentVariableValue = ({
|
|
106
|
-
className,
|
|
107
|
-
children,
|
|
108
|
-
...props
|
|
109
|
-
}) => {
|
|
110
|
-
const { value } = useContext(EnvironmentVariableContext);
|
|
111
|
-
const { showValues } = useContext(EnvironmentVariablesContext);
|
|
112
|
-
const displayValue = showValues ? value : "\u2022".repeat(Math.min(value.length, 20));
|
|
113
|
-
return /* @__PURE__ */ jsx(
|
|
114
|
-
"span",
|
|
115
|
-
{
|
|
116
|
-
className: cn(
|
|
117
|
-
"font-mono text-muted-foreground text-sm",
|
|
118
|
-
!showValues && "select-none",
|
|
119
|
-
className
|
|
120
|
-
),
|
|
121
|
-
...props,
|
|
122
|
-
children: children ?? displayValue
|
|
123
|
-
}
|
|
124
|
-
);
|
|
125
|
-
};
|
|
126
|
-
var EnvironmentVariable = ({
|
|
127
|
-
name,
|
|
128
|
-
value,
|
|
129
|
-
className,
|
|
130
|
-
children,
|
|
131
|
-
...props
|
|
132
|
-
}) => {
|
|
133
|
-
const envVarContextValue = useMemo(() => ({ name, value }), [name, value]);
|
|
134
|
-
return /* @__PURE__ */ jsx(EnvironmentVariableContext.Provider, { value: envVarContextValue, children: /* @__PURE__ */ jsx(
|
|
135
|
-
"div",
|
|
136
|
-
{
|
|
137
|
-
className: cn(
|
|
138
|
-
"flex items-center justify-between gap-4 px-4 py-3",
|
|
139
|
-
className
|
|
140
|
-
),
|
|
141
|
-
...props,
|
|
142
|
-
children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
143
|
-
/* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsx(EnvironmentVariableName, {}) }),
|
|
144
|
-
/* @__PURE__ */ jsx(EnvironmentVariableValue, {})
|
|
145
|
-
] })
|
|
146
|
-
}
|
|
147
|
-
) });
|
|
148
|
-
};
|
|
149
|
-
var EnvironmentVariableCopyButton = ({
|
|
150
|
-
onCopy,
|
|
151
|
-
onError,
|
|
152
|
-
timeout = 2e3,
|
|
153
|
-
copyFormat = "value",
|
|
154
|
-
children,
|
|
155
|
-
className,
|
|
156
|
-
...props
|
|
157
|
-
}) => {
|
|
158
|
-
const [isCopied, setIsCopied] = useState(false);
|
|
159
|
-
const timeoutRef = useRef(0);
|
|
160
|
-
const { name, value } = useContext(EnvironmentVariableContext);
|
|
161
|
-
const getTextToCopy = useCallback(() => {
|
|
162
|
-
const formatMap = {
|
|
163
|
-
export: () => `export ${name}="${value}"`,
|
|
164
|
-
name: () => name,
|
|
165
|
-
value: () => value
|
|
166
|
-
};
|
|
167
|
-
return formatMap[copyFormat]();
|
|
168
|
-
}, [name, value, copyFormat]);
|
|
169
|
-
const copyToClipboard = useCallback(async () => {
|
|
170
|
-
if (typeof window === "undefined" || !navigator?.clipboard?.writeText) {
|
|
171
|
-
onError?.(new Error("Clipboard API not available"));
|
|
172
|
-
return;
|
|
173
|
-
}
|
|
174
|
-
try {
|
|
175
|
-
await navigator.clipboard.writeText(getTextToCopy());
|
|
176
|
-
setIsCopied(true);
|
|
177
|
-
onCopy?.();
|
|
178
|
-
timeoutRef.current = window.setTimeout(() => setIsCopied(false), timeout);
|
|
179
|
-
} catch (error) {
|
|
180
|
-
onError?.(error);
|
|
181
|
-
}
|
|
182
|
-
}, [getTextToCopy, onCopy, onError, timeout]);
|
|
183
|
-
useEffect(
|
|
184
|
-
() => () => {
|
|
185
|
-
window.clearTimeout(timeoutRef.current);
|
|
186
|
-
},
|
|
187
|
-
[]
|
|
188
|
-
);
|
|
189
|
-
const Icon = isCopied ? CheckIcon : CopyIcon;
|
|
190
|
-
return /* @__PURE__ */ jsx(
|
|
191
|
-
Button,
|
|
192
|
-
{
|
|
193
|
-
className: cn("size-6 shrink-0", className),
|
|
194
|
-
onClick: copyToClipboard,
|
|
195
|
-
size: "icon",
|
|
196
|
-
variant: "ghost",
|
|
197
|
-
...props,
|
|
198
|
-
children: children ?? /* @__PURE__ */ jsx(Icon, { size: 12 })
|
|
199
|
-
}
|
|
200
|
-
);
|
|
201
|
-
};
|
|
202
|
-
var EnvironmentVariableRequired = ({
|
|
203
|
-
className,
|
|
204
|
-
children,
|
|
205
|
-
...props
|
|
206
|
-
}) => /* @__PURE__ */ jsx(Badge, { className: cn("text-xs", className), variant: "secondary", ...props, children: children ?? "Required" });
|
|
207
|
-
|
|
208
|
-
export { EnvironmentVariable, EnvironmentVariableCopyButton, EnvironmentVariableGroup, EnvironmentVariableName, EnvironmentVariableRequired, EnvironmentVariableValue, EnvironmentVariables, EnvironmentVariablesContent, EnvironmentVariablesHeader, EnvironmentVariablesTitle, EnvironmentVariablesToggle };
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { HTMLAttributes, ReactNode } from 'react';
|
|
3
|
-
|
|
4
|
-
type FileTreeProps = Omit<HTMLAttributes<HTMLDivElement>, "onSelect"> & {
|
|
5
|
-
expanded?: Set<string>;
|
|
6
|
-
defaultExpanded?: Set<string>;
|
|
7
|
-
selectedPath?: string;
|
|
8
|
-
onSelect?: (path: string) => void;
|
|
9
|
-
onExpandedChange?: (expanded: Set<string>) => void;
|
|
10
|
-
};
|
|
11
|
-
declare const FileTree: ({ expanded: controlledExpanded, defaultExpanded, selectedPath, onSelect, onExpandedChange, className, children, ...props }: FileTreeProps) => react_jsx_runtime.JSX.Element;
|
|
12
|
-
type FileTreeIconProps = HTMLAttributes<HTMLSpanElement>;
|
|
13
|
-
declare const FileTreeIcon: ({ className, children, ...props }: FileTreeIconProps) => react_jsx_runtime.JSX.Element;
|
|
14
|
-
type FileTreeNameProps = HTMLAttributes<HTMLSpanElement>;
|
|
15
|
-
declare const FileTreeName: ({ className, children, ...props }: FileTreeNameProps) => react_jsx_runtime.JSX.Element;
|
|
16
|
-
type FileTreeFolderProps = HTMLAttributes<HTMLDivElement> & {
|
|
17
|
-
path: string;
|
|
18
|
-
name: string;
|
|
19
|
-
};
|
|
20
|
-
declare const FileTreeFolder: ({ path, name, className, children, ...props }: FileTreeFolderProps) => react_jsx_runtime.JSX.Element;
|
|
21
|
-
type FileTreeFileProps = HTMLAttributes<HTMLDivElement> & {
|
|
22
|
-
path: string;
|
|
23
|
-
name: string;
|
|
24
|
-
icon?: ReactNode;
|
|
25
|
-
};
|
|
26
|
-
declare const FileTreeFile: ({ path, name, icon, className, children, ...props }: FileTreeFileProps) => react_jsx_runtime.JSX.Element;
|
|
27
|
-
type FileTreeActionsProps = HTMLAttributes<HTMLDivElement>;
|
|
28
|
-
declare const FileTreeActions: ({ className, children, ...props }: FileTreeActionsProps) => react_jsx_runtime.JSX.Element;
|
|
29
|
-
|
|
30
|
-
export { FileTree, FileTreeActions, type FileTreeActionsProps, FileTreeFile, type FileTreeFileProps, FileTreeFolder, type FileTreeFolderProps, FileTreeIcon, type FileTreeIconProps, FileTreeName, type FileTreeNameProps, type FileTreeProps };
|