@vuepress/theme-default 2.0.0-beta.4 → 2.0.0-beta.40

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 (132) hide show
  1. package/lib/{clientAppEnhance.d.ts → client/clientAppEnhance.d.ts} +0 -0
  2. package/lib/client/clientAppEnhance.js +34 -0
  3. package/lib/{clientAppSetup.d.ts → client/clientAppSetup.d.ts} +0 -0
  4. package/lib/client/clientAppSetup.js +6 -0
  5. package/lib/client/components/AutoLink.vue +113 -0
  6. package/lib/client/components/DropdownTransition.vue +21 -0
  7. package/lib/client/components/Home.vue +15 -0
  8. package/lib/client/components/HomeContent.vue +5 -0
  9. package/lib/client/components/HomeFeatures.vue +23 -0
  10. package/lib/client/components/HomeFooter.vue +17 -0
  11. package/lib/client/components/HomeHero.vue +97 -0
  12. package/lib/client/components/Navbar.vue +76 -0
  13. package/lib/client/components/NavbarBrand.vue +55 -0
  14. package/lib/client/components/NavbarDropdown.vue +126 -0
  15. package/lib/{components/NavbarLinks.vue → client/components/NavbarItems.vue} +27 -47
  16. package/lib/{components → client/components}/Page.vue +5 -15
  17. package/lib/{components → client/components}/PageMeta.vue +48 -59
  18. package/lib/{components → client/components}/PageNav.vue +43 -56
  19. package/lib/client/components/Sidebar.vue +13 -0
  20. package/lib/client/components/SidebarItem.vue +80 -0
  21. package/lib/client/components/SidebarItems.vue +54 -0
  22. package/lib/client/components/ToggleDarkModeButton.vue +57 -0
  23. package/lib/client/components/ToggleSidebarButton.vue +24 -0
  24. package/lib/client/components/global/Badge.vue +31 -0
  25. package/lib/client/components/global/CodeGroup.d.ts +5 -0
  26. package/lib/client/components/global/CodeGroup.js +107 -0
  27. package/lib/client/components/global/CodeGroupItem.vue +31 -0
  28. package/lib/{composables → client/composables}/index.d.ts +2 -0
  29. package/lib/{composables → client/composables}/index.js +2 -0
  30. package/lib/client/composables/useDarkMode.d.ts +12 -0
  31. package/lib/client/composables/useDarkMode.js +57 -0
  32. package/lib/{composables → client/composables}/useNavLink.d.ts +6 -1
  33. package/lib/{composables → client/composables}/useNavLink.js +0 -0
  34. package/lib/{composables → client/composables}/useResolveRouteWithRedirect.d.ts +1 -1
  35. package/lib/{composables → client/composables}/useResolveRouteWithRedirect.js +1 -1
  36. package/lib/client/composables/useScrollPromise.d.ts +6 -0
  37. package/lib/client/composables/useScrollPromise.js +14 -0
  38. package/lib/{composables → client/composables}/useSidebarItems.d.ts +12 -7
  39. package/lib/client/composables/useSidebarItems.js +120 -0
  40. package/lib/{composables → client/composables}/useThemeData.d.ts +2 -2
  41. package/lib/{composables → client/composables}/useThemeData.js +1 -1
  42. package/lib/client/index.d.ts +4 -0
  43. package/lib/client/index.js +2 -0
  44. package/lib/client/layouts/404.vue +25 -0
  45. package/lib/client/layouts/Layout.vue +128 -0
  46. package/lib/{shim.d.ts → client/shim.d.ts} +0 -0
  47. package/lib/{styles/_wrapper.scss → client/styles/_mixins.scss} +7 -2
  48. package/lib/client/styles/_variables.scss +11 -0
  49. package/lib/{styles → client/styles}/arrow.scss +4 -6
  50. package/lib/{styles → client/styles}/badge.scss +9 -11
  51. package/lib/{styles → client/styles}/code-group.scss +9 -2
  52. package/lib/{styles → client/styles}/code.scss +21 -33
  53. package/lib/client/styles/custom-container.scss +88 -0
  54. package/lib/{styles → client/styles}/home.scss +27 -24
  55. package/lib/{styles → client/styles}/index.scss +4 -4
  56. package/lib/{styles → client/styles}/layout.scss +52 -35
  57. package/lib/{styles/dropdown.scss → client/styles/navbar-dropdown.scss} +37 -47
  58. package/lib/client/styles/navbar.scss +177 -0
  59. package/lib/client/styles/normalize.scss +172 -0
  60. package/lib/{styles → client/styles}/page.scss +15 -8
  61. package/lib/client/styles/sidebar.scss +134 -0
  62. package/lib/{styles → client/styles}/toc.scss +0 -0
  63. package/lib/client/styles/transitions.scss +22 -0
  64. package/lib/client/styles/vars-dark.scss +46 -0
  65. package/lib/client/styles/vars.scss +133 -0
  66. package/lib/{utils → client/utils}/index.d.ts +1 -0
  67. package/lib/{utils → client/utils}/index.js +1 -0
  68. package/lib/client/utils/isActiveSidebarItem.d.ts +3 -0
  69. package/lib/client/utils/isActiveSidebarItem.js +20 -0
  70. package/lib/{utils → client/utils}/resolveEditLink.d.ts +1 -1
  71. package/lib/{utils → client/utils}/resolveEditLink.js +14 -8
  72. package/lib/client/utils/resolveRepoType.d.ts +2 -0
  73. package/lib/{utils → client/utils}/resolveRepoType.js +3 -1
  74. package/lib/node/defaultTheme.d.ts +10 -0
  75. package/lib/node/defaultTheme.js +122 -0
  76. package/lib/node/index.d.ts +5 -5
  77. package/lib/node/index.js +10 -6
  78. package/lib/node/utils/assignDefaultLocaleOptions.d.ts +7 -0
  79. package/lib/node/{assignDefaultLocaleOptions.js → utils/assignDefaultLocaleOptions.js} +11 -9
  80. package/lib/node/utils/index.d.ts +2 -0
  81. package/lib/node/utils/index.js +18 -0
  82. package/lib/node/utils/resolveContainerPluginOptions.d.ts +8 -0
  83. package/lib/node/utils/resolveContainerPluginOptions.js +22 -0
  84. package/lib/{types → shared}/index.d.ts +0 -0
  85. package/lib/{types → shared}/index.js +5 -1
  86. package/lib/{types → shared}/nav.d.ts +11 -12
  87. package/lib/{types → shared}/nav.js +0 -0
  88. package/lib/{types → shared}/options.d.ts +42 -10
  89. package/lib/{types → shared}/options.js +0 -0
  90. package/lib/{types → shared}/page.d.ts +13 -5
  91. package/lib/{types → shared}/page.js +0 -0
  92. package/package.json +38 -29
  93. package/templates/build.html +33 -0
  94. package/CHANGELOG.md +0 -353
  95. package/lib/clientAppEnhance.js +0 -23
  96. package/lib/clientAppSetup.js +0 -11
  97. package/lib/components/DropdownLink.vue +0 -141
  98. package/lib/components/DropdownTransition.vue +0 -34
  99. package/lib/components/Home.vue +0 -133
  100. package/lib/components/NavLink.vue +0 -105
  101. package/lib/components/Navbar.vue +0 -113
  102. package/lib/components/Sidebar.vue +0 -38
  103. package/lib/components/SidebarChild.d.ts +0 -6
  104. package/lib/components/SidebarChild.js +0 -83
  105. package/lib/components/ToggleSidebarButton.vue +0 -27
  106. package/lib/components/global/Badge.vue +0 -37
  107. package/lib/components/global/CodeGroup.vue +0 -85
  108. package/lib/components/global/CodeGroupItem.vue +0 -25
  109. package/lib/components/global/OutboundLink.vue +0 -30
  110. package/lib/composables/useSidebarItems.js +0 -108
  111. package/lib/index.d.ts +0 -6
  112. package/lib/index.js +0 -67
  113. package/lib/layouts/404.vue +0 -38
  114. package/lib/layouts/Layout.vue +0 -132
  115. package/lib/node/assignDefaultLocaleOptions.d.ts +0 -5
  116. package/lib/node/resolveActiveHeaderLinksPluginOptions.d.ts +0 -6
  117. package/lib/node/resolveActiveHeaderLinksPluginOptions.js +0 -16
  118. package/lib/node/resolveContainerPluginOptions.d.ts +0 -26
  119. package/lib/node/resolveContainerPluginOptions.js +0 -79
  120. package/lib/node/resolveGitPluginOptions.d.ts +0 -6
  121. package/lib/node/resolveGitPluginOptions.js +0 -22
  122. package/lib/node/resolveMediumZoomPluginOptions.d.ts +0 -6
  123. package/lib/node/resolveMediumZoomPluginOptions.js +0 -17
  124. package/lib/styles/_normalize.scss +0 -148
  125. package/lib/styles/_variables.scss +0 -34
  126. package/lib/styles/custom-container.scss +0 -78
  127. package/lib/styles/navbar.scss +0 -140
  128. package/lib/styles/plugins.scss +0 -18
  129. package/lib/styles/sidebar.scss +0 -147
  130. package/lib/styles/sr-only.scss +0 -12
  131. package/lib/styles/transitions.scss +0 -13
  132. package/lib/utils/resolveRepoType.d.ts +0 -2
