@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,200 @@
1
+ html,
2
+ body {
3
+ padding: 0;
4
+ margin: 0;
5
+ background-color: var(--c-bg);
6
+ transition: background-color var(--t-color);
7
+ }
8
+
9
+ html.dark {
10
+ color-scheme: dark;
11
+ }
12
+
13
+ html {
14
+ font-size: 16px;
15
+ }
16
+
17
+ body {
18
+ font-family: var(--font-family);
19
+ -webkit-font-smoothing: antialiased;
20
+ -moz-osx-font-smoothing: grayscale;
21
+ font-size: 1rem;
22
+ color: var(--c-text);
23
+ }
24
+
25
+ a {
26
+ font-weight: 500;
27
+ color: var(--c-text-accent);
28
+ text-decoration: none;
29
+ overflow-wrap: break-word;
30
+ }
31
+
32
+ p a code {
33
+ font-weight: 400;
34
+ color: var(--c-text-accent);
35
+ }
36
+
37
+ kbd {
38
+ font-family: var(--font-family-code);
39
+ color: var(--c-text);
40
+ background: var(--c-bg-lighter);
41
+ border: solid 0.15rem var(--c-border-dark);
42
+ border-bottom: solid 0.25rem var(--c-border-dark);
43
+ border-radius: 0.15rem;
44
+ padding: 0 0.15em;
45
+ }
46
+
47
+ code {
48
+ font-family: var(--font-family-code);
49
+ color: var(--c-text-lighter);
50
+ padding: 0.25rem 0.5rem;
51
+ margin: 0;
52
+ font-size: 0.85em;
53
+ background-color: var(--c-bg-light);
54
+ border-radius: 3px;
55
+ overflow-wrap: break-word;
56
+ transition: background-color var(--t-color);
57
+ }
58
+
59
+ blockquote {
60
+ font-size: 1rem;
61
+ color: var(--c-text-quote);
62
+ border-left: 0.2rem solid var(--c-border-dark);
63
+ margin: 1rem 0;
64
+ padding: 0.25rem 0 0.25rem 1rem;
65
+ overflow-wrap: break-word;
66
+
67
+ & > p {
68
+ margin: 0;
69
+ }
70
+ }
71
+
72
+ ul,
73
+ ol {
74
+ padding-left: 1.2em;
75
+ }
76
+
77
+ strong {
78
+ font-weight: 600;
79
+ }
80
+
81
+ h1,
82
+ h2,
83
+ h3,
84
+ h4,
85
+ h5,
86
+ h6 {
87
+ font-weight: 600;
88
+ line-height: 1.25;
89
+ overflow-wrap: break-word;
90
+
91
+ &:focus-visible {
92
+ outline: none;
93
+ }
94
+
95
+ &:hover .header-anchor {
96
+ opacity: 1;
97
+ }
98
+ }
99
+
100
+ h1 {
101
+ font-size: 2.2rem;
102
+ }
103
+
104
+ h2 {
105
+ font-size: 1.65rem;
106
+ padding-bottom: 0.3rem;
107
+ border-bottom: 1px solid var(--c-border);
108
+ transition: border-color var(--t-color);
109
+ }
110
+
111
+ h3 {
112
+ font-size: 1.35rem;
113
+ }
114
+
115
+ h4 {
116
+ font-size: 1.15rem;
117
+ }
118
+
119
+ h5 {
120
+ font-size: 1.05rem;
121
+ }
122
+
123
+ h6 {
124
+ font-size: 1rem;
125
+ }
126
+
127
+ a {
128
+ &.header-anchor {
129
+ font-size: 0.85em;
130
+ float: left;
131
+ margin-left: -0.87em;
132
+ padding-right: 0.23em;
133
+ margin-top: 0.125em;
134
+ opacity: 0;
135
+ user-select: none;
136
+
137
+ @media print {
138
+ display: none;
139
+ }
140
+
141
+ &:hover {
142
+ text-decoration: none;
143
+ }
144
+
145
+ &:focus-visible {
146
+ opacity: 1;
147
+ }
148
+ }
149
+
150
+ @media print {
151
+ &[href^="http://"],
152
+ &[href^="https://"]
153
+ {
154
+ &::after {
155
+ content: ' (' attr(href) ') ';
156
+ }
157
+ }
158
+ }
159
+ }
160
+
161
+ p,
162
+ ul,
163
+ ol {
164
+ line-height: 1.7;
165
+ overflow-wrap: break-word;
166
+ }
167
+
168
+ hr {
169
+ border: 0;
170
+ border-top: 1px solid var(--c-border);
171
+ }
172
+
173
+ table {
174
+ border-collapse: collapse;
175
+ margin: 1rem 0;
176
+ display: block;
177
+ overflow-x: auto;
178
+ transition: border-color var(--t-color);
179
+ }
180
+
181
+ tr {
182
+ border-top: 1px solid var(--c-border-dark);
183
+ transition: border-color var(--t-color);
184
+
185
+ &:nth-child(2n) {
186
+ background-color: var(--c-bg-light);
187
+ transition: background-color var(--t-color);
188
+
189
+ code {
190
+ background-color: var(--c-bg-dark);
191
+ }
192
+ }
193
+ }
194
+
195
+ th,
196
+ td {
197
+ padding: 0.6em 1em;
198
+ border: 1px solid var(--c-border-dark);
199
+ transition: border-color var(--t-color);
200
+ }
@@ -1,15 +1,18 @@
1
- @use 'sass:color';
2
-
1
+ @import '_mixins';
3
2
  @import '_variables';
