@inkeep/agents-ui 0.16.0 → 0.16.2

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.
Files changed (124) hide show
  1. package/dist/color-mode/index.js +4 -4
  2. package/dist/index.cjs +1 -1
  3. package/dist/index.js +167 -161
  4. package/dist/node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.3.0-canary-87ae75b3-20260128/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.cjs +9 -0
  5. package/dist/node_modules/.pnpm/{use-sync-external-store@1.5.0_react@19.0.0 → use-sync-external-store@1.6.0_react@19.3.0-canary-87ae75b3-20260128}/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +2 -2
  6. package/dist/primitives/atoms/cmdk/index.cjs +1 -1
  7. package/dist/primitives/atoms/cmdk/index.js +14 -2
  8. package/dist/primitives/atoms/combobox.d.ts +104 -0
  9. package/dist/primitives/atoms/icons/built-in-icons.cjs +1 -1
  10. package/dist/primitives/atoms/icons/built-in-icons.d.ts +4 -1
  11. package/dist/primitives/atoms/icons/built-in-icons.js +94 -91
  12. package/dist/primitives/atoms/icons/collections/pi.cjs +1 -1
  13. package/dist/primitives/atoms/icons/collections/pi.d.ts +3 -0
  14. package/dist/primitives/atoms/icons/collections/pi.js +82 -37
  15. package/dist/primitives/atoms/icons/inkeep-default-icons.cjs +1 -1
  16. package/dist/primitives/atoms/icons/inkeep-default-icons.js +4 -1
  17. package/dist/primitives/atoms/portal.js +3 -3
  18. package/dist/primitives/atoms/select.cjs +1 -1
  19. package/dist/primitives/atoms/select.js +2 -2
  20. package/dist/primitives/atoms/shadow/context.js +4 -4
  21. package/dist/primitives/components/embedded-chat/chat-error-helpers.cjs +3 -0
  22. package/dist/primitives/components/embedded-chat/chat-error-helpers.d.ts +26 -0
  23. package/dist/primitives/components/embedded-chat/chat-error-helpers.js +32 -0
  24. package/dist/primitives/components/embedded-chat/file-upload-input.cjs +1 -1
  25. package/dist/primitives/components/embedded-chat/file-upload-input.d.ts +1 -2
  26. package/dist/primitives/components/embedded-chat/file-upload-input.js +359 -217
  27. package/dist/primitives/components/embedded-chat/image-preview-modal.js +3 -3
  28. package/dist/primitives/components/embedded-chat/use-chat-action.cjs +1 -1
  29. package/dist/primitives/components/embedded-chat/use-chat-action.js +16 -14
  30. package/dist/primitives/components/embedded-chat/use-inkeep-chat.cjs +2 -4
  31. package/dist/primitives/components/embedded-chat/use-inkeep-chat.d.ts +1 -2
  32. package/dist/primitives/components/embedded-chat/use-inkeep-chat.js +312 -284
  33. package/dist/primitives/components/embedded-chat/use-stream-processor.cjs +1 -1
  34. package/dist/primitives/components/embedded-chat/use-stream-processor.js +1 -1
  35. package/dist/primitives/components/embedded-chat.cjs +3 -3
  36. package/dist/primitives/components/embedded-chat.d.ts +2 -3
  37. package/dist/primitives/components/embedded-chat.js +122 -114
  38. package/dist/primitives/components/embedded-search/search-provider.js +3 -3
  39. package/dist/primitives/components/embedded-search.cjs +1 -1
  40. package/dist/primitives/components/embedded-search.d.ts +1 -1
  41. package/dist/primitives/components/embedded-search.js +3 -3
  42. package/dist/primitives/components/modal/modal-provider.js +2 -2
  43. package/dist/primitives/components/modal.js +3 -3
  44. package/dist/primitives/components/sidebar-chat/index.js +1 -1
  45. package/dist/primitives/components/tagline-logo-icon.js +50 -9
  46. package/dist/primitives/hooks/use-events-api.cjs +1 -0
  47. package/dist/primitives/hooks/use-events-api.d.ts +29 -0
  48. package/dist/primitives/hooks/use-events-api.js +43 -0
  49. package/dist/primitives/hooks/use-initial-conversation.js +4 -1
  50. package/dist/primitives/hooks/use-input-notification.js +9 -9
  51. package/dist/primitives/index.cjs +1 -1
  52. package/dist/primitives/index.js +150 -144
  53. package/dist/primitives/providers/base-events-provider.cjs +1 -1
  54. package/dist/primitives/providers/base-events-provider.d.ts +2 -0
  55. package/dist/primitives/providers/base-events-provider.js +23 -22
  56. package/dist/primitives/providers/chat-auth-provider.cjs +1 -0
  57. package/dist/primitives/providers/chat-auth-provider.d.ts +27 -0
  58. package/dist/primitives/providers/chat-auth-provider.js +46 -0
  59. package/dist/primitives/providers/chat-base-events-provider.cjs +1 -0
  60. package/dist/primitives/providers/chat-base-events-provider.d.ts +12 -0
  61. package/dist/primitives/providers/chat-base-events-provider.js +73 -0
  62. package/dist/primitives/providers/chat-bubble-provider.js +1 -1
  63. package/dist/primitives/providers/chat-form-provider.d.ts +1 -1
  64. package/dist/primitives/providers/chat-form-provider.js +4 -4
  65. package/dist/primitives/providers/chat-history-provider.js +3 -3
  66. package/dist/primitives/providers/config-provider.js +3 -3
  67. package/dist/primitives/providers/feedback-provider.cjs +1 -1
  68. package/dist/primitives/providers/feedback-provider.js +37 -31
  69. package/dist/primitives/providers/form-field-provider.js +3 -3
  70. package/dist/primitives/providers/help-menu-provider.js +4 -4
  71. package/dist/primitives/providers/hover-popover-provider.js +3 -3
  72. package/dist/primitives/providers/image-preview-provider.js +5 -5
  73. package/dist/primitives/providers/index.cjs +1 -1
  74. package/dist/primitives/providers/index.d.ts +2 -0
  75. package/dist/primitives/providers/index.js +57 -51
  76. package/dist/primitives/providers/markdown-provider.js +2 -2
  77. package/dist/primitives/providers/message-provider.js +1 -1
  78. package/dist/primitives/providers/sidebar-chat-provider.js +3 -3
  79. package/dist/primitives/providers/source-item-provider.js +3 -3
  80. package/dist/primitives/providers/widget-provider.js +2 -2
  81. package/dist/primitives/utils/misc.cjs +1 -1
  82. package/dist/primitives/utils/misc.js +2 -2
  83. package/dist/react/chat-button.js +1 -1
  84. package/dist/react/embedded-chat.cjs +1 -1
  85. package/dist/react/embedded-chat.js +104 -102
  86. package/dist/react/embedded-search.cjs +1 -1
  87. package/dist/react/embedded-search.js +18 -18
  88. package/dist/react/index.cjs +1 -1
  89. package/dist/react/index.js +167 -161
  90. package/dist/styled/components/chat-bubble.js +4 -4
  91. package/dist/styled/components/chat-button.cjs +1 -1
  92. package/dist/styled/components/chat-button.js +9 -9
  93. package/dist/styled/components/chat-history.cjs +1 -1
  94. package/dist/styled/components/chat-history.js +22 -22
  95. package/dist/styled/components/embedded-chat/file-upload-input.cjs +1 -1
  96. package/dist/styled/components/embedded-chat/file-upload-input.js +71 -72
  97. package/dist/styled/components/embedded-chat/image-preview-modal.js +14 -7
  98. package/dist/styled/components/embedded-chat.cjs +1 -1
  99. package/dist/styled/components/embedded-chat.js +211 -199
  100. package/dist/styled/components/embedded-search.cjs +1 -1
  101. package/dist/styled/components/embedded-search.js +72 -66
  102. package/dist/styled/components/loading-indicator.cjs +1 -1
  103. package/dist/styled/components/loading-indicator.js +1 -1
  104. package/dist/styled/components/message.cjs +1 -1
  105. package/dist/styled/components/message.js +142 -139
  106. package/dist/styled/components/modal.js +3 -3
  107. package/dist/styled/components/searchbar.js +8 -8
  108. package/dist/styled/components/sidebar-chat.cjs +1 -1
  109. package/dist/styled/components/sidebar-chat.js +5 -5
  110. package/dist/styled/index.cjs +1 -1
  111. package/dist/styled/index.js +155 -149
  112. package/dist/styled/inkeep.css.cjs +13 -3
  113. package/dist/styled/inkeep.css.js +13 -3
  114. package/dist/theme/utils/generate-theme-variables.js +6 -6
  115. package/dist/types/config/ai.d.ts +5 -0
  116. package/dist/types/events.d.ts +11 -0
  117. package/dist/types/icons/built-in.d.ts +1 -1
  118. package/dist/types/icons/custom.d.ts +3 -0
  119. package/package.json +2 -2
  120. package/dist/node_modules/.pnpm/use-sync-external-store@1.5.0_react@19.0.0/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.cjs +0 -9
  121. /package/dist/node_modules/.pnpm/{use-sync-external-store@1.5.0_react@19.0.0 → use-sync-external-store@1.6.0_react@19.3.0-canary-87ae75b3-20260128}/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.cjs +0 -0
  122. /package/dist/node_modules/.pnpm/{use-sync-external-store@1.5.0_react@19.0.0 → use-sync-external-store@1.6.0_react@19.3.0-canary-87ae75b3-20260128}/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +0 -0
  123. /package/dist/node_modules/.pnpm/{use-sync-external-store@1.5.0_react@19.0.0 → use-sync-external-store@1.6.0_react@19.3.0-canary-87ae75b3-20260128}/node_modules/use-sync-external-store/shim/index.cjs +0 -0
  124. /package/dist/node_modules/.pnpm/{use-sync-external-store@1.5.0_react@19.0.0 → use-sync-external-store@1.6.0_react@19.3.0-canary-87ae75b3-20260128}/node_modules/use-sync-external-store/shim/index.js +0 -0