package/CHANGELOG.md DELETED
@@ -1,353 +0,0 @@
1
- # Change Log
2
-
3
- All notable changes to this project will be documented in this file.
4
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
-
6
- # [2.0.0-beta.4](https://github.com/vuepress/vuepress-next/compare/v2.0.0-beta.3...v2.0.0-beta.4) (2021-03-20)
7
-
8
-
9
- ### Features
10
-
11
- * **theme-default:** use prismjs plugin ([f131de4](https://github.com/vuepress/vuepress-next/commit/f131de4783685dbabfde4e4966182d570224a246))
12
-
13
-
14
-
15
-
16
-
17
- # [2.0.0-beta.2](https://github.com/vuepress/vuepress-next/compare/v2.0.0-beta.1...v2.0.0-beta.2) (2021-03-14)
18
-
19
- **Note:** Version bump only for package @vuepress/theme-default
20
-
21
-
22
-
23
-
24
-
25
- # [2.0.0-beta.1](https://github.com/vuepress/vuepress-next/compare/v2.0.0-beta.0...v2.0.0-beta.1) (2021-03-13)
26
-
27
- **Note:** Version bump only for package @vuepress/theme-default
28
-
29
-
30
-
31
-
32
-
33
- # [2.0.0-beta.0](https://github.com/vuepress/vuepress-next/compare/v2.0.0-alpha.26...v2.0.0-beta.0) (2021-03-13)
34
-
35
-
36
- ### Features
37
-
38
- * **theme-default:** use sass as css pre-processor ([7eb1fd8](https://github.com/vuepress/vuepress-next/commit/7eb1fd8b8901d3f2c2335ad550b7d601a9354826))
39
-
40
-
41
- ### BREAKING CHANGES
42
-
43
- * **theme-default:** the palette system of default theme is migrated to sass
44
-
45
-
46
-
47
-
48
-
49
- # [2.0.0-alpha.26](https://github.com/vuepress/vuepress-next/compare/v2.0.0-alpha.25...v2.0.0-alpha.26) (2021-02-24)
50
-
51
-
52
- ### Features
53
-
54
- * **plugin-palette:** add palette plugin ([556a23c](https://github.com/vuepress/vuepress-next/commit/556a23cc9076f972deb3d5c0905441b63b700682))
55
-
56
-
57
- ### BREAKING CHANGES
58
-
59
- * **plugin-palette:** migrate `@vuepress/plugin-palette-stylus` to `@vuepress/plugin-palette`
60
-
61
-
62
-
63
-
64
-
65
- # [2.0.0-alpha.25](https://github.com/vuepress/vuepress-next/compare/v2.0.0-alpha.24...v2.0.0-alpha.25) (2021-02-20)
66
-
67
-
68
- ### Code Refactoring
69
-
70
- * **core:** remove theme data from site data ([187aef3](https://github.com/vuepress/vuepress-next/commit/187aef36607efc62d7b2d5c773553f89685cf64c))
71
-
72
-
73
- ### BREAKING CHANGES
74
-
75
- * **core:** `themeConfig` is not available in site data any more
76
-
77
-
78
-
79
-
80
-
81
- # [2.0.0-alpha.24](https://github.com/vuepress/vuepress-next/compare/v2.0.0-alpha.23...v2.0.0-alpha.24) (2021-02-13)
82
-
83
- **Note:** Version bump only for package @vuepress/theme-default
84
-
85
-
86
-
87
-
88
-
89
- # [2.0.0-alpha.23](https://github.com/vuepress/vuepress-next/compare/v2.0.0-alpha.22...v2.0.0-alpha.23) (2021-02-10)
90
-
91
- **Note:** Version bump only for package @vuepress/theme-default
92
-
93
-
94
-
95
-
96
-
97
- # [2.0.0-alpha.22](https://github.com/vuepress/vuepress-next/compare/v2.0.0-alpha.21...v2.0.0-alpha.22) (2021-02-10)
98
-
99
- **Note:** Version bump only for package @vuepress/theme-default
100
-
101
-
102
-
103
-
104
-
105
- # [2.0.0-alpha.21](https://github.com/vuepress/vuepress-next/compare/v2.0.0-alpha.20...v2.0.0-alpha.21) (2021-02-05)
106
-
107
-
108
- ### Features
109
-
110
- * **plugin-git:** collect page created time (close [#45](https://github.com/vuepress/vuepress-next/issues/45)) ([4045a8c](https://github.com/vuepress/vuepress-next/commit/4045a8c1ab591dbbb0303aa43c6d13bf248d995c))
111
-
112
-
113
-
114
-
115
-
116
- # [2.0.0-alpha.20](https://github.com/vuepress/vuepress-next/compare/v2.0.0-alpha.19...v2.0.0-alpha.20) (2021-02-04)
117
-
118
-
119
- ### Bug Fixes
120
-
121
- * **theme-default:** fix max width of navbar links wrapper ([846e60c](https://github.com/vuepress/vuepress-next/commit/846e60ca9f0137f54a96df7589df4ea4cd99f18a))
122
- * **theme-default:** remove extra rem in styles (close [#50](https://github.com/vuepress/vuepress-next/issues/50)) ([9b1b852](https://github.com/vuepress/vuepress-next/commit/9b1b852a9c11c28b43253f87b40362693ad2cb95))
123
-
124
-
125
-
126
-
127
-
128
- # [2.0.0-alpha.19](https://github.com/vuepress/vuepress-next/compare/v2.0.0-alpha.18...v2.0.0-alpha.19) (2021-01-24)
129
-
130
- **Note:** Version bump only for package @vuepress/theme-default
131
-
132
-
133
-
134
-
135
-
136
- # [2.0.0-alpha.18](https://github.com/vuepress/vuepress-next/compare/v2.0.0-alpha.17...v2.0.0-alpha.18) (2021-01-17)
137
-
138
-
139
- ### Bug Fixes
140
-
141
- * **theme-default:** fix homepage frontmatter type ([9cf2d28](https://github.com/vuepress/vuepress-next/commit/9cf2d288e115d335f6ff9f1a849a2ce82db799c9))
142
- * **theme-default:** fix sidebar config override ([2c2c280](https://github.com/vuepress/vuepress-next/commit/2c2c2801be716dfb102345090888fd1e22a0ac92))
143
- * **theme-default:** make sr-only tags unselectable ([0f6488e](https://github.com/vuepress/vuepress-next/commit/0f6488e3a00674c0670737c8831763db0a0ffa93))
144
-
145
-
146
- ### Features
147
-
148
- * **theme-default:** add code-group custom container ([d0a20aa](https://github.com/vuepress/vuepress-next/commit/d0a20aaacefc78708a4181c53704b28c60b520b4))
149
- * **theme-default:** add page transition ([845cc2c](https://github.com/vuepress/vuepress-next/commit/845cc2cb64223b856261bfc7b384dec6557456c4))
150
- * **theme-default:** allow html in homepage footer ([87e0821](https://github.com/vuepress/vuepress-next/commit/87e0821cee66c34141c1c3a62e8f5ecb6b21a957))
151
- * **theme-default:** optimize scrollbar style of sidebar ([27abb26](https://github.com/vuepress/vuepress-next/commit/27abb26509fa737ea27c3036bbe834d544e60298))
152
- * **theme-default:** support multiple action buttons in homepage (close [#23](https://github.com/vuepress/vuepress-next/issues/23)) ([bb44710](https://github.com/vuepress/vuepress-next/commit/bb44710624d2dbb65bd5f3da2eafabdec73ecadf))
153
-
154
-
155
-
156
-
157
-
158
- # [2.0.0-alpha.17](https://github.com/vuepress/vuepress-next/compare/v2.0.0-alpha.16...v2.0.0-alpha.17) (2021-01-13)
159
-
160
-
161
- ### Features
162
-
163
- * **theme-default:** allow dropdown subtitle as a link ([5fb6558](https://github.com/vuepress/vuepress-next/commit/5fb6558c926ddbb569f2b1901903cf9be4ad426e))
164
-
165
-
166
-
167
-
168
-
169
- # [2.0.0-alpha.16](https://github.com/vuepress/vuepress-next/compare/v2.0.0-alpha.15...v2.0.0-alpha.16) (2021-01-11)
170
-
171
- **Note:** Version bump only for package @vuepress/theme-default
172
-
173
-
174
-
175
-
176
-
177
- # [2.0.0-alpha.15](https://github.com/vuepress/vuepress-next/compare/v2.0.0-alpha.14...v2.0.0-alpha.15) (2021-01-04)
178
-
179
-
180
- ### Bug Fixes
181
-
182
- * **theme-default:** click to close dropdown that opened by tab and click ([88d1ae2](https://github.com/vuepress/vuepress-next/commit/88d1ae2bf6a92113ece8efa7ed57352b34ad18c4))
183
- * **theme-default:** fix font-size of dropdown group title ([563156c](https://github.com/vuepress/vuepress-next/commit/563156cb8458aeb71fadd882b08e03bee8ae5fba))
184
-
185
-
186
- ### Reverts
187
-
188
- * fix(theme-default): remove outline when focused on dropdown button ([66d3feb](https://github.com/vuepress/vuepress-next/commit/66d3feba01bf8a3ce751788a9a025dd69757efb4))
189
-
190
-
191
-
192
-
193
-
194
- # [2.0.0-alpha.14](https://github.com/vuepress/vuepress-next/compare/v2.0.0-alpha.13...v2.0.0-alpha.14) (2021-01-03)
195
-
196
-
197
- ### Bug Fixes
198
-
199
- * **theme-default:** assign default locale data ([d59f55d](https://github.com/vuepress/vuepress-next/commit/d59f55d355299a8edbdb43986cc7aaff5345ea1f))
200
- * **theme-default:** fix overflow style of code block line-numbers ([dd77cf4](https://github.com/vuepress/vuepress-next/commit/dd77cf448a28423ee23930b3d76601d8a5a6da18))
201
- * **theme-default:** remove outline when focused on dropdown button ([77842e3](https://github.com/vuepress/vuepress-next/commit/77842e396f1ebcc9e874af537a6520b818d028c2))
202
- * **theme-default:** set font-size explicitly for h4 to h6 ([a6459c0](https://github.com/vuepress/vuepress-next/commit/a6459c0eca38fbc19545442581ea6f0e73908b30))
203
-
204
-
205
-
206
-
207
-
208
- # [2.0.0-alpha.13](https://github.com/vuepress/vuepress-next/compare/v2.0.0-alpha.12...v2.0.0-alpha.13) (2020-12-23)
209
-
210
- **Note:** Version bump only for package @vuepress/theme-default
211
-
212
-
213
-
214
-
215
-
216
- # [2.0.0-alpha.12](https://github.com/vuepress/vuepress-next/compare/v2.0.0-alpha.11...v2.0.0-alpha.12) (2020-12-19)
217
-
218
-
219
- ### Bug Fixes
220
-
221
- * **theme-default:** fix navbar type to allow nested group ([9ef46ae](https://github.com/vuepress/vuepress-next/commit/9ef46ae3d41dc56c536d884665d28f71a7883a59))
222
-
223
-
224
-
225
-
226
-
227
- # [2.0.0-alpha.10](https://github.com/vuepress/vuepress-next/compare/v2.0.0-alpha.9...v2.0.0-alpha.10) (2020-12-17)
228
-
229
-
230
- ### Bug Fixes
231
-
232
- * **theme-default:** fix content headers styles ([7ead1f6](https://github.com/vuepress/vuepress-next/commit/7ead1f60db5135ed7d1a428cb23fecbbc11b223e))
233
-
234
-
235
-
236
-
237
-
238
- # [2.0.0-alpha.9](https://github.com/vuepress/vuepress-next/compare/v2.0.0-alpha.8...v2.0.0-alpha.9) (2020-12-16)
239
-
240
- **Note:** Version bump only for package @vuepress/theme-default
241
-
242
-
243
-
244
-
245
-
246
- # [2.0.0-alpha.8](https://github.com/vuepress/vuepress-next/compare/v2.0.0-alpha.7...v2.0.0-alpha.8) (2020-12-11)
247
-
248
- **Note:** Version bump only for package @vuepress/theme-default
249
-
250
-
251
-
252
-
253
-
254
- # [2.0.0-alpha.7](https://github.com/vuepress/vuepress-next/compare/v2.0.0-alpha.6...v2.0.0-alpha.7) (2020-12-09)
255
-
256
- **Note:** Version bump only for package @vuepress/theme-default
257
-
258
-
259
-
260
-
261
-
262
- # [2.0.0-alpha.6](https://github.com/vuepress/vuepress-next/compare/v2.0.0-alpha.5...v2.0.0-alpha.6) (2020-12-09)
263
-
264
-
265
- ### Features
266
-
267
- * **theme-default:** use debug plugin ([e12b1f3](https://github.com/vuepress/vuepress-next/commit/e12b1f3293b5e8faebd93b444b71b6ac11b1029d))
268
-
269
-
270
-
271
-
272
-
273
- # [2.0.0-alpha.5](https://github.com/vuepress/vuepress-next/compare/v2.0.0-alpha.4...v2.0.0-alpha.5) (2020-12-03)
274
-
275
-
276
- ### Bug Fixes
277
-
278
- * **theme-default:** fix code related styles ([83d8a6f](https://github.com/vuepress/vuepress-next/commit/83d8a6f50537ed1b4c5e5c0f4221841999eeaeab))
279
- * **theme-default:** fix the condition of using router-link as nav-link ([8141f69](https://github.com/vuepress/vuepress-next/commit/8141f691495fc92ee19bd4d7bfd496c07112ac6a))
280
-
281
-
282
-
283
-
284
-
285
- # [2.0.0-alpha.4](https://github.com/vuepress/vuepress-next/compare/v2.0.0-alpha.3...v2.0.0-alpha.4) (2020-12-02)
286
-
287
- **Note:** Version bump only for package @vuepress/theme-default
288
-
289
-
290
-
291
-
292
-
293
- # [2.0.0-alpha.3](https://github.com/vuepress/vuepress-next/compare/v2.0.0-alpha.2...v2.0.0-alpha.3) (2020-12-01)
294
-
295
- **Note:** Version bump only for package @vuepress/theme-default
296
-
297
-
298
-
299
-
300
-
301
- # [2.0.0-alpha.2](https://github.com/vuepress/vuepress-next/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2020-12-01)
302
-
303
- **Note:** Version bump only for package @vuepress/theme-default
304
-
305
-
306
-
307
-
308
-
309
- # 2.0.0-alpha.1 (2020-12-01)
310
-
311
-
312
- ### Bug Fixes
313
-
314
- * **theme-default:** code-group nav padding ([1d46ce0](https://github.com/vuepress/vuepress-next/commit/1d46ce0b8117bcf55561f2537ec2982d5ca020e5))
315
- * **theme-default:** code-group style in mobile ([7e31bfd](https://github.com/vuepress/vuepress-next/commit/7e31bfd6851e5d631da8c09df1127e81eef0e6b8))
316
- * **theme-default:** do not use frontmatter title and desc as hero messages ([a3dde66](https://github.com/vuepress/vuepress-next/commit/a3dde66fd1474f99578115cc17a7605955c8b4b6))
317
- * **theme-default:** do not use injections inside computed ([04c7de5](https://github.com/vuepress/vuepress-next/commit/04c7de5ad312835a8306ec65aead882ea0c5aa6a))
318
- * **theme-default:** fallback home title and content to siteLocale ([ce34b4a](https://github.com/vuepress/vuepress-next/commit/ce34b4a4c7818d330712f82ac073ba90ce9774fc))
319
- * **theme-default:** fix type imports and usages ([f953295](https://github.com/vuepress/vuepress-next/commit/f95329512e5fee95839613f66e5011fedfcb548e))
320
- * **theme-default:** hide contributors if array is empty ([9e88016](https://github.com/vuepress/vuepress-next/commit/9e880165dd408883013af5f9f42cff78ee0574ed))
321
- * **theme-default:** remove default home config ([21ebb4c](https://github.com/vuepress/vuepress-next/commit/21ebb4cc293db6d38e146a87dfb532380cfa68c0))
322
- * **theme-default:** remove DropdownTransition temporarily ([efd6ded](https://github.com/vuepress/vuepress-next/commit/efd6dede9c6a785eb905015104b0f7b011f76456))
323
- * **theme-default:** resolve redirect with hash, query and params ([e7b7a91](https://github.com/vuepress/vuepress-next/commit/e7b7a9100282ceeef78a62bde15e31504a36f3dd))
324
- * **theme-default:** typo in template ([9a72112](https://github.com/vuepress/vuepress-next/commit/9a72112b8500f1d387cb7abb70630518e34815c9))
325
- * **theme-default:** unregister the built-in OutboundLink component to avoid warning ([9c781cc](https://github.com/vuepress/vuepress-next/commit/9c781cc5478eab28689a3a05024b7dbf3fa23722))
326
- * **theme-default:** wrap Content with div ([e578594](https://github.com/vuepress/vuepress-next/commit/e5785948d09f2711d797aaf91b0bd9ff6a70f95d))
327
- * **theme-default:** wrong default vertical-align of Badge ([0c5d2ef](https://github.com/vuepress/vuepress-next/commit/0c5d2efb97fc7b9bc66a8d7707954f3d63746ecb))
328
-
329
-
330
- ### Features
331
-
332
- * **theme-default:** 404 page with locales support ([08f6f9b](https://github.com/vuepress/vuepress-next/commit/08f6f9b7b0f248cd527cf1251033d8b4172961bd))
333
- * **theme-default:** add Page component ([d2eb868](https://github.com/vuepress/vuepress-next/commit/d2eb868ac92bcc895266facc70a145a7c7f65b3d))
334
- * **theme-default:** allow string type navbar and sidebar item ([82d7fa2](https://github.com/vuepress/vuepress-next/commit/82d7fa2e96174f7dce2a5e23c8d5d34889493ac4))
335
- * **theme-default:** default theme skeleton ([fb1d413](https://github.com/vuepress/vuepress-next/commit/fb1d413199835e6b6127d4e725a0ce84daa2737a))
336
- * **theme-default:** display json extension in code blocks ([d8795d4](https://github.com/vuepress/vuepress-next/commit/d8795d4b4dc2c5c7a8504e6b694714523bdca0a5))
337
- * **theme-default:** migrate Badge component ([b77bb29](https://github.com/vuepress/vuepress-next/commit/b77bb29e5832a56cc6860567b3d7381a1def6ec0))
338
- * **theme-default:** migrate CodeGroup component ([107afd8](https://github.com/vuepress/vuepress-next/commit/107afd898a91f1b819297e1649f4e90c87064fc8))
339
- * **theme-default:** migrate NavLink component ([8bb1e17](https://github.com/vuepress/vuepress-next/commit/8bb1e17d4a52a1b164f2cbd990773010566f25c3))
340
- * **theme-default:** migrate OutboundLink component ([c7ddba4](https://github.com/vuepress/vuepress-next/commit/c7ddba4ecb781136a931bf5c4aa5f27acc8837ae))
341
- * **theme-default:** migrate styles ([4bb6e10](https://github.com/vuepress/vuepress-next/commit/4bb6e10da8b71849edf45bd11c282777e840b618))
342
- * **theme-default:** navbar and sidebar ([7f22ac0](https://github.com/vuepress/vuepress-next/commit/7f22ac032c17be8dafe1226d31da4019c17237d5))
343
- * **theme-default:** optimize sidebar items config ([f70cdf0](https://github.com/vuepress/vuepress-next/commit/f70cdf06741bd283722fb51170e407492e9b1a6c))
344
- * **theme-default:** support locale config for custom containers ([404e02d](https://github.com/vuepress/vuepress-next/commit/404e02dadda526b88dfca0f36df8fbf18d3d5e28))
345
- * **theme-default:** use active-header-links plugin ([f7990a2](https://github.com/vuepress/vuepress-next/commit/f7990a2e752af6989cebb58818e3f6c86951255e))
346
- * **theme-default:** use container plugin and refactor types ([55e0940](https://github.com/vuepress/vuepress-next/commit/55e0940a6606fa64742faaf14722ebfaafb39321))
347
- * **theme-default:** use Debug component in Layout ([fe4334f](https://github.com/vuepress/vuepress-next/commit/fe4334f863d4d48e1a37ef96d684a168a9eff996))
348
- * **theme-default:** use docsearch plugin ([c601312](https://github.com/vuepress/vuepress-next/commit/c601312385c42bc5ce85a96ab116395b99f504f3))
349
- * **theme-default:** use medium-zoom plugin ([6288f8c](https://github.com/vuepress/vuepress-next/commit/6288f8c596b32352fde4898cf03c0f1c684f1e1f))
350
- * **theme-default:** use nprogress plugin ([e662753](https://github.com/vuepress/vuepress-next/commit/e66275390857b92577bccef90e250a23596127cd))
351
- * **theme-default:** use palette-stylus plugin ([ccaee0f](https://github.com/vuepress/vuepress-next/commit/ccaee0f87072b0d7dcf3e5589aa946d32e5688ab))
352
- * **theme-default:** use plugin-back-to-top ([774f95b](https://github.com/vuepress/vuepress-next/commit/774f95bd1f544103b4602a7ee7faad56d1719d21))
353
- * **theme-default:** use plugin-git and add themePlugins option ([f44570b](https://github.com/vuepress/vuepress-next/commit/f44570b8392636622bda7f2d5abd697a8050dc26))
@@ -1,23 +0,0 @@
1
- import { defineClientAppEnhance } from '@vuepress/client';
2
- import Badge from './components/global/Badge.vue';
3
- import CodeGroup from './components/global/CodeGroup.vue';
4
- import CodeGroupItem from './components/global/CodeGroupItem.vue';
5
- import OutboundLink from './components/global/OutboundLink.vue';
6
- import './styles/index.scss';
7
- export default defineClientAppEnhance(({ app }) => {
8
- /* eslint-disable vue/match-component-file-name */
9
- app.component('Badge', Badge);
10
- app.component('CodeGroup', CodeGroup);
11
- app.component('CodeGroupItem', CodeGroupItem);
12
- // unregister the built-in `<OutboundLink>` to avoid warning
13
- delete app._context.components.OutboundLink;
14
- // override the built-in `<OutboundLink>`
15
- app.component('OutboundLink', OutboundLink);
16
- // docsearch feature might not be commonly used, so we don't put it
17
- // into dependencies of default theme, but it is supported
18
- if (typeof DOCSEARCH_PROPS === 'undefined') {
19
- // register a mock `<Docsearch>` if docsearch plugin is not enabled
20
- app.component('Docsearch', () => null);
21
- }
22
- /* eslint-enable vue/match-component-file-name */
23
- });
@@ -1,11 +0,0 @@
1
- import { computed, provide } from 'vue';
2
- import { defineClientAppSetup, usePageFrontmatter } from '@vuepress/client';
3
- import { resolveSidebarItems, sidebarItemsSymbol, useThemeLocaleData, } from './composables';
4
- export default defineClientAppSetup(() => {
5
- // we need to access sidebar items in multiple components
6
- // so we make it global computed
7
- const themeLocale = useThemeLocaleData();
8
- const frontmatter = usePageFrontmatter();
9
- const sidebarItems = computed(() => resolveSidebarItems(frontmatter.value, themeLocale.value));
10
- provide(sidebarItemsSymbol, sidebarItems);
11
- });
@@ -1,141 +0,0 @@
1
- <template>
2
- <div class="dropdown-wrapper" :class="{ open }">
3
- <button
4
- class="dropdown-title"
5
- type="button"
6
- :aria-label="dropdownAriaLabel"
7
- @click="handleDropdown"
8
- >
9
- <span class="title">{{ item.text }}</span>
10
- <span class="arrow down" />
11
- </button>
12
-
13
- <button
14
- class="mobile-dropdown-title"
15
- type="button"
16
- :aria-label="dropdownAriaLabel"
17
- @click="open = !open"
18
- >
19
- <span class="title">{{ item.text }}</span>
20
- <span class="arrow" :class="open ? 'down' : 'right'" />
21
- </button>
22
-
23
- <!-- Transition will somehow break the Select Languages dropdown -->
24
- <!-- So we remove DropdownTransition until we figure out the reason -->
25
- <ul v-show="open" class="nav-dropdown">
26
- <li
27
- v-for="(child, index) in item.children"
28
- :key="child.link || index"
29
- class="dropdown-item"
30
- >
31
- <template v-if="child.children">
32
- <h4 class="dropdown-subtitle">
33
- <NavLink
34
- v-if="child.link"
35
- :item="child"
36
- @focusout="
37
- isLastItemOfArray(child, item.children) &&
38
- child.children.length === 0 &&
39
- (open = false)
40
- "
41
- />
42
-
43
- <span v-else>{{ child.text }}</span>
44
- </h4>
45
-
46
- <ul class="dropdown-subitem-wrapper">
47
- <li
48
- v-for="grandchild in child.children"
49
- :key="grandchild.link"
50
- class="dropdown-subitem"
51
- >
52
- <NavLink
53
- :item="grandchild"
54
- @focusout="
55
- isLastItemOfArray(grandchild, child.children) &&
56
- isLastItemOfArray(child, item.children) &&
57
- (open = false)
58
- "
59
- />
60
- </li>
61
- </ul>
62
- </template>
63
-
64
- <template v-else>
65
- <NavLink
66
- :item="child"
67
- @focusout="
68
- isLastItemOfArray(child, item.children) && (open = false)
69
- "
70
- />
71
- </template>
72
- </li>
73
- </ul>
74
- </div>
75
- </template>
76
-
77
- <script lang="ts">
78
- import { computed, defineComponent, ref, toRefs, watch } from 'vue'
79
- import type { PropType } from 'vue'
80
- import { useRoute } from 'vue-router'
81
- import type { NavGroup, NavItem } from '../types'
82
- import NavLink from './NavLink.vue'
83
-
84
- export default defineComponent({
85
- name: 'DropdownLink',
86
-
87
- components: {
88
- NavLink,
89
- },
90
-
91
- props: {
92
- item: {
93
- type: Object as PropType<NavGroup<NavItem>>,
94
- required: true,
95
- },
96
- },
97
-
98
- setup(props) {
99
- const { item } = toRefs(props)
100
- const dropdownAriaLabel = computed(
101
- () => item.value.ariaLabel || item.value.text
102
- )
103
-
104
- const open = ref(false)
105
- const route = useRoute()
106
- watch(
107
- () => route.path,
108
- () => {
109
- open.value = false
110
- }
111
- )
112
-
113
- /**
114
- * Open the dropdown when user tab and click from keyboard.
115
- *
116
- * Use event.detail to detect tab and click from keyboard.
117
- * The Tab + Click is UIEvent > KeyboardEvent, so the detail is 0.
118
- *
119
- * @see https://developer.mozilla.org/en-US/docs/Web/API/UIEvent/detail
120
- */
121
- const handleDropdown = (e): void => {
122
- const isTriggerByTab = e.detail === 0
123
- if (isTriggerByTab) {
124
- open.value = !open.value
125
- } else {
126
- open.value = false
127
- }
128
- }
129
-
130
- const isLastItemOfArray = (item: unknown, arr: unknown[]): boolean =>
131
- arr[arr.length - 1] === item
132
-
133
- return {
134
- open,
135
- dropdownAriaLabel,
136
- handleDropdown,
137
- isLastItemOfArray,
138
- }
139
- },
140
- })
141
- </script>
@@ -1,34 +0,0 @@
1
- <template>
2
- <Transition
3
- name="dropdown"
4
- @enter="setHeight"
5
- @after-enter="unsetHeight"
6
- @before-leave="setHeight"
7
- >
8
- <slot />
9
- </Transition>
10
- </template>
11
-
12
- <script lang="ts">
13
- import { defineComponent } from 'vue'
14
-
15
- export default defineComponent({
16
- name: 'DropdownTransition',
17
-
18
- setup() {
19
- const setHeight = (items): void => {
20
- // explicitly set height so that it can be transitioned
21
- items.style.height = items.scrollHeight + 'px'
22
- }
23
-
24
- const unsetHeight = (items): void => {
25
- items.style.height = ''
26
- }
27
-
28
- return {
29
- setHeight,
30
- unsetHeight,
31
- }
32
- },
33
- })
34
- </script>