@inkeep/cxkit-primitives 0.5.36 → 0.5.38

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 (35) hide show
  1. package/dist/atoms/cmdk/index.cjs +1 -1
  2. package/dist/atoms/cmdk/index.js +328 -320
  3. package/dist/components/embedded-chat/use-inkeep-chat.cjs +3 -3
  4. package/dist/components/embedded-chat/use-inkeep-chat.js +138 -143
  5. package/dist/components/embedded-chat.cjs +2 -2
  6. package/dist/components/embedded-chat.js +306 -306
  7. package/dist/components/embedded-search/search-provider.cjs +1 -1
  8. package/dist/components/embedded-search/search-provider.js +19 -12
  9. package/dist/components/embedded-search/transform-results.cjs +1 -1
  10. package/dist/components/embedded-search/transform-results.js +56 -72
  11. package/dist/components/embedded-search/url-query.cjs +1 -0
  12. package/dist/components/embedded-search/url-query.js +12 -0
  13. package/dist/components/embedded-search/use-inkeep-search.cjs +1 -1
  14. package/dist/components/embedded-search/use-inkeep-search.js +27 -149
  15. package/dist/components/embedded-search/use-search-filter.cjs +1 -0
  16. package/dist/components/embedded-search/use-search-filter.js +91 -0
  17. package/dist/components/embedded-search.cjs +1 -1
  18. package/dist/components/embedded-search.js +372 -365
  19. package/dist/components/intelligent-form/actions/escalation-schema.cjs +1 -1
  20. package/dist/components/intelligent-form/actions/escalation-schema.js +1 -2
  21. package/dist/constants/search.cjs +1 -0
  22. package/dist/constants/search.js +5 -0
  23. package/dist/index.d.cts +17 -122
  24. package/dist/index.d.ts +17 -122
  25. package/dist/providers/base-events-provider.cjs +1 -1
  26. package/dist/providers/base-events-provider.js +1 -1
  27. package/dist/providers/config-provider.cjs +1 -1
  28. package/dist/providers/config-provider.js +15 -15
  29. package/dist/utils/component-ids.cjs +1 -1
  30. package/dist/utils/component-ids.js +1 -1
  31. package/dist/utils/default-settings.cjs +1 -1
  32. package/dist/utils/default-settings.js +7 -21
  33. package/dist/utils/tools/{links-schema.cjs → links-tool.cjs} +1 -1
  34. package/dist/utils/tools/{links-schema.js → links-tool.js} +13 -4
  35. package/package.json +4 -4
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={type:"object",properties:{aiAnnotations:{type:"object",properties:{answerConfidence:{anyOf:[{type:"string",const:"very_confident",description:"Very confident"},{type:"string",const:"somewhat_confident",description:"Somewhat confident"},{type:"string",const:"not_confident",description:"Not confident"},{type:"string",const:"no_sources",description:"No Sources"},{type:"string",const:"other",description:"Other"}]}},required:["answerConfidence"],additionalProperties:!0}},required:["aiAnnotations"],additionalProperties:!1,$schema:"http://json-schema.org/draft-07/schema#"};exports.escalationSchema=e;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={type:"object",properties:{aiAnnotations:{type:"object",properties:{answerConfidence:{anyOf:[{type:"string",const:"very_confident",description:"Very confident"},{type:"string",const:"somewhat_confident",description:"Somewhat confident"},{type:"string",const:"not_confident",description:"Not confident"},{type:"string",const:"no_sources",description:"No Sources"},{type:"string",const:"other",description:"Other"}]}},required:["answerConfidence"],additionalProperties:!0}},required:["aiAnnotations"],additionalProperties:!1};exports.escalationSchema=e;
@@ -40,8 +40,7 @@ const e = {
40
40
  }
41
41
  },
42
42
  required: ["aiAnnotations"],
43
- additionalProperties: !1,
44
- $schema: "http://json-schema.org/draft-07/schema#"
43
+ additionalProperties: !1
45
44
  };
46
45
  export {
47
46
  e as escalationSchema
@@ -0,0 +1 @@
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _="__ask_ai__";exports.ASK_AI_TRIGGER_VALUE=_;
@@ -0,0 +1,5 @@
1
+ "use client";
2
+ const _ = "__ask_ai__";
3
+ export {
4
+ _ as ASK_AI_TRIGGER_VALUE
5
+ };
package/dist/index.d.cts CHANGED
@@ -133,7 +133,7 @@ export declare const aiChatComponentIds: {
133
133
  aiChatMessageAttachmentsPreview__Close: "aiChatMessageAttachmentsPreview__Close";
134
134
  aiChatMessageAttachmentsPreview__Body: "aiChatMessageAttachmentsPreview__Body";
135
135
  aiChatMessage: "aiChatMessage";
136
- aiChatMessageActions: "aiChatMessageActions";
136
+ aiChatMessageToolbar: "aiChatMessageToolbar";
137
137
  aiChatMessageToolActions: "aiChatMessageToolActions";
138
138
  aiChatMessageToolAction: "aiChatMessageToolAction";
139
139
  aiChatMessageAction: "aiChatMessageAction";
@@ -318,8 +318,6 @@ export declare const aiSearchComponentIds: {
318
318
 
319
319
  declare type AnyString = string & {};
320
320
 
321
- declare const ASK_AI_TRIGGER_VALUE = "__ask_ai__";
322
-
323
321
  export declare type AttachmentItemContextValue = {
324
322
  attachment: MessageAttachment;
325
323
  };
@@ -629,7 +627,7 @@ export declare const componentIDs: {
629
627
  aiChatMessageAttachmentsPreview__Close: "aiChatMessageAttachmentsPreview__Close";
630
628
  aiChatMessageAttachmentsPreview__Body: "aiChatMessageAttachmentsPreview__Body";
631
629
  aiChatMessage: "aiChatMessage";
632
- aiChatMessageActions: "aiChatMessageActions";
630
+ aiChatMessageToolbar: "aiChatMessageToolbar";
633
631
  aiChatMessageToolActions: "aiChatMessageToolActions";
634
632
  aiChatMessageToolAction: "aiChatMessageToolAction";
635
633
  aiChatMessageAction: "aiChatMessageAction";
@@ -826,78 +824,6 @@ declare const defaultInkeepAIChatSettings: {
826
824
  copyChat: string;
827
825
  };
828
826
  prompts: never[];
829
- tools: {
830
- type: "function";
831
- function: {
832
- name: string;
833
- description: string;
834
- parameters: {
835
- type: string;
836
- properties: {
837
- links: {
838
- anyOf: ({
839
- type: string;
840
- items: {
841
- type: string;
842
- properties: {
843
- label: {
844
- type: string[];
845
- };
846
- url: {
847
- type: string;
848
- };
849
- title: {
850
- type: string[];
851
- };
852
- description: {
853
- type: string[];
854
- };
855
- type: {
856
- anyOf: ({
857
- anyOf: ({
858
- type: string;
859
- enum: string[];
860
- } | {
861
- type: string;
862
- enum?: undefined;
863
- })[];
864
- type?: undefined;
865
- } | {
866
- type: string;
867
- anyOf?: undefined;
868
- })[];
869
- };
870
- breadcrumbs: {
871
- anyOf: ({
872
- type: string;
873
- items: {
874
- type: string;
875
- };
876
- } | {
877
- type: string;
878
- items?: undefined;
879
- })[];
880
- };
881
- };
882
- required: string[];
883
- additionalProperties: boolean;
884
- };
885
- } | {
886
- type: string;
887
- items?: undefined;
888
- })[];
889
- };
890
- text: {
891
- type: string;
892
- };
893
- };
894
- required: string[];
895
- additionalProperties: boolean;
896
- $schema: string;
897
- };
898
- };
899
- }[];
900
- onToolCall: (_toolCall: any) => undefined;
901
827
  };
902
828
 
903
829
  declare type DefaultInkeepBaseSettings = typeof defaultInkeepBaseSettings;
@@ -1250,7 +1176,7 @@ export declare namespace EmbeddedChatPrimitive {
1250
1176
  EmbeddedChatPrimitiveMessageAttachmentsPreviewBody,
1251
1177
  EmbeddedChatPrimitiveMessageProps,
1252
1178
  EmbeddedChatPrimitiveMessage,
1253
- EmbeddedChatPrimitiveMessageActions,
1179
+ EmbeddedChatPrimitiveMessageToolbar,
1254
1180
  EmbeddedChatPrimitiveMessageToolActionsProps,
1255
1181
  EmbeddedChatPrimitiveMessageToolActions,
1256
1182
  EmbeddedChatPrimitiveMessageToolActionProps,
@@ -1441,7 +1367,7 @@ export declare namespace EmbeddedChatPrimitive {
1441
1367
  EmbeddedChatPrimitiveMessageAttachmentsPreviewClose as MessageAttachmentsPreviewClose,
1442
1368
  EmbeddedChatPrimitiveMessageAttachmentsPreviewBody as MessageAttachmentsPreviewBody,
1443
1369
  EmbeddedChatPrimitiveMessage as Message,
1444
- EmbeddedChatPrimitiveMessageActions as MessageActions,
1370
+ EmbeddedChatPrimitiveMessageToolbar as MessageToolbar,
1445
1371
  EmbeddedChatPrimitiveMessageToolActions as MessageToolActions,
1446
1372
  EmbeddedChatPrimitiveMessageToolAction as MessageToolAction,
1447
1373
  EmbeddedChatPrimitiveMessageAction as MessageAction,
@@ -1873,8 +1799,6 @@ declare interface EmbeddedChatPrimitiveMessageActionProps extends ComponentProps
1873
1799
  action: MessageAction;
1874
1800
  }
1875
1801
 
1876
- declare const EmbeddedChatPrimitiveMessageActions: (props: ComponentPropsWithRef<typeof PrimitiveMessageActions>) => JSX.Element | null;
1877
-
1878
1802
  declare const EmbeddedChatPrimitiveMessageAttachments: (props: ComponentPropsWithRef<typeof PrimitiveMessageAttachments>) => JSX.Element | null;
1879
1803
 
1880
1804
  declare const EmbeddedChatPrimitiveMessageAttachmentsItem: (props: EmbeddedChatPrimitiveMessageAttachmentsItemProps) => JSX.Element;
@@ -1987,6 +1911,8 @@ declare interface EmbeddedChatPrimitiveMessageToolActionsProps extends Omit<Comp
1987
1911
  children: React.ReactNode | ((actions: ToolCallAction[]) => React.ReactNode);
1988
1912
  }
1989
1913
 
1914
+ declare const EmbeddedChatPrimitiveMessageToolbar: (props: ComponentPropsWithRef<typeof PrimitiveMessageToolbar>) => JSX.Element | null;
1915
+
1990
1916
  declare const EmbeddedChatPrimitiveMessageWrapper: (props: EmbeddedChatPrimitiveMessageWrapperProps) => JSX.Element | null;
1991
1917
 
1992
1918
  declare interface EmbeddedChatPrimitiveMessageWrapperProps extends ComponentPropsWithRef<typeof PrimitiveMessageWrapper> {
@@ -2048,7 +1974,6 @@ declare const EmbeddedSearchInputIcon: ForwardRefExoticComponent< PolymorphicPro
2048
1974
 
2049
1975
  export declare namespace EmbeddedSearchPrimitive {
2050
1976
  export {
2051
- ASK_AI_TRIGGER_VALUE,
2052
1977
  EmbeddedSearchPrimitiveWrapper,
2053
1978
  EmbeddedSearchPrimitiveRoot,
2054
1979
  PrimitiveContent,
@@ -3147,8 +3072,6 @@ declare const PrimitiveMessage: ForwardRefExoticComponent< PolymorphicProps & Om
3147
3072
 
3148
3073
  declare const PrimitiveMessageAction: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "_id"> & Partial<Pick< DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "_id">>>;
3149
3074
 
3150
- declare const PrimitiveMessageActions: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id">>>;
3151
-
3152
3075
  declare const PrimitiveMessageAttachments: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id">>>;
3153
3076
 
3154
3077
  declare const PrimitiveMessageAttachmentsItem: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id">>>;
@@ -3221,6 +3144,8 @@ declare const PrimitiveMessageSources: ForwardRefExoticComponent< PolymorphicPro
3221
3144
 
3222
3145
  declare const PrimitiveMessageSourcesHeader: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id">>>;
3223
3146
 
3147
+ declare const PrimitiveMessageToolbar: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id">>>;
3148
+
3224
3149
  declare const PrimitiveMessageWrapper: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id">>>;
3225
3150
 
3226
3151
  declare const PrimitiveModal: (props: PrimitiveModalProps) => JSX.Element;
@@ -3338,35 +3263,7 @@ declare const PrimitiveResultsScrollArea: ForwardRefExoticComponent< Polymorphic
3338
3263
 
3339
3264
  declare const PrimitiveRoot: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id">>>;
3340
3265
 
3341
- declare const PrimitiveRoot_2: ForwardRefExoticComponent< PolymorphicProps & Omit<{
3342
- children?: React.ReactNode;
3343
- } & Omit< ClassAttributes<HTMLDivElement> & HTMLAttributes<HTMLDivElement> & {
3344
- asChild?: boolean;
3345
- }, "ref"> & {
3346
- label?: string;
3347
- shouldFilter?: boolean;
3348
- filter?: (value: string, search: string, keywords?: string[]) => number;
3349
- defaultValue?: string;
3350
- value?: string;
3351
- onValueChange?: (value: string) => void;
3352
- loop?: boolean;
3353
- disablePointerSelection?: boolean;
3354
- vimBindings?: boolean;
3355
- } & RefAttributes<HTMLDivElement>, "_id"> & Partial<Pick<{
3356
- children?: React.ReactNode;
3357
- } & Omit< ClassAttributes<HTMLDivElement> & HTMLAttributes<HTMLDivElement> & {
3358
- asChild?: boolean;
3359
- }, "ref"> & {
3360
- label?: string;
3361
- shouldFilter?: boolean;
3362
- filter?: (value: string, search: string, keywords?: string[]) => number;
3363
- defaultValue?: string;
3364
- value?: string;
3365
- onValueChange?: (value: string) => void;
3366
- loop?: boolean;
3367
- disablePointerSelection?: boolean;
3368
- vimBindings?: boolean;
3369
- } & RefAttributes<HTMLDivElement>, "_id">>>;
3266
+ declare const PrimitiveRoot_2: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id">>>;
3370
3267
 
3371
3268
  declare const PrimitiveRoot_3: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, "_id"> & Partial<Pick< DetailedHTMLProps<FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, "_id">>>;
3372
3269
 
@@ -3665,7 +3562,7 @@ declare const useInkeepChat: () => {
3665
3562
  messageAttachments: MessageAttachment[];
3666
3563
  setMessageAttachments: Dispatch<SetStateAction<MessageAttachment[]>>;
3667
3564
  addAttachment: (attachment: MessageAttachment) => void;
3668
- messageToolCalls: Record<string, ToolCallAction[]>;
3565
+ messageButtons: Record<string, ToolCallAction[]>;
3669
3566
  isEmpty: boolean;
3670
3567
  inputRef: RefObject<HTMLTextAreaElement | null>;
3671
3568
  isMobile: boolean;
@@ -3703,20 +3600,18 @@ declare const useInkeepModal: (props: InkeepModalSettings | undefined) => {
3703
3600
  declare const useInkeepSearch: () => {
3704
3601
  results: Record<string, TransformedSourceItem[]>;
3705
3602
  resultsList: SearchHit[];
3603
+ setResultsList: Dispatch<SetStateAction<SearchHit[]>>;
3706
3604
  hasContent: boolean;
3707
3605
  loading: boolean;
3708
- error: string | null;
3709
- query: string;
3710
- onInput: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
3711
- placeholder: string;
3606
+ setLoading: Dispatch<SetStateAction<boolean>>;
3607
+ defaultTab: string;
3712
3608
  tab: string;
3713
- onTabChange: (newTab: string) => void;
3714
- selectedItem: string | undefined;
3715
- setSelectedItem: Dispatch<SetStateAction<string | undefined>>;
3716
- onSelectedItemChange: (value: string) => void;
3609
+ setTab: Dispatch<SetStateAction<string>>;
3610
+ disableTransition: () => void;
3717
3611
  transitionsDisabled: boolean;
3718
3612
  inputRef: RefObject<HTMLInputElement | null>;
3719
- isMobile: boolean;
3613
+ showSearchResults: boolean;
3614
+ setShowSearchResults: Dispatch<SetStateAction<boolean>>;
3720
3615
  };
3721
3616
 
3722
3617
  /**
package/dist/index.d.ts CHANGED
@@ -133,7 +133,7 @@ export declare const aiChatComponentIds: {
133
133
  aiChatMessageAttachmentsPreview__Close: "aiChatMessageAttachmentsPreview__Close";
134
134
  aiChatMessageAttachmentsPreview__Body: "aiChatMessageAttachmentsPreview__Body";
135
135
  aiChatMessage: "aiChatMessage";
136
- aiChatMessageActions: "aiChatMessageActions";
136
+ aiChatMessageToolbar: "aiChatMessageToolbar";
137
137
  aiChatMessageToolActions: "aiChatMessageToolActions";
138
138
  aiChatMessageToolAction: "aiChatMessageToolAction";
139
139
  aiChatMessageAction: "aiChatMessageAction";
@@ -318,8 +318,6 @@ export declare const aiSearchComponentIds: {
318
318
 
319
319
  declare type AnyString = string & {};
320
320
 
321
- declare const ASK_AI_TRIGGER_VALUE = "__ask_ai__";
322
-
323
321
  export declare type AttachmentItemContextValue = {
324
322
  attachment: MessageAttachment;
325
323
  };
@@ -629,7 +627,7 @@ export declare const componentIDs: {
629
627
  aiChatMessageAttachmentsPreview__Close: "aiChatMessageAttachmentsPreview__Close";
630
628
  aiChatMessageAttachmentsPreview__Body: "aiChatMessageAttachmentsPreview__Body";
631
629
  aiChatMessage: "aiChatMessage";
632
- aiChatMessageActions: "aiChatMessageActions";
630
+ aiChatMessageToolbar: "aiChatMessageToolbar";
633
631
  aiChatMessageToolActions: "aiChatMessageToolActions";
634
632
  aiChatMessageToolAction: "aiChatMessageToolAction";
635
633
  aiChatMessageAction: "aiChatMessageAction";
@@ -826,78 +824,6 @@ declare const defaultInkeepAIChatSettings: {
826
824
  copyChat: string;
827
825
  };
828
826
  prompts: never[];
829
- tools: {
830
- type: "function";
831
- function: {
832
- name: string;
833
- description: string;
834
- parameters: {
835
- type: string;
836
- properties: {
837
- links: {
838
- anyOf: ({
839
- type: string;
840
- items: {
841
- type: string;
842
- properties: {
843
- label: {
844
- type: string[];
845
- };
846
- url: {
847
- type: string;
848
- };
849
- title: {
850
- type: string[];
851
- };
852
- description: {
853
- type: string[];
854
- };
855
- type: {
856
- anyOf: ({
857
- anyOf: ({
858
- type: string;
859
- enum: string[];
860
- } | {
861
- type: string;
862
- enum?: undefined;
863
- })[];
864
- type?: undefined;
865
- } | {
866
- type: string;
867
- anyOf?: undefined;
868
- })[];
869
- };
870
- breadcrumbs: {
871
- anyOf: ({
872
- type: string;
873
- items: {
874
- type: string;
875
- };
876
- } | {
877
- type: string;
878
- items?: undefined;
879
- })[];
880
- };
881
- };
882
- required: string[];
883
- additionalProperties: boolean;
884
- };
885
- } | {
886
- type: string;
887
- items?: undefined;
888
- })[];
889
- };
890
- text: {
891
- type: string;
892
- };
893
- };
894
- required: string[];
895
- additionalProperties: boolean;
896
- $schema: string;
897
- };
898
- };
899
- }[];
900
- onToolCall: (_toolCall: any) => undefined;
901
827
  };
902
828
 
903
829
  declare type DefaultInkeepBaseSettings = typeof defaultInkeepBaseSettings;
@@ -1250,7 +1176,7 @@ export declare namespace EmbeddedChatPrimitive {
1250
1176
  EmbeddedChatPrimitiveMessageAttachmentsPreviewBody,
1251
1177
  EmbeddedChatPrimitiveMessageProps,
1252
1178
  EmbeddedChatPrimitiveMessage,
1253
- EmbeddedChatPrimitiveMessageActions,
1179
+ EmbeddedChatPrimitiveMessageToolbar,
1254
1180
  EmbeddedChatPrimitiveMessageToolActionsProps,
1255
1181
  EmbeddedChatPrimitiveMessageToolActions,
1256
1182
  EmbeddedChatPrimitiveMessageToolActionProps,
@@ -1441,7 +1367,7 @@ export declare namespace EmbeddedChatPrimitive {
1441
1367
  EmbeddedChatPrimitiveMessageAttachmentsPreviewClose as MessageAttachmentsPreviewClose,
1442
1368
  EmbeddedChatPrimitiveMessageAttachmentsPreviewBody as MessageAttachmentsPreviewBody,
1443
1369
  EmbeddedChatPrimitiveMessage as Message,
1444
- EmbeddedChatPrimitiveMessageActions as MessageActions,
1370
+ EmbeddedChatPrimitiveMessageToolbar as MessageToolbar,
1445
1371
  EmbeddedChatPrimitiveMessageToolActions as MessageToolActions,
1446
1372
  EmbeddedChatPrimitiveMessageToolAction as MessageToolAction,
1447
1373
  EmbeddedChatPrimitiveMessageAction as MessageAction,
@@ -1873,8 +1799,6 @@ declare interface EmbeddedChatPrimitiveMessageActionProps extends ComponentProps
1873
1799
  action: MessageAction;
1874
1800
  }
1875
1801
 
1876
- declare const EmbeddedChatPrimitiveMessageActions: (props: ComponentPropsWithRef<typeof PrimitiveMessageActions>) => JSX.Element | null;
1877
-
1878
1802
  declare const EmbeddedChatPrimitiveMessageAttachments: (props: ComponentPropsWithRef<typeof PrimitiveMessageAttachments>) => JSX.Element | null;
1879
1803
 
1880
1804
  declare const EmbeddedChatPrimitiveMessageAttachmentsItem: (props: EmbeddedChatPrimitiveMessageAttachmentsItemProps) => JSX.Element;
@@ -1987,6 +1911,8 @@ declare interface EmbeddedChatPrimitiveMessageToolActionsProps extends Omit<Comp
1987
1911
  children: React.ReactNode | ((actions: ToolCallAction[]) => React.ReactNode);
1988
1912
  }
1989
1913
 
1914
+ declare const EmbeddedChatPrimitiveMessageToolbar: (props: ComponentPropsWithRef<typeof PrimitiveMessageToolbar>) => JSX.Element | null;
1915
+
1990
1916
  declare const EmbeddedChatPrimitiveMessageWrapper: (props: EmbeddedChatPrimitiveMessageWrapperProps) => JSX.Element | null;
1991
1917
 
1992
1918
  declare interface EmbeddedChatPrimitiveMessageWrapperProps extends ComponentPropsWithRef<typeof PrimitiveMessageWrapper> {
@@ -2048,7 +1974,6 @@ declare const EmbeddedSearchInputIcon: ForwardRefExoticComponent< PolymorphicPro
2048
1974
 
2049
1975
  export declare namespace EmbeddedSearchPrimitive {
2050
1976
  export {
2051
- ASK_AI_TRIGGER_VALUE,
2052
1977
  EmbeddedSearchPrimitiveWrapper,
2053
1978
  EmbeddedSearchPrimitiveRoot,
2054
1979
  PrimitiveContent,
@@ -3147,8 +3072,6 @@ declare const PrimitiveMessage: ForwardRefExoticComponent< PolymorphicProps & Om
3147
3072
 
3148
3073
  declare const PrimitiveMessageAction: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "_id"> & Partial<Pick< DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "_id">>>;
3149
3074
 
3150
- declare const PrimitiveMessageActions: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id">>>;
3151
-
3152
3075
  declare const PrimitiveMessageAttachments: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id">>>;
3153
3076
 
3154
3077
  declare const PrimitiveMessageAttachmentsItem: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id">>>;
@@ -3221,6 +3144,8 @@ declare const PrimitiveMessageSources: ForwardRefExoticComponent< PolymorphicPro
3221
3144
 
3222
3145
  declare const PrimitiveMessageSourcesHeader: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id">>>;
3223
3146
 
3147
+ declare const PrimitiveMessageToolbar: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id">>>;
3148
+
3224
3149
  declare const PrimitiveMessageWrapper: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id">>>;
3225
3150
 
3226
3151
  declare const PrimitiveModal: (props: PrimitiveModalProps) => JSX.Element;
@@ -3338,35 +3263,7 @@ declare const PrimitiveResultsScrollArea: ForwardRefExoticComponent< Polymorphic
3338
3263
 
3339
3264
  declare const PrimitiveRoot: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id">>>;
3340
3265
 
3341
- declare const PrimitiveRoot_2: ForwardRefExoticComponent< PolymorphicProps & Omit<{
3342
- children?: React.ReactNode;
3343
- } & Omit< ClassAttributes<HTMLDivElement> & HTMLAttributes<HTMLDivElement> & {
3344
- asChild?: boolean;
3345
- }, "ref"> & {
3346
- label?: string;
3347
- shouldFilter?: boolean;
3348
- filter?: (value: string, search: string, keywords?: string[]) => number;
3349
- defaultValue?: string;
3350
- value?: string;
3351
- onValueChange?: (value: string) => void;
3352
- loop?: boolean;
3353
- disablePointerSelection?: boolean;
3354
- vimBindings?: boolean;
3355
- } & RefAttributes<HTMLDivElement>, "_id"> & Partial<Pick<{
3356
- children?: React.ReactNode;
3357
- } & Omit< ClassAttributes<HTMLDivElement> & HTMLAttributes<HTMLDivElement> & {
3358
- asChild?: boolean;
3359
- }, "ref"> & {
3360
- label?: string;
3361
- shouldFilter?: boolean;
3362
- filter?: (value: string, search: string, keywords?: string[]) => number;
3363
- defaultValue?: string;
3364
- value?: string;
3365
- onValueChange?: (value: string) => void;
3366
- loop?: boolean;
3367
- disablePointerSelection?: boolean;
3368
- vimBindings?: boolean;
3369
- } & RefAttributes<HTMLDivElement>, "_id">>>;
3266
+ declare const PrimitiveRoot_2: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id"> & Partial<Pick< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "_id">>>;
3370
3267
 
3371
3268
  declare const PrimitiveRoot_3: ForwardRefExoticComponent< PolymorphicProps & Omit< DetailedHTMLProps<FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, "_id"> & Partial<Pick< DetailedHTMLProps<FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, "_id">>>;
3372
3269
 
@@ -3665,7 +3562,7 @@ declare const useInkeepChat: () => {
3665
3562
  messageAttachments: MessageAttachment[];
3666
3563
  setMessageAttachments: Dispatch<SetStateAction<MessageAttachment[]>>;
3667
3564
  addAttachment: (attachment: MessageAttachment) => void;
3668
- messageToolCalls: Record<string, ToolCallAction[]>;
3565
+ messageButtons: Record<string, ToolCallAction[]>;
3669
3566
  isEmpty: boolean;
3670
3567
  inputRef: RefObject<HTMLTextAreaElement | null>;
3671
3568
  isMobile: boolean;
@@ -3703,20 +3600,18 @@ declare const useInkeepModal: (props: InkeepModalSettings | undefined) => {
3703
3600
  declare const useInkeepSearch: () => {
3704
3601
  results: Record<string, TransformedSourceItem[]>;
3705
3602
  resultsList: SearchHit[];
3603
+ setResultsList: Dispatch<SetStateAction<SearchHit[]>>;
3706
3604
  hasContent: boolean;
3707
3605
  loading: boolean;
3708
- error: string | null;
3709
- query: string;
3710
- onInput: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
3711
- placeholder: string;
3606
+ setLoading: Dispatch<SetStateAction<boolean>>;
3607
+ defaultTab: string;
3712
3608
  tab: string;
3713
- onTabChange: (newTab: string) => void;
3714
- selectedItem: string | undefined;
3715
- setSelectedItem: Dispatch<SetStateAction<string | undefined>>;
3716
- onSelectedItemChange: (value: string) => void;
3609
+ setTab: Dispatch<SetStateAction<string>>;
3610
+ disableTransition: () => void;
3717
3611
  transitionsDisabled: boolean;
3718
3612
  inputRef: RefObject<HTMLInputElement | null>;
3719
- isMobile: boolean;
3613
+ showSearchResults: boolean;
3614
+ setShowSearchResults: Dispatch<SetStateAction<boolean>>;
3720
3615
  };
3721
3616
 
3722
3617
  /**
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("react/jsx-runtime"),t=require("react"),y=require("../atoms/api/analytics/events.cjs"),B=require("./config-provider.cjs"),b=require("./user-provider.cjs"),p=t.createContext(void 0),f=({children:e})=>{const{baseSettings:s,componentType:n}=B.useInkeepConfig(),{apiKey:o,analyticsApiBaseUrl:r,tags:i,privacyPreferences:d,env:E}=s,{userProperties:c}=b.useUser(),a=t.useMemo(()=>({widgetLibraryVersion:"0.5.36",componentType:n,tags:i}),[n,i]),u=!d.optOutAllAnalytics&&E!=="development",g={logEvent:t.useCallback(async v=>{const m={...a,...v.properties},l={eventName:v.eventName,properties:m,userProperties:c};u&&y.logEvent(l,o,r),s.onEvent?.(l)},[u,s,o,r,c,a])};return P.jsx(p.Provider,{value:g,children:e})},x=()=>{const e=t.useContext(p);if(!e)throw new Error("useBaseEvents must be used within a BaseEventsProvider");return e};exports.BaseEventsProvider=f;exports.useBaseEvents=x;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("react/jsx-runtime"),t=require("react"),y=require("../atoms/api/analytics/events.cjs"),B=require("./config-provider.cjs"),b=require("./user-provider.cjs"),p=t.createContext(void 0),f=({children:e})=>{const{baseSettings:s,componentType:n}=B.useInkeepConfig(),{apiKey:o,analyticsApiBaseUrl:r,tags:i,privacyPreferences:d,env:E}=s,{userProperties:c}=b.useUser(),a=t.useMemo(()=>({widgetLibraryVersion:"0.5.38",componentType:n,tags:i}),[n,i]),u=!d.optOutAllAnalytics&&E!=="development",g={logEvent:t.useCallback(async v=>{const m={...a,...v.properties},l={eventName:v.eventName,properties:m,userProperties:c};u&&y.logEvent(l,o,r),s.onEvent?.(l)},[u,s,o,r,c,a])};return P.jsx(p.Provider,{value:g,children:e})},x=()=>{const e=t.useContext(p);if(!e)throw new Error("useBaseEvents must be used within a BaseEventsProvider");return e};exports.BaseEventsProvider=f;exports.useBaseEvents=x;
@@ -7,7 +7,7 @@ import { useUser as b } from "./user-provider.js";
7
7
  const m = x(void 0), U = ({ children: e }) => {
8
8
  const { baseSettings: t, componentType: o } = C(), { apiKey: n, analyticsApiBaseUrl: s, tags: r, privacyPreferences: u, env: l } = t, { userProperties: i } = b(), a = d(
9
9
  () => ({
10
- widgetLibraryVersion: "0.5.36",
10
+ widgetLibraryVersion: "0.5.38",
11
11
  componentType: o,
12
12
  tags: r
13
13
  }),
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react/jsx-runtime"),S=require("merge-anything"),s=require("react"),r=require("../utils/default-settings.cjs"),f=require("../atoms/shadow/context.cjs"),a={ChatButton:"ChatButton",CustomTrigger:"CustomTrigger",SearchBar:"SearchBar",EmbeddedChat:"EmbeddedChat",EmbeddedSearch:"EmbeddedSearch",EmbeddedSearchAndChat:"EmbeddedSearchAndChat",IntelligentForm:"IntelligentForm"},c={prefix:"ikp",aiChatSettings:r.defaultInkeepAIChatSettings,baseSettings:r.defaultInkeepBaseSettings,searchSettings:r.defaultInkeepSearchSettings,componentType:a.EmbeddedChat},d=s.createContext(c),m=({children:t,value:i})=>{const g=f.useShadow(),u=(o,e,n)=>(n==="apiKey"&&!e&&!i?.baseSettings?.aiApiBaseUrl&&console.warn("Inkeep API key is missing."),n==="tools"&&Array.isArray(e)?(o||[]).concat(e):["baseSettings","searchSettings","aiChatSettings"].includes(n)&&!e?o:e),h={baseSettings:g??{}},C=S.mergeAndCompare(u,c,h,i??{});return p.jsx(d.Provider,{value:C,children:t})},b=()=>{const t=s.useContext(d);if(!t)throw new Error("useInkeepConfig must be used within a ConfigProvider");return t};exports.InkeepConfigProvider=m;exports.WebWidgetInteractionType=a;exports.useInkeepConfig=b;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("react/jsx-runtime"),p=require("merge-anything"),o=require("react"),n=require("../utils/default-settings.cjs"),f=require("../atoms/shadow/context.cjs"),s={ChatButton:"ChatButton",CustomTrigger:"CustomTrigger",SearchBar:"SearchBar",EmbeddedChat:"EmbeddedChat",EmbeddedSearch:"EmbeddedSearch",EmbeddedSearchAndChat:"EmbeddedSearchAndChat",IntelligentForm:"IntelligentForm"},a={prefix:"ikp",aiChatSettings:n.defaultInkeepAIChatSettings,baseSettings:n.defaultInkeepBaseSettings,searchSettings:n.defaultInkeepSearchSettings,componentType:s.EmbeddedChat},d=o.createContext(a),m=({children:e,value:i})=>{const c=f.useShadow(),g=(C,t,r)=>(r==="apiKey"&&!t&&!i?.baseSettings?.aiApiBaseUrl&&console.warn("Inkeep API key is missing."),["baseSettings","searchSettings","aiChatSettings"].includes(r)&&!t?C:t),u={baseSettings:c??{}},h=p.mergeAndCompare(g,a,u,i??{});return S.jsx(d.Provider,{value:h,children:e})},b=()=>{const e=o.useContext(d);if(!e)throw new Error("useInkeepConfig must be used within a ConfigProvider");return e};exports.InkeepConfigProvider=m;exports.WebWidgetInteractionType=s;exports.useInkeepConfig=b;
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import { jsx as c } from "react/jsx-runtime";
3
3
  import { mergeAndCompare as g } from "merge-anything";
4
- import { createContext as m, useContext as p } from "react";
5
- import { defaultInkeepSearchSettings as h, defaultInkeepBaseSettings as C, defaultInkeepAIChatSettings as f } from "../utils/default-settings.js";
4
+ import { createContext as m, useContext as h } from "react";
5
+ import { defaultInkeepSearchSettings as p, defaultInkeepBaseSettings as C, defaultInkeepAIChatSettings as f } from "../utils/default-settings.js";
6
6
  import { useShadow as u } from "../atoms/shadow/context.js";
7
7
  const S = {
8
8
  ChatButton: "ChatButton",
@@ -12,26 +12,26 @@ const S = {
12
12
  EmbeddedSearch: "EmbeddedSearch",
13
13
  EmbeddedSearchAndChat: "EmbeddedSearchAndChat",
14
14
  IntelligentForm: "IntelligentForm"
15
- }, i = {
15
+ }, r = {
16
16
  prefix: "ikp",
17
17
  // Default prefix
18
18
  aiChatSettings: f,
19
19
  baseSettings: C,
20
- searchSettings: h,
20
+ searchSettings: p,
21
21
  componentType: S.EmbeddedChat
22
- }, s = m(i), v = ({ children: t, value: r }) => {
23
- const a = u(), d = g((o, e, n) => (n === "apiKey" && !e && !r?.baseSettings?.aiApiBaseUrl && console.warn("Inkeep API key is missing."), n === "tools" && Array.isArray(e) ? (o || []).concat(e) : ["baseSettings", "searchSettings", "aiChatSettings"].includes(n) && !e ? o : e), i, {
24
- baseSettings: a ?? {}
25
- }, r ?? {});
26
- return /* @__PURE__ */ c(s.Provider, { value: d, children: t });
27
- }, w = () => {
28
- const t = p(s);
29
- if (!t)
22
+ }, i = m(r), A = ({ children: e, value: n }) => {
23
+ const s = u(), a = g((d, t, o) => (o === "apiKey" && !t && !n?.baseSettings?.aiApiBaseUrl && console.warn("Inkeep API key is missing."), ["baseSettings", "searchSettings", "aiChatSettings"].includes(o) && !t ? d : t), r, {
24
+ baseSettings: s ?? {}
25
+ }, n ?? {});
26
+ return /* @__PURE__ */ c(i.Provider, { value: a, children: e });
27
+ }, B = () => {
28
+ const e = h(i);
29
+ if (!e)
30
30
  throw new Error("useInkeepConfig must be used within a ConfigProvider");
31
- return t;
31
+ return e;
32
32
  };
33
33
  export {
34
- v as InkeepConfigProvider,
34
+ A as InkeepConfigProvider,
35
35
  S as WebWidgetInteractionType,
36
- w as useInkeepConfig
36
+ B as useInkeepConfig
37
37
  };