Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@docsearch/react

Package Overview
Dependencies
Maintainers
3
Versions
51
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 3.3.4 to 3.3.5

636

dist/esm/__tests__/api.test.js

@@ -76,46 +76,42 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }

return regeneratorRuntime.wrap(function _callee2$(_context2) {
while (1) {
switch (_context2.prev = _context2.next) {
case 0:
render( /*#__PURE__*/React.createElement(DocSearch, {
translations: {
modal: {
startScreen: {
noRecentSearchesText: 'Pas de recherche récentes'
}
while (1) switch (_context2.prev = _context2.next) {
case 0:
render( /*#__PURE__*/React.createElement(DocSearch, {
translations: {
modal: {
startScreen: {
noRecentSearchesText: 'Pas de recherche récentes'
}
}
}));
expect(document.querySelector(docSearchSelector)).toBeInTheDocument();
_context2.next = 4;
return act( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
return regeneratorRuntime.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
_context.t0 = fireEvent;
_context.next = 3;
return screen.findByText('Search');
}
}));
expect(document.querySelector(docSearchSelector)).toBeInTheDocument();
_context2.next = 4;
return act( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
return regeneratorRuntime.wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.t0 = fireEvent;
_context.next = 3;
return screen.findByText('Search');
case 3:
_context.t1 = _context.sent;
case 3:
_context.t1 = _context.sent;
_context.t0.click.call(_context.t0, _context.t1);
_context.t0.click.call(_context.t0, _context.t1);
case 5:
case "end":
return _context.stop();
}
}
}, _callee);
})));
case 5:
case "end":
return _context.stop();
}
}, _callee);
})));
case 4:
expect(document.querySelector('.DocSearch-Modal')).toBeInTheDocument();
expect(screen.getByText('Pas de recherche récentes')).toBeInTheDocument();
case 4:
expect(document.querySelector('.DocSearch-Modal')).toBeInTheDocument();
expect(screen.getByText('Pas de recherche récentes')).toBeInTheDocument();
case 6:
case "end":
return _context2.stop();
}
case 6:
case "end":
return _context2.stop();
}

@@ -126,88 +122,82 @@ }, _callee2);

return regeneratorRuntime.wrap(function _callee5$(_context5) {
while (1) {
switch (_context5.prev = _context5.next) {
case 0:
render( /*#__PURE__*/React.createElement(DocSearch, {
transformSearchClient: function transformSearchClient(searchClient) {
return _objectSpread(_objectSpread({}, searchClient), {}, {
search: noResultSearch
});
},
translations: {
modal: {
noResultsScreen: {
noResultsText: 'Pas de résultats pour',
reportMissingResultsText: 'Ouvrez une issue sur docsearch-configs',
reportMissingResultsLinkText: 'Lien du repo'
}
while (1) switch (_context5.prev = _context5.next) {
case 0:
render( /*#__PURE__*/React.createElement(DocSearch, {
transformSearchClient: function transformSearchClient(searchClient) {
return _objectSpread(_objectSpread({}, searchClient), {}, {
search: noResultSearch
});
},
translations: {
modal: {
noResultsScreen: {
noResultsText: 'Pas de résultats pour',
reportMissingResultsText: 'Ouvrez une issue sur docsearch-configs',
reportMissingResultsLinkText: 'Lien du repo'
}
},
getMissingResultsUrl: function getMissingResultsUrl() {
return 'algolia.com';
}
}));
expect(document.querySelector(docSearchSelector)).toBeInTheDocument();
_context5.next = 4;
return act( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
return regeneratorRuntime.wrap(function _callee3$(_context3) {
while (1) {
switch (_context3.prev = _context3.next) {
case 0:
_context3.t0 = fireEvent;
_context3.next = 3;
return screen.findByText('Search');
},
getMissingResultsUrl: function getMissingResultsUrl() {
return 'algolia.com';
}
}));
expect(document.querySelector(docSearchSelector)).toBeInTheDocument();
_context5.next = 4;
return act( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
return regeneratorRuntime.wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
_context3.t0 = fireEvent;
_context3.next = 3;
return screen.findByText('Search');
case 3:
_context3.t1 = _context3.sent;
case 3:
_context3.t1 = _context3.sent;
_context3.t0.click.call(_context3.t0, _context3.t1);
_context3.t0.click.call(_context3.t0, _context3.t1);
case 5:
case "end":
return _context3.stop();
}
}
}, _callee3);
})));
case 5:
case "end":
return _context3.stop();
}
}, _callee3);
})));
case 4:
_context5.next = 6;
return act( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {
return regeneratorRuntime.wrap(function _callee4$(_context4) {
while (1) {
switch (_context4.prev = _context4.next) {
case 0:
_context4.t0 = fireEvent;
_context4.next = 3;
return screen.findByPlaceholderText('Search docs');
case 4:
_context5.next = 6;
return act( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {
return regeneratorRuntime.wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
_context4.t0 = fireEvent;
_context4.next = 3;
return screen.findByPlaceholderText('Search docs');
case 3:
_context4.t1 = _context4.sent;
_context4.t2 = {
target: {
value: 'q'
}
};
case 3:
_context4.t1 = _context4.sent;
_context4.t2 = {
target: {
value: 'q'
}
};
_context4.t0.input.call(_context4.t0, _context4.t1, _context4.t2);
_context4.t0.input.call(_context4.t0, _context4.t1, _context4.t2);
case 6:
case "end":
return _context4.stop();
}
}
}, _callee4);
})));
case 6:
case "end":
return _context4.stop();
}
}, _callee4);
})));
case 6:
expect(screen.getByText(/Pas de résultats pour/)).toBeInTheDocument();
expect(screen.getByText(/Ouvrez une issue sur docsearch-configs/)).toBeInTheDocument();
expect(screen.getByRole('link', {
name: 'Lien du repo'
})).toBeInTheDocument();
case 6:
expect(screen.getByText(/Pas de résultats pour/)).toBeInTheDocument();
expect(screen.getByText(/Ouvrez une issue sur docsearch-configs/)).toBeInTheDocument();
expect(screen.getByRole('link', {
name: 'Lien du repo'
})).toBeInTheDocument();
case 9:
case "end":
return _context5.stop();
}
case 9:
case "end":
return _context5.stop();
}

