@docsearch/react
Advanced tools
@@ -130,3 +130,3 @@ import { InitialAskAiMessage, DocSearchModalShortcuts, OnAskAiToggle } from '@docsearch/core'; | ||
| */ | ||
| assistantId: string | null; | ||
| assistantId: string; | ||
| /** | ||
@@ -179,9 +179,12 @@ * The search parameters to use for the ask AI feature. | ||
| */ | ||
| interceptAskAiEvent?: (initialMessage: InitialAskAiMessage) => boolean | void; | ||
| /** | ||
| * Intercept Ask AI events (prompt submit, suggested question selection, etc). | ||
| * **Experimental:** Whether to use Agent Studio as the chat backend. | ||
| * | ||
| * Return `true` to prevent *all* default Ask AI behavior that would normally follow | ||
| * (no toggle, no sendMessage, no internal Ask AI state updates). | ||
| * This is an experimental feature and its API may change without notice in future releases. | ||
| * Use with caution in production environments. | ||
| * | ||
| * @default false | ||
| */ | ||
| interceptAskAiEvent?: (initialMessage: InitialAskAiMessage) => boolean | void; | ||
| agentStudio?: boolean; | ||
| /** | ||
@@ -424,5 +427,5 @@ * Theme overrides applied to the modal and related components. | ||
| }; | ||
| 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; | ||
| 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; | ||
| export { DocSearchModal }; | ||
| export type { DocSearchModalProps, ModalTranslations }; |
+40
-12
@@ -124,7 +124,22 @@ import { BaseItem, AutocompleteState, AutocompleteContext, AutocompleteInsightsApi, AutocompleteOptions } from '@algolia/autocomplete-core'; | ||
| } | ||
| interface AgentStudioSearchTool { | ||
| input: { | ||
| index: string; | ||
| query: string; | ||
| number_of_results: number; | ||
| facet_filters: any | null; | ||
| }; | ||
| output: { | ||
| hits?: any[]; | ||
| nbHits?: number; | ||
| queryID?: string; | ||
| }; | ||
| } | ||
| type Tools = { | ||
| searchIndex: SearchIndexTool; | ||
| algolia_search_index: AgentStudioSearchTool; | ||
| }; | ||
| type AIMessage = UIMessage<{ | ||
| stopped?: boolean; | ||
| }, UIDataTypes, { | ||
| searchIndex: SearchIndexTool; | ||
| }>; | ||
| }, UIDataTypes, Tools>; | ||
@@ -187,3 +202,3 @@ type StoredDocSearchHit = Omit<DocSearchHit, '_highlightResult' | '_snippetResult'>; | ||
| */ | ||
| assistantId: string | null; | ||
| assistantId: string; | ||
| /** | ||
@@ -236,9 +251,12 @@ * The search parameters to use for the ask AI feature. | ||
| */ | ||
| interceptAskAiEvent?: (initialMessage: InitialAskAiMessage) => boolean | void; | ||
| /** | ||
| * Intercept Ask AI events (prompt submit, suggested question selection, etc). | ||
| * **Experimental:** Whether to use Agent Studio as the chat backend. | ||
| * | ||
| * Return `true` to prevent *all* default Ask AI behavior that would normally follow | ||
| * (no toggle, no sendMessage, no internal Ask AI state updates). | ||
| * This is an experimental feature and its API may change without notice in future releases. | ||
| * Use with caution in production environments. | ||
| * | ||
| * @default false | ||
| */ | ||
| interceptAskAiEvent?: (initialMessage: InitialAskAiMessage) => boolean | void; | ||
| agentStudio?: boolean; | ||
| /** | ||
@@ -494,3 +512,3 @@ * Theme overrides applied to the modal and related components. | ||
| }; | ||
| 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; | ||
| 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; | ||
@@ -501,4 +519,14 @@ interface UseDocSearchKeyboardEventsProps { | ||
| onClose: () => void; | ||
| /** | ||
| * Deprecated: Still here for backwards compat. | ||
| * | ||
| * @deprecated | ||
| */ | ||
| onInput?: (event: KeyboardEvent) => void; | ||
| searchButtonRef: React.RefObject<HTMLButtonElement | null>; | ||
| /** | ||
| * Deprecated: Still here for backwards compat. | ||
| * | ||
| * @deprecated | ||
| */ | ||
| searchButtonRef?: React.RefObject<HTMLButtonElement | null>; | ||
| isAskAiActive: boolean; | ||
@@ -508,7 +536,7 @@ onAskAiToggle: (toggle: boolean) => void; | ||
| } | ||
| declare function useDocSearchKeyboardEvents({ isOpen, onOpen, onClose, onInput, isAskAiActive, onAskAiToggle, searchButtonRef, keyboardShortcuts, }: UseDocSearchKeyboardEventsProps): void; | ||
| declare function useDocSearchKeyboardEvents({ isOpen, onOpen, onClose, isAskAiActive, onAskAiToggle, keyboardShortcuts, }: UseDocSearchKeyboardEventsProps): void; | ||
| declare const version = "4.5.0-beta.0"; | ||
| declare const version = "4.5.0-beta.1"; | ||
| 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 }; |
+34
-13
@@ -17,4 +17,19 @@ import { SidepanelShortcuts, InitialAskAiMessage, DocSearchCallbacks, DocSearchTheme, DocSearchRef } from '@docsearch/core'; | ||
| type ConversationScreenTranslations = Partial<{ | ||
| type ToolCallTranslations = { | ||
| /** | ||
| * Text shown while assistant is preparing tool call. | ||
| */ | ||
| preToolCallText: string; | ||
| /** | ||
| * Text shown while assistant is performing search tool call. | ||
| */ | ||
| searchingText: string; | ||
| /** | ||
| * Text shown while assistant is finished performing tool call. | ||
| */ | ||
| toolCallResultText: string; | ||
| }; | ||
| type ConversationScreenTranslations = Partial<ToolCallTranslations & { | ||
| /** | ||
| * Text shown as an LLM disclaimer. | ||
@@ -32,14 +47,2 @@ */ | ||
| /** | ||
| * Text shown while assistant is preparing tool call. | ||
| */ | ||
| preToolCallText: string; | ||
| /** | ||
| * Text shown while assistant is performing search tool call. | ||
| */ | ||
| searchingText: string; | ||
| /** | ||
| * Text shown while assistant is finished performing tool call. | ||
| */ | ||
| toolCallResultText: string; | ||
| /** | ||
| * Text shown describing related sources. | ||
@@ -308,2 +311,11 @@ */ | ||
| 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; | ||
| }; | ||
@@ -351,2 +363,11 @@ declare const DocSearchSidepanel: React.ForwardRefExoticComponent<DocSearchCallbacks & { | ||
| 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>>; | ||
@@ -353,0 +374,0 @@ |
@@ -22,4 +22,14 @@ import React from 'react'; | ||
| onClose: () => void; | ||
| /** | ||
| * Deprecated: Still here for backwards compat. | ||
| * | ||
| * @deprecated | ||
| */ | ||
| onInput?: (event: KeyboardEvent) => void; | ||
| searchButtonRef: React.RefObject<HTMLButtonElement | null>; | ||
| /** | ||
| * Deprecated: Still here for backwards compat. | ||
| * | ||
| * @deprecated | ||
| */ | ||
| searchButtonRef?: React.RefObject<HTMLButtonElement | null>; | ||
| isAskAiActive: boolean; | ||
@@ -29,5 +39,5 @@ onAskAiToggle: (toggle: boolean) => void; | ||
| } | ||
| declare function useDocSearchKeyboardEvents({ isOpen, onOpen, onClose, onInput, isAskAiActive, onAskAiToggle, searchButtonRef, keyboardShortcuts, }: UseDocSearchKeyboardEventsProps): void; | ||
| declare function useDocSearchKeyboardEvents({ isOpen, onOpen, onClose, isAskAiActive, onAskAiToggle, keyboardShortcuts, }: UseDocSearchKeyboardEventsProps): void; | ||
| export { useDocSearchKeyboardEvents }; | ||
| export type { UseDocSearchKeyboardEventsProps }; |
@@ -1,1 +0,1 @@ | ||
| import e from"react";function t(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 r(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 n(e){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?r(Object(o),!0).forEach(function(r){t(e,r,o[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):r(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}var o={"Ctrl/Cmd+K":!0,"/":!0};function i(t){var r,i=t.isOpen,c=t.onOpen,a=t.onClose,u=t.onInput,f=t.isAskAiActive,s=t.onAskAiToggle,l=t.searchButtonRef,p=t.keyboardShortcuts,v=(r=p,n(n({},o),r));e.useEffect(function(){function e(e){var t;if(i&&"Escape"===e.code&&f)s(!1);else{var r=v["Ctrl/Cmd+K"]&&"k"===(null===(t=e.key)||void 0===t?void 0:t.toLowerCase())&&(e.metaKey||e.ctrlKey),n=v["/"]&&"/"===e.key;if("Escape"===e.code&&i||r||!function(e){var t=e.composedPath()[0],r=t.tagName;return t.isContentEditable||"INPUT"===r||"SELECT"===r||"TEXTAREA"===r}(e)&&n&&!i)return e.preventDefault(),void(i?a():document.body.classList.contains("DocSearch--active")||c());l&&l.current===document.activeElement&&u&&/[a-zA-Z0-9]/.test(String.fromCharCode(e.keyCode))&&u(e)}}return window.addEventListener("keydown",e),function(){window.removeEventListener("keydown",e)}},[i,c,a,u,l,f,s,v])}export{i as useDocSearchKeyboardEvents}; | ||
| import e from"react";function t(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 r(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 n(e){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?r(Object(o),!0).forEach(function(r){t(e,r,o[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):r(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}var o={"Ctrl/Cmd+K":!0,"/":!0};function i(t){var r,i=t.isOpen,c=t.onOpen,a=t.onClose,u=t.isAskAiActive,f=t.onAskAiToggle,s=t.keyboardShortcuts,l=(r=s,n(n({},o),r));e.useEffect(function(){function e(e){var t;if(i&&"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),n=l["/"]&&"/"===e.key;("Escape"===e.code&&i||r||!function(e){var t=e.composedPath()[0],r=t.tagName;return t.isContentEditable||"INPUT"===r||"SELECT"===r||"TEXTAREA"===r}(e)&&n&&!i)&&(e.preventDefault(),i?a():document.body.classList.contains("DocSearch--active")||c())}}return window.addEventListener("keydown",e),function(){window.removeEventListener("keydown",e)}},[i,c,a,u,f,l])}export{i as useDocSearchKeyboardEvents}; |
@@ -1,3 +0,3 @@ | ||
| declare const version = "4.5.0-beta.0"; | ||
| declare const version = "4.5.0-beta.1"; | ||
| export { version }; |
@@ -1,1 +0,1 @@ | ||
| var a="4.5.0-beta.0";export{a as version}; | ||
| var a="4.5.0-beta.1";export{a as version}; |
@@ -1,3 +0,3 @@ | ||
| /*! @docsearch/react 4.5.0-beta.0 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */ | ||
| /*! @docsearch/react 4.5.0-beta.1 | 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.0 | 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.onInput,f=e.isAskAiActive,s=e.onAskAiToggle,d=e.searchButtonRef,l=e.keyboardShortcuts,p=(r=l,o(o({},i),r));t.useEffect(function(){function e(e){var t;if(n&&"Escape"===e.code&&f)s(!1);else{var r=p["Ctrl/Cmd+K"]&&"k"===(null===(t=e.key)||void 0===t?void 0:t.toLowerCase())&&(e.metaKey||e.ctrlKey),o=p["/"]&&"/"===e.key;if("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)return e.preventDefault(),void(n?a():document.body.classList.contains("DocSearch--active")||c());d&&d.current===document.activeElement&&u&&/[a-zA-Z0-9]/.test(String.fromCharCode(e.keyCode))&&u(e)}}return window.addEventListener("keydown",e),function(){window.removeEventListener("keydown",e)}},[n,c,a,u,d,f,s,p])}}); | ||
| /*! @docsearch/react 4.5.0-beta.1 | 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.0 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */ | ||
| /*! @docsearch/react 4.5.0-beta.1 | 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.0 | 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.0"}); | ||
| /*! @docsearch/react 4.5.0-beta.1 | 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.1"}); | ||
| //# 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.0", | ||
| "version": "4.5.0-beta.1", | ||
| "license": "MIT", | ||
@@ -55,3 +55,3 @@ "homepage": "https://docsearch.algolia.com", | ||
| "dependencies": { | ||
| "@docsearch/css": "4.5.0-beta.0" | ||
| "@docsearch/css": "4.5.0-beta.1" | ||
| }, | ||
@@ -61,3 +61,3 @@ "devDependencies": { | ||
| "@algolia/autocomplete-core": "1.19.2", | ||
| "@docsearch/core": "4.5.0-beta.0", | ||
| "@docsearch/core": "4.5.0-beta.1", | ||
| "@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
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
7367404
0.28%11180
0.78%218
0.46%+ Added
- Removed
Updated