valaxy 0.15.11-alpha.0 → 0.15.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/bin/valaxy.cjs +0 -0
- package/bin/valaxy.mjs +0 -0
- package/client/composables/dark.ts +0 -2
- package/client/styles/common/transition.scss +22 -0
- package/package.json +8 -8
- package/client/.vite-ssg-temp/tbbjcbuyn2/CNAME +0 -1
- package/client/.vite-ssg-temp/tbbjcbuyn2/assets/PressAlgoliaSearch-2943719f.js +0 -227
- package/client/.vite-ssg-temp/tbbjcbuyn2/assets/ValaxyMain-26e77dc6.js +0 -752
- package/client/.vite-ssg-temp/tbbjcbuyn2/assets/_...all_-080f97f3.js +0 -31
- package/client/.vite-ssg-temp/tbbjcbuyn2/assets/_...all_-5084a1b0.js +0 -42
- package/client/.vite-ssg-temp/tbbjcbuyn2/assets/addon-f5fa83e1.js +0 -172
- package/client/.vite-ssg-temp/tbbjcbuyn2/assets/best-pratice-0231a551.js +0 -1105
- package/client/.vite-ssg-temp/tbbjcbuyn2/assets/client-496183a0.js +0 -286
- package/client/.vite-ssg-temp/tbbjcbuyn2/assets/community-1b33ec3b.js +0 -627
- package/client/.vite-ssg-temp/tbbjcbuyn2/assets/components-7000ddd3.js +0 -2460
- package/client/.vite-ssg-temp/tbbjcbuyn2/assets/deploy-59948619.js +0 -1071
- package/client/.vite-ssg-temp/tbbjcbuyn2/assets/docs-26abd7f8.js +0 -490
- package/client/.vite-ssg-temp/tbbjcbuyn2/assets/extend-975f8f72.js +0 -1851
- package/client/.vite-ssg-temp/tbbjcbuyn2/assets/extend-acd7107b.js +0 -1444
- package/client/.vite-ssg-temp/tbbjcbuyn2/assets/faq-62ed7bfd.js +0 -321
- package/client/.vite-ssg-temp/tbbjcbuyn2/assets/features-8acbd53d.js +0 -2625
- package/client/.vite-ssg-temp/tbbjcbuyn2/assets/gallery-832227a9.js +0 -244
- package/client/.vite-ssg-temp/tbbjcbuyn2/assets/gallery-9077df38.js +0 -370
- package/client/.vite-ssg-temp/tbbjcbuyn2/assets/getting-started-52c30f03.js +0 -3684
- package/client/.vite-ssg-temp/tbbjcbuyn2/assets/hexo-7311896e.js +0 -969
- package/client/.vite-ssg-temp/tbbjcbuyn2/assets/hooks-67450cb3.js +0 -517
- package/client/.vite-ssg-temp/tbbjcbuyn2/assets/i18n-4cd1bb86.js +0 -4159
- package/client/.vite-ssg-temp/tbbjcbuyn2/assets/i18n-e1165bc4.js +0 -676
- package/client/.vite-ssg-temp/tbbjcbuyn2/assets/index-002f83fb.js +0 -768
- package/client/.vite-ssg-temp/tbbjcbuyn2/assets/index-3dec2b83.js +0 -527
- package/client/.vite-ssg-temp/tbbjcbuyn2/assets/index-43565e48.js +0 -424
- package/client/.vite-ssg-temp/tbbjcbuyn2/assets/index-5f07432e.js +0 -563
- package/client/.vite-ssg-temp/tbbjcbuyn2/assets/index-6024f010.js +0 -3294
- package/client/.vite-ssg-temp/tbbjcbuyn2/assets/index-6f0d6ec7.js +0 -202
- package/client/.vite-ssg-temp/tbbjcbuyn2/assets/index-78c510e0.js +0 -549
- package/client/.vite-ssg-temp/tbbjcbuyn2/assets/index-839c338e.js +0 -4161
- package/client/.vite-ssg-temp/tbbjcbuyn2/assets/index-d39a48fd.js +0 -1170
- package/client/.vite-ssg-temp/tbbjcbuyn2/assets/index-e633613c.js +0 -1564
- package/client/.vite-ssg-temp/tbbjcbuyn2/assets/katex-32f21e80.js +0 -6119
- package/client/.vite-ssg-temp/tbbjcbuyn2/assets/logo-bd69f816.js +0 -180
- package/client/.vite-ssg-temp/tbbjcbuyn2/assets/markdown-050f3269.js +0 -5895
- package/client/.vite-ssg-temp/tbbjcbuyn2/assets/news-ecba2d88.js +0 -278
- package/client/.vite-ssg-temp/tbbjcbuyn2/assets/page-d48f3caa.js +0 -752
- package/client/.vite-ssg-temp/tbbjcbuyn2/assets/post-ac89eaf5.js +0 -1605
- package/client/.vite-ssg-temp/tbbjcbuyn2/assets/route-block-c0a8bdd8.js +0 -4
- package/client/.vite-ssg-temp/tbbjcbuyn2/assets/schema-org-f60b7dac.js +0 -477
- package/client/.vite-ssg-temp/tbbjcbuyn2/assets/site-6caa6511.js +0 -286
- package/client/.vite-ssg-temp/tbbjcbuyn2/assets/style-f415f7fa.css +0 -3742
- package/client/.vite-ssg-temp/tbbjcbuyn2/assets/styles-cdaadad2.js +0 -548
- package/client/.vite-ssg-temp/tbbjcbuyn2/assets/templates-c97584f2.js +0 -574
- package/client/.vite-ssg-temp/tbbjcbuyn2/assets/theme-192f77ef.js +0 -172
- package/client/.vite-ssg-temp/tbbjcbuyn2/assets/use-3c036a47.js +0 -669
- package/client/.vite-ssg-temp/tbbjcbuyn2/assets/use-851c0307.js +0 -619
- package/client/.vite-ssg-temp/tbbjcbuyn2/assets/vite-vue-f91b9792.js +0 -830
- package/client/.vite-ssg-temp/tbbjcbuyn2/assets/vscode-bc411e64.js +0 -350
- package/client/.vite-ssg-temp/tbbjcbuyn2/assets/why-c98bbe8e.js +0 -1131
- package/client/.vite-ssg-temp/tbbjcbuyn2/assets/write-6a43d4d0.js +0 -4963
- package/client/.vite-ssg-temp/tbbjcbuyn2/assets/write-6bc2b77c.js +0 -675
- package/client/.vite-ssg-temp/tbbjcbuyn2/favicon.svg +0 -33
- package/client/.vite-ssg-temp/tbbjcbuyn2/main.mjs +0 -6239
- package/client/.vite-ssg-temp/tbbjcbuyn2/valaxy-logo.png +0 -0
- package/client/.vite-ssg-temp/vp12eb5cgm/CNAME +0 -1
- package/client/.vite-ssg-temp/vp12eb5cgm/assets/PressAlgoliaSearch-2943719f.js +0 -227
- package/client/.vite-ssg-temp/vp12eb5cgm/assets/ValaxyMain-26e77dc6.js +0 -752
- package/client/.vite-ssg-temp/vp12eb5cgm/assets/_...all_-080f97f3.js +0 -31
- package/client/.vite-ssg-temp/vp12eb5cgm/assets/_...all_-5084a1b0.js +0 -42
- package/client/.vite-ssg-temp/vp12eb5cgm/assets/addon-f5fa83e1.js +0 -172
- package/client/.vite-ssg-temp/vp12eb5cgm/assets/best-pratice-0231a551.js +0 -1105
- package/client/.vite-ssg-temp/vp12eb5cgm/assets/client-496183a0.js +0 -286
- package/client/.vite-ssg-temp/vp12eb5cgm/assets/community-1b33ec3b.js +0 -627
- package/client/.vite-ssg-temp/vp12eb5cgm/assets/components-7000ddd3.js +0 -2460
- package/client/.vite-ssg-temp/vp12eb5cgm/assets/deploy-59948619.js +0 -1071
- package/client/.vite-ssg-temp/vp12eb5cgm/assets/docs-26abd7f8.js +0 -490
- package/client/.vite-ssg-temp/vp12eb5cgm/assets/extend-975f8f72.js +0 -1851
- package/client/.vite-ssg-temp/vp12eb5cgm/assets/extend-acd7107b.js +0 -1444
- package/client/.vite-ssg-temp/vp12eb5cgm/assets/faq-62ed7bfd.js +0 -321
- package/client/.vite-ssg-temp/vp12eb5cgm/assets/features-8acbd53d.js +0 -2625
- package/client/.vite-ssg-temp/vp12eb5cgm/assets/gallery-832227a9.js +0 -244
- package/client/.vite-ssg-temp/vp12eb5cgm/assets/gallery-9077df38.js +0 -370
- package/client/.vite-ssg-temp/vp12eb5cgm/assets/getting-started-bb7fc0a8.js +0 -3684
- package/client/.vite-ssg-temp/vp12eb5cgm/assets/hexo-7311896e.js +0 -969
- package/client/.vite-ssg-temp/vp12eb5cgm/assets/hooks-67450cb3.js +0 -517
- package/client/.vite-ssg-temp/vp12eb5cgm/assets/i18n-4cd1bb86.js +0 -4159
- package/client/.vite-ssg-temp/vp12eb5cgm/assets/i18n-e1165bc4.js +0 -676
- package/client/.vite-ssg-temp/vp12eb5cgm/assets/index-002f83fb.js +0 -768
- package/client/.vite-ssg-temp/vp12eb5cgm/assets/index-3dec2b83.js +0 -527
- package/client/.vite-ssg-temp/vp12eb5cgm/assets/index-43565e48.js +0 -424
- package/client/.vite-ssg-temp/vp12eb5cgm/assets/index-5f07432e.js +0 -563
- package/client/.vite-ssg-temp/vp12eb5cgm/assets/index-6024f010.js +0 -3294
- package/client/.vite-ssg-temp/vp12eb5cgm/assets/index-6f0d6ec7.js +0 -202
- package/client/.vite-ssg-temp/vp12eb5cgm/assets/index-78c510e0.js +0 -549
- package/client/.vite-ssg-temp/vp12eb5cgm/assets/index-839c338e.js +0 -4161
- package/client/.vite-ssg-temp/vp12eb5cgm/assets/index-d39a48fd.js +0 -1170
- package/client/.vite-ssg-temp/vp12eb5cgm/assets/index-e633613c.js +0 -1564
- package/client/.vite-ssg-temp/vp12eb5cgm/assets/katex-32f21e80.js +0 -6119
- package/client/.vite-ssg-temp/vp12eb5cgm/assets/logo-bd69f816.js +0 -180
- package/client/.vite-ssg-temp/vp12eb5cgm/assets/markdown-abdb17ca.js +0 -5895
- package/client/.vite-ssg-temp/vp12eb5cgm/assets/news-ecba2d88.js +0 -278
- package/client/.vite-ssg-temp/vp12eb5cgm/assets/page-d48f3caa.js +0 -752
- package/client/.vite-ssg-temp/vp12eb5cgm/assets/post-0ed0dfec.js +0 -1605
- package/client/.vite-ssg-temp/vp12eb5cgm/assets/route-block-c0a8bdd8.js +0 -4
- package/client/.vite-ssg-temp/vp12eb5cgm/assets/schema-org-f60b7dac.js +0 -477
- package/client/.vite-ssg-temp/vp12eb5cgm/assets/site-6caa6511.js +0 -286
- package/client/.vite-ssg-temp/vp12eb5cgm/assets/style-f415f7fa.css +0 -3742
- package/client/.vite-ssg-temp/vp12eb5cgm/assets/styles-cdaadad2.js +0 -548
- package/client/.vite-ssg-temp/vp12eb5cgm/assets/templates-c97584f2.js +0 -574
- package/client/.vite-ssg-temp/vp12eb5cgm/assets/theme-192f77ef.js +0 -172
- package/client/.vite-ssg-temp/vp12eb5cgm/assets/use-3c036a47.js +0 -669
- package/client/.vite-ssg-temp/vp12eb5cgm/assets/use-851c0307.js +0 -619
- package/client/.vite-ssg-temp/vp12eb5cgm/assets/vite-vue-f91b9792.js +0 -830
- package/client/.vite-ssg-temp/vp12eb5cgm/assets/vscode-bc411e64.js +0 -350
- package/client/.vite-ssg-temp/vp12eb5cgm/assets/why-c98bbe8e.js +0 -1131
- package/client/.vite-ssg-temp/vp12eb5cgm/assets/write-6a43d4d0.js +0 -4963
- package/client/.vite-ssg-temp/vp12eb5cgm/assets/write-6bc2b77c.js +0 -675
- package/client/.vite-ssg-temp/vp12eb5cgm/favicon.svg +0 -33
- package/client/.vite-ssg-temp/vp12eb5cgm/main.mjs +0 -6239
- package/client/.vite-ssg-temp/vp12eb5cgm/valaxy-logo.png +0 -0
- package/client/styles/common/view-transition.css +0 -21
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022 云游君 YunYouJun <me@yunyoujun.cn>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/bin/valaxy.cjs
CHANGED
|
File without changes
|
package/bin/valaxy.mjs
CHANGED
|
File without changes
|
|
@@ -22,3 +22,25 @@
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
+
// dark toggle
|
|
26
|
+
// transition
|
|
27
|
+
::view-transition-old(root),
|
|
28
|
+
::view-transition-new(root) {
|
|
29
|
+
animation: none;
|
|
30
|
+
mix-blend-mode: normal;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/* 进入dark模式和退出dark模式时,两个图像的位置顺序正好相反 */
|
|
34
|
+
.dark::view-transition-old(root) {
|
|
35
|
+
z-index: 9999;
|
|
36
|
+
}
|
|
37
|
+
.dark::view-transition-new(root) {
|
|
38
|
+
z-index: 1;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
::view-transition-old(root) {
|
|
42
|
+
z-index: 1;
|
|
43
|
+
}
|
|
44
|
+
::view-transition-new(root) {
|
|
45
|
+
z-index: 9999;
|
|
46
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "valaxy",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.15.11
|
|
4
|
+
"version": "0.15.11",
|
|
5
5
|
"description": "📄 Vite & Vue powered static blog generator.",
|
|
6
6
|
"author": {
|
|
7
7
|
"email": "me@yunyoujun.cn",
|
|
@@ -52,12 +52,6 @@
|
|
|
52
52
|
"engines": {
|
|
53
53
|
"node": "^14.18.0 || >=16.0.0"
|
|
54
54
|
},
|
|
55
|
-
"scripts": {
|
|
56
|
-
"build": "rimraf dist && tsup --splitting",
|
|
57
|
-
"dev": "tsup --splitting --watch",
|
|
58
|
-
"preview": "vite preview",
|
|
59
|
-
"preview-https": "serve dist"
|
|
60
|
-
},
|
|
61
55
|
"dependencies": {
|
|
62
56
|
"@antfu/utils": "^0.7.6",
|
|
63
57
|
"@ctrl/tinycolor": "^4.0.2",
|
|
@@ -145,5 +139,11 @@
|
|
|
145
139
|
"https-localhost": "^4.7.1",
|
|
146
140
|
"markdown-it-image-figures": "^2.1.1",
|
|
147
141
|
"shiki-processor": "^0.1.3"
|
|
142
|
+
},
|
|
143
|
+
"scripts": {
|
|
144
|
+
"build": "rimraf dist && tsup --splitting",
|
|
145
|
+
"dev": "tsup --splitting --watch",
|
|
146
|
+
"preview": "vite preview",
|
|
147
|
+
"preview-https": "serve dist"
|
|
148
148
|
}
|
|
149
|
-
}
|
|
149
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
valaxy.site
|
|
@@ -1,227 +0,0 @@
|
|
|
1
|
-
import { computed, ref, onMounted, onUnmounted, defineComponent, mergeProps, useSSRContext, unref } from "vue";
|
|
2
|
-
import { ssrRenderAttrs, ssrRenderComponent, ssrInterpolate } from "vue/server-renderer";
|
|
3
|
-
import docsearch from "@docsearch/js";
|
|
4
|
-
import { useRouter, useRoute } from "vue-router";
|
|
5
|
-
import { d as useSiteConfig, n as useRuntimeConfig, u as useI18n } from "../main.mjs";
|
|
6
|
-
import "dayjs";
|
|
7
|
-
import "dayjs/locale/zh-cn.js";
|
|
8
|
-
import "body-scroll-lock";
|
|
9
|
-
import "vite-ssg";
|
|
10
|
-
import "pinia";
|
|
11
|
-
import "@vueuse/core";
|
|
12
|
-
import "dayjs/plugin/utc.js";
|
|
13
|
-
import "dayjs/plugin/timezone.js";
|
|
14
|
-
import "@intlify/shared";
|
|
15
|
-
import "@intlify/core-base";
|
|
16
|
-
import "@vue/devtools-api";
|
|
17
|
-
import "@unhead/schema-org";
|
|
18
|
-
import "@unhead/vue";
|
|
19
|
-
import "dayjs/plugin/relativeTime.js";
|
|
20
|
-
import "defu";
|
|
21
|
-
import "nprogress";
|
|
22
|
-
const style = "";
|
|
23
|
-
function useAddonAlgolia() {
|
|
24
|
-
const siteConfig = useSiteConfig();
|
|
25
|
-
const isAlgolia = computed(() => siteConfig.value.search.type === "algolia");
|
|
26
|
-
const metaKey = ref("'Meta'");
|
|
27
|
-
const loaded = ref(false);
|
|
28
|
-
function dispatchEvent() {
|
|
29
|
-
const e = new Event("keydown");
|
|
30
|
-
e.key = "k";
|
|
31
|
-
e.metaKey = true;
|
|
32
|
-
window.dispatchEvent(e);
|
|
33
|
-
}
|
|
34
|
-
function poll() {
|
|
35
|
-
dispatchEvent();
|
|
36
|
-
setTimeout(() => {
|
|
37
|
-
if (!document.querySelector(".DocSearch-Modal"))
|
|
38
|
-
poll();
|
|
39
|
-
}, 16);
|
|
40
|
-
}
|
|
41
|
-
function load() {
|
|
42
|
-
if (!loaded.value) {
|
|
43
|
-
loaded.value = true;
|
|
44
|
-
setTimeout(poll, 16);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
onMounted(() => {
|
|
48
|
-
if (!isAlgolia.value)
|
|
49
|
-
return;
|
|
50
|
-
metaKey.value = /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform) ? "'⌘'" : "'Ctrl'";
|
|
51
|
-
const handleSearchHotKey = (e) => {
|
|
52
|
-
if (e.key === "k" && (e.ctrlKey || e.metaKey)) {
|
|
53
|
-
e.preventDefault();
|
|
54
|
-
load();
|
|
55
|
-
remove();
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
const remove = () => {
|
|
59
|
-
window.removeEventListener("keydown", handleSearchHotKey);
|
|
60
|
-
};
|
|
61
|
-
window.addEventListener("keydown", handleSearchHotKey);
|
|
62
|
-
onUnmounted(remove);
|
|
63
|
-
});
|
|
64
|
-
return {
|
|
65
|
-
isAlgolia,
|
|
66
|
-
loaded,
|
|
67
|
-
metaKey,
|
|
68
|
-
load,
|
|
69
|
-
dispatchEvent
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
const name = "valaxy-addon-algolia";
|
|
73
|
-
const version = "0.0.3";
|
|
74
|
-
const description = "Algolia Search Box for Valaxy";
|
|
75
|
-
const repository = "https://github.com/YunYouJun/valaxy/tree/main/packages/valaxy-addon-algolia";
|
|
76
|
-
const keywords = [
|
|
77
|
-
"valaxy",
|
|
78
|
-
"addon",
|
|
79
|
-
"algolia"
|
|
80
|
-
];
|
|
81
|
-
const main = "index.ts";
|
|
82
|
-
const types = "index.d.ts";
|
|
83
|
-
const peerDependencies = {
|
|
84
|
-
valaxy: "latest"
|
|
85
|
-
};
|
|
86
|
-
const dependencies = {
|
|
87
|
-
"@docsearch/css": "^3.5.2",
|
|
88
|
-
"@docsearch/js": "^3.5.2"
|
|
89
|
-
};
|
|
90
|
-
const pkg = {
|
|
91
|
-
name,
|
|
92
|
-
version,
|
|
93
|
-
description,
|
|
94
|
-
repository,
|
|
95
|
-
keywords,
|
|
96
|
-
main,
|
|
97
|
-
types,
|
|
98
|
-
peerDependencies,
|
|
99
|
-
dependencies
|
|
100
|
-
};
|
|
101
|
-
function useAddonAlgoliaConfig() {
|
|
102
|
-
const runtimeConfig = useRuntimeConfig();
|
|
103
|
-
return computed(() => runtimeConfig.value.addons[pkg.name]);
|
|
104
|
-
}
|
|
105
|
-
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
106
|
-
__name: "AlgoliaSearchBox",
|
|
107
|
-
__ssrInlineRender: true,
|
|
108
|
-
setup(__props) {
|
|
109
|
-
const router = useRouter();
|
|
110
|
-
const route = useRoute();
|
|
111
|
-
const algolia = useAddonAlgoliaConfig();
|
|
112
|
-
const { locale } = useI18n();
|
|
113
|
-
onMounted(() => {
|
|
114
|
-
var _a, _b;
|
|
115
|
-
const options = {
|
|
116
|
-
...algolia.value.options,
|
|
117
|
-
...(_b = (_a = algolia.value.options) == null ? void 0 : _a.locales) == null ? void 0 : _b[locale.value]
|
|
118
|
-
};
|
|
119
|
-
if (options && options.apiKey && options.appId && options.indexName) {
|
|
120
|
-
if (!document.querySelector(".DocSearch-Container")) {
|
|
121
|
-
initialize({
|
|
122
|
-
...options,
|
|
123
|
-
searchParameters: {
|
|
124
|
-
...options.searchParameters
|
|
125
|
-
// facetFilters,
|
|
126
|
-
}
|
|
127
|
-
});
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
});
|
|
131
|
-
function initialize(userOptions) {
|
|
132
|
-
const options = Object.assign({}, userOptions, {
|
|
133
|
-
container: "#docsearch",
|
|
134
|
-
navigator: {
|
|
135
|
-
navigate({ itemUrl }) {
|
|
136
|
-
const { pathname: hitPathname } = new URL(
|
|
137
|
-
window.location.origin + itemUrl
|
|
138
|
-
);
|
|
139
|
-
if (route.path === hitPathname)
|
|
140
|
-
window.location.assign(window.location.origin + itemUrl);
|
|
141
|
-
else
|
|
142
|
-
router.push(itemUrl);
|
|
143
|
-
}
|
|
144
|
-
},
|
|
145
|
-
transformItems(items) {
|
|
146
|
-
return items.map((item) => {
|
|
147
|
-
return Object.assign({}, item, {
|
|
148
|
-
url: getRelativePath(item.url)
|
|
149
|
-
});
|
|
150
|
-
});
|
|
151
|
-
},
|
|
152
|
-
hitComponent({ hit, children }) {
|
|
153
|
-
const relativeHit = hit.url.startsWith("http") ? getRelativePath(hit.url) : hit.url;
|
|
154
|
-
return {
|
|
155
|
-
__v: null,
|
|
156
|
-
type: "a",
|
|
157
|
-
ref: void 0,
|
|
158
|
-
constructor: void 0,
|
|
159
|
-
key: void 0,
|
|
160
|
-
props: {
|
|
161
|
-
href: hit.url,
|
|
162
|
-
onClick(event) {
|
|
163
|
-
if (isSpecialClick(event))
|
|
164
|
-
return;
|
|
165
|
-
if (route.path === relativeHit)
|
|
166
|
-
return;
|
|
167
|
-
if (route.path !== relativeHit)
|
|
168
|
-
event.preventDefault();
|
|
169
|
-
router.push(relativeHit);
|
|
170
|
-
},
|
|
171
|
-
children
|
|
172
|
-
}
|
|
173
|
-
};
|
|
174
|
-
}
|
|
175
|
-
});
|
|
176
|
-
docsearch(options);
|
|
177
|
-
}
|
|
178
|
-
function isSpecialClick(event) {
|
|
179
|
-
return event.button === 1 || event.altKey || event.ctrlKey || event.metaKey || event.shiftKey;
|
|
180
|
-
}
|
|
181
|
-
function getRelativePath(absoluteUrl) {
|
|
182
|
-
const { pathname, hash } = new URL(absoluteUrl);
|
|
183
|
-
return pathname + hash;
|
|
184
|
-
}
|
|
185
|
-
return (_ctx, _push, _parent, _attrs) => {
|
|
186
|
-
_push(`<div${ssrRenderAttrs(mergeProps({ id: "docsearch" }, _attrs))}></div>`);
|
|
187
|
-
};
|
|
188
|
-
}
|
|
189
|
-
});
|
|
190
|
-
const AlgoliaSearchBox_vue_vue_type_style_index_0_lang = "";
|
|
191
|
-
const _sfc_setup$1 = _sfc_main$1.setup;
|
|
192
|
-
_sfc_main$1.setup = (props, ctx) => {
|
|
193
|
-
const ssrContext = useSSRContext();
|
|
194
|
-
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("../../valaxy-addon-algolia/components/AlgoliaSearchBox.vue");
|
|
195
|
-
return _sfc_setup$1 ? _sfc_setup$1(props, ctx) : void 0;
|
|
196
|
-
};
|
|
197
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
198
|
-
__name: "PressAlgoliaSearch",
|
|
199
|
-
__ssrInlineRender: true,
|
|
200
|
-
setup(__props) {
|
|
201
|
-
const { t } = useI18n();
|
|
202
|
-
const { loaded, load, metaKey } = useAddonAlgolia();
|
|
203
|
-
return (_ctx, _push, _parent, _attrs) => {
|
|
204
|
-
const _component_AlgoliaSearchBox = _sfc_main$1;
|
|
205
|
-
const _cssVars = { style: {
|
|
206
|
-
"--c50f4d7e": unref(metaKey)
|
|
207
|
-
} };
|
|
208
|
-
_push(`<div${ssrRenderAttrs(mergeProps(_attrs, _cssVars))}>`);
|
|
209
|
-
if (unref(loaded)) {
|
|
210
|
-
_push(ssrRenderComponent(_component_AlgoliaSearchBox, null, null, _parent));
|
|
211
|
-
} else {
|
|
212
|
-
_push(`<div id="docsearch"><button class="DocSearch DocSearch-Button" aria-label="Search"><span class="DocSearch-Button-Container"><svg class="DocSearch-Search-Icon" width="20" height="20" viewBox="0 0 20 20"><path d="M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z" stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"></path></svg><span class="DocSearch-Button-Placeholder">${ssrInterpolate(unref(t)("search.placeholder"))}</span></span><span class="DocSearch-Button-Keys"><kbd class="DocSearch-Button-Key"></kbd><kbd class="DocSearch-Button-Key">K</kbd></span></button></div>`);
|
|
213
|
-
}
|
|
214
|
-
_push(`</div>`);
|
|
215
|
-
};
|
|
216
|
-
}
|
|
217
|
-
});
|
|
218
|
-
const PressAlgoliaSearch_vue_vue_type_style_index_0_lang = "";
|
|
219
|
-
const _sfc_setup = _sfc_main.setup;
|
|
220
|
-
_sfc_main.setup = (props, ctx) => {
|
|
221
|
-
const ssrContext = useSSRContext();
|
|
222
|
-
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("../../valaxy-theme-press/components/PressAlgoliaSearch.vue");
|
|
223
|
-
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
|
224
|
-
};
|
|
225
|
-
export {
|
|
226
|
-
_sfc_main as default
|
|
227
|
-
};
|