@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,212 +0,0 @@
|
|
|
1
|
-
import { Collapsible, CollapsibleTrigger, CollapsibleContent } from '@chatsdk-dev/ui/components/collapsible';
|
|
2
|
-
import { cn } from '@chatsdk-dev/ui/lib/utils';
|
|
3
|
-
import { ChevronRightIcon, FolderOpenIcon, FolderIcon, FileIcon } from 'lucide-react';
|
|
4
|
-
import { createContext, useState, useCallback, useMemo, useContext } from 'react';
|
|
5
|
-
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
6
|
-
|
|
7
|
-
var noop = () => {
|
|
8
|
-
};
|
|
9
|
-
var FileTreeContext = createContext({
|
|
10
|
-
// oxlint-disable-next-line eslint-plugin-unicorn(no-new-builtin)
|
|
11
|
-
expandedPaths: /* @__PURE__ */ new Set(),
|
|
12
|
-
togglePath: noop
|
|
13
|
-
});
|
|
14
|
-
var FileTree = ({
|
|
15
|
-
expanded: controlledExpanded,
|
|
16
|
-
defaultExpanded = /* @__PURE__ */ new Set(),
|
|
17
|
-
selectedPath,
|
|
18
|
-
onSelect,
|
|
19
|
-
onExpandedChange,
|
|
20
|
-
className,
|
|
21
|
-
children,
|
|
22
|
-
...props
|
|
23
|
-
}) => {
|
|
24
|
-
const [internalExpanded, setInternalExpanded] = useState(defaultExpanded);
|
|
25
|
-
const expandedPaths = controlledExpanded ?? internalExpanded;
|
|
26
|
-
const togglePath = useCallback(
|
|
27
|
-
(path) => {
|
|
28
|
-
const newExpanded = new Set(expandedPaths);
|
|
29
|
-
if (newExpanded.has(path)) {
|
|
30
|
-
newExpanded.delete(path);
|
|
31
|
-
} else {
|
|
32
|
-
newExpanded.add(path);
|
|
33
|
-
}
|
|
34
|
-
setInternalExpanded(newExpanded);
|
|
35
|
-
onExpandedChange?.(newExpanded);
|
|
36
|
-
},
|
|
37
|
-
[expandedPaths, onExpandedChange]
|
|
38
|
-
);
|
|
39
|
-
const contextValue = useMemo(
|
|
40
|
-
() => ({ expandedPaths, onSelect, selectedPath, togglePath }),
|
|
41
|
-
[expandedPaths, onSelect, selectedPath, togglePath]
|
|
42
|
-
);
|
|
43
|
-
return /* @__PURE__ */ jsx(FileTreeContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(
|
|
44
|
-
"div",
|
|
45
|
-
{
|
|
46
|
-
className: cn(
|
|
47
|
-
"rounded-lg border bg-background font-mono text-sm",
|
|
48
|
-
className
|
|
49
|
-
),
|
|
50
|
-
role: "tree",
|
|
51
|
-
...props,
|
|
52
|
-
children: /* @__PURE__ */ jsx("div", { className: "p-2", children })
|
|
53
|
-
}
|
|
54
|
-
) });
|
|
55
|
-
};
|
|
56
|
-
var FileTreeIcon = ({
|
|
57
|
-
className,
|
|
58
|
-
children,
|
|
59
|
-
...props
|
|
60
|
-
}) => /* @__PURE__ */ jsx("span", { className: cn("shrink-0", className), ...props, children });
|
|
61
|
-
var FileTreeName = ({
|
|
62
|
-
className,
|
|
63
|
-
children,
|
|
64
|
-
...props
|
|
65
|
-
}) => /* @__PURE__ */ jsx("span", { className: cn("truncate", className), ...props, children });
|
|
66
|
-
var FileTreeFolderContext = createContext({
|
|
67
|
-
isExpanded: false,
|
|
68
|
-
name: "",
|
|
69
|
-
path: ""
|
|
70
|
-
});
|
|
71
|
-
var FileTreeFolder = ({
|
|
72
|
-
path,
|
|
73
|
-
name,
|
|
74
|
-
className,
|
|
75
|
-
children,
|
|
76
|
-
...props
|
|
77
|
-
}) => {
|
|
78
|
-
const { expandedPaths, togglePath, selectedPath, onSelect } = useContext(FileTreeContext);
|
|
79
|
-
const isExpanded = expandedPaths.has(path);
|
|
80
|
-
const isSelected = selectedPath === path;
|
|
81
|
-
const handleOpenChange = useCallback(() => {
|
|
82
|
-
togglePath(path);
|
|
83
|
-
}, [togglePath, path]);
|
|
84
|
-
const handleSelect = useCallback(() => {
|
|
85
|
-
onSelect?.(path);
|
|
86
|
-
}, [onSelect, path]);
|
|
87
|
-
const folderContextValue = useMemo(
|
|
88
|
-
() => ({ isExpanded, name, path }),
|
|
89
|
-
[isExpanded, name, path]
|
|
90
|
-
);
|
|
91
|
-
return /* @__PURE__ */ jsx(FileTreeFolderContext.Provider, { value: folderContextValue, children: /* @__PURE__ */ jsx(Collapsible, { onOpenChange: handleOpenChange, open: isExpanded, children: /* @__PURE__ */ jsxs(
|
|
92
|
-
"div",
|
|
93
|
-
{
|
|
94
|
-
className: cn("", className),
|
|
95
|
-
role: "treeitem",
|
|
96
|
-
tabIndex: 0,
|
|
97
|
-
...props,
|
|
98
|
-
children: [
|
|
99
|
-
/* @__PURE__ */ jsxs(
|
|
100
|
-
"div",
|
|
101
|
-
{
|
|
102
|
-
className: cn(
|
|
103
|
-
"flex w-full items-center gap-1 rounded px-2 py-1 text-left transition-colors hover:bg-muted/50",
|
|
104
|
-
isSelected && "bg-muted"
|
|
105
|
-
),
|
|
106
|
-
children: [
|
|
107
|
-
/* @__PURE__ */ jsx(
|
|
108
|
-
CollapsibleTrigger,
|
|
109
|
-
{
|
|
110
|
-
render: () => /* @__PURE__ */ jsx(
|
|
111
|
-
"button",
|
|
112
|
-
{
|
|
113
|
-
className: "flex shrink-0 cursor-pointer items-center border-none bg-transparent p-0",
|
|
114
|
-
type: "button",
|
|
115
|
-
children: /* @__PURE__ */ jsx(
|
|
116
|
-
ChevronRightIcon,
|
|
117
|
-
{
|
|
118
|
-
className: cn(
|
|
119
|
-
"size-4 shrink-0 text-muted-foreground transition-transform",
|
|
120
|
-
isExpanded && "rotate-90"
|
|
121
|
-
)
|
|
122
|
-
}
|
|
123
|
-
)
|
|
124
|
-
}
|
|
125
|
-
)
|
|
126
|
-
}
|
|
127
|
-
),
|
|
128
|
-
/* @__PURE__ */ jsxs(
|
|
129
|
-
"button",
|
|
130
|
-
{
|
|
131
|
-
className: "flex min-w-0 flex-1 cursor-pointer items-center gap-1 border-none bg-transparent p-0 text-left",
|
|
132
|
-
onClick: handleSelect,
|
|
133
|
-
type: "button",
|
|
134
|
-
children: [
|
|
135
|
-
/* @__PURE__ */ jsx(FileTreeIcon, { children: isExpanded ? /* @__PURE__ */ jsx(FolderOpenIcon, { className: "size-4 text-blue-500" }) : /* @__PURE__ */ jsx(FolderIcon, { className: "size-4 text-blue-500" }) }),
|
|
136
|
-
/* @__PURE__ */ jsx(FileTreeName, { children: name })
|
|
137
|
-
]
|
|
138
|
-
}
|
|
139
|
-
)
|
|
140
|
-
]
|
|
141
|
-
}
|
|
142
|
-
),
|
|
143
|
-
/* @__PURE__ */ jsx(CollapsibleContent, { children: /* @__PURE__ */ jsx("div", { className: "ml-4 border-l pl-2", children }) })
|
|
144
|
-
]
|
|
145
|
-
}
|
|
146
|
-
) }) });
|
|
147
|
-
};
|
|
148
|
-
var FileTreeFileContext = createContext({
|
|
149
|
-
name: "",
|
|
150
|
-
path: ""
|
|
151
|
-
});
|
|
152
|
-
var FileTreeFile = ({
|
|
153
|
-
path,
|
|
154
|
-
name,
|
|
155
|
-
icon,
|
|
156
|
-
className,
|
|
157
|
-
children,
|
|
158
|
-
...props
|
|
159
|
-
}) => {
|
|
160
|
-
const { selectedPath, onSelect } = useContext(FileTreeContext);
|
|
161
|
-
const isSelected = selectedPath === path;
|
|
162
|
-
const handleClick = useCallback(() => {
|
|
163
|
-
onSelect?.(path);
|
|
164
|
-
}, [onSelect, path]);
|
|
165
|
-
const handleKeyDown = useCallback(
|
|
166
|
-
(e) => {
|
|
167
|
-
if (e.key === "Enter" || e.key === " ") {
|
|
168
|
-
onSelect?.(path);
|
|
169
|
-
}
|
|
170
|
-
},
|
|
171
|
-
[onSelect, path]
|
|
172
|
-
);
|
|
173
|
-
const fileContextValue = useMemo(() => ({ name, path }), [name, path]);
|
|
174
|
-
return /* @__PURE__ */ jsx(FileTreeFileContext.Provider, { value: fileContextValue, children: /* @__PURE__ */ jsx(
|
|
175
|
-
"div",
|
|
176
|
-
{
|
|
177
|
-
className: cn(
|
|
178
|
-
"flex cursor-pointer items-center gap-1 rounded px-2 py-1 transition-colors hover:bg-muted/50",
|
|
179
|
-
isSelected && "bg-muted",
|
|
180
|
-
className
|
|
181
|
-
),
|
|
182
|
-
onClick: handleClick,
|
|
183
|
-
onKeyDown: handleKeyDown,
|
|
184
|
-
role: "treeitem",
|
|
185
|
-
tabIndex: 0,
|
|
186
|
-
...props,
|
|
187
|
-
children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
188
|
-
/* @__PURE__ */ jsx("span", { className: "size-4 shrink-0" }),
|
|
189
|
-
/* @__PURE__ */ jsx(FileTreeIcon, { children: icon ?? /* @__PURE__ */ jsx(FileIcon, { className: "size-4 text-muted-foreground" }) }),
|
|
190
|
-
/* @__PURE__ */ jsx(FileTreeName, { children: name })
|
|
191
|
-
] })
|
|
192
|
-
}
|
|
193
|
-
) });
|
|
194
|
-
};
|
|
195
|
-
var stopPropagation = (e) => e.stopPropagation();
|
|
196
|
-
var FileTreeActions = ({
|
|
197
|
-
className,
|
|
198
|
-
children,
|
|
199
|
-
...props
|
|
200
|
-
}) => /* @__PURE__ */ jsx(
|
|
201
|
-
"div",
|
|
202
|
-
{
|
|
203
|
-
className: cn("ml-auto flex items-center gap-1", className),
|
|
204
|
-
onClick: stopPropagation,
|
|
205
|
-
onKeyDown: stopPropagation,
|
|
206
|
-
role: "group",
|
|
207
|
-
...props,
|
|
208
|
-
children
|
|
209
|
-
}
|
|
210
|
-
);
|
|
211
|
-
|
|
212
|
-
export { FileTree, FileTreeActions, FileTreeFile, FileTreeFolder, FileTreeIcon, FileTreeName };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { Experimental_GeneratedImage } from 'ai';
|
|
3
|
-
|
|
4
|
-
type ImageProps = Experimental_GeneratedImage & {
|
|
5
|
-
className?: string;
|
|
6
|
-
alt?: string;
|
|
7
|
-
};
|
|
8
|
-
declare const Image: ({ base64, uint8Array: _uint8Array, mediaType, ...props }: ImageProps) => react_jsx_runtime.JSX.Element;
|
|
9
|
-
|
|
10
|
-
export { Image, type ImageProps };
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { cn } from '@chatsdk-dev/ui/lib/utils';
|
|
2
|
-
import { jsx } from 'react/jsx-runtime';
|
|
3
|
-
|
|
4
|
-
// src/components/ai-elements/image.tsx
|
|
5
|
-
var Image = ({
|
|
6
|
-
base64,
|
|
7
|
-
uint8Array: _uint8Array,
|
|
8
|
-
mediaType,
|
|
9
|
-
...props
|
|
10
|
-
}) => /* @__PURE__ */ jsx(
|
|
11
|
-
"img",
|
|
12
|
-
{
|
|
13
|
-
...props,
|
|
14
|
-
alt: props.alt,
|
|
15
|
-
className: cn(
|
|
16
|
-
"h-auto max-w-full overflow-hidden rounded-md",
|
|
17
|
-
props.className
|
|
18
|
-
),
|
|
19
|
-
src: `data:${mediaType};base64,${base64}`
|
|
20
|
-
}
|
|
21
|
-
);
|
|
22
|
-
|
|
23
|
-
export { Image };
|
|
@@ -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 { Carousel } from '@chatsdk-dev/ui/components/carousel';
|
|
4
|
-
import { HoverCard } from '@chatsdk-dev/ui/components/hover-card';
|
|
5
|
-
import { ComponentProps } from 'react';
|
|
6
|
-
|
|
7
|
-
type InlineCitationProps = ComponentProps<"span">;
|
|
8
|
-
declare const InlineCitation: ({ className, ...props }: InlineCitationProps) => react_jsx_runtime.JSX.Element;
|
|
9
|
-
type InlineCitationTextProps = ComponentProps<"span">;
|
|
10
|
-
declare const InlineCitationText: ({ className, ...props }: InlineCitationTextProps) => react_jsx_runtime.JSX.Element;
|
|
11
|
-
type InlineCitationCardProps = ComponentProps<typeof HoverCard>;
|
|
12
|
-
declare const InlineCitationCard: (props: InlineCitationCardProps) => react_jsx_runtime.JSX.Element;
|
|
13
|
-
type InlineCitationCardTriggerProps = ComponentProps<typeof Badge> & {
|
|
14
|
-
sources: string[];
|
|
15
|
-
};
|
|
16
|
-
declare const InlineCitationCardTrigger: ({ sources, className, ...props }: InlineCitationCardTriggerProps) => react_jsx_runtime.JSX.Element;
|
|
17
|
-
type InlineCitationCardBodyProps = ComponentProps<"div">;
|
|
18
|
-
declare const InlineCitationCardBody: ({ className, ...props }: InlineCitationCardBodyProps) => react_jsx_runtime.JSX.Element;
|
|
19
|
-
type InlineCitationCarouselProps = ComponentProps<typeof Carousel>;
|
|
20
|
-
declare const InlineCitationCarousel: ({ className, children, ...props }: InlineCitationCarouselProps) => react_jsx_runtime.JSX.Element;
|
|
21
|
-
type InlineCitationCarouselContentProps = ComponentProps<"div">;
|
|
22
|
-
declare const InlineCitationCarouselContent: (props: InlineCitationCarouselContentProps) => react_jsx_runtime.JSX.Element;
|
|
23
|
-
type InlineCitationCarouselItemProps = ComponentProps<"div">;
|
|
24
|
-
declare const InlineCitationCarouselItem: ({ className, ...props }: InlineCitationCarouselItemProps) => react_jsx_runtime.JSX.Element;
|
|
25
|
-
type InlineCitationCarouselHeaderProps = ComponentProps<"div">;
|
|
26
|
-
declare const InlineCitationCarouselHeader: ({ className, ...props }: InlineCitationCarouselHeaderProps) => react_jsx_runtime.JSX.Element;
|
|
27
|
-
type InlineCitationCarouselIndexProps = ComponentProps<"div">;
|
|
28
|
-
declare const InlineCitationCarouselIndex: ({ children, className, ...props }: InlineCitationCarouselIndexProps) => react_jsx_runtime.JSX.Element;
|
|
29
|
-
type InlineCitationCarouselPrevProps = ComponentProps<"button">;
|
|
30
|
-
declare const InlineCitationCarouselPrev: ({ className, ...props }: InlineCitationCarouselPrevProps) => react_jsx_runtime.JSX.Element;
|
|
31
|
-
type InlineCitationCarouselNextProps = ComponentProps<"button">;
|
|
32
|
-
declare const InlineCitationCarouselNext: ({ className, ...props }: InlineCitationCarouselNextProps) => react_jsx_runtime.JSX.Element;
|
|
33
|
-
type InlineCitationSourceProps = ComponentProps<"div"> & {
|
|
34
|
-
title?: string;
|
|
35
|
-
url?: string;
|
|
36
|
-
description?: string;
|
|
37
|
-
};
|
|
38
|
-
declare const InlineCitationSource: ({ title, url, description, className, children, ...props }: InlineCitationSourceProps) => react_jsx_runtime.JSX.Element;
|
|
39
|
-
type InlineCitationQuoteProps = ComponentProps<"blockquote">;
|
|
40
|
-
declare const InlineCitationQuote: ({ children, className, ...props }: InlineCitationQuoteProps) => react_jsx_runtime.JSX.Element;
|
|
41
|
-
|
|
42
|
-
export { InlineCitation, InlineCitationCard, InlineCitationCardBody, type InlineCitationCardBodyProps, type InlineCitationCardProps, InlineCitationCardTrigger, type InlineCitationCardTriggerProps, InlineCitationCarousel, InlineCitationCarouselContent, type InlineCitationCarouselContentProps, InlineCitationCarouselHeader, type InlineCitationCarouselHeaderProps, InlineCitationCarouselIndex, type InlineCitationCarouselIndexProps, InlineCitationCarouselItem, type InlineCitationCarouselItemProps, InlineCitationCarouselNext, type InlineCitationCarouselNextProps, InlineCitationCarouselPrev, type InlineCitationCarouselPrevProps, type InlineCitationCarouselProps, type InlineCitationProps, InlineCitationQuote, type InlineCitationQuoteProps, InlineCitationSource, type InlineCitationSourceProps, InlineCitationText, type InlineCitationTextProps };
|
|
@@ -1,203 +0,0 @@
|
|
|
1
|
-
import { Badge } from '@chatsdk-dev/ui/components/badge';
|
|
2
|
-
import { Carousel, CarouselContent, CarouselItem } from '@chatsdk-dev/ui/components/carousel';
|
|
3
|
-
import { HoverCard, HoverCardTrigger, HoverCardContent } from '@chatsdk-dev/ui/components/hover-card';
|
|
4
|
-
import { cn } from '@chatsdk-dev/ui/lib/utils';
|
|
5
|
-
import { ArrowLeftIcon, ArrowRightIcon } from 'lucide-react';
|
|
6
|
-
import { createContext, useState, useCallback, useEffect, useContext } from 'react';
|
|
7
|
-
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
8
|
-
|
|
9
|
-
var InlineCitation = ({
|
|
10
|
-
className,
|
|
11
|
-
...props
|
|
12
|
-
}) => /* @__PURE__ */ jsx(
|
|
13
|
-
"span",
|
|
14
|
-
{
|
|
15
|
-
className: cn("group inline items-center gap-1", className),
|
|
16
|
-
...props
|
|
17
|
-
}
|
|
18
|
-
);
|
|
19
|
-
var InlineCitationText = ({
|
|
20
|
-
className,
|
|
21
|
-
...props
|
|
22
|
-
}) => /* @__PURE__ */ jsx(
|
|
23
|
-
"span",
|
|
24
|
-
{
|
|
25
|
-
className: cn("transition-colors group-hover:bg-accent", className),
|
|
26
|
-
...props
|
|
27
|
-
}
|
|
28
|
-
);
|
|
29
|
-
var InlineCitationCard = (props) => /* @__PURE__ */ jsx(HoverCard, { ...props });
|
|
30
|
-
var InlineCitationCardTrigger = ({
|
|
31
|
-
sources,
|
|
32
|
-
className,
|
|
33
|
-
...props
|
|
34
|
-
}) => /* @__PURE__ */ jsx(
|
|
35
|
-
HoverCardTrigger,
|
|
36
|
-
{
|
|
37
|
-
render: () => /* @__PURE__ */ jsx(
|
|
38
|
-
Badge,
|
|
39
|
-
{
|
|
40
|
-
className: cn("ml-1 rounded-full", className),
|
|
41
|
-
variant: "secondary",
|
|
42
|
-
...props,
|
|
43
|
-
children: sources[0] ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
44
|
-
new URL(sources[0]).hostname,
|
|
45
|
-
" ",
|
|
46
|
-
sources.length > 1 && `+${sources.length - 1}`
|
|
47
|
-
] }) : "unknown"
|
|
48
|
-
}
|
|
49
|
-
)
|
|
50
|
-
}
|
|
51
|
-
);
|
|
52
|
-
var InlineCitationCardBody = ({
|
|
53
|
-
className,
|
|
54
|
-
...props
|
|
55
|
-
}) => /* @__PURE__ */ jsx(HoverCardContent, { className: cn("relative w-80 p-0", className), ...props });
|
|
56
|
-
var CarouselApiContext = createContext(void 0);
|
|
57
|
-
var useCarouselApi = () => {
|
|
58
|
-
const context = useContext(CarouselApiContext);
|
|
59
|
-
return context;
|
|
60
|
-
};
|
|
61
|
-
var InlineCitationCarousel = ({
|
|
62
|
-
className,
|
|
63
|
-
children,
|
|
64
|
-
...props
|
|
65
|
-
}) => {
|
|
66
|
-
const [api, setApi] = useState();
|
|
67
|
-
return /* @__PURE__ */ jsx(CarouselApiContext.Provider, { value: api, children: /* @__PURE__ */ jsx(Carousel, { className: cn("w-full", className), setApi, ...props, children }) });
|
|
68
|
-
};
|
|
69
|
-
var InlineCitationCarouselContent = (props) => /* @__PURE__ */ jsx(CarouselContent, { ...props });
|
|
70
|
-
var InlineCitationCarouselItem = ({
|
|
71
|
-
className,
|
|
72
|
-
...props
|
|
73
|
-
}) => /* @__PURE__ */ jsx(
|
|
74
|
-
CarouselItem,
|
|
75
|
-
{
|
|
76
|
-
className: cn("w-full space-y-2 p-4 pl-8", className),
|
|
77
|
-
...props
|
|
78
|
-
}
|
|
79
|
-
);
|
|
80
|
-
var InlineCitationCarouselHeader = ({
|
|
81
|
-
className,
|
|
82
|
-
...props
|
|
83
|
-
}) => /* @__PURE__ */ jsx(
|
|
84
|
-
"div",
|
|
85
|
-
{
|
|
86
|
-
className: cn(
|
|
87
|
-
"flex items-center justify-between gap-2 rounded-t-md bg-secondary p-2",
|
|
88
|
-
className
|
|
89
|
-
),
|
|
90
|
-
...props
|
|
91
|
-
}
|
|
92
|
-
);
|
|
93
|
-
var InlineCitationCarouselIndex = ({
|
|
94
|
-
children,
|
|
95
|
-
className,
|
|
96
|
-
...props
|
|
97
|
-
}) => {
|
|
98
|
-
const api = useCarouselApi();
|
|
99
|
-
const [current, setCurrent] = useState(0);
|
|
100
|
-
const [count, setCount] = useState(0);
|
|
101
|
-
const syncState = useCallback(() => {
|
|
102
|
-
if (!api) {
|
|
103
|
-
return;
|
|
104
|
-
}
|
|
105
|
-
setCount(api.scrollSnapList().length);
|
|
106
|
-
setCurrent(api.selectedScrollSnap() + 1);
|
|
107
|
-
}, [api]);
|
|
108
|
-
useEffect(() => {
|
|
109
|
-
if (!api) {
|
|
110
|
-
return;
|
|
111
|
-
}
|
|
112
|
-
syncState();
|
|
113
|
-
api.on("select", syncState);
|
|
114
|
-
return () => {
|
|
115
|
-
api.off("select", syncState);
|
|
116
|
-
};
|
|
117
|
-
}, [api, syncState]);
|
|
118
|
-
return /* @__PURE__ */ jsx(
|
|
119
|
-
"div",
|
|
120
|
-
{
|
|
121
|
-
className: cn(
|
|
122
|
-
"flex flex-1 items-center justify-end px-3 py-1 text-muted-foreground text-xs",
|
|
123
|
-
className
|
|
124
|
-
),
|
|
125
|
-
...props,
|
|
126
|
-
children: children ?? `${current}/${count}`
|
|
127
|
-
}
|
|
128
|
-
);
|
|
129
|
-
};
|
|
130
|
-
var InlineCitationCarouselPrev = ({
|
|
131
|
-
className,
|
|
132
|
-
...props
|
|
133
|
-
}) => {
|
|
134
|
-
const api = useCarouselApi();
|
|
135
|
-
const handleClick = useCallback(() => {
|
|
136
|
-
if (api) {
|
|
137
|
-
api.scrollPrev();
|
|
138
|
-
}
|
|
139
|
-
}, [api]);
|
|
140
|
-
return /* @__PURE__ */ jsx(
|
|
141
|
-
"button",
|
|
142
|
-
{
|
|
143
|
-
"aria-label": "Previous",
|
|
144
|
-
className: cn("shrink-0", className),
|
|
145
|
-
onClick: handleClick,
|
|
146
|
-
type: "button",
|
|
147
|
-
...props,
|
|
148
|
-
children: /* @__PURE__ */ jsx(ArrowLeftIcon, { className: "size-4 text-muted-foreground" })
|
|
149
|
-
}
|
|
150
|
-
);
|
|
151
|
-
};
|
|
152
|
-
var InlineCitationCarouselNext = ({
|
|
153
|
-
className,
|
|
154
|
-
...props
|
|
155
|
-
}) => {
|
|
156
|
-
const api = useCarouselApi();
|
|
157
|
-
const handleClick = useCallback(() => {
|
|
158
|
-
if (api) {
|
|
159
|
-
api.scrollNext();
|
|
160
|
-
}
|
|
161
|
-
}, [api]);
|
|
162
|
-
return /* @__PURE__ */ jsx(
|
|
163
|
-
"button",
|
|
164
|
-
{
|
|
165
|
-
"aria-label": "Next",
|
|
166
|
-
className: cn("shrink-0", className),
|
|
167
|
-
onClick: handleClick,
|
|
168
|
-
type: "button",
|
|
169
|
-
...props,
|
|
170
|
-
children: /* @__PURE__ */ jsx(ArrowRightIcon, { className: "size-4 text-muted-foreground" })
|
|
171
|
-
}
|
|
172
|
-
);
|
|
173
|
-
};
|
|
174
|
-
var InlineCitationSource = ({
|
|
175
|
-
title,
|
|
176
|
-
url,
|
|
177
|
-
description,
|
|
178
|
-
className,
|
|
179
|
-
children,
|
|
180
|
-
...props
|
|
181
|
-
}) => /* @__PURE__ */ jsxs("div", { className: cn("space-y-1", className), ...props, children: [
|
|
182
|
-
title && /* @__PURE__ */ jsx("h4", { className: "truncate font-medium text-sm leading-tight", children: title }),
|
|
183
|
-
url && /* @__PURE__ */ jsx("p", { className: "truncate break-all text-muted-foreground text-xs", children: url }),
|
|
184
|
-
description && /* @__PURE__ */ jsx("p", { className: "line-clamp-3 text-muted-foreground text-sm leading-relaxed", children: description }),
|
|
185
|
-
children
|
|
186
|
-
] });
|
|
187
|
-
var InlineCitationQuote = ({
|
|
188
|
-
children,
|
|
189
|
-
className,
|
|
190
|
-
...props
|
|
191
|
-
}) => /* @__PURE__ */ jsx(
|
|
192
|
-
"blockquote",
|
|
193
|
-
{
|
|
194
|
-
className: cn(
|
|
195
|
-
"border-muted border-l-2 pl-3 text-muted-foreground text-sm italic",
|
|
196
|
-
className
|
|
197
|
-
),
|
|
198
|
-
...props,
|
|
199
|
-
children
|
|
200
|
-
}
|
|
201
|
-
);
|
|
202
|
-
|
|
203
|
-
export { InlineCitation, InlineCitationCard, InlineCitationCardBody, InlineCitationCardTrigger, InlineCitationCarousel, InlineCitationCarouselContent, InlineCitationCarouselHeader, InlineCitationCarouselIndex, InlineCitationCarouselItem, InlineCitationCarouselNext, InlineCitationCarouselPrev, InlineCitationQuote, InlineCitationSource, InlineCitationText };
|
|
@@ -1,33 +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 { TProps } from 'react-jsx-parser';
|
|
5
|
-
|
|
6
|
-
interface JSXPreviewContextValue {
|
|
7
|
-
jsx: string;
|
|
8
|
-
processedJsx: string;
|
|
9
|
-
isStreaming: boolean;
|
|
10
|
-
error: Error | null;
|
|
11
|
-
setError: (error: Error | null) => void;
|
|
12
|
-
setLastGoodJsx: (jsx: string) => void;
|
|
13
|
-
components: TProps["components"];
|
|
14
|
-
bindings: TProps["bindings"];
|
|
15
|
-
onErrorProp?: (error: Error) => void;
|
|
16
|
-
}
|
|
17
|
-
declare const useJSXPreview: () => JSXPreviewContextValue;
|
|
18
|
-
type JSXPreviewProps = ComponentProps<"div"> & {
|
|
19
|
-
jsx: string;
|
|
20
|
-
isStreaming?: boolean;
|
|
21
|
-
components?: TProps["components"];
|
|
22
|
-
bindings?: TProps["bindings"];
|
|
23
|
-
onError?: (error: Error) => void;
|
|
24
|
-
};
|
|
25
|
-
declare const JSXPreview: react.MemoExoticComponent<({ jsx, isStreaming, components, bindings, onError, className, children, ...props }: JSXPreviewProps) => react_jsx_runtime.JSX.Element>;
|
|
26
|
-
type JSXPreviewContentProps = Omit<ComponentProps<"div">, "children">;
|
|
27
|
-
declare const JSXPreviewContent: react.MemoExoticComponent<({ className, ...props }: JSXPreviewContentProps) => react_jsx_runtime.JSX.Element>;
|
|
28
|
-
type JSXPreviewErrorProps = ComponentProps<"div"> & {
|
|
29
|
-
children?: ReactNode | ((error: Error) => ReactNode);
|
|
30
|
-
};
|
|
31
|
-
declare const JSXPreviewError: react.MemoExoticComponent<({ className, children, ...props }: JSXPreviewErrorProps) => react_jsx_runtime.JSX.Element | null>;
|
|
32
|
-
|
|
33
|
-
export { JSXPreview, JSXPreviewContent, type JSXPreviewContentProps, JSXPreviewError, type JSXPreviewErrorProps, type JSXPreviewProps, useJSXPreview };
|