@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,197 +0,0 @@
1
- @import '_variables';
2
-
3
- .dropdown-wrapper {
4
- cursor: pointer;
5
-
6
- .dropdown-title {
7
- display: block;
8
- font-size: 0.9rem;
9
- font-family: inherit;
10
- cursor: inherit;
11
- padding: inherit;
12
- line-height: 1.4rem;
13
- background: transparent;
14
- border: none;
15
- font-weight: 500;
16
- color: $textColor;
17
-
18
- &:hover {
19
- border-color: transparent;
20
- }
21
-
22
- .arrow {
23
- vertical-align: middle;
24
- margin-top: -1px;
25
- margin-left: 0.4rem;
26
- }
27
- }
28
-
29
- .mobile-dropdown-title {
30
- @extend .dropdown-title;
31
- display: none;
32
- font-weight: 600;
33
-
34
- font-size inherit {
35
- &:hover {
36
- color: $accentColor;
37
- }
38
- }
39
- }
40
-
41
- .nav-dropdown {
42
- .dropdown-item {
43
- color: inherit;
44
- line-height: 1.7rem;
45
-
46
- .dropdown-subtitle {
47
- margin: 0.45rem 0 0;
48
- border-top: 1px solid #eee;
49
- padding: 1rem 0 0.45rem 0;
50
- font-size: 0.9rem;
51
-
52
- & > span {
53
- padding: 0 1.5rem 0 1.25rem;
54
- }
55
-
56
- & > a {
57
- font-weight: inherit;
58
- &.router-link-active {
59
- &::after {
60
- display: none;
61
- }
62
- }
63
- }
64
- }
65
-
66
- .dropdown-subitem-wrapper {
67
- padding: 0;
68
- list-style: none;
69
-
70
- .dropdown-subitem {
71
- font-size: 0.9em;
72
- }
73
- }
74
-
75
- a {
76
- display: block;
77
- line-height: 1.7rem;
78
- position: relative;
79
- border-bottom: none;
80
- font-weight: 400;
81
- margin-bottom: 0;
82
- padding: 0 1.5rem 0 1.25rem;
83
-
84
- &:hover {
85
- color: $accentColor;
86
- }
87
-
88
- &.router-link-active {
89
- color: $accentColor;
90
-
91
- &::after {
92
- content: '';
93
- width: 0;
94
- height: 0;
95
- border-left: 5px solid $accentColor;
96
- border-top: 3px solid transparent;
97
- border-bottom: 3px solid transparent;
98
- position: absolute;
99
- top: calc(50% - 2px);
100
- left: 9px;
101
- }
102
- }
103
- }
104
-
105
- &:first-child .dropdown-subtitle {
106
- margin-top: 0;
107
- padding-top: 0;
108
- border-top: 0;
109
- }
110
- }
111
- }
112
- }
113
-
114
- @media (max-width: $MQMobile) {
115
- .dropdown-wrapper {
116
- &.open .dropdown-title {
117
- margin-bottom: 0.5rem;
118
- }
119
-
120
- .dropdown-title {
121
- display: none;
122
- }
123
-
124
- .mobile-dropdown-title {
125
- display: block;
126
- }
127
-
128
- .nav-dropdown {
129
- transition: height 0.1s ease-out;
130
- overflow: hidden;
131
-
132
- .dropdown-item {
133
- .dropdown-subtitle {
134
- border-top: 0;
135
- margin-top: 0;
136
- padding-top: 0;
137
- padding-bottom: 0;
138
- }
139
-
140
- .dropdown-subtitle,
141
- & > a {
142
- font-size: 15px;
143
- line-height: 2rem;
144
- }
145
-
146
- .dropdown-subitem {
147
- font-size: 14px;
148
- padding-left: 1rem;
149
- }
150
- }
151
- }
152
- }
153
- }
154
-
155
- @media (min-width: $MQMobile) {
156
- .dropdown-wrapper {
157
- height: 1.8rem;
158
-
159
- &:hover .nav-dropdown,
160
- &.open .nav-dropdown {
161
- // override the inline style.
162
- display: block !important;
163
- }
164
-
165
- &.open:blur {
166
- display: none;
167
- }
168
-
169
- .nav-dropdown {
170
- display: none;
171
- // Avoid height shaked by clicking
172
- height: auto !important;
173
- box-sizing: border-box;
174
- max-height: calc(100vh - 2.7rem);
175
- overflow-y: auto;
176
- position: absolute;
177
- top: 100%;
178
- right: 0;
179
- background-color: #fff;
180
- padding: 0.6rem 0;
181
- border: 1px solid #ddd;
182
- border-bottom-color: #ccc;
183
- text-align: left;
184
- border-radius: 0.25rem;
185
- white-space: nowrap;
186
- margin: 0;
187
- }
188
- }
189
- }
190
-
191
- /**
192
- * transition
193
- */
194
- .dropdown-enter-from,
195
- .dropdown-leave-to {
196
- height: 0 !important;
197
- }
@@ -1,160 +0,0 @@
1
- @use 'sass:color';
2
-
3
- @import '_variables';
4
-
5
- .home {
6
- padding: $navbarHeight 2rem 0;
7
- max-width: $homePageWidth;
8
- margin: 0px auto;
9
- display: block;
10
-
11
- .hero {
12
- text-align: center;
13
-
14
- img {
15
- max-width: 100%;
16
- max-height: 280px;
17
- display: block;
18
- margin: 3rem auto 1.5rem;
19
- }
20
-
21
- h1 {
22
- font-size: 3rem;
23
- }
24
-
25
- h1,
26
- .description,
27
- .actions {
28
- margin: 1.8rem auto;
29
- }
30
-
31
- .description {
32
- max-width: 35rem;
33
- font-size: 1.6rem;
34
- line-height: 1.3;
35
- color: color.scale($textColor, $lightness: 40%);
36
- }
37
-
38
- .action-button {
39
- display: inline-block;
40
- font-size: 1.2rem;
41
- padding: 0.8rem 1.6rem;
42
- border-width: 2px;
43
- border-style: solid;
44
- border-radius: 4px;
45
- transition: background-color 0.1s ease;
46
- box-sizing: border-box;
47
-
48
- &:not(:first-child) {
49
- margin-left: 1.5rem;
50
- }
51
-
52
- &.primary {
53
- color: #fff;
54
- background-color: $accentColor;
55
- border-color: $accentColor;
56
- &:hover {
57
- background-color: color.scale($accentColor, $lightness: 10%);
58
- }
59
- }
60
-
61
- &.secondary {
62
- color: $accentColor;
63
- background-color: #fff;
64
- border-color: $accentColor;
65
- &:hover {
66
- color: #fff;
67
- background-color: color.scale($accentColor, $lightness: 10%);
68
- }
69
- }
70
- }
71
- }
72
-
73
- .features {
74
- border-top: 1px solid $borderColor;
75
- padding: 1.2rem 0;
76
- margin-top: 2.5rem;
77
- display: flex;
78
- flex-wrap: wrap;
79
- align-items: flex-start;
80
- align-content: stretch;
81
- justify-content: space-between;
82
- }
83
-
84
- .feature {
85
- flex-grow: 1;
86
- flex-basis: 30%;
87
- max-width: 30%;
88
-
89
- h2 {
90
- font-size: 1.4rem;
91
- font-weight: 500;
92
- border-bottom: none;
93
- padding-bottom: 0;
94
- color: color.scale($textColor, $lightness: 10%);
95
- }
96
-
97
- p {
98
- color: color.scale($textColor, $lightness: 25%);
99
- }
100
- }
101
-
102
- .footer {
103
- padding: 2.5rem;
104
- border-top: 1px solid $borderColor;
105
- text-align: center;
106
- color: color.scale($textColor, $lightness: 25%);
107
- }
108
- }
109
-
110
- @media (max-width: $MQMobile) {
111
- .home {
112
- .features {
113
- flex-direction: column;
114
- }
115
-
116
- .feature {
117
- max-width: 100%;
118
- padding: 0 2.5rem;
119
- }
120
- }
121
- }
122
-
123
- @media (max-width: $MQMobileNarrow) {
124
- .home {
125
- padding-left: 1.5rem;
126
- padding-right: 1.5rem;
127
-
128
- .hero {
129
- img {
130
- max-height: 210px;
131
- margin: 2rem auto 1.2rem;
132
- }
133
-
134
- h1 {
135
- font-size: 2rem;
136
- }
137
-
138
- h1,
139
- .description,
140
- .actions {
141
- margin: 1.2rem auto;
142
- }
143
-
144
- .description {
145
- font-size: 1.2rem;
146
- }
147
-
148
- .action-button {
149
- font-size: 1rem;
150
- padding: 0.6rem 1.2rem;
151
- }
152
- }
153
-
154
- .feature {
155
- h2 {
156
- font-size: 1.25rem;
157
- }
158
- }
159
- }
160
- }
@@ -1,19 +0,0 @@
1
- @use '_normalize';
2
-
3
- @use 'arrow';
4
- @use 'badge';
5
- @use 'code';
6
- @use 'code-group';
7
- @use 'custom-container';
8
- @use 'dropdown';
9
- @use 'home';
10
- @use 'layout';
11
- @use 'navbar';
12
- @use 'page';
13
- @use 'plugins';
14
- @use 'sidebar';
15
- @use 'sr-only';
16
- @use 'toc';
17
- @use 'transitions';
18
-
19
- @use '@vuepress/plugin-palette/style';
@@ -1,194 +0,0 @@
1
- @import '_variables';
2
- @import '_wrapper';
3
-
4
- $mobileSidebarWidth: $sidebarWidth * 0.82;
5
-
6
- .page {
7
- padding-left: $sidebarWidth;
8
- }
9
-
10
- .navbar {
11
- position: fixed;
12
- z-index: 20;
13
- top: 0;
14
- left: 0;
15
- right: 0;
16
- height: $navbarHeight;
17
- background-color: #fff;
18
- box-sizing: border-box;
19
- border-bottom: 1px solid $borderColor;
20
- }
21
-
22
- .sidebar {
23
- font-size: 16px;
24
- background-color: #fff;
25
- width: $sidebarWidth;
26
- position: fixed;
27
- z-index: 10;
28
- margin: 0;
29
- top: $navbarHeight;
30
- left: 0;
31
- bottom: 0;
32
- box-sizing: border-box;
33
- border-right: 1px solid $borderColor;
34
- overflow-y: auto;
35
- scrollbar-width: thin;
36
- scrollbar-color: $accentColor $borderColor;
37
- &::-webkit-scrollbar {
38
- width: 7px;
39
- }
40
- &::-webkit-scrollbar-track {
41
- background-color: $borderColor;
42
- }
43
- &::-webkit-scrollbar-thumb {
44
- background-color: $accentColor;
45
- }
46
- }
47
-
48
- .sidebar-mask {
49
- position: fixed;
50
- z-index: 9;
51
- top: 0;
52
- left: 0;
53
- width: 100vw;
54
- height: 100vh;
55
- display: none;
56
- }
57
-
58
- .theme-container {
59
- &.sidebar-open {
60
- .sidebar-mask {
61
- display: block;
62
- }
63
- }
64
-
65
- &.no-navbar {
66
- #{$contentClass}:not(.custom) > h1,
67
- h2,
68
- h3,
69
- h4,
70
- h5,
71
- h6 {
72
- margin-top: 1.5rem;
73
- padding-top: 0;
74
- }
75
-
76
- .sidebar {
77
- top: 0;
78
- }
79
- }
80
- }
81
-
82
- @media (min-width: ($MQMobile + 1px)) {
83
- .theme-container.no-sidebar {
84
- .sidebar {
85
- display: none;
86
- }
87
-
88
- .page {
89
- padding-left: 0;
90
- }
91
- }
92
- }
93
-
94
- h1,
95
- h2,
96
- h3,
97
- h4,
98
- h5,
99
- h6 {
100
- #{$contentClass}:not(.custom) > & {
101
- margin-top: 0.5rem - $navbarHeight;
102
- padding-top: ($navbarHeight + 1rem);
103
- margin-bottom: 0;
104
-
105
- &:first-child {
106
- margin-top: -1.5rem;
107
- margin-bottom: 1rem;
108
-
109
- + p,
110
- + pre,
111
- + .custom-container {
112
- margin-top: 2rem;
113
- }
114
- }
115
- }
116
- }
117
-
118
- #{$contentClass}:not(.custom) {
119
- @extend %wrapper;
120
-
121
- > *:first-child {
122
- margin-top: $navbarHeight;
123
- }
124
-
125
- a:hover {
126
- text-decoration: underline;
127
- }
128
-
129
- p.demo {
130
- padding: 1rem 1.5rem;
131
- border: 1px solid #ddd;
132
- border-radius: 4px;
133
- }
134
-
135
- img {
136
- max-width: 100%;
137
- }
138
- }
139
-
140
- #{$contentClass}.custom {
141
- padding: 0;
142
- margin: 0;
143
-
144
- img {
145
- max-width: 100%;
146
- }
147
- }
148
-
149
- // narrow desktop / iPad
150
- @media (max-width: $MQNarrow) {
151
- .sidebar {
152
- font-size: 15px;
153
- width: $mobileSidebarWidth;
154
- }
155
-
156
- .page {
157
- padding-left: $mobileSidebarWidth;
158
- }
159
- }
160
-
161
- // wide mobile
162
- @media (max-width: $MQMobile) {
163
- .sidebar {
164
- top: 0;
165
- padding-top: $navbarHeight;
166
- transform: translateX(-100%);
167
- transition: transform 0.2s ease;
168
- }
169
-
170
- .page {
171
- padding-left: 0;
172
- }
173
-
174
- .theme-container {
175
- &.sidebar-open {
176
- .sidebar {
177
- transform: translateX(0);
178
- }
179
- }
180
-
181
- &.no-navbar {
182
- .sidebar {
183
- padding-top: 0;
184
- }
185
- }
186
- }
187
- }
188
-
189
- // narrow mobile
190
- @media (max-width: $MQMobileNarrow) {
191
- h1 {
192
- font-size: 1.9rem;
193
- }
194
- }
@@ -1,141 +0,0 @@
1
- @use 'sass:color';
2
-
3
- @import '_variables';
4
-
5
- $navbar-vertical-padding: 0.7rem;
6
- $navbar-horizontal-padding: 1.5rem;
7
-
8
- .navbar {
9
- padding: $navbar-vertical-padding $navbar-horizontal-padding;
10
- line-height: $navbarHeight - 1.4rem;
11
-
12
- .logo {
13
- height: $navbarHeight - 1.4rem;
14
- min-width: $navbarHeight - 1.4rem;
15
- margin-right: 0.8rem;
16
- vertical-align: top;
17
- }
18
-
19
- .site-name {
20
- font-size: 1.3rem;
21
- font-weight: 600;
22
- color: $textColor;
23
- position: relative;
24
- }
25
-
26
- .navbar-links-wrapper {
27
- padding-left: 1.5rem;
28
- box-sizing: border-box;
29
- background-color: white;
30
- white-space: nowrap;
31
- font-size: 0.9rem;
32
- position: absolute;
33
- right: $navbar-horizontal-padding;
34
- top: $navbar-vertical-padding;
35
- display: flex;
36
-
37
- .search-box {
38
- flex: 0 0 auto;
39
- vertical-align: top;
40
- }
41
- }
42
- }
43
-
44
- @media (max-width: $MQMobile) {
45
- .navbar {
46
- padding-left: 4rem;
47
-
48
- .can-hide {
49
- display: none;
50
- }
51
-
52
- .navbar-links-wrapper {
53
- padding-left: 1.5rem;
54
- }
55
-
56
- .site-name {
57
- width: calc(100vw - 9.4rem);
58
- overflow: hidden;
59
- white-space: nowrap;
60
- text-overflow: ellipsis;
61
- }
62
- }
63
- }
64
-
65
- /**
66
- * navbar-links
67
- */
68
- .navbar-links {
69
- display: inline-block;
70
-
71
- a {
72
- display: inline-block;
73
- line-height: 1.4rem;
74
- color: inherit;
75
-
76
- &:hover,
77
- &.router-link-active {
78
- color: $accentColor;
79
- }
80
- }
81
-
82
- .navbar-links-item {
83
- position: relative;
84
- display: inline-block;
85
- margin-left: 1.5rem;
86
- line-height: 2rem;
87
-
88
- &:first-child {
89
- margin-left: 0;
90
- }
91
- }
92
- }
93
-
94
- @media (max-width: $MQMobile) {
95
- .navbar-links {
96
- .navbar-links-item {
97
- margin-left: 0;
98
- }
99
- }
100
- }
101
-
102
- @media (min-width: $MQMobile) {
103
- .navbar-links a {
104
- &:hover,
105
- &.router-link-active {
106
- color: $textColor;
107
- }
108
- }
109
-
110
- .navbar-links-item > a:not(.external) {
111
- &:hover,
112
- &.router-link-active {
113
- margin-bottom: -2px;
114
- border-bottom: 2px solid color.scale($accentColor, $lightness: 8%);
115
- }
116
- }
117
- }
118
-
119
- /**
120
- * toggle sidebar button
121
- */
122
- .toggle-sidebar-button {
123
- position: absolute;
124
- top: 0.6rem;
125
- left: 1rem;
126
- display: none;
127
- padding: 0.6rem;
128
- cursor: pointer;
129
- }
130
-
131
- .toggle-sidebar-button .icon {
132
- display: block;
133
- width: 1.25rem;
134
- height: 1.25rem;
135
- }
136
-
137
- @media screen and (max-width: $MQMobile) {
138
- .toggle-sidebar-button {
139
- display: block;
140
- }
141
- }