@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,57 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { Button } from '@chatsdk-dev/ui/components/button';
|
|
3
|
-
import { HoverCard, HoverCardContent, HoverCardTrigger } from '@chatsdk-dev/ui/components/hover-card';
|
|
4
|
-
import { FileUIPart, SourceDocumentUIPart } from 'ai';
|
|
5
|
-
import { HTMLAttributes, ComponentProps, ReactNode } from 'react';
|
|
6
|
-
|
|
7
|
-
type AttachmentData = (FileUIPart & {
|
|
8
|
-
id: string;
|
|
9
|
-
}) | (SourceDocumentUIPart & {
|
|
10
|
-
id: string;
|
|
11
|
-
});
|
|
12
|
-
type AttachmentMediaCategory = "image" | "video" | "audio" | "document" | "source" | "unknown";
|
|
13
|
-
type AttachmentVariant = "grid" | "inline" | "list";
|
|
14
|
-
declare const getMediaCategory: (data: AttachmentData) => AttachmentMediaCategory;
|
|
15
|
-
declare const getAttachmentLabel: (data: AttachmentData) => string;
|
|
16
|
-
interface AttachmentsContextValue {
|
|
17
|
-
variant: AttachmentVariant;
|
|
18
|
-
}
|
|
19
|
-
interface AttachmentContextValue {
|
|
20
|
-
data: AttachmentData;
|
|
21
|
-
mediaCategory: AttachmentMediaCategory;
|
|
22
|
-
onRemove?: () => void;
|
|
23
|
-
variant: AttachmentVariant;
|
|
24
|
-
}
|
|
25
|
-
declare const useAttachmentsContext: () => AttachmentsContextValue;
|
|
26
|
-
declare const useAttachmentContext: () => AttachmentContextValue;
|
|
27
|
-
type AttachmentsProps = HTMLAttributes<HTMLDivElement> & {
|
|
28
|
-
variant?: AttachmentVariant;
|
|
29
|
-
};
|
|
30
|
-
declare const Attachments: ({ variant, className, children, ...props }: AttachmentsProps) => react_jsx_runtime.JSX.Element;
|
|
31
|
-
type AttachmentProps = HTMLAttributes<HTMLDivElement> & {
|
|
32
|
-
data: AttachmentData;
|
|
33
|
-
onRemove?: () => void;
|
|
34
|
-
};
|
|
35
|
-
declare const Attachment: ({ data, onRemove, className, children, ...props }: AttachmentProps) => react_jsx_runtime.JSX.Element;
|
|
36
|
-
type AttachmentPreviewProps = HTMLAttributes<HTMLDivElement> & {
|
|
37
|
-
fallbackIcon?: ReactNode;
|
|
38
|
-
};
|
|
39
|
-
declare const AttachmentPreview: ({ fallbackIcon, className, ...props }: AttachmentPreviewProps) => react_jsx_runtime.JSX.Element;
|
|
40
|
-
type AttachmentInfoProps = HTMLAttributes<HTMLDivElement> & {
|
|
41
|
-
showMediaType?: boolean;
|
|
42
|
-
};
|
|
43
|
-
declare const AttachmentInfo: ({ showMediaType, className, ...props }: AttachmentInfoProps) => react_jsx_runtime.JSX.Element | null;
|
|
44
|
-
type AttachmentRemoveProps = ComponentProps<typeof Button> & {
|
|
45
|
-
label?: string;
|
|
46
|
-
};
|
|
47
|
-
declare const AttachmentRemove: ({ label, className, children, ...props }: AttachmentRemoveProps) => react_jsx_runtime.JSX.Element | null;
|
|
48
|
-
type AttachmentHoverCardProps = ComponentProps<typeof HoverCard>;
|
|
49
|
-
declare const AttachmentHoverCard: ({ ...props }: AttachmentHoverCardProps) => react_jsx_runtime.JSX.Element;
|
|
50
|
-
type AttachmentHoverCardTriggerProps = ComponentProps<typeof HoverCardTrigger>;
|
|
51
|
-
declare const AttachmentHoverCardTrigger: ({ delay, closeDelay, ...props }: AttachmentHoverCardTriggerProps) => react_jsx_runtime.JSX.Element;
|
|
52
|
-
type AttachmentHoverCardContentProps = ComponentProps<typeof HoverCardContent>;
|
|
53
|
-
declare const AttachmentHoverCardContent: ({ align, className, ...props }: AttachmentHoverCardContentProps) => react_jsx_runtime.JSX.Element;
|
|
54
|
-
type AttachmentEmptyProps = HTMLAttributes<HTMLDivElement>;
|
|
55
|
-
declare const AttachmentEmpty: ({ className, children, ...props }: AttachmentEmptyProps) => react_jsx_runtime.JSX.Element;
|
|
56
|
-
|
|
57
|
-
export { Attachment, type AttachmentData, AttachmentEmpty, type AttachmentEmptyProps, AttachmentHoverCard, AttachmentHoverCardContent, type AttachmentHoverCardContentProps, type AttachmentHoverCardProps, AttachmentHoverCardTrigger, type AttachmentHoverCardTriggerProps, AttachmentInfo, type AttachmentInfoProps, type AttachmentMediaCategory, AttachmentPreview, type AttachmentPreviewProps, type AttachmentProps, AttachmentRemove, type AttachmentRemoveProps, type AttachmentVariant, Attachments, type AttachmentsProps, getAttachmentLabel, getMediaCategory, useAttachmentContext, useAttachmentsContext };
|
|
@@ -1,258 +0,0 @@
|
|
|
1
|
-
import { Button } from '@chatsdk-dev/ui/components/button';
|
|
2
|
-
import { HoverCard, HoverCardTrigger, HoverCardContent } from '@chatsdk-dev/ui/components/hover-card';
|
|
3
|
-
import { cn } from '@chatsdk-dev/ui/lib/utils';
|
|
4
|
-
import { XIcon, VideoIcon, PaperclipIcon, GlobeIcon, ImageIcon, FileTextIcon, Music2Icon } from 'lucide-react';
|
|
5
|
-
import { createContext, useContext, useMemo, useCallback } from 'react';
|
|
6
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
|
-
|
|
8
|
-
var mediaCategoryIcons = {
|
|
9
|
-
audio: Music2Icon,
|
|
10
|
-
document: FileTextIcon,
|
|
11
|
-
image: ImageIcon,
|
|
12
|
-
source: GlobeIcon,
|
|
13
|
-
unknown: PaperclipIcon,
|
|
14
|
-
video: VideoIcon
|
|
15
|
-
};
|
|
16
|
-
var getMediaCategory = (data) => {
|
|
17
|
-
if (data.type === "source-document") {
|
|
18
|
-
return "source";
|
|
19
|
-
}
|
|
20
|
-
const mediaType = data.mediaType ?? "";
|
|
21
|
-
if (mediaType.startsWith("image/")) {
|
|
22
|
-
return "image";
|
|
23
|
-
}
|
|
24
|
-
if (mediaType.startsWith("video/")) {
|
|
25
|
-
return "video";
|
|
26
|
-
}
|
|
27
|
-
if (mediaType.startsWith("audio/")) {
|
|
28
|
-
return "audio";
|
|
29
|
-
}
|
|
30
|
-
if (mediaType.startsWith("application/") || mediaType.startsWith("text/")) {
|
|
31
|
-
return "document";
|
|
32
|
-
}
|
|
33
|
-
return "unknown";
|
|
34
|
-
};
|
|
35
|
-
var getAttachmentLabel = (data) => {
|
|
36
|
-
if (data.type === "source-document") {
|
|
37
|
-
return data.title || data.filename || "Source";
|
|
38
|
-
}
|
|
39
|
-
const category = getMediaCategory(data);
|
|
40
|
-
return data.filename || (category === "image" ? "Image" : "Attachment");
|
|
41
|
-
};
|
|
42
|
-
var renderAttachmentImage = (url, filename, isGrid) => isGrid ? /* @__PURE__ */ jsx(
|
|
43
|
-
"img",
|
|
44
|
-
{
|
|
45
|
-
alt: filename || "Image",
|
|
46
|
-
className: "size-full object-cover",
|
|
47
|
-
height: 96,
|
|
48
|
-
src: url,
|
|
49
|
-
width: 96
|
|
50
|
-
}
|
|
51
|
-
) : /* @__PURE__ */ jsx(
|
|
52
|
-
"img",
|
|
53
|
-
{
|
|
54
|
-
alt: filename || "Image",
|
|
55
|
-
className: "size-full rounded object-cover",
|
|
56
|
-
height: 20,
|
|
57
|
-
src: url,
|
|
58
|
-
width: 20
|
|
59
|
-
}
|
|
60
|
-
);
|
|
61
|
-
var AttachmentsContext = createContext(null);
|
|
62
|
-
var AttachmentContext = createContext(null);
|
|
63
|
-
var useAttachmentsContext = () => useContext(AttachmentsContext) ?? { variant: "grid" };
|
|
64
|
-
var useAttachmentContext = () => {
|
|
65
|
-
const ctx = useContext(AttachmentContext);
|
|
66
|
-
if (!ctx) {
|
|
67
|
-
throw new Error("Attachment components must be used within <Attachment>");
|
|
68
|
-
}
|
|
69
|
-
return ctx;
|
|
70
|
-
};
|
|
71
|
-
var Attachments = ({
|
|
72
|
-
variant = "grid",
|
|
73
|
-
className,
|
|
74
|
-
children,
|
|
75
|
-
...props
|
|
76
|
-
}) => {
|
|
77
|
-
const contextValue = useMemo(() => ({ variant }), [variant]);
|
|
78
|
-
return /* @__PURE__ */ jsx(AttachmentsContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(
|
|
79
|
-
"div",
|
|
80
|
-
{
|
|
81
|
-
className: cn(
|
|
82
|
-
"flex items-start",
|
|
83
|
-
variant === "list" ? "flex-col gap-2" : "flex-wrap gap-2",
|
|
84
|
-
variant === "grid" && "ml-auto w-fit",
|
|
85
|
-
className
|
|
86
|
-
),
|
|
87
|
-
...props,
|
|
88
|
-
children
|
|
89
|
-
}
|
|
90
|
-
) });
|
|
91
|
-
};
|
|
92
|
-
var Attachment = ({
|
|
93
|
-
data,
|
|
94
|
-
onRemove,
|
|
95
|
-
className,
|
|
96
|
-
children,
|
|
97
|
-
...props
|
|
98
|
-
}) => {
|
|
99
|
-
const { variant } = useAttachmentsContext();
|
|
100
|
-
const mediaCategory = getMediaCategory(data);
|
|
101
|
-
const contextValue = useMemo(
|
|
102
|
-
() => ({ data, mediaCategory, onRemove, variant }),
|
|
103
|
-
[data, mediaCategory, onRemove, variant]
|
|
104
|
-
);
|
|
105
|
-
return /* @__PURE__ */ jsx(AttachmentContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(
|
|
106
|
-
"div",
|
|
107
|
-
{
|
|
108
|
-
className: cn(
|
|
109
|
-
"group relative",
|
|
110
|
-
variant === "grid" && "size-24 overflow-hidden rounded-lg",
|
|
111
|
-
variant === "inline" && [
|
|
112
|
-
"flex h-8 cursor-pointer select-none items-center gap-1.5",
|
|
113
|
-
"rounded-md border border-border px-1.5",
|
|
114
|
-
"font-medium text-sm transition-all",
|
|
115
|
-
"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50"
|
|
116
|
-
],
|
|
117
|
-
variant === "list" && [
|
|
118
|
-
"flex w-full items-center gap-3 rounded-lg border p-3",
|
|
119
|
-
"hover:bg-accent/50"
|
|
120
|
-
],
|
|
121
|
-
className
|
|
122
|
-
),
|
|
123
|
-
...props,
|
|
124
|
-
children
|
|
125
|
-
}
|
|
126
|
-
) });
|
|
127
|
-
};
|
|
128
|
-
var AttachmentPreview = ({
|
|
129
|
-
fallbackIcon,
|
|
130
|
-
className,
|
|
131
|
-
...props
|
|
132
|
-
}) => {
|
|
133
|
-
const { data, mediaCategory, variant } = useAttachmentContext();
|
|
134
|
-
const iconSize = variant === "inline" ? "size-3" : "size-4";
|
|
135
|
-
const renderIcon = (Icon) => /* @__PURE__ */ jsx(Icon, { className: cn(iconSize, "text-muted-foreground") });
|
|
136
|
-
const renderContent = () => {
|
|
137
|
-
if (mediaCategory === "image" && data.type === "file" && data.url) {
|
|
138
|
-
return renderAttachmentImage(data.url, data.filename, variant === "grid");
|
|
139
|
-
}
|
|
140
|
-
if (mediaCategory === "video" && data.type === "file" && data.url) {
|
|
141
|
-
return /* @__PURE__ */ jsx("video", { className: "size-full object-cover", muted: true, src: data.url });
|
|
142
|
-
}
|
|
143
|
-
const Icon = mediaCategoryIcons[mediaCategory];
|
|
144
|
-
return fallbackIcon ?? renderIcon(Icon);
|
|
145
|
-
};
|
|
146
|
-
return /* @__PURE__ */ jsx(
|
|
147
|
-
"div",
|
|
148
|
-
{
|
|
149
|
-
className: cn(
|
|
150
|
-
"flex shrink-0 items-center justify-center overflow-hidden",
|
|
151
|
-
variant === "grid" && "size-full bg-muted",
|
|
152
|
-
variant === "inline" && "size-5 rounded bg-background",
|
|
153
|
-
variant === "list" && "size-12 rounded bg-muted",
|
|
154
|
-
className
|
|
155
|
-
),
|
|
156
|
-
...props,
|
|
157
|
-
children: renderContent()
|
|
158
|
-
}
|
|
159
|
-
);
|
|
160
|
-
};
|
|
161
|
-
var AttachmentInfo = ({
|
|
162
|
-
showMediaType = false,
|
|
163
|
-
className,
|
|
164
|
-
...props
|
|
165
|
-
}) => {
|
|
166
|
-
const { data, variant } = useAttachmentContext();
|
|
167
|
-
const label = getAttachmentLabel(data);
|
|
168
|
-
if (variant === "grid") {
|
|
169
|
-
return null;
|
|
170
|
-
}
|
|
171
|
-
return /* @__PURE__ */ jsxs("div", { className: cn("min-w-0 flex-1", className), ...props, children: [
|
|
172
|
-
/* @__PURE__ */ jsx("span", { className: "block truncate", children: label }),
|
|
173
|
-
showMediaType && data.mediaType && /* @__PURE__ */ jsx("span", { className: "block truncate text-muted-foreground text-xs", children: data.mediaType })
|
|
174
|
-
] });
|
|
175
|
-
};
|
|
176
|
-
var AttachmentRemove = ({
|
|
177
|
-
label = "Remove",
|
|
178
|
-
className,
|
|
179
|
-
children,
|
|
180
|
-
...props
|
|
181
|
-
}) => {
|
|
182
|
-
const { onRemove, variant } = useAttachmentContext();
|
|
183
|
-
const handleClick = useCallback(
|
|
184
|
-
(e) => {
|
|
185
|
-
e.stopPropagation();
|
|
186
|
-
onRemove?.();
|
|
187
|
-
},
|
|
188
|
-
[onRemove]
|
|
189
|
-
);
|
|
190
|
-
if (!onRemove) {
|
|
191
|
-
return null;
|
|
192
|
-
}
|
|
193
|
-
return /* @__PURE__ */ jsxs(
|
|
194
|
-
Button,
|
|
195
|
-
{
|
|
196
|
-
"aria-label": label,
|
|
197
|
-
className: cn(
|
|
198
|
-
variant === "grid" && [
|
|
199
|
-
"absolute top-2 right-2 size-6 rounded-full p-0",
|
|
200
|
-
"bg-background/80 backdrop-blur-sm",
|
|
201
|
-
"opacity-0 transition-opacity group-hover:opacity-100",
|
|
202
|
-
"hover:bg-background",
|
|
203
|
-
"[&>svg]:size-3"
|
|
204
|
-
],
|
|
205
|
-
variant === "inline" && [
|
|
206
|
-
"size-5 rounded p-0",
|
|
207
|
-
"opacity-0 transition-opacity group-hover:opacity-100",
|
|
208
|
-
"[&>svg]:size-2.5"
|
|
209
|
-
],
|
|
210
|
-
variant === "list" && ["size-8 shrink-0 rounded p-0", "[&>svg]:size-4"],
|
|
211
|
-
className
|
|
212
|
-
),
|
|
213
|
-
onClick: handleClick,
|
|
214
|
-
type: "button",
|
|
215
|
-
variant: "ghost",
|
|
216
|
-
...props,
|
|
217
|
-
children: [
|
|
218
|
-
children ?? /* @__PURE__ */ jsx(XIcon, {}),
|
|
219
|
-
/* @__PURE__ */ jsx("span", { className: "sr-only", children: label })
|
|
220
|
-
]
|
|
221
|
-
}
|
|
222
|
-
);
|
|
223
|
-
};
|
|
224
|
-
var AttachmentHoverCard = ({ ...props }) => /* @__PURE__ */ jsx(HoverCard, { ...props });
|
|
225
|
-
var AttachmentHoverCardTrigger = ({
|
|
226
|
-
delay = 0,
|
|
227
|
-
closeDelay = 0,
|
|
228
|
-
...props
|
|
229
|
-
}) => /* @__PURE__ */ jsx(HoverCardTrigger, { delay, closeDelay, ...props });
|
|
230
|
-
var AttachmentHoverCardContent = ({
|
|
231
|
-
align = "start",
|
|
232
|
-
className,
|
|
233
|
-
...props
|
|
234
|
-
}) => /* @__PURE__ */ jsx(
|
|
235
|
-
HoverCardContent,
|
|
236
|
-
{
|
|
237
|
-
align,
|
|
238
|
-
className: cn("w-auto p-2", className),
|
|
239
|
-
...props
|
|
240
|
-
}
|
|
241
|
-
);
|
|
242
|
-
var AttachmentEmpty = ({
|
|
243
|
-
className,
|
|
244
|
-
children,
|
|
245
|
-
...props
|
|
246
|
-
}) => /* @__PURE__ */ jsx(
|
|
247
|
-
"div",
|
|
248
|
-
{
|
|
249
|
-
className: cn(
|
|
250
|
-
"flex items-center justify-center p-4 text-muted-foreground text-sm",
|
|
251
|
-
className
|
|
252
|
-
),
|
|
253
|
-
...props,
|
|
254
|
-
children: children ?? "No attachments"
|
|
255
|
-
}
|
|
256
|
-
);
|
|
257
|
-
|
|
258
|
-
export { Attachment, AttachmentEmpty, AttachmentHoverCard, AttachmentHoverCardContent, AttachmentHoverCardTrigger, AttachmentInfo, AttachmentPreview, AttachmentRemove, Attachments, getAttachmentLabel, getMediaCategory, useAttachmentContext, useAttachmentsContext };
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { Experimental_SpeechResult } from 'ai';
|
|
3
|
-
import { MediaController, MediaControlBar, MediaDurationDisplay, MediaMuteButton, MediaPlayButton, MediaSeekBackwardButton, MediaSeekForwardButton, MediaTimeDisplay, MediaTimeRange, MediaVolumeRange } from 'media-chrome/react';
|
|
4
|
-
import { ComponentProps } from 'react';
|
|
5
|
-
|
|
6
|
-
type AudioPlayerProps = Omit<ComponentProps<typeof MediaController>, "audio">;
|
|
7
|
-
declare const AudioPlayer: ({ children, style, ...props }: AudioPlayerProps) => react_jsx_runtime.JSX.Element;
|
|
8
|
-
type AudioPlayerElementProps = Omit<ComponentProps<"audio">, "src"> & ({
|
|
9
|
-
data: Experimental_SpeechResult["audio"];
|
|
10
|
-
} | {
|
|
11
|
-
src: string;
|
|
12
|
-
});
|
|
13
|
-
declare const AudioPlayerElement: ({ ...props }: AudioPlayerElementProps) => react_jsx_runtime.JSX.Element;
|
|
14
|
-
type AudioPlayerControlBarProps = ComponentProps<typeof MediaControlBar>;
|
|
15
|
-
declare const AudioPlayerControlBar: ({ children, ...props }: AudioPlayerControlBarProps) => react_jsx_runtime.JSX.Element;
|
|
16
|
-
type AudioPlayerPlayButtonProps = ComponentProps<typeof MediaPlayButton>;
|
|
17
|
-
declare const AudioPlayerPlayButton: ({ className, ...props }: AudioPlayerPlayButtonProps) => react_jsx_runtime.JSX.Element;
|
|
18
|
-
type AudioPlayerSeekBackwardButtonProps = ComponentProps<typeof MediaSeekBackwardButton>;
|
|
19
|
-
declare const AudioPlayerSeekBackwardButton: ({ seekOffset, ...props }: AudioPlayerSeekBackwardButtonProps) => react_jsx_runtime.JSX.Element;
|
|
20
|
-
type AudioPlayerSeekForwardButtonProps = ComponentProps<typeof MediaSeekForwardButton>;
|
|
21
|
-
declare const AudioPlayerSeekForwardButton: ({ seekOffset, ...props }: AudioPlayerSeekForwardButtonProps) => react_jsx_runtime.JSX.Element;
|
|
22
|
-
type AudioPlayerTimeDisplayProps = ComponentProps<typeof MediaTimeDisplay>;
|
|
23
|
-
declare const AudioPlayerTimeDisplay: ({ className, ...props }: AudioPlayerTimeDisplayProps) => react_jsx_runtime.JSX.Element;
|
|
24
|
-
type AudioPlayerTimeRangeProps = ComponentProps<typeof MediaTimeRange>;
|
|
25
|
-
declare const AudioPlayerTimeRange: ({ className, ...props }: AudioPlayerTimeRangeProps) => react_jsx_runtime.JSX.Element;
|
|
26
|
-
type AudioPlayerDurationDisplayProps = ComponentProps<typeof MediaDurationDisplay>;
|
|
27
|
-
declare const AudioPlayerDurationDisplay: ({ className, ...props }: AudioPlayerDurationDisplayProps) => react_jsx_runtime.JSX.Element;
|
|
28
|
-
type AudioPlayerMuteButtonProps = ComponentProps<typeof MediaMuteButton>;
|
|
29
|
-
declare const AudioPlayerMuteButton: ({ className, ...props }: AudioPlayerMuteButtonProps) => react_jsx_runtime.JSX.Element;
|
|
30
|
-
type AudioPlayerVolumeRangeProps = ComponentProps<typeof MediaVolumeRange>;
|
|
31
|
-
declare const AudioPlayerVolumeRange: ({ className, ...props }: AudioPlayerVolumeRangeProps) => react_jsx_runtime.JSX.Element;
|
|
32
|
-
|
|
33
|
-
export { AudioPlayer, AudioPlayerControlBar, type AudioPlayerControlBarProps, AudioPlayerDurationDisplay, type AudioPlayerDurationDisplayProps, AudioPlayerElement, type AudioPlayerElementProps, AudioPlayerMuteButton, type AudioPlayerMuteButtonProps, AudioPlayerPlayButton, type AudioPlayerPlayButtonProps, type AudioPlayerProps, AudioPlayerSeekBackwardButton, type AudioPlayerSeekBackwardButtonProps, AudioPlayerSeekForwardButton, type AudioPlayerSeekForwardButtonProps, AudioPlayerTimeDisplay, type AudioPlayerTimeDisplayProps, AudioPlayerTimeRange, type AudioPlayerTimeRangeProps, AudioPlayerVolumeRange, type AudioPlayerVolumeRangeProps };
|
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
import { Button } from '@chatsdk-dev/ui/components/button';
|
|
2
|
-
import { ButtonGroup, ButtonGroupText } from '@chatsdk-dev/ui/components/button-group';
|
|
3
|
-
import { cn } from '@chatsdk-dev/ui/lib/utils';
|
|
4
|
-
import { MediaController, MediaControlBar, MediaPlayButton, MediaSeekBackwardButton, MediaSeekForwardButton, MediaTimeDisplay, MediaTimeRange, MediaDurationDisplay, MediaMuteButton, MediaVolumeRange } from 'media-chrome/react';
|
|
5
|
-
import { jsx } from 'react/jsx-runtime';
|
|
6
|
-
|
|
7
|
-
var AudioPlayer = ({
|
|
8
|
-
children,
|
|
9
|
-
style,
|
|
10
|
-
...props
|
|
11
|
-
}) => /* @__PURE__ */ jsx(
|
|
12
|
-
MediaController,
|
|
13
|
-
{
|
|
14
|
-
audio: true,
|
|
15
|
-
"data-slot": "audio-player",
|
|
16
|
-
style: {
|
|
17
|
-
"--media-background-color": "transparent",
|
|
18
|
-
"--media-button-icon-height": "1rem",
|
|
19
|
-
"--media-button-icon-width": "1rem",
|
|
20
|
-
"--media-control-background": "transparent",
|
|
21
|
-
"--media-control-hover-background": "var(--color-accent)",
|
|
22
|
-
"--media-control-padding": "0",
|
|
23
|
-
"--media-font": "var(--font-sans)",
|
|
24
|
-
"--media-font-size": "10px",
|
|
25
|
-
"--media-icon-color": "currentColor",
|
|
26
|
-
"--media-preview-time-background": "var(--color-background)",
|
|
27
|
-
"--media-preview-time-border-radius": "var(--radius-md)",
|
|
28
|
-
"--media-preview-time-text-shadow": "none",
|
|
29
|
-
"--media-primary-color": "var(--color-primary)",
|
|
30
|
-
"--media-range-bar-color": "var(--color-primary)",
|
|
31
|
-
"--media-range-track-background": "var(--color-secondary)",
|
|
32
|
-
"--media-secondary-color": "var(--color-secondary)",
|
|
33
|
-
"--media-text-color": "var(--color-foreground)",
|
|
34
|
-
"--media-tooltip-arrow-display": "none",
|
|
35
|
-
"--media-tooltip-background": "var(--color-background)",
|
|
36
|
-
"--media-tooltip-border-radius": "var(--radius-md)",
|
|
37
|
-
...style
|
|
38
|
-
},
|
|
39
|
-
...props,
|
|
40
|
-
children
|
|
41
|
-
}
|
|
42
|
-
);
|
|
43
|
-
var AudioPlayerElement = ({ ...props }) => (
|
|
44
|
-
// oxlint-disable-next-line eslint-plugin-jsx-a11y(media-has-caption) -- audio player captions are provided by consumer
|
|
45
|
-
/* @__PURE__ */ jsx(
|
|
46
|
-
"audio",
|
|
47
|
-
{
|
|
48
|
-
"data-slot": "audio-player-element",
|
|
49
|
-
slot: "media",
|
|
50
|
-
src: "src" in props ? props.src : `data:${props.data.mediaType};base64,${props.data.base64}`,
|
|
51
|
-
...props
|
|
52
|
-
}
|
|
53
|
-
)
|
|
54
|
-
);
|
|
55
|
-
var AudioPlayerControlBar = ({
|
|
56
|
-
children,
|
|
57
|
-
...props
|
|
58
|
-
}) => /* @__PURE__ */ jsx(MediaControlBar, { "data-slot": "audio-player-control-bar", ...props, children: /* @__PURE__ */ jsx(ButtonGroup, { orientation: "horizontal", children }) });
|
|
59
|
-
var AudioPlayerPlayButton = ({
|
|
60
|
-
className,
|
|
61
|
-
...props
|
|
62
|
-
}) => /* @__PURE__ */ jsx(
|
|
63
|
-
Button,
|
|
64
|
-
{
|
|
65
|
-
size: "icon",
|
|
66
|
-
variant: "outline",
|
|
67
|
-
render: () => /* @__PURE__ */ jsx(
|
|
68
|
-
MediaPlayButton,
|
|
69
|
-
{
|
|
70
|
-
className: cn("bg-transparent", className),
|
|
71
|
-
"data-slot": "audio-player-play-button",
|
|
72
|
-
...props
|
|
73
|
-
}
|
|
74
|
-
)
|
|
75
|
-
}
|
|
76
|
-
);
|
|
77
|
-
var AudioPlayerSeekBackwardButton = ({
|
|
78
|
-
seekOffset = 10,
|
|
79
|
-
...props
|
|
80
|
-
}) => /* @__PURE__ */ jsx(
|
|
81
|
-
Button,
|
|
82
|
-
{
|
|
83
|
-
size: "icon",
|
|
84
|
-
variant: "outline",
|
|
85
|
-
render: () => /* @__PURE__ */ jsx(
|
|
86
|
-
MediaSeekBackwardButton,
|
|
87
|
-
{
|
|
88
|
-
"data-slot": "audio-player-seek-backward-button",
|
|
89
|
-
seekOffset,
|
|
90
|
-
...props
|
|
91
|
-
}
|
|
92
|
-
)
|
|
93
|
-
}
|
|
94
|
-
);
|
|
95
|
-
var AudioPlayerSeekForwardButton = ({
|
|
96
|
-
seekOffset = 10,
|
|
97
|
-
...props
|
|
98
|
-
}) => /* @__PURE__ */ jsx(
|
|
99
|
-
Button,
|
|
100
|
-
{
|
|
101
|
-
size: "icon",
|
|
102
|
-
variant: "outline",
|
|
103
|
-
render: () => /* @__PURE__ */ jsx(
|
|
104
|
-
MediaSeekForwardButton,
|
|
105
|
-
{
|
|
106
|
-
"data-slot": "audio-player-seek-forward-button",
|
|
107
|
-
seekOffset,
|
|
108
|
-
...props
|
|
109
|
-
}
|
|
110
|
-
)
|
|
111
|
-
}
|
|
112
|
-
);
|
|
113
|
-
var AudioPlayerTimeDisplay = ({
|
|
114
|
-
className,
|
|
115
|
-
...props
|
|
116
|
-
}) => /* @__PURE__ */ jsx(
|
|
117
|
-
ButtonGroupText,
|
|
118
|
-
{
|
|
119
|
-
className: "bg-transparent",
|
|
120
|
-
render: () => /* @__PURE__ */ jsx(
|
|
121
|
-
MediaTimeDisplay,
|
|
122
|
-
{
|
|
123
|
-
className: cn("tabular-nums", className),
|
|
124
|
-
"data-slot": "audio-player-time-display",
|
|
125
|
-
...props
|
|
126
|
-
}
|
|
127
|
-
)
|
|
128
|
-
}
|
|
129
|
-
);
|
|
130
|
-
var AudioPlayerTimeRange = ({
|
|
131
|
-
className,
|
|
132
|
-
...props
|
|
133
|
-
}) => /* @__PURE__ */ jsx(
|
|
134
|
-
ButtonGroupText,
|
|
135
|
-
{
|
|
136
|
-
className: "bg-transparent",
|
|
137
|
-
render: () => /* @__PURE__ */ jsx(
|
|
138
|
-
MediaTimeRange,
|
|
139
|
-
{
|
|
140
|
-
className: cn("", className),
|
|
141
|
-
"data-slot": "audio-player-time-range",
|
|
142
|
-
...props
|
|
143
|
-
}
|
|
144
|
-
)
|
|
145
|
-
}
|
|
146
|
-
);
|
|
147
|
-
var AudioPlayerDurationDisplay = ({
|
|
148
|
-
className,
|
|
149
|
-
...props
|
|
150
|
-
}) => /* @__PURE__ */ jsx(
|
|
151
|
-
ButtonGroupText,
|
|
152
|
-
{
|
|
153
|
-
className: "bg-transparent",
|
|
154
|
-
render: () => /* @__PURE__ */ jsx(
|
|
155
|
-
MediaDurationDisplay,
|
|
156
|
-
{
|
|
157
|
-
className: cn("tabular-nums", className),
|
|
158
|
-
"data-slot": "audio-player-duration-display",
|
|
159
|
-
...props
|
|
160
|
-
}
|
|
161
|
-
)
|
|
162
|
-
}
|
|
163
|
-
);
|
|
164
|
-
var AudioPlayerMuteButton = ({
|
|
165
|
-
className,
|
|
166
|
-
...props
|
|
167
|
-
}) => /* @__PURE__ */ jsx(
|
|
168
|
-
ButtonGroupText,
|
|
169
|
-
{
|
|
170
|
-
className: "bg-transparent",
|
|
171
|
-
render: () => /* @__PURE__ */ jsx(
|
|
172
|
-
MediaMuteButton,
|
|
173
|
-
{
|
|
174
|
-
className: cn("", className),
|
|
175
|
-
"data-slot": "audio-player-mute-button",
|
|
176
|
-
...props
|
|
177
|
-
}
|
|
178
|
-
)
|
|
179
|
-
}
|
|
180
|
-
);
|
|
181
|
-
var AudioPlayerVolumeRange = ({
|
|
182
|
-
className,
|
|
183
|
-
...props
|
|
184
|
-
}) => /* @__PURE__ */ jsx(
|
|
185
|
-
ButtonGroupText,
|
|
186
|
-
{
|
|
187
|
-
className: "bg-transparent",
|
|
188
|
-
render: () => /* @__PURE__ */ jsx(
|
|
189
|
-
MediaVolumeRange,
|
|
190
|
-
{
|
|
191
|
-
className: cn("", className),
|
|
192
|
-
"data-slot": "audio-player-volume-range",
|
|
193
|
-
...props
|
|
194
|
-
}
|
|
195
|
-
)
|
|
196
|
-
}
|
|
197
|
-
);
|
|
198
|
-
|
|
199
|
-
export { AudioPlayer, AudioPlayerControlBar, AudioPlayerDurationDisplay, AudioPlayerElement, AudioPlayerMuteButton, AudioPlayerPlayButton, AudioPlayerSeekBackwardButton, AudioPlayerSeekForwardButton, AudioPlayerTimeDisplay, AudioPlayerTimeRange, AudioPlayerVolumeRange };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { ReactFlowProps } from '@xyflow/react';
|
|
3
|
-
import { ReactNode } from 'react';
|
|
4
|
-
|
|
5
|
-
type CanvasProps = ReactFlowProps & {
|
|
6
|
-
children?: ReactNode;
|
|
7
|
-
};
|
|
8
|
-
declare const Canvas: ({ children, ...props }: CanvasProps) => react_jsx_runtime.JSX.Element;
|
|
9
|
-
|
|
10
|
-
export { Canvas };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { ReactFlow, Background } from '@xyflow/react';
|
|
2
|
-
import '@xyflow/react/dist/style.css';
|
|
3
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
4
|
-
|
|
5
|
-
// src/components/ai-elements/canvas.tsx
|
|
6
|
-
var deleteKeyCode = ["Backspace", "Delete"];
|
|
7
|
-
var Canvas = ({ children, ...props }) => /* @__PURE__ */ jsxs(
|
|
8
|
-
ReactFlow,
|
|
9
|
-
{
|
|
10
|
-
deleteKeyCode,
|
|
11
|
-
fitView: true,
|
|
12
|
-
panOnDrag: false,
|
|
13
|
-
panOnScroll: true,
|
|
14
|
-
selectionOnDrag: true,
|
|
15
|
-
zoomOnDoubleClick: false,
|
|
16
|
-
...props,
|
|
17
|
-
children: [
|
|
18
|
-
/* @__PURE__ */ jsx(Background, { bgColor: "var(--sidebar)" }),
|
|
19
|
-
children
|
|
20
|
-
]
|
|
21
|
-
}
|
|
22
|
-
);
|
|
23
|
-
|
|
24
|
-
export { Canvas };
|
|
@@ -1,34 +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 { Badge } from '@chatsdk-dev/ui/components/badge';
|
|
5
|
-
import { CollapsibleContent, CollapsibleTrigger } from '@chatsdk-dev/ui/components/collapsible';
|
|
6
|
-
import { LucideIcon } from 'lucide-react';
|
|
7
|
-
|
|
8
|
-
type ChainOfThoughtProps = ComponentProps<"div"> & {
|
|
9
|
-
open?: boolean;
|
|
10
|
-
defaultOpen?: boolean;
|
|
11
|
-
onOpenChange?: (open: boolean) => void;
|
|
12
|
-
};
|
|
13
|
-
declare const ChainOfThought: react.MemoExoticComponent<({ className, open, defaultOpen, onOpenChange, children, ...props }: ChainOfThoughtProps) => react_jsx_runtime.JSX.Element>;
|
|
14
|
-
type ChainOfThoughtHeaderProps = ComponentProps<typeof CollapsibleTrigger>;
|
|
15
|
-
declare const ChainOfThoughtHeader: react.MemoExoticComponent<({ className, children, ...props }: ChainOfThoughtHeaderProps) => react_jsx_runtime.JSX.Element>;
|
|
16
|
-
type ChainOfThoughtStepProps = ComponentProps<"div"> & {
|
|
17
|
-
icon?: LucideIcon;
|
|
18
|
-
label: ReactNode;
|
|
19
|
-
description?: ReactNode;
|
|
20
|
-
status?: "complete" | "active" | "pending";
|
|
21
|
-
};
|
|
22
|
-
declare const ChainOfThoughtStep: react.MemoExoticComponent<({ className, icon: Icon, label, description, status, children, ...props }: ChainOfThoughtStepProps) => react_jsx_runtime.JSX.Element>;
|
|
23
|
-
type ChainOfThoughtSearchResultsProps = ComponentProps<"div">;
|
|
24
|
-
declare const ChainOfThoughtSearchResults: react.MemoExoticComponent<({ className, ...props }: ChainOfThoughtSearchResultsProps) => react_jsx_runtime.JSX.Element>;
|
|
25
|
-
type ChainOfThoughtSearchResultProps = ComponentProps<typeof Badge>;
|
|
26
|
-
declare const ChainOfThoughtSearchResult: react.MemoExoticComponent<({ className, children, ...props }: ChainOfThoughtSearchResultProps) => react_jsx_runtime.JSX.Element>;
|
|
27
|
-
type ChainOfThoughtContentProps = ComponentProps<typeof CollapsibleContent>;
|
|
28
|
-
declare const ChainOfThoughtContent: react.MemoExoticComponent<({ className, children, ...props }: ChainOfThoughtContentProps) => react_jsx_runtime.JSX.Element>;
|
|
29
|
-
type ChainOfThoughtImageProps = ComponentProps<"div"> & {
|
|
30
|
-
caption?: string;
|
|
31
|
-
};
|
|
32
|
-
declare const ChainOfThoughtImage: react.MemoExoticComponent<({ className, children, caption, ...props }: ChainOfThoughtImageProps) => react_jsx_runtime.JSX.Element>;
|
|
33
|
-
|
|
34
|
-
export { ChainOfThought, ChainOfThoughtContent, type ChainOfThoughtContentProps, ChainOfThoughtHeader, type ChainOfThoughtHeaderProps, ChainOfThoughtImage, type ChainOfThoughtImageProps, type ChainOfThoughtProps, ChainOfThoughtSearchResult, type ChainOfThoughtSearchResultProps, ChainOfThoughtSearchResults, type ChainOfThoughtSearchResultsProps, ChainOfThoughtStep, type ChainOfThoughtStepProps };
|