@docsearch/js 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/docsearch.d.ts +1 -1
- package/dist/esm/docsearch.js +2 -2
- package/dist/esm/docsearch.js.map +1 -1
- package/dist/esm/index.d.ts +139 -3
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/umd/docsearch.js +2 -2
- package/dist/umd/docsearch.js.map +1 -1
- package/dist/umd/index.js +2 -2
- package/dist/umd/index.js.map +1 -1
- package/package.json +3 -3
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @docsearch/js 5.0.
|
|
1
|
+
/*! @docsearch/js 5.0.5 (UNRELEASED 5c6c897) | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */
|
|
2
2
|
import React$1, { JSX } from "react";
|
|
3
3
|
import { JSONSchema7 } from "json-schema";
|
|
4
4
|
//#region ../docsearch-core/dist/esm/useKeyboardShortcuts.d.ts
|
|
@@ -8793,7 +8793,138 @@ interface DocSearchProps$1 {
|
|
|
8793
8793
|
resultBadgeKey?: string;
|
|
8794
8794
|
}
|
|
8795
8795
|
//#endregion
|
|
8796
|
-
//#region ../docsearch-react/dist/esm/
|
|
8796
|
+
//#region ../docsearch-react/dist/esm/DocSearchAI-DKtAqje2.d.ts
|
|
8797
|
+
//#region src/components/ToolCall.d.ts
|
|
8798
|
+
type ToolCallTranslations = {
|
|
8799
|
+
/** Text shown while assistant is preparing tool call. */
|
|
8800
|
+
preToolCallText: string;
|
|
8801
|
+
/** Text shown while assistant is performing search tool call. */
|
|
8802
|
+
searchingText: string;
|
|
8803
|
+
/** Text shown while assistant is finished performing tool call. */
|
|
8804
|
+
toolCallResultText: string;
|
|
8805
|
+
/** Text shown when the agent saved related information to memory. */
|
|
8806
|
+
savedMemoryToolResultText: string;
|
|
8807
|
+
/** Text shown when the agent used the memory tool to enhance results. */
|
|
8808
|
+
memoryToolResultText: string;
|
|
8809
|
+
};
|
|
8810
|
+
//#endregion
|
|
8811
|
+
//#region src/AskAiScreen.d.ts
|
|
8812
|
+
type AskAiScreenTranslations = Partial<Omit<ToolCallTranslations, 'searchingText' | 'toolCallResultText'> & {
|
|
8813
|
+
disclaimerText: string;
|
|
8814
|
+
/** Text shown describing a singular related source. */
|
|
8815
|
+
relatedSourcesText: string;
|
|
8816
|
+
/** Text shown describing multiple related sources. */
|
|
8817
|
+
relatedSourcesTextPlural: string;
|
|
8818
|
+
thinkingText: string;
|
|
8819
|
+
copyButtonText: string;
|
|
8820
|
+
copyButtonCopiedText: string;
|
|
8821
|
+
copyButtonTitle: string;
|
|
8822
|
+
likeButtonTitle: string;
|
|
8823
|
+
dislikeButtonTitle: string;
|
|
8824
|
+
thanksForFeedbackText: string;
|
|
8825
|
+
feedbackPanelTitle: string;
|
|
8826
|
+
feedbackDetailsPlaceholder: string;
|
|
8827
|
+
feedbackDisclaimerText: string;
|
|
8828
|
+
feedbackSubmitButtonText: string;
|
|
8829
|
+
feedbackCloseButtonTitle: string;
|
|
8830
|
+
feedbackTagIncorrect: string;
|
|
8831
|
+
feedbackTagNotWhatIAsked: string;
|
|
8832
|
+
feedbackTagSlowOrBuggy: string;
|
|
8833
|
+
feedbackTagStyleOrTone: string;
|
|
8834
|
+
feedbackTagSafetyOrLegal: string;
|
|
8835
|
+
feedbackTagOther: string;
|
|
8836
|
+
/**
|
|
8837
|
+
* Text shown while assistant is performing search tool call. Maps to
|
|
8838
|
+
* `ToolCallTranslations.searchingText`.
|
|
8839
|
+
*/
|
|
8840
|
+
duringToolCallText: string;
|
|
8841
|
+
/**
|
|
8842
|
+
* Text shown while assistant is finished performing tool call. Maps to
|
|
8843
|
+
* `ToolCallTranslations.toolCallResultText`.
|
|
8844
|
+
*/
|
|
8845
|
+
afterToolCallText: string;
|
|
8846
|
+
/**
|
|
8847
|
+
* Build the full jsx element for the aggregated search block. If provided,
|
|
8848
|
+
* completely overrides the default english renderer.
|
|
8849
|
+
*/
|
|
8850
|
+
aggregatedToolCallNode?: (queries: string[], onSearchQueryClick: (query: string) => void) => React$1.ReactNode;
|
|
8851
|
+
/**
|
|
8852
|
+
* Generate the list connective parts only (backwards compatibility).
|
|
8853
|
+
* Receives full list of queries and should return translation parts for
|
|
8854
|
+
* before/after/separators. Example: (qs) => ({ before: 'searched for ',
|
|
8855
|
+
* separator: ', ', lastSeparator: ' and ', after: '' }).
|
|
8856
|
+
*/
|
|
8857
|
+
aggregatedToolCallText?: (queries: string[]) => {
|
|
8858
|
+
before?: string;
|
|
8859
|
+
separator?: string;
|
|
8860
|
+
lastSeparator?: string;
|
|
8861
|
+
after?: string;
|
|
8862
|
+
};
|
|
8863
|
+
/** Message that's shown when user has stopped the streaming of a message. */
|
|
8864
|
+
stoppedStreamingText: string;
|
|
8865
|
+
/** Error title shown if there is an error while chatting. */
|
|
8866
|
+
errorTitleText: string;
|
|
8867
|
+
/** Message shown when thread depth limit is exceeded (AI-217 error). */
|
|
8868
|
+
threadDepthExceededMessage: string;
|
|
8869
|
+
/** Button text for starting a new conversation after thread depth error. */
|
|
8870
|
+
startNewConversationButtonText: string;
|
|
8871
|
+
suggestedPromptsTitleText: string;
|
|
8872
|
+
}>;
|
|
8873
|
+
//#endregion
|
|
8874
|
+
//#region src/components/ui/RecentConversationsResults.d.ts
|
|
8875
|
+
type RecentConversationsResultsTranslations = Partial<{
|
|
8876
|
+
recentConversationsTitle: string;
|
|
8877
|
+
removeRecentConversationButtonTitle: string;
|
|
8878
|
+
}>;
|
|
8879
|
+
//#endregion
|
|
8880
|
+
//#region src/components/AskAiStartScreen.d.ts
|
|
8881
|
+
type AskAiStartScreenTranslations = RecentConversationsResultsTranslations & StoredSearchesSectionsTranslations;
|
|
8882
|
+
//#endregion
|
|
8883
|
+
//#region src/NewConversationScreen.d.ts
|
|
8884
|
+
type NewConversationTranslations = Partial<{
|
|
8885
|
+
newConversationTitle: string;
|
|
8886
|
+
newConversationDescription: string;
|
|
8887
|
+
}>;
|
|
8888
|
+
//#endregion
|
|
8889
|
+
//#region src/AskAiScreenState.d.ts
|
|
8890
|
+
type AskAiScreenStateTranslations = Partial<{
|
|
8891
|
+
errorScreen: ErrorScreenTranslations;
|
|
8892
|
+
startScreen: AskAiStartScreenTranslations;
|
|
8893
|
+
noResultsScreen: NoResultsScreenTranslations;
|
|
8894
|
+
resultsScreen: ResultsScreenTranslations;
|
|
8895
|
+
askAiScreen: AskAiScreenTranslations;
|
|
8896
|
+
newConversation: NewConversationTranslations;
|
|
8897
|
+
}>;
|
|
8898
|
+
//#endregion
|
|
8899
|
+
//#region src/components/AskAiSearchBox.d.ts
|
|
8900
|
+
type AskAiSearchBoxTranslations = Partial<{
|
|
8901
|
+
clearButtonTitle: string;
|
|
8902
|
+
clearButtonAriaLabel: string;
|
|
8903
|
+
closeButtonText: string;
|
|
8904
|
+
closeButtonAriaLabel: string;
|
|
8905
|
+
placeholderText: string;
|
|
8906
|
+
placeholderTextAskAi: string;
|
|
8907
|
+
placeholderTextAskAiStreaming: string;
|
|
8908
|
+
enterKeyHint: string;
|
|
8909
|
+
enterKeyHintAskAi: string;
|
|
8910
|
+
searchInputLabel: string;
|
|
8911
|
+
backToKeywordSearchButtonText: string;
|
|
8912
|
+
backToKeywordSearchButtonAriaLabel: string;
|
|
8913
|
+
newConversationPlaceholder: string;
|
|
8914
|
+
conversationHistoryTitle: string;
|
|
8915
|
+
startNewConversationText: string;
|
|
8916
|
+
viewConversationHistoryText: string;
|
|
8917
|
+
threadDepthErrorPlaceholder: string;
|
|
8918
|
+
}>;
|
|
8919
|
+
//#endregion
|
|
8920
|
+
//#region src/DocSearchAskAiModal.d.ts
|
|
8921
|
+
type DocSearchAskAiModalTranslations = AskAiScreenStateTranslations & Partial<{
|
|
8922
|
+
searchBox: AskAiSearchBoxTranslations;
|
|
8923
|
+
newConversation: NewConversationTranslations;
|
|
8924
|
+
footer: FooterTranslations;
|
|
8925
|
+
facets: FacetBarTranslations;
|
|
8926
|
+
}>;
|
|
8927
|
+
//#endregion
|
|
8797
8928
|
//#region src/DocSearchAI.d.ts
|
|
8798
8929
|
interface AskAiSearchParameters {
|
|
8799
8930
|
facetFilters?: string[];
|
|
@@ -8892,7 +9023,11 @@ interface DocSearchAskAi {
|
|
|
8892
9023
|
*/
|
|
8893
9024
|
promptSuggestions?: PromptSuggestions;
|
|
8894
9025
|
}
|
|
8895
|
-
|
|
9026
|
+
type DocSearchAITranslations = Partial<{
|
|
9027
|
+
button: DocSearchTranslations['button'];
|
|
9028
|
+
modal: DocSearchAskAiModalTranslations;
|
|
9029
|
+
}>;
|
|
9030
|
+
interface DocSearchAIProps$1 extends Omit<DocSearchProps$1, 'translations'> {
|
|
8896
9031
|
/**
|
|
8897
9032
|
* Configuration or assistant id to enable ask ai mode. Pass a string
|
|
8898
9033
|
* assistant id or a full config object.
|
|
@@ -8907,6 +9042,7 @@ interface DocSearchAIProps$1 extends DocSearchProps$1 {
|
|
|
8907
9042
|
* `@docsearch/sidepanel-js`) without flicker.
|
|
8908
9043
|
*/
|
|
8909
9044
|
interceptAskAiEvent?: (initialMessage: InitialAskAiMessage) => boolean | void;
|
|
9045
|
+
translations?: DocSearchAITranslations;
|
|
8910
9046
|
}
|
|
8911
9047
|
//#endregion
|
|
8912
9048
|
//#region ../../node_modules/.bun/preact@11.0.0-beta.0/node_modules/preact/src/index.d.ts
|
package/dist/esm/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @docsearch/js 5.0.
|
|
1
|
+
/*! @docsearch/js 5.0.5 (UNRELEASED 5c6c897) | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */
|
|
2
2
|
//#region \0rolldown/runtime.js
|
|
3
3
|
var __create = Object.create;
|
|
4
4
|
var __defProp$1 = Object.defineProperty;
|
|
@@ -1188,7 +1188,7 @@ function DocSearchButtonKey({ reactsToKey, children }) {
|
|
|
1188
1188
|
|
|
1189
1189
|
//#endregion
|
|
1190
1190
|
//#region ../docsearch-react/dist/esm/version.js
|
|
1191
|
-
const version$2 = "5.0.
|
|
1191
|
+
const version$2 = "5.0.5";
|
|
1192
1192
|
|
|
1193
1193
|
//#endregion
|
|
1194
1194
|
//#region \0@oxc-project+runtime@0.139.0/helpers/esm/OverloadYield.js
|