@@ -218,51 +208,47 @@ }, _callee5);

return regeneratorRuntime.wrap(function _callee7$(_context7) {
while (1) {
switch (_context7.prev = _context7.next) {
case 0:
render( /*#__PURE__*/React.createElement(DocSearch, {
translations: {
modal: {
searchBox: {
resetButtonTitle: 'Effacer',
resetButtonAriaLabel: 'Effacer',
cancelButtonText: 'Annuler',
cancelButtonAriaLabel: 'Annuler'
}
while (1) switch (_context7.prev = _context7.next) {
case 0:
render( /*#__PURE__*/React.createElement(DocSearch, {
translations: {
modal: {
searchBox: {
resetButtonTitle: 'Effacer',
resetButtonAriaLabel: 'Effacer',
cancelButtonText: 'Annuler',
cancelButtonAriaLabel: 'Annuler'
}
}
}));
expect(document.querySelector(docSearchSelector)).toBeInTheDocument();
_context7.next = 4;
return act( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6() {
return regeneratorRuntime.wrap(function _callee6$(_context6) {
while (1) {
switch (_context6.prev = _context6.next) {
case 0:
_context6.t0 = fireEvent;
_context6.next = 3;
return screen.findByText('Search');
}
}));
expect(document.querySelector(docSearchSelector)).toBeInTheDocument();
_context7.next = 4;
return act( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6() {
return regeneratorRuntime.wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
_context6.t0 = fireEvent;
_context6.next = 3;
return screen.findByText('Search');
case 3:
_context6.t1 = _context6.sent;
case 3:
_context6.t1 = _context6.sent;
_context6.t0.click.call(_context6.t0, _context6.t1);
_context6.t0.click.call(_context6.t0, _context6.t1);
case 5:
case "end":
return _context6.stop();
}
}
}, _callee6);
})));
case 5:
case "end":
return _context6.stop();
}
}, _callee6);
})));
case 4:
expect(document.querySelector('.DocSearch-Cancel').innerHTML).toBe('Annuler');
expect(document.querySelector('.DocSearch-Cancel').getAttribute('aria-label')).toBe('Annuler');
expect(document.querySelector('.DocSearch-Reset').getAttribute('title')).toBe('Effacer');
expect(document.querySelector('.DocSearch-Reset').getAttribute('aria-label')).toBe('Effacer');
case 4:
expect(document.querySelector('.DocSearch-Cancel').innerHTML).toBe('Annuler');
expect(document.querySelector('.DocSearch-Cancel').getAttribute('aria-label')).toBe('Annuler');
expect(document.querySelector('.DocSearch-Reset').getAttribute('title')).toBe('Effacer');
expect(document.querySelector('.DocSearch-Reset').getAttribute('aria-label')).toBe('Effacer');
case 8:
case "end":
return _context7.stop();
}
case 8:
case "end":
return _context7.stop();
}

@@ -273,59 +259,55 @@ }, _callee7);

