@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
@@ -1,152 +0,0 @@
1
- @import '_variables';
2
-
3
- .sidebar {
4
- ul {
5
- padding: 0;
6
- margin: 0;
7
- list-style-type: none;
8
- }
9
-
10
- a {
11
- display: inline-block;
12
- }
13
-
14
- .navbar-links {
15
- display: none;
16
- border-bottom: 1px solid $borderColor;
17
- padding: 0.5rem 0 0.75rem 0;
18
-
19
- a {
20
- font-weight: 600;
21
- }
22
-
23
- .navbar-links-item {
24
- display: block;
25
- line-height: 1.25rem;
26
- font-size: 1.1em;
27
- padding: 0.5rem 0 0.5rem 1.5rem;
28
- }
29
- }
30
-
31
- & > .sidebar-links {
32
- padding: 1.5rem 0;
33
-
34
- & > li > a.sidebar-link {
35
- font-size: 1.1em;
36
- line-height: 1.7;
37
- font-weight: bold;
38
- }
39
-
40
- & > li:not(:first-child) {
41
- margin-top: 0.75rem;
42
- }
43
- }
44
- }
45
-
46
- @media (max-width: $MQMobile) {
47
- .sidebar {
48
- .navbar-links {
49
- display: block;
50
-
51
- .dropdown-wrapper
52
- .nav-dropdown
53
- .dropdown-item
54
- a.router-link-active::after {
55
- top: calc(1rem - 2px);
56
- }
57
- }
58
-
59
- & > .sidebar-links {
60
- padding: 1rem 0;
61
- }
62
- }
63
- }
64
-
65
- /**
66
- * sidebar child
67
- */
68
- .sidebar-group {
69
- .sidebar-links > &:not(:first-child) {
70
- margin-top: 0.75rem;
71
- }
72
- .sidebar-group {
73
- & > .sidebar-heading {
74
- opacity: 0.5;
75
- font-size: 0.95em;
76
- line-height: 1.4;
77
- font-weight: normal;
78
- padding-left: 2rem;
79
- }
80
- }
81
- }
82
-
83
- .sidebar-heading {
84
- color: $textColor;
85
- transition: color 0.15s ease;
86
- cursor: default;
87
- font-size: 1.1em;
88
- font-weight: bold;
89
- padding: 0.35rem 1.5rem 0.35rem 1.25rem;
90
- width: 100%;
91
- box-sizing: border-box;
92
- margin: 0;
93
- border-left: 0.25rem solid transparent;
94
-
95
- &.open,
96
- &:hover {
97
- color: inherit;
98
- }
99
-
100
- .arrow {
101
- position: relative;
102
- top: -0.12em;
103
- left: 0.5em;
104
- }
105
- }
106
-
107
- .sidebar .sidebar-sub-headers {
108
- padding-left: 1rem;
109
- font-size: 0.95em;
110
- }
111
-
112
- .sidebar-link {
113
- font-size: 1em;
114
- font-weight: 400;
115
- display: inline-block;
116
- color: $textColor;
117
- border-left: 0.25rem solid transparent;
118
- margin: 0;
119
- padding: 0.35rem 1rem 0.35rem 1.25rem;
120
- line-height: 1.4;
121
- width: 100%;
122
- box-sizing: border-box;
123
-
124
- .sidebar-group & {
125
- padding-left: 2rem;
126
- }
127
-
128
- .sidebar-sub-headers & {
129
- padding-top: 0.25rem;
130
- padding-bottom: 0.25rem;
131
- border-left: none;
132
-
133
- &.active {
134
- font-weight: 500;
135
- }
136
- }
137
- }
138
-
139
- a.sidebar-heading,
140
- a.sidebar-link {
141
- cursor: pointer;
142
-
143
- &.active {
144
- font-weight: 600;
145
- color: $accentColor;
146
- border-left-color: $accentColor;
147
- }
148
-
149
- &:hover {
150
- color: $accentColor;
151
- }
152
- }
@@ -1,12 +0,0 @@
1
- .sr-only {
2
- position: absolute;
3
- width: 1px;
4
- height: 1px;
5
- padding: 0;
6
- margin: -1px;
7
- overflow: hidden;
8
- clip: rect(0, 0, 0, 0);
9
- white-space: nowrap;
10
- border-width: 0;
11
- user-select: none;
12
- }
@@ -1,13 +0,0 @@
1
- .fade-slide-y-enter-active {
2
- transition: all 0.3s ease;
3
- }
4
-
5
- .fade-slide-y-leave-active {
6
- transition: all 0.3s cubic-bezier(1, 0.5, 0.8, 1);
7
- }
8
-
9
- .fade-slide-y-enter-from,
10
- .fade-slide-y-leave-to {
11
- transform: translateY(10px);
12
- opacity: 0;
13
- }
@@ -1,3 +0,0 @@
1
- export * from './nav';
2
- export * from './options';
3
- export * from './page';
@@ -1,15 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
- };
12
- Object.defineProperty(exports, "__esModule", { value: true });
13
- __exportStar(require("./nav"), exports);
14
- __exportStar(require("./options"), exports);
15
- __exportStar(require("./page"), exports);
@@ -1,44 +0,0 @@
1
- /**
2
- * Base nav item, displayed as text
3
- */
4
- export interface NavItem {
5
- text: string;
6
- ariaLabel?: string;
7
- }
8
- /**
9
- * Base nav group, has nav items children
10
- */
11
- export interface NavGroup<T> extends NavItem {
12
- children: T[];
13
- }
14
- /**
15
- * Props for `<NavLink>`
16
- */
17
- export interface NavLink extends NavItem {
18
- link: string;
19
- rel?: string;
20
- target?: string;
21
- }
22
- /**
23
- * Navbar types
24
- */
25
- export declare type NavbarItem = NavLink;
26
- export declare type NavbarGroup = NavGroup<NavbarGroup | NavbarItem | string>;
27
- export declare type NavbarConfig = (NavbarItem | NavbarGroup | string)[];
28
- export declare type ResolvedNavbarItem = NavbarItem | NavGroup<ResolvedNavbarItem>;
29
- /**
30
- * Sidebar types
31
- */
32
- export interface SidebarItem extends NavLink, NavGroup<NavLink | SidebarItem | string> {
33
- isGroup?: false;
34
- }
35
- export interface SidebarGroup extends NavGroup<SidebarGroup | NavLink | SidebarItem | string> {
36
- isGroup: true;
37
- }
38
- export declare type SidebarConfigArray = (SidebarGroup | SidebarItem | string)[];
39
- export declare type SidebarConfigObject = Record<string, SidebarConfigArray>;
40
- export declare type SidebarConfig = SidebarConfigArray | SidebarConfigObject;
41
- export interface ResolvedSidebarItem extends Partial<NavLink> {
42
- isGroup?: boolean;
43
- children?: ResolvedSidebarItem[];
44
- }
package/lib/types/nav.js DELETED
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
package/lib/types/page.js DELETED
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- export * from './resolveEditLink';
2
- export * from './resolveRepoType';
@@ -1,2 +0,0 @@
1
- export * from './resolveEditLink';
2
- export * from './resolveRepoType';
@@ -1,2 +0,0 @@
1
- export declare type RepoType = 'GitHub' | 'GitLab' | 'Bitbucket' | null;
2
- export declare const resolveRepoType: (repo: string) => RepoType;