@vuepress/theme-default 2.0.0-beta.5 → 2.0.0-beta.50-pre

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