return regeneratorRuntime.wrap(function _callee9$(_context9) {
while (1) {
switch (_context9.prev = _context9.next) {
case 0:
render( /*#__PURE__*/React.createElement(DocSearch, {
translations: {
modal: {
footer: {
closeText: 'Pour fermer',
closeKeyAriaLabel: "Touche d'échappement",
navigateText: 'Pour naviguer',
navigateUpKeyAriaLabel: 'Flèche vers le haut',
navigateDownKeyAriaLabel: 'Flèche le bas',
searchByText: 'Recherche par',
selectText: 'Pour selectionner',
selectKeyAriaLabel: "Touche d'entrée"
}
while (1) switch (_context9.prev = _context9.next) {
case 0:
render( /*#__PURE__*/React.createElement(DocSearch, {
translations: {
modal: {
footer: {
closeText: 'Pour fermer',
closeKeyAriaLabel: "Touche d'échappement",
navigateText: 'Pour naviguer',
navigateUpKeyAriaLabel: 'Flèche vers le haut',
navigateDownKeyAriaLabel: 'Flèche le bas',
searchByText: 'Recherche par',
selectText: 'Pour selectionner',
selectKeyAriaLabel: "Touche d'entrée"
}
}
}));
expect(document.querySelector(docSearchSelector)).toBeInTheDocument();
_context9.next = 4;
return act( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8() {
return regeneratorRuntime.wrap(function _callee8$(_context8) {
while (1) {
switch (_context8.prev = _context8.next) {
case 0:
_context8.t0 = fireEvent;
_context8.next = 3;
return screen.findByText('Search');
}
}));
expect(document.querySelector(docSearchSelector)).toBeInTheDocument();
_context9.next = 4;
return act( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8() {
return regeneratorRuntime.wrap(function _callee8$(_context8) {
while (1) switch (_context8.prev = _context8.next) {
case 0:
_context8.t0 = fireEvent;
_context8.next = 3;
return screen.findByText('Search');
case 3:
_context8.t1 = _context8.sent;
case 3:
_context8.t1 = _context8.sent;
_context8.t0.click.call(_context8.t0, _context8.t1);
_context8.t0.click.call(_context8.t0, _context8.t1);
case 5:
case "end":
return _context8.stop();
}
}
}, _callee8);
})));
case 5:
case "end":
return _context8.stop();
}
}, _callee8);
})));
case 4:
expect(screen.getByText('Recherche par')).toBeInTheDocument();
expect(screen.getByText('Pour fermer')).toBeInTheDocument();
expect(screen.getByText('Pour naviguer')).toBeInTheDocument();
expect(screen.getByText('Pour selectionner')).toBeInTheDocument();
expect(document.querySelector('.DocSearch-Commands-Key > svg[aria-label="Touche d\'échappement"]')).toBeInTheDocument();
expect(document.querySelector('.DocSearch-Commands-Key > svg[aria-label="Flèche vers le haut"]')).toBeInTheDocument();
expect(document.querySelector('.DocSearch-Commands-Key > svg[aria-label="Flèche le bas"]')).toBeInTheDocument();
expect(document.querySelector('.DocSearch-Commands-Key > svg[aria-label="Touche d\'entrée"]')).toBeInTheDocument();
case 4:
expect(screen.getByText('Recherche par')).toBeInTheDocument();
expect(screen.getByText('Pour fermer')).toBeInTheDocument();
expect(screen.getByText('Pour naviguer')).toBeInTheDocument();
expect(screen.getByText('Pour selectionner')).toBeInTheDocument();
expect(document.querySelector('.DocSearch-Commands-Key > svg[aria-label="Touche d\'échappement"]')).toBeInTheDocument();
expect(document.querySelector('.DocSearch-Commands-Key > svg[aria-label="Flèche vers le haut"]')).toBeInTheDocument();
expect(document.querySelector('.DocSearch-Commands-Key > svg[aria-label="Flèche le bas"]')).toBeInTheDocument();
expect(document.querySelector('.DocSearch-Commands-Key > svg[aria-label="Touche d\'entrée"]')).toBeInTheDocument();
case 12:
case "end":
return _context9.stop();
}
case 12:
case "end":
return _context9.stop();
}

@@ -338,73 +320,67 @@ }, _callee9);

