vitepress 2.0.0-alpha.20 → 2.0.0-alpha.21

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.
Files changed (121) hide show
  1. package/README.md +27 -7
  2. package/THIRD-PARTY-NOTICES.md +2 -2
  3. package/dist/client/app/components/ClientOnly.d.ts +2 -3
  4. package/dist/client/app/components/Content.d.ts +2 -3
  5. package/dist/client/app/composables/codeGroups.d.ts +2 -3
  6. package/dist/client/app/composables/copyCode.d.ts +2 -3
  7. package/dist/client/app/composables/copyCode.js +1 -1
  8. package/dist/client/app/composables/head.d.ts +2 -3
  9. package/dist/client/app/composables/icon.d.ts +2 -3
  10. package/dist/client/app/composables/preFetch.d.ts +2 -3
  11. package/dist/client/app/composables/preFetch.js +29 -28
  12. package/dist/client/app/data.d.ts +5 -5
  13. package/dist/client/app/devtools.d.ts +2 -3
  14. package/dist/client/app/index.d.ts +2 -3
  15. package/dist/client/app/index.js +4 -6
  16. package/dist/client/app/router.d.ts +13 -8
  17. package/dist/client/app/router.js +16 -7
  18. package/dist/client/app/ssr.d.ts +2 -3
  19. package/dist/client/app/theme.d.ts +3 -4
  20. package/dist/client/app/utils.d.ts +9 -9
  21. package/dist/client/app/utils.js +10 -5
  22. package/dist/client/shared.d.ts +48 -27
  23. package/dist/client/shared.js +35 -2
  24. package/dist/client/theme-default/NotFound.vue +6 -4
  25. package/dist/client/theme-default/components/VPBackdrop.vue +1 -6
  26. package/dist/client/theme-default/components/VPBadge.vue +4 -3
  27. package/dist/client/theme-default/components/VPButton.d.vue.ts +4 -4
  28. package/dist/client/theme-default/components/VPButton.vue +5 -3
  29. package/dist/client/theme-default/components/VPContent.vue +3 -3
  30. package/dist/client/theme-default/components/VPDoc.vue +4 -3
  31. package/dist/client/theme-default/components/VPDocAsideOutline.vue +3 -3
  32. package/dist/client/theme-default/components/VPDocFooter.vue +5 -5
  33. package/dist/client/theme-default/components/VPDocFooterLastUpdated.vue +2 -2
  34. package/dist/client/theme-default/components/VPDocOutlineItem.vue +3 -4
  35. package/dist/client/theme-default/components/VPFeature.vue +6 -6
  36. package/dist/client/theme-default/components/VPFlyout.vue +5 -5
  37. package/dist/client/theme-default/components/VPFooter.vue +6 -10
  38. package/dist/client/theme-default/components/VPHero.d.vue.ts +3 -3
  39. package/dist/client/theme-default/components/VPHero.vue +6 -10
  40. package/dist/client/theme-default/components/VPHomeContent.vue +1 -2
  41. package/dist/client/theme-default/components/VPHomeHero.d.vue.ts +7 -7
  42. package/dist/client/theme-default/components/VPImage.vue +2 -2
  43. package/dist/client/theme-default/components/VPLink.d.vue.ts +2 -2
  44. package/dist/client/theme-default/components/VPLink.vue +6 -0
  45. package/dist/client/theme-default/components/VPLocalNav.vue +4 -5
  46. package/dist/client/theme-default/components/VPLocalNavOutlineDropdown.vue +4 -7
  47. package/dist/client/theme-default/components/VPLocalSearchBox.vue +7 -26
  48. package/dist/client/theme-default/components/VPMenuGroup.vue +4 -3
  49. package/dist/client/theme-default/components/VPMenuLink.vue +3 -3
  50. package/dist/client/theme-default/components/VPNav.vue +1 -2
  51. package/dist/client/theme-default/components/VPNavAppearance.vue +2 -1
  52. package/dist/client/theme-default/components/VPNavBar.vue +15 -20
  53. package/dist/client/theme-default/components/VPNavBarExtra.vue +1 -1
  54. package/dist/client/theme-default/components/VPNavBarHamburger.vue +8 -6
  55. package/dist/client/theme-default/components/VPNavBarSearch.vue +2 -2
  56. package/dist/client/theme-default/components/VPNavBarSearchButton.vue +2 -0
  57. package/dist/client/theme-default/components/VPNavBarTitle.vue +2 -2
  58. package/dist/client/theme-default/components/VPNavMenu.vue +1 -1
  59. package/dist/client/theme-default/components/VPNavMenuGroup.vue +3 -3
  60. package/dist/client/theme-default/components/VPNavMenuLink.vue +1 -1
  61. package/dist/client/theme-default/components/VPNavScreen.vue +1 -6
  62. package/dist/client/theme-default/components/VPNavTranslations.vue +7 -5
  63. package/dist/client/theme-default/components/VPSidebar.vue +5 -6
  64. package/dist/client/theme-default/components/VPSidebarItem.vue +7 -8
  65. package/dist/client/theme-default/components/VPSkipLink.vue +2 -2
  66. package/dist/client/theme-default/components/VPSponsors.d.vue.ts +1 -1
  67. package/dist/client/theme-default/components/VPSwitch.vue +5 -6
  68. package/dist/client/theme-default/components/VPSwitchAppearance.vue +1 -2
  69. package/dist/client/theme-default/components/VPTeamMembersItem.vue +5 -5
  70. package/dist/client/theme-default/components/VPTeamPageSection.vue +3 -4
  71. package/dist/client/theme-default/components/VPTeamPageTitle.vue +2 -2
  72. package/dist/client/theme-default/composables/data.d.ts +2 -3
  73. package/dist/client/theme-default/composables/edit-link.d.ts +2 -3
  74. package/dist/client/theme-default/composables/flyout.d.ts +3 -4
  75. package/dist/client/theme-default/composables/langs.d.ts +4 -5
  76. package/dist/client/theme-default/composables/layout.d.ts +5 -6
  77. package/dist/client/theme-default/composables/nav-overflow.d.ts +9 -10
  78. package/dist/client/theme-default/composables/nav.d.ts +7 -8
  79. package/dist/client/theme-default/composables/outline.d.ts +5 -6
  80. package/dist/client/theme-default/composables/prev-next.d.ts +2 -3
  81. package/dist/client/theme-default/composables/scroll-lock.d.ts +2 -11
  82. package/dist/client/theme-default/composables/scroll-lock.js +5 -12
  83. package/dist/client/theme-default/composables/sidebar.d.ts +4 -5
  84. package/dist/client/theme-default/composables/sponsor-grid.d.ts +5 -6
  85. package/dist/client/theme-default/fonts/inter-italic-cyrillic-ext.woff2 +0 -0
  86. package/dist/client/theme-default/fonts/inter-italic-cyrillic.woff2 +0 -0
  87. package/dist/client/theme-default/fonts/inter-italic-greek-ext.woff2 +0 -0
  88. package/dist/client/theme-default/fonts/inter-italic-greek.woff2 +0 -0
  89. package/dist/client/theme-default/fonts/inter-italic-latin-ext.woff2 +0 -0
  90. package/dist/client/theme-default/fonts/inter-italic-latin.woff2 +0 -0
  91. package/dist/client/theme-default/fonts/inter-italic-symbols.woff2 +0 -0
  92. package/dist/client/theme-default/fonts/inter-italic-vietnamese.woff2 +0 -0
  93. package/dist/client/theme-default/fonts/inter-roman-cyrillic-ext.woff2 +0 -0
  94. package/dist/client/theme-default/fonts/inter-roman-cyrillic.woff2 +0 -0
  95. package/dist/client/theme-default/fonts/inter-roman-greek-ext.woff2 +0 -0
  96. package/dist/client/theme-default/fonts/inter-roman-greek.woff2 +0 -0
  97. package/dist/client/theme-default/fonts/inter-roman-latin-ext.woff2 +0 -0
  98. package/dist/client/theme-default/fonts/inter-roman-latin.woff2 +0 -0
  99. package/dist/client/theme-default/fonts/inter-roman-symbols.woff2 +0 -0
  100. package/dist/client/theme-default/fonts/inter-roman-vietnamese.woff2 +0 -0
  101. package/dist/client/theme-default/styles/components/vp-code-group.css +5 -8
  102. package/dist/client/theme-default/styles/components/vp-doc.css +49 -45
  103. package/dist/client/theme-default/styles/docsearch.css +3 -2
  104. package/dist/client/theme-default/styles/fonts.css +22 -9
  105. package/dist/client/theme-default/styles/icons.css +22 -8
  106. package/dist/client/theme-default/styles/vars.css +15 -0
  107. package/dist/client/theme-default/support/docsearch.d.ts +14 -15
  108. package/dist/client/theme-default/support/local-search.d.ts +9 -0
  109. package/dist/client/theme-default/support/local-search.js +31 -0
  110. package/dist/client/theme-default/support/lru.d.ts +2 -3
  111. package/dist/client/theme-default/support/reactivity.d.ts +2 -3
  112. package/dist/client/theme-default/support/sidebar.d.ts +6 -7
  113. package/dist/client/theme-default/support/translation.d.ts +2 -3
  114. package/dist/client/theme-default/support/utils.d.ts +6 -7
  115. package/dist/node/{chunk-BYTgXTwz.js → chunk-BjrVv9r8.js} +17133 -17242
  116. package/dist/node/cli.js +3 -6
  117. package/dist/node/index.d.ts +64 -50
  118. package/dist/node/index.js +1 -2
  119. package/dist/web-types.json +1 -1
  120. package/package.json +56 -57
  121. package/types/shared.d.ts +3 -3
