@inkeep/agents-ui 0.14.27 → 0.15.0
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 +215 -203
- package/dist/primitives/atoms/icons/built-in-icons.cjs +1 -1
- package/dist/primitives/atoms/icons/built-in-icons.d.ts +1 -0
- package/dist/primitives/atoms/icons/built-in-icons.js +44 -43
- package/dist/primitives/atoms/icons/checkbox-icon.cjs +1 -1
- package/dist/primitives/atoms/icons/checkbox-icon.js +1 -1
- package/dist/primitives/atoms/icons/inkeep-default-icons.cjs +1 -1
- package/dist/primitives/atoms/icons/inkeep-default-icons.js +3 -2
- package/dist/primitives/components/chat-bubble/index.cjs +1 -0
- package/dist/primitives/components/chat-bubble/index.d.ts +10 -0
- package/dist/primitives/components/chat-bubble/index.js +38 -0
- package/dist/primitives/components/chat-button.cjs +1 -1
- package/dist/primitives/components/chat-button.d.ts +3 -1
- package/dist/primitives/components/chat-button.js +31 -26
- package/dist/primitives/components/index.cjs +1 -1
- package/dist/primitives/components/index.d.ts +1 -0
- package/dist/primitives/components/index.js +19 -17
- package/dist/primitives/components/modal/use-inkeep-modal.cjs +1 -1
- package/dist/primitives/components/modal/use-inkeep-modal.d.ts +2 -2
- package/dist/primitives/components/modal/use-inkeep-modal.js +6 -42
- package/dist/primitives/components/modal/widget-auto-focus.cjs +1 -1
- package/dist/primitives/components/modal/widget-auto-focus.js +21 -12
- package/dist/primitives/components/modal.d.ts +2 -2
- package/dist/primitives/components/searchbar.d.ts +3 -3
- package/dist/primitives/components/sidebar-chat/index.cjs +1 -1
- package/dist/primitives/components/sidebar-chat/index.js +48 -67
- package/dist/primitives/components/use-component-trigger.cjs +1 -1
- package/dist/primitives/components/use-component-trigger.d.ts +1 -1
- package/dist/primitives/components/use-component-trigger.js +4 -3
- package/dist/primitives/hooks/index.cjs +1 -1
- package/dist/primitives/hooks/index.d.ts +1 -0
- package/dist/primitives/hooks/index.js +18 -16
- package/dist/primitives/hooks/use-inkeep-open-state.cjs +1 -0
- package/dist/primitives/hooks/use-inkeep-open-state.d.ts +18 -0
- package/dist/primitives/hooks/use-inkeep-open-state.js +47 -0
- package/dist/primitives/index.cjs +1 -1
- package/dist/primitives/index.js +140 -130
- package/dist/primitives/providers/base-events-provider.cjs +1 -1
- package/dist/primitives/providers/base-events-provider.js +1 -1
- package/dist/primitives/providers/chat-bubble-provider.cjs +1 -0
- package/dist/primitives/providers/chat-bubble-provider.d.ts +22 -0
- package/dist/primitives/providers/chat-bubble-provider.js +19 -0
- package/dist/primitives/providers/config-provider.cjs +1 -1
- package/dist/primitives/providers/config-provider.d.ts +0 -1
- package/dist/primitives/providers/config-provider.js +12 -13
- package/dist/primitives/providers/index.cjs +1 -1
- package/dist/primitives/providers/index.d.ts +1 -0
- package/dist/primitives/providers/index.js +27 -22
- package/dist/primitives/providers/sidebar-chat-provider.cjs +1 -1
- package/dist/primitives/providers/sidebar-chat-provider.d.ts +3 -25
- package/dist/primitives/providers/sidebar-chat-provider.js +23 -27
- package/dist/primitives/utils/component-ids.cjs +1 -1
- package/dist/primitives/utils/component-ids.d.ts +10 -0
- package/dist/primitives/utils/component-ids.js +10 -3
- package/dist/react/chat-button.cjs +1 -1
- package/dist/react/chat-button.d.ts +23 -7
- package/dist/react/chat-button.js +55 -46
- package/dist/react/embedded-chat.cjs +1 -1
- package/dist/react/embedded-chat.d.ts +4 -3
- package/dist/react/embedded-chat.js +171 -177
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.js +215 -203
- package/dist/react/modal.chat.cjs +1 -1
- package/dist/react/modal.chat.d.ts +6 -3
- package/dist/react/modal.chat.js +10 -10
- package/dist/react/modal.cjs +1 -1
- package/dist/react/modal.d.ts +2 -2
- package/dist/react/modal.js +5 -5
- package/dist/react/modal.search-and-chat.cjs +1 -1
- package/dist/react/modal.search-and-chat.d.ts +2 -2
- package/dist/react/modal.search-and-chat.js +15 -15
- package/dist/react/modal.search.cjs +1 -1
- package/dist/react/modal.search.d.ts +2 -2
- package/dist/react/modal.search.js +8 -8
- package/dist/react/searchbar.cjs +1 -1
- package/dist/react/searchbar.d.ts +4 -4
- package/dist/react/searchbar.js +12 -12
- package/dist/react/sidebar-chat.d.ts +1 -3
- package/dist/styled/components/chat-bubble.cjs +1 -0
- package/dist/styled/components/chat-bubble.d.ts +5 -0
- package/dist/styled/components/chat-bubble.js +70 -0
- package/dist/styled/components/chat-button.cjs +1 -1
- package/dist/styled/components/chat-button.d.ts +2 -1
- package/dist/styled/components/chat-button.js +10 -6
- package/dist/styled/components/embedded-chat.cjs +1 -1
- package/dist/styled/components/embedded-chat.js +331 -320
- package/dist/styled/components/embedded-search.cjs +1 -1
- package/dist/styled/components/embedded-search.js +3 -3
- package/dist/styled/components/index.cjs +1 -1
- package/dist/styled/components/index.d.ts +1 -0
- package/dist/styled/components/index.js +14 -12
- package/dist/styled/components/message.cjs +1 -1
- package/dist/styled/components/message.js +28 -25
- package/dist/styled/components/ui/recipes/button.cjs +1 -1
- package/dist/styled/components/ui/recipes/button.js +1 -1
- package/dist/styled/components/ui/recipes/checkbox.cjs +1 -1
- package/dist/styled/components/ui/recipes/checkbox.js +1 -1
- package/dist/styled/components/ui/recipes/input.cjs +1 -1
- package/dist/styled/components/ui/recipes/input.js +2 -2
- package/dist/styled/components/ui/recipes/markdown.cjs +1 -1
- package/dist/styled/components/ui/recipes/markdown.js +3 -3
- package/dist/styled/components/ui/recipes/select.cjs +1 -1
- package/dist/styled/components/ui/recipes/select.js +2 -2
- package/dist/styled/index.cjs +1 -1
- package/dist/styled/index.js +174 -162
- package/dist/styled/inkeep.css.cjs +218 -99
- package/dist/styled/inkeep.css.js +218 -99
- package/dist/types/config/open-settings.d.ts +70 -0
- package/dist/types/config/settings/form.d.ts +0 -53
- package/dist/types/events.d.ts +9 -1
- package/dist/types/icons/built-in.d.ts +1 -1
- package/dist/types/icons/custom.d.ts +1 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/js/index.d.ts +2 -2
- package/package.json +1 -1
- package/dist/types/config/modal.d.ts +0 -33
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { GrBlog as e } from "./collections/gr.js";
|
|
3
|
-
import { BiLogoTelegram as r, BiLogoDiscordAlt as
|
|
3
|
+
import { BiLogoTelegram as r, BiLogoDiscordAlt as n, BiLogoDiscourse as a } from "./collections/bi.js";
|
|
4
4
|
import { PiFilePdf as i, PiFilePdfFill as l, PiCaretUpDownFill as t } from "./collections/pi.js";
|
|
5
5
|
import { FiEdit as u } from "./collections/fi.js";
|
|
6
|
-
import { IoOpenOutline as
|
|
7
|
-
import {
|
|
6
|
+
import { IoOpenOutline as L, IoMail as h, IoHomeOutline as s, IoCheckmarkDoneOutline as C, IoPencilOutline as c, IoPlayCircleOutline as m, IoTerminal as p, IoLogoGithub as o, IoLogoDiscord as I, IoChatbubblesOutline as F, IoDocumentTextOutline as k, IoPeopleOutline as D, IoHelpBuoyOutline as d, IoReaderOutline as O, IoBookOutline as g, IoCheckmarkOutline as f, IoCloseOutline as w, IoReturnDownForward as S, IoChevronForwardOutline as b, IoReturnDownBackOutline as P, IoCopy as B, IoCopyOutline as T, IoSearch as R, IoThumbsDownSharp as U, IoThumbsUpSharp as v, IoLinkOutline as y, IoInformationCircleOutline as G, IoSend as A, IoDocumentSharp as x, IoDocumentTextSharp as H, IoLogoSlack as M, IoLogoChrome as q, IoLogoStackoverflow as E } from "./collections/io5.js";
|
|
7
|
+
import { Send as j, Headset as z, Calendar as J, CornerDownRight as K, Sparkles as N, LoaderCircle as Q, ChevronDown as V, BookOpen as W, ArrowUpRight as X, User as Y, Users as Z, ThumbsUp as _, ThumbsDown as $, Repeat as oo, Link as eo, Globe as ro, CornerDownLeft as no, Check as ao, Copy as io, Command as lo, CircleCheck as to, ArrowLeft as uo, Search as Lo, Table as ho, BriefcaseBusiness as so, ChevronUp as Co, ChevronRight as co, SquarePen as mo, Pencil as po, Mail as Io, Phone as Fo, Database as ko, BookText as Do } from "lucide-react";
|
|
8
8
|
const Po = {
|
|
9
|
-
FaBook:
|
|
9
|
+
FaBook: Do,
|
|
10
10
|
FaGithub: o,
|
|
11
|
-
FaDatabase:
|
|
11
|
+
FaDatabase: ko,
|
|
12
12
|
FaStackOverflow: E,
|
|
13
13
|
FaChrome: q,
|
|
14
|
-
FaPhone:
|
|
15
|
-
FaEnvelope:
|
|
16
|
-
FaPencil:
|
|
14
|
+
FaPhone: Fo,
|
|
15
|
+
FaEnvelope: Io,
|
|
16
|
+
FaPencil: po,
|
|
17
17
|
FaBlog: e,
|
|
18
18
|
FaSort: t,
|
|
19
|
-
FaPenSquare:
|
|
20
|
-
FaChevronRight:
|
|
21
|
-
FaChevronUp:
|
|
19
|
+
FaPenSquare: mo,
|
|
20
|
+
FaChevronRight: co,
|
|
21
|
+
FaChevronUp: Co,
|
|
22
22
|
FaFilePdf: l,
|
|
23
|
-
FaDiscourse:
|
|
24
|
-
FaDiscord:
|
|
23
|
+
FaDiscourse: a,
|
|
24
|
+
FaDiscord: n,
|
|
25
25
|
FaSlack: M,
|
|
26
26
|
IoDocumentTextSharp: H,
|
|
27
27
|
IoDocumentSharp: x,
|
|
@@ -33,14 +33,14 @@ const Po = {
|
|
|
33
33
|
IoSearch: R,
|
|
34
34
|
IoCopyOutline: T,
|
|
35
35
|
IoCopy: B,
|
|
36
|
-
IoReturnDownBackOutline:
|
|
37
|
-
IoChevronForwardOutline:
|
|
38
|
-
IoReturnDownForward:
|
|
36
|
+
IoReturnDownBackOutline: P,
|
|
37
|
+
IoChevronForwardOutline: b,
|
|
38
|
+
IoReturnDownForward: S,
|
|
39
39
|
IoCloseOutline: w,
|
|
40
40
|
IoCheckmarkOutline: f,
|
|
41
|
-
IoBookOutline:
|
|
42
|
-
IoReaderOutline:
|
|
43
|
-
IoHelpBuoyOutline:
|
|
41
|
+
IoBookOutline: g,
|
|
42
|
+
IoReaderOutline: O,
|
|
43
|
+
IoHelpBuoyOutline: d,
|
|
44
44
|
IoPeopleOutline: D,
|
|
45
45
|
IoDocumentTextOutline: k,
|
|
46
46
|
IoChatbubblesOutline: F,
|
|
@@ -48,38 +48,39 @@ const Po = {
|
|
|
48
48
|
IoLogoDiscord: I,
|
|
49
49
|
IoLogoGithub: o,
|
|
50
50
|
IoTerminal: p,
|
|
51
|
-
FaBriefcase:
|
|
51
|
+
FaBriefcase: so,
|
|
52
52
|
IoPlayCircleOutline: m,
|
|
53
53
|
IoPencilOutline: c,
|
|
54
54
|
IoCheckmarkDoneOutline: C,
|
|
55
55
|
IoHomeOutline: s,
|
|
56
|
-
IoMail:
|
|
57
|
-
IoOpenOutline:
|
|
56
|
+
IoMail: h,
|
|
57
|
+
IoOpenOutline: L,
|
|
58
58
|
FaTelegram: r,
|
|
59
59
|
FaTable: ho,
|
|
60
|
-
FaMagnifyingGlass:
|
|
61
|
-
LuArrowLeft:
|
|
62
|
-
LuCircleCheck:
|
|
63
|
-
LuCommand:
|
|
64
|
-
LuCopy:
|
|
60
|
+
FaMagnifyingGlass: Lo,
|
|
61
|
+
LuArrowLeft: uo,
|
|
62
|
+
LuCircleCheck: to,
|
|
63
|
+
LuCommand: lo,
|
|
64
|
+
LuCopy: io,
|
|
65
65
|
LuCheck: ao,
|
|
66
|
-
LuCornerDownLeft:
|
|
67
|
-
LuGlobe:
|
|
68
|
-
LuLink:
|
|
69
|
-
LuRepeat:
|
|
70
|
-
LuThumbsDown:
|
|
71
|
-
LuThumbsUp:
|
|
72
|
-
LuUsers:
|
|
73
|
-
LuUser:
|
|
74
|
-
LuArrowUpRight:
|
|
75
|
-
LuBookOpen:
|
|
76
|
-
LuChevronDown:
|
|
77
|
-
LuLoaderCircle:
|
|
66
|
+
LuCornerDownLeft: no,
|
|
67
|
+
LuGlobe: ro,
|
|
68
|
+
LuLink: eo,
|
|
69
|
+
LuRepeat: oo,
|
|
70
|
+
LuThumbsDown: $,
|
|
71
|
+
LuThumbsUp: _,
|
|
72
|
+
LuUsers: Z,
|
|
73
|
+
LuUser: Y,
|
|
74
|
+
LuArrowUpRight: X,
|
|
75
|
+
LuBookOpen: W,
|
|
76
|
+
LuChevronDown: V,
|
|
77
|
+
LuLoaderCircle: Q,
|
|
78
78
|
FiEdit: u,
|
|
79
|
-
LuSparkles:
|
|
80
|
-
LuCornerDownRight:
|
|
81
|
-
LuCalendar:
|
|
82
|
-
LuHeadset:
|
|
79
|
+
LuSparkles: N,
|
|
80
|
+
LuCornerDownRight: K,
|
|
81
|
+
LuCalendar: J,
|
|
82
|
+
LuHeadset: z,
|
|
83
|
+
LuSend: j
|
|
83
84
|
};
|
|
84
85
|
export {
|
|
85
86
|
Po as iconMap
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime");function o(){return e.jsxs("svg",{viewBox:"0 0 12 10",style:{width:"1.2em",fill:"none",strokeWidth:
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime");function o(){return e.jsxs("svg",{viewBox:"0 0 12 10",style:{width:"1.2em",fill:"none",strokeWidth:1.5,stroke:"currentColor",strokeDasharray:16},children:[e.jsx("title",{children:"Checkbox Icon"}),e.jsx("polyline",{points:"1.5 6 4.5 9 10.5 1"})]})}exports.CheckboxIcon=o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={search:"IoSearch",thumbsUp:"LuThumbsUp",thumbsDown:"LuThumbsDown",messageCopy:"LuCopy",messageCopied:"LuCheck",messageRevise:"FiEdit",codeCopy:"LuCopy",codeCopied:"LuCheck",openLinkInNewTab:"LuArrowUpRight",openLinkInSameTab:"LuCornerDownLeft",newLine:"LuCornerDownRight",breadcrumbSeparator:"FaChevronRight",switchToSearch:"IoSearch",switchToChat:"LuSparkles",chatSubmit:"
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={search:"IoSearch",thumbsUp:"LuThumbsUp",thumbsDown:"LuThumbsDown",messageCopy:"LuCopy",messageCopied:"LuCheck",messageRevise:"FiEdit",codeCopy:"LuCopy",codeCopied:"LuCheck",openLinkInNewTab:"LuArrowUpRight",openLinkInSameTab:"LuCornerDownLeft",newLine:"LuCornerDownRight",breadcrumbSeparator:"FaChevronRight",switchToSearch:"IoSearch",switchToChat:"LuSparkles",chatSubmit:"LuSend",close:"IoCloseOutline",info:"IoInformationCircleOutline",command:"LuCommand",chatButtonClose:"LuChevronDown"};exports.defaultBuiltInIcons=e;
|
|
@@ -14,10 +14,11 @@ const e = {
|
|
|
14
14
|
breadcrumbSeparator: "FaChevronRight",
|
|
15
15
|
switchToSearch: "IoSearch",
|
|
16
16
|
switchToChat: "LuSparkles",
|
|
17
|
-
chatSubmit: "
|
|
17
|
+
chatSubmit: "LuSend",
|
|
18
18
|
close: "IoCloseOutline",
|
|
19
19
|
info: "IoInformationCircleOutline",
|
|
20
|
-
command: "LuCommand"
|
|
20
|
+
command: "LuCommand",
|
|
21
|
+
chatButtonClose: "LuChevronDown"
|
|
21
22
|
};
|
|
22
23
|
export {
|
|
23
24
|
e as defaultBuiltInIcons
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),u=require("react"),c=require("../factory.cjs"),s=require("../../providers/chat-bubble-provider.cjs"),b=require("../presence.cjs"),l=require("../../utils/misc.cjs"),d=require("../../atoms/icons/built-in-icon-renderer.cjs"),B=c.ikp(b.Presence,{_id:"chatBubble__Root"}),a=u.forwardRef((e,t)=>{const{openSettings:o,...i}=e,n=s.useInkeepChatBubble(o);return r.jsx(s.ChatBubbleProvider,{value:n,children:r.jsx(B,{ref:t,present:n.isOpen,"data-open":l.dataAttr(n.isOpen),"data-chat-bubble":"",...i})})}),h=c.ikp("div",{_id:"chatBubble__Header"}),C=u.forwardRef((e,t)=>r.jsx(h,{ref:t,...e})),p=c.ikp("button",{_id:"chatBubble__CloseButton",children:r.jsx(d.BuiltInIconRenderer,{iconSettings:{builtIn:"IoCloseOutline"}})}),v=u.forwardRef((e,t)=>{const{setOpen:o}=s.useChatBubble(),i=()=>{o(!1)};return r.jsx(p,{ref:t,onClick:i,...e})});exports.ChatBubblePrimitiveRoot=a;exports.CloseButton=v;exports.Header=C;exports.Root=a;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { OpenSettingsChatButton } from '../../../types/index.ts';
|
|
2
|
+
import { ForwardRefExoticComponent, RefAttributes, DetailedHTMLProps, HTMLAttributes, ButtonHTMLAttributes } from 'react';
|
|
3
|
+
import { PolymorphicProps } from '..';
|
|
4
|
+
import { PresenceProps } from '../presence';
|
|
5
|
+
export declare const ChatBubblePrimitiveRoot: ForwardRefExoticComponent<Omit<Omit< PolymorphicProps & Omit< PresenceProps & RefAttributes<HTMLDivElement>, "_id"> & Partial<Pick< PresenceProps & RefAttributes<HTMLDivElement>, "_id">>, "present"> & {
|
|
6
|
+
openSettings: OpenSettingsChatButton;
|
|
7
|
+
}, "ref"> & RefAttributes<HTMLDivElement>>;
|
|
8
|
+
declare const ChatBubblePrimitiveHeader: ForwardRefExoticComponent<Omit< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id">>, "ref"> & RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare const ChatBubblePrimitiveCloseButton: ForwardRefExoticComponent<Omit< PolymorphicProps & Omit< DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "children" | "_id"> & Partial<Pick< DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "children" | "_id">>, "ref"> & RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
export { ChatBubblePrimitiveRoot as Root, ChatBubblePrimitiveCloseButton as CloseButton, ChatBubblePrimitiveHeader as Header, };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as n } from "react";
|
|
3
|
+
import { ikp as s } from "../factory.js";
|
|
4
|
+
import { useInkeepChatBubble as l, ChatBubbleProvider as b, useChatBubble as u } from "../../providers/chat-bubble-provider.js";
|
|
5
|
+
import { Presence as c } from "../presence.js";
|
|
6
|
+
import { dataAttr as m } from "../../utils/misc.js";
|
|
7
|
+
import { BuiltInIconRenderer as d } from "../../atoms/icons/built-in-icon-renderer.js";
|
|
8
|
+
const p = s(c, {
|
|
9
|
+
_id: "chatBubble__Root"
|
|
10
|
+
}), I = n((t, e) => {
|
|
11
|
+
const { openSettings: i, ...a } = t, r = l(i);
|
|
12
|
+
return /* @__PURE__ */ o(b, { value: r, children: /* @__PURE__ */ o(
|
|
13
|
+
p,
|
|
14
|
+
{
|
|
15
|
+
ref: e,
|
|
16
|
+
present: r.isOpen,
|
|
17
|
+
"data-open": m(r.isOpen),
|
|
18
|
+
"data-chat-bubble": "",
|
|
19
|
+
...a
|
|
20
|
+
}
|
|
21
|
+
) });
|
|
22
|
+
}), h = s("div", {
|
|
23
|
+
_id: "chatBubble__Header"
|
|
24
|
+
}), H = n((t, e) => /* @__PURE__ */ o(h, { ref: e, ...t })), B = s("button", {
|
|
25
|
+
_id: "chatBubble__CloseButton",
|
|
26
|
+
children: /* @__PURE__ */ o(d, { iconSettings: { builtIn: "IoCloseOutline" } })
|
|
27
|
+
}), O = n((t, e) => {
|
|
28
|
+
const { setOpen: i } = u();
|
|
29
|
+
return /* @__PURE__ */ o(B, { ref: e, onClick: () => {
|
|
30
|
+
i(!1);
|
|
31
|
+
}, ...t });
|
|
32
|
+
});
|
|
33
|
+
export {
|
|
34
|
+
I as ChatBubblePrimitiveRoot,
|
|
35
|
+
O as CloseButton,
|
|
36
|
+
H as Header,
|
|
37
|
+
I as Root
|
|
38
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("react/jsx-runtime"),u=require("react"),B=require("@radix-ui/react-avatar"),a=require("./factory.cjs"),_=require("../atoms/avatars/ai.cjs"),f=require("../providers/config-provider.cjs"),p=require("../utils/compose-event-handlers.cjs"),A=require("../../color-mode/index.cjs"),P=require("../atoms/icons/custom-icon.cjs");function I(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const l=I(B),k=a.ikp("div",{_id:"chatButton__Container"}),y=a.ikp("button",{_id:"chatButton__Button"}),b=a.ikp("div",{_id:"chatButton__Text"}),q=a.ikp(l.Root,{_id:"chatButton__AvatarContent"}),S=a.ikp(l.Image,{_id:"chatButton__AvatarImage"}),j=a.ikp(P.CustomIcon,{_id:"chatButton__CloseIcon",iconKey:"chatButtonClose"}),d=u.memo(e=>{const{onLoadingStatusChange:n,avatar:t,...o}=e,{aiChatSettings:h}=f.useInkeepConfig(),{aiAssistantAvatar:i}=h??{},r=typeof t=="string"?t:A.useColorModeValue(t?.light,t?.dark),c=typeof i=="string"?i:i?.dark,[s,v]=u.useState(r??c);u.useEffect(()=>{v(r??c)},[r,c]);const m=g=>{g==="error"&&v(null)};return s?C.jsx(S,{src:s,alt:"Chat avatar","data-type":"image",onLoadingStatusChange:p.composeEventHandlers(n,m),...o}):C.jsx(_.default,{"data-type":"icon",...e})});exports.ChatButton=y;exports.ChatButtonAvatarContent=q;exports.ChatButtonAvatarImage=d;exports.ChatButtonCloseIcon=j;exports.ChatButtonContainer=k;exports.ChatButtonPrimitiveAvatarImage=d;exports.ChatButtonText=b;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { ComponentPropsWithRef, ForwardRefExoticComponent, DetailedHTMLProps, HTMLAttributes, ButtonHTMLAttributes, RefAttributes, MemoExoticComponent } from 'react';
|
|
2
2
|
import { InkeepAIChatSettings } from '../../types/index.ts';
|
|
3
3
|
import { PolymorphicProps } from './factory';
|
|
4
|
+
import { CustomIconProps } from '..';
|
|
4
5
|
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
5
6
|
declare const ChatButtonPrimitiveContainer: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id">>>;
|
|
6
7
|
declare const ChatButtonPrimitiveButton: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "_id"> & Partial<Pick< DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "_id">>>;
|
|
7
8
|
declare const ChatButtonPrimitiveText: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id">>>;
|
|
8
9
|
declare const PrimitiveChatButtonAvatarContent: ForwardRefExoticComponent< PolymorphicProps & Omit<AvatarPrimitive.AvatarProps & RefAttributes<HTMLSpanElement>, "_id"> & Partial<Pick<AvatarPrimitive.AvatarProps & RefAttributes<HTMLSpanElement>, "_id">>>;
|
|
9
10
|
declare const PrimitiveChatButtonAvatarImage: ForwardRefExoticComponent< PolymorphicProps & Omit<AvatarPrimitive.AvatarImageProps & RefAttributes<HTMLImageElement>, "_id"> & Partial<Pick<AvatarPrimitive.AvatarImageProps & RefAttributes<HTMLImageElement>, "_id">>>;
|
|
11
|
+
declare const ChatButtonPrimitiveCloseIcon: ForwardRefExoticComponent< PolymorphicProps & Omit< CustomIconProps, "_id" | "iconKey"> & Partial<Pick< CustomIconProps, "_id" | "iconKey">>>;
|
|
10
12
|
type OnLoadingStatusChange = AvatarPrimitive.AvatarImageProps['onLoadingStatusChange'];
|
|
11
13
|
type AvatarImageProps = {
|
|
12
14
|
onLoadingStatusChange?: OnLoadingStatusChange;
|
|
@@ -15,4 +17,4 @@ type ChatButtonPrimitiveAvatarImageProps = AvatarImageProps & {
|
|
|
15
17
|
avatar?: InkeepAIChatSettings['aiAssistantAvatar'];
|
|
16
18
|
};
|
|
17
19
|
export declare const ChatButtonPrimitiveAvatarImage: MemoExoticComponent<(props: ChatButtonPrimitiveAvatarImageProps) => import("react/jsx-runtime").JSX.Element>;
|
|
18
|
-
export { ChatButtonPrimitiveContainer as ChatButtonContainer, ChatButtonPrimitiveText as ChatButtonText, ChatButtonPrimitiveButton as ChatButton, ChatButtonPrimitiveAvatarImage as ChatButtonAvatarImage, PrimitiveChatButtonAvatarContent as ChatButtonAvatarContent, };
|
|
20
|
+
export { ChatButtonPrimitiveContainer as ChatButtonContainer, ChatButtonPrimitiveText as ChatButtonText, ChatButtonPrimitiveButton as ChatButton, ChatButtonPrimitiveAvatarImage as ChatButtonAvatarImage, PrimitiveChatButtonAvatarContent as ChatButtonAvatarContent, ChatButtonPrimitiveCloseIcon as ChatButtonCloseIcon, };
|
|
@@ -1,46 +1,51 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { memo as
|
|
4
|
-
import * as
|
|
2
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
3
|
+
import { memo as B, useState as d, useEffect as g } from "react";
|
|
4
|
+
import * as m from "@radix-ui/react-avatar";
|
|
5
5
|
import { ikp as t } from "./factory.js";
|
|
6
|
-
import
|
|
6
|
+
import l from "../atoms/avatars/ai.js";
|
|
7
7
|
import { useInkeepConfig as _ } from "../providers/config-provider.js";
|
|
8
|
-
import { composeEventHandlers as
|
|
8
|
+
import { composeEventHandlers as f } from "../utils/compose-event-handlers.js";
|
|
9
9
|
import { useColorModeValue as p } from "../../color-mode/index.js";
|
|
10
|
-
|
|
10
|
+
import { CustomIcon as A } from "../atoms/icons/custom-icon.js";
|
|
11
|
+
const U = t("div", {
|
|
11
12
|
_id: "chatButton__Container"
|
|
12
|
-
}),
|
|
13
|
+
}), j = t("button", {
|
|
13
14
|
_id: "chatButton__Button"
|
|
14
|
-
}),
|
|
15
|
+
}), H = t("div", {
|
|
15
16
|
_id: "chatButton__Text"
|
|
16
|
-
}),
|
|
17
|
+
}), K = t(m.Root, {
|
|
17
18
|
_id: "chatButton__AvatarContent"
|
|
18
|
-
}),
|
|
19
|
+
}), I = t(m.Image, {
|
|
19
20
|
_id: "chatButton__AvatarImage"
|
|
20
|
-
}),
|
|
21
|
-
|
|
21
|
+
}), M = t(A, {
|
|
22
|
+
_id: "chatButton__CloseIcon",
|
|
23
|
+
iconKey: "chatButtonClose"
|
|
24
|
+
}), R = B((e) => {
|
|
25
|
+
const { onLoadingStatusChange: c, avatar: a, ...C } = e, { aiChatSettings: h } = _(), { aiAssistantAvatar: o } = h ?? {}, n = typeof a == "string" ? a : p(a?.light, a?.dark), i = typeof o == "string" ? o : o?.dark, [r, s] = d(
|
|
22
26
|
n ?? i
|
|
23
27
|
);
|
|
24
|
-
return
|
|
28
|
+
return g(() => {
|
|
25
29
|
s(n ?? i);
|
|
26
|
-
}, [n, i]),
|
|
27
|
-
|
|
30
|
+
}, [n, i]), r ? /* @__PURE__ */ u(
|
|
31
|
+
I,
|
|
28
32
|
{
|
|
29
|
-
src:
|
|
33
|
+
src: r,
|
|
30
34
|
alt: "Chat avatar",
|
|
31
35
|
"data-type": "image",
|
|
32
|
-
onLoadingStatusChange:
|
|
33
|
-
|
|
36
|
+
onLoadingStatusChange: f(c, (v) => {
|
|
37
|
+
v === "error" && s(null);
|
|
34
38
|
}),
|
|
35
|
-
...
|
|
39
|
+
...C
|
|
36
40
|
}
|
|
37
|
-
) : /* @__PURE__ */
|
|
41
|
+
) : /* @__PURE__ */ u(l, { "data-type": "icon", ...e });
|
|
38
42
|
});
|
|
39
43
|
export {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
j as ChatButton,
|
|
45
|
+
K as ChatButtonAvatarContent,
|
|
46
|
+
R as ChatButtonAvatarImage,
|
|
47
|
+
M as ChatButtonCloseIcon,
|
|
48
|
+
U as ChatButtonContainer,
|
|
49
|
+
R as ChatButtonPrimitiveAvatarImage,
|
|
50
|
+
H as ChatButtonText
|
|
46
51
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./factory.cjs"),o=require("./embedded-chat.cjs"),a=require("./sidebar-chat/index.cjs"),i=require("./embedded-chat/chat-provider.cjs"),d=require("./embedded-search.cjs"),e=require("./embedded-search/search-provider.cjs"),c=require("./modal.cjs"),t=require("./modal/modal-provider.cjs"),s=require("./chat-button.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./factory.cjs"),o=require("./embedded-chat.cjs"),a=require("./sidebar-chat/index.cjs"),i=require("./embedded-chat/chat-provider.cjs"),d=require("./embedded-search.cjs"),e=require("./embedded-search/search-provider.cjs"),c=require("./modal.cjs"),t=require("./modal/modal-provider.cjs"),s=require("./chat-button.cjs"),u=require("./searchbar.cjs"),h=require("./chat-bubble/index.cjs");exports.ikp=r.ikp;exports.jsxFactory=r.jsxFactory;exports.EmbeddedChatPrimitive=o;exports.SidebarChatPrimitive=a;exports.ChatProvider=i.ChatProvider;exports.useChat=i.useChat;exports.EmbeddedSearchPrimitive=d;exports.SearchProvider=e.SearchProvider;exports.SearchProviderImpl=e.SearchProviderImpl;exports.useSearch=e.useSearch;exports.ModalPrimitive=c;exports.ModalProvider=t.ModalProvider;exports.useModal=t.useModal;exports.ChatButtonPrimitive=s;exports.SearchBarPrimitive=u;exports.ChatBubblePrimitive=h;
|
|
@@ -1,27 +1,29 @@
|
|
|
1
|
-
import { ikp as
|
|
1
|
+
import { ikp as s, jsxFactory as h } from "./factory.js";
|
|
2
2
|
import * as r from "./embedded-chat.js";
|
|
3
3
|
import * as e from "./sidebar-chat/index.js";
|
|
4
|
-
import { ChatProvider as
|
|
4
|
+
import { ChatProvider as f, useChat as v } from "./embedded-chat/chat-provider.js";
|
|
5
5
|
import * as o from "./embedded-search.js";
|
|
6
|
-
import { SearchProvider as
|
|
7
|
-
import * as
|
|
8
|
-
import { ModalProvider as
|
|
9
|
-
import * as
|
|
6
|
+
import { SearchProvider as c, SearchProviderImpl as b, useSearch as C } from "./embedded-search/search-provider.js";
|
|
7
|
+
import * as t from "./modal.js";
|
|
8
|
+
import { ModalProvider as l, useModal as u } from "./modal/modal-provider.js";
|
|
9
|
+
import * as a from "./chat-button.js";
|
|
10
10
|
import * as i from "./searchbar.js";
|
|
11
|
+
import * as m from "./chat-bubble/index.js";
|
|
11
12
|
export {
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
m as ChatBubblePrimitive,
|
|
14
|
+
a as ChatButtonPrimitive,
|
|
15
|
+
f as ChatProvider,
|
|
14
16
|
r as EmbeddedChatPrimitive,
|
|
15
17
|
o as EmbeddedSearchPrimitive,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
t as ModalPrimitive,
|
|
19
|
+
l as ModalProvider,
|
|
18
20
|
i as SearchBarPrimitive,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
c as SearchProvider,
|
|
22
|
+
b as SearchProviderImpl,
|
|
21
23
|
e as SidebarChatPrimitive,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
s as ikp,
|
|
25
|
+
h as jsxFactory,
|
|
26
|
+
v as useChat,
|
|
27
|
+
u as useModal,
|
|
28
|
+
C as useSearch
|
|
27
29
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../hooks/use-inkeep-open-state.cjs"),n=e=>t.useInkeepOpenState(e,{eventNamePrefix:"modal",defaultTriggerSelector:"[data-inkeep-modal-trigger]"});exports.useInkeepModal=n;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OpenSettingsModal } from '../../../types/index.ts';
|
|
2
2
|
import { SetStateAction } from 'react';
|
|
3
|
-
export declare const useInkeepModal: (props:
|
|
3
|
+
export declare const useInkeepModal: (props: OpenSettingsModal | undefined) => {
|
|
4
4
|
isOpen: boolean;
|
|
5
5
|
setOpen: (value: SetStateAction<boolean>) => void;
|
|
6
6
|
shortcutKey: string | null | undefined;
|
|
@@ -1,45 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const {
|
|
8
|
-
isOpen: t,
|
|
9
|
-
onOpenChange: l,
|
|
10
|
-
defaultOpen: u = !1,
|
|
11
|
-
shortcutKey: r,
|
|
12
|
-
triggerSelector: c = "[data-inkeep-modal-trigger]"
|
|
13
|
-
} = i ?? {}, { logEvent: f } = g(), [n = u, o] = m({
|
|
14
|
-
prop: t,
|
|
15
|
-
defaultProp: t ?? !1,
|
|
16
|
-
onChange: l
|
|
17
|
-
});
|
|
18
|
-
y({
|
|
19
|
-
triggerSelector: c,
|
|
20
|
-
onTriggerClick: () => o(!n)
|
|
21
|
-
});
|
|
22
|
-
const s = d(!0);
|
|
23
|
-
return p(() => {
|
|
24
|
-
if (s.current) {
|
|
25
|
-
s.current = !1;
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
f({
|
|
29
|
-
eventName: n ? "modal_opened" : "modal_closed",
|
|
30
|
-
properties: {}
|
|
31
|
-
});
|
|
32
|
-
}, [n]), p(() => {
|
|
33
|
-
const a = (e) => {
|
|
34
|
-
r && (e.metaKey || e.ctrlKey) && e.key.toLowerCase() === r.toLowerCase() && (e.preventDefault(), e.stopPropagation(), o(!0)), e.key === "Escape" && t && (e.preventDefault(), o(!1));
|
|
35
|
-
};
|
|
36
|
-
return document.addEventListener("keydown", a), () => document.removeEventListener("keydown", a);
|
|
37
|
-
}, [r, o, t]), {
|
|
38
|
-
isOpen: n,
|
|
39
|
-
setOpen: o,
|
|
40
|
-
shortcutKey: r
|
|
41
|
-
};
|
|
42
|
-
};
|
|
2
|
+
import { useInkeepOpenState as t } from "../../hooks/use-inkeep-open-state.js";
|
|
3
|
+
const a = (e) => t(e, {
|
|
4
|
+
eventNamePrefix: "modal",
|
|
5
|
+
defaultTriggerSelector: "[data-inkeep-modal-trigger]"
|
|
6
|
+
});
|
|
43
7
|
export {
|
|
44
|
-
|
|
8
|
+
a as useInkeepModal
|
|
45
9
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react"),g=require("../../providers/widget-provider.cjs"),C=require("../../providers/sidebar-chat-provider.cjs"),h=require("../../providers/chat-bubble-provider.cjs"),v=require("./modal-provider.cjs"),O=(s,e,o)=>{const i=v.useModal(),n=h.useOptionalChatBubble(),t=C.useOptionalSidebarChat(),r=g.useWidget(),a=i&&!i?.isOpen,d=n&&!n?.isOpen,l=t&&!t?.isOpen,c=a||d||l;m.useEffect(()=>{if(!o||c)return;const u=()=>{e?.current&&(r?.view&&r.view!==s||(e.current.focus(),e.current.selectionStart=e.current.value.length))};if(t?.isOpen){const b=setTimeout(()=>{requestAnimationFrame(u)},250);return()=>clearTimeout(b)}requestAnimationFrame(u)},[o,e,c,r?.view,s,t?.isOpen])};exports.useWidgetAutoFocus=O;
|
|
@@ -1,16 +1,25 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { useEffect as
|
|
3
|
-
import { useWidget as
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
2
|
+
import { useEffect as b } from "react";
|
|
3
|
+
import { useWidget as f } from "../../providers/widget-provider.js";
|
|
4
|
+
import { useOptionalSidebarChat as p } from "../../providers/sidebar-chat-provider.js";
|
|
5
|
+
import { useOptionalChatBubble as C } from "../../providers/chat-bubble-provider.js";
|
|
6
|
+
import { useModal as O } from "./modal-provider.js";
|
|
7
|
+
const W = (r, e, s) => {
|
|
8
|
+
const i = O(), n = C(), t = p(), o = f(), u = i && !i?.isOpen, m = n && !n?.isOpen, l = t && !t?.isOpen, c = u || m || l;
|
|
9
|
+
b(() => {
|
|
10
|
+
if (!s || c) return;
|
|
11
|
+
const a = () => {
|
|
12
|
+
e?.current && (o?.view && o.view !== r || (e.current.focus(), e.current.selectionStart = e.current.value.length));
|
|
13
|
+
};
|
|
14
|
+
if (t?.isOpen) {
|
|
15
|
+
const d = setTimeout(() => {
|
|
16
|
+
requestAnimationFrame(a);
|
|
17
|
+
}, 250);
|
|
18
|
+
return () => clearTimeout(d);
|
|
19
|
+
}
|
|
20
|
+
requestAnimationFrame(a);
|
|
21
|
+
}, [s, e, c, o?.view, r, t?.isOpen]);
|
|
13
22
|
};
|
|
14
23
|
export {
|
|
15
|
-
|
|
24
|
+
W as useWidgetAutoFocus
|
|
16
25
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentPropsWithRef, ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { OpenSettingsModal } from '../../types/index.ts';
|
|
3
3
|
import { PolymorphicProps } from './factory';
|
|
4
4
|
import * as DialogPrimitive from '../atoms/dialog';
|
|
5
5
|
declare const Modal: ForwardRefExoticComponent< PolymorphicProps & Omit<DialogPrimitive.DialogProps, "_id"> & Partial<Pick<DialogPrimitive.DialogProps, "_id">>>;
|
|
@@ -7,7 +7,7 @@ export interface PrimitiveModalProps extends ComponentPropsWithRef<typeof Modal>
|
|
|
7
7
|
/**
|
|
8
8
|
* Configuration for the modal.
|
|
9
9
|
*/
|
|
10
|
-
config?:
|
|
10
|
+
config?: OpenSettingsModal;
|
|
11
11
|
}
|
|
12
12
|
declare const PrimitiveModal: (props: PrimitiveModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
declare const PrimitiveModalOverlay: ForwardRefExoticComponent< PolymorphicProps & Omit<DialogPrimitive.DialogOverlayProps & RefAttributes<HTMLDivElement>, "_id"> & Partial<Pick<DialogPrimitive.DialogOverlayProps & RefAttributes<HTMLDivElement>, "_id">>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentPropsWithRef, ForwardRefExoticComponent, DetailedHTMLProps, HTMLAttributes, ButtonHTMLAttributes } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { OpenSettingsSearchBar } from '../../types/index.ts';
|
|
3
3
|
import { PolymorphicProps } from './factory';
|
|
4
4
|
import { CustomIconProps } from '..';
|
|
5
5
|
declare const SearchBarContainer: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id">>>;
|
|
@@ -11,13 +11,13 @@ declare const SearchBarPrimitiveIcon: ForwardRefExoticComponent< PolymorphicProp
|
|
|
11
11
|
declare const SearchBarPrimitiveKbdWrapper: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>, "_id">>>;
|
|
12
12
|
declare const PrimitiveKbdShortcutKey: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>, "_id">>>;
|
|
13
13
|
type SearchBarPrimitiveKbdShortcutKeyProps = ComponentPropsWithRef<typeof PrimitiveKbdShortcutKey> & {
|
|
14
|
-
shortcutKey?:
|
|
14
|
+
shortcutKey?: OpenSettingsSearchBar['shortcutKey'];
|
|
15
15
|
};
|
|
16
16
|
declare const SearchBarPrimitiveKbdShortcutKey: (props: SearchBarPrimitiveKbdShortcutKeyProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
17
|
declare const SearchBarPrimitiveCtrl: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>, "children" | "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>, "children" | "_id">>>;
|
|
18
18
|
declare const SearchBarPrimitiveCmdIcon: ForwardRefExoticComponent< PolymorphicProps & Omit< CustomIconProps, "_id" | "iconKey"> & Partial<Pick< CustomIconProps, "_id" | "iconKey">>>;
|
|
19
19
|
type SearchBarPrimitiveKbdModifierProps = ComponentPropsWithRef<typeof SearchBarPrimitiveCtrl | typeof SearchBarPrimitiveCmdIcon> & {
|
|
20
|
-
shortcutKey?:
|
|
20
|
+
shortcutKey?: OpenSettingsSearchBar['shortcutKey'];
|
|
21
21
|
};
|
|
22
22
|
declare const SearchBarPrimitiveKbdModifier: (props: SearchBarPrimitiveKbdModifierProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
23
|
export { SearchBarContainer, SearchBarPrimitiveButton as SearchBarButton, SearchBarPrimitiveText as SearchBarText, SearchBarPrimitiveContentWrapper as SearchBarContentWrapper, SearchBarPrimitiveIcon as SearchBarIcon, SearchBarPrimitiveKbdWrapper as SearchBarKbdWrapper, SearchBarPrimitiveKbdModifier as SearchBarKbdModifier, SearchBarPrimitiveKbdShortcutKey as SearchBarKbdShortcutKey, };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),a=require("react"),d=require("../factory.cjs"),n=require("../../providers/sidebar-chat-provider.cjs"),b=require("./use-sidebar-chat-resizer.cjs"),h=require("../presence.cjs"),C=require("../../utils/misc.cjs"),R=require("../../utils/split-props.cjs"),l=require("../../atoms/icons/built-in-icon-renderer.cjs"),P=d.ikp(h.Presence,{_id:"sidebarChat__Root"}),S=["position","minWidth","maxWidth","defaultWidth","openSettings"],u=a.forwardRef((i,e)=>{const[s,o]=R.splitProps(i,S),t=n.useInkeepSidebarChat(s);return r.jsx(n.SidebarChatProvider,{value:t,children:r.jsx(P,{ref:e,present:t.isOpen,"data-sidebar":"","data-position":t.position,"data-open":C.dataAttr(t.isOpen),style:{"--width":`${t.width}px`},...o})})}),m=d.ikp("div",{_id:"sidebarChat__Resizer"}),p=a.forwardRef((i,e)=>{const{position:s}=n.useSidebarChat(),{onMouseDown:o,resizerRef:t}=b.useSidebarChatResizer();return r.jsx(m,{ref:c=>{typeof e=="function"?e(c):e&&(e.current=c),t.current=c},"data-position":s,onMouseDown:o,...i})}),v=d.ikp("div",{_id:"sidebarChat__Header"}),f=a.forwardRef((i,e)=>r.jsx(v,{ref:e,...i})),_=d.ikp("button",{_id:"sidebarChat__CloseButton",children:r.jsx(l.BuiltInIconRenderer,{iconSettings:{builtIn:"IoCloseOutline"}})}),q=a.forwardRef((i,e)=>{const{setOpen:s}=n.useSidebarChat(),o=()=>{s(!1)};return r.jsx(_,{ref:e,onClick:o,...i})});exports.CloseButton=q;exports.Header=f;exports.Resizer=p;exports.Root=u;exports.SidebarChatPrimitiveResizer=p;exports.SidebarChatPrimitiveRoot=u;
|