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
@@ -114,7 +114,7 @@ function resolveSiteDataByRoute(siteData, relativePath, filePath) {
114
114
  function createTitle(siteData, pageData) {
115
115
  const title = pageData.title || siteData.title;
116
116
  const template = pageData.titleTemplate ?? siteData.titleTemplate;
117
- if (typeof template === "string" && template.includes(":title")) return template.replace(/:title/g, title);
117
+ if (typeof template === "string" && template.includes(":title")) return template.replace(/:title/g, () => title);
118
118
  const templateString = createTitleTemplate(siteData.title, template);
119
119
  if (title === templateString.slice(3)) return title;
120
120
  return `${title}${templateString}`;
@@ -153,6 +153,16 @@ function sanitizeFileName(name) {
153
153
  const driveLetter = match ? match[0] : "";
154
154
  return driveLetter + name.slice(driveLetter.length).replace(INVALID_CHAR_REGEX, "_").replace(/(^|\/)_+(?=[^/]*$)/, "$1");
155
155
  }
156
+ /**
157
+ * Output path of a page's client chunk relative to `assetsDir`, from its hash
158
+ * map entry. The entry is the chunk's hash, prefixed with the subdirectory the
159
+ * build put the chunk in when `assetsShards` is set (`<shard>/<hash>`), so the
160
+ * client never has to guess the layout.
161
+ */
162
+ function pageChunkPath(pageName, hashEntry, ext = ".js") {
163
+ const dir = hashEntry.lastIndexOf("/") + 1;
164
+ return `${hashEntry.slice(0, dir)}${pageName}.${hashEntry.slice(dir)}${ext}`;
165
+ }
156
166
  function slash(p) {
157
167
  return p.replace(/\\/g, "/");
158
168
  }
@@ -164,6 +174,29 @@ function treatAsHtml(filename) {
164
174
  const ext = filename.split(".").pop();
165
175
  return ext == null || !KNOWN_EXTENSIONS.has(ext.toLowerCase());
166
176
  }
177
+ const SPACE_OR_PUNCTUATION_RE = /[\n\r\p{Z}\p{P}]+/u;
178
+ const UNSPACED_RUN_RE = /[\p{scx=Han}\p{scx=Hiragana}\p{scx=Katakana}]+|[^\p{scx=Han}\p{scx=Hiragana}\p{scx=Katakana}]+/gu;
179
+ const UNSPACED_START_RE = /^[\p{scx=Han}\p{scx=Hiragana}\p{scx=Katakana}]/u;
180
+ let segmenter;
181
+ /**
182
+ * Default `tokenize` of the local search. It splits on spaces and punctuation
183
+ * like MiniSearch does, and additionally segments the runs of Chinese or
184
+ * Japanese characters inside those words, as they are not separated by spaces.
185
+ * Everything else is kept as MiniSearch would.
186
+ *
187
+ * It is used both when building the index and when searching in the browser.
188
+ * A browser without `Intl.Segmenter` (e.g. Firefox < 125) falls back to the
189
+ * plain split, which can't match multi-word queries against an index that was
190
+ * built with segmentation.
191
+ *
192
+ * @internal
193
+ */
194
+ function tokenizeSearchText(text) {
195
+ const terms = text.split(SPACE_OR_PUNCTUATION_RE);
196
+ if (typeof Intl.Segmenter !== "function") return terms;
197
+ segmenter ??= new Intl.Segmenter(void 0, { granularity: "word" });
198
+ return terms.flatMap((term) => term.match(UNSPACED_RUN_RE)?.flatMap((run) => UNSPACED_START_RE.test(run) ? Array.from(segmenter.segment(run), (part) => part.segment) : run) ?? term);
199
+ }
167
200
  function escapeRegExp(str) {
168
201
  return str.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
169
202
  }
@@ -240,4 +273,4 @@ function isShell(lang) {
240
273
  return shellLangs.includes(lang);
241
274
  }
242
275
  //#endregion
243
- export { APPEARANCE_KEY, EXTERNAL_URL_RE, RELATIVE_BASE_SENTINEL, VP_SOURCE_KEY, createTitle, escapeHtml, escapeRegExp, getLocaleForPath, inBrowser, isActive, isExternal, isObject, isRelativeBase, isShell, joinPath, mergeHead, normalize, notFoundPageData, parseIconName, relativePathToRoot, resolveSiteDataByRoute, sanitizeFileName, slash, stackView, treatAsHtml };
276
+ export { APPEARANCE_KEY, EXTERNAL_URL_RE, RELATIVE_BASE_SENTINEL, VP_SOURCE_KEY, createTitle, escapeHtml, escapeRegExp, getLocaleForPath, inBrowser, isActive, isExternal, isObject, isRelativeBase, isShell, joinPath, mergeHead, normalize, notFoundPageData, pageChunkPath, parseIconName, relativePathToRoot, resolveSiteDataByRoute, sanitizeFileName, slash, stackView, tokenizeSearchText, treatAsHtml };
@@ -9,12 +9,14 @@ const { currentLang } = useLangs();
9
9
  <template>
10
10
  <div class="NotFound">
11
11
  <p class="code">{{ theme.notFound?.code ?? "404" }}</p>
12
- <h1 class="title">{{ theme.notFound?.title ?? "PAGE NOT FOUND" }}</h1>
12
+ <h1 class="title">
13
+ <bdi>{{ theme.notFound?.title ?? "PAGE NOT FOUND" }}</bdi>
14
+ </h1>
13
15
  <div class="divider" />
14
16
  <blockquote class="quote">
15
- {{
17
+ <bdi>{{
16
18
  theme.notFound?.quote ?? "But if you don't change your direction, and if you keep looking, you may end up where you are heading."
17
- }}
19
+ }}</bdi>
18
20
  </blockquote>
19
21
 
20
22
  <div class="action">
@@ -23,7 +25,7 @@ const { currentLang } = useLangs();
23
25
  :href="withBase(theme.notFound?.link ?? currentLang.link)"
24
26
  :aria-label="theme.notFound?.linkLabel ?? 'go to home'"
25
27
  >
26
- {{ theme.notFound?.linkText ?? "Take me home" }}
28
+ <bdi>{{ theme.notFound?.linkText ?? "Take me home" }}</bdi>
27
29
  </a>
28
30
  </div>
29
31
  </div>
@@ -14,12 +14,7 @@ defineProps({ show: {
14
14
  <style scoped>
15
15
  .VPBackdrop {
16
16
  position: fixed;
17
- top: 0;
18
- /*rtl:ignore*/
19
- right: 0;
20
- bottom: 0;
21
- /*rtl:ignore*/
22
- left: 0;
17
+ inset: 0;
23
18
  z-index: var(--vp-z-index-backdrop);
24
19
  background: var(--vp-backdrop-bg-color);
25
20
  transition: opacity 0.5s;
@@ -13,7 +13,7 @@ defineProps({
13
13
  </script>
14
14
 
15
15
  <template>
16
- <span class="VPBadge" :class="type">
16
+ <span class="VPBadge" :class="type" dir="auto">
17
17
  <slot>{{ text }}</slot>
18
18
  </span>
19
19
  </template>
@@ -21,7 +21,7 @@ defineProps({
21
21
  <style>
22
22
  .VPBadge {
23
23
  display: inline-block;
24
- margin-left: 0.125rem;
24
+ margin-inline-start: 0.125rem;
25
25
  border: 1px solid transparent;
26
26
  border-radius: 0.75rem;
27
27
  padding: 0 0.625rem;
@@ -45,7 +45,8 @@ defineProps({
45
45
 
46
46
  .vp-doc h1 > .VPBadge,
47
47
  .vp-doc h2 > .VPBadge {
48
- margin: 0 0 0 0.125rem;
48
+ margin: 0;
49
+ margin-inline-start: 0.125rem;
49
50
  vertical-align: middle;
50
51
  }
51
52
 
@@ -7,13 +7,13 @@ interface Props {
7
7
  target?: string;
8
8
  rel?: string;
9
9
  }
10
- declare var __VLS_8: {};
10
+ declare var __VLS_7: {};
11
11
  type __VLS_Slots = {} & {
12
- default?: (props: typeof __VLS_8) => any;
12
+ default?: (props: typeof __VLS_7) => any;
13
13
  };
14
14
  declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
15
- size: "medium" | "big";
16
- theme: "brand" | "alt" | "sponsor";
15
+ size: "big" | "medium";
16
+ theme: "alt" | "brand" | "sponsor";
17
17
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
18
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
19
19
  declare const _default: typeof __VLS_export;
@@ -55,7 +55,9 @@ const component = computed(() => {
55
55
 
56
56
  <style scoped>
57
57
  .VPButton {
58
- display: inline-block;
58
+ display: inline-flex;
59
+ align-items: center;
60
+ justify-content: center;
59
61
  border: 1px solid transparent;
60
62
  text-align: center;
61
63
  font-weight: 600;
@@ -69,16 +71,16 @@ const component = computed(() => {
69
71
  }
70
72
 
71
73
  .VPButton.medium {
74
+ height: 2.5rem;
72
75
  border-radius: 1.25rem;
73
76
  padding: 0 1.25rem;
74
- line-height: 2.7142857;
75
77
  font-size: 0.875rem;
76
78
  }
77
79
 
78
80
  .VPButton.big {
81
+ height: 3rem;
79
82
  border-radius: 1.5rem;
80
83
  padding: 0 1.5rem;
81
- line-height: 2.875;
82
84
  font-size: 1rem;
83
85
  }
84
86
 
@@ -86,14 +86,14 @@ function isRegistered(component) {
86
86
 
87
87
  .VPContent.has-sidebar {
88
88
  margin: var(--vp-layout-top-height, 0px) 0 0;
89
- padding-left: var(--vp-sidebar-width);
89
+ padding-inline-start: var(--vp-sidebar-width);
90
90
  }
91
91
  }
92
92
 
93
93
  @media (min-width: 90rem) {
94
94
  .VPContent.has-sidebar {
95
- padding-right: calc((100% - var(--vp-layout-max-width)) / 2);
96
- padding-left: calc((100% - var(--vp-layout-max-width)) / 2 + var(--vp-sidebar-width));
95
+ padding-inline-end: calc((100% - var(--vp-layout-max-width)) / 2);
96
+ padding-inline-start: calc((100% - var(--vp-layout-max-width)) / 2 + var(--vp-sidebar-width));
97
97
  }
98
98
  }
99
99
  </style>
@@ -123,15 +123,15 @@ const pageName = computed(() => {
123
123
  display: none;
124
124
  order: 2;
125
125
  flex-grow: 1;
126
- padding-left: 2rem;
126
+ padding-inline-start: 2rem;
127
127
  width: 100%;
128
128
  max-width: 16rem;
129
129
  }
130
130
 
131
131
  .left-aside {
132
132
  order: 1;
133
- padding-left: unset;
134
- padding-right: 2rem;
133
+ padding-inline-start: unset;
134
+ padding-inline-end: 2rem;
135
135
  }
136
136
 
137
137
  .aside-container {
@@ -142,6 +142,7 @@ const pageName = computed(() => {
142
142
  height: 100vh;
143
143
  overflow-x: hidden;
144
144
  overflow-y: auto;
145
+ overscroll-behavior: contain;
145
146
  scrollbar-width: none;
146
147
  }
147
148
 
@@ -46,8 +46,8 @@ useActiveAnchor(container, marker);
46
46
 
47
47
  .content {
48
48
  position: relative;
49
- border-left: 1px solid var(--vp-c-divider);
50
- padding-left: 1rem;
49
+ border-inline-start: 1px solid var(--vp-c-divider);
50
+ padding-inline-start: 1rem;
51
51
  font-size: 0.8125rem;
52
52
  font-weight: 500;
53
53
  }
@@ -55,7 +55,7 @@ useActiveAnchor(container, marker);
55
55
  .outline-marker {
56
56
  position: absolute;
57
57
  top: 2rem;
58
- left: -1px;
58
+ inset-inline-start: -1px;
59
59
  z-index: 0;
60
60
  opacity: 0;
61
61
  width: 2px;
@@ -49,7 +49,7 @@ const showFooter = computed(() => hasEditLink.value || hasLastUpdated.value || c
49
49
  class="desc"
50
50
  v-html="theme.docFooter?.prev || 'Previous page'"
51
51
  ></span>
52
- <span class="title" v-html="control.prev.text"></span>
52
+ <span class="title"><bdi v-html="control.prev.text" /></span>
53
53
  </VPLink>
54
54
  </div>
55
55
  <div class="pager">
@@ -64,7 +64,7 @@ const showFooter = computed(() => hasEditLink.value || hasLastUpdated.value || c
64
64
  class="desc"
65
65
  v-html="theme.docFooter?.next || 'Next page'"
66
66
  ></span>
67
- <span class="title" v-html="control.next.text"></span>
67
+ <span class="title"><bdi v-html="control.next.text" /></span>
68
68
  </VPLink>
69
69
  </div>
70
70
  </nav>
@@ -105,7 +105,7 @@ const showFooter = computed(() => hasEditLink.value || hasLastUpdated.value || c
105
105
  }
106
106
 
107
107
  .edit-link-icon {
108
- margin-right: 0.5rem;
108
+ margin-inline-end: 0.5rem;
109
109
  }
110
110
 
111
111
  .prev-next {
@@ -137,8 +137,8 @@ const showFooter = computed(() => hasEditLink.value || hasLastUpdated.value || c
137
137
  }
138
138
 
139
139
  .pager-link.next {
140
- margin-left: auto;
141
- text-align: right;
140
+ margin-inline-start: auto;
141
+ text-align: end;
142
142
  }
143
143
 
144
144
  .desc {
@@ -28,8 +28,8 @@ onMounted(() => {
28
28
 
29
29
  <template>
30
30
  <p class="VPLastUpdated">
31
- {{ theme.lastUpdated?.text || "Last updated" }}:
32
- <time ref="timeRef" :datetime="isoDatetime">{{ datetime }}</time>
31
+ <bdi>{{ theme.lastUpdated?.text || "Last updated" }}:</bdi>
32
+ <time ref="timeRef" dir="auto" :datetime="isoDatetime">{{ datetime }}</time>
33
33
  </p>
34
34
  </template>
35
35
 
@@ -15,7 +15,7 @@ defineProps({
15
15
  <ul class="VPDocOutlineItem" :class="root ? 'root' : 'nested'">
16
16
  <li v-for="{ children, link, title } in headers">
17
17
  <a class="outline-link" :href="link" :title>
18
- {{ title }}
18
+ <bdi>{{ title }}</bdi>
19
19
  </a>
20
20
  <template v-if="children?.length">
21
21
  <VPDocOutlineItem :headers="children" />
@@ -31,8 +31,7 @@ defineProps({
31
31
  }
32
32
 
33
33
  .nested {
34
- padding-right: 1rem;
35
- padding-left: 1rem;
34
+ padding-inline: 1rem;
36
35
  }
37
36
 
38
37
  .outline-link {
@@ -56,6 +55,6 @@ defineProps({
56
55
  }
57
56
 
58
57
  .outline-link.nested {
59
- padding-left: 0.8125rem;
58
+ padding-inline-start: 0.8125rem;
60
59
  }
61
60
  </style>
@@ -59,14 +59,14 @@ defineProps({
59
59
  :width="icon.width || 48"
60
60
  />
61
61
  <div v-else-if="icon" class="icon" v-html="icon"></div>
62
- <h2 class="title" v-html="title"></h2>
62
+ <h2 class="title"><bdi v-html="title" /></h2>
63
63
  <ul v-if="Array.isArray(details)" class="details">
64
- <li v-for="item in details" :key="item" v-html="item"></li>
64
+ <li v-for="item in details" :key="item"><bdi v-html="item" /></li>
65
65
  </ul>
66
- <p v-else-if="details" class="details" v-html="details"></p>
66
+ <p v-else-if="details" class="details"><bdi v-html="details" /></p>
67
67
  <div v-if="linkText" class="link-text">
68
68
  <p class="link-text-value">
69
- {{ linkText }} <span class="vpi-arrow-right link-text-icon" />
69
+ <bdi>{{ linkText }}</bdi> <span class="vpi-arrow-right link-text-icon" />
70
70
  </p>
71
71
  </div>
72
72
  </article>
@@ -128,7 +128,7 @@ defineProps({
128
128
 
129
129
  ul.details {
130
130
  list-style-type: disc;
131
- padding-left: 0.875rem;
131
+ padding-inline-start: 0.875rem;
132
132
  }
133
133
 
134
134
  .link-text {
@@ -144,6 +144,6 @@ ul.details {
144
144
  }
145
145
 
146
146
  .link-text-icon {
147
- margin-left: 0.375rem;
147
+ margin-inline-start: 0.375rem;
148
148
  }
149
149
  </style>
@@ -102,11 +102,11 @@ useEventListener("pointerdown", (e) => {
102
102
  >
103
103
  <span v-if="button || icon" class="text">
104
104
  <span v-if="icon" :class="[icon, 'option-icon']" aria-hidden="true" />
105
- <span v-if="button" v-html="button"></span>
105
+ <span v-if="button" dir="auto" v-html="button"></span>
106
106
  <span class="vpi-chevron-down text-icon" aria-hidden="true" />
107
107
  </span>
108
108
 
109
- <span v-else class="vpi-more-horizontal icon" aria-hidden="true" />
109
+ <span v-else class="vpi-ellipsis icon" aria-hidden="true" />
110
110
  </button>
111
111
 
112
112
  <div ref="menuEl" class="menu" :id="menuId" @pointerleave="onPointerLeave">
@@ -168,7 +168,7 @@ useEventListener("pointerdown", (e) => {
168
168
  .text {
169
169
  display: flex;
170
170
  align-items: center;
171
- line-height: var(--vp-nav-height);
171
+ line-height: 1.5;
172
172
  font-size: 0.875rem;
173
173
  font-weight: 500;
174
174
  color: var(--vp-c-text-1);
@@ -180,7 +180,7 @@ useEventListener("pointerdown", (e) => {
180
180
  }
181
181
 
182
182
  .text-icon {
183
- margin-left: 0.25rem;
183
+ margin-inline-start: 0.25rem;
184
184
  font-size: 0.875rem;
185
185
  }
186
186
 
@@ -192,7 +192,7 @@ useEventListener("pointerdown", (e) => {
192
192
  .menu {
193
193
  position: absolute;
194
194
  top: calc(var(--vp-nav-height) / 2 + 1.25rem);
195
- right: 0;
195
+ inset-inline-end: 0;
196
196
  opacity: 0;
197
197
  visibility: hidden;
198
198
  transition: opacity 0.25s, visibility 0.25s;
@@ -12,16 +12,12 @@ const { hasSidebar } = useLayout();
12
12
  :class="{ 'has-sidebar': hasSidebar }"
13
13
  >
14
14
  <div class="container">
15
- <p
16
- v-if="theme.footer.message"
17
- class="message"
18
- v-html="theme.footer.message"
19
- ></p>
20
- <p
21
- v-if="theme.footer.copyright"
22
- class="copyright"
23
- v-html="theme.footer.copyright"
24
- ></p>
15
+ <p v-if="theme.footer.message" class="message">
16
+ <bdi v-html="theme.footer.message" />
17
+ </p>
18
+ <p v-if="theme.footer.copyright" class="copyright">
19
+ <bdi v-html="theme.footer.copyright" />
20
+ </p>
25
21
  </div>
26
22
  </footer>
27
23
  </template>
@@ -13,7 +13,7 @@ type __VLS_Props = {
13
13
  image?: DefaultTheme.ThemeableImage;
14
14
  actions?: HeroAction[];
15
15
  };
16
- declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {}, __VLS_7: {}, __VLS_14: {}, __VLS_16: {};
16
+ declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {}, __VLS_7: {}, __VLS_15: {}, __VLS_17: {};
17
17
  type __VLS_Slots = {} & {
18
18
  'home-hero-info-before'?: (props: typeof __VLS_1) => any;
19
19
  } & {
@@ -23,9 +23,9 @@ type __VLS_Slots = {} & {
23
23
  } & {
24
24
  'home-hero-actions-before-actions'?: (props: typeof __VLS_7) => any;
25
25
  } & {
26
- 'home-hero-actions-after'?: (props: typeof __VLS_14) => any;
26
+ 'home-hero-actions-after'?: (props: typeof __VLS_15) => any;
27
27
  } & {
28
- 'home-hero-image'?: (props: typeof __VLS_16) => any;
28
+ 'home-hero-image'?: (props: typeof __VLS_17) => any;
29
29
  };
30
30
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
31
31
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -35,10 +35,10 @@ const { heroImageSlotExists } = inject(layoutInfoInjectionKey, { heroImageSlotEx
35
35
  <slot name="home-hero-info-before" />
36
36
  <slot name="home-hero-info">
37
37
  <h1 class="heading">
38
- <span v-if="name" v-html="name" class="name clip"></span>
39
- <span v-if="text" v-html="text" class="text"></span>
38
+ <span v-if="name" dir="auto" v-html="name" class="name clip"></span>
39
+ <span v-if="text" dir="auto" v-html="text" class="text"></span>
40
40
  </h1>
41
- <p v-if="tagline" v-html="tagline" class="tagline"></p>
41
+ <p v-if="tagline" class="tagline"><bdi v-html="tagline" /></p>
42
42
  </slot>
43
43
  <slot name="home-hero-info-after" />
44
44
 
@@ -116,7 +116,7 @@ const { heroImageSlotExists } = inject(layoutInfoInjectionKey, { heroImageSlotEx
116
116
 
117
117
  @media (min-width: 60rem) {
118
118
  .VPHero.has-image .container {
119
- text-align: left;
119
+ text-align: start;
120
120
  }
121
121
  }
122
122
 
@@ -293,22 +293,20 @@ const { heroImageSlotExists } = inject(layoutInfoInjectionKey, { heroImageSlotEx
293
293
  align-items: center;
294
294
  width: 100%;
295
295
  height: 100%;
296
- /*rtl:ignore*/
297
- transform: translate(-2rem, -2rem);
296
+ transform: translate(calc(-2rem * var(--vp-direction-multiplier)), -2rem);
298
297
  }
299
298
  }
300
299
 
301
300
  .image-bg {
302
301
  position: absolute;
303
302
  top: 50%;
304
- /*rtl:ignore*/
305
303
  left: 50%;
306
304
  border-radius: 50%;
307
305
  width: 12rem;
308
306
  height: 12rem;
309
307
  background-image: var(--vp-home-hero-image-background-image);
308
+ will-change: filter;
310
309
  filter: var(--vp-home-hero-image-filter);
311
- /*rtl:ignore*/
312
310
  transform: translate(-50%, -50%);
313
311
  }
314
312
 
@@ -329,14 +327,12 @@ const { heroImageSlotExists } = inject(layoutInfoInjectionKey, { heroImageSlotEx
329
327
  :deep(.image-src) {
330
328
  position: absolute;
331
329
  top: 50%;
332
- /*rtl:ignore*/
333
330
  left: 50%;
334
331
  max-width: 12rem;
335
332
  max-height: 12rem;
336
333
  width: 100%;
337
334
  height: 100%;
338
335
  object-fit: contain;
339
- /*rtl:ignore*/
340
336
  transform: translate(-50%, -50%);
341
337
  }
342
338
 
@@ -28,8 +28,7 @@
28
28
  /* stretch to full viewport width, overflow is clipped by .VPHome */
29
29
  .vp-doc :deep(.VPHomeSponsors),
30
30
  .vp-doc :deep(.VPTeamPage) {
31
- margin-left: calc(50% - 50vw);
32
- margin-right: calc(50% - 50vw);
31
+ margin-inline: calc(50% - 50vw);
33
32
  }
34
33
 
35
34
  .vp-doc :deep(.VPTeamPage a) {
@@ -1,16 +1,16 @@
1
- declare var __VLS_9: {}, __VLS_12: {}, __VLS_15: {}, __VLS_18: {}, __VLS_21: {}, __VLS_24: {};
1
+ declare var __VLS_8: {}, __VLS_11: {}, __VLS_14: {}, __VLS_17: {}, __VLS_20: {}, __VLS_23: {};
2
2
  type __VLS_Slots = {} & {
3
- 'home-hero-info-before'?: (props: typeof __VLS_9) => any;
3
+ 'home-hero-info-before'?: (props: typeof __VLS_8) => any;
4
4
  } & {
5
- 'home-hero-info'?: (props: typeof __VLS_12) => any;
5
+ 'home-hero-info'?: (props: typeof __VLS_11) => any;
6
6
  } & {
7
- 'home-hero-info-after'?: (props: typeof __VLS_15) => any;
7
+ 'home-hero-info-after'?: (props: typeof __VLS_14) => any;
8
8
  } & {
9
- 'home-hero-actions-after'?: (props: typeof __VLS_18) => any;
9
+ 'home-hero-actions-after'?: (props: typeof __VLS_17) => any;
10
10
  } & {
11
- 'home-hero-actions-before-actions'?: (props: typeof __VLS_21) => any;
11
+ 'home-hero-actions-before-actions'?: (props: typeof __VLS_20) => any;
12
12
  } & {
13
- 'home-hero-image'?: (props: typeof __VLS_24) => any;
13
+ 'home-hero-image'?: (props: typeof __VLS_23) => any;
14
14
  };
15
15
  declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
16
16
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -29,13 +29,13 @@ defineOptions({ inheritAttrs: false });
29
29
  <VPImage
30
30
  class="dark"
31
31
  :image="image.dark"
32
- :alt="image.alt"
32
+ :alt="alt ?? image.alt"
33
33
  v-bind="$attrs"
34
34
  />
35
35
  <VPImage
36
36
  class="light"
37
37
  :image="image.light"
38
- :alt="image.alt"
38
+ :alt="alt ?? image.alt"
39
39
  v-bind="$attrs"
40
40
  />
41
41
  </template>
@@ -6,9 +6,9 @@ type __VLS_Props = {
6
6
  target?: string;
7
7
  rel?: string;
8
8
  };
9
- declare var __VLS_8: {};
9
+ declare var __VLS_7: {};
10
10
  type __VLS_Slots = {} & {
11
- default?: (props: typeof __VLS_8) => any;
11
+ default?: (props: typeof __VLS_7) => any;
12
12
  };
13
13
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
14
14
  external: boolean;
@@ -48,3 +48,9 @@ const isExternal = computed(() => isLinkExternal(props.href, props.target, props
48
48
  <slot />
49
49
  </component>
50
50
  </template>
51
+
52
+ <style scoped>
53
+ .vp-external-link-icon::after {
54
+ color: var(--vp-c-text-3);
55
+ }
56
+ </style>
@@ -44,7 +44,7 @@ const isScrolled = computed(() => y.value >= navHeight.value);
44
44
  aria-controls="VPSidebarNav"
45
45
  @click="$emit('open-menu')"
46
46
  >
47
- <span class="vpi-align-left menu-icon" aria-hidden="true"></span>
47
+ <span class="vpi-text-align-start menu-icon" aria-hidden="true"></span>
48
48
  <span class="menu-text">
49
49
  {{ theme.sidebarMenuLabel || "Menu" }}
50
50
  </span>
@@ -59,8 +59,7 @@ const isScrolled = computed(() => y.value >= navHeight.value);
59
59
  .VPLocalNav {
60
60
  position: sticky;
61
61
  top: 0;
62
- /*rtl:ignore*/
63
- left: 0;
62
+ inset-inline-start: 0;
64
63
  z-index: var(--vp-z-index-local-nav);
65
64
  border-bottom: 1px solid var(--vp-local-nav-divider-color);
66
65
  padding-top: var(--vp-layout-top-height, 0px);
@@ -95,7 +94,7 @@ const isScrolled = computed(() => y.value >= navHeight.value);
95
94
  }
96
95
 
97
96
  .VPLocalNav.has-sidebar {
98
- padding-left: var(--vp-sidebar-width);
97
+ padding-inline-start: var(--vp-sidebar-width);
99
98
  }
100
99
 
101
100
  .VPLocalNav.empty {
@@ -137,7 +136,7 @@ const isScrolled = computed(() => y.value >= navHeight.value);
137
136
  }
138
137
 
139
138
  .menu-icon {
140
- margin-right: 0.5rem;
139
+ margin-inline-end: 0.5rem;
141
140
  font-size: 0.875rem;
142
141
  }
143
142