4
- @import '_wrapper';
5
3
 
6
4
  .page {
7
5
  padding-bottom: 2rem;
8
6
  display: block;
7
+
8
+ .theme-default-content {
9
+ @include content_wrapper;
10
+ padding-top: 0;
11
+ }
9
12
  }
10
13
 
11
14
  .page-meta {
12
- @extend %wrapper;
15
+ @include content_wrapper;
13
16
  padding-top: 1rem;
14
17
  padding-bottom: 1rem;
15
18
  overflow: auto;
@@ -20,18 +23,22 @@
20
23
 
21
24
  .meta-item-label {
22
25
  font-weight: 500;
23
- color: color.scale($textColor, $lightness: 25%);
26
+ color: var(--c-text-lighter);
24
27
  }
25
28
 
26
29
  .meta-item-info {
27
30
  font-weight: 400;
28
- color: #767676;
31
+ color: var(--c-text-quote);
29
32
  }
30
33
  }
31
34
 
32
35
  .edit-link {
33
36
  display: inline-block;
34
37
  margin-right: 0.25rem;
38
+
39
+ @media print {
40
+ display: none;
41
+ }
35
42
  }
36
43
 
37
44
  .last-updated {
@@ -53,19 +60,28 @@
53
60
  }
54
61
 
55
62
  .page-nav {
56
- @extend %wrapper;
63
+ @include content_wrapper;
57
64
  padding-top: 1rem;
58
65
  padding-bottom: 0;
59
66
 
60
67
  .inner {
61
68
  min-height: 2rem;
62
69
  margin-top: 0;
63
- border-top: 1px solid $borderColor;
70
+ border-top: 1px solid var(--c-border);
71
+ transition: border-color var(--t-color);
64
72
  padding-top: 1rem;
65
73
  overflow: auto;
66
74
  }
67
75
 
76
+ .prev {
77
+ a:before {
78
+ content: '←';
79
+ }
80
+ }
68
81
  .next {
69
82
  float: right;
83
+ a:after {
84
+ content: '→';
85
+ }
70
86
  }
71
87
  }
