@vuepress/theme-default 2.0.0-beta.6 → 2.0.0-beta.60

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 (148) hide show
  1. package/lib/client/components/AutoLink.vue +114 -0
  2. package/lib/client/components/DropdownTransition.vue +21 -0
  3. package/lib/client/components/Home.vue +15 -0
  4. package/lib/client/components/HomeContent.vue +5 -0
  5. package/lib/client/components/HomeFeatures.vue +23 -0
  6. package/lib/client/components/HomeFooter.vue +17 -0
  7. package/lib/client/components/HomeHero.vue +98 -0
  8. package/lib/client/components/Navbar.vue +75 -0
  9. package/lib/client/components/NavbarBrand.vue +55 -0
  10. package/lib/client/components/NavbarDropdown.vue +126 -0
  11. package/lib/{components/NavbarLinks.vue → client/components/NavbarItems.vue} +61 -50
  12. package/lib/{components → client/components}/Page.vue +9 -15
  13. package/lib/{components → client/components}/PageMeta.vue +51 -66
  14. package/lib/{components → client/components}/PageNav.vue +44 -57
  15. package/lib/client/components/Sidebar.vue +13 -0
  16. package/lib/client/components/SidebarItem.vue +87 -0
  17. package/lib/client/components/SidebarItems.vue +57 -0
  18. package/lib/client/components/ToggleColorModeButton.vue +57 -0
  19. package/lib/client/components/ToggleSidebarButton.vue +24 -0
  20. package/lib/client/components/global/Badge.vue +31 -0
  21. package/lib/client/components/global/CodeGroup.d.ts +4 -0
  22. package/lib/client/components/global/CodeGroup.js +106 -0
  23. package/lib/client/components/global/CodeGroupItem.vue +31 -0
  24. package/lib/client/components/global/index.d.ts +4 -0
  25. package/lib/client/components/global/index.js +4 -0
  26. package/lib/client/composables/index.d.ts +6 -0
  27. package/lib/client/composables/index.js +6 -0
  28. package/lib/client/composables/useDarkMode.d.ts +12 -0
  29. package/lib/client/composables/useDarkMode.js +57 -0
  30. package/lib/{composables → client/composables}/useNavLink.d.ts +6 -1
  31. package/lib/{composables → client/composables}/useNavLink.js +5 -2
  32. package/lib/{composables → client/composables}/useResolveRouteWithRedirect.d.ts +1 -1
  33. package/lib/{composables → client/composables}/useResolveRouteWithRedirect.js +2 -2
  34. package/lib/{composables → client/composables}/useScrollPromise.d.ts +0 -0
  35. package/lib/{composables → client/composables}/useScrollPromise.js +1 -1
  36. package/lib/client/composables/useSidebarItems.d.ts +36 -0
  37. package/lib/client/composables/useSidebarItems.js +118 -0
  38. package/lib/{composables → client/composables}/useThemeData.d.ts +2 -2
  39. package/lib/{composables → client/composables}/useThemeData.js +1 -1
  40. package/lib/client/config.d.ts +3 -0
  41. package/lib/client/config.js +44 -0
  42. package/lib/client/index.d.ts +3 -0
  43. package/lib/client/index.js +3 -0
  44. package/lib/client/layouts/Layout.vue +134 -0
  45. package/lib/client/layouts/NotFound.vue +27 -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 +6 -0
  49. package/lib/{styles → client/styles}/arrow.scss +4 -6
  50. package/lib/client/styles/badge.scss +34 -0
  51. package/lib/{styles → client/styles}/code-group.scss +9 -2
  52. package/lib/{styles → client/styles}/code.scss +35 -49
  53. package/lib/client/styles/custom-container.scss +140 -0
  54. package/lib/{styles → client/styles}/home.scss +32 -24
  55. package/lib/{styles → client/styles}/index.scss +4 -4
  56. package/lib/client/styles/layout.scss +199 -0
  57. package/lib/{styles/dropdown.scss → client/styles/navbar-dropdown.scss} +36 -50
  58. package/lib/client/styles/navbar.scss +193 -0
  59. package/lib/client/styles/normalize.scss +200 -0
  60. package/lib/{styles → client/styles}/page.scss +24 -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 +68 -0
  65. package/lib/client/styles/vars.scss +149 -0
  66. package/lib/client/utils/index.d.ts +3 -0
  67. package/lib/client/utils/index.js +3 -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 +2 -2
  71. package/lib/{utils → client/utils}/resolveEditLink.js +15 -9
  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 +117 -0
  76. package/lib/node/index.d.ts +5 -5
  77. package/lib/node/index.js +5 -17
  78. package/lib/node/utils/assignDefaultLocaleOptions.d.ts +7 -0
  79. package/lib/node/{assignDefaultLocaleOptions.js → utils/assignDefaultLocaleOptions.js} +13 -13
  80. package/lib/node/utils/index.d.ts +2 -0
  81. package/lib/node/utils/index.js +2 -0
  82. package/lib/node/utils/resolveContainerPluginOptions.d.ts +8 -0
  83. package/lib/node/utils/resolveContainerPluginOptions.js +17 -0
  84. package/lib/shared/index.d.ts +3 -0
  85. package/lib/shared/index.js +3 -0
  86. package/lib/shared/nav.d.ts +42 -0
  87. package/lib/shared/nav.js +1 -0
  88. package/lib/{types → shared}/options.d.ts +51 -13
  89. package/lib/shared/options.js +1 -0
  90. package/lib/{types → shared}/page.d.ts +15 -6
  91. package/lib/shared/page.js +1 -0
  92. package/package.json +49 -29
  93. package/templates/build.html +33 -0
  94. package/CHANGELOG.md +0 -376
  95. package/lib/clientAppEnhance.d.ts +0 -3
  96. package/lib/clientAppEnhance.js +0 -30
  97. package/lib/clientAppSetup.d.ts +0 -2
  98. package/lib/clientAppSetup.js +0 -11
  99. package/lib/components/DropdownLink.vue +0 -141
  100. package/lib/components/DropdownTransition.vue +0 -34
  101. package/lib/components/Home.vue +0 -133
  102. package/lib/components/NavLink.vue +0 -115
  103. package/lib/components/Navbar.vue +0 -114
  104. package/lib/components/Sidebar.vue +0 -38
  105. package/lib/components/SidebarChild.d.ts +0 -6
  106. package/lib/components/SidebarChild.js +0 -91
  107. package/lib/components/ToggleSidebarButton.vue +0 -27
  108. package/lib/components/global/Badge.vue +0 -37
  109. package/lib/components/global/CodeGroup.d.ts +0 -5
  110. package/lib/components/global/CodeGroup.js +0 -52
  111. package/lib/components/global/CodeGroupItem.vue +0 -25
  112. package/lib/components/global/OutboundLink.vue +0 -30
  113. package/lib/composables/index.d.ts +0 -5
  114. package/lib/composables/index.js +0 -5
  115. package/lib/composables/useSidebarItems.d.ts +0 -31
  116. package/lib/composables/useSidebarItems.js +0 -114
  117. package/lib/index.d.ts +0 -6
  118. package/lib/index.js +0 -67
  119. package/lib/layouts/404.vue +0 -38
  120. package/lib/layouts/Layout.vue +0 -152
  121. package/lib/node/assignDefaultLocaleOptions.d.ts +0 -5
  122. package/lib/node/resolveActiveHeaderLinksPluginOptions.d.ts +0 -6
  123. package/lib/node/resolveActiveHeaderLinksPluginOptions.js +0 -16
  124. package/lib/node/resolveContainerPluginOptions.d.ts +0 -26
  125. package/lib/node/resolveContainerPluginOptions.js +0 -79
  126. package/lib/node/resolveGitPluginOptions.d.ts +0 -6
  127. package/lib/node/resolveGitPluginOptions.js +0 -22
  128. package/lib/node/resolveMediumZoomPluginOptions.d.ts +0 -6
  129. package/lib/node/resolveMediumZoomPluginOptions.js +0 -17
  130. package/lib/styles/_normalize.scss +0 -148
  131. package/lib/styles/_variables.scss +0 -34
  132. package/lib/styles/badge.scss +0 -33
  133. package/lib/styles/custom-container.scss +0 -78
  134. package/lib/styles/layout.scss +0 -194
  135. package/lib/styles/navbar.scss +0 -141
  136. package/lib/styles/plugins.scss +0 -18
  137. package/lib/styles/sidebar.scss +0 -152
  138. package/lib/styles/sr-only.scss +0 -12
  139. package/lib/styles/transitions.scss +0 -13
  140. package/lib/types/index.d.ts +0 -3
  141. package/lib/types/index.js +0 -15
  142. package/lib/types/nav.d.ts +0 -44
  143. package/lib/types/nav.js +0 -2
  144. package/lib/types/options.js +0 -2
  145. package/lib/types/page.js +0 -2
  146. package/lib/utils/index.d.ts +0 -2
  147. package/lib/utils/index.js +0 -2
  148. package/lib/utils/resolveRepoType.d.ts +0 -2
