Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

@docsearch/react

Package Overview
Dependencies
Maintainers
3
Versions
82
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@docsearch/react - npm Package Compare versions

Comparing version
4.5.0-beta.1
to
4.5.0-beta.2
+1
-1
dist/esm/index.d.ts

@@ -533,5 +533,5 @@ import { BaseItem, AutocompleteState, AutocompleteContext, AutocompleteInsightsApi, AutocompleteOptions } from '@algolia/autocomplete-core';

declare const version = "4.5.0-beta.1";
declare const version = "4.5.0-beta.2";
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 };

@@ -1,3 +0,3 @@

declare const version = "4.5.0-beta.1";
declare const version = "4.5.0-beta.2";
export { version };

@@ -1,1 +0,1 @@

var a="4.5.0-beta.1";export{a as version};
var a="4.5.0-beta.2";export{a as version};

@@ -1,3 +0,3 @@

/*! @docsearch/react 4.5.0-beta.1 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */
/*! @docsearch/react 4.5.0-beta.2 | 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.1 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */
/*! @docsearch/react 4.5.0-beta.2 | 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.1 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */
/*! @docsearch/react 4.5.0-beta.2 | 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.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"});
/*! @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"});
//# sourceMappingURL=version.js.map
{
"name": "@docsearch/react",
"description": "React package for DocSearch, the best search experience for docs.",
"version": "4.5.0-beta.1",
"version": "4.5.0-beta.2",
"license": "MIT",

@@ -55,3 +55,3 @@ "homepage": "https://docsearch.algolia.com",

"dependencies": {
"@docsearch/css": "4.5.0-beta.1"
"@docsearch/css": "4.5.0-beta.2"
},

@@ -61,3 +61,3 @@ "devDependencies": {

"@algolia/autocomplete-core": "1.19.2",
"@docsearch/core": "4.5.0-beta.1",
"@docsearch/core": "4.5.0-beta.2",
"@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