@@ -0,0 +1,134 @@
1
+ @import '_mixins';
2
+ @import '_variables';
3
+
4
+ .sidebar {
5
+ ul {
6
+ padding: 0;
7
+ margin: 0;
8
+ list-style-type: none;
9
+ }
10
+
11
+ a {
12
+ display: inline-block;
13
+ }
14
+
15
+ .navbar-items {
16
+ display: none;
17
+ border-bottom: 1px solid var(--c-border);
18
+ transition: border-color var(--t-color);
19
+ padding: 0.5rem 0 0.75rem 0;
20
+
21
+ a {
22
+ font-weight: 600;
23
+ }
24
+
25
+ .navbar-item {
26
+ display: block;
27
+ line-height: 1.25rem;
28
+ font-size: 1.1em;
29
+ padding: 0.5rem 0 0.5rem 1.5rem;
30
+ }
31
+ }
32
+
33
+ .sidebar-items {
34
+ padding: 1.5rem 0;
35
+ }
36
+ }
37
+
38
+ @media (max-width: $MQMobile) {
39
+ .sidebar {
40
+ .navbar-items {
41
+ display: block;
42
+
43
+ .navbar-dropdown-wrapper
44
+ .navbar-dropdown
45
+ .navbar-dropdown-item
46
+ a.router-link-active::after {
47
+ top: calc(1rem - 2px);
48
+ }
49
+ }
50
+
51
+ .sidebar-items {
52
+ padding: 1rem 0;
53
+ }
54
+ }
55
+ }
56
+
57
+ .sidebar-item {
58
+ cursor: default;
59
+ border-left: 0.25rem solid transparent;
60
+ color: var(--c-text);
61
+
62
+ &:focus-visible {
63
+ outline-width: 1px;
64
+ outline-offset: -1px;
65
+ }
66
+
67
+ &.active:not(p.sidebar-heading) {
68
+ font-weight: 600;
69
+ color: var(--c-text-accent);
70
+ border-left-color: var(--c-text-accent);
71
+ }
72
+
73
+ &.sidebar-heading {
74
+ transition: color 0.15s ease;
75
+ font-size: 1.1em;
76
+ font-weight: bold;
77
+ padding: 0.35rem 1.5rem 0.35rem 1.25rem;
78
+ width: 100%;
79
+ box-sizing: border-box;
80
+ margin: 0;
81
+
82
+ + .sidebar-item-children {
83
+ @include dropdown_wrapper;
84
+ margin-bottom: 0.75rem;
85
+ }
86
+ }
87
+
88
+ &.collapsible {
89
+ cursor: pointer;
90
+
91
+ .arrow {
92
+ position: relative;
93
+ top: -0.12em;
94
+ left: 0.5em;
95
+ }
96
+ }
97
+
98
+ &:not(.sidebar-heading) {
99
+ font-size: 1em;
100
+ font-weight: 400;
101
+ display: inline-block;
102
+ margin: 0;
103
+ padding: 0.35rem 1rem 0.35rem 2rem;
104
+ line-height: 1.4;
105
+ width: 100%;
106
+ box-sizing: border-box;
107
+
108
+ & + .sidebar-item-children {
109
+ padding-left: 1rem;
110
+ font-size: 0.95em;
111
+ }
112
+
113
+ .sidebar-item-children .sidebar-item-children & {
114
+ padding: 0.25rem 1rem 0.25rem 1.75rem;
115
+
116
+ &.active {
117
+ font-weight: 500;
118
+ border-left-color: transparent;
119
+ }
120
+ }
121
+
122
+ a.sidebar-heading + .sidebar-item-children &.active {
123
+ border-left-color: transparent;
124
+ }
125
+ }
126
+ }
127
+
128
+ a.sidebar-item {
129
+ cursor: pointer;
130
+
131
+ &:hover {
132
+ color: var(--c-text-accent);
133
+ }
134
+ }
File without changes
@@ -0,0 +1,22 @@
1
+ /**
2
+ * dropdown
3
+ */
4
+ .dropdown-enter-from,
5
+ .dropdown-leave-to {
6
+ height: 0 !important;
7
+ }
8
+
9
+ /**
10
+ * fade-slide-y
11
+ */
12
+ .fade-slide-y-enter-active {
13
+ transition: all 0.2s ease;
14
+ }
15
+ .fade-slide-y-leave-active {
16
+ transition: all 0.2s cubic-bezier(1, 0.5, 0.8, 1);
17
+ }
18
+ .fade-slide-y-enter-from,
19
+ .fade-slide-y-leave-to {
20
+ transform: translateY(10px);
21
+ opacity: 0;
22
+ }
@@ -0,0 +1,68 @@
1
+ html.dark {
2
+ // brand colors
3
+ --c-brand: #3aa675;
4
+ --c-brand-light: #349469;
5
+
6
+ // background colors
7
+ --c-bg: #22272e;
8
+ --c-bg-light: #2b313a;
9
+ --c-bg-lighter: #262c34;
10
+ --c-bg-dark: #343b44;
11
+ --c-bg-darker: #37404c;
12
+
13
+ // text colors
14
+ --c-text: #adbac7;
15
+ --c-text-light: #96a7b7;
16
+ --c-text-lighter: #8b9eb0;
17
+ --c-text-lightest: #8094a8;
18
+
19
+ // border colors
20
+ --c-border: #3e4c5a;
21
+ --c-border-dark: #34404c;
22
+
23
+ // custom container colors
24
+ --c-tip: #318a62;
25
+ --c-warning: #e0ad15;
26
+ --c-warning-bg: #2d2f2d;
27
+ --c-warning-bg-light: #423e2a;
28
+ --c-warning-bg-lighter: #44442f;
29
+ --c-warning-border-dark: #957c35;
30
+ --c-warning-details-bg: #39392d;
31
+ --c-warning-title: #fdca31;
32
+ --c-warning-text: #d8d96d;
33
+ --c-warning-text-accent: #ffbf00;
34
+ --c-warning-text-light: #ddb84b;
35
+ --c-warning-text-quote: #ccab49;
36
+ --c-danger: #fc1e38;
37
+ --c-danger-bg: #39232c;
38
+ --c-danger-bg-light: #4b2b35;
39
+ --c-danger-bg-lighter: #553040;
40
+ --c-danger-border-dark: #a25151;
41
+ --c-danger-details-bg: #482936;
42
+ --c-danger-title: #fc2d3b;
43
+ --c-danger-text: #ea9ca0;
44
+ --c-danger-text-accent: #fd3636;
45
+ --c-danger-text-light: #d9777c;
46
+ --c-danger-text-quote: #d56b6b;
47
+ --c-details-bg: #323843;
48
+
49
+ // badge component colors
50
+ --c-badge-warning: var(--c-warning);
51
+ --c-badge-warning-text: #3c2e05;
52
+ --c-badge-danger: var(--c-danger);
53
+ --c-badge-danger-text: #401416;
54
+
55
+ // code blocks vars
56
+ --code-hl-bg-color: #363b46;
57
+ }
58
+
59
+ // plugin-docsearch
60
+ html.dark .DocSearch {
61
+ --docsearch-logo-color: var(--c-text);
62
+ --docsearch-modal-shadow: inset 1px 1px 0 0 #2c2e40, 0 3px 8px 0 #000309;
63
+ --docsearch-key-shadow: inset 0 -2px 0 0 #282d55, inset 0 0 1px 1px #51577d,
64
+ 0 2px 2px 0 rgba(3, 4, 9, 0.3);
65
+ --docsearch-key-gradient: linear-gradient(-225deg, #444950, #1c1e21);
66
+ --docsearch-footer-shadow: inset 0 1px 0 0 rgba(73, 76, 106, 0.5),
67
+ 0 -4px 8px 0 rgba(0, 0, 0, 0.2);
68
+ }
@@ -0,0 +1,149 @@
1
+ :root {
2
+ // brand colors
3
+ --c-brand: #3eaf7c;
4
+ --c-brand-light: #4abf8a;
5
+
6
+ // background colors
7
+ --c-bg: #ffffff;
8
+ --c-bg-light: #f3f4f5;
9
+ --c-bg-lighter: #eeeeee;
10
+ --c-bg-dark: #ebebec;
11
+ --c-bg-darker: #e6e6e6;
12
+ --c-bg-navbar: var(--c-bg);
13
+ --c-bg-sidebar: var(--c-bg);
14
+ --c-bg-arrow: #cccccc;
15
+
16
+ // text colors
17
+ --c-text: #2c3e50;
18
+ --c-text-accent: var(--c-brand);
19
+ --c-text-light: #3a5169;
20
+ --c-text-lighter: #4e6e8e;
21
+ --c-text-lightest: #6a8bad;
22
+ --c-text-quote: #999999;
23
+
24
+ // border colors
25
+ --c-border: #eaecef;
26
+ --c-border-dark: #dfe2e5;
27
+
28
+ // custom container colors
29
+ --c-tip: #42b983;
30
+ --c-tip-bg: var(--c-bg-light);
31
+ --c-tip-title: var(--c-text);
32
+ --c-tip-text: var(--c-text);
33
+ --c-tip-text-accent: var(--c-text-accent);
34
+ --c-warning: #ffc310;
35
+ --c-warning-bg: #fffae3;
36
+ --c-warning-bg-light: #fff3ba;
37
+ --c-warning-bg-lighter: #fff0b0;
38
+ --c-warning-border-dark: #f7dc91;
39
+ --c-warning-details-bg: #fff5ca;
40
+ --c-warning-title: #f1b300;
41
+ --c-warning-text: #746000;
42
+ --c-warning-text-accent: #edb100;
43
+ --c-warning-text-light: #c1971c;
44
+ --c-warning-text-quote: #ccab49;
45
+ --c-danger: #f11e37;
46
+ --c-danger-bg: #ffe0e0;
47
+ --c-danger-bg-light: #ffcfde;
48
+ --c-danger-bg-lighter: #ffc9c9;
49
+ --c-danger-border-dark: #f1abab;
50
+ --c-danger-details-bg: #ffd4d4;
51
+ --c-danger-title: #ed1e2c;
52
+ --c-danger-text: #660000;
53
+ --c-danger-text-accent: #bd1a1a;
54
+ --c-danger-text-light: #b5474d;
55
+ --c-danger-text-quote: #c15b5b;
56
+ --c-details-bg: #eeeeee;
57
+
58
+ // badge component colors
59
+ --c-badge-tip: var(--c-tip);
60
+ --c-badge-warning: #ecc808;
61
+ --c-badge-warning-text: var(--c-bg);
62
+ --c-badge-danger: #dc2626;
63
+ --c-badge-danger-text: var(--c-bg);
64
+
65
+ // transition vars
66
+ --t-color: 0.3s ease;
67
+ --t-transform: 0.3s ease;
68
+
69
+ // code blocks vars
70
+ --code-bg-color: #282c34;
71
+ --code-hl-bg-color: rgba(0, 0, 0, 0.66);
72
+ --code-ln-color: #9e9e9e;
73
+ --code-ln-wrapper-width: 3.5rem;
74
+
75
+ // font vars
76
+ --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
77
+ Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
78
+ --font-family-code: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
79
+
80
+ // layout vars
81
+ --navbar-height: 3.6rem;
82
+ --navbar-padding-v: 0.7rem;
83
+ --navbar-padding-h: 1.5rem;
84
+ --sidebar-width: 20rem;
85
+ --sidebar-width-mobile: calc(var(--sidebar-width) * 0.82);
86
+ --content-width: 740px;
87
+ --homepage-width: 960px;
88
+ }
89
+
90
+ // plugin-back-to-top
91
+ .back-to-top {
92
+ --back-to-top-color: var(--c-brand);
93
+ --back-to-top-color-hover: var(--c-brand-light);
94
+ }
95
+
96
+ // plugin-docsearch
97
+ .DocSearch {
98
+ --docsearch-primary-color: var(--c-brand);
99
+ --docsearch-text-color: var(--c-text);
100
+ --docsearch-highlight-color: var(--c-brand);
101
+ --docsearch-muted-color: var(--c-text-quote);
102
+ --docsearch-container-background: rgba(9, 10, 17, 0.8);
103
+ --docsearch-modal-background: var(--c-bg-light);
104
+ --docsearch-searchbox-background: var(--c-bg-lighter);
105
+ --docsearch-searchbox-focus-background: var(--c-bg);
106
+ --docsearch-searchbox-shadow: inset 0 0 0 2px var(--c-brand);
107
+ --docsearch-hit-color: var(--c-text-light);
108
+ --docsearch-hit-active-color: var(--c-bg);
109
+ --docsearch-hit-background: var(--c-bg);
110
+ --docsearch-hit-shadow: 0 1px 3px 0 var(--c-border-dark);
111
+ --docsearch-footer-background: var(--c-bg);
112
+ }
113
+
114
+ // plugin-external-link-icon
115
+ .external-link-icon {
116
+ --external-link-icon-color: var(--c-text-quote);
117
+ }
118
+
119
+ // plugin-medium-zoom
120
+ .medium-zoom-overlay {
121
+ --medium-zoom-bg-color: var(--c-bg);
122
+ }
123
+
124
+ // plugin-nprogress
125
+ #nprogress {
126
+ --nprogress-color: var(--c-brand);
127
+ }
128
+
129
+ // plugin-pwa-popup
130
+ .pwa-popup {
131
+ --pwa-popup-text-color: var(--c-text);
132
+ --pwa-popup-bg-color: var(--c-bg);
133
+ --pwa-popup-border-color: var(--c-brand);
134
+ --pwa-popup-shadow: 0 4px 16px var(--c-brand);
135
+ --pwa-popup-btn-text-color: var(--c-bg);
136
+ --pwa-popup-btn-bg-color: var(--c-brand);
137
+ --pwa-popup-btn-hover-bg-color: var(--c-brand-light);
138
+ }
139
+
140
+ // plugin-search
141
+ .search-box {
142
+ --search-bg-color: var(--c-bg);
143
+ --search-accent-color: var(--c-brand);
144
+ --search-text-color: var(--c-text);
145
+ --search-border-color: var(--c-border);
146
+
147
+ --search-item-text-color: var(--c-text-lighter);
148
+ --search-item-focus-bg-color: var(--c-bg-light);
149
+ }
@@ -0,0 +1,3 @@
1
+ export * from './isActiveSidebarItem.js';
2
+ export * from './resolveEditLink.js';
3
+ export * from './resolveRepoType.js';
@@ -0,0 +1,3 @@
1
+ export * from './isActiveSidebarItem.js';
2
+ export * from './resolveEditLink.js';
3
+ export * from './resolveRepoType.js';
@@ -0,0 +1,3 @@
1
+ import type { RouteLocationNormalizedLoaded } from 'vue-router';
2
+ import type { ResolvedSidebarItem } from '../../shared/index.js';
3
+ export declare const isActiveSidebarItem: (item: ResolvedSidebarItem, route: RouteLocationNormalizedLoaded) => boolean;
@@ -0,0 +1,20 @@
1
+ const normalizePath = (path) => decodeURI(path)
2
+ .replace(/#.*$/, '')
3
+ .replace(/(index)?\.(md|html)$/, '');
4
+ const isActiveLink = (link, route) => {
5
+ if (route.hash === link) {
6
+ return true;
7
+ }
8
+ const currentPath = normalizePath(route.path);
9
+ const targetPath = normalizePath(link);
10
+ return currentPath === targetPath;
11
+ };
12
+ export const isActiveSidebarItem = (item, route) => {
13
+ if (item.link && isActiveLink(item.link, route)) {
14
+ return true;
15
+ }
16
+ if (item.children) {
17
+ return item.children.some((child) => isActiveSidebarItem(child, route));
18
+ }
19
+ return false;
20
+ };
@@ -1,9 +1,9 @@
1
- import type { RepoType } from './resolveRepoType';
1
+ import type { RepoType } from './resolveRepoType.js';
2
2
  export declare const editLinkPatterns: Record<Exclude<RepoType, null>, string>;
3
3
  export declare const resolveEditLink: ({ docsRepo, docsBranch, docsDir, filePathRelative, editLinkPattern, }: {
4
4
  docsRepo: string;
5
5
  docsBranch: string;
6
6
  docsDir: string;
7
- filePathRelative: string;
7
+ filePathRelative: string | null;
8
8
  editLinkPattern?: string | undefined;
9
9
  }) => string | null;