@@ -0,0 +1,33 @@
1
+ <!DOCTYPE html>
2
+ <html lang="{{ lang }}">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <meta name="generator" content="VuePress {{ version }}">
7
+ <style>
8
+ :root {
9
+ --c-bg: #fff;
10
+ }
11
+ html.dark {
12
+ --c-bg: #22272e;
13
+ }
14
+ html, body {
15
+ background-color: var(--c-bg);
16
+ }
17
+ </style>
18
+ <script>
19
+ const userMode = localStorage.getItem('vuepress-color-scheme');
20
+ const systemDarkMode = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
21
+ if (userMode === 'dark' || (userMode !== 'light' && systemDarkMode)) {
22
+ document.documentElement.classList.toggle('dark', true);
23
+ }
24
+ </script>
25
+ <!--vuepress-ssr-head-->
26
+ <!--vuepress-ssr-styles-->
27
+ <!--vuepress-ssr-resources-->
28
+ </head>
29
+ <body>
30
+ <div id="app"><!--vuepress-ssr-app--></div>
31
+ <!--vuepress-ssr-scripts-->
32
+ </body>
33
+ </html>
package/CHANGELOG.md DELETED
@@ -1,376 +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.6](https://github.com/vuepress/vuepress-next/compare/v2.0.0-beta.5...v2.0.0-beta.6) (2021-03-26)
7
-
8
- **Note:** Version bump only for package @vuepress/theme-default
9
-
10
-
11
-
12
-
13
-
14
- # [2.0.0-beta.5](https://github.com/vuepress/vuepress-next/compare/v2.0.0-beta.4...v2.0.0-beta.5) (2021-03-26)
15
-
16
-
17
- ### Bug Fixes
18
-
19
- * **theme-default:** add active class to sidebar group heading ([8dcb945](https://github.com/vuepress/vuepress-next/commit/8dcb9457c532de8076f94b3b165c1347e9bd9c86))
20
- * **theme-default:** allow NavLink in sidebar children ([ea50010](https://github.com/vuepress/vuepress-next/commit/ea5001076b86a7dc8b807811796a8ed44fbcf7b9))
21
- * **theme-default:** make navlink active in subpath (close [#70](https://github.com/vuepress/vuepress-next/issues/70)) ([4c865b1](https://github.com/vuepress/vuepress-next/commit/4c865b16430d0e72b0ac1103f9579a93f248bf9c))
22
- * **theme-default:** make nested sidebar groups work ([4ada701](https://github.com/vuepress/vuepress-next/commit/4ada701062db400787c41008942354f6947bf80b))
23
- * **theme-default:** make scrollBehavior work with transition (close [#77](https://github.com/vuepress/vuepress-next/issues/77)) ([4b8d0cf](https://github.com/vuepress/vuepress-next/commit/4b8d0cff2d7fa3d74d69d551976a3b12263e6124))
24
-
25
-
26
-
27
-
28
-
29
- # [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)
30
-
31
-
32
- ### Features
33
-
34
- * **theme-default:** use prismjs plugin ([f131de4](https://github.com/vuepress/vuepress-next/commit/f131de4783685dbabfde4e4966182d570224a246))
35
-
36
-
37
-
38
-
39
-
40
- # [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)
41
-
42
- **Note:** Version bump only for package @vuepress/theme-default
43
-
44
-
45
-
46
-
47
-
48
- # [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)
49
-
50
- **Note:** Version bump only for package @vuepress/theme-default
51
-
52
-
53
-
54
-
55
-
56
- # [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)
57
-
58
-
59
- ### Features
60
-
61
- * **theme-default:** use sass as css pre-processor ([7eb1fd8](https://github.com/vuepress/vuepress-next/commit/7eb1fd8b8901d3f2c2335ad550b7d601a9354826))
62
-
63
-
64
- ### BREAKING CHANGES
65
-
66
- * **theme-default:** the palette system of default theme is migrated to sass
67
-
68
-
69
-
70
-
71
-
72
- # [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)
73
-
74
-
75
- ### Features
76
-
77
- * **plugin-palette:** add palette plugin ([556a23c](https://github.com/vuepress/vuepress-next/commit/556a23cc9076f972deb3d5c0905441b63b700682))
78
-
79
-
80
- ### BREAKING CHANGES
81
-
82
- * **plugin-palette:** migrate `@vuepress/plugin-palette-stylus` to `@vuepress/plugin-palette`
83
-
84
-
85
-
86
-
87
-
88
- # [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)
89
-
90
-
91
- ### Code Refactoring
92
-
93
- * **core:** remove theme data from site data ([187aef3](https://github.com/vuepress/vuepress-next/commit/187aef36607efc62d7b2d5c773553f89685cf64c))
94
-
95
-
96
- ### BREAKING CHANGES
97
-
98
- * **core:** `themeConfig` is not available in site data any more
99
-
100
-
101
-
102
-
103
-
104
- # [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)
105
-
106
- **Note:** Version bump only for package @vuepress/theme-default
107
-
108
-
109
-
110
-
111
-
112
- # [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)
113
-
114
- **Note:** Version bump only for package @vuepress/theme-default
115
-
116
-
117
-
118
-
119
-
120
- # [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)
121
-
122
- **Note:** Version bump only for package @vuepress/theme-default
123
-
124
-
125
-
126
-
127
-
128
- # [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)
129
-
130
-
131
- ### Features
132
-
133
- * **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))
134
-
135
-
136
-
137
-
138
-
139
- # [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)
140
-
141
-
142
- ### Bug Fixes
143
-
144
- * **theme-default:** fix max width of navbar links wrapper ([846e60c](https://github.com/vuepress/vuepress-next/commit/846e60ca9f0137f54a96df7589df4ea4cd99f18a))
145
- * **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))
146
-
147
-
148
-
149
-
150
-
151
- # [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)
152
-
153
- **Note:** Version bump only for package @vuepress/theme-default
154
-
155
-
156
-
157
-
158
-
159
- # [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)
160
-
161
-
162
- ### Bug Fixes
163
-
164
- * **theme-default:** fix homepage frontmatter type ([9cf2d28](https://github.com/vuepress/vuepress-next/commit/9cf2d288e115d335f6ff9f1a849a2ce82db799c9))
165
- * **theme-default:** fix sidebar config override ([2c2c280](https://github.com/vuepress/vuepress-next/commit/2c2c2801be716dfb102345090888fd1e22a0ac92))
166
- * **theme-default:** make sr-only tags unselectable ([0f6488e](https://github.com/vuepress/vuepress-next/commit/0f6488e3a00674c0670737c8831763db0a0ffa93))
167
-
168
-
169
- ### Features
170
-
171
- * **theme-default:** add code-group custom container ([d0a20aa](https://github.com/vuepress/vuepress-next/commit/d0a20aaacefc78708a4181c53704b28c60b520b4))
172
- * **theme-default:** add page transition ([845cc2c](https://github.com/vuepress/vuepress-next/commit/845cc2cb64223b856261bfc7b384dec6557456c4))
173
- * **theme-default:** allow html in homepage footer ([87e0821](https://github.com/vuepress/vuepress-next/commit/87e0821cee66c34141c1c3a62e8f5ecb6b21a957))
174
- * **theme-default:** optimize scrollbar style of sidebar ([27abb26](https://github.com/vuepress/vuepress-next/commit/27abb26509fa737ea27c3036bbe834d544e60298))
175
- * **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))
176
-
177
-
178
-
179
-
180
-
181
- # [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)
182
-
183
-
184
- ### Features
185
-
186
- * **theme-default:** allow dropdown subtitle as a link ([5fb6558](https://github.com/vuepress/vuepress-next/commit/5fb6558c926ddbb569f2b1901903cf9be4ad426e))
187
-
188
-
189
-
190
-
191
-
192
- # [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)
193
-
194
- **Note:** Version bump only for package @vuepress/theme-default
195
-
196
-
197
-
198
-
199
-
200
- # [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)
201
-
202
-
203
- ### Bug Fixes
204
-
205
- * **theme-default:** click to close dropdown that opened by tab and click ([88d1ae2](https://github.com/vuepress/vuepress-next/commit/88d1ae2bf6a92113ece8efa7ed57352b34ad18c4))
206
- * **theme-default:** fix font-size of dropdown group title ([563156c](https://github.com/vuepress/vuepress-next/commit/563156cb8458aeb71fadd882b08e03bee8ae5fba))
207
-
208
-
209
- ### Reverts
210
-
211
- * fix(theme-default): remove outline when focused on dropdown button ([66d3feb](https://github.com/vuepress/vuepress-next/commit/66d3feba01bf8a3ce751788a9a025dd69757efb4))
212
-
213
-
214
-
215
-
216
-
217
- # [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)
218
-
219
-
220
- ### Bug Fixes
221
-
222
- * **theme-default:** assign default locale data ([d59f55d](https://github.com/vuepress/vuepress-next/commit/d59f55d355299a8edbdb43986cc7aaff5345ea1f))
223
- * **theme-default:** fix overflow style of code block line-numbers ([dd77cf4](https://github.com/vuepress/vuepress-next/commit/dd77cf448a28423ee23930b3d76601d8a5a6da18))
224
- * **theme-default:** remove outline when focused on dropdown button ([77842e3](https://github.com/vuepress/vuepress-next/commit/77842e396f1ebcc9e874af537a6520b818d028c2))
225
- * **theme-default:** set font-size explicitly for h4 to h6 ([a6459c0](https://github.com/vuepress/vuepress-next/commit/a6459c0eca38fbc19545442581ea6f0e73908b30))
226
-
227
-
228
-
229
-
230
-
231
- # [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)
232
-
233
- **Note:** Version bump only for package @vuepress/theme-default
234
-
235
-
236
-
237
-
238
-
239
- # [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)
240
-
241
-
242
- ### Bug Fixes
243
-
244
- * **theme-default:** fix navbar type to allow nested group ([9ef46ae](https://github.com/vuepress/vuepress-next/commit/9ef46ae3d41dc56c536d884665d28f71a7883a59))
245
-
246
-
247
-
248
-
249
-
250
- # [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)
251
-
252
-
253
- ### Bug Fixes
254
-
255
- * **theme-default:** fix content headers styles ([7ead1f6](https://github.com/vuepress/vuepress-next/commit/7ead1f60db5135ed7d1a428cb23fecbbc11b223e))
256
-
257
-
258
-
259
-
260
-
261
- # [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)
262
-
263
- **Note:** Version bump only for package @vuepress/theme-default
264
-
265
-
266
-
267
-
268
-
269
- # [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)
270
-
271
- **Note:** Version bump only for package @vuepress/theme-default
272
-
273
-
274
-
275
-
276
-
277
- # [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)
278
-
279
- **Note:** Version bump only for package @vuepress/theme-default
280
-
281
-
282
-
283
-
284
-
285
- # [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)
286
-
287
-
288
- ### Features
289
-
290
- * **theme-default:** use debug plugin ([e12b1f3](https://github.com/vuepress/vuepress-next/commit/e12b1f3293b5e8faebd93b444b71b6ac11b1029d))
291
-
292
-
293
-
294
-
295
-
296
- # [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)
297
-
298
-
299
- ### Bug Fixes
300
-
301
- * **theme-default:** fix code related styles ([83d8a6f](https://github.com/vuepress/vuepress-next/commit/83d8a6f50537ed1b4c5e5c0f4221841999eeaeab))
302
- * **theme-default:** fix the condition of using router-link as nav-link ([8141f69](https://github.com/vuepress/vuepress-next/commit/8141f691495fc92ee19bd4d7bfd496c07112ac6a))
303
-
304
-
305
-
306
-
307
-
308
- # [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)
309
-
310
- **Note:** Version bump only for package @vuepress/theme-default
311
-
312
-
313
-
314
-
315
-
316
- # [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)
317
-
318
- **Note:** Version bump only for package @vuepress/theme-default
319
-
320
-
321
-
322
-
323
-
324
- # [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)
325
-
326
- **Note:** Version bump only for package @vuepress/theme-default
327
-
328
-
329
-
330
-
331
-
332
- # 2.0.0-alpha.1 (2020-12-01)
333
-
334
-
335
- ### Bug Fixes
336
-
337
- * **theme-default:** code-group nav padding ([1d46ce0](https://github.com/vuepress/vuepress-next/commit/1d46ce0b8117bcf55561f2537ec2982d5ca020e5))
338
- * **theme-default:** code-group style in mobile ([7e31bfd](https://github.com/vuepress/vuepress-next/commit/7e31bfd6851e5d631da8c09df1127e81eef0e6b8))
339
- * **theme-default:** do not use frontmatter title and desc as hero messages ([a3dde66](https://github.com/vuepress/vuepress-next/commit/a3dde66fd1474f99578115cc17a7605955c8b4b6))
340
- * **theme-default:** do not use injections inside computed ([04c7de5](https://github.com/vuepress/vuepress-next/commit/04c7de5ad312835a8306ec65aead882ea0c5aa6a))
341
- * **theme-default:** fallback home title and content to siteLocale ([ce34b4a](https://github.com/vuepress/vuepress-next/commit/ce34b4a4c7818d330712f82ac073ba90ce9774fc))
342
- * **theme-default:** fix type imports and usages ([f953295](https://github.com/vuepress/vuepress-next/commit/f95329512e5fee95839613f66e5011fedfcb548e))
343
- * **theme-default:** hide contributors if array is empty ([9e88016](https://github.com/vuepress/vuepress-next/commit/9e880165dd408883013af5f9f42cff78ee0574ed))
344
- * **theme-default:** remove default home config ([21ebb4c](https://github.com/vuepress/vuepress-next/commit/21ebb4cc293db6d38e146a87dfb532380cfa68c0))
345
- * **theme-default:** remove DropdownTransition temporarily ([efd6ded](https://github.com/vuepress/vuepress-next/commit/efd6dede9c6a785eb905015104b0f7b011f76456))
346
- * **theme-default:** resolve redirect with hash, query and params ([e7b7a91](https://github.com/vuepress/vuepress-next/commit/e7b7a9100282ceeef78a62bde15e31504a36f3dd))
347
- * **theme-default:** typo in template ([9a72112](https://github.com/vuepress/vuepress-next/commit/9a72112b8500f1d387cb7abb70630518e34815c9))
348
- * **theme-default:** unregister the built-in OutboundLink component to avoid warning ([9c781cc](https://github.com/vuepress/vuepress-next/commit/9c781cc5478eab28689a3a05024b7dbf3fa23722))
349
- * **theme-default:** wrap Content with div ([e578594](https://github.com/vuepress/vuepress-next/commit/e5785948d09f2711d797aaf91b0bd9ff6a70f95d))
350
- * **theme-default:** wrong default vertical-align of Badge ([0c5d2ef](https://github.com/vuepress/vuepress-next/commit/0c5d2efb97fc7b9bc66a8d7707954f3d63746ecb))
351
-
352
-
353
- ### Features
354
-
355
- * **theme-default:** 404 page with locales support ([08f6f9b](https://github.com/vuepress/vuepress-next/commit/08f6f9b7b0f248cd527cf1251033d8b4172961bd))
356
- * **theme-default:** add Page component ([d2eb868](https://github.com/vuepress/vuepress-next/commit/d2eb868ac92bcc895266facc70a145a7c7f65b3d))
357
- * **theme-default:** allow string type navbar and sidebar item ([82d7fa2](https://github.com/vuepress/vuepress-next/commit/82d7fa2e96174f7dce2a5e23c8d5d34889493ac4))
358
- * **theme-default:** default theme skeleton ([fb1d413](https://github.com/vuepress/vuepress-next/commit/fb1d413199835e6b6127d4e725a0ce84daa2737a))
359
- * **theme-default:** display json extension in code blocks ([d8795d4](https://github.com/vuepress/vuepress-next/commit/d8795d4b4dc2c5c7a8504e6b694714523bdca0a5))
360
- * **theme-default:** migrate Badge component ([b77bb29](https://github.com/vuepress/vuepress-next/commit/b77bb29e5832a56cc6860567b3d7381a1def6ec0))
361
- * **theme-default:** migrate CodeGroup component ([107afd8](https://github.com/vuepress/vuepress-next/commit/107afd898a91f1b819297e1649f4e90c87064fc8))
362
- * **theme-default:** migrate NavLink component ([8bb1e17](https://github.com/vuepress/vuepress-next/commit/8bb1e17d4a52a1b164f2cbd990773010566f25c3))
363
- * **theme-default:** migrate OutboundLink component ([c7ddba4](https://github.com/vuepress/vuepress-next/commit/c7ddba4ecb781136a931bf5c4aa5f27acc8837ae))
364
- * **theme-default:** migrate styles ([4bb6e10](https://github.com/vuepress/vuepress-next/commit/4bb6e10da8b71849edf45bd11c282777e840b618))
365
- * **theme-default:** navbar and sidebar ([7f22ac0](https://github.com/vuepress/vuepress-next/commit/7f22ac032c17be8dafe1226d31da4019c17237d5))
366
- * **theme-default:** optimize sidebar items config ([f70cdf0](https://github.com/vuepress/vuepress-next/commit/f70cdf06741bd283722fb51170e407492e9b1a6c))
367
- * **theme-default:** support locale config for custom containers ([404e02d](https://github.com/vuepress/vuepress-next/commit/404e02dadda526b88dfca0f36df8fbf18d3d5e28))
368
- * **theme-default:** use active-header-links plugin ([f7990a2](https://github.com/vuepress/vuepress-next/commit/f7990a2e752af6989cebb58818e3f6c86951255e))
369
- * **theme-default:** use container plugin and refactor types ([55e0940](https://github.com/vuepress/vuepress-next/commit/55e0940a6606fa64742faaf14722ebfaafb39321))
370
- * **theme-default:** use Debug component in Layout ([fe4334f](https://github.com/vuepress/vuepress-next/commit/fe4334f863d4d48e1a37ef96d684a168a9eff996))
371
- * **theme-default:** use docsearch plugin ([c601312](https://github.com/vuepress/vuepress-next/commit/c601312385c42bc5ce85a96ab116395b99f504f3))
372
- * **theme-default:** use medium-zoom plugin ([6288f8c](https://github.com/vuepress/vuepress-next/commit/6288f8c596b32352fde4898cf03c0f1c684f1e1f))
373
- * **theme-default:** use nprogress plugin ([e662753](https://github.com/vuepress/vuepress-next/commit/e66275390857b92577bccef90e250a23596127cd))
374
- * **theme-default:** use palette-stylus plugin ([ccaee0f](https://github.com/vuepress/vuepress-next/commit/ccaee0f87072b0d7dcf3e5589aa946d32e5688ab))
375
- * **theme-default:** use plugin-back-to-top ([774f95b](https://github.com/vuepress/vuepress-next/commit/774f95bd1f544103b4602a7ee7faad56d1719d21))
376
- * **theme-default:** use plugin-git and add themePlugins option ([f44570b](https://github.com/vuepress/vuepress-next/commit/f44570b8392636622bda7f2d5abd697a8050dc26))
@@ -1,3 +0,0 @@
1
- import './styles/index.scss';
2
- declare const _default: import("@vuepress/client").ClientAppEnhance;
3
- export default _default;
@@ -1,30 +0,0 @@
1
- import { defineClientAppEnhance } from '@vuepress/client';
2
- import Badge from './components/global/Badge.vue';
3
- import CodeGroup from './components/global/CodeGroup';
4
- import CodeGroupItem from './components/global/CodeGroupItem.vue';
5
- import OutboundLink from './components/global/OutboundLink.vue';
6
- import { useScrollPromise } from './composables';
7
- import './styles/index.scss';
8
- export default defineClientAppEnhance(({ app, router }) => {
9
- /* eslint-disable vue/match-component-file-name */
10
- app.component('Badge', Badge);
11
- app.component('CodeGroup', CodeGroup);
12
- app.component('CodeGroupItem', CodeGroupItem);
13
- // unregister the built-in `<OutboundLink>` to avoid warning
14
- delete app._context.components.OutboundLink;
15
- // override the built-in `<OutboundLink>`
16
- app.component('OutboundLink', OutboundLink);
17
- // docsearch feature might not be commonly used, so we don't put it
18
- // into dependencies of default theme, but it is supported
19
- if (typeof DOCSEARCH_PROPS === 'undefined') {
20
- // register a mock `<Docsearch>` if docsearch plugin is not enabled
21
- app.component('Docsearch', () => null);
22
- }
23
- /* eslint-enable vue/match-component-file-name */
24
- // handle scrollBehavior with transition
25
- const scrollBehavior = router.options.scrollBehavior;
26
- router.options.scrollBehavior = async (...args) => {
27
- await useScrollPromise().wait();
28
- return scrollBehavior(...args);
29
- };
30
- });
@@ -1,2 +0,0 @@
1
- declare const _default: import("@vuepress/client").ClientAppSetup;
2
- export default _default;
@@ -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>