@inkeep/agents-ui 0.15.26 → 0.15.28
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/dist/index.cjs +1 -1
- package/dist/index.js +166 -174
- package/dist/primitives/atoms/dialog.cjs +1 -1
- package/dist/primitives/atoms/dialog.js +110 -106
- package/dist/primitives/atoms/file-upload.cjs +1 -0
- package/dist/primitives/atoms/file-upload.d.ts +35 -0
- package/dist/primitives/atoms/file-upload.js +45 -0
- package/dist/primitives/atoms/icons/built-in-icons.cjs +1 -1
- package/dist/primitives/atoms/icons/built-in-icons.d.ts +8 -1
- package/dist/primitives/atoms/icons/built-in-icons.js +86 -79
- package/dist/primitives/atoms/icons/collections/pi.cjs +1 -1
- package/dist/primitives/atoms/icons/collections/pi.d.ts +6 -0
- package/dist/primitives/atoms/icons/collections/pi.js +103 -13
- package/dist/primitives/atoms/icons/inkeep-default-icons.cjs +1 -1
- package/dist/primitives/atoms/icons/inkeep-default-icons.js +9 -1
- package/dist/primitives/components/embedded-chat/file-upload-input.cjs +1 -0
- package/dist/primitives/components/embedded-chat/file-upload-input.d.ts +68 -0
- package/dist/primitives/components/embedded-chat/file-upload-input.js +328 -0
- package/dist/primitives/components/embedded-chat/image-preview-modal.cjs +1 -0
- package/dist/primitives/components/embedded-chat/image-preview-modal.d.ts +15 -0
- package/dist/primitives/components/embedded-chat/image-preview-modal.js +71 -0
- package/dist/primitives/components/embedded-chat/use-inkeep-chat.cjs +3 -3
- package/dist/primitives/components/embedded-chat/use-inkeep-chat.d.ts +8 -6
- package/dist/primitives/components/embedded-chat/use-inkeep-chat.js +277 -227
- package/dist/primitives/components/embedded-chat.cjs +4 -4
- package/dist/primitives/components/embedded-chat.d.ts +7 -116
- package/dist/primitives/components/embedded-chat.js +1082 -1484
- package/dist/primitives/components/embedded-search.d.ts +1 -1
- package/dist/primitives/hooks/index.cjs +1 -1
- package/dist/primitives/hooks/index.js +15 -14
- package/dist/primitives/hooks/use-initial-conversation.cjs +1 -0
- package/dist/primitives/hooks/use-initial-conversation.d.ts +16 -0
- package/dist/primitives/hooks/use-initial-conversation.js +31 -0
- package/dist/primitives/hooks/use-input-notification.cjs +1 -0
- package/dist/primitives/hooks/use-input-notification.d.ts +9 -0
- package/dist/primitives/hooks/use-input-notification.js +18 -0
- package/dist/primitives/hooks/use-scrolling-fades.cjs +1 -1
- package/dist/primitives/hooks/use-scrolling-fades.d.ts +1 -0
- package/dist/primitives/hooks/use-scrolling-fades.js +21 -5
- package/dist/primitives/index.cjs +1 -1
- package/dist/primitives/index.js +146 -154
- package/dist/primitives/providers/base-events-provider.cjs +1 -1
- package/dist/primitives/providers/base-events-provider.js +1 -1
- package/dist/primitives/providers/feedback-provider.cjs +1 -1
- package/dist/primitives/providers/feedback-provider.js +37 -38
- package/dist/primitives/providers/image-preview-provider.cjs +1 -0
- package/dist/primitives/providers/image-preview-provider.d.ts +15 -0
- package/dist/primitives/providers/image-preview-provider.js +23 -0
- package/dist/primitives/providers/index.cjs +1 -1
- package/dist/primitives/providers/index.d.ts +0 -3
- package/dist/primitives/providers/index.js +54 -63
- package/dist/primitives/utils/component-ids.cjs +1 -1
- package/dist/primitives/utils/component-ids.d.ts +54 -98
- package/dist/primitives/utils/component-ids.js +44 -66
- package/dist/primitives/utils/default-settings.cjs +1 -1
- package/dist/primitives/utils/default-settings.d.ts +0 -2
- package/dist/primitives/utils/default-settings.js +6 -8
- package/dist/react/embedded-chat.cjs +1 -1
- package/dist/react/embedded-chat.js +283 -287
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.js +166 -174
- package/dist/styled/components/chat-history.cjs +1 -1
- package/dist/styled/components/chat-history.d.ts +1 -1
- package/dist/styled/components/chat-history.js +31 -29
- package/dist/styled/components/embedded-chat/file-upload-input.cjs +1 -0
- package/dist/styled/components/embedded-chat/file-upload-input.d.ts +20 -0
- package/dist/styled/components/embedded-chat/file-upload-input.js +300 -0
- package/dist/styled/components/embedded-chat/image-preview-modal.cjs +1 -0
- package/dist/styled/components/embedded-chat/image-preview-modal.d.ts +11 -0
- package/dist/styled/components/embedded-chat/image-preview-modal.js +77 -0
- package/dist/styled/components/embedded-chat.cjs +1 -1
- package/dist/styled/components/embedded-chat.d.ts +4 -50
- package/dist/styled/components/embedded-chat.js +567 -1010
- package/dist/styled/components/message.cjs +1 -1
- package/dist/styled/components/message.js +89 -88
- package/dist/styled/components/ui/recipes/citation.d.ts +1 -1
- package/dist/styled/components/ui/recipes/index.cjs +1 -1
- package/dist/styled/components/ui/recipes/index.d.ts +0 -1
- package/dist/styled/components/ui/recipes/index.js +31 -33
- package/dist/styled/index.cjs +1 -1
- package/dist/styled/index.js +154 -162
- package/dist/styled/inkeep.css.cjs +241 -61
- package/dist/styled/inkeep.css.js +241 -61
- package/dist/types/config/ai.d.ts +8 -10
- package/dist/types/icons/built-in.d.ts +1 -1
- package/dist/types/icons/custom.d.ts +8 -0
- package/dist/types/index.d.ts +0 -1
- package/package.json +7 -6
- package/dist/primitives/providers/attachment-item-provider.cjs +0 -1
- package/dist/primitives/providers/attachment-item-provider.d.ts +0 -9
- package/dist/primitives/providers/attachment-item-provider.js +0 -13
- package/dist/primitives/providers/attachments-bar-provider.cjs +0 -1
- package/dist/primitives/providers/attachments-bar-provider.d.ts +0 -30
- package/dist/primitives/providers/attachments-bar-provider.js +0 -57
- package/dist/primitives/providers/message-attachments-provider.cjs +0 -1
- package/dist/primitives/providers/message-attachments-provider.d.ts +0 -13
- package/dist/primitives/providers/message-attachments-provider.js +0 -27
- package/dist/primitives/utils/get-message-metadata.d.ts +0 -8
- package/dist/styled/components/ui/recipes/attachment.cjs +0 -1
- package/dist/styled/components/ui/recipes/attachment.d.ts +0 -4
- package/dist/styled/components/ui/recipes/attachment.js +0 -28
- package/dist/types/config/settings/workflow.d.ts +0 -86
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as a } from "react/jsx-runtime";
|
|
3
|
-
import { ChatHistoryPrimitiveRoot as n, ChatHistoryPrimitiveHeader as h, ChatHistoryPrimitiveBackButtonIcon as l, ChatHistoryPrimitiveBackButton as
|
|
4
|
-
import { cn as
|
|
3
|
+
import { ChatHistoryPrimitiveRoot as n, ChatHistoryPrimitiveHeader as h, ChatHistoryPrimitiveBackButtonIcon as l, ChatHistoryPrimitiveBackButton as c, ChatHistoryPrimitiveTitle as y, ChatHistoryPrimitiveList as m, ChatHistoryPrimitiveItem as f, ChatHistoryPrimitiveItemTitle as u, ChatHistoryPrimitiveItemDate as p, ChatHistoryPrimitiveEmptyState as g, ChatHistoryPrimitiveLoadingState as b, ChatHistoryPrimitiveFooter as x, ChatHistoryPrimitiveNewConversationButton as k } from "../../primitives/components/chat-history/index.js";
|
|
4
|
+
import { cn as o } from "../utils.js";
|
|
5
5
|
import { button as s } from "./ui/recipes/button.js";
|
|
6
6
|
function N(t) {
|
|
7
|
-
const e = Date.now() - t.getTime(),
|
|
8
|
-
return
|
|
7
|
+
const e = Date.now() - t.getTime(), r = Math.floor(e / (1e3 * 60)), i = Math.floor(e / (1e3 * 60 * 60)), d = Math.floor(e / (1e3 * 60 * 60 * 24));
|
|
8
|
+
return r < 1 ? "Just now" : r < 60 ? `${r}m ago` : i < 24 ? `${i}h ago` : d < 7 ? t.toLocaleDateString("en-US", { weekday: "short" }) : t.toLocaleDateString("en-US", { month: "short", day: "numeric", year: "numeric" });
|
|
9
9
|
}
|
|
10
10
|
const E = ({
|
|
11
11
|
className: t,
|
|
@@ -13,7 +13,7 @@ const E = ({
|
|
|
13
13
|
}) => /* @__PURE__ */ a(
|
|
14
14
|
n,
|
|
15
15
|
{
|
|
16
|
-
className:
|
|
16
|
+
className: o(
|
|
17
17
|
"flex flex-col flex-1 min-h-0 w-full rounded-[inherit] font-body",
|
|
18
18
|
"data-[hidden]:hidden",
|
|
19
19
|
"group-data-[chat-history-layout=sidepane]/chat-history:basis-64",
|
|
@@ -34,7 +34,7 @@ const E = ({
|
|
|
34
34
|
}) => /* @__PURE__ */ a(
|
|
35
35
|
h,
|
|
36
36
|
{
|
|
37
|
-
className:
|
|
37
|
+
className: o(
|
|
38
38
|
"flex items-center justify-between shrink-0",
|
|
39
39
|
"px-3 py-3 relative",
|
|
40
40
|
"after:absolute after:left-0 after:top-full after:h-3 after:w-full after:text-white after:dark:text-gray-dark-950 after:bg-[linear-gradient(currentColor,_transparent)] after:z-start",
|
|
@@ -45,13 +45,13 @@ const E = ({
|
|
|
45
45
|
), B = ({
|
|
46
46
|
className: t,
|
|
47
47
|
...e
|
|
48
|
-
}) => /* @__PURE__ */ a(l, { className:
|
|
48
|
+
}) => /* @__PURE__ */ a(l, { className: o("text-sm", t), ...e }), S = ({
|
|
49
49
|
className: t,
|
|
50
50
|
...e
|
|
51
51
|
}) => /* @__PURE__ */ a(
|
|
52
|
-
|
|
52
|
+
c,
|
|
53
53
|
{
|
|
54
|
-
className:
|
|
54
|
+
className: o(
|
|
55
55
|
s({ size: "xs", variant: "ghost" }),
|
|
56
56
|
"gap-1.5 text-gray-600 hover:text-gray-800 dark:text-white dark:opacity-60 dark:hover:text-white dark:hover:opacity-95",
|
|
57
57
|
"group-data-[chat-history-layout=sidepane]/chat-history:!hidden",
|
|
@@ -62,16 +62,16 @@ const E = ({
|
|
|
62
62
|
), I = ({
|
|
63
63
|
className: t,
|
|
64
64
|
children: e,
|
|
65
|
-
...
|
|
65
|
+
...r
|
|
66
66
|
}) => /* @__PURE__ */ a(
|
|
67
|
-
|
|
67
|
+
y,
|
|
68
68
|
{
|
|
69
|
-
className:
|
|
69
|
+
className: o(
|
|
70
70
|
"pl-2 text-sm font-normal text-gray-600 dark:text-white-alpha-600",
|
|
71
71
|
"group-data-[chat-history-layout=stack]/chat-history:!hidden",
|
|
72
72
|
t
|
|
73
73
|
),
|
|
74
|
-
...
|
|
74
|
+
...r,
|
|
75
75
|
children: e ?? "Chats"
|
|
76
76
|
}
|
|
77
77
|
), D = ({
|
|
@@ -80,7 +80,7 @@ const E = ({
|
|
|
80
80
|
}) => /* @__PURE__ */ a(
|
|
81
81
|
m,
|
|
82
82
|
{
|
|
83
|
-
className:
|
|
83
|
+
className: o(
|
|
84
84
|
"flex-1 min-h-0 overflow-y-auto [scrollbar-width:thin] px-2 py-3 space-y-0.5",
|
|
85
85
|
t
|
|
86
86
|
),
|
|
@@ -92,7 +92,7 @@ const E = ({
|
|
|
92
92
|
}) => /* @__PURE__ */ a(
|
|
93
93
|
f,
|
|
94
94
|
{
|
|
95
|
-
className:
|
|
95
|
+
className: o(
|
|
96
96
|
"flex flex-col gap-0.5 w-full text-left px-3 py-2 rounded-lg",
|
|
97
97
|
"hover:bg-gray-50 dark:hover:bg-gray-dark-900",
|
|
98
98
|
"focus-visible:outline-none focus-visible:bg-gray-50 dark:focus-visible:bg-gray-dark-900",
|
|
@@ -104,15 +104,17 @@ const E = ({
|
|
|
104
104
|
}
|
|
105
105
|
), M = ({
|
|
106
106
|
className: t,
|
|
107
|
-
|
|
107
|
+
children: e,
|
|
108
|
+
...r
|
|
108
109
|
}) => /* @__PURE__ */ a(
|
|
109
110
|
u,
|
|
110
111
|
{
|
|
111
|
-
className:
|
|
112
|
+
className: o(
|
|
112
113
|
"text-sm text-gray-800 dark:text-white-alpha-950 truncate w-full block",
|
|
113
114
|
t
|
|
114
115
|
),
|
|
115
|
-
...
|
|
116
|
+
...r,
|
|
117
|
+
children: e || /* @__PURE__ */ a("span", { className: "text-gray-500 dark:text-white-alpha-500", children: "No message" })
|
|
116
118
|
}
|
|
117
119
|
), T = ({
|
|
118
120
|
className: t,
|
|
@@ -120,22 +122,22 @@ const E = ({
|
|
|
120
122
|
}) => /* @__PURE__ */ a(
|
|
121
123
|
p,
|
|
122
124
|
{
|
|
123
|
-
className:
|
|
125
|
+
className: o("text-xs text-gray-500 dark:text-white-alpha-500", t),
|
|
124
126
|
...e
|
|
125
127
|
}
|
|
126
128
|
), j = ({
|
|
127
129
|
className: t,
|
|
128
130
|
children: e,
|
|
129
|
-
...
|
|
131
|
+
...r
|
|
130
132
|
}) => /* @__PURE__ */ a(
|
|
131
133
|
g,
|
|
132
134
|
{
|
|
133
|
-
className:
|
|
135
|
+
className: o(
|
|
134
136
|
"flex flex-col items-center justify-center flex-1 py-2 h-full",
|
|
135
137
|
"text-sm text-gray-500 dark:text-white-alpha-500",
|
|
136
138
|
t
|
|
137
139
|
),
|
|
138
|
-
...
|
|
140
|
+
...r,
|
|
139
141
|
children: e ?? "No conversations yet."
|
|
140
142
|
}
|
|
141
143
|
), F = ({
|
|
@@ -144,14 +146,14 @@ const E = ({
|
|
|
144
146
|
}) => /* @__PURE__ */ a(
|
|
145
147
|
b,
|
|
146
148
|
{
|
|
147
|
-
className:
|
|
149
|
+
className: o("flex flex-col px-3 py-2 gap-3", t),
|
|
148
150
|
...e,
|
|
149
|
-
children: [1, 2, 3].map((
|
|
151
|
+
children: [1, 2, 3].map((r) => /* @__PURE__ */ a(
|
|
150
152
|
"div",
|
|
151
153
|
{
|
|
152
154
|
className: "h-14 w-full rounded-lg bg-gray-100 dark:bg-gray-dark-800 animate-pulse"
|
|
153
155
|
},
|
|
154
|
-
|
|
156
|
+
r
|
|
155
157
|
))
|
|
156
158
|
}
|
|
157
159
|
), _ = ({
|
|
@@ -160,7 +162,7 @@ const E = ({
|
|
|
160
162
|
}) => /* @__PURE__ */ a(
|
|
161
163
|
x,
|
|
162
164
|
{
|
|
163
|
-
className:
|
|
165
|
+
className: o(
|
|
164
166
|
"shrink-0 px-5 py-4 relative",
|
|
165
167
|
"before:absolute before:block before:top-0 before:left-0 before:pointer-events-none before:w-full before:h-3 before:bg-[linear-gradient(transparent,_white)] dark:before:bg-[linear-gradient(transparent,_var(--ikp-color-gray-dark-950))] before:-translate-y-full",
|
|
166
168
|
t
|
|
@@ -170,12 +172,12 @@ const E = ({
|
|
|
170
172
|
), z = ({
|
|
171
173
|
className: t,
|
|
172
174
|
children: e,
|
|
173
|
-
...
|
|
175
|
+
...r
|
|
174
176
|
}) => /* @__PURE__ */ a(
|
|
175
177
|
k,
|
|
176
178
|
{
|
|
177
|
-
className:
|
|
178
|
-
...
|
|
179
|
+
className: o(s({ variant: "primaryFilled" }), "w-full shrink-0", t),
|
|
180
|
+
...r,
|
|
179
181
|
children: e ?? "New conversation"
|
|
180
182
|
}
|
|
181
183
|
);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),s=require("../../../primitives/hooks/use-scrolling-fades.cjs"),o=require("../ui/recipes/button.cjs"),d=require("../ui/recipes/icon.cjs"),a=require("../../utils.cjs"),r=require("../../../primitives/components/embedded-chat/file-upload-input.cjs"),l=({className:e,...t})=>i.jsx(r.EmbeddedChatPrimitiveDropZone,{className:a.cn("absolute inset-0 z-10 rounded-lg","flex items-center justify-center","border-2 border-dashed border-inkeep-expanded-primary-500 dark:border-inkeep-expanded-primary-400","bg-gray-50 dark:bg-gray-dark-900","pointer-events-none","text-sm text-gray-500 dark:text-gray-dark-300","opacity-0 transition-opacity","group-data-[drag-over]/fieldset:opacity-100",e),...t}),c=({className:e,...t})=>i.jsx(r.EmbeddedChatPrimitiveFileUploadButton,{className:a.cn(o.button({}),"group","bg-transparent relative size-8 min-w-[unset] rounded-lg transition-all ease-linear","text-gray-500 dark:text-gray-dark-200","hover:bg-gray-200 hover:text-gray-700 dark:hover:bg-white-alpha-100 dark:hover:text-gray-dark-50","active:bg-gray-200 dark:active:bg-white-alpha-100","disabled:cursor-not-allowed hover:disabled:[background:none]",e),...t,children:i.jsx(r.EmbeddedChatPrimitiveFileUploadButtonIcon,{className:a.cn(d.icon(),"text-inherit")})}),b=({className:e,...t})=>i.jsx(r.EmbeddedChatPrimitiveFileInput,{className:a.cn("hidden",e),...t}),m=({className:e,...t})=>i.jsx(r.EmbeddedChatPrimitiveInputNotification,{className:a.cn("flex items-start justify-between gap-3","rounded-lg px-4 py-3 mx-5","bg-white dark:bg-gray-dark-800","border border-gray-200 dark:border-gray-dark-700","absolute bottom-full left-0 right-0 mx-5 mb-1.5","shadow-md dark:shadow-none","animate-notification-in",e),...t}),g=({className:e,...t})=>i.jsx(r.EmbeddedChatPrimitiveInputNotificationContent,{className:a.cn("flex flex-col gap-0.5 w-full",e),...t}),h=({className:e,...t})=>i.jsx(r.EmbeddedChatPrimitiveInputNotificationHeader,{className:a.cn("flex items-center gap-2 justify-between w-full",e),...t}),p=({className:e,...t})=>i.jsx(r.EmbeddedChatPrimitiveInputNotificationTitle,{className:a.cn("text-sm font-medium text-gray-900 dark:text-white-alpha-950",e),...t}),u=({className:e,...t})=>i.jsx(r.EmbeddedChatPrimitiveInputNotificationMessage,{className:a.cn("text-sm text-gray-600 dark:text-white-alpha-600",e),...t}),f=({className:e,...t})=>i.jsx(r.EmbeddedChatPrimitiveInputNotificationClose,{className:a.cn(o.button({variant:"ghost",size:"xs"}),"px-1",e),...t,children:i.jsx(r.EmbeddedChatPrimitiveFileRemoveIcon,{className:a.cn(d.icon())})}),x=({className:e,...t})=>{const n=s.useScrollingFadesHorizontal();return i.jsx("div",{ref:n,className:a.cn("relative","[--scroll-fade-color:var(--ikp-color-gray-50)] dark:[--scroll-fade-color:var(--ikp-color-gray-dark-900)]",'befter:content-[""] befter:absolute befter:inset-y-0 befter:w-10 befter:pointer-events-none befter:z-10',"befter:transition-opacity befter:duration-300 befter:ease-in-out","before:left-0 before:bg-[linear-gradient(to_right,var(--scroll-fade-color),transparent)]","after:right-0 after:bg-[linear-gradient(to_left,var(--scroll-fade-color),transparent)]","has-[[data-scroll-left]]:before:opacity-0","has-[[data-scroll-right]]:after:opacity-0"),children:i.jsx(r.EmbeddedChatPrimitiveFileList,{className:a.cn("flex max-w-full overflow-x-auto gap-2 pt-0.5 pb-1.5 [scrollbar-width:none]",e),...t})})},v=({className:e,...t})=>i.jsx(r.EmbeddedChatPrimitiveFileItem,{className:a.cn("group/chip","relative flex items-center gap-1.5","max-w-[200px] rounded-lg","border border-gray-300 dark:border-gray-dark-600","[--chip-bg:theme(colors.gray.200)] dark:[--chip-bg:theme(colors.gray-dark.700)]","bg-[--chip-bg]","px-1 h-7",e),...t}),C=({className:e,...t})=>i.jsx(r.EmbeddedChatPrimitiveFilePreviewTrigger,{className:a.cn("flex items-center gap-1.5 min-w-0 flex-1","bg-transparent border-0 p-0 text-left cursor-pointer","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:rounded dark:focus-visible:ring-white-alpha-900",e),...t}),y=({className:e,...t})=>i.jsx(r.EmbeddedChatPrimitiveFileContent,{className:a.cn("flex items-center gap-1.5 min-w-0 flex-1",e),...t}),E=({className:e,...t})=>i.jsx(r.EmbeddedChatPrimitiveFileThumbnail,{className:a.cn("size-5 shrink-0 rounded object-cover border border-gray-300 dark:border-gray-dark-600","group-data-[loading]/chip:animate-pulse group-data-[loading]/chip:bg-gray-200 dark:group-data-[loading]/chip:bg-gray-dark-600",e),...t}),k=({className:e,...t})=>i.jsx(r.EmbeddedChatPrimitiveFileTypeIcon,{className:a.cn("size-5 shrink-0 text-gray-600 dark:text-gray-dark-100",e),...t}),N=({className:e,...t})=>i.jsx(r.EmbeddedChatPrimitiveFileName,{className:a.cn("min-w-0 flex-1 truncate text-xs","text-gray-900 dark:text-gray-dark-50",e),...t}),F=({className:e,...t})=>i.jsx(r.EmbeddedChatPrimitiveFileRemove,{className:a.cn("absolute top-0 right-0 rounded-r-lg","flex h-full px-1 items-center justify-center","bg-[--chip-bg]","text-gray-800 dark:text-gray-dark-100","opacity-0 transition-opacity","group-hover/chip:opacity-100","[@media(hover:none)]:opacity-100","focus:outline-none","focus-visible:ring","focus-visible:ring-2","focus-visible:opacity-100","focus-visible:ring-gray-500","dark:focus-visible:ring-white-alpha-900","focus-visible:rounded","before:bg-gradient-to-l before:absolute before:-left-1 before:from-[--chip-bg] before:h-full before:w-1 before:pointer-events-none",e),...t,children:i.jsx(r.EmbeddedChatPrimitiveFileRemoveIcon,{className:a.cn(d.icon(),"size-2.5 text-inherit")})}),w=({className:e,...t})=>i.jsx(r.EmbeddedChatPrimitiveMessageFiles,{className:a.cn("flex flex-wrap gap-2 mt-2 justify-end",e),...t}),j=({className:e,...t})=>i.jsx(r.EmbeddedChatPrimitiveMessageFile,{className:a.cn("relative flex items-center gap-1.5","max-w-[200px] rounded-lg","border","bg-gray-100 dark:bg-white-alpha-100","px-1 h-7","focus-visible:ring-gray-500 dark:focus-visible:ring-white-alpha-900 focus-visible:ring-2 focus:outline-none",e),...t});exports.EmbeddedChatDropZone=l;exports.EmbeddedChatFileContent=y;exports.EmbeddedChatFileInput=b;exports.EmbeddedChatFileItem=v;exports.EmbeddedChatFileList=x;exports.EmbeddedChatFileName=N;exports.EmbeddedChatFilePreviewTrigger=C;exports.EmbeddedChatFileRemove=F;exports.EmbeddedChatFileThumbnail=E;exports.EmbeddedChatFileTypeIcon=k;exports.EmbeddedChatFileUploadButton=c;exports.EmbeddedChatInputNotification=m;exports.EmbeddedChatInputNotificationClose=f;exports.EmbeddedChatInputNotificationContent=g;exports.EmbeddedChatInputNotificationHeader=h;exports.EmbeddedChatInputNotificationMessage=u;exports.EmbeddedChatInputNotificationTitle=p;exports.EmbeddedChatMessageFile=j;exports.EmbeddedChatMessageFiles=w;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { EmbeddedChatPrimitive } from '../../../primitives';
|
|
2
|
+
export declare const EmbeddedChatDropZone: ({ className, ...props }: React.ComponentPropsWithRef<typeof EmbeddedChatPrimitive.DropZone>) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare const EmbeddedChatFileUploadButton: ({ className, ...props }: React.ComponentPropsWithRef<typeof EmbeddedChatPrimitive.FileUploadButton>) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const EmbeddedChatFileInput: ({ className, ...props }: React.ComponentPropsWithRef<typeof EmbeddedChatPrimitive.FileInput>) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare const EmbeddedChatInputNotification: ({ className, ...props }: React.ComponentPropsWithRef<typeof EmbeddedChatPrimitive.InputNotification>) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare const EmbeddedChatInputNotificationContent: ({ className, ...props }: React.ComponentPropsWithRef<typeof EmbeddedChatPrimitive.InputNotificationContent>) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const EmbeddedChatInputNotificationHeader: ({ className, ...props }: React.ComponentPropsWithRef<typeof EmbeddedChatPrimitive.InputNotificationHeader>) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const EmbeddedChatInputNotificationTitle: ({ className, ...props }: React.ComponentPropsWithRef<typeof EmbeddedChatPrimitive.InputNotificationTitle>) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const EmbeddedChatInputNotificationMessage: ({ className, ...props }: React.ComponentPropsWithRef<typeof EmbeddedChatPrimitive.InputNotificationMessage>) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const EmbeddedChatInputNotificationClose: ({ className, ...props }: React.ComponentPropsWithRef<typeof EmbeddedChatPrimitive.InputNotificationClose>) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const EmbeddedChatFileList: ({ className, ...props }: React.ComponentPropsWithRef<typeof EmbeddedChatPrimitive.FileList>) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const EmbeddedChatFileItem: ({ className, ...props }: React.ComponentPropsWithRef<typeof EmbeddedChatPrimitive.FileItem>) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const EmbeddedChatFilePreviewTrigger: ({ className, ...props }: React.ComponentPropsWithRef<typeof EmbeddedChatPrimitive.FilePreviewTrigger>) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare const EmbeddedChatFileContent: ({ className, ...props }: React.ComponentPropsWithRef<typeof EmbeddedChatPrimitive.FileContent>) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare const EmbeddedChatFileThumbnail: ({ className, ...props }: React.ComponentPropsWithRef<typeof EmbeddedChatPrimitive.FileThumbnail>) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare const EmbeddedChatFileTypeIcon: ({ className, ...props }: React.ComponentPropsWithRef<typeof EmbeddedChatPrimitive.FileTypeIcon>) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare const EmbeddedChatFileName: ({ className, ...props }: React.ComponentPropsWithRef<typeof EmbeddedChatPrimitive.FileName>) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare const EmbeddedChatFileRemove: ({ className, ...props }: React.ComponentPropsWithRef<typeof EmbeddedChatPrimitive.FileRemove>) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare const EmbeddedChatMessageFiles: ({ className, ...props }: React.ComponentPropsWithRef<typeof EmbeddedChatPrimitive.MessageFiles>) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare const EmbeddedChatMessageFile: ({ className, ...props }: React.ComponentPropsWithRef<typeof EmbeddedChatPrimitive.MessageFile>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
3
|
+
import { useScrollingFadesHorizontal as s } from "../../../primitives/hooks/use-scrolling-fades.js";
|
|
4
|
+
import { button as d } from "../ui/recipes/button.js";
|
|
5
|
+
import { icon as r } from "../ui/recipes/icon.js";
|
|
6
|
+
import { cn as i } from "../../utils.js";
|
|
7
|
+
import { EmbeddedChatPrimitiveDropZone as l, EmbeddedChatPrimitiveFileUploadButton as c, EmbeddedChatPrimitiveFileUploadButtonIcon as m, EmbeddedChatPrimitiveFileInput as b, EmbeddedChatPrimitiveInputNotification as g, EmbeddedChatPrimitiveInputNotificationContent as p, EmbeddedChatPrimitiveInputNotificationHeader as h, EmbeddedChatPrimitiveInputNotificationTitle as f, EmbeddedChatPrimitiveInputNotificationMessage as u, EmbeddedChatPrimitiveInputNotificationClose as v, EmbeddedChatPrimitiveFileRemoveIcon as o, EmbeddedChatPrimitiveFileList as x, EmbeddedChatPrimitiveFileItem as y, EmbeddedChatPrimitiveFilePreviewTrigger as C, EmbeddedChatPrimitiveFileContent as k, EmbeddedChatPrimitiveFileThumbnail as E, EmbeddedChatPrimitiveFileTypeIcon as N, EmbeddedChatPrimitiveFileName as w, EmbeddedChatPrimitiveFileRemove as F, EmbeddedChatPrimitiveMessageFiles as P, EmbeddedChatPrimitiveMessageFile as I } from "../../../primitives/components/embedded-chat/file-upload-input.js";
|
|
8
|
+
const H = ({
|
|
9
|
+
className: e,
|
|
10
|
+
...t
|
|
11
|
+
}) => /* @__PURE__ */ a(
|
|
12
|
+
l,
|
|
13
|
+
{
|
|
14
|
+
className: i(
|
|
15
|
+
"absolute inset-0 z-10 rounded-lg",
|
|
16
|
+
"flex items-center justify-center",
|
|
17
|
+
"border-2 border-dashed border-inkeep-expanded-primary-500 dark:border-inkeep-expanded-primary-400",
|
|
18
|
+
"bg-gray-50 dark:bg-gray-dark-900",
|
|
19
|
+
"pointer-events-none",
|
|
20
|
+
"text-sm text-gray-500 dark:text-gray-dark-300",
|
|
21
|
+
"opacity-0 transition-opacity",
|
|
22
|
+
"group-data-[drag-over]/fieldset:opacity-100",
|
|
23
|
+
e
|
|
24
|
+
),
|
|
25
|
+
...t
|
|
26
|
+
}
|
|
27
|
+
), U = ({
|
|
28
|
+
className: e,
|
|
29
|
+
...t
|
|
30
|
+
}) => /* @__PURE__ */ a(
|
|
31
|
+
c,
|
|
32
|
+
{
|
|
33
|
+
className: i(
|
|
34
|
+
d({}),
|
|
35
|
+
"group",
|
|
36
|
+
"bg-transparent relative size-8 min-w-[unset] rounded-lg transition-all ease-linear",
|
|
37
|
+
"text-gray-500 dark:text-gray-dark-200",
|
|
38
|
+
"hover:bg-gray-200 hover:text-gray-700 dark:hover:bg-white-alpha-100 dark:hover:text-gray-dark-50",
|
|
39
|
+
"active:bg-gray-200 dark:active:bg-white-alpha-100",
|
|
40
|
+
"disabled:cursor-not-allowed hover:disabled:[background:none]",
|
|
41
|
+
e
|
|
42
|
+
),
|
|
43
|
+
...t,
|
|
44
|
+
children: /* @__PURE__ */ a(
|
|
45
|
+
m,
|
|
46
|
+
{
|
|
47
|
+
className: i(r(), "text-inherit")
|
|
48
|
+
}
|
|
49
|
+
)
|
|
50
|
+
}
|
|
51
|
+
), D = ({
|
|
52
|
+
className: e,
|
|
53
|
+
...t
|
|
54
|
+
}) => /* @__PURE__ */ a(b, { className: i("hidden", e), ...t }), L = ({
|
|
55
|
+
className: e,
|
|
56
|
+
...t
|
|
57
|
+
}) => /* @__PURE__ */ a(
|
|
58
|
+
g,
|
|
59
|
+
{
|
|
60
|
+
className: i(
|
|
61
|
+
"flex items-start justify-between gap-3",
|
|
62
|
+
"rounded-lg px-4 py-3 mx-5",
|
|
63
|
+
"bg-white dark:bg-gray-dark-800",
|
|
64
|
+
"border border-gray-200 dark:border-gray-dark-700",
|
|
65
|
+
"absolute bottom-full left-0 right-0 mx-5 mb-1.5",
|
|
66
|
+
"shadow-md dark:shadow-none",
|
|
67
|
+
"animate-notification-in",
|
|
68
|
+
e
|
|
69
|
+
),
|
|
70
|
+
...t
|
|
71
|
+
}
|
|
72
|
+
), Z = ({
|
|
73
|
+
className: e,
|
|
74
|
+
...t
|
|
75
|
+
}) => /* @__PURE__ */ a(
|
|
76
|
+
p,
|
|
77
|
+
{
|
|
78
|
+
className: i("flex flex-col gap-0.5 w-full", e),
|
|
79
|
+
...t
|
|
80
|
+
}
|
|
81
|
+
), _ = ({
|
|
82
|
+
className: e,
|
|
83
|
+
...t
|
|
84
|
+
}) => /* @__PURE__ */ a(
|
|
85
|
+
h,
|
|
86
|
+
{
|
|
87
|
+
className: i("flex items-center gap-2 justify-between w-full", e),
|
|
88
|
+
...t
|
|
89
|
+
}
|
|
90
|
+
), S = ({
|
|
91
|
+
className: e,
|
|
92
|
+
...t
|
|
93
|
+
}) => /* @__PURE__ */ a(
|
|
94
|
+
f,
|
|
95
|
+
{
|
|
96
|
+
className: i("text-sm font-medium text-gray-900 dark:text-white-alpha-950", e),
|
|
97
|
+
...t
|
|
98
|
+
}
|
|
99
|
+
), q = ({
|
|
100
|
+
className: e,
|
|
101
|
+
...t
|
|
102
|
+
}) => /* @__PURE__ */ a(
|
|
103
|
+
u,
|
|
104
|
+
{
|
|
105
|
+
className: i("text-sm text-gray-600 dark:text-white-alpha-600", e),
|
|
106
|
+
...t
|
|
107
|
+
}
|
|
108
|
+
), A = ({
|
|
109
|
+
className: e,
|
|
110
|
+
...t
|
|
111
|
+
}) => /* @__PURE__ */ a(
|
|
112
|
+
v,
|
|
113
|
+
{
|
|
114
|
+
className: i(
|
|
115
|
+
d({ variant: "ghost", size: "xs" }),
|
|
116
|
+
"px-1",
|
|
117
|
+
e
|
|
118
|
+
),
|
|
119
|
+
...t,
|
|
120
|
+
children: /* @__PURE__ */ a(o, { className: i(r()) })
|
|
121
|
+
}
|
|
122
|
+
), G = ({
|
|
123
|
+
className: e,
|
|
124
|
+
...t
|
|
125
|
+
}) => {
|
|
126
|
+
const n = s();
|
|
127
|
+
return /* @__PURE__ */ a(
|
|
128
|
+
"div",
|
|
129
|
+
{
|
|
130
|
+
ref: n,
|
|
131
|
+
className: i(
|
|
132
|
+
"relative",
|
|
133
|
+
"[--scroll-fade-color:var(--ikp-color-gray-50)] dark:[--scroll-fade-color:var(--ikp-color-gray-dark-900)]",
|
|
134
|
+
'befter:content-[""] befter:absolute befter:inset-y-0 befter:w-10 befter:pointer-events-none befter:z-10',
|
|
135
|
+
"befter:transition-opacity befter:duration-300 befter:ease-in-out",
|
|
136
|
+
"before:left-0 before:bg-[linear-gradient(to_right,var(--scroll-fade-color),transparent)]",
|
|
137
|
+
"after:right-0 after:bg-[linear-gradient(to_left,var(--scroll-fade-color),transparent)]",
|
|
138
|
+
"has-[[data-scroll-left]]:before:opacity-0",
|
|
139
|
+
"has-[[data-scroll-right]]:after:opacity-0"
|
|
140
|
+
),
|
|
141
|
+
children: /* @__PURE__ */ a(
|
|
142
|
+
x,
|
|
143
|
+
{
|
|
144
|
+
className: i("flex max-w-full overflow-x-auto gap-2 pt-0.5 pb-1.5 [scrollbar-width:none]", e),
|
|
145
|
+
...t
|
|
146
|
+
}
|
|
147
|
+
)
|
|
148
|
+
}
|
|
149
|
+
);
|
|
150
|
+
}, J = ({
|
|
151
|
+
className: e,
|
|
152
|
+
...t
|
|
153
|
+
}) => /* @__PURE__ */ a(
|
|
154
|
+
y,
|
|
155
|
+
{
|
|
156
|
+
className: i(
|
|
157
|
+
"group/chip",
|
|
158
|
+
"relative flex items-center gap-1.5",
|
|
159
|
+
"max-w-[200px] rounded-lg",
|
|
160
|
+
"border border-gray-300 dark:border-gray-dark-600",
|
|
161
|
+
"[--chip-bg:theme(colors.gray.200)] dark:[--chip-bg:theme(colors.gray-dark.700)]",
|
|
162
|
+
"bg-[--chip-bg]",
|
|
163
|
+
"px-1 h-7",
|
|
164
|
+
e
|
|
165
|
+
),
|
|
166
|
+
...t
|
|
167
|
+
}
|
|
168
|
+
), K = ({
|
|
169
|
+
className: e,
|
|
170
|
+
...t
|
|
171
|
+
}) => /* @__PURE__ */ a(
|
|
172
|
+
C,
|
|
173
|
+
{
|
|
174
|
+
className: i(
|
|
175
|
+
"flex items-center gap-1.5 min-w-0 flex-1",
|
|
176
|
+
"bg-transparent border-0 p-0 text-left cursor-pointer",
|
|
177
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:rounded dark:focus-visible:ring-white-alpha-900",
|
|
178
|
+
e
|
|
179
|
+
),
|
|
180
|
+
...t
|
|
181
|
+
}
|
|
182
|
+
), O = ({
|
|
183
|
+
className: e,
|
|
184
|
+
...t
|
|
185
|
+
}) => /* @__PURE__ */ a(
|
|
186
|
+
k,
|
|
187
|
+
{
|
|
188
|
+
className: i("flex items-center gap-1.5 min-w-0 flex-1", e),
|
|
189
|
+
...t
|
|
190
|
+
}
|
|
191
|
+
), Q = ({
|
|
192
|
+
className: e,
|
|
193
|
+
...t
|
|
194
|
+
}) => /* @__PURE__ */ a(
|
|
195
|
+
E,
|
|
196
|
+
{
|
|
197
|
+
className: i(
|
|
198
|
+
"size-5 shrink-0 rounded object-cover border border-gray-300 dark:border-gray-dark-600",
|
|
199
|
+
"group-data-[loading]/chip:animate-pulse group-data-[loading]/chip:bg-gray-200 dark:group-data-[loading]/chip:bg-gray-dark-600",
|
|
200
|
+
e
|
|
201
|
+
),
|
|
202
|
+
...t
|
|
203
|
+
}
|
|
204
|
+
), V = ({
|
|
205
|
+
className: e,
|
|
206
|
+
...t
|
|
207
|
+
}) => /* @__PURE__ */ a(
|
|
208
|
+
N,
|
|
209
|
+
{
|
|
210
|
+
className: i("size-5 shrink-0 text-gray-600 dark:text-gray-dark-100", e),
|
|
211
|
+
...t
|
|
212
|
+
}
|
|
213
|
+
), W = ({
|
|
214
|
+
className: e,
|
|
215
|
+
...t
|
|
216
|
+
}) => /* @__PURE__ */ a(
|
|
217
|
+
w,
|
|
218
|
+
{
|
|
219
|
+
className: i(
|
|
220
|
+
"min-w-0 flex-1 truncate text-xs",
|
|
221
|
+
"text-gray-900 dark:text-gray-dark-50",
|
|
222
|
+
e
|
|
223
|
+
),
|
|
224
|
+
...t
|
|
225
|
+
}
|
|
226
|
+
), X = ({
|
|
227
|
+
className: e,
|
|
228
|
+
...t
|
|
229
|
+
}) => /* @__PURE__ */ a(
|
|
230
|
+
F,
|
|
231
|
+
{
|
|
232
|
+
className: i(
|
|
233
|
+
"absolute top-0 right-0 rounded-r-lg",
|
|
234
|
+
"flex h-full px-1 items-center justify-center",
|
|
235
|
+
"bg-[--chip-bg]",
|
|
236
|
+
"text-gray-800 dark:text-gray-dark-100",
|
|
237
|
+
"opacity-0 transition-opacity",
|
|
238
|
+
"group-hover/chip:opacity-100",
|
|
239
|
+
"[@media(hover:none)]:opacity-100",
|
|
240
|
+
"focus:outline-none",
|
|
241
|
+
"focus-visible:ring",
|
|
242
|
+
"focus-visible:ring-2",
|
|
243
|
+
"focus-visible:opacity-100",
|
|
244
|
+
"focus-visible:ring-gray-500",
|
|
245
|
+
"dark:focus-visible:ring-white-alpha-900",
|
|
246
|
+
"focus-visible:rounded",
|
|
247
|
+
"before:bg-gradient-to-l before:absolute before:-left-1 before:from-[--chip-bg] before:h-full before:w-1 before:pointer-events-none",
|
|
248
|
+
e
|
|
249
|
+
),
|
|
250
|
+
...t,
|
|
251
|
+
children: /* @__PURE__ */ a(o, { className: i(r(), "size-2.5 text-inherit") })
|
|
252
|
+
}
|
|
253
|
+
), Y = ({
|
|
254
|
+
className: e,
|
|
255
|
+
...t
|
|
256
|
+
}) => /* @__PURE__ */ a(
|
|
257
|
+
P,
|
|
258
|
+
{
|
|
259
|
+
className: i("flex flex-wrap gap-2 mt-2 justify-end", e),
|
|
260
|
+
...t
|
|
261
|
+
}
|
|
262
|
+
), $ = ({
|
|
263
|
+
className: e,
|
|
264
|
+
...t
|
|
265
|
+
}) => /* @__PURE__ */ a(
|
|
266
|
+
I,
|
|
267
|
+
{
|
|
268
|
+
className: i(
|
|
269
|
+
"relative flex items-center gap-1.5",
|
|
270
|
+
"max-w-[200px] rounded-lg",
|
|
271
|
+
"border",
|
|
272
|
+
"bg-gray-100 dark:bg-white-alpha-100",
|
|
273
|
+
"px-1 h-7",
|
|
274
|
+
"focus-visible:ring-gray-500 dark:focus-visible:ring-white-alpha-900 focus-visible:ring-2 focus:outline-none",
|
|
275
|
+
e
|
|
276
|
+
),
|
|
277
|
+
...t
|
|
278
|
+
}
|
|
279
|
+
);
|
|
280
|
+
export {
|
|
281
|
+
H as EmbeddedChatDropZone,
|
|
282
|
+
O as EmbeddedChatFileContent,
|
|
283
|
+
D as EmbeddedChatFileInput,
|
|
284
|
+
J as EmbeddedChatFileItem,
|
|
285
|
+
G as EmbeddedChatFileList,
|
|
286
|
+
W as EmbeddedChatFileName,
|
|
287
|
+
K as EmbeddedChatFilePreviewTrigger,
|
|
288
|
+
X as EmbeddedChatFileRemove,
|
|
289
|
+
Q as EmbeddedChatFileThumbnail,
|
|
290
|
+
V as EmbeddedChatFileTypeIcon,
|
|
291
|
+
U as EmbeddedChatFileUploadButton,
|
|
292
|
+
L as EmbeddedChatInputNotification,
|
|
293
|
+
A as EmbeddedChatInputNotificationClose,
|
|
294
|
+
Z as EmbeddedChatInputNotificationContent,
|
|
295
|
+
_ as EmbeddedChatInputNotificationHeader,
|
|
296
|
+
q as EmbeddedChatInputNotificationMessage,
|
|
297
|
+
S as EmbeddedChatInputNotificationTitle,
|
|
298
|
+
$ as EmbeddedChatMessageFile,
|
|
299
|
+
Y as EmbeddedChatMessageFiles
|
|
300
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),i=require("../ui/recipes/modal.cjs"),m=require("../../utils.cjs"),t=require("../../../primitives/components/embedded-chat/image-preview-modal.cjs"),o=t.EmbeddedChatPrimitiveImagePreviewModal,r=({className:e,...a})=>d.jsx(t.EmbeddedChatPrimitiveImagePreviewModalOverlay,{className:m.cn(i.modal({slot:"overlay"}),e),...a}),l=({className:e,...a})=>d.jsx(t.EmbeddedChatPrimitiveImagePreviewModalContent,{className:m.cn(i.modal({slot:"content"}),"flex flex-col items-center gap-2","max-w-[100vw] max-h-screen","inset-0 m-auto w-fit h-fit transform-none","bg-transparent dark:bg-transparent shadow-none",e),...a}),s=({className:e,...a})=>d.jsx(t.EmbeddedChatPrimitiveImagePreviewModalImage,{className:m.cn("max-w-[calc(100vw_-_theme(spacing.20))] max-h-[calc(100vh_-_theme(spacing.20))] object-contain rounded-lg",e),...a}),n=({className:e,...a})=>d.jsx(t.EmbeddedChatPrimitiveImagePreviewModalFooter,{className:m.cn("flex items-center justify-center w-full gap-4",e),...a}),c=({className:e,...a})=>d.jsx(t.EmbeddedChatPrimitiveImagePreviewModalFileName,{className:m.cn("text-sm text-center text-gray-800 dark:text-white truncate min-w-0",e),...a}),g=({className:e,...a})=>d.jsx(t.EmbeddedChatPrimitiveImagePreviewModalClose,{"aria-label":"Close preview",className:m.cn(i.modal({slot:"close"}),"fixed top-2 right-2 text-gray-700 dark:text-gray-50 hover:bg-white-alpha-100",e),...a});exports.EmbeddedChatImagePreviewModal=o;exports.EmbeddedChatImagePreviewModalClose=g;exports.EmbeddedChatImagePreviewModalContent=l;exports.EmbeddedChatImagePreviewModalFileName=c;exports.EmbeddedChatImagePreviewModalFooter=n;exports.EmbeddedChatImagePreviewModalImage=s;exports.EmbeddedChatImagePreviewModalOverlay=r;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { EmbeddedChatPrimitive } from '../../../primitives';
|
|
2
|
+
import { ComponentPropsWithRef, ForwardRefExoticComponent } from 'react';
|
|
3
|
+
import { PolymorphicProps } from '../..';
|
|
4
|
+
import { DialogProps } from '../../../primitives/atoms/dialog';
|
|
5
|
+
export declare const EmbeddedChatImagePreviewModal: (props: ComponentPropsWithRef<ForwardRefExoticComponent< PolymorphicProps & Omit< DialogProps, "_id"> & Partial<Pick< DialogProps, "_id">>>>) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare const EmbeddedChatImagePreviewModalOverlay: ({ className, ...props }: React.ComponentPropsWithRef<typeof EmbeddedChatPrimitive.ImagePreviewModalOverlay>) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const EmbeddedChatImagePreviewModalContent: ({ className, ...props }: React.ComponentPropsWithRef<typeof EmbeddedChatPrimitive.ImagePreviewModalContent>) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const EmbeddedChatImagePreviewModalImage: ({ className, ...props }: React.ComponentPropsWithRef<typeof EmbeddedChatPrimitive.ImagePreviewModalImage>) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const EmbeddedChatImagePreviewModalFooter: ({ className, ...props }: React.ComponentPropsWithRef<typeof EmbeddedChatPrimitive.ImagePreviewModalFooter>) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const EmbeddedChatImagePreviewModalFileName: ({ className, ...props }: React.ComponentPropsWithRef<typeof EmbeddedChatPrimitive.ImagePreviewModalFileName>) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const EmbeddedChatImagePreviewModalClose: ({ className, ...props }: React.ComponentPropsWithRef<typeof EmbeddedChatPrimitive.ImagePreviewModalClose>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
+
import { modal as d } from "../ui/recipes/modal.js";
|
|
4
|
+
import { cn as m } from "../../utils.js";
|
|
5
|
+
import { EmbeddedChatPrimitiveImagePreviewModal as i, EmbeddedChatPrimitiveImagePreviewModalOverlay as r, EmbeddedChatPrimitiveImagePreviewModalContent as o, EmbeddedChatPrimitiveImagePreviewModalImage as l, EmbeddedChatPrimitiveImagePreviewModalFooter as s, EmbeddedChatPrimitiveImagePreviewModalFileName as n, EmbeddedChatPrimitiveImagePreviewModalClose as c } from "../../../primitives/components/embedded-chat/image-preview-modal.js";
|
|
6
|
+
const P = i, b = ({
|
|
7
|
+
className: e,
|
|
8
|
+
...a
|
|
9
|
+
}) => /* @__PURE__ */ t(
|
|
10
|
+
r,
|
|
11
|
+
{
|
|
12
|
+
className: m(d({ slot: "overlay" }), e),
|
|
13
|
+
...a
|
|
14
|
+
}
|
|
15
|
+
), C = ({
|
|
16
|
+
className: e,
|
|
17
|
+
...a
|
|
18
|
+
}) => /* @__PURE__ */ t(
|
|
19
|
+
o,
|
|
20
|
+
{
|
|
21
|
+
className: m(
|
|
22
|
+
d({ slot: "content" }),
|
|
23
|
+
"flex flex-col items-center gap-2",
|
|
24
|
+
"max-w-[100vw] max-h-screen",
|
|
25
|
+
"inset-0 m-auto w-fit h-fit transform-none",
|
|
26
|
+
"bg-transparent dark:bg-transparent shadow-none",
|
|
27
|
+
e
|
|
28
|
+
),
|
|
29
|
+
...a
|
|
30
|
+
}
|
|
31
|
+
), x = ({
|
|
32
|
+
className: e,
|
|
33
|
+
...a
|
|
34
|
+
}) => /* @__PURE__ */ t(
|
|
35
|
+
l,
|
|
36
|
+
{
|
|
37
|
+
className: m("max-w-[calc(100vw_-_theme(spacing.20))] max-h-[calc(100vh_-_theme(spacing.20))] object-contain rounded-lg", e),
|
|
38
|
+
...a
|
|
39
|
+
}
|
|
40
|
+
), I = ({
|
|
41
|
+
className: e,
|
|
42
|
+
...a
|
|
43
|
+
}) => /* @__PURE__ */ t(
|
|
44
|
+
s,
|
|
45
|
+
{
|
|
46
|
+
className: m("flex items-center justify-center w-full gap-4", e),
|
|
47
|
+
...a
|
|
48
|
+
}
|
|
49
|
+
), p = ({
|
|
50
|
+
className: e,
|
|
51
|
+
...a
|
|
52
|
+
}) => /* @__PURE__ */ t(
|
|
53
|
+
n,
|
|
54
|
+
{
|
|
55
|
+
className: m("text-sm text-center text-gray-800 dark:text-white truncate min-w-0", e),
|
|
56
|
+
...a
|
|
57
|
+
}
|
|
58
|
+
), E = ({
|
|
59
|
+
className: e,
|
|
60
|
+
...a
|
|
61
|
+
}) => /* @__PURE__ */ t(
|
|
62
|
+
c,
|
|
63
|
+
{
|
|
64
|
+
"aria-label": "Close preview",
|
|
65
|
+
className: m(d({ slot: "close" }), "fixed top-2 right-2 text-gray-700 dark:text-gray-50 hover:bg-white-alpha-100", e),
|
|
66
|
+
...a
|
|
67
|
+
}
|
|
68
|
+
);
|
|
69
|
+
export {
|
|
70
|
+
P as EmbeddedChatImagePreviewModal,
|
|
71
|
+
E as EmbeddedChatImagePreviewModalClose,
|
|
72
|
+
C as EmbeddedChatImagePreviewModalContent,
|
|
73
|
+
p as EmbeddedChatImagePreviewModalFileName,
|
|
74
|
+
I as EmbeddedChatImagePreviewModalFooter,
|
|
75
|
+
x as EmbeddedChatImagePreviewModalImage,
|
|
76
|
+
b as EmbeddedChatImagePreviewModalOverlay
|
|
77
|
+
};
|