return regeneratorRuntime.wrap(function _callee12$(_context12) {
while (1) {
switch (_context12.prev = _context12.next) {
case 0:
render( /*#__PURE__*/React.createElement(DocSearch, {
transformSearchClient: function transformSearchClient(searchClient) {
return _objectSpread(_objectSpread({}, searchClient), {}, {
search: noResultSearch
});
}
}));
expect(document.querySelector(docSearchSelector)).toBeInTheDocument();
_context12.next = 4;
return act( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10() {
return regeneratorRuntime.wrap(function _callee10$(_context10) {
while (1) {
switch (_context10.prev = _context10.next) {
case 0:
_context10.t0 = fireEvent;
_context10.next = 3;
return screen.findByText('Search');
while (1) switch (_context12.prev = _context12.next) {
case 0:
render( /*#__PURE__*/React.createElement(DocSearch, {
transformSearchClient: function transformSearchClient(searchClient) {
return _objectSpread(_objectSpread({}, searchClient), {}, {
search: noResultSearch
});
}
}));
expect(document.querySelector(docSearchSelector)).toBeInTheDocument();
_context12.next = 4;
return act( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10() {
return regeneratorRuntime.wrap(function _callee10$(_context10) {
while (1) switch (_context10.prev = _context10.next) {
case 0:
_context10.t0 = fireEvent;
_context10.next = 3;
return screen.findByText('Search');
case 3:
_context10.t1 = _context10.sent;
case 3:
_context10.t1 = _context10.sent;
_context10.t0.click.call(_context10.t0, _context10.t1);
_context10.t0.click.call(_context10.t0, _context10.t1);
case 5:
case "end":
return _context10.stop();
}
}
}, _callee10);
})));
case 5:
case "end":
return _context10.stop();
}
}, _callee10);
})));
case 4:
_context12.next = 6;
return act( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11() {
return regeneratorRuntime.wrap(function _callee11$(_context11) {
while (1) {
switch (_context11.prev = _context11.next) {
case 0:
_context11.t0 = fireEvent;
_context11.next = 3;
return screen.findByPlaceholderText('Search docs');
case 4:
_context12.next = 6;
return act( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11() {
return regeneratorRuntime.wrap(function _callee11$(_context11) {
while (1) switch (_context11.prev = _context11.next) {
case 0:
_context11.t0 = fireEvent;
_context11.next = 3;
return screen.findByPlaceholderText('Search docs');
case 3:
_context11.t1 = _context11.sent;
_context11.t2 = {
target: {
value: 'q'
}
};
case 3:
_context11.t1 = _context11.sent;
_context11.t2 = {
target: {
value: 'q'
}
};
_context11.t0.input.call(_context11.t0, _context11.t1, _context11.t2);
_context11.t0.input.call(_context11.t0, _context11.t1, _context11.t2);
case 6:
case "end":
return _context11.stop();
}
}
}, _callee11);
})));
case 6:
case "end":
return _context11.stop();
}
}, _callee11);
})));
case 6:
expect(screen.getByText(/No results for/)).toBeInTheDocument();
expect(document.querySelector('.DocSearch-Help a')).not.toBeInTheDocument();
case 6:
expect(screen.getByText(/No results for/)).toBeInTheDocument();
expect(document.querySelector('.DocSearch-Help a')).not.toBeInTheDocument();
case 8:
case "end":
return _context12.stop();
}
case 8:
case "end":
return _context12.stop();
}

@@ -416,78 +392,72 @@ }, _callee12);

