@docsearch/react 5.0.3 → 5.0.5
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/esm/DocSearchAI-DKtAqje2.d.ts +270 -0
- package/dist/esm/askaiModal.d.ts +1 -1
- package/dist/esm/docsearchAi.d.ts +2 -122
- package/dist/esm/docsearchAi.js.map +1 -1
- package/dist/esm/index.d.ts +2 -3
- package/dist/esm/sidepanel.d.ts +2 -3
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/esm/version.js.map +1 -1
- package/dist/umd/index.js +2 -2
- package/dist/umd/index.js.map +1 -1
- package/package.json +4 -4
- package/dist/esm/AskAiScreenState-DuzmHxUz.d.ts +0 -109
- package/dist/esm/DocSearchAskAiModal-BY3KtJ54.d.ts +0 -48
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docsearch/react",
|
|
3
3
|
"description": "React package for DocSearch, the best search experience for docs.",
|
|
4
|
-
"version": "5.0.
|
|
4
|
+
"version": "5.0.5",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://docsearch.algolia.com",
|
|
7
7
|
"repository": {
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
"@ai-sdk/react": "^2.0.30",
|
|
52
52
|
"@algolia/autocomplete-core": "1.19.2",
|
|
53
53
|
"@base-ui/react": "^1.5.0",
|
|
54
|
-
"@docsearch/core": "5.0.
|
|
55
|
-
"@docsearch/css": "5.0.
|
|
54
|
+
"@docsearch/core": "5.0.5",
|
|
55
|
+
"@docsearch/css": "5.0.5",
|
|
56
56
|
"ai": "^5.0.30",
|
|
57
57
|
"algoliasearch": "^5.28.0",
|
|
58
58
|
"marked": "^16.3.0",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@algolia/autocomplete-core": "1.19.2",
|
|
63
|
-
"@docsearch/core": "5.0.
|
|
63
|
+
"@docsearch/core": "5.0.5",
|
|
64
64
|
"@testing-library/jest-dom": "6.6.3",
|
|
65
65
|
"@testing-library/react": "16.2.0",
|
|
66
66
|
"preact": "11.0.0-beta.0",
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import "./index-BijiN4hK.js";
|
|
2
|
-
import { _ as StoredSearchesSectionsTranslations, g as ErrorScreenTranslations, h as NoResultsScreenTranslations, m as ResultsScreenTranslations } from "./DocSearch-2gNxdJcC.js";
|
|
3
|
-
import React, { JSX } from "react";
|
|
4
|
-
import { AutocompleteState, BaseItem } from "@algolia/autocomplete-core";
|
|
5
|
-
import "@ai-sdk/react";
|
|
6
|
-
//#region src/components/ToolCall.d.ts
|
|
7
|
-
type ToolCallTranslations = {
|
|
8
|
-
/** Text shown while assistant is preparing tool call. */
|
|
9
|
-
preToolCallText: string;
|
|
10
|
-
/** Text shown while assistant is performing search tool call. */
|
|
11
|
-
searchingText: string;
|
|
12
|
-
/** Text shown while assistant is finished performing tool call. */
|
|
13
|
-
toolCallResultText: string;
|
|
14
|
-
/** Text shown when the agent saved related information to memory. */
|
|
15
|
-
savedMemoryToolResultText: string;
|
|
16
|
-
/** Text shown when the agent used the memory tool to enhance results. */
|
|
17
|
-
memoryToolResultText: string;
|
|
18
|
-
};
|
|
19
|
-
//#endregion
|
|
20
|
-
//#region src/AskAiScreen.d.ts
|
|
21
|
-
type AskAiScreenTranslations = Partial<Omit<ToolCallTranslations, 'searchingText' | 'toolCallResultText'> & {
|
|
22
|
-
disclaimerText: string;
|
|
23
|
-
/** Text shown describing a singular related source. */
|
|
24
|
-
relatedSourcesText: string;
|
|
25
|
-
/** Text shown describing multiple related sources. */
|
|
26
|
-
relatedSourcesTextPlural: string;
|
|
27
|
-
thinkingText: string;
|
|
28
|
-
copyButtonText: string;
|
|
29
|
-
copyButtonCopiedText: string;
|
|
30
|
-
copyButtonTitle: string;
|
|
31
|
-
likeButtonTitle: string;
|
|
32
|
-
dislikeButtonTitle: string;
|
|
33
|
-
thanksForFeedbackText: string;
|
|
34
|
-
feedbackPanelTitle: string;
|
|
35
|
-
feedbackDetailsPlaceholder: string;
|
|
36
|
-
feedbackDisclaimerText: string;
|
|
37
|
-
feedbackSubmitButtonText: string;
|
|
38
|
-
feedbackCloseButtonTitle: string;
|
|
39
|
-
feedbackTagIncorrect: string;
|
|
40
|
-
feedbackTagNotWhatIAsked: string;
|
|
41
|
-
feedbackTagSlowOrBuggy: string;
|
|
42
|
-
feedbackTagStyleOrTone: string;
|
|
43
|
-
feedbackTagSafetyOrLegal: string;
|
|
44
|
-
feedbackTagOther: string;
|
|
45
|
-
/**
|
|
46
|
-
* Text shown while assistant is performing search tool call. Maps to
|
|
47
|
-
* `ToolCallTranslations.searchingText`.
|
|
48
|
-
*/
|
|
49
|
-
duringToolCallText: string;
|
|
50
|
-
/**
|
|
51
|
-
* Text shown while assistant is finished performing tool call. Maps to
|
|
52
|
-
* `ToolCallTranslations.toolCallResultText`.
|
|
53
|
-
*/
|
|
54
|
-
afterToolCallText: string;
|
|
55
|
-
/**
|
|
56
|
-
* Build the full jsx element for the aggregated search block. If provided,
|
|
57
|
-
* completely overrides the default english renderer.
|
|
58
|
-
*/
|
|
59
|
-
aggregatedToolCallNode?: (queries: string[], onSearchQueryClick: (query: string) => void) => React.ReactNode;
|
|
60
|
-
/**
|
|
61
|
-
* Generate the list connective parts only (backwards compatibility).
|
|
62
|
-
* Receives full list of queries and should return translation parts for
|
|
63
|
-
* before/after/separators. Example: (qs) => ({ before: 'searched for ',
|
|
64
|
-
* separator: ', ', lastSeparator: ' and ', after: '' }).
|
|
65
|
-
*/
|
|
66
|
-
aggregatedToolCallText?: (queries: string[]) => {
|
|
67
|
-
before?: string;
|
|
68
|
-
separator?: string;
|
|
69
|
-
lastSeparator?: string;
|
|
70
|
-
after?: string;
|
|
71
|
-
};
|
|
72
|
-
/** Message that's shown when user has stopped the streaming of a message. */
|
|
73
|
-
stoppedStreamingText: string;
|
|
74
|
-
/** Error title shown if there is an error while chatting. */
|
|
75
|
-
errorTitleText: string;
|
|
76
|
-
/** Message shown when thread depth limit is exceeded (AI-217 error). */
|
|
77
|
-
threadDepthExceededMessage: string;
|
|
78
|
-
/** Button text for starting a new conversation after thread depth error. */
|
|
79
|
-
startNewConversationButtonText: string;
|
|
80
|
-
suggestedPromptsTitleText: string;
|
|
81
|
-
}>;
|
|
82
|
-
//#endregion
|
|
83
|
-
//#region src/components/ui/RecentConversationsResults.d.ts
|
|
84
|
-
type RecentConversationsResultsTranslations = Partial<{
|
|
85
|
-
recentConversationsTitle: string;
|
|
86
|
-
removeRecentConversationButtonTitle: string;
|
|
87
|
-
}>;
|
|
88
|
-
//#endregion
|
|
89
|
-
//#region src/components/AskAiStartScreen.d.ts
|
|
90
|
-
type AskAiStartScreenTranslations = RecentConversationsResultsTranslations & StoredSearchesSectionsTranslations;
|
|
91
|
-
//#endregion
|
|
92
|
-
//#region src/NewConversationScreen.d.ts
|
|
93
|
-
type NewConversationTranslations = Partial<{
|
|
94
|
-
newConversationTitle: string;
|
|
95
|
-
newConversationDescription: string;
|
|
96
|
-
}>;
|
|
97
|
-
//#endregion
|
|
98
|
-
//#region src/AskAiScreenState.d.ts
|
|
99
|
-
type AskAiScreenStateTranslations = Partial<{
|
|
100
|
-
errorScreen: ErrorScreenTranslations;
|
|
101
|
-
startScreen: AskAiStartScreenTranslations;
|
|
102
|
-
noResultsScreen: NoResultsScreenTranslations;
|
|
103
|
-
resultsScreen: ResultsScreenTranslations;
|
|
104
|
-
askAiScreen: AskAiScreenTranslations;
|
|
105
|
-
newConversation: NewConversationTranslations;
|
|
106
|
-
}>;
|
|
107
|
-
//#endregion
|
|
108
|
-
export { NewConversationTranslations as n, ToolCallTranslations as r, AskAiScreenStateTranslations as t };
|
|
109
|
-
//# sourceMappingURL=AskAiScreenState-DuzmHxUz.d.ts.map
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import "./index-BijiN4hK.js";
|
|
2
|
-
import { v as FooterTranslations, y as FacetBarTranslations } from "./DocSearch-2gNxdJcC.js";
|
|
3
|
-
import { DocSearchAIProps } from "./docsearchAi.js";
|
|
4
|
-
import { n as NewConversationTranslations, t as AskAiScreenStateTranslations } from "./AskAiScreenState-DuzmHxUz.js";
|
|
5
|
-
import { OnAskAiToggle } from "@docsearch/core";
|
|
6
|
-
import React, { JSX } from "react";
|
|
7
|
-
import { AutocompleteState } from "@algolia/autocomplete-core";
|
|
8
|
-
import "@ai-sdk/react";
|
|
9
|
-
//#region src/components/AskAiSearchBox.d.ts
|
|
10
|
-
type AskAiSearchBoxTranslations = Partial<{
|
|
11
|
-
clearButtonTitle: string;
|
|
12
|
-
clearButtonAriaLabel: string;
|
|
13
|
-
closeButtonText: string;
|
|
14
|
-
closeButtonAriaLabel: string;
|
|
15
|
-
placeholderText: string;
|
|
16
|
-
placeholderTextAskAi: string;
|
|
17
|
-
placeholderTextAskAiStreaming: string;
|
|
18
|
-
enterKeyHint: string;
|
|
19
|
-
enterKeyHintAskAi: string;
|
|
20
|
-
searchInputLabel: string;
|
|
21
|
-
backToKeywordSearchButtonText: string;
|
|
22
|
-
backToKeywordSearchButtonAriaLabel: string;
|
|
23
|
-
newConversationPlaceholder: string;
|
|
24
|
-
conversationHistoryTitle: string;
|
|
25
|
-
startNewConversationText: string;
|
|
26
|
-
viewConversationHistoryText: string;
|
|
27
|
-
threadDepthErrorPlaceholder: string;
|
|
28
|
-
}>;
|
|
29
|
-
//#endregion
|
|
30
|
-
//#region src/DocSearchAskAiModal.d.ts
|
|
31
|
-
type DocSearchAskAiModalTranslations = AskAiScreenStateTranslations & Partial<{
|
|
32
|
-
searchBox: AskAiSearchBoxTranslations;
|
|
33
|
-
newConversation: NewConversationTranslations;
|
|
34
|
-
footer: FooterTranslations;
|
|
35
|
-
facets: FacetBarTranslations;
|
|
36
|
-
}>;
|
|
37
|
-
type DocSearchAskAiModalProps = DocSearchAIProps & {
|
|
38
|
-
initialScrollY: number;
|
|
39
|
-
onAskAiToggle: OnAskAiToggle;
|
|
40
|
-
onClose?: () => void;
|
|
41
|
-
isAskAiActive?: boolean;
|
|
42
|
-
translations?: DocSearchAskAiModalTranslations;
|
|
43
|
-
isHybridModeSupported?: boolean;
|
|
44
|
-
};
|
|
45
|
-
declare function DocSearchAskAiModal({ appId, apiKey, askAi, maxResultsPerGroup, theme, onClose, transformItems, hitComponent, resultsFooterComponent, navigator, initialScrollY, transformSearchClient, disableUserPersonalization, initialQuery: initialQueryFromProp, translations, getMissingResultsUrl, insights, onAskAiToggle, interceptAskAiEvent, isAskAiActive, recentSearchesLimit, recentSearchesWithFavoritesLimit, indices, facets, isHybridModeSupported, footerAction, ...props }: DocSearchAskAiModalProps): JSX.Element;
|
|
46
|
-
//#endregion
|
|
47
|
-
export { DocSearchAskAiModalProps as n, DocSearchAskAiModalTranslations as r, DocSearchAskAiModal as t };
|
|
48
|
-
//# sourceMappingURL=DocSearchAskAiModal-BY3KtJ54.d.ts.map
|