New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@vuepress/plugin-docsearch

Package Overview
Dependencies
Maintainers
6
Versions
140
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vuepress/plugin-docsearch - npm Package Compare versions

Comparing version 2.0.0-beta.47 to 2.0.0-beta.48

48

lib/client/composables/useDocsearchShim.js

@@ -17,29 +17,27 @@ import { useSiteData } from '@vuepress/client';

return {
// transform full url to route path
transformItems: (items) => items.map((item) => ({
...item,
// the `item.url` is full url with protocol and hostname
// render the hit component with custom `onClick` handler
hitComponent: ({ hit, children }) => {
// the `hit.url` is full url with protocol and hostname
// so we have to transform it to vue-router path
url: resolveRoutePathFromUrl(item.url, site.value.base),
})),
// render the hit component with custom `onClick` handler
hitComponent: ({ hit, children }) => ({
type: 'a',
ref: undefined,
constructor: undefined,
key: undefined,
props: {
href: hit.url,
// handle `onClick` by `router.push`
onClick: (event) => {
if (isSpecialClick(event)) {
return;
}
event.preventDefault();
router.push(hit.url);
const routePath = resolveRoutePathFromUrl(hit.url, site.value.base);
return {
type: 'a',
ref: undefined,
constructor: undefined,
key: undefined,
props: {
href: hit.url,
// handle `onClick` by `router.push`
onClick: (event) => {
if (isSpecialClick(event)) {
return;
}
event.preventDefault();
router.push(routePath);
},
children,
},
children,
},
__v: null,
}),
__v: null,
};
},
// navigation behavior triggered by `onKeyDown` internally

@@ -46,0 +44,0 @@ navigator: {

{
"name": "@vuepress/plugin-docsearch",
"version": "2.0.0-beta.47",
"version": "2.0.0-beta.48",
"description": "VuePress plugin - docsearch",

@@ -32,6 +32,6 @@ "keywords": [

"@docsearch/react": "^3.1.0",
"@vuepress/client": "2.0.0-beta.47",
"@vuepress/core": "2.0.0-beta.47",
"@vuepress/shared": "2.0.0-beta.47",
"@vuepress/utils": "2.0.0-beta.47",
"@vuepress/client": "2.0.0-beta.48",
"@vuepress/core": "2.0.0-beta.48",
"@vuepress/shared": "2.0.0-beta.48",
"@vuepress/utils": "2.0.0-beta.48",
"ts-debounce": "^4.0.0",

@@ -38,0 +38,0 @@ "vue": "^3.2.36",

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