@@ -127,9 +127,9 @@ function scrollToTop() {
127
127
  .icon {
128
128
  display: inline-block;
129
129
  vertical-align: middle;
130
- margin-left: 0.125rem;
130
+ margin-inline-start: 0.125rem;
131
131
  font-size: 0.875rem;
132
- transform: rotate(0) /*rtl:rotate(180deg)*/;
132
+ transform: rotate(0);
133
133
  transition: transform 0.25s;
134
134
  }
135
135
 
@@ -144,15 +144,13 @@ function scrollToTop() {
144
144
  }
145
145
 
146
146
  .open > .icon {
147
- /*rtl:ignore*/
148
147
  transform: rotate(90deg);
149
148
  }
150
149
 
151
150
  .items {
152
151
  position: absolute;
153
152
  top: 2.5rem;
154
- right: 1rem;
155
- left: 1rem;
153
+ inset-inline: 1rem;
156
154
  display: grid;
157
155
  gap: 1px;
158
156
  border: 1px solid var(--vp-c-border);
@@ -166,8 +164,7 @@ function scrollToTop() {
166
164
 
167
165
  @media (min-width: 60rem) {
168
166
  .items {
169
- right: auto;
170
- left: calc(var(--vp-sidebar-width) + 2rem);
167
+ inset-inline: calc(var(--vp-sidebar-width) + 2rem) auto;
171
168
  width: 20rem;
172
169
  }
173
170
  }
@@ -3,13 +3,14 @@ import localSearchIndex from "@localSearchIndex";
3
3
  import { computedAsync, watchDebounced, onKeyStroke, useEventListener, useLocalStorage, useSessionStorage } from "@vueuse/core";
4
4
  import { useFocusTrap } from "@vueuse/integrations/useFocusTrap";
5
5
  import Mark from "mark.js/src/vanilla.js";
6
- import MiniSearch from "minisearch";
6
+ import "minisearch";
7
7
  import { dataSymbol, useRouter, withBase } from "vitepress";
8
8
  import { computed, createApp, markRaw, nextTick, onBeforeUnmount, onMounted, ref, shallowRef, useTemplateRef, watch, watchEffect } from "vue";
9
9
  import { pathToFile } from "../../app/utils";
10
10
  import { escapeRegExp } from "../../shared";
11
11
  import { useData } from "../composables/data";
12
12
  import { useBodyScrollLock } from "../composables/scroll-lock";
13
+ import { loadLocalSearchIndex } from "../support/local-search";
13
14
  import { LRUCache } from "../support/lru";
14
15
  import { createSearchTranslate } from "../support/translation";
15
16
  const emit = defineEmits(["close"]);
@@ -41,25 +42,7 @@ const showSearchSpinner = computed(() => {
41
42
  const searchIndex = computedAsync(async () => {
42
43
  const json = (await searchIndexData.value[localeIndex.value]?.())?.default;
43
44
  if (!json) return null;
44
- return markRaw(MiniSearch.loadJSON(json, {
45
- fields: [
46
- "title",
47
- "titles",
48
- "text"
49
- ],
50
- storeFields: ["title", "titles"],
51
- searchOptions: {
52
- fuzzy: .2,
53
- prefix: true,
54
- boost: {
55
- title: 4,
56
- text: 2,
57
- titles: 1
58
- },
59
- ...theme.value.search?.provider === "local" && theme.value.search.options?.miniSearch?.searchOptions
60
- },
61
- ...theme.value.search?.provider === "local" && theme.value.search.options?.miniSearch?.options
62
- }));
45
+ return markRaw(loadLocalSearchIndex(json, theme.value.search?.provider === "local" ? theme.value.search.options?.miniSearch : undefined));
63
46
  }, undefined, isSearchIndexLoading);
64
47
  const disableQueryPersistence = computed(() => {
65
48
  return theme.value.search?.provider === "local" && theme.value.search.options?.disableQueryPersistence === true;
@@ -451,11 +434,11 @@ function onMouseMove(e) {
451
434
  :key="index"
452
435
  class="title"
453
436
  >
454
- <span class="text" v-html="t" />
437
+ <span class="text" dir="auto" v-html="t" />
455
438
  <span class="vpi-chevron-right local-search-icon" />
456
439
  </span>
457
440
  <span class="title main">
458
- <span class="text" v-html="p.title" />
441
+ <span class="text" dir="auto" v-html="p.title" />
459
442
  </span>
460
443
  </div>
461
444
 
@@ -795,8 +778,7 @@ function onMouseMove(e) {
795
778
  .excerpt-gradient-bottom {
796
779
  position: absolute;
797
780
  bottom: -1px;
798
- left: 0;
799
- width: 100%;
781
+ inset-inline: 0;
800
782
  height: 0.5rem;
801
783
  background: linear-gradient(transparent, var(--vp-local-search-result-bg));
802
784
  z-index: 1000;
@@ -805,8 +787,7 @@ function onMouseMove(e) {
805
787
  .excerpt-gradient-top {
806
788
  position: absolute;
807
789
  top: -1px;
808
- left: 0;
809
- width: 100%;
790
+ inset-inline: 0;
810
791
  height: 0.5rem;
811
792
  background: linear-gradient(var(--vp-local-search-result-bg), transparent);
812
793
  z-index: 1000;
@@ -82,9 +82,10 @@ const hasSubGroups = computed(() => props.items.some((item) => !("link" in item)
82
82
  }
83
83
 
84
84
  .VPMenuGroup > .sub-groups {
85
- margin: 0.25rem 0 0.25rem 0.75rem;
86
- border-left: 1px solid var(--vp-c-divider);
87
- padding-left: 0.25rem;
85
+ margin-block: 0.25rem;
86
+ margin-inline: 0.75rem 0;
87
+ border-inline-start: 1px solid var(--vp-c-divider);
88
+ padding-inline-start: 0.25rem;
88
89
  }
89
90
 
90
91
  .VPMenuGroup .VPMenuGroup,
@@ -36,7 +36,7 @@ defineOptions({ inheritAttrs: false });
36
36
  :no-icon="item.noIcon"
37
37
  @click="onClick"
38
38
  >
39
- <span v-html="item.text"></span>
39
+ <span dir="auto" v-html="item.text"></span>
40
40
  </VPLink>
41
41
  </li>
42
42
  </template>
@@ -62,7 +62,7 @@ defineOptions({ inheritAttrs: false });
62
62
  font-size: 0.875rem;
63
63
  font-weight: 500;
64
64
  color: var(--vp-c-text-1);
65
- text-align: left;
65
+ text-align: start;
66
66
  white-space: nowrap;
67
67
  transition: background-color 0.25s, color 0.25s;
68
68
  }
@@ -84,7 +84,7 @@ defineOptions({ inheritAttrs: false });
84
84
 
85
85
  .VPNavScreen .link {
86
86
  display: block;
87
- margin-left: 0.75rem;
87
+ margin-inline-start: 0.75rem;
88
88
  border-radius: 0;
89
89
  padding: 0;
90
90
  font-weight: 400;
@@ -37,8 +37,7 @@ watchEffect(() => {
37
37
  .VPNav {
38
38
  position: relative;
39
39
  top: var(--vp-layout-top-height, 0px);
40
- /*rtl:ignore*/
41
- left: 0;
40
+ inset-inline-start: 0;
42
41
  z-index: var(--vp-z-index-nav);
43
42
  width: 100%;
44
43
  pointer-events: none;
@@ -60,7 +60,8 @@ const labelId = useId();
60
60
  justify-content: space-between;
61
61
  align-items: center;
62
62
  border-radius: 0.5rem;
63
- padding: 0.75rem 0.875rem 0.75rem 1rem;
63
+ padding-block: 0.75rem;
64
+ padding-inline: 1rem 0.875rem;
64
65
  background-color: var(--vp-c-bg-soft);
65
66
  }
66
67
 
@@ -80,7 +80,7 @@ const overflow = provideNavOverflow({ itemsKey: () => JSON.stringify(theme.value
80
80
  height: var(--vp-nav-height);
81
81
  pointer-events: none;
82
82
  white-space: nowrap;
83
- /* left edge of the background surface and divider — on doc pages the
83
+ /* inline-start edge of the background surface and divider — on doc pages the
84
84
  sidebar column paints its own surface up to this offset */
85
85
  --vp-nav-col-offset: 0px;
86
86
  }
@@ -91,9 +91,8 @@ const overflow = provideNavOverflow({ itemsKey: () => JSON.stringify(theme.value
91
91
  content: "";
92
92
  position: absolute;
93
93
  top: 0;
94
- right: 0;
95
94
  bottom: 0;
96
- left: var(--vp-nav-col-offset);
95
+ inset-inline: var(--vp-nav-col-offset) 0;
97
96
  z-index: -1;
98
97
  background-color: var(--vp-nav-bg-color);
99
98
  backdrop-filter: var(--vp-nav-backdrop-filter);
@@ -143,7 +142,8 @@ const overflow = provideNavOverflow({ itemsKey: () => JSON.stringify(theme.value
143
142
  }
144
143
 
145
144
  .wrapper {
146
- padding: 0 0.5rem 0 1.5rem;
145
+ padding-block: 0;
146
+ padding-inline: 1.5rem 0.5rem;
147
147
  }
148
148
 
149
149
  @media (min-width: 48rem) {
@@ -184,14 +184,10 @@ const overflow = provideNavOverflow({ itemsKey: () => JSON.stringify(theme.value
184
184
  }
185
185
 
186
186
  @media (min-width: 60rem) {
187
- /* outside home the title column matches the sidebar column, so search and
188
- menu sit at the same spot on every doc page; on home the title keeps its
189
- natural width and search sits right next to it */
190
- .VPNavBar:not(.home) .title {
191
- min-width: calc(var(--vp-sidebar-width) - 2rem);
192
- }
193
-
187
+ /* reserve the sidebar column only when it is present; otherwise the title
188
+ keeps its natural width and search sits right next to it */
194
189
  .VPNavBar.has-sidebar .title {
190
+ min-width: calc(var(--vp-sidebar-width) - 2rem);
195
191
  max-width: calc(var(--vp-sidebar-width) - 2rem);
196
192
  }
197
193
  }
@@ -223,7 +219,7 @@ const overflow = provideNavOverflow({ itemsKey: () => JSON.stringify(theme.value
223
219
  into the middle; with a menu present its flex-grow wins and this
224
220
  margin resolves to zero */
225
221
  .content-body > .search {
226
- margin-right: auto;
222
+ margin-inline-end: auto;
227
223
  }
228
224
  }
229
225
 
@@ -233,15 +229,14 @@ const overflow = provideNavOverflow({ itemsKey: () => JSON.stringify(theme.value
233
229
  visibility: hidden;
234
230
  position: absolute;
235
231
  top: 0;
236
- left: 0;
232
+ inset-inline-start: 0;
237
233
  max-width: 100%;
238
234
  overflow: hidden;
239
235
  }
240
236
 
241
237
  /* separators between whichever cluster units are currently in the bar */
242
238
  .content-body > :where(.menu, .translations, .appearance, .social-links) + :where(.translations, .appearance, .social-links)::before {
243
- margin-right: 0.5rem;
244
- margin-left: 0.5rem;
239
+ margin-inline: 0.5rem;
245
240
  width: 1px;
246
241
  height: 1.5rem;
247
242
  background-color: var(--vp-c-divider);
@@ -249,15 +244,15 @@ const overflow = provideNavOverflow({ itemsKey: () => JSON.stringify(theme.value
249
244
  }
250
245
 
251
246
  .content-body > :where(.menu, .translations) + .appearance::before {
252
- margin-right: 1rem;
247
+ margin-inline-end: 1rem;
253
248
  }
254
249
 
255
250
  .content-body > .appearance + .social-links::before {
256
- margin-left: 1rem;
251
+ margin-inline-start: 1rem;
257
252
  }
258
253
 
259
254
  .social-links {
260
- margin-right: -0.5rem;
255
+ margin-inline-end: -0.5rem;
261
256
  }
262
257
 
263
258
  .divider {
@@ -270,7 +265,7 @@ const overflow = provideNavOverflow({ itemsKey: () => JSON.stringify(theme.value
270
265
  transform: translateZ(0);
271
266
  width: 100%;
272
267
  height: 1px;
273
- padding-left: var(--vp-nav-col-offset);
268
+ padding-inline-start: var(--vp-nav-col-offset);
274
269
  }
275
270
 
276
271
  /* the sidebar-column segment of the bottom rule — inset from the column
@@ -279,7 +274,7 @@ const overflow = provideNavOverflow({ itemsKey: () => JSON.stringify(theme.value
279
274
  content: "";
280
275
  position: absolute;
281
276
  top: 0;
282
- left: calc(var(--vp-nav-col-offset) - var(--vp-sidebar-width) + 2rem);
277
+ inset-inline-start: calc(var(--vp-nav-col-offset) - var(--vp-sidebar-width) + 2rem);
283
278
  width: calc(var(--vp-sidebar-width) - 4rem);
284
279
  height: 1px;
285
280
  background-color: var(--vp-c-divider);
@@ -65,7 +65,7 @@ const hasContent = computed(() => overflowItems.value.length > 0 || showTranslat
65
65
  <style scoped>
66
66
  .VPNavBarExtra {
67
67
  display: none;
68
- margin-right: -0.75rem;
68
+ margin-inline-end: -0.75rem;
69
69
  }
70
70
 
71
71
  @media (min-width: 48rem) {
@@ -54,11 +54,12 @@ watchEffect(() => {
54
54
  width: 1rem;
55
55
  height: 0.875rem;
56
56
  overflow: hidden;
57
+ scale: var(--vp-direction-multiplier) 1;
57
58
  }
58
59
 
59
- .VPNavBarHamburger:hover .top { top: 0; left: 0; transform: translateX(0.25rem); }
60
- .VPNavBarHamburger:hover .middle { top: 0.375rem; left: 0; transform: translateX(0); }
61
- .VPNavBarHamburger:hover .bottom { top: 0.75rem; left: 0; transform: translateX(0.5rem); }
60
+ .VPNavBarHamburger:hover .top { top: 0; transform: translateX(0.25rem); }
61
+ .VPNavBarHamburger:hover .middle { top: 0.375rem; transform: translateX(0); }
62
+ .VPNavBarHamburger:hover .bottom { top: 0.75rem; transform: translateX(0.5rem); }
62
63
 
63
64
  .VPNavBarHamburger.active .top { top: 0.375rem; transform: translateX(0) rotate(225deg); }
64
65
  .VPNavBarHamburger.active .middle { top: 0.375rem; transform: translateX(1rem); }
@@ -75,13 +76,14 @@ watchEffect(() => {
75
76
  .middle,
76
77
  .bottom {
77
78
  position: absolute;
79
+ inset-inline-start: 0;
78
80
  width: 1rem;
79
81
  height: 0.125rem;
80
82
  background-color: var(--vp-c-text-1);
81
83
  transition: top 0.25s, background-color 0.5s, transform 0.25s;
82
84
  }
83
85
 
84
- .top { top: 0; left: 0; transform: translateX(0); }
85
- .middle { top: 0.375rem; left: 0; transform: translateX(0.5rem); }
86
- .bottom { top: 0.75rem; left: 0; transform: translateX(0.25rem); }
86
+ .top { top: 0; transform: translateX(0); }
87
+ .middle { top: 0.375rem; transform: translateX(0.5rem); }
88
+ .bottom { top: 0.75rem; transform: translateX(0.25rem); }
87
89
  </style>
@@ -151,13 +151,13 @@ function isEditingContent(event) {
151
151
  @media (min-width: 48rem) {
152
152
  .VPNavBarSearch {
153
153
  gap: 0.5rem;
154
- padding-left: 1.5rem;
154
+ padding-inline-start: 1.5rem;
155
155
  }
156
156
  }
157
157
 
158
158
  @media (min-width: 60rem) {
159
159
  .VPNavBarSearch {
160
- padding-left: 2rem;
160
+ padding-inline-start: 2rem;
161
161
  }
162
162
  }
163
163
  </style>
@@ -68,6 +68,8 @@ kbd {
68
68
  display: flex;
69
69
  align-items: center;
70
70
  gap: 0.25rem;
71
+ /* the shortcut reads the same way in every direction */
72
+ direction: ltr;
71
73
  padding: 0.25rem 0.375rem;
72
74
  border: 1px solid var(--vp-c-divider);
73
75
  border-radius: 0.25rem;
@@ -31,7 +31,7 @@ const textTitle = computed(() => {
31
31
  >
32
32
  <slot name="nav-bar-title-before" />
33
33
  <VPImage v-if="theme.logo" class="logo" :image="theme.logo" />
34
- <span v-if="theme.siteTitle" v-html="theme.siteTitle"></span>
34
+ <span v-if="theme.siteTitle" dir="auto" v-html="theme.siteTitle"></span>
35
35
  <span v-else-if="theme.siteTitle === undefined">{{ site.title }}</span>
36
36
  <slot name="nav-bar-title-after" />
37
37
  </a>
@@ -71,7 +71,7 @@ const textTitle = computed(() => {
71
71
 
72
72
  :deep(.logo) {
73
73
  flex: none;
74
- margin-right: 0.5rem;
74
+ margin-inline-end: 0.5rem;
75
75
  height: var(--vp-nav-logo-height);
76
76
  }
77
77
  </style>
@@ -61,7 +61,7 @@ function isVisible(index) {
61
61
  visibility: hidden;
62
62
  position: absolute;
63
63
  top: 0;
64
- left: 0;
64
+ inset-inline-start: 0;
65
65
  max-width: 100%;
66
66
  overflow: hidden;
67
67
  }
@@ -76,7 +76,7 @@ function toggle() {
76
76
  :aria-controls="groupId"
77
77
  @click="toggle"
78
78
  >
79
- <span class="button-text" v-html="item.text"></span>
79
+ <span class="button-text" dir="auto" v-html="item.text"></span>
80
80
  <span class="vpi-plus button-icon" aria-hidden="true" />
81
81
  </button>
82
82
 
@@ -108,7 +108,6 @@ function toggle() {
108
108
  }
109
109
 
110
110
  .VPNavScreenMenuGroup.open .button-icon {
111
- /*rtl:ignore*/
112
111
  transform: rotate(45deg);
113
112
  }
114
113
 
@@ -116,7 +115,8 @@ function toggle() {
116
115
  display: flex;
117
116
  justify-content: space-between;
118
117
  align-items: center;
119
- padding: 0.75rem 0.25rem 0.6875rem 0;
118
+ padding-block: 0.75rem 0.6875rem;
119
+ padding-inline: 0 0.25rem;
120
120
  width: 100%;
121
121
  line-height: 1.7142857;
122
122
  font-size: 0.875rem;
@@ -34,7 +34,7 @@ function onClick() {
34
34
  :no-icon="item.noIcon"
35
35
  @click="onClick"
36
36
  >
37
- <span v-html="item.text"></span>
37
+ <span dir="auto" v-html="item.text"></span>
38
38
  </VPLink>
39
39
  </template>
40
40
 
@@ -43,12 +43,7 @@ onKeyStroke("Escape", () => {
43
43
  <style scoped>
44
44
  .VPNavScreen {
45
45
  position: fixed;
46
- top: 0;
47
- /*rtl:ignore*/
48
- right: 0;
49
- bottom: 0;
50
- /*rtl:ignore*/
51
- left: 0;
46
+ inset: 0;
52
47
  padding: calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 1px) 2rem 0;
53
48
  width: 100%;
54
49
  background-color: var(--vp-nav-screen-bg-color);
@@ -113,7 +113,8 @@ const localeProps = (locale) => ({
113
113
  }
114
114
 
115
115
  .VPNavBarTranslations .title {
116
- padding: 0 1.5rem 0 0.75rem;
116
+ padding-block: 0;
117
+ padding-inline: 0.75rem 1.5rem;
117
118
  line-height: 2.2857143;
118
119
  font-size: 0.875rem;
119
120
  font-weight: 700;
@@ -144,20 +145,21 @@ const localeProps = (locale) => ({
144
145
  }
145
146
 
146
147
  .VPNavScreenTranslations .icon.lang {
147
- margin-right: 0.5rem;
148
+ margin-inline-end: 0.5rem;
148
149
  }
149
150
 
150
151
  .VPNavScreenTranslations .icon.chevron {
151
- margin-left: 0.25rem;
152
+ margin-inline-start: 0.25rem;
152
153
  transition: transform 0.25s;
153
154
  }
154
155
 
155
156
  .VPNavScreenTranslations.open .icon.chevron {
156
- transform: rotate(180deg);
157
+ transform: rotate(-90deg);
157
158
  }
158
159
 
159
160
  .VPNavScreenTranslations .list {
160
- padding: 0.25rem 0 0 1.5rem;
161
+ padding-block: 0.25rem 0;
162
+ padding-inline: 1.5rem 0;
161
163
  }
162
164
 
163
165
  .VPNavScreenTranslations .link {
@@ -58,7 +58,7 @@ watch(sidebarGroups, () => {
58
58
  position: fixed;
59
59
  top: var(--vp-layout-top-height, 0px);
60
60
  bottom: 0;
61
- left: 0;
61
+ inset-inline-start: 0;
62
62
  z-index: var(--vp-z-index-sidebar);
63
63
  padding: 2rem 2rem 6rem;
64
64
  width: calc(100vw - 4rem);
@@ -68,7 +68,7 @@ watch(sidebarGroups, () => {
68
68
  box-shadow: var(--vp-c-shadow-3);
69
69
  overflow-x: hidden;
70
70
  overflow-y: auto;
71
- transform: translateX(-100%);
71
+ transform: translateX(calc(-100% * var(--vp-direction-multiplier)));
72
72
  transition: opacity 0.5s, transform 0.25s ease;
73
73
  overscroll-behavior: contain;
74
74
  }
@@ -99,7 +99,7 @@ watch(sidebarGroups, () => {
99
99
 
100
100
  @media (min-width: 90rem) {
101
101
  .VPSidebar {
102
- padding-left: max(2rem, calc((100% - (var(--vp-layout-max-width) - 4rem)) / 2));
102
+ padding-inline-start: max(2rem, calc((100% - (var(--vp-layout-max-width) - 4rem)) / 2));
103
103
  width: calc((100% - (var(--vp-layout-max-width) - 4rem)) / 2 + var(--vp-sidebar-width) - 2rem);
104
104
  }
105
105
  }
@@ -108,11 +108,10 @@ watch(sidebarGroups, () => {
108
108
  .curtain {
109
109
  position: sticky;
110
110
  top: calc(var(--vp-nav-height) * -1);
111
- left: 0;
111
+ inset-inline-start: 0;
112
112
  z-index: 1;
113
113
  margin-top: calc(var(--vp-nav-height) * -1);
114
- margin-right: -2rem;
115
- margin-left: -2rem;
114
+ margin-inline: -2rem;
116
115
  height: var(--vp-nav-height);
117
116
  background-color: var(--vp-sidebar-bg-color);
118
117
  }
@@ -46,9 +46,9 @@ function onItemClick() {
46
46
  :rel="item.rel"
47
47
  :target="item.target"
48
48
  >
49
- <component :is="textTag" class="text" v-html="item.text" />
49
+ <component :is="textTag" class="text"><bdi v-html="item.text" /></component>
50
50
  </VPLink>
51
- <component v-else :is="textTag" class="text" v-html="item.text" />
51
+ <component v-else :is="textTag" class="text"><bdi v-html="item.text" /></component>
52
52
 
53
53
  <button
54
54
  v-if="item.collapsed != null && item.items && item.items.length"
@@ -98,7 +98,7 @@ function onItemClick() {
98
98
  position: absolute;
99
99
  top: 0.375rem;
100
100
  bottom: 0.375rem;
101
- left: calc(-1rem - 1px);
101
+ inset-inline-start: calc(-1rem - 1px);
102
102
  width: 2px;
103
103
  border-radius: 2px;
104
104
  transition: background-color 0.25s;
@@ -176,7 +176,7 @@ function onItemClick() {
176
176
  display: flex;
177
177
  justify-content: center;
178
178
  align-items: center;
179
- margin-right: -0.4375rem;
179
+ margin-inline-end: -0.4375rem;
180
180
  width: 2rem;
181
181
  height: 2rem;
182
182
  color: var(--vp-c-text-3);
@@ -195,13 +195,12 @@ function onItemClick() {
195
195
 
196
196
  .caret-icon {
197
197
  font-size: 1.125rem;
198
- /*rtl:ignore*/
199
198
  transform: rotate(90deg);
200
199
  transition: transform 0.25s;
201
200
  }
202
201
 
203
202
  .VPSidebarItem.collapsed .caret-icon {
204
- transform: rotate(0) /*rtl:rotate(180deg)*/;
203
+ transform: rotate(0);
205
204
  }
206
205
 
207
206
  .VPSidebarItem.level-1 .items,
@@ -209,8 +208,8 @@ function onItemClick() {
209
208
  .VPSidebarItem.level-3 .items,
210
209
  .VPSidebarItem.level-4 .items,
211
210
  .VPSidebarItem.level-5 .items {
212
- border-left: 1px solid var(--vp-c-divider);
213
- padding-left: 1rem;
211
+ border-inline-start: 1px solid var(--vp-c-divider);
212
+ padding-inline-start: 1rem;
214
213
  }
215
214
 
216
215
  .VPSidebarItem.collapsed .items {
@@ -23,7 +23,7 @@ watch(() => route.path, () => backToTop.value?.focus());
23
23
  .VPSkipLink {
24
24
  position: fixed;
25
25
  top: 0.5rem;
26
- left: 0.5rem;
26
+ inset-inline-start: 0.5rem;
27
27
  padding: 0.5rem 1rem;
28
28
  z-index: 999;
29
29
  border-radius: 0.5rem;
@@ -45,7 +45,7 @@ watch(() => route.path, () => backToTop.value?.focus());
45
45
  @media (min-width: 80rem) {
46
46
  .VPSkipLink {
47
47
  top: 0.875rem;
48
- left: 1rem;
48
+ inset-inline-start: 1rem;
49
49
  }
50
50
  }
51
51
  </style>
@@ -12,7 +12,7 @@ interface Props {
12
12
  data: Sponsors[] | Sponsor[];
13
13
  }
14
14
  declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
15
- mode: "normal" | "aside";
15
+ mode: "aside" | "normal";
16
16
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
17
17
  declare const _default: typeof __VLS_export;
18
18
  export default _default;
@@ -18,7 +18,7 @@
18
18
  flex-shrink: 0;
19
19
  border: 1px solid var(--vp-input-border-color);
20
20
  background-color: var(--vp-input-switch-bg-color);
21
- transition: border-color 0.25s;
21
+ transition: border-color 0.25s !important;
22
22
  }
23
23
 
24
24
  .VPSwitch:hover {
@@ -28,14 +28,13 @@
28
28
  .check {
29
29
  position: absolute;
30
30
  top: 1px;
31
- /*rtl:ignore*/
32
- left: 1px;
31
+ inset-inline-start: 1px;
33
32
  width: 1.125rem;
34
33
  height: 1.125rem;
35
34
  border-radius: 50%;
36
35
  background-color: var(--vp-c-neutral-inverse);
37
36
  box-shadow: var(--vp-shadow-1);
38
- transition: transform 0.25s;
37
+ transition: transform 0.25s !important;
39
38
  }
40
39
 
41
40
  .icon {
@@ -50,7 +49,7 @@
50
49
  .icon :deep([class^='vpi-']) {
51
50
  position: absolute;
52
51
  top: 0.1875rem;
53
- left: 0.1875rem;
52
+ inset-inline-start: 0.1875rem;
54
53
  width: 0.75rem;
55
54
  height: 0.75rem;
56
55
  color: var(--vp-c-text-2);
@@ -58,6 +57,6 @@
58
57
 
59
58
  .dark .icon :deep([class^='vpi-']) {
60
59
  color: var(--vp-c-text-1);
61
- transition: opacity 0.25s;
60
+ transition: opacity 0.25s !important;
62
61
  }
63
62
  </style>
@@ -44,7 +44,6 @@ watchPostEffect(() => {
44
44
  }
45
45
 
46
46
  .dark .VPSwitchAppearance :deep(.check) {
47
- /*rtl:ignore*/
48
- transform: translateX(1.125rem);
47
+ transform: translateX(calc(1.125rem * var(--vp-direction-multiplier)));
49
48
  }
50
49
  </style>