@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
@@ -1,6 +0,0 @@
1
- import type { MediumZoomPluginOptions } from '@vuepress/plugin-medium-zoom';
2
- import type { DefaultThemePluginsOptions } from '../types';
3
- /**
4
- * Resolve options for @vuepress/plugin-medium-zoom
5
- */
6
- export declare const resolveMediumZoomPluginOptions: (themePlugins: DefaultThemePluginsOptions) => MediumZoomPluginOptions | boolean;
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.resolveMediumZoomPluginOptions = void 0;
4
- /**
5
- * Resolve options for @vuepress/plugin-medium-zoom
6
- */
7
- const resolveMediumZoomPluginOptions = (themePlugins) => {
8
- if ((themePlugins === null || themePlugins === void 0 ? void 0 : themePlugins.mediumZoom) === false) {
9
- return false;
10
- }
11
- return {
12
- selector: '.theme-default-content :not(a) > img',
13
- zoomOptions: {},
14
- delay: 300,
15
- };
16
- };
17
- exports.resolveMediumZoomPluginOptions = resolveMediumZoomPluginOptions;
package/lib/shim.d.ts DELETED
@@ -1,5 +0,0 @@
1
- declare module '*.vue' {
2
- import type { ComponentOptions } from 'vue'
3
- const comp: ComponentOptions
4
- export default comp
5
- }
@@ -1,148 +0,0 @@
1
- @import '_variables';
2
-
3
- html,
4
- body {
5
- padding: 0;
6
- margin: 0;
7
- background-color: #fff;
8
- }
9
-
10
- body {
11
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
12
- Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
13
- -webkit-font-smoothing: antialiased;
14
- -moz-osx-font-smoothing: grayscale;
15
- font-size: 16px;
16
- color: $textColor;
17
- }
18
-
19
- a {
20
- font-weight: 500;
21
- color: $accentColor;
22
- text-decoration: none;
23
- }
24
-
25
- p a code {
26
- font-weight: 400;
27
- color: $accentColor;
28
- }
29
-
30
- kbd {
31
- background: #eee;
32
- border: solid 0.15rem #ddd;
33
- border-bottom: solid 0.25rem #ddd;
34
- border-radius: 0.15rem;
35
- padding: 0 0.15em;
36
- }
37
-
38
- blockquote {
39
- font-size: 1rem;
40
- color: #999;
41
- border-left: 0.2rem solid #dfe2e5;
42
- margin: 1rem 0;
43
- padding: 0.25rem 0 0.25rem 1rem;
44
-
45
- & > p {
46
- margin: 0;
47
- }
48
- }
49
-
50
- ul,
51
- ol {
52
- padding-left: 1.2em;
53
- }
54
-
55
- strong {
56
- font-weight: 600;
57
- }
58
-
59
- h1,
60
- h2,
61
- h3,
62
- h4,
63
- h5,
64
- h6 {
65
- font-weight: 600;
66
- line-height: 1.25;
67
-
68
- &:hover .header-anchor {
69
- opacity: 1;
70
- }
71
- }
72
-
73
- h1 {
74
- font-size: 2.2rem;
75
- }
76
-
77
- h2 {
78
- font-size: 1.65rem;
79
- padding-bottom: 0.3rem;
80
- border-bottom: 1px solid $borderColor;
81
- }
82
-
83
- h3 {
84
- font-size: 1.35rem;
85
- }
86
-
87
- h4 {
88
- font-size: 1.15rem;
89
- }
90
-
91
- h5 {
92
- font-size: 1.05rem;
93
- }
94
-
95
- h6 {
96
- font-size: 1rem;
97
- }
98
-
99
- a.header-anchor {
100
- font-size: 0.85em;
101
- float: left;
102
- margin-left: -0.87em;
103
- padding-right: 0.23em;
104
- margin-top: 0.125em;
105
- opacity: 0;
106
-
107
- &:hover {
108
- text-decoration: none;
109
- }
110
- }
111
-
112
- code,
113
- kbd {
114
- font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
115
- monospace;
116
- }
117
-
118
- p,
119
- ul,
120
- ol {
121
- line-height: 1.7;
122
- }
123
-
124
- hr {
125
- border: 0;
126
- border-top: 1px solid $borderColor;
127
- }
128
-
129
- table {
130
- border-collapse: collapse;
131
- margin: 1rem 0;
132
- display: block;
133
- overflow-x: auto;
134
- }
135
-
136
- tr {
137
- border-top: 1px solid #dfe2e5;
138
-
139
- &:nth-child(2n) {
140
- background-color: #f6f8fa;
141
- }
142
- }
143
-
144
- th,
145
- td {
146
- border: 1px solid #dfe2e5;
147
- padding: 0.6em 1em;
148
- }
@@ -1,34 +0,0 @@
1
- @import '@vuepress/plugin-palette/palette';
2
-
3
- // colors
4
- $accentColor: #3eaf7c !default;
5
- $textColor: #2c3e50 !default;
6
- $borderColor: #eaecef !default;
7
- $codeBgColor: #282c34 !default;
8
- $arrowBgColor: #ccc !default;
9
- $tipColor: #42b983 !default;
10
- $warningColor: #e7c000 !default;
11
- $dangerColor: #cc0000 !default;
12
- $badgeTipColor: $tipColor !default;
13
- $badgeWarningColor: $warningColor !default;
14
- $badgeDangerColor: $dangerColor !default;
15
-
16
- // layout
17
- $navbarHeight: 3.6rem !default;
18
- $sidebarWidth: 20rem !default;
19
- $contentWidth: 740px !default;
20
- $homePageWidth: 960px !default;
21
-
22
- // responsive breakpoints
23
- $MQNarrow: 959px !default;
24
- $MQMobile: 719px !default;
25
- $MQMobileNarrow: 419px !default;
26
-
27
- // code
28
- $lineNumbersWrapperWidth: 3.5rem !default;
29
- $codeLang: 'c' 'cpp' 'cs' 'css' 'dart' 'docker' 'fs' 'go' 'html' 'java' 'js'
30
- 'json' 'kt' 'less' 'makefile' 'md' 'php' 'py' 'rb' 'rs' 'sass' 'scss' 'sh'
31
- 'styl' 'ts' 'toml' 'vue' 'yml' !default;
32
-
33
- // other
34
- $contentClass: '.theme-default-content' !default;
@@ -1,15 +0,0 @@
1
- @import '_variables';
2
-
3
- %wrapper {
4
- max-width: $contentWidth;
5
- margin: 0 auto;
6
- padding: 2rem 2.5rem;
7
-
8
- @media (max-width: $MQNarrow) {
9
- padding: 2rem;
10
- }
11
-
12
- @media (max-width: $MQMobileNarrow) {
13
- padding: 1.5rem;
14
- }
15
- }
@@ -1,39 +0,0 @@
1
- @import '_variables';
2
-
3
- .arrow {
4
- display: inline-block;
5
- width: 0;
6
- height: 0;
7
-
8
- &.up {
9
- border: {
10
- left: 4px solid transparent;
11
- right: 4px solid transparent;
12
- bottom: 6px solid $arrowBgColor;
13
- }
14
- }
15
-
16
- &.down {
17
- border: {
18
- left: 4px solid transparent;
19
- right: 4px solid transparent;
20
- top: 6px solid $arrowBgColor;
21
- }
22
- }
23
-
24
- &.right {
25
- border: {
26
- top: 4px solid transparent;
27
- bottom: 4px solid transparent;
28
- left: 6px solid $arrowBgColor;
29
- }
30
- }
31
-
32
- &.left {
33
- border: {
34
- top: 4px solid transparent;
35
- bottom: 4px solid transparent;
36
- right: 6px solid $arrowBgColor;
37
- }
38
- }
39
- }
@@ -1,33 +0,0 @@
1
- @import '_variables';
2
-
3
- .badge {
4
- display: inline-block;
5
- font-size: 14px;
6
- height: 18px;
7
- line-height: 18px;
8
- border-radius: 3px;
9
- padding: 0 6px;
10
- color: white;
11
- background-color: #42b983;
12
- vertical-align: top;
13
-
14
- .table-of-contents & {
15
- vertical-align: middle;
16
- }
17
-
18
- &.tip {
19
- background-color: $badgeTipColor;
20
- }
21
-
22
- &.warning {
23
- background-color: $badgeWarningColor;
24
- }
25
-
26
- &.danger {
27
- background-color: $badgeDangerColor;
28
- }
29
-
30
- & + & {
31
- margin-left: 5px;
32
- }
33
- }
@@ -1,62 +0,0 @@
1
- @import '_variables';
2
-
3
- .code-group__nav {
4
- margin-top: 0.85rem;
5
- // 2 * margin + border-radius of <pre> tag
6
- margin-bottom: calc(-1.7rem - 6px);
7
- padding-bottom: calc(1.7rem - 6px);
8
- padding-left: 10px;
9
- padding-top: 10px;
10
- border-top-left-radius: 6px;
11
- border-top-right-radius: 6px;
12
- background-color: $codeBgColor;
13
- }
14
-
15
- .code-group__ul {
16
- margin: auto 0;
17
- padding-left: 0;
18
- display: inline-flex;
19
- list-style: none;
20
- }
21
-
22
- .code-group__nav-tab {
23
- border: 0;
24
- padding: 5px;
25
- cursor: pointer;
26
- background-color: transparent;
27
- font-size: 0.85em;
28
- line-height: 1.4;
29
- color: rgba(255, 255, 255, 0.9);
30
- font-weight: 600;
31
- }
32
-
33
- .code-group__nav-tab:focus {
34
- outline: none;
35
- }
36
-
37
- .code-group__nav-tab-active {
38
- border-bottom: $accentColor 1px solid;
39
- }
40
-
41
- @media (max-width: $MQMobileNarrow) {
42
- .code-group__nav {
43
- margin-left: -1.5rem;
44
- margin-right: -1.5rem;
45
- border-radius: 0;
46
- }
47
- }
48
-
49
- /**
50
- * code-group-item
51
- */
52
- .code-group-item {
53
- display: none;
54
- }
55
-
56
- .code-group-item__active {
57
- display: block;
58
- }
59
-
60
- .code-group-item > pre {
61
- background-color: orange;
62
- }
@@ -1,277 +0,0 @@
1
- @use 'sass:color';
2
-
3
- @import '_variables';
4
-
5
- // ===============================
6
- // Forked and modified from prismjs/themes/prism-tomorrow.css
7
-
8
- code[class*='language-'],
9
- pre[class*='language-'] {
10
- color: #ccc;
11
- background: none;
12
- font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
13
- font-size: 1em;
14
- text-align: left;
15
- white-space: pre;
16
- word-spacing: normal;
17
- word-break: normal;
18
- word-wrap: normal;
19
- line-height: 1.5;
20
-
21
- -moz-tab-size: 4;
22
- -o-tab-size: 4;
23
- tab-size: 4;
24
-
25
- -webkit-hyphens: none;
26
- -moz-hyphens: none;
27
- -ms-hyphens: none;
28
- hyphens: none;
29
- }
30
-
31
- /* Code blocks */
32
- pre[class*='language-'] {
33
- padding: 1em;
34
- margin: 0.5em 0;
35
- overflow: auto;
36
- }
37
-
38
- :not(pre) > code[class*='language-'],
39
- pre[class*='language-'] {
40
- background: #2d2d2d;
41
- }
42
-
43
- /* Inline code */
44
- :not(pre) > code[class*='language-'] {
45
- padding: 0.1em;
46
- border-radius: 0.3em;
47
- white-space: normal;
48
- }
49
-
50
- .token.comment,
51
- .token.block-comment,
52
- .token.prolog,
53
- .token.doctype,
54
- .token.cdata {
55
- color: #999;
56
- }
57
-
58
- .token.punctuation {
59
- color: #ccc;
60
- }
61
-
62
- .token.tag,
63
- .token.attr-name,
64
- .token.namespace,
65
- .token.deleted {
66
- color: #ec5975;
67
- }
68
-
69
- .token.function-name {
70
- color: #6196cc;
71
- }
72
-
73
- .token.boolean,
74
- .token.number,
75
- .token.function {
76
- color: #f08d49;
77
- }
78
-
79
- .token.property,
80
- .token.class-name,
81
- .token.constant,
82
- .token.symbol {
83
- color: #f8c555;
84
- }
85
-
86
- .token.selector,
87
- .token.important,
88
- .token.atrule,
89
- .token.keyword,
90
- .token.builtin {
91
- color: #cc99cd;
92
- }
93
-
94
- .token.string,
95
- .token.char,
96
- .token.attr-value,
97
- .token.regex,
98
- .token.variable {
99
- color: #7ec699;
100
- }
101
-
102
- .token.operator,
103
- .token.entity,
104
- .token.url {
105
- color: #67cdcc;
106
- }
107
-
108
- .token.important,
109
- .token.bold {
110
- font-weight: bold;
111
- }
112
- .token.italic {
113
- font-style: italic;
114
- }
115
-
116
- .token.entity {
117
- cursor: help;
118
- }
119
-
120
- .token.inserted {
121
- color: $accentColor;
122
- }
123
-
124
- // ===============================
125
-
126
- #{$contentClass} {
127
- code {
128
- color: color.scale($textColor, $lightness: 20%);
129
- padding: 0.25rem 0.5rem;
130
- margin: 0;
131
- font-size: 0.85em;
132
- background-color: rgba(27, 31, 35, 0.05);
133
- border-radius: 3px;
134
- }
135
- }
136
-
137
- #{$contentClass} {
138
- pre,
139
- pre[class*='language-'] {
140
- line-height: 1.4;
141
- padding: 1.25rem 1.5rem;
142
- margin: 0.85rem 0;
143
- background-color: $codeBgColor;
144
- border-radius: 6px;
145
- overflow: auto;
146
-
147
- code {
148
- color: #fff;
149
- padding: 0;
150
- background-color: transparent;
151
- border-radius: 0;
152
- }
153
- }
154
-
155
- .line-number {
156
- font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
157
- monospace;
158
- }
159
- }
160
-
161
- div[class*='language-'] {
162
- position: relative;
163
- background-color: $codeBgColor;
164
- border-radius: 6px;
165
-
166
- &::before {
167
- position: absolute;
168
- z-index: 3;
169
- top: 0.8em;
170
- right: 1em;
171
- font-size: 0.75rem;
172
- color: rgba(255, 255, 255, 0.4);
173
- }
174
-
175
- pre,
176
- pre[class*='language-'] {
177
- // force override the background color to be compatible with shiki
178
- background: transparent !important;
179
- position: relative;
180
- z-index: 1;
181
- }
182
-
183
- .highlight-lines {
184
- user-select: none;
185
- padding-top: 1.3rem;
186
- position: absolute;
187
- top: 0;
188
- left: 0;
189
- width: 100%;
190
- line-height: 1.4;
191
-
192
- .highlight-line {
193
- background-color: rgba(0, 0, 0, 66%);
194
- }
195
- }
196
-
197
- &:not(.line-numbers-mode) {
198
- .line-numbers {
199
- display: none;
200
- }
201
- }
202
-
203
- &.line-numbers-mode {
204
- .highlight-lines .highlight-line {
205
- position: relative;
206
-
207
- &::before {
208
- content: ' ';
209
- position: absolute;
210
- z-index: 2;
211
- left: 0;
212
- top: 0;
213
- display: block;
214
- width: $lineNumbersWrapperWidth;
215
- height: 100%;
216
- background-color: rgba(0, 0, 0, 66%);
217
- }
218
- }
219
-
220
- pre {
221
- margin-left: $lineNumbersWrapperWidth;
222
- padding-left: 1rem;
223
- vertical-align: middle;
224
- }
225
-
226
- .line-numbers {
227
- position: absolute;
228
- top: 0;
229
- width: $lineNumbersWrapperWidth;
230
- text-align: center;
231
- color: rgba(255, 255, 255, 0.3);
232
- padding-top: 1.25rem;
233
- line-height: 1.4;
234
-
235
- br {
236
- user-select: none;
237
- }
238
-
239
- .line-number {
240
- position: relative;
241
- z-index: 3;
242
- user-select: none;
243
- font-size: 0.85em;
244
- }
245
- }
246
-
247
- &::after {
248
- content: '';
249
- position: absolute;
250
- top: 0;
251
- left: 0;
252
- width: $lineNumbersWrapperWidth;
253
- height: 100%;
254
- border-radius: 6px 0 0 6px;
255
- border-right: 1px solid rgba(0, 0, 0, 66%);
256
- background-color: $codeBgColor;
257
- }
258
- }
259
- }
260
-
261
- @each $lang in $codeLang {
262
- div[class*='language-'].ext-#{$lang} {
263
- &:before {
264
- content: '' + $lang;
265
- }
266
- }
267
- }
268
-
269
- // narrow mobile
270
- @media (max-width: $MQMobileNarrow) {
271
- #{$contentClass} {
272
- div[class*='language-'] {
273
- margin: 0.85rem -1.5rem;
274
- border-radius: 0;
275
- }
276
- }
277
- }
@@ -1,78 +0,0 @@
1
- @use 'sass:color';
2
-
3
- @import '_variables';
4
-
5
- .custom-container {
6
- .custom-container-title {
7
- font-weight: 600;
8
- margin-bottom: -0.4rem;
9
- }
10
-
11
- &.tip,
12
- &.warning,
13
- &.danger {
14
- padding: 0.1rem 1.5rem;
15
- border-left-width: 0.5rem;
16
- border-left-style: solid;
17
- margin: 1rem 0;
18
- }
19
-
20
- &.tip {
21
- background-color: #f3f5f7;
22
- border-color: $tipColor;
23
- }
24
-
25
- &.warning {
26
- background-color: color.scale($warningColor, $lightness: 90%);
27
- border-color: $warningColor;
28
- color: color.scale($warningColor, $lightness: -50%);
29
-
30
- .custom-container-title {
31
- color: color.scale($warningColor, $lightness: -25%);
32
- }
33
-
34
- a {
35
- color: $textColor;
36
- }
37
- }
38
-
39
- &.danger {
40
- background-color: color.scale($dangerColor, $lightness: 90%);
41
- border-color: $dangerColor;
42
- color: color.scale($dangerColor, $lightness: -50%);
43
-
44
- .custom-container-title {
45
- color: color.scale($dangerColor, $lightness: -25%);
46
- }
47
-
48
- a {
49
- color: $textColor;
50
- }
51
- }
52
-
53
- &.details {
54
- display: block;
55
- position: relative;
56
- border-radius: 2px;
57
- margin: 1.6em 0;
58
- padding: 1.6em;
59
- background-color: #eee;
60
-
61
- h4 {
62
- margin-top: 0;
63
- }
64
-
65
- figure,
66
- p {
67
- &:last-child {
68
- margin-bottom: 0;
69
- padding-bottom: 0;
70
- }
71
- }
72
-
73
- summary {
74
- outline: none;
75
- cursor: pointer;
76
- }
77
- }
78
- }