@@ -1,7 +1,7 @@
1
- import { InkeepEmbeddedChat as S, InkeepEmbeddedChatImpl as c, InkeepEmbeddedChatImplContent as P, InkeepEmbeddedChatProvider as v } from "./embedded-chat.js";
2
- import { InkeepSidebarChat as M } from "./sidebar-chat.js";
1
+ import { InkeepEmbeddedChat as S, InkeepEmbeddedChatImpl as c, InkeepEmbeddedChatImplContent as v, InkeepEmbeddedChatProvider as P } from "./embedded-chat.js";
2
+ import { InkeepSidebarChat as B } from "./sidebar-chat.js";
3
3
  import { InkeepEmbeddedSearchAndChat as g, InkeepEmbeddedSearchAndChatImpl as E } from "./embedded-search-and-chat.js";
4
- import { InkeepEmbeddedSearch as F, InkeepEmbeddedSearchImpl as H, InkeepEmbeddedSearchImplContent as w, InkeepEmbeddedSearchProvider as D } from "./embedded-search.js";
4
+ import { InkeepEmbeddedSearch as F, InkeepEmbeddedSearchImpl as H, InkeepEmbeddedSearchImplContent as w, InkeepEmbeddedSearchProvider as A } from "./embedded-search.js";
5
5
  import { InkeepModalChat as R } from "./modal.chat.js";
6
6
  import { InkeepModalSearchAndChat as T } from "./modal.search-and-chat.js";
7
7
  import { InkeepModalSearch as W } from "./modal.search.js";
@@ -22,88 +22,93 @@ import { LoadingIndicator as _ } from "../styled/components/loading-indicator.js
22
22
  import { widgetToggle as oe } from "../styled/components/ui/recipes/widget-toggle.js";
23
23
  import { DefaultToolComponent as te, EmbeddedChatMessagePart as ae } from "../styled/components/message.js";
24
24
  import { DataSummaryGroup as de } from "../styled/components/data-summary-group.js";
25
- import { BaseEventsProvider as se, useBaseEvents as ie } from "../primitives/providers/base-events-provider.js";
26
- import { ChatFormProvider as Ce, useChatForm as fe, useChatFormState as he } from "../primitives/providers/chat-form-provider.js";
27
- import { ChatHistoryProvider as ue, useChatHistory as le } from "../primitives/providers/chat-history-provider.js";
28
- import { InkeepConfigProvider as be, WebWidgetInteractionType as Se, useInkeepConfig as ce } from "../primitives/providers/config-provider.js";
29
- import { FeedbackProvider as ve, useMessageFeedback as ke } from "../primitives/providers/feedback-provider.js";
30
- import { FormFieldProvider as Be, useFormField as ge } from "../primitives/providers/form-field-provider.js";
31
- import { HelpMenuProvider as ye, useHelpMenu as Fe, useHelpMenuState as He } from "../primitives/providers/help-menu-provider.js";
32
- import { ChatMarkdownProvider as De, useChatMarkdown as Ae } from "../primitives/providers/markdown-provider.js";
33
- import { MessageProvider as $e, useMessage as Te, useOptionalMessage as Oe } from "../primitives/providers/message-provider.js";
34
- import { RootProvider as ze } from "../primitives/providers/root-provider.js";
35
- import { SourceItemProvider as je, useSourceItem as Ge } from "../primitives/providers/source-item-provider.js";
36
- import { ThemeProvider as Ne } from "../primitives/providers/theme-provider.js";
37
- import { WidgetProvider as Ue, useWidget as Ve } from "../primitives/providers/widget-provider.js";
38
- import { SidebarChatProvider as Je, useInkeepSidebarChat as Xe, useOptionalSidebarChat as Ye, useSidebarChat as Ze } from "../primitives/providers/sidebar-chat-provider.js";
39
- import { ChatBubbleProvider as eo, useChatBubble as oo, useInkeepChatBubble as ro, useOptionalChatBubble as to } from "../primitives/providers/chat-bubble-provider.js";
40
- import { ikp as mo, jsxFactory as po } from "../primitives/components/factory.js";
25
+ import { BaseEventsContext as se, BaseEventsProvider as ie, useBaseEvents as ne } from "../primitives/providers/base-events-provider.js";
26
+ import { ChatAuthProvider as he, useChatAuth as fe } from "../primitives/providers/chat-auth-provider.js";
27
+ import { ChatBaseEventsProvider as ue } from "../primitives/providers/chat-base-events-provider.js";
28
+ import { ChatFormProvider as Ie, useChatForm as be, useChatFormState as Se } from "../primitives/providers/chat-form-provider.js";
29
+ import { ChatHistoryProvider as ve, useChatHistory as Pe } from "../primitives/providers/chat-history-provider.js";
30
+ import { InkeepConfigProvider as Be, WebWidgetInteractionType as Me, useInkeepConfig as ge } from "../primitives/providers/config-provider.js";
31
+ import { FeedbackProvider as ye, useMessageFeedback as Fe } from "../primitives/providers/feedback-provider.js";
32
+ import { FormFieldProvider as we, useFormField as Ae } from "../primitives/providers/form-field-provider.js";
33
+ import { HelpMenuProvider as Re, useHelpMenu as $e, useHelpMenuState as Te } from "../primitives/providers/help-menu-provider.js";
34
+ import { ChatMarkdownProvider as We, useChatMarkdown as ze } from "../primitives/providers/markdown-provider.js";
35
+ import { MessageProvider as je, useMessage as Ge, useOptionalMessage as Ke } from "../primitives/providers/message-provider.js";
36
+ import { RootProvider as Qe } from "../primitives/providers/root-provider.js";
37
+ import { SourceItemProvider as Ve, useSourceItem as qe } from "../primitives/providers/source-item-provider.js";
38
+ import { ThemeProvider as Xe } from "../primitives/providers/theme-provider.js";
39
+ import { WidgetProvider as Ze, useWidget as _e } from "../primitives/providers/widget-provider.js";
40
+ import { SidebarChatProvider as oo, useInkeepSidebarChat as ro, useOptionalSidebarChat as to, useSidebarChat as ao } from "../primitives/providers/sidebar-chat-provider.js";
41
+ import { ChatBubbleProvider as po, useChatBubble as so, useInkeepChatBubble as io, useOptionalChatBubble as no } from "../primitives/providers/chat-bubble-provider.js";
42
+ import { ikp as ho, jsxFactory as fo } from "../primitives/components/factory.js";
41
43
  import * as s from "../primitives/components/embedded-chat.js";
42
44
  import * as i from "../primitives/components/sidebar-chat/index.js";
43
- import { ChatProvider as io, useChat as no } from "../primitives/components/embedded-chat/chat-provider.js";
45
+ import { ChatProvider as uo, useChat as lo } from "../primitives/components/embedded-chat/chat-provider.js";
44
46
  import * as n from "../primitives/components/embedded-search.js";
45
- import { SearchProvider as fo, SearchProviderImpl as ho, useSearch as xo } from "../primitives/components/embedded-search/search-provider.js";
47
+ import { SearchProvider as bo, SearchProviderImpl as So, useSearch as co } from "../primitives/components/embedded-search/search-provider.js";
46
48
  import * as C from "../primitives/components/modal.js";
47
- import { ModalProvider as lo, useModal as Io } from "../primitives/components/modal/modal-provider.js";
48
- import * as f from "../primitives/components/chat-button.js";
49
- import * as h from "../primitives/components/searchbar.js";
49
+ import { ModalProvider as Po, useModal as ko } from "../primitives/components/modal/modal-provider.js";
50
+ import * as h from "../primitives/components/chat-button.js";
51
+ import * as f from "../primitives/components/searchbar.js";
50
52
  import * as x from "../primitives/components/chat-bubble/index.js";
51
53
  import * as u from "../primitives/components/data-summaries.js";
52
54
  import * as l from "../primitives/components/chat-history/index.js";
