@docsearch/react
Advanced tools
@@ -109,4 +109,5 @@ import { InitialAskAiMessage, DocSearchModalShortcuts, OnAskAiToggle } from '@docsearch/core'; | ||
| restrictSearchableAttributes?: string[]; | ||
| distinct?: boolean; | ||
| distinct?: boolean | number | string; | ||
| }; | ||
| type AgentStudioSearchParameters = Record<string, Omit<AskAiSearchParameters, 'facetFilters'>>; | ||
| type DocSearchAskAi = { | ||
@@ -133,13 +134,41 @@ /** | ||
| /** | ||
| * Enables displaying suggested questions on Ask AI's new conversation screen. | ||
| * | ||
| * @default false | ||
| */ | ||
| suggestedQuestions?: boolean; | ||
| useStagingEnv?: boolean; | ||
| } & ({ | ||
| /** | ||
| * **Experimental:** Whether to use Agent Studio as the chat backend. | ||
| * | ||
| * This is an experimental feature and its API may change without notice in future releases. | ||
| * Use with caution in production environments. | ||
| * | ||
| * @default false | ||
| */ | ||
| agentStudio?: never; | ||
| /** | ||
| * The search parameters to use for the ask AI feature. | ||
| * | ||
| * **NOTE**: If using `agentStudio = true`, the `searchParameters` object is | ||
| * keyed by the index name. | ||
| */ | ||
| searchParameters?: AskAiSearchParameters; | ||
| } | { | ||
| agentStudio: false; | ||
| searchParameters?: AskAiSearchParameters; | ||
| } | { | ||
| agentStudio: true; | ||
| /** | ||
| * Enables displaying suggested questions on Ask AI's new conversation screen. | ||
| * The search parameters to use for the ask AI feature. | ||
| * Keyed by the index name. | ||
| * | ||
| * @default false | ||
| * @example | ||
| * { | ||
| * "INDEX_NAME": { distinct: false } | ||
| * } | ||
| */ | ||
| suggestedQuestions?: boolean; | ||
| useStagingEnv?: boolean; | ||
| }; | ||
| searchParameters?: AgentStudioSearchParameters; | ||
| }); | ||
| interface DocSearchIndex { | ||
@@ -182,11 +211,2 @@ name: string; | ||
| /** | ||
| * **Experimental:** Whether to use Agent Studio as the chat backend. | ||
| * | ||
| * This is an experimental feature and its API may change without notice in future releases. | ||
| * Use with caution in production environments. | ||
| * | ||
| * @default false | ||
| */ | ||
| agentStudio?: boolean; | ||
| /** | ||
| * Theme overrides applied to the modal and related components. | ||
@@ -428,5 +448,5 @@ */ | ||
| }; | ||
| declare function DocSearchModal({ appId, apiKey, askAi, maxResultsPerGroup, theme, onClose, transformItems, hitComponent, resultsFooterComponent, navigator, initialScrollY, transformSearchClient, disableUserPersonalization, initialQuery: initialQueryFromProp, translations, getMissingResultsUrl, insights, onAskAiToggle, interceptAskAiEvent, isAskAiActive, recentSearchesLimit, recentSearchesWithFavoritesLimit, indices, indexName, searchParameters, isHybridModeSupported, agentStudio, ...props }: DocSearchModalProps): JSX.Element; | ||
| declare function DocSearchModal({ appId, apiKey, askAi, maxResultsPerGroup, theme, onClose, transformItems, hitComponent, resultsFooterComponent, navigator, initialScrollY, transformSearchClient, disableUserPersonalization, initialQuery: initialQueryFromProp, translations, getMissingResultsUrl, insights, onAskAiToggle, interceptAskAiEvent, isAskAiActive, recentSearchesLimit, recentSearchesWithFavoritesLimit, indices, indexName, searchParameters, isHybridModeSupported, ...props }: DocSearchModalProps): JSX.Element; | ||
| export { DocSearchModal }; | ||
| export type { DocSearchModalProps, ModalTranslations }; |
+38
-18
@@ -180,4 +180,5 @@ import { BaseItem, AutocompleteState, AutocompleteContext, AutocompleteInsightsApi, AutocompleteOptions } from '@algolia/autocomplete-core'; | ||
| restrictSearchableAttributes?: string[]; | ||
| distinct?: boolean; | ||
| distinct?: boolean | number | string; | ||
| }; | ||
| type AgentStudioSearchParameters = Record<string, Omit<AskAiSearchParameters, 'facetFilters'>>; | ||
| type DocSearchAskAi = { | ||
@@ -204,13 +205,41 @@ /** | ||
| /** | ||
| * Enables displaying suggested questions on Ask AI's new conversation screen. | ||
| * | ||
| * @default false | ||
| */ | ||
| suggestedQuestions?: boolean; | ||
| useStagingEnv?: boolean; | ||
| } & ({ | ||
| /** | ||
| * **Experimental:** Whether to use Agent Studio as the chat backend. | ||
| * | ||
| * This is an experimental feature and its API may change without notice in future releases. | ||
| * Use with caution in production environments. | ||
| * | ||
| * @default false | ||
| */ | ||
| agentStudio?: never; | ||
| /** | ||
| * The search parameters to use for the ask AI feature. | ||
| * | ||
| * **NOTE**: If using `agentStudio = true`, the `searchParameters` object is | ||
| * keyed by the index name. | ||
| */ | ||
| searchParameters?: AskAiSearchParameters; | ||
| } | { | ||
| agentStudio: false; | ||
| searchParameters?: AskAiSearchParameters; | ||
| } | { | ||
| agentStudio: true; | ||
| /** | ||
| * Enables displaying suggested questions on Ask AI's new conversation screen. | ||
| * The search parameters to use for the ask AI feature. | ||
| * Keyed by the index name. | ||
| * | ||
| * @default false | ||
| * @example | ||
| * { | ||
| * "INDEX_NAME": { distinct: false } | ||
| * } | ||
| */ | ||
| suggestedQuestions?: boolean; | ||
| useStagingEnv?: boolean; | ||
| }; | ||
| searchParameters?: AgentStudioSearchParameters; | ||
| }); | ||
| interface DocSearchIndex { | ||
@@ -253,11 +282,2 @@ name: string; | ||
| /** | ||
| * **Experimental:** Whether to use Agent Studio as the chat backend. | ||
| * | ||
| * This is an experimental feature and its API may change without notice in future releases. | ||
| * Use with caution in production environments. | ||
| * | ||
| * @default false | ||
| */ | ||
| agentStudio?: boolean; | ||
| /** | ||
| * Theme overrides applied to the modal and related components. | ||
@@ -512,3 +532,3 @@ */ | ||
| }; | ||
| declare function DocSearchModal({ appId, apiKey, askAi, maxResultsPerGroup, theme, onClose, transformItems, hitComponent, resultsFooterComponent, navigator, initialScrollY, transformSearchClient, disableUserPersonalization, initialQuery: initialQueryFromProp, translations, getMissingResultsUrl, insights, onAskAiToggle, interceptAskAiEvent, isAskAiActive, recentSearchesLimit, recentSearchesWithFavoritesLimit, indices, indexName, searchParameters, isHybridModeSupported, agentStudio, ...props }: DocSearchModalProps): JSX.Element; | ||
| declare function DocSearchModal({ appId, apiKey, askAi, maxResultsPerGroup, theme, onClose, transformItems, hitComponent, resultsFooterComponent, navigator, initialScrollY, transformSearchClient, disableUserPersonalization, initialQuery: initialQueryFromProp, translations, getMissingResultsUrl, insights, onAskAiToggle, interceptAskAiEvent, isAskAiActive, recentSearchesLimit, recentSearchesWithFavoritesLimit, indices, indexName, searchParameters, isHybridModeSupported, ...props }: DocSearchModalProps): JSX.Element; | ||
@@ -537,5 +557,5 @@ interface UseDocSearchKeyboardEventsProps { | ||
| declare const version = "4.5.0-beta.2"; | ||
| declare const version = "4.5.0-beta.3"; | ||
| export { DocSearch, DocSearchButton, DocSearchInner, DocSearchModal, useDocSearchKeyboardEvents, version }; | ||
| export type { AskAiSearchParameters, ButtonTranslations, DocSearchAskAi, DocSearchButtonProps, DocSearchHit, DocSearchIndex, DocSearchModalProps, DocSearchProps, DocSearchState, DocSearchTheme, DocSearchTransformClient, DocSearchTranslations, InternalDocSearchHit, KeyboardShortcuts, ModalTranslations, StoredAskAiMessage, StoredAskAiState, StoredDocSearchHit, SuggestedQuestion, SuggestedQuestionHit, UseDocSearchKeyboardEventsProps }; | ||
| export type { AgentStudioSearchParameters, AskAiSearchParameters, ButtonTranslations, DocSearchAskAi, DocSearchButtonProps, DocSearchHit, DocSearchIndex, DocSearchModalProps, DocSearchProps, DocSearchState, DocSearchTheme, DocSearchTransformClient, DocSearchTranslations, InternalDocSearchHit, KeyboardShortcuts, ModalTranslations, StoredAskAiMessage, StoredAskAiState, StoredDocSearchHit, SuggestedQuestion, SuggestedQuestionHit, UseDocSearchKeyboardEventsProps }; |
+40
-63
@@ -10,4 +10,5 @@ import { SidepanelShortcuts, InitialAskAiMessage, DocSearchCallbacks, DocSearchTheme, DocSearchRef } from '@docsearch/core'; | ||
| restrictSearchableAttributes?: string[]; | ||
| distinct?: boolean; | ||
| distinct?: boolean | number | string; | ||
| }; | ||
| type AgentStudioSearchParameters = Record<string, Omit<AskAiSearchParameters, 'facetFilters'>>; | ||
@@ -74,2 +75,6 @@ type AlgoliaLogoTranslations = Partial<{ | ||
| thanksForFeedbackText: string; | ||
| /** | ||
| * Error title shown if there is an error while chatting. | ||
| */ | ||
| errorTitleText: any; | ||
| }>; | ||
@@ -166,3 +171,3 @@ | ||
| }>; | ||
| type SidepanelProps = { | ||
| type SidepanelProps$1 = { | ||
| /** | ||
@@ -225,3 +230,3 @@ * Variant of the Sidepanel positioning. | ||
| }; | ||
| declare const Sidepanel: React.ForwardRefExoticComponent<Omit<DocSearchSidepanelProps, "button" | "panel"> & SidepanelProps & { | ||
| type Props$1 = Omit<DocSearchSidepanelProps, 'button' | 'panel'> & SidepanelProps$1 & SidepanelSearchParameters & { | ||
| isOpen?: boolean; | ||
@@ -231,3 +236,4 @@ onOpen: () => void; | ||
| initialMessage?: InitialAskAiMessage; | ||
| } & React.RefAttributes<SidepanelRef>>; | ||
| }; | ||
| declare const Sidepanel: React.ForwardRefExoticComponent<Props$1 & React.RefAttributes<SidepanelRef>>; | ||
@@ -273,54 +279,36 @@ type SidepanelButtonTranslations = Partial<{ | ||
| type DocSearchSidepanelProps = DocSearchCallbacks & { | ||
| type SidepanelSearchParameters = { | ||
| /** | ||
| * The assistant ID to use for the ask AI feature. | ||
| * **Experimental:** Whether to use Agent Studio as the chat backend. | ||
| * | ||
| * This is an experimental feature and its API may change without notice in future releases. | ||
| * Use with caution in production environments. | ||
| * | ||
| * @default false | ||
| */ | ||
| assistantId: string; | ||
| agentStudio?: never; | ||
| /** | ||
| * Public api key with search permissions for the index. | ||
| */ | ||
| apiKey: string; | ||
| /** | ||
| * Algolia application id used by the search client. | ||
| */ | ||
| appId: string; | ||
| /** | ||
| * The index name to use for the ask AI feature. Your assistant will search this index for relevant documents. | ||
| */ | ||
| indexName: string; | ||
| /** | ||
| * The search parameters to use for the ask AI feature. | ||
| * | ||
| * **NOTE**: If using `agentStudio = true`, the `searchParameters` object is | ||
| * keyed by the index name. | ||
| */ | ||
| searchParameters?: AskAiSearchParameters; | ||
| } | { | ||
| agentStudio: false; | ||
| searchParameters?: AskAiSearchParameters; | ||
| } | { | ||
| agentStudio: true; | ||
| /** | ||
| * Configuration for keyboard shortcuts. Allows enabling/disabling specific shortcuts. | ||
| * The search parameters to use for the ask AI feature. | ||
| * Keyed by the index name. | ||
| * | ||
| * @default `{ 'Ctrl/Cmd+I': true }` | ||
| * @example | ||
| * { | ||
| * "INDEX_NAME": { distinct: false } | ||
| * } | ||
| */ | ||
| keyboardShortcuts?: SidepanelShortcuts; | ||
| /** | ||
| * Theme overrides applied to the Sidepanel button and panel. | ||
| * | ||
| * @default 'light' | ||
| */ | ||
| theme?: DocSearchTheme; | ||
| /** | ||
| * Props specific to the Sidepanel button. | ||
| */ | ||
| button?: Omit<SidepanelButtonProps, 'keyboardShortcuts'>; | ||
| /** | ||
| * Props specific to the Sidepanel panel. | ||
| */ | ||
| panel?: Omit<SidepanelProps, 'keyboardShortcuts'>; | ||
| /** | ||
| * **Experimental:** Whether to use Agent Studio as the chat backend. | ||
| * | ||
| * This is an experimental feature and its API may change without notice in future releases. | ||
| * Use with caution in production environments. | ||
| * | ||
| * @default false | ||
| */ | ||
| agentStudio?: boolean; | ||
| searchParameters?: AgentStudioSearchParameters; | ||
| }; | ||
| declare const DocSearchSidepanel: React.ForwardRefExoticComponent<DocSearchCallbacks & { | ||
| type DocSearchSidepanelProps = DocSearchCallbacks & { | ||
| /** | ||
@@ -343,6 +331,2 @@ * The assistant ID to use for the ask AI feature. | ||
| /** | ||
| * The search parameters to use for the ask AI feature. | ||
| */ | ||
| searchParameters?: AskAiSearchParameters; | ||
| /** | ||
| * Configuration for keyboard shortcuts. Allows enabling/disabling specific shortcuts. | ||
@@ -362,19 +346,12 @@ * | ||
| */ | ||
| button?: Omit<SidepanelButtonProps, "keyboardShortcuts">; | ||
| button?: Omit<SidepanelButtonProps, 'keyboardShortcuts'>; | ||
| /** | ||
| * Props specific to the Sidepanel panel. | ||
| */ | ||
| panel?: Omit<SidepanelProps, "keyboardShortcuts">; | ||
| /** | ||
| * **Experimental:** Whether to use Agent Studio as the chat backend. | ||
| * | ||
| * This is an experimental feature and its API may change without notice in future releases. | ||
| * Use with caution in production environments. | ||
| * | ||
| * @default false | ||
| */ | ||
| agentStudio?: boolean; | ||
| } & React.RefAttributes<DocSearchRef>>; | ||
| panel?: Omit<SidepanelProps$1, 'keyboardShortcuts'>; | ||
| }; | ||
| type SidepanelProps = DocSearchSidepanelProps & SidepanelSearchParameters; | ||
| declare const DocSearchSidepanel: React.ForwardRefExoticComponent<SidepanelProps & React.RefAttributes<DocSearchRef>>; | ||
| export { DocSearchSidepanel, Sidepanel, SidepanelButton }; | ||
| export type { ButtonVariant, DocSearchSidepanelProps, SidepanelButtonProps, SidepanelButtonTranslations, SidepanelProps, SidepanelRef, SidepanelTranslations }; | ||
| export type { ButtonVariant, DocSearchSidepanelProps, SidepanelButtonProps, SidepanelButtonTranslations, SidepanelProps$1 as SidepanelProps, SidepanelRef, SidepanelSearchParameters, SidepanelTranslations }; |
@@ -1,3 +0,3 @@ | ||
| declare const version = "4.5.0-beta.2"; | ||
| declare const version = "4.5.0-beta.3"; | ||
| export { version }; |
@@ -1,1 +0,1 @@ | ||
| var a="4.5.0-beta.2";export{a as version}; | ||
| var a="4.5.0-beta.3";export{a as version}; |
@@ -1,3 +0,3 @@ | ||
| /*! @docsearch/react 4.5.0-beta.2 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */ | ||
| /*! @docsearch/react 4.5.0-beta.3 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */ | ||
| !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).DocSearchReact={},e.React)}(this,function(e,t){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function n(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o.apply(null,arguments)}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function c(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,c,i=[],u=!0,l=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(i.push(n.value),i.length!==t);u=!0);}catch(e){l=!0,o=e}finally{try{if(!u&&null!=r.return&&(c=r.return(),Object(c)!==c))return}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return r(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var u={"Ctrl/Cmd+K":!0,"/":!0};function l(e){var r=e.size,n=void 0===r?20:r,o=e.color,a=void 0===o?"currentColor":o;return t.createElement("svg",{width:n,height:n,className:"DocSearch-Search-Icon",viewBox:"0 0 24 24","aria-hidden":"true"},t.createElement("circle",{cx:"11",cy:"11",r:"8",stroke:a,fill:"none",strokeWidth:"1.4"}),t.createElement("path",{d:"m21 21-4.3-4.3",stroke:a,fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}))}var f="Ctrl";var s=["translations","keyboardShortcuts"],d=t.forwardRef(function(e,r){var n,a,d,y=e.translations,h=void 0===y?{}:y,p=e.keyboardShortcuts,b=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,s),v=h.buttonText,O=void 0===v?"Search":v,g=h.buttonAriaLabel,S=void 0===g?"Search":g,w=(n=p,c(c({},u),n)),E=i(t.useState(null),2),j=E[0],k=E[1];a={theme:b.theme},d=a.theme,t.useEffect(function(){if(d){var e=document.documentElement.dataset.theme;if(d!==e)return document.documentElement.dataset.theme=d,function(){void 0===e?delete document.documentElement.dataset.theme:document.documentElement.dataset.theme=e}}},[d]),t.useEffect(function(){"undefined"!=typeof navigator&&(/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)?k("⌘"):k(f))},[]);var P=i(j===f?[f,"Control","Ctrl"]:["Meta","Meta","⌘"],3),D=P[0],C=P[1],K=P[2],B=w["Ctrl/Cmd+K"],x="".concat(C,"+k");return t.createElement("button",o({type:"button",className:"DocSearch DocSearch-Button","aria-label":B?"".concat(S," (").concat(x,")"):S,"aria-keyshortcuts":B?x:void 0},b,{ref:r}),t.createElement("span",{className:"DocSearch-Button-Container"},t.createElement(l,null),t.createElement("span",{className:"DocSearch-Button-Placeholder"},O)),t.createElement("span",{className:"DocSearch-Button-Keys"},null!==j&&B&&t.createElement(t.Fragment,null,t.createElement(m,{reactsToKey:D},K),t.createElement(m,{reactsToKey:"k"},"K"))))});function m(e){var r=e.reactsToKey,n=e.children,o=i(t.useState(!1),2),a=o[0],c=o[1];return t.useEffect(function(){if(r)return window.addEventListener("keydown",e),window.addEventListener("keyup",t),function(){window.removeEventListener("keydown",e),window.removeEventListener("keyup",t)};function e(e){e.key===r&&c(!0)}function t(e){e.key!==r&&"Meta"!==e.key||c(!1)}},[r]),t.createElement("kbd",{className:a?"DocSearch-Button-Key DocSearch-Button-Key--pressed":"DocSearch-Button-Key"+("Ctrl"===r?" DocSearch-Button-Key--ctrl":"")},n)}e.DocSearchButton=d}); | ||
| //# sourceMappingURL=DocsearchButton.js.map |
@@ -1,3 +0,3 @@ | ||
| /*! @docsearch/react 4.5.0-beta.2 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */ | ||
| /*! @docsearch/react 4.5.0-beta.3 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */ | ||
| !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).DocSearchReact={},e.React)}(this,function(e,t){"use strict";function r(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function o(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?n(Object(o),!0).forEach(function(t){r(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):n(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}var i={"Ctrl/Cmd+K":!0,"/":!0};e.useDocSearchKeyboardEvents=function(e){var r,n=e.isOpen,c=e.onOpen,a=e.onClose,u=e.isAskAiActive,f=e.onAskAiToggle,s=e.keyboardShortcuts,l=(r=s,o(o({},i),r));t.useEffect(function(){function e(e){var t;if(n&&"Escape"===e.code&&u)f(!1);else{var r=l["Ctrl/Cmd+K"]&&"k"===(null===(t=e.key)||void 0===t?void 0:t.toLowerCase())&&(e.metaKey||e.ctrlKey),o=l["/"]&&"/"===e.key;("Escape"===e.code&&n||r||!function(e){var t=e.composedPath()[0],r=t.tagName;return t.isContentEditable||"INPUT"===r||"SELECT"===r||"TEXTAREA"===r}(e)&&o&&!n)&&(e.preventDefault(),n?a():document.body.classList.contains("DocSearch--active")||c())}}return window.addEventListener("keydown",e),function(){window.removeEventListener("keydown",e)}},[n,c,a,u,f,l])}}); | ||
| //# sourceMappingURL=useDocSearchKeyboardEvents.js.map |
@@ -1,3 +0,3 @@ | ||
| /*! @docsearch/react 4.5.0-beta.2 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */ | ||
| /*! @docsearch/react 4.5.0-beta.3 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */ | ||
| !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).DocSearchReact={},e.React)}(this,function(e,t){"use strict";e.useTheme=function(e){var n=e.theme;t.useEffect(function(){if(n){var e=document.documentElement.dataset.theme;if(n!==e)return document.documentElement.dataset.theme=n,function(){void 0===e?delete document.documentElement.dataset.theme:document.documentElement.dataset.theme=e}}},[n])}}); | ||
| //# sourceMappingURL=useTheme.js.map |
@@ -1,3 +0,3 @@ | ||
| /*! @docsearch/react 4.5.0-beta.2 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */ | ||
| !function(e,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports):"function"==typeof define&&define.amd?define(["exports"],o):o((e="undefined"!=typeof globalThis?globalThis:e||self).DocSearchReact={})}(this,function(e){"use strict";e.version="4.5.0-beta.2"}); | ||
| /*! @docsearch/react 4.5.0-beta.3 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */ | ||
| !function(e,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports):"function"==typeof define&&define.amd?define(["exports"],o):o((e="undefined"!=typeof globalThis?globalThis:e||self).DocSearchReact={})}(this,function(e){"use strict";e.version="4.5.0-beta.3"}); | ||
| //# sourceMappingURL=version.js.map |
+3
-3
| { | ||
| "name": "@docsearch/react", | ||
| "description": "React package for DocSearch, the best search experience for docs.", | ||
| "version": "4.5.0-beta.2", | ||
| "version": "4.5.0-beta.3", | ||
| "license": "MIT", | ||
@@ -55,3 +55,3 @@ "homepage": "https://docsearch.algolia.com", | ||
| "dependencies": { | ||
| "@docsearch/css": "4.5.0-beta.2" | ||
| "@docsearch/css": "4.5.0-beta.3" | ||
| }, | ||
@@ -61,3 +61,3 @@ "devDependencies": { | ||
| "@algolia/autocomplete-core": "1.19.2", | ||
| "@docsearch/core": "4.5.0-beta.2", | ||
| "@docsearch/core": "4.5.0-beta.3", | ||
| "@rollup/plugin-replace": "6.0.2", | ||
@@ -64,0 +64,0 @@ "@testing-library/jest-dom": "6.6.3", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
7380953
0.18%11210
0.27%+ Added
- Removed
Updated