@vuepress/plugin-docsearch
Advanced tools
Comparing version 2.0.0-alpha.25 to 2.0.0-beta.0
@@ -6,2 +6,10 @@ # Change Log | ||
# [2.0.0-beta.0](https://github.com/vuepress/vuepress-next/compare/v2.0.0-alpha.26...v2.0.0-beta.0) (2021-03-13) | ||
**Note:** Version bump only for package @vuepress/plugin-docsearch | ||
# [2.0.0-alpha.25](https://github.com/vuepress/vuepress-next/compare/v2.0.0-alpha.24...v2.0.0-alpha.25) (2021-02-20) | ||
@@ -8,0 +16,0 @@ |
@@ -1,4 +0,3 @@ | ||
import type { ClientAppEnhance } from '@vuepress/client'; | ||
declare const clientAppEnhance: ClientAppEnhance; | ||
export default clientAppEnhance; | ||
declare const _default: import("@vuepress/client").ClientAppEnhance; | ||
export default _default; | ||
//# sourceMappingURL=clientAppEnhance.d.ts.map |
import { createElement } from 'preact'; | ||
import { computed, h } from 'vue'; | ||
import { useRouter } from 'vue-router'; | ||
import { usePageLang, useRouteLocale, useSiteData } from '@vuepress/client'; | ||
import { defineClientAppEnhance, usePageLang, useRouteLocale, useSiteData, } from '@vuepress/client'; | ||
import { resolveRoutePathFromUrl } from '@vuepress/shared'; | ||
@@ -16,3 +16,3 @@ import { Docsearch } from './components/Docsearch'; | ||
}; | ||
const clientAppEnhance = ({ app }) => { | ||
export default defineClientAppEnhance(({ app }) => { | ||
// wrap the `<Docsearch />` component with plugin options | ||
@@ -71,4 +71,3 @@ // eslint-disable-next-line vue/match-component-file-name | ||
}); | ||
}; | ||
export default clientAppEnhance; | ||
}); | ||
//# sourceMappingURL=clientAppEnhance.js.map |
import type { PropType } from 'vue'; | ||
import type { DocSearchProps } from '@docsearch/react'; | ||
import '@docsearch/css'; | ||
export declare type DocsearchProps = DocSearchProps; | ||
@@ -4,0 +5,0 @@ export declare const Docsearch: import("vue").DefineComponent<{ |
import { defineComponent, getCurrentInstance, h, onMounted, watch } from 'vue'; | ||
const loadDocsearch = async () => { | ||
const [docsearch] = await Promise.all([ | ||
// @ts-ignore: docsearch types issue | ||
import('@docsearch/js'), | ||
// @ts-ignore | ||
import('@docsearch/css'), | ||
]); | ||
return docsearch.default; | ||
}; | ||
// @ts-ignore: docsearch type issue | ||
import docsearch from '@docsearch/js'; | ||
import '@docsearch/css'; | ||
export const Docsearch = defineComponent({ | ||
@@ -22,8 +16,6 @@ name: 'Docsearch', | ||
const initialize = (options) => { | ||
loadDocsearch().then((docsearch) => { | ||
docsearch({ | ||
...options, | ||
// the container selector | ||
container: '#docsearch', | ||
}); | ||
docsearch({ | ||
...options, | ||
// the container selector | ||
container: '#docsearch', | ||
}); | ||
@@ -30,0 +22,0 @@ }; |
{ | ||
"name": "@vuepress/plugin-docsearch", | ||
"version": "2.0.0-alpha.25", | ||
"version": "2.0.0-beta.0", | ||
"description": "VuePress plugin - docsearch", | ||
@@ -33,12 +33,12 @@ "keywords": [ | ||
"dependencies": { | ||
"@docsearch/css": "3.0.0-alpha.31", | ||
"@docsearch/js": "3.0.0-alpha.31", | ||
"@docsearch/css": "3.0.0-alpha.34", | ||
"@docsearch/js": "3.0.0-alpha.34", | ||
"@types/react": "^17.0.0", | ||
"@vuepress/client": "2.0.0-alpha.25", | ||
"@vuepress/core": "2.0.0-alpha.25", | ||
"@vuepress/shared": "2.0.0-alpha.25", | ||
"@vuepress/utils": "2.0.0-alpha.25", | ||
"@vuepress/client": "2.0.0-beta.0", | ||
"@vuepress/core": "2.0.0-beta.0", | ||
"@vuepress/shared": "2.0.0-beta.0", | ||
"@vuepress/utils": "2.0.0-beta.0", | ||
"preact": "^10.0.0", | ||
"vue": "^3.0.5", | ||
"vue-router": "^4.0.3" | ||
"vue": "^3.0.7", | ||
"vue-router": "^4.0.4" | ||
}, | ||
@@ -48,3 +48,3 @@ "publishConfig": { | ||
}, | ||
"gitHead": "f0d1a63a8e7ab594216c3f1b6021bb5fd8a825f4" | ||
"gitHead": "ccba698ba8d93b3ba55a0f76489386e1c4b79fd8" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
18733
160
+ Added@algolia/autocomplete-core@1.0.0-alpha.44(transitive)
+ Added@algolia/autocomplete-preset-algolia@1.0.0-alpha.44(transitive)
+ Added@algolia/autocomplete-shared@1.0.0-alpha.44(transitive)
+ Added@babel/parser@7.26.7(transitive)
+ Added@babel/types@7.26.7(transitive)
+ Added@docsearch/css@3.0.0-alpha.34(transitive)
+ Added@docsearch/js@3.0.0-alpha.34(transitive)
+ Added@docsearch/react@3.0.0-alpha.34(transitive)
+ Added@types/node@22.13.0(transitive)
+ Added@vuepress/client@2.0.0-beta.0(transitive)
+ Added@vuepress/core@2.0.0-beta.0(transitive)
+ Added@vuepress/markdown@2.0.0-beta.0(transitive)
+ Added@vuepress/shared@2.0.0-beta.0(transitive)
+ Added@vuepress/utils@2.0.0-beta.0(transitive)
- Removed@algolia/autocomplete-core@1.18.0(transitive)
- Removed@algolia/autocomplete-plugin-algolia-insights@1.18.0(transitive)
- Removed@algolia/autocomplete-preset-algolia@1.18.0(transitive)
- Removed@algolia/autocomplete-shared@1.18.0(transitive)
- Removed@algolia/client-common@5.20.1(transitive)
- Removed@algolia/client-search@5.20.1(transitive)
- Removed@algolia/requester-browser-xhr@5.20.1(transitive)
- Removed@algolia/requester-fetch@5.20.1(transitive)
- Removed@algolia/requester-node-http@5.20.1(transitive)
- Removed@babel/parser@7.26.8(transitive)
- Removed@babel/types@7.26.8(transitive)
- Removed@docsearch/css@3.0.0-alpha.31(transitive)
- Removed@docsearch/js@3.0.0-alpha.31(transitive)
- Removed@docsearch/react@3.0.0-alpha.31(transitive)
- Removed@types/node@22.13.1(transitive)
- Removed@vuepress/client@2.0.0-alpha.25(transitive)
- Removed@vuepress/core@2.0.0-alpha.25(transitive)
- Removed@vuepress/markdown@2.0.0-alpha.25(transitive)
- Removed@vuepress/shared@2.0.0-alpha.25(transitive)
- Removed@vuepress/utils@2.0.0-alpha.25(transitive)
- Removedsearch-insights@2.17.3(transitive)
Updated@docsearch/js@3.0.0-alpha.34
Updated@vuepress/core@2.0.0-beta.0
Updated@vuepress/utils@2.0.0-beta.0
Updatedvue@^3.0.7
Updatedvue-router@^4.0.4