53
- import { useBoolean as So } from "../primitives/hooks/use-boolean.js";
54
- import { useComponentClassNames as Po } from "../primitives/hooks/use-component-classnames.js";
55
- import { useContainerSize as ko } from "../primitives/hooks/use-container-size.js";
56
- import { useInkeepOpenState as Bo } from "../primitives/hooks/use-inkeep-open-state.js";
57
- import { useCopyToClipboard as Eo } from "../primitives/hooks/use-copy-to-clipboard.js";
58
- import { useInstantUpdate as Fo } from "../primitives/hooks/use-instant-update.js";
59
- import { useIsMounted as wo } from "../primitives/hooks/use-is-mounted.js";
60
- import { useMediaQuery as Ao } from "../primitives/hooks/use-media-query.js";
61
- import { useResizeObserver as $o } from "../primitives/hooks/use-resize-observer.js";
62
- import { useScrollingFades as Oo, useScrollingFadesHorizontal as Wo } from "../primitives/hooks/use-scrolling-fades.js";
63
- import { useSettleAction as Lo } from "../primitives/hooks/use-settle-action.js";
64
- import { useSimpleScroll as Go } from "../primitives/hooks/use-simple-scroll.js";
65
- import { callAll as No, dataAttr as Qo, getInitials as Uo, getMessageContent as Vo, isCitationArtifact as qo, isString as Jo, maybeRender as Xo, toKebabCase as Yo } from "../primitives/utils/misc.js";
66
- import { ChatBubbleComponentIds as _o, DataSummaryComponentIds as er, SearchBarComponentIds as or, SidebarChatComponentIds as rr, aiChatComponentIds as tr, aiChatHistoryComponentIds as ar, aiSearchComponentIds as mr, chatButtonComponentIds as dr, componentIDs as pr, markDownComponentIds as sr, miscellanousComponentIds as ir, modalComponentIds as nr } from "../primitives/utils/component-ids.js";
67
- import { composeRefs as fr, useComposedRefs as hr } from "../primitives/utils/compose-refs.js";
68
- import { mergeProps as ur } from "../primitives/utils/merge-props.js";
69
- import { Portal as Ir } from "../primitives/atoms/portal.js";
70
- import { CustomIcon as Sr } from "../primitives/atoms/icons/custom-icon.js";
71
- import { BuiltInIconRenderer as Pr } from "../primitives/atoms/icons/built-in-icon-renderer.js";
72
- import { PortalWithTheme as kr } from "../primitives/atoms/portal-with-theme.js";
73
- import { Command as Br, CommandDialog as gr, CommandEmpty as Er, CommandInput as yr, CommandItem as Fr, CommandList as Hr, CommandLoading as wr, CommandRoot as Dr, CommandSeparator as Ar, defaultFilter as Rr, useCommandState as $r, useCommandStore as Tr } from "../primitives/atoms/cmdk/index.js";
74
- import { ErrorBoundary as Wr } from "../primitives/atoms/error-boundary.js";
75
- import { ColorMode as Lr, ColorModeProvider as jr, DarkModeProvider as Gr, useColorMode as Kr, useColorModeValue as Nr } from "../color-mode/index.js";
76
- import { InkeepShadow as Ur, InkeepShadowProvider as Vr, ShadowContext as qr, useShadow as Jr } from "../primitives/atoms/shadow/context.js";
55
+ import { useBoolean as Mo } from "../primitives/hooks/use-boolean.js";
56
+ import { useComponentClassNames as Eo } from "../primitives/hooks/use-component-classnames.js";
57
+ import { useContainerSize as Fo } from "../primitives/hooks/use-container-size.js";
58
+ import { useInkeepOpenState as wo } from "../primitives/hooks/use-inkeep-open-state.js";
59
+ import { useCopyToClipboard as Do } from "../primitives/hooks/use-copy-to-clipboard.js";
60
+ import { useInstantUpdate as $o } from "../primitives/hooks/use-instant-update.js";
61
+ import { useIsMounted as Oo } from "../primitives/hooks/use-is-mounted.js";
62
+ import { useMediaQuery as zo } from "../primitives/hooks/use-media-query.js";
63
+ import { useResizeObserver as jo } from "../primitives/hooks/use-resize-observer.js";
64
+ import { useScrollingFades as Ko, useScrollingFadesHorizontal as No } from "../primitives/hooks/use-scrolling-fades.js";
65
+ import { useSettleAction as Uo } from "../primitives/hooks/use-settle-action.js";
66
+ import { useSimpleScroll as qo } from "../primitives/hooks/use-simple-scroll.js";
67
+ import { callAll as Xo, dataAttr as Yo, getInitials as Zo, getMessageContent as _o, isCitationArtifact as er, isString as or, maybeRender as rr, toKebabCase as tr } from "../primitives/utils/misc.js";
68
+ import { ChatBubbleComponentIds as mr, DataSummaryComponentIds as dr, SearchBarComponentIds as pr, SidebarChatComponentIds as sr, aiChatComponentIds as ir, aiChatHistoryComponentIds as nr, aiSearchComponentIds as Cr, chatButtonComponentIds as hr, componentIDs as fr, markDownComponentIds as xr, miscellanousComponentIds as ur, modalComponentIds as lr } from "../primitives/utils/component-ids.js";
69
+ import { composeRefs as br, useComposedRefs as Sr } from "../primitives/utils/compose-refs.js";
70
+ import { mergeProps as vr } from "../primitives/utils/merge-props.js";
71
+ import { Portal as kr } from "../primitives/atoms/portal.js";
72
+ import { CustomIcon as Mr } from "../primitives/atoms/icons/custom-icon.js";
73
+ import { BuiltInIconRenderer as Er } from "../primitives/atoms/icons/built-in-icon-renderer.js";
74
+ import { PortalWithTheme as Fr } from "../primitives/atoms/portal-with-theme.js";
75
+ import { Command as wr, CommandDialog as Ar, CommandEmpty as Dr, CommandInput as Rr, CommandItem as $r, CommandList as Tr, CommandLoading as Or, CommandRoot as Wr, CommandSeparator as zr, defaultFilter as Lr, useCommandState as jr, useCommandStore as Gr } from "../primitives/atoms/cmdk/index.js";
76
+ import { ErrorBoundary as Nr } from "../primitives/atoms/error-boundary.js";
77
+ import { ColorMode as Ur, ColorModeProvider as Vr, DarkModeProvider as qr, useColorMode as Jr, useColorModeValue as Xr } from "../color-mode/index.js";
78
+ import { InkeepShadow as Zr, InkeepShadowProvider as _r, ShadowContext as et, useShadow as ot } from "../primitives/atoms/shadow/context.js";
77
79
  export {
78
- se as BaseEventsProvider,
79
- Pr as BuiltInIconRenderer,
80
+ se as BaseEventsContext,
81
+ ie as BaseEventsProvider,
82
+ Er as BuiltInIconRenderer,
83
+ he as ChatAuthProvider,
84
+ ue as ChatBaseEventsProvider,
80
85
  t as ChatBubble,
81
- _o as ChatBubbleComponentIds,
86
+ mr as ChatBubbleComponentIds,
82
87
  x as ChatBubblePrimitive,
83
- eo as ChatBubbleProvider,
88
+ po as ChatBubbleProvider,
84
89
  d as ChatButton,
85
90
  K as ChatButtonImpl,
86
- f as ChatButtonPrimitive,
87
- Ce as ChatFormProvider,
91
+ h as ChatButtonPrimitive,
92
+ Ie as ChatFormProvider,
88
93
  o as ChatHistory,
89
94
  l as ChatHistoryPrimitive,
90
- ue as ChatHistoryProvider,
91
- De as ChatMarkdownProvider,
92
- io as ChatProvider,
93
- Lr as ColorMode,
94
- jr as ColorModeProvider,
95
- Br as Command,
96
- gr as CommandDialog,
97
- Er as CommandEmpty,
98
- yr as CommandInput,
99
- Fr as CommandItem,
100
- Hr as CommandList,
101
- wr as CommandLoading,
102
- Dr as CommandRoot,
103
- Ar as CommandSeparator,
104
- Sr as CustomIcon,
105
- Gr as DarkModeProvider,
106
- er as DataSummaryComponentIds,
95
+ ve as ChatHistoryProvider,
96
+ We as ChatMarkdownProvider,
97
+ uo as ChatProvider,
98
+ Ur as ColorMode,
99
+ Vr as ColorModeProvider,
100
+ wr as Command,
101
+ Ar as CommandDialog,
102
+ Dr as CommandEmpty,
103
+ Rr as CommandInput,
104
+ $r as CommandItem,
105
+ Tr as CommandList,
106
+ Or as CommandLoading,
107
+ Wr as CommandRoot,
108
+ zr as CommandSeparator,
109
+ Mr as CustomIcon,
110
+ qr as DarkModeProvider,
111
+ dr as DataSummaryComponentIds,
107
112
  de as DataSummaryGroup,
108
113
  u as DataSummaryPrimitive,
109
114
  te as DefaultToolComponent,
@@ -112,118 +117,119 @@ export {
112
117
  s as EmbeddedChatPrimitive,
113
118
  a as EmbeddedSearch,
114
119
  n as EmbeddedSearchPrimitive,
115
- Wr as ErrorBoundary,
116
- ve as FeedbackProvider,
117
- Be as FormFieldProvider,
118
- ye as HelpMenuProvider,
120
+ Nr as ErrorBoundary,
121
+ ye as FeedbackProvider,
122
+ we as FormFieldProvider,
123
+ Re as HelpMenuProvider,
119
124
  N as InkeepChatButton,
120
125
  U as InkeepChatButtonModal,
121
- be as InkeepConfigProvider,
126
+ Be as InkeepConfigProvider,
122
127
  S as InkeepEmbeddedChat,
123
128
  c as InkeepEmbeddedChatImpl,
124
- P as InkeepEmbeddedChatImplContent,
125
- v as InkeepEmbeddedChatProvider,
129
+ v as InkeepEmbeddedChatImplContent,
130
+ P as InkeepEmbeddedChatProvider,
126
131
  F as InkeepEmbeddedSearch,
127
132
  g as InkeepEmbeddedSearchAndChat,
128
133
  E as InkeepEmbeddedSearchAndChatImpl,
129
134
  H as InkeepEmbeddedSearchImpl,
130
135
  w as InkeepEmbeddedSearchImplContent,
131
- D as InkeepEmbeddedSearchProvider,
136
+ A as InkeepEmbeddedSearchProvider,
132
137
  L as InkeepModal,
133
138
  R as InkeepModalChat,
134
139
  W as InkeepModalSearch,
135
140
  T as InkeepModalSearchAndChat,
136
141
  q as InkeepSearchBar,
137
- Ur as InkeepShadow,
138
- Vr as InkeepShadowProvider,
139
- M as InkeepSidebarChat,
142
+ Zr as InkeepShadow,
143
+ _r as InkeepShadowProvider,
144
+ B as InkeepSidebarChat,
140
145
  _ as LoadingIndicator,
141
- $e as MessageProvider,
146
+ je as MessageProvider,
142
147
  m as Modal,
143
148
  j as ModalContent,
144
149
  C as ModalPrimitive,
145
- lo as ModalProvider,
146
- Ir as Portal,
147
- kr as PortalWithTheme,
148
- ze as RootProvider,
150
+ Po as ModalProvider,
151
+ kr as Portal,
152
+ Fr as PortalWithTheme,
153
+ Qe as RootProvider,
149
154
  p as SearchBar,
150
- or as SearchBarComponentIds,
155
+ pr as SearchBarComponentIds,
151
156
  J as SearchBarImpl,
152
- h as SearchBarPrimitive,
153
- fo as SearchProvider,
154
- ho as SearchProviderImpl,
157
+ f as SearchBarPrimitive,
158
+ bo as SearchProvider,
159
+ So as SearchProviderImpl,
155
160
  Y as Shadow,
156
- qr as ShadowContext,
161
+ et as ShadowContext,
157
162
  r as SidebarChat,
158
- rr as SidebarChatComponentIds,
163
+ sr as SidebarChatComponentIds,
159
164
  i as SidebarChatPrimitive,
160
- Je as SidebarChatProvider,
161
- je as SourceItemProvider,
162
- Ne as ThemeProvider,
163
- Se as WebWidgetInteractionType,
164
- Ue as WidgetProvider,
165
- tr as aiChatComponentIds,
166
- ar as aiChatHistoryComponentIds,
167
- mr as aiSearchComponentIds,
168
- No as callAll,
169
- dr as chatButtonComponentIds,
170
- pr as componentIDs,
171
- fr as composeRefs,
172
- Qo as dataAttr,
173
- Rr as defaultFilter,
174
- Uo as getInitials,
175
- Vo as getMessageContent,
176
- mo as ikp,
177
- qo as isCitationArtifact,
178
- Jo as isString,
179
- po as jsxFactory,
180
- sr as markDownComponentIds,
181
- Xo as maybeRender,
182
- ur as mergeProps,
183
- ir as miscellanousComponentIds,
184
- nr as modalComponentIds,
185
- Yo as toKebabCase,
186
- ie as useBaseEvents,
187
- So as useBoolean,
188
- no as useChat,
189
- oo as useChatBubble,
190
- fe as useChatForm,
191
- he as useChatFormState,
192
- le as useChatHistory,
193
- Ae as useChatMarkdown,
194
- Kr as useColorMode,
195
- Nr as useColorModeValue,
196
- $r as useCommandState,
197
- Tr as useCommandStore,
198
- Po as useComponentClassNames,
199
- hr as useComposedRefs,
200
- ko as useContainerSize,
201
- Eo as useCopyToClipboard,
202
- ge as useFormField,
203
- Fe as useHelpMenu,
204
- He as useHelpMenuState,
205
- ro as useInkeepChatBubble,
206
- ce as useInkeepConfig,
207
- Bo as useInkeepOpenState,
208
- Xe as useInkeepSidebarChat,
209
- Fo as useInstantUpdate,
210
- wo as useIsMounted,
211
- Ao as useMediaQuery,
212
- Te as useMessage,
213
- ke as useMessageFeedback,
214
- Io as useModal,
215
- to as useOptionalChatBubble,
216
- Oe as useOptionalMessage,
217
- Ye as useOptionalSidebarChat,
218
- $o as useResizeObserver,
219
- Oo as useScrollingFades,
220
- Wo as useScrollingFadesHorizontal,
221
- xo as useSearch,
222
- Lo as useSettleAction,
223
- Jr as useShadow,
224
- Ze as useSidebarChat,
225
- Go as useSimpleScroll,
226
- Ge as useSourceItem,
227
- Ve as useWidget,
165
+ oo as SidebarChatProvider,
166
+ Ve as SourceItemProvider,
167
+ Xe as ThemeProvider,
168
+ Me as WebWidgetInteractionType,
169
+ Ze as WidgetProvider,
170
+ ir as aiChatComponentIds,
171
+ nr as aiChatHistoryComponentIds,
172
+ Cr as aiSearchComponentIds,
173
+ Xo as callAll,
174
+ hr as chatButtonComponentIds,
175
+ fr as componentIDs,
176
+ br as composeRefs,
177
+ Yo as dataAttr,
178
+ Lr as defaultFilter,
179
+ Zo as getInitials,
180
+ _o as getMessageContent,
181
+ ho as ikp,
182
+ er as isCitationArtifact,
183
+ or as isString,
184
+ fo as jsxFactory,
185
+ xr as markDownComponentIds,
186
+ rr as maybeRender,
187
+ vr as mergeProps,
188
+ ur as miscellanousComponentIds,
189
+ lr as modalComponentIds,
190
+ tr as toKebabCase,
191
+ ne as useBaseEvents,
192
+ Mo as useBoolean,
193
+ lo as useChat,
194
+ fe as useChatAuth,
195
+ so as useChatBubble,
196
+ be as useChatForm,
197
+ Se as useChatFormState,
198
+ Pe as useChatHistory,
199
+ ze as useChatMarkdown,
200
+ Jr as useColorMode,
201
+ Xr as useColorModeValue,
202
+ jr as useCommandState,
203
+ Gr as useCommandStore,
204
+ Eo as useComponentClassNames,
205
+ Sr as useComposedRefs,
206
+ Fo as useContainerSize,
207
+ Do as useCopyToClipboard,
208
+ Ae as useFormField,
209
+ $e as useHelpMenu,
210
+ Te as useHelpMenuState,
211
+ io as useInkeepChatBubble,
212
+ ge as useInkeepConfig,
213
+ wo as useInkeepOpenState,
214
+ ro as useInkeepSidebarChat,
215
+ $o as useInstantUpdate,
216
+ Oo as useIsMounted,
217
+ zo as useMediaQuery,
218
+ Ge as useMessage,
219
+ Fe as useMessageFeedback,
220
+ ko as useModal,
221
+ no as useOptionalChatBubble,
222
+ Ke as useOptionalMessage,
223
+ to as useOptionalSidebarChat,
224
+ jo as useResizeObserver,
225
+ Ko as useScrollingFades,
226
+ No as useScrollingFadesHorizontal,
227
+ co as useSearch,
228
+ Uo as useSettleAction,
229
+ ot as useShadow,
230
+ ao as useSidebarChat,
231
+ qo as useSimpleScroll,
232
+ qe as useSourceItem,
233
+ _e as useWidget,
228
234
  oe as widgetToggle
229
235
  };
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { jsx as a } from "react/jsx-runtime";
3
- import { ChatBubblePrimitiveRoot as o, CloseButton as l, Header as b } from "../../primitives/components/chat-bubble/index.js";
3
+ import { CloseButton as o, Header as l, ChatBubblePrimitiveRoot as b } from "../../primitives/components/chat-bubble/index.js";
4
4
  import { cn as r } from "../utils.js";
5
5
  import { button as s } from "./ui/recipes/button.js";
6
6
  import { scrollable as i } from "./ui/recipes/scrollable.js";
@@ -8,7 +8,7 @@ const f = ({
8
8
  className: t,
9
9
  ...e
10
10
  }) => /* @__PURE__ */ a(
11
- o,
11
+ b,
12
12
  {
13
13
  ...e,
14
14
  className: r(
@@ -30,7 +30,7 @@ const f = ({
30
30
  className: t,
31
31
  ...e
32
32
  }) => /* @__PURE__ */ a(
33
- b,
33
+ l,
34
34
  {
35
35
  className: r(
36
36
  i({ section: "header" }),
@@ -53,7 +53,7 @@ const f = ({
53
53
  className: t,
54
54
  ...e
55
55
  }) => /* @__PURE__ */ a(
56
- l,
56
+ o,
57
57
  {
58
58
  className: r(
59
59
  s({ variant: "ghost", size: "xs" }),
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),n=require("../../primitives/components/chat-button.cjs"),o=require("../utils.cjs"),r=({className:t,...e})=>a.jsx(n.ChatButtonContainer,{className:o.cn("fixed right-6 bottom-6 z-50 mr-[var(--removed-body-scroll-bar-size)]",t),...e}),s=({className:t,...e})=>a.jsx(n.ChatButton,{className:o.cn("bg-inkeep-primary-text-bold dark:bg-gray-dark-600 rounded-full px-[18px] py-3 text-white font-medium flex items-center space-x-2 shadow-2xl hover:[&:not(:active)]:scale-110 dark:shadow-none transition-transform ease-in-out data-[open]:px-3 active:scale-90 active:transition-transform active:duration-100",t),...e}),c=({className:t,...e})=>a.jsx(n.ChatButtonText,{className:o.cn("flex items-center",t),...e}),i=({className:t,...e})=>a.jsx(n.ChatButtonCloseIcon,{className:o.cn("w-6 h-6",t),...e}),u=({className:t,...e})=>a.jsx(n.ChatButtonPrimitiveAvatarImage,{className:o.cn("data-[type=icon]:[--start-color:theme(colors.inkeep-expanded-primary.50)]","data-[type=icon]:[--end-color:theme(colors.inkeep-expanded-primary.300)]","h-6 w-6",t),...e}),l=({className:t,...e})=>a.jsx(n.ChatButtonAvatarContent,{className:o.cn("",t),...e});exports.ChatButton=s;exports.ChatButtonAvatarContent=l;exports.ChatButtonAvatarImage=u;exports.ChatButtonCloseIcon=i;exports.ChatButtonText=c;exports.Container=r;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("../../primitives/components/chat-button.cjs"),o=require("../utils.cjs"),s=({className:t,...a})=>e.jsx(n.ChatButtonContainer,{className:o.cn("fixed right-6 bottom-6 z-50 mr-[var(--removed-body-scroll-bar-size)]",t),...a}),r=({className:t,...a})=>e.jsx(n.ChatButton,{className:o.cn("bg-inkeep-primary-text-bold dark:bg-gray-dark-600 rounded-full px-[18px] py-3 text-white font-medium flex items-center space-x-2 shadow-2xl hover:[&:not(:active)]:scale-110 dark:shadow-none transition-transform ease-in-out data-[open]:px-3 active:scale-90 active:transition-transform active:duration-100",t),...a}),c=({className:t,...a})=>e.jsx(n.ChatButtonText,{className:o.cn("flex items-center",t),...a}),i=({className:t,...a})=>e.jsx(n.ChatButtonCloseIcon,{className:o.cn("w-6 h-6",t),...a}),u=({className:t,...a})=>e.jsx(n.ChatButtonAvatarImage,{className:o.cn("data-[type=icon]:[--start-color:theme(colors.inkeep-expanded-primary.50)]","data-[type=icon]:[--end-color:theme(colors.inkeep-expanded-primary.300)]","h-6 w-6",t),...a}),l=({className:t,...a})=>e.jsx(n.ChatButtonAvatarContent,{className:o.cn("",t),...a});exports.ChatButton=r;exports.ChatButtonAvatarContent=l;exports.ChatButtonAvatarImage=u;exports.ChatButtonCloseIcon=i;exports.ChatButtonText=c;exports.Container=s;
@@ -1,12 +1,12 @@
1
1
  "use client";
2
2
  import { jsx as e } from "react/jsx-runtime";
3
- import { ChatButtonContainer as n, ChatButton as r, ChatButtonText as i, ChatButtonPrimitiveAvatarImage as s, ChatButtonAvatarContent as m, ChatButtonCloseIcon as c } from "../../primitives/components/chat-button.js";
3
+ import { ChatButton as n, ChatButtonAvatarContent as r, ChatButtonAvatarImage as i, ChatButtonCloseIcon as s, ChatButtonText as m, ChatButtonContainer as c } from "../../primitives/components/chat-button.js";
4
4
  import { cn as o } from "../utils.js";
5
- const u = ({
5
+ const l = ({
6
6
  className: t,
7
7
  ...a
8
8
  }) => /* @__PURE__ */ e(
9
- n,
9
+ c,
10
10
  {
11
11
  className: o(
12
12
  "fixed right-6 bottom-6 z-50 mr-[var(--removed-body-scroll-bar-size)]",
@@ -18,7 +18,7 @@ const u = ({
18
18
  className: t,
19
19
  ...a
20
20
  }) => /* @__PURE__ */ e(
21
- r,
21
+ n,
22
22
  {
23
23
  className: o(
24
24
  "bg-inkeep-primary-text-bold dark:bg-gray-dark-600 rounded-full px-[18px] py-3 text-white font-medium flex items-center space-x-2 shadow-2xl hover:[&:not(:active)]:scale-110 dark:shadow-none transition-transform ease-in-out data-[open]:px-3 active:scale-90 active:transition-transform active:duration-100",
@@ -29,14 +29,14 @@ const u = ({
29
29
  ), p = ({
30
30
  className: t,
31
31
  ...a
32
- }) => /* @__PURE__ */ e(i, { className: o("flex items-center", t), ...a }), v = ({
32
+ }) => /* @__PURE__ */ e(m, { className: o("flex items-center", t), ...a }), v = ({
33
33
  className: t,
34
34
  ...a
35
- }) => /* @__PURE__ */ e(c, { className: o("w-6 h-6", t), ...a }), B = ({
35
+ }) => /* @__PURE__ */ e(s, { className: o("w-6 h-6", t), ...a }), B = ({
36
36
  className: t,
37
37
  ...a
38
38
  }) => /* @__PURE__ */ e(
39
- s,
39
+ i,
40
40
  {
41
41
  className: o(
42
42
  "data-[type=icon]:[--start-color:theme(colors.inkeep-expanded-primary.50)]",
@@ -49,12 +49,12 @@ const u = ({
49
49
  ), x = ({
50
50
  className: t,
51
51
  ...a
52
- }) => /* @__PURE__ */ e(m, { className: o("", t), ...a });
52
+ }) => /* @__PURE__ */ e(r, { className: o("", t), ...a });
53
53
  export {
54
54
  d as ChatButton,
55
55
  x as ChatButtonAvatarContent,
56
56
  B as ChatButtonAvatarImage,
57
57
  v as ChatButtonCloseIcon,
58
58
  p as ChatButtonText,
59
- u as Container
59
+ l as Container
60
60
  };
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),o=require("../../primitives/components/chat-history/index.cjs"),i=require("../utils.cjs"),d=require("./ui/recipes/button.cjs");function h(t){const e=Date.now()-t.getTime(),r=Math.floor(e/(1e3*60)),s=Math.floor(e/(1e3*60*60)),n=Math.floor(e/(1e3*60*60*24));return r<1?"Just now":r<60?`${r}m ago`:s<24?`${s}h ago`:n<7?t.toLocaleDateString("en-US",{weekday:"short"}):t.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}const c=({className:t,...e})=>a.jsx(o.ChatHistoryPrimitiveRoot,{className:i.cn("flex flex-col flex-1 min-h-0 w-full rounded-[inherit] font-body","data-[hidden]:hidden","group-data-[chat-history-layout=sidepane]/chat-history:basis-64","group-data-[chat-history-layout=sidepane]/chat-history:w-64","group-data-[chat-history-layout=sidepane]/chat-history:max-w-64","group-data-[chat-history-layout=sidepane]/chat-history:shrink-0","group-data-[chat-history-layout=sidepane]/chat-history:grow-0","group-data-[chat-history-layout=sidepane]/chat-history:border-r","group-data-[chat-history-layout=sidepane]/chat-history:border-gray-200","dark:group-data-[chat-history-layout=sidepane]/chat-history:border-gray-dark-800",t),...e}),l=({className:t,...e})=>a.jsx(o.ChatHistoryPrimitiveHeader,{className:i.cn("flex items-center justify-between shrink-0","px-3 py-3 relative","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",t),...e}),y=({className:t,...e})=>a.jsx(o.ChatHistoryPrimitiveBackButtonIcon,{className:i.cn("text-sm",t),...e}),m=({className:t,...e})=>a.jsx(o.ChatHistoryPrimitiveBackButton,{className:i.cn(d.button({size:"xs",variant:"ghost"}),"gap-1.5 text-gray-600 hover:text-gray-800 dark:text-white dark:opacity-60 dark:hover:text-white dark:hover:opacity-95","group-data-[chat-history-layout=sidepane]/chat-history:!hidden",t),...e}),u=({className:t,children:e,...r})=>a.jsx(o.ChatHistoryPrimitiveTitle,{className:i.cn("pl-2 text-sm font-normal text-gray-600 dark:text-white-alpha-600","group-data-[chat-history-layout=stack]/chat-history:!hidden",t),...r,children:e??"Chats"}),f=({className:t,...e})=>a.jsx(o.ChatHistoryPrimitiveList,{className:i.cn("flex-1 min-h-0 overflow-y-auto [scrollbar-width:thin] px-2 py-3 space-y-0.5",t),...e}),b=({className:t,...e})=>a.jsx(o.ChatHistoryPrimitiveItem,{className:i.cn("flex flex-col gap-0.5 w-full text-left px-3 py-2 rounded-lg","hover:bg-gray-50 dark:hover:bg-gray-dark-900","focus-visible:outline-none focus-visible:bg-gray-50 dark:focus-visible:bg-gray-dark-900","data-[active]:bg-gray-100 dark:data-[active]:bg-gray-dark-800","transition-colors cursor-pointer",t),...e}),g=({className:t,children:e,...r})=>a.jsx(o.ChatHistoryPrimitiveItemTitle,{className:i.cn("text-sm text-gray-800 dark:text-white-alpha-950 truncate w-full block",t),...r,children:e||a.jsx("span",{className:"text-gray-500 dark:text-white-alpha-500",children:"No message"})}),x=({className:t,...e})=>a.jsx(o.ChatHistoryPrimitiveItemDate,{className:i.cn("text-xs text-gray-500 dark:text-white-alpha-500",t),...e}),p=({className:t,children:e,...r})=>a.jsx(o.ChatHistoryPrimitiveEmptyState,{className:i.cn("flex flex-col items-center justify-center flex-1 py-2 h-full","text-sm text-gray-500 dark:text-white-alpha-500",t),...r,children:e??"No conversations yet."}),C=({className:t,...e})=>a.jsx(o.ChatHistoryPrimitiveLoadingState,{className:i.cn("flex flex-col px-3 py-2 gap-3",t),...e,children:[1,2,3].map(r=>a.jsx("div",{className:"h-14 w-full rounded-lg bg-gray-100 dark:bg-gray-dark-800 animate-pulse"},r))}),H=({className:t,...e})=>a.jsx(o.ChatHistoryPrimitiveFooter,{className:i.cn("shrink-0 px-5 py-4 relative","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",t),...e}),k=({className:t,children:e,...r})=>a.jsx(o.ChatHistoryPrimitiveNewConversationButton,{className:i.cn(d.button({variant:"primaryFilled"}),"w-full shrink-0",t),...r,children:e??"New conversation"});exports.EmbeddedChatHistoryBackButton=m;exports.EmbeddedChatHistoryBackButtonIcon=y;exports.EmbeddedChatHistoryEmptyState=p;exports.EmbeddedChatHistoryFooter=H;exports.EmbeddedChatHistoryHeader=l;exports.EmbeddedChatHistoryItem=b;exports.EmbeddedChatHistoryItemDate=x;exports.EmbeddedChatHistoryItemTitle=g;exports.EmbeddedChatHistoryList=f;exports.EmbeddedChatHistoryLoadingState=C;exports.EmbeddedChatHistoryNewConversationButton=k;exports.EmbeddedChatHistoryRoot=c;exports.EmbeddedChatHistoryTitle=u;exports.formatSessionDate=h;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),o=require("../../primitives/components/chat-history/index.cjs"),i=require("../utils.cjs"),d=require("./ui/recipes/button.cjs");function h(t){const e=Date.now()-t.getTime(),r=Math.floor(e/(1e3*60)),s=Math.floor(e/(1e3*60*60)),n=Math.floor(e/(1e3*60*60*24));return r<1?"Just now":r<60?`${r}m ago`:s<24?`${s}h ago`:n<7?t.toLocaleDateString("en-US",{weekday:"short"}):t.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}const c=({className:t,...e})=>a.jsx(o.ChatHistoryPrimitiveRoot,{className:i.cn("flex flex-col flex-1 min-h-0 w-full rounded-[inherit] font-body","data-[hidden]:hidden","group-data-[chat-history-layout=sidepane]/chat-history:basis-64","group-data-[chat-history-layout=sidepane]/chat-history:w-64","group-data-[chat-history-layout=sidepane]/chat-history:max-w-64","group-data-[chat-history-layout=sidepane]/chat-history:shrink-0","group-data-[chat-history-layout=sidepane]/chat-history:grow-0","group-data-[chat-history-layout=sidepane]/chat-history:border-r","group-data-[chat-history-layout=sidepane]/chat-history:border-gray-200","dark:group-data-[chat-history-layout=sidepane]/chat-history:border-gray-dark-800",t),...e}),l=({className:t,...e})=>a.jsx(o.ChatHistoryPrimitiveHeader,{className:i.cn("flex items-center justify-between shrink-0","px-3 py-3 relative","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",t),...e}),y=({className:t,...e})=>a.jsx(o.BackButtonIcon,{className:i.cn("text-sm",t),...e}),m=({className:t,...e})=>a.jsx(o.BackButton,{className:i.cn(d.button({size:"xs",variant:"ghost"}),"gap-1.5 text-gray-600 hover:text-gray-800 dark:text-white dark:opacity-60 dark:hover:text-white dark:hover:opacity-95","group-data-[chat-history-layout=sidepane]/chat-history:!hidden",t),...e}),u=({className:t,children:e,...r})=>a.jsx(o.ChatHistoryPrimitiveTitle,{className:i.cn("pl-2 text-sm font-normal text-gray-600 dark:text-white-alpha-600","group-data-[chat-history-layout=stack]/chat-history:!hidden",t),...r,children:e??"Chats"}),f=({className:t,...e})=>a.jsx(o.ChatHistoryPrimitiveList,{className:i.cn("flex-1 min-h-0 overflow-y-auto [scrollbar-width:thin] px-2 py-3 space-y-0.5",t),...e}),b=({className:t,...e})=>a.jsx(o.ChatHistoryPrimitiveItem,{className:i.cn("flex flex-col gap-0.5 w-full text-left px-3 py-2 rounded-lg","hover:bg-gray-50 dark:hover:bg-gray-dark-900","focus-visible:outline-none focus-visible:bg-gray-50 dark:focus-visible:bg-gray-dark-900","data-[active]:bg-gray-100 dark:data-[active]:bg-gray-dark-800","transition-colors cursor-pointer",t),...e}),g=({className:t,children:e,...r})=>a.jsx(o.ChatHistoryPrimitiveItemTitle,{className:i.cn("text-sm text-gray-800 dark:text-white-alpha-950 truncate w-full block",t),...r,children:e||a.jsx("span",{className:"text-gray-500 dark:text-white-alpha-500",children:"No message"})}),x=({className:t,...e})=>a.jsx(o.ChatHistoryPrimitiveItemDate,{className:i.cn("text-xs text-gray-500 dark:text-white-alpha-500",t),...e}),p=({className:t,children:e,...r})=>a.jsx(o.ChatHistoryPrimitiveEmptyState,{className:i.cn("flex flex-col items-center justify-center flex-1 py-2 h-full","text-sm text-gray-500 dark:text-white-alpha-500",t),...r,children:e??"No conversations yet."}),C=({className:t,...e})=>a.jsx(o.ChatHistoryPrimitiveLoadingState,{className:i.cn("flex flex-col px-3 py-2 gap-3",t),...e,children:[1,2,3].map(r=>a.jsx("div",{className:"h-14 w-full rounded-lg bg-gray-100 dark:bg-gray-dark-800 animate-pulse"},r))}),H=({className:t,...e})=>a.jsx(o.ChatHistoryPrimitiveFooter,{className:i.cn("shrink-0 px-5 py-4 relative","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",t),...e}),k=({className:t,children:e,...r})=>a.jsx(o.ChatHistoryPrimitiveNewConversationButton,{className:i.cn(d.button({variant:"primaryFilled"}),"w-full shrink-0",t),...r,children:e??"New conversation"});exports.EmbeddedChatHistoryBackButton=m;exports.EmbeddedChatHistoryBackButtonIcon=y;exports.EmbeddedChatHistoryEmptyState=p;exports.EmbeddedChatHistoryFooter=H;exports.EmbeddedChatHistoryHeader=l;exports.EmbeddedChatHistoryItem=b;exports.EmbeddedChatHistoryItemDate=x;exports.EmbeddedChatHistoryItemTitle=g;exports.EmbeddedChatHistoryList=f;exports.EmbeddedChatHistoryLoadingState=C;exports.EmbeddedChatHistoryNewConversationButton=k;exports.EmbeddedChatHistoryRoot=c;exports.EmbeddedChatHistoryTitle=u;exports.formatSessionDate=h;