return regeneratorRuntime.wrap(function _callee15$(_context15) {
while (1) {
switch (_context15.prev = _context15.next) {
case 0:
render( /*#__PURE__*/React.createElement(DocSearch, {
transformSearchClient: function transformSearchClient(searchClient) {
return _objectSpread(_objectSpread({}, searchClient), {}, {
search: noResultSearch
});
},
getMissingResultsUrl: function getMissingResultsUrl(_ref14) {
var query = _ref14.query;
return "https://github.com/algolia/docsearch/issues/new?title=".concat(query);
}
}));
_context15.next = 3;
return act( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee13() {
return regeneratorRuntime.wrap(function _callee13$(_context13) {
while (1) {
switch (_context13.prev = _context13.next) {
case 0:
_context13.t0 = fireEvent;
_context13.next = 3;
return screen.findByText('Search');
while (1) switch (_context15.prev = _context15.next) {
case 0:
render( /*#__PURE__*/React.createElement(DocSearch, {
transformSearchClient: function transformSearchClient(searchClient) {
return _objectSpread(_objectSpread({}, searchClient), {}, {
search: noResultSearch
});
},
getMissingResultsUrl: function getMissingResultsUrl(_ref14) {
var query = _ref14.query;
return "https://github.com/algolia/docsearch/issues/new?title=".concat(query);
}
}));
_context15.next = 3;
return act( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee13() {
return regeneratorRuntime.wrap(function _callee13$(_context13) {
while (1) switch (_context13.prev = _context13.next) {
case 0:
_context13.t0 = fireEvent;
_context13.next = 3;
return screen.findByText('Search');
case 3:
_context13.t1 = _context13.sent;
case 3:
_context13.t1 = _context13.sent;
_context13.t0.click.call(_context13.t0, _context13.t1);
_context13.t0.click.call(_context13.t0, _context13.t1);
case 5:
case "end":
return _context13.stop();
}
}
}, _callee13);
})));
case 5:
case "end":
return _context13.stop();
}
}, _callee13);
})));
case 3:
_context15.next = 5;
return act( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee14() {
return regeneratorRuntime.wrap(function _callee14$(_context14) {
while (1) {
switch (_context14.prev = _context14.next) {
case 0:
_context14.t0 = fireEvent;
_context14.next = 3;
return screen.findByPlaceholderText('Search docs');
case 3:
_context15.next = 5;
return act( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee14() {
return regeneratorRuntime.wrap(function _callee14$(_context14) {
while (1) switch (_context14.prev = _context14.next) {
case 0:
_context14.t0 = fireEvent;
_context14.next = 3;
return screen.findByPlaceholderText('Search docs');
case 3:
_context14.t1 = _context14.sent;
_context14.t2 = {
target: {
value: 'q'
}
};
case 3:
_context14.t1 = _context14.sent;
_context14.t2 = {
target: {
value: 'q'
}
};
_context14.t0.input.call(_context14.t0, _context14.t1, _context14.t2);
_context14.t0.input.call(_context14.t0, _context14.t1, _context14.t2);
case 6:
case "end":
return _context14.stop();
}
}
}, _callee14);
})));
case 6:
case "end":
return _context14.stop();
}
}, _callee14);
})));
case 5:
expect(screen.getByText(/No results for/)).toBeInTheDocument();
link = document.querySelector('.DocSearch-Help a');
expect(link).toBeInTheDocument();
expect(link.getAttribute('href')).toBe('https://github.com/algolia/docsearch/issues/new?title=q');
case 5:
expect(screen.getByText(/No results for/)).toBeInTheDocument();
link = document.querySelector('.DocSearch-Help a');
expect(link).toBeInTheDocument();
expect(link.getAttribute('href')).toBe('https://github.com/algolia/docsearch/issues/new?title=q');
case 9:
case "end":
return _context15.stop();
}
case 9:
case "end":
return _context15.stop();
}

@@ -494,0 +464,0 @@ }, _callee15);

@@ -9,3 +9,3 @@ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }

@@ -12,0 +12,0 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }

@@ -11,3 +11,3 @@ var _excluded = ["translations"];

function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }

@@ -14,0 +14,0 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }

@@ -17,3 +17,3 @@ var _excluded = ["footer", "searchBox"];

function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }

@@ -20,0 +20,0 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }

@@ -13,3 +13,3 @@ var _excluded = ["translations"];

function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }

@@ -16,0 +16,0 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }

@@ -7,3 +7,3 @@ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }

function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }

@@ -10,0 +10,0 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }

@@ -17,2 +17,4 @@ import React from 'react';

function onKeyDown(event) {
var _event$key;
function open() {

@@ -27,3 +29,6 @@ // We check that no other DocSearch modal is showing before opening

if (event.keyCode === 27 && isOpen || // The `Cmd+K` shortcut both opens and closes the modal.
event.key.toLowerCase() === 'k' && (event.metaKey || event.ctrlKey) || // The `/` shortcut opens but doesn't close the modal because it's
// We need to check for `event.key` because it can be `undefined` with
// Chrome's autofill feature.
// See https://github.com/paperjs/paper.js/issues/1398
((_event$key = event.key) === null || _event$key === void 0 ? void 0 : _event$key.toLowerCase()) === 'k' && (event.metaKey || event.ctrlKey) || // The `/` shortcut opens but doesn't close the modal because it's
// a character.

@@ -30,0 +35,0 @@ !isEditingContent(event) && event.key === '/' && !isOpen) {

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

export declare const version = "3.3.4";
export declare const version = "3.3.5";

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

export var version = '3.3.4';
export var version = '3.3.5';
{
"name": "@docsearch/react",
"description": "React package for DocSearch, the best search experience for docs.",
"version": "3.3.4",
"version": "3.3.5",
"license": "MIT",

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

"@algolia/autocomplete-preset-algolia": "1.8.2",
"@docsearch/css": "3.3.4",
"@docsearch/css": "3.3.5",
"algoliasearch": "^4.0.0"

@@ -41,0 +41,0 @@ },

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc