diff --git a/.vitepress/theme/components/DocsLocalSearchBox.vue b/.vitepress/theme/components/DocsLocalSearchBox.vue index faf9ac7d..bf246113 100644 --- a/.vitepress/theme/components/DocsLocalSearchBox.vue +++ b/.vitepress/theme/components/DocsLocalSearchBox.vue @@ -5,6 +5,7 @@ import { computedAsync, debouncedWatch, onKeyStroke, + reactify, useEventListener, useScrollLock, useSessionStorage @@ -12,7 +13,7 @@ import { import { useFocusTrap } from '@vueuse/integrations/useFocusTrap' import Mark from 'mark.js/src/vanilla.js' import MiniSearch, { type SearchResult } from 'minisearch' -import { inBrowser, useRouter } from 'vitepress' +import { dataSymbol, inBrowser, useRouter } from 'vitepress' import { computed, markRaw, @@ -21,6 +22,7 @@ import { onMounted, ref, shallowRef, + toRef, watch, type Ref } from 'vue' @@ -223,7 +225,9 @@ onKeyStroke('Escape', () => { }) // Translations -const $t = createTranslate(theme.value.search?.options) +const $t = reactify(createTranslate)( + toRef(() => theme.value.search?.options) +) // Back diff --git a/package.json b/package.json index 86b04bf5..367f1e66 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "modx-tmlanguage": "^1.2.0", "plop": "^3.1.2", "transliteration": "^2.3.5", - "vitepress": "^1.0.0-rc.22", + "vitepress": "^1.0.0-rc.24", "vue": "^3.3.4" }, "pnpm": { diff --git a/yarn.lock b/yarn.lock index 593ac6bb..b6dcd3cf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -353,10 +353,10 @@ "@types/linkify-it" "*" "@types/mdurl" "*" -"@types/markdown-it@^13.0.2": - version "13.0.4" - resolved "https://registry.yarnpkg.com/@types/markdown-it/-/markdown-it-13.0.4.tgz#33ede9fe0f23f62f39f83d7530ba69762b0bfd35" - integrity sha512-FAIUdEXrCDnQmAAmJC+UeW/3p0eCI4QZ/+W0lX/h83VD3v78IgTFYftjnAeXS8H0g4PFQCgipc51cQDA8tjgLw== +"@types/markdown-it@^13.0.4": + version "13.0.5" + resolved "https://registry.yarnpkg.com/@types/markdown-it/-/markdown-it-13.0.5.tgz#b5bba2af9ee8473409fe1571ec036417cb1e98fa" + integrity sha512-QhJP7hkq3FCrFNx0szMNCT/79CXfcEgUIA3jc5GBfeXqoKsk3R8JZm2wRXJ2DiyjbPE4VMFOSDemLFcUTZmHEQ== dependencies: "@types/linkify-it" "*" "@types/mdurl" "*" @@ -390,6 +390,11 @@ resolved "https://registry.yarnpkg.com/@types/web-bluetooth/-/web-bluetooth-0.0.18.tgz#74bd1c8fd3a2058cb6fc76b188fcded50a83d866" integrity sha512-v/ZHEj9xh82usl8LMR3GarzFY1IrbXJw5L4QfQhokjRV91q+SelFqxQWSep1ucXEZ22+dSTwLFkXeur25sPIbw== +"@vitejs/plugin-vue@4.3.1": + version "4.3.1" + resolved "https://registry.yarnpkg.com/@vitejs/plugin-vue/-/plugin-vue-4.3.1.tgz#635cf512dd1d5c78adf9e24615696e4918cd9d88" + integrity sha512-tUBEtWcF7wFtII7ayNiLNDTCE1X1afySEo+XNVMNkFXaThENyCowIEX095QqbJZGTgoOcSVDJGlnde2NG4jtbQ== + "@vue/compiler-core@3.3.6": version "3.3.6" resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.3.6.tgz#ffc14517e0a7269983b9a93994df9669e9e03506" @@ -400,6 +405,16 @@ estree-walker "^2.0.2" source-map-js "^1.0.2" +"@vue/compiler-core@3.3.7": + version "3.3.7" + resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.3.7.tgz#865a5734c971686d9737d85a0c5a08de045b6162" + integrity sha512-pACdY6YnTNVLXsB86YD8OF9ihwpolzhhtdLVHhBL6do/ykr6kKXNYABRtNMGrsQXpEXXyAdwvWWkuTbs4MFtPQ== + dependencies: + "@babel/parser" "^7.23.0" + "@vue/shared" "3.3.7" + estree-walker "^2.0.2" + source-map-js "^1.0.2" + "@vue/compiler-dom@3.3.6": version "3.3.6" resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.3.6.tgz#683420cc201c3a48cb0841467bf19a433ffbede6" @@ -408,6 +423,14 @@ "@vue/compiler-core" "3.3.6" "@vue/shared" "3.3.6" +"@vue/compiler-dom@3.3.7": + version "3.3.7" + resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.3.7.tgz#a245aa03f9bfcdb537a239bf02842072de0644c9" + integrity sha512-0LwkyJjnUPssXv/d1vNJ0PKfBlDoQs7n81CbO6Q0zdL7H1EzqYRrTVXDqdBVqro0aJjo/FOa1qBAPVI4PGSHBw== + dependencies: + "@vue/compiler-core" "3.3.7" + "@vue/shared" "3.3.7" + "@vue/compiler-sfc@3.3.6": version "3.3.6" resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.3.6.tgz#00dce2e7aa569101009c5eedec4a69e2f831d8cc" @@ -424,6 +447,22 @@ postcss "^8.4.31" source-map-js "^1.0.2" +"@vue/compiler-sfc@3.3.7": + version "3.3.7" + resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.3.7.tgz#219d04b3013c7b15fbc536e2279e07810b731cc2" + integrity sha512-7pfldWy/J75U/ZyYIXRVqvLRw3vmfxDo2YLMwVtWVNew8Sm8d6wodM+OYFq4ll/UxfqVr0XKiVwti32PCrruAw== + dependencies: + "@babel/parser" "^7.23.0" + "@vue/compiler-core" "3.3.7" + "@vue/compiler-dom" "3.3.7" + "@vue/compiler-ssr" "3.3.7" + "@vue/reactivity-transform" "3.3.7" + "@vue/shared" "3.3.7" + estree-walker "^2.0.2" + magic-string "^0.30.5" + postcss "^8.4.31" + source-map-js "^1.0.2" + "@vue/compiler-ssr@3.3.6": version "3.3.6" resolved "https://registry.yarnpkg.com/@vue/compiler-ssr/-/compiler-ssr-3.3.6.tgz#d767602563f2596a03b44b3dea4a32c715f64915" @@ -432,6 +471,14 @@ "@vue/compiler-dom" "3.3.6" "@vue/shared" "3.3.6" +"@vue/compiler-ssr@3.3.7": + version "3.3.7" + resolved "https://registry.yarnpkg.com/@vue/compiler-ssr/-/compiler-ssr-3.3.7.tgz#eff4a70f7ceb800d60e68d208b96a030c0f1b636" + integrity sha512-TxOfNVVeH3zgBc82kcUv+emNHo+vKnlRrkv8YvQU5+Y5LJGJwSNzcmLUoxD/dNzv0bhQ/F0s+InlgV0NrApJZg== + dependencies: + "@vue/compiler-dom" "3.3.7" + "@vue/shared" "3.3.7" + "@vue/devtools-api@^6.5.1": version "6.5.1" resolved "https://registry.yarnpkg.com/@vue/devtools-api/-/devtools-api-6.5.1.tgz#7f71f31e40973eeee65b9a64382b13593fdbd697" @@ -448,6 +495,17 @@ estree-walker "^2.0.2" magic-string "^0.30.5" +"@vue/reactivity-transform@3.3.7": + version "3.3.7" + resolved "https://registry.yarnpkg.com/@vue/reactivity-transform/-/reactivity-transform-3.3.7.tgz#eb9f5110af5085079b851d162205394bc790d539" + integrity sha512-APhRmLVbgE1VPGtoLQoWBJEaQk4V8JUsqrQihImVqKT+8U6Qi3t5ATcg4Y9wGAPb3kIhetpufyZ1RhwbZCIdDA== + dependencies: + "@babel/parser" "^7.23.0" + "@vue/compiler-core" "3.3.7" + "@vue/shared" "3.3.7" + estree-walker "^2.0.2" + magic-string "^0.30.5" + "@vue/reactivity@3.3.6": version "3.3.6" resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.3.6.tgz#436bd2997673ae2a7b6f4e1c376163f0445f9a5e" @@ -455,6 +513,13 @@ dependencies: "@vue/shared" "3.3.6" +"@vue/reactivity@3.3.7": + version "3.3.7" + resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.3.7.tgz#48b6671a45ba33039da2c0eb25ae702f924486a9" + integrity sha512-cZNVjWiw00708WqT0zRpyAgduG79dScKEPYJXq2xj/aMtk3SKvL3FBt2QKUlh6EHBJ1m8RhBY+ikBUzwc7/khg== + dependencies: + "@vue/shared" "3.3.7" + "@vue/runtime-core@3.3.6": version "3.3.6" resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.3.6.tgz#749ff325c95bb3a690c512da0215339fd241872c" @@ -463,6 +528,14 @@ "@vue/reactivity" "3.3.6" "@vue/shared" "3.3.6" +"@vue/runtime-core@3.3.7": + version "3.3.7" + resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.3.7.tgz#c1eece1c98f936dc69dd0667d11b464579b128fd" + integrity sha512-LHq9du3ubLZFdK/BP0Ysy3zhHqRfBn80Uc+T5Hz3maFJBGhci1MafccnL3rpd5/3wVfRHAe6c+PnlO2PAavPTQ== + dependencies: + "@vue/reactivity" "3.3.7" + "@vue/shared" "3.3.7" + "@vue/runtime-dom@3.3.6": version "3.3.6" resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.3.6.tgz#30729eac969467c6be6723677d14b873918a467c" @@ -472,6 +545,15 @@ "@vue/shared" "3.3.6" csstype "^3.1.2" +"@vue/runtime-dom@3.3.7": + version "3.3.7" + resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.3.7.tgz#e7cf88cc01591fdf6e3164825554fdadc3137ffc" + integrity sha512-PFQU1oeJxikdDmrfoNQay5nD4tcPNYixUBruZzVX/l0eyZvFKElZUjW4KctCcs52nnpMGO6UDK+jF5oV4GT5Lw== + dependencies: + "@vue/runtime-core" "3.3.7" + "@vue/shared" "3.3.7" + csstype "^3.1.2" + "@vue/server-renderer@3.3.6": version "3.3.6" resolved "https://registry.yarnpkg.com/@vue/server-renderer/-/server-renderer-3.3.6.tgz#b8a4d7254b67a5cc663f2b9e16cde019483620c9" @@ -480,11 +562,24 @@ "@vue/compiler-ssr" "3.3.6" "@vue/shared" "3.3.6" +"@vue/server-renderer@3.3.7": + version "3.3.7" + resolved "https://registry.yarnpkg.com/@vue/server-renderer/-/server-renderer-3.3.7.tgz#0cc3dc6ad39a54693e6e8f853caa3c7bb43b0364" + integrity sha512-UlpKDInd1hIZiNuVVVvLgxpfnSouxKQOSE2bOfQpBuGwxRV/JqqTCyyjXUWiwtVMyeRaZhOYYqntxElk8FhBhw== + dependencies: + "@vue/compiler-ssr" "3.3.7" + "@vue/shared" "3.3.7" + "@vue/shared@3.3.6": version "3.3.6" resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.3.6.tgz#bd97c22972c6519250069297d01cbed077054b7e" integrity sha512-Xno5pEqg8SVhomD0kTSmfh30ZEmV/+jZtyh39q6QflrjdJCXah5lrnOLi9KB6a5k5aAHXMXjoMnxlzUkCNfWLQ== +"@vue/shared@3.3.7": + version "3.3.7" + resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.3.7.tgz#0091852fe5cc4237c8440fe32f3ab6bc920ae6d9" + integrity sha512-N/tbkINRUDExgcPTBvxNkvHGu504k8lzlNQRITVnm6YjOjwa4r0nnbd4Jb01sNpur5hAllyRJzSK5PvB9PPwRg== + "@vueuse/core@10.5.0", "@vueuse/core@^10.1.2", "@vueuse/core@^10.5.0": version "10.5.0" resolved "https://registry.yarnpkg.com/@vueuse/core/-/core-10.5.0.tgz#04d1e6d26592bb997bb755a4830ea7583c3e8612" @@ -2086,6 +2181,7 @@ stdin-discarder@^0.1.0: bl "^5.0.0" "string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: + name string-width-cjs version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -2111,6 +2207,7 @@ string_decoder@^1.1.1: safe-buffer "~5.2.0" "strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: + name strip-ansi-cjs version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -2243,7 +2340,7 @@ v8flags@^4.0.0: resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-4.0.1.tgz#98fe6c4308317c5f394d85a435eb192490f7e132" integrity sha512-fcRLaS4H/hrZk9hYwbdRM35D0U8IYMfEClhXxCivOojl+yTRAZH3Zy2sSy6qVCiGbV9YAtPssP6jaChqC9vPCg== -vite@^4.4.11: +vite@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/vite/-/vite-4.5.0.tgz#ec406295b4167ac3bc23e26f9c8ff559287cff26" integrity sha512-ulr8rNLA6rkyFAlVWw2q5YJ91v098AFQ2R0PRFwPzREXOUJQPtFUG0t+/ZikhaOCDqFoDhN6/v8Sq0o4araFAw== @@ -2254,14 +2351,15 @@ vite@^4.4.11: optionalDependencies: fsevents "~2.3.2" -vitepress@^1.0.0-rc.22: - version "1.0.0-rc.22" - resolved "https://registry.yarnpkg.com/vitepress/-/vitepress-1.0.0-rc.22.tgz#9855edc0991a57cf88561e790b0b35ddc447fbf0" - integrity sha512-n7le5iikCFgWMuX7sKfzDGJGlrsYQ5trG3S97BghNz2alOTr4Xp+GrB6ShwogUTX9gNgeNmrACjokhW55LNeBA== +vitepress@^1.0.0-rc.24: + version "1.0.0-rc.24" + resolved "https://registry.yarnpkg.com/vitepress/-/vitepress-1.0.0-rc.24.tgz#517b44d10e0cd3773f5e2f9799c2bde8e60f0505" + integrity sha512-RpnL8cnOGwiRlBbrYQUm9sYkJbtyOt/wYXk2diTcokY4yvks/5lq9LuSt+MURWB6ZqwpSNHvTmxgaSfLoG0/OA== dependencies: "@docsearch/css" "^3.5.2" "@docsearch/js" "^3.5.2" - "@types/markdown-it" "^13.0.2" + "@types/markdown-it" "^13.0.4" + "@vitejs/plugin-vue" "4.3.1" "@vue/devtools-api" "^6.5.1" "@vueuse/core" "^10.5.0" "@vueuse/integrations" "^10.5.0" @@ -2269,8 +2367,8 @@ vitepress@^1.0.0-rc.22: mark.js "8.11.1" minisearch "^6.1.0" shiki "^0.14.5" - vite "^4.4.11" - vue "^3.3.4" + vite "^4.5.0" + vue "^3.3.6" vscode-oniguruma@^1.7.0: version "1.7.0" @@ -2298,6 +2396,17 @@ vue@^3.3.4: "@vue/server-renderer" "3.3.6" "@vue/shared" "3.3.6" +vue@^3.3.6: + version "3.3.7" + resolved "https://registry.yarnpkg.com/vue/-/vue-3.3.7.tgz#972a218682443a3819d121261b2bff914417f4f0" + integrity sha512-YEMDia1ZTv1TeBbnu6VybatmSteGOS3A3YgfINOfraCbf85wdKHzscD6HSS/vB4GAtI7sa1XPX7HcQaJ1l24zA== + dependencies: + "@vue/compiler-dom" "3.3.7" + "@vue/compiler-sfc" "3.3.7" + "@vue/runtime-dom" "3.3.7" + "@vue/server-renderer" "3.3.7" + "@vue/shared" "3.3.7" + wcwidth@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" @@ -2325,6 +2434,7 @@ wordwrap@^1.0.0: integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q== "wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: + name wrap-ansi-cjs version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==