@frontfactory/vitepress-theme 1.7.0 → 1.8.0

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 (93) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/README.md +148 -5
  3. package/config.d.ts +26 -1
  4. package/config.js +165 -21
  5. package/dist/style.css +1 -1
  6. package/node/llms.js +31 -0
  7. package/node/og.js +159 -0
  8. package/node/pages.js +154 -0
  9. package/node/rss.js +81 -0
  10. package/package.json +42 -28
  11. package/src/blog/posts.data.ts +46 -0
  12. package/src/components/FfBackToTop.vue +18 -9
  13. package/src/components/FfBanner.vue +24 -6
  14. package/src/components/FfCopyStatus.vue +64 -0
  15. package/src/components/FfDocMeta.vue +41 -2
  16. package/src/components/FfFeature.vue +18 -7
  17. package/src/components/FfFeedback.vue +96 -0
  18. package/src/components/FfHero.vue +16 -6
  19. package/src/components/FfHeroCommand.vue +20 -34
  20. package/src/components/FfHomeSponsors.vue +2 -2
  21. package/src/components/FfNavBarTitle.vue +63 -0
  22. package/src/components/FfPost.vue +49 -0
  23. package/src/components/FfProgress.vue +69 -0
  24. package/src/components/FfVersionSwitcher.vue +20 -0
  25. package/src/composables/blog.ts +38 -0
  26. package/src/composables/options.ts +12 -1
  27. package/src/composables/tabs.ts +155 -0
  28. package/src/content/Api.vue +6 -2
  29. package/src/content/Badge.vue +26 -0
  30. package/src/content/Callout.vue +27 -0
  31. package/src/content/FileTree.vue +118 -0
  32. package/src/content/Tab.vue +11 -0
  33. package/src/content/Tabs.vue +74 -0
  34. package/src/content/Timeline.vue +19 -0
  35. package/src/content/TimelineItem.vue +37 -0
  36. package/src/content/timeline.ts +4 -0
  37. package/src/index.ts +37 -1
  38. package/src/internal.ts +7 -2
  39. package/src/layout/FfBlog.vue +62 -0
  40. package/src/layout/FfLayout.vue +17 -1
  41. package/src/styles/_base.scss +1 -5
  42. package/src/styles/_blocks.scss +25 -1
  43. package/src/styles/_blog.scss +131 -0
  44. package/src/styles/_breakpoints.scss +26 -0
  45. package/src/styles/_code.scss +5 -5
  46. package/src/styles/_content.scss +276 -7
  47. package/src/styles/_doc.scss +18 -5
  48. package/src/styles/_home.scss +37 -17
  49. package/src/styles/_motion.scss +12 -3
  50. package/src/styles/_nav.scss +81 -8
  51. package/src/styles/_print.scss +77 -0
  52. package/src/styles/_sidebar.scss +2 -2
  53. package/src/styles/_tokens.scss +73 -7
  54. package/src/styles/index.scss +2 -0
  55. package/src/types.ts +122 -0
  56. package/types/blog/posts.data.d.ts +14 -0
  57. package/types/components/FfBackToTop.vue.d.ts +3 -0
  58. package/types/components/FfBanner.vue.d.ts +3 -0
  59. package/types/components/FfCopyStatus.vue.d.ts +3 -0
  60. package/types/components/FfDocMeta.vue.d.ts +3 -0
  61. package/types/components/FfFeature.vue.d.ts +13 -0
  62. package/types/components/FfFeedback.vue.d.ts +3 -0
  63. package/types/components/FfFooter.vue.d.ts +3 -0
  64. package/types/components/FfHero.vue.d.ts +42 -0
  65. package/types/components/FfHeroCommand.vue.d.ts +9 -0
  66. package/types/components/FfHomeSponsors.vue.d.ts +19 -0
  67. package/types/components/FfNavBarTitle.vue.d.ts +17 -0
  68. package/types/components/FfPost.vue.d.ts +3 -0
  69. package/types/components/FfProgress.vue.d.ts +3 -0
  70. package/types/components/FfVersionSwitcher.vue.d.ts +3 -0
  71. package/types/composables/blog.d.ts +10 -0
  72. package/types/composables/link.d.ts +12 -0
  73. package/types/composables/options.d.ts +15 -0
  74. package/types/composables/relativeTime.d.ts +2 -0
  75. package/types/composables/tabs.d.ts +15 -0
  76. package/types/content/Api.vue.d.ts +27 -0
  77. package/types/content/Badge.vue.d.ts +21 -0
  78. package/types/content/Callout.vue.d.ts +24 -0
  79. package/types/content/Card.vue.d.ts +23 -0
  80. package/types/content/CardGrid.vue.d.ts +20 -0
  81. package/types/content/FileTree.vue.d.ts +6 -0
  82. package/types/content/Kbd.vue.d.ts +15 -0
  83. package/types/content/Steps.vue.d.ts +15 -0
  84. package/types/content/Tab.vue.d.ts +19 -0
  85. package/types/content/Tabs.vue.d.ts +7 -0
  86. package/types/content/Timeline.vue.d.ts +21 -0
  87. package/types/content/TimelineItem.vue.d.ts +21 -0
  88. package/types/content/timeline.d.ts +3 -0
  89. package/types/index.d.ts +25 -0
  90. package/types/internal.d.ts +9 -0
  91. package/types/layout/FfBlog.vue.d.ts +3 -0
  92. package/types/layout/FfLayout.vue.d.ts +23 -0
  93. package/types/types.d.ts +256 -0
@@ -2,6 +2,7 @@
2
2
  // NAVIGATION //
3
3
  // ============================================================================================= //
4
4
 
5
+ @use "breakpoints" as bp;
5
6
  @use "theme" as mg;
6
7
 
7
8
  .ff-theme {
@@ -37,7 +38,7 @@
37
38
  margin-top: 0;
38
39
  }
39
40
 
40
- @media (width >= 960px) {
41
+ @include bp.up("md") {
41
42
  &[data-nav-sticky="false"] .VPContent {
42
43
  padding-top: 0;
43
44
  }
@@ -107,13 +108,13 @@
107
108
  // The gutters have to match the ones the hero uses, or the bar lands a few pixels off the
108
109
  // content it sits above.
109
110
 
110
- @media (width >= 640px) {
111
+ @include bp.up("sm") {
111
112
  .VPNavBar:not(.has-sidebar) .wrapper {
112
113
  padding: 0 3rem;
113
114
  }
114
115
  }
115
116
 
116
- @media (width >= 960px) {
117
+ @include bp.up("md") {
117
118
  .VPNavBar:not(.has-sidebar) .wrapper {
118
119
  padding: 0 4rem;
119
120
  }
@@ -167,6 +168,82 @@
167
168
  background: #{mg.ref("color-accent")};
168
169
  }
169
170
 
171
+ // FfNavBarTitle replaces the default title, whose scoped layout rules go with it: they are
172
+ // restated here, with the row now holding the title link and the version switcher.
173
+
174
+ .VPNavBarTitle {
175
+ display: flex;
176
+ align-items: center;
177
+ gap: 0.75rem;
178
+ height: var(--vp-nav-height);
179
+ }
180
+
181
+ .VPNavBarTitle .title {
182
+ display: flex;
183
+ align-items: center;
184
+ min-width: 0;
185
+ height: 100%;
186
+ color: var(--vp-c-text-1);
187
+ transition: opacity 0.25s;
188
+ }
189
+
190
+ // Wherever the bar runs out of room, the title text gives way first.
191
+ .VPNavBarTitle .title > span {
192
+ overflow: hidden;
193
+ text-overflow: ellipsis;
194
+ white-space: nowrap;
195
+ }
196
+
197
+ .VPNavBarTitle .logo {
198
+ flex: none;
199
+ height: var(--vp-nav-logo-height);
200
+ }
201
+
202
+ @include bp.up("md") {
203
+ .VPNavBarTitle .title {
204
+ flex-shrink: 0;
205
+ }
206
+
207
+ .VPNavBarTitle.has-sidebar {
208
+ max-width: calc(var(--vp-sidebar-width) - 4rem);
209
+ }
210
+ }
211
+
212
+ // Version switcher: a small framed tag beside the site name, set like the theme's labels. Its
213
+ // menu opens from its left edge, since the tag sits at the left of the bar. The space above the
214
+ // menu is padding, not an offset: VPFlyout closes as soon as the pointer leaves the button for
215
+ // anything outside the menu box, so a gap between the two would close it on the way down.
216
+
217
+ .ff-version-switcher {
218
+ flex: none;
219
+ }
220
+
221
+ .ff-version-switcher .button {
222
+ height: auto;
223
+ padding: 0.25rem 0.5rem;
224
+ border: #{mg.ref("rule-width")} solid #{mg.ref("color-rule")};
225
+ border-radius: #{mg.ref("radius-sm")};
226
+ transition: border-color #{mg.ref("motion-duration")} #{mg.ref("motion-ease")};
227
+ }
228
+
229
+ .ff-version-switcher .button:hover,
230
+ .ff-version-switcher .button[aria-expanded="true"] {
231
+ border-color: #{mg.ref("color-rule-strong")};
232
+ }
233
+
234
+ .ff-version-switcher .text {
235
+ font-family: #{mg.ref("font-mono")};
236
+ font-size: #{mg.ref("size-label")};
237
+ line-height: 1;
238
+ color: #{mg.ref("color-ink-muted")};
239
+ }
240
+
241
+ .ff-version-switcher .menu {
242
+ top: 100%;
243
+ inset-inline: 0 auto;
244
+ padding-top: 0.5rem;
245
+ }
246
+
170
247
  // Menu links
171
248
 
172
249
  .VPNavBarMenuLink,
@@ -184,10 +261,6 @@
184
261
 
185
262
  .VPNavBarMenuLink.active {
186
263
  color: #{mg.ref("color-ink")};
187
- text-decoration: underline;
188
- text-decoration-color: #{mg.ref("color-accent")};
189
- text-decoration-thickness: 2px;
190
- text-underline-offset: 0.5rem;
191
264
  }
192
265
 
193
266
  // Search trigger
@@ -278,7 +351,7 @@
278
351
  font-family: #{mg.ref("font-mono")};
279
352
  font-size: #{mg.ref("size-label")};
280
353
  text-transform: uppercase;
281
- letter-spacing: 0.06em;
354
+ letter-spacing: #{mg.ref("tracking-label-tight")};
282
355
  }
283
356
 
284
357
  .VPLocalSearchBox .titles .title {
@@ -0,0 +1,77 @@
1
+ // ============================================================================================= //
2
+ // PRINT //
3
+ // ============================================================================================= //
4
+
5
+ @use "theme" as mg;
6
+ @use "tokens";
7
+ @use "sass:map";
8
+
9
+ // Declared last in the stylesheet: the print palette re-emits the light tokens on the same
10
+ // selectors the dark scheme uses, so source order is what makes it win.
11
+
12
+ @media print {
13
+
14
+ // ----------------------------------------------------------------------------------------- //
15
+ // Light palette, whichever scheme the reader browses in
16
+ // ----------------------------------------------------------------------------------------- //
17
+
18
+ :root.dark {
19
+ @include mg.emit(tokens.$light);
20
+
21
+ color-scheme: light;
22
+ }
23
+
24
+ @each $name, $preset in tokens.$presets {
25
+ :root.dark[data-ff-preset="#{$name}"] {
26
+ @include mg.emit(tokens.preset-colors(map.get($preset, "light"), 0.09, 0.16));
27
+ }
28
+ }
29
+
30
+ // The default theme switches highlighted code to its dark colours on `.dark`.
31
+
32
+ :root.dark .shiki span {
33
+ color: var(--shiki-light, inherit);
34
+ font-weight: var(--shiki-light-font-weight, inherit);
35
+ text-decoration: var(--shiki-light-text-decoration, inherit);
36
+ }
37
+
38
+ // ----------------------------------------------------------------------------------------- //
39
+ // Chrome that means nothing on paper
40
+ // ----------------------------------------------------------------------------------------- //
41
+
42
+ .ff-theme {
43
+ .VPNav,
44
+ .VPLocalNav,
45
+ .VPSidebar,
46
+ .VPDoc .aside,
47
+ .VPDocFooter .prev-next,
48
+ .ff-banner,
49
+ .ff-to-top,
50
+ .ff-progress,
51
+ .ff-feedback {
52
+ display: none;
53
+ }
54
+
55
+ // The content wrapper made room for the fixed navigation, the sidebar and the banner.
56
+
57
+ .VPContent,
58
+ .VPContent.has-sidebar {
59
+ margin-top: 0;
60
+ padding-top: 0;
61
+ padding-right: 0;
62
+ padding-left: 0;
63
+ }
64
+
65
+ .VPDoc .container {
66
+ display: block;
67
+ }
68
+ }
69
+
70
+ // ----------------------------------------------------------------------------------------- //
71
+ // Links keep their destination
72
+ // ----------------------------------------------------------------------------------------- //
73
+
74
+ .vp-doc a[href^="http"]:not(.header-anchor)::after {
75
+ content: " (" attr(href) ")";
76
+ }
77
+ }
@@ -76,7 +76,7 @@
76
76
  font-weight: 600;
77
77
  line-height: 1.4;
78
78
  text-transform: uppercase;
79
- letter-spacing: 0.08em;
79
+ letter-spacing: #{mg.ref("tracking-label-wide")};
80
80
  color: #{mg.ref("color-ink")};
81
81
  }
82
82
 
@@ -110,7 +110,7 @@
110
110
  font-size: #{mg.ref("size-label")};
111
111
  font-weight: 600;
112
112
  text-transform: uppercase;
113
- letter-spacing: 0.06em;
113
+ letter-spacing: #{mg.ref("tracking-label-tight")};
114
114
  color: #{mg.ref("color-ink-faint")};
115
115
  }
116
116
 
@@ -2,6 +2,9 @@
2
2
  // TOKENS //
3
3
  // ============================================================================================= //
4
4
 
5
+ @use "sass:color";
6
+ @use "sass:list";
7
+ @use "sass:map";
5
8
  @use "theme" as mg;
6
9
 
7
10
  // --------------------------------------------------------------------------------------------- //
@@ -24,7 +27,9 @@ $scales: (
24
27
  ),
25
28
  "tracking": (
26
29
  "display": -0.025em,
27
- "label": 0.1em
30
+ "label": 0.1em,
31
+ "label-tight": 0.06em,
32
+ "label-wide": 0.08em
28
33
  ),
29
34
  "size": (
30
35
  "label": 0.6875rem,
@@ -51,6 +56,7 @@ $scales: (
51
56
  "motion": (
52
57
  "duration": 200ms,
53
58
  "duration-slow": 420ms,
59
+ "duration-enter": 650ms,
54
60
  "ease": cubic-bezier(0.2, 0.6, 0.2, 1)
55
61
  ),
56
62
  "banner": (
@@ -93,7 +99,11 @@ $light: (
93
99
  "accent-glow": rgb(39 69 207 / 0.16),
94
100
  "success": #1c7a52,
95
101
  "warning": #8a5a00,
96
- "danger": #b32835
102
+ "danger": #b32835,
103
+ "shadow-sm": rgb(0 0 0 / 0.05),
104
+ "shadow-md": rgb(0 0 0 / 0.08),
105
+ "shadow-lg": rgb(0 0 0 / 0.1),
106
+ "shadow-xl": rgb(0 0 0 / 0.12)
97
107
  )
98
108
  );
99
109
 
@@ -114,7 +124,11 @@ $dark: (
114
124
  "accent-glow": rgb(148 168 255 / 0.2),
115
125
  "success": #4ac48b,
116
126
  "warning": #e0a942,
117
- "danger": #f0707f
127
+ "danger": #f0707f,
128
+ "shadow-sm": rgb(0 0 0 / 0.3),
129
+ "shadow-md": rgb(0 0 0 / 0.4),
130
+ "shadow-lg": rgb(0 0 0 / 0.45),
131
+ "shadow-xl": rgb(0 0 0 / 0.5)
118
132
  )
119
133
  );
120
134
 
@@ -135,6 +149,58 @@ $dark: (
135
149
  color-scheme: dark;
136
150
  }
137
151
 
152
+ // --------------------------------------------------------------------------------------------- //
153
+ // Accent presets
154
+ //
155
+ // Ready-made accents picked with `themeConfig.ff.preset`, which sets data-ff-preset on <html>.
156
+ // Each one is an accent and its hover per scheme; the soft and glow washes derive from the accent.
157
+ // The light accents keep at least 4.5:1 against both the paper and white text on top of them.
158
+ // --------------------------------------------------------------------------------------------- //
159
+
160
+ $presets: (
161
+ "emerald": (
162
+ "light": (#0f7a55, #0b5e41, #fff),
163
+ "dark": (#4fd1a1, #7fe0bc, #0c1512)
164
+ ),
165
+ "crimson": (
166
+ "light": (#b4233c, #8f1a2f, #fff),
167
+ "dark": (#ff8a9b, #ffb0bc, #1a0d10)
168
+ ),
169
+ "violet": (
170
+ "light": (#6d3fd1, #5530a8, #fff),
171
+ "dark": (#b9a2ff, #d0c2ff, #140f20)
172
+ ),
173
+ "amber": (
174
+ "light": (#a35200, #7f3f00, #fff),
175
+ "dark": (#f5b452, #f8ca82, #1a1206)
176
+ )
177
+ );
178
+
179
+ @function preset-colors($colors, $soft, $glow) {
180
+ $accent: list.nth($colors, 1);
181
+
182
+ @return (
183
+ "color": (
184
+ "accent": $accent,
185
+ "accent-hover": list.nth($colors, 2),
186
+ "accent-contrast": list.nth($colors, 3),
187
+ "accent-soft": color.change($accent, $alpha: $soft),
188
+ "accent-glow": color.change($accent, $alpha: $glow)
189
+ )
190
+ );
191
+ }
192
+
193
+ // The dark selector carries the attribute too, so it outweighs the light preset rule.
194
+ @each $name, $preset in $presets {
195
+ :root[data-ff-preset="#{$name}"] {
196
+ @include mg.emit(preset-colors(map.get($preset, "light"), 0.09, 0.16));
197
+ }
198
+
199
+ :root.dark[data-ff-preset="#{$name}"] {
200
+ @include mg.emit(preset-colors(map.get($preset, "dark"), 0.13, 0.2));
201
+ }
202
+ }
203
+
138
204
  // --------------------------------------------------------------------------------------------- //
139
205
  // Bridge to the VitePress default theme
140
206
  //
@@ -179,9 +245,9 @@ $dark: (
179
245
  /* Elevation is a hairline job here — only overlays keep a shadow. */
180
246
  --vp-shadow-1: none;
181
247
  --vp-shadow-2: none;
182
- --vp-shadow-3: 0 16px 40px rgb(0 0 0 / 0.08);
183
- --vp-shadow-4: 0 16px 40px rgb(0 0 0 / 0.1);
184
- --vp-shadow-5: 0 24px 64px rgb(0 0 0 / 0.12);
248
+ --vp-shadow-3: 0 16px 40px #{mg.ref("color-shadow-md")};
249
+ --vp-shadow-4: 0 16px 40px #{mg.ref("color-shadow-lg")};
250
+ --vp-shadow-5: 0 24px 64px #{mg.ref("color-shadow-xl")};
185
251
 
186
252
  /**
187
253
  * Distance from the edge of the viewport to the content band — the frame the whole theme is
@@ -197,7 +263,7 @@ $dark: (
197
263
  */
198
264
  --vp-nav-bg-color: #{mg.ref("color-paper")};
199
265
  --vp-nav-backdrop-filter: none;
200
- --vp-layout-max-width: 76rem;
266
+ --vp-layout-max-width: #{mg.ref("layout-wide")};
201
267
  --vp-sidebar-width: 15rem;
202
268
  --vp-header-anchor-symbol: "#";
203
269
  --vp-code-font-size: 0.8125em;
@@ -16,4 +16,6 @@
16
16
  @use "blocks";
17
17
  @use "home";
18
18
  @use "content";
19
+ @use "blog";
19
20
  @use "motion";
21
+ @use "print";
package/src/types.ts CHANGED
@@ -72,6 +72,87 @@ export interface ThemeLabels {
72
72
  sponsors?: string
73
73
  /** Sponsors section action button, when the site sets `actionLink` but no `actionText`. Defaults to `Become a sponsor`. */
74
74
  sponsorsAction?: string
75
+ /** API tag stating the version a symbol appeared in; `{0}` is the version. Defaults to `since {0}`. */
76
+ apiSince?: string
77
+ /** API tag marking a deprecated symbol. Defaults to `deprecated`. */
78
+ apiDeprecated?: string
79
+ /** Banner call to action when the banner has a link but no `linkText`. Defaults to `Read more`. */
80
+ bannerCta?: string
81
+ /** Question asked by the feedback widget. Defaults to `Was this page helpful?`. */
82
+ feedbackQuestion?: string
83
+ /** Positive answer of the feedback widget. Defaults to `Yes`. */
84
+ feedbackYes?: string
85
+ /** Negative answer of the feedback widget. Defaults to `No`. */
86
+ feedbackNo?: string
87
+ /** Message shown once a vote is cast. Defaults to `Thanks for your feedback`. */
88
+ feedbackThanks?: string
89
+ /** Button copying the page as Markdown. Defaults to `Copy as Markdown`. */
90
+ copyMarkdown?: string
91
+ /** Accessible name of the version menu, followed by the current version. Defaults to `Version`. */
92
+ versionSwitcher?: string
93
+ /** Author line of a post; `{0}` is the name. Defaults to `By {0}`. */
94
+ blogBy?: string
95
+ /** Message of a blog index without any post. Defaults to `No posts yet`. */
96
+ blogEmpty?: string
97
+ }
98
+
99
+ /** One author of the blog, declared in `ff.blog.authors` and referred to by key from a post. */
100
+ export interface BlogAuthor {
101
+ name: string
102
+ /** Page the author's name links to. */
103
+ link?: string
104
+ /** Small portrait printed before the name. */
105
+ avatar?: string
106
+ }
107
+
108
+ /** RSS feed of the blog, set with `ff.blog.rss`. Needs the optional `feed` package. */
109
+ export interface BlogRssConfig {
110
+ /** Absolute site address the feed links to. Defaults to `sitemap.hostname`. */
111
+ hostname?: string
112
+ copyright?: string
113
+ }
114
+
115
+ /** Blog settings, `ff.blog`. A post is a Markdown page under `dir` with a `date` in its frontmatter. */
116
+ export interface BlogConfig {
117
+ /** Directory of the posts, relative to the source root. Defaults to `blog`. */
118
+ dir?: string
119
+ /** Authors by key; a post's `author` is such a key, or a plain name. */
120
+ authors?: Record<string, BlogAuthor>
121
+ /** Writes `feed.xml` at the end of the build. Off by default. */
122
+ rss?: boolean | BlogRssConfig
123
+ }
124
+
125
+ /** One font handed to the Open Graph image renderer. */
126
+ export interface OgFont {
127
+ /** Family name, also used to draw the text. The first font of the list is the one used. */
128
+ name: string
129
+ /** TTF, OTF or WOFF file (not WOFF2), relative to the site's source directory. */
130
+ path: string
131
+ weight?: number
132
+ style?: 'normal' | 'italic'
133
+ }
134
+
135
+ /** Open Graph images, set with `ff.og`. Needs the optional `satori` and `@resvg/resvg-js` packages. */
136
+ export interface OgConfig {
137
+ fonts: OgFont[]
138
+ /** Absolute site address the image URLs point to. Defaults to `sitemap.hostname`. */
139
+ hostname?: string
140
+ }
141
+
142
+ /** Options of the page feedback widget, when `ff.feedback` is an object instead of `true`. */
143
+ export interface FeedbackConfig {
144
+ /** Endpoint that receives each vote as a `sendBeacon` POST. Without it, only the `ff:feedback` event fires. */
145
+ url?: string
146
+ /** Question to ask, instead of the `feedbackQuestion` label. */
147
+ question?: string
148
+ }
149
+
150
+ /** Version menu of the navigation bar, set with `ff.versions`. */
151
+ export interface VersionsConfig {
152
+ /** Version of the site being read; it is the text of the menu button. */
153
+ current: string
154
+ /** Other versions, each pointing at its own copy of the docs. */
155
+ items: FooterLink[]
75
156
  }
76
157
 
77
158
  /** One entry of the colophon strip printed under the hero. */
@@ -127,6 +208,42 @@ export interface ThemeOptions {
127
208
  footerSocial?: boolean
128
209
  /** Floating back-to-top control. Defaults to `true`. */
129
210
  backToTop?: boolean
211
+ /**
212
+ * Thin reading-progress bar pinned to the top of the viewport. Off by default; a page opts out
213
+ * with `progress: false` in its frontmatter.
214
+ */
215
+ progress?: boolean
216
+ /**
217
+ * "Was this page helpful?" widget under each doc page. Off by default; a page opts out with
218
+ * `feedback: false` in its frontmatter. Each vote is sent to `url` with `navigator.sendBeacon`
219
+ * as a JSON string `{ page, value: 'yes' | 'no', lang }`, and always dispatched on `window` as
220
+ * an `ff:feedback` CustomEvent carrying the same object in `detail`.
221
+ */
222
+ feedback?: boolean | FeedbackConfig
223
+ /**
224
+ * Button in the page kicker that copies the page's Markdown source. Off by default. The source
225
+ * is injected by `ffTransformPageData`, which a site defining its own `transformPageData` must
226
+ * call from it.
227
+ */
228
+ copyMarkdown?: boolean
229
+ /**
230
+ * Writes `llms.txt` and `llms-full.txt` to the output directory at the end of the build. Off by
231
+ * default; a page opts out with `llms: false` in its frontmatter.
232
+ */
233
+ llms?: boolean
234
+ /**
235
+ * Blog: `layout: blog` on the index page lists the posts of `dir`, each post gets a dated
236
+ * header, and `rss` writes a feed at build time.
237
+ */
238
+ blog?: BlogConfig
239
+ /**
240
+ * One 1200x630 PNG per page in `og/`, with the matching `og:image` and `twitter:card` tags.
241
+ * Off by default; a page opts out with `og: false` in its frontmatter. It needs fonts, so it
242
+ * is an object (`true` alone is rejected at build time).
243
+ */
244
+ og?: boolean | OgConfig
245
+ /** Version menu in the navigation bar, after the other controls. */
246
+ versions?: VersionsConfig
130
247
  /** Order of the search box and the nav menu links in the top bar. Defaults to `search-first`. */
131
248
  navOrder?: 'search-first' | 'menu-first'
132
249
  /**
@@ -134,6 +251,11 @@ export interface ThemeOptions {
134
251
  * to `false` to have it scroll away with the page instead.
135
252
  */
136
253
  navSticky?: boolean
254
+ /**
255
+ * Ready-made accent, in both schemes, instead of the default indigo. Set on `<html>` by an
256
+ * inline head script, so it paints from the first frame and reaches teleported overlays.
257
+ */
258
+ preset?: 'emerald' | 'crimson' | 'violet' | 'amber'
137
259
  /** Overrides for the strings this theme adds. Declare them per locale to translate them. */
138
260
  labels?: ThemeLabels
139
261
  }
@@ -0,0 +1,14 @@
1
+ import { type LoaderModule } from 'vitepress';
2
+ export interface Post {
3
+ url: string;
4
+ title: string;
5
+ /** ISO date, as written in the frontmatter. */
6
+ date: string;
7
+ author?: string;
8
+ tags: string[];
9
+ excerpt?: string;
10
+ }
11
+ declare const data: Post[];
12
+ export { data };
13
+ declare const loader: LoaderModule<Post[]>;
14
+ export default loader;
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,13 @@
1
+ import type { DefaultTheme } from 'vitepress/theme';
2
+ type __VLS_Props = {
3
+ icon?: DefaultTheme.FeatureIcon;
4
+ title: string;
5
+ details?: string | string[];
6
+ link?: string;
7
+ linkText?: string;
8
+ rel?: string;
9
+ target?: string;
10
+ };
11
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
+ declare const _default: typeof __VLS_export;
13
+ export default _default;
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,42 @@
1
+ import type { DefaultTheme } from 'vitepress/theme';
2
+ export interface HeroAction {
3
+ theme?: 'brand' | 'alt';
4
+ text: string;
5
+ link: string;
6
+ target?: string;
7
+ rel?: string;
8
+ }
9
+ type __VLS_Props = {
10
+ name?: string;
11
+ text?: string;
12
+ tagline?: string;
13
+ image?: DefaultTheme.ThemeableImage;
14
+ actions?: HeroAction[];
15
+ };
16
+ declare const __VLS_template: () => {
17
+ __VLS_Slots: {
18
+ 'home-hero-info-before'?: (props: {}) => any;
19
+ } & {
20
+ 'home-hero-info'?: (props: {}) => any;
21
+ } & {
22
+ 'home-hero-info-after'?: (props: {}) => any;
23
+ } & {
24
+ 'home-hero-actions-before-actions'?: (props: {}) => any;
25
+ } & {
26
+ 'home-hero-actions-after'?: (props: {}) => any;
27
+ } & {
28
+ 'home-hero-image'?: (props: {}) => any;
29
+ } & {
30
+ 'home-hero-actions-before-actions'?: (props: {}) => any;
31
+ };
32
+ };
33
+ type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
34
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
35
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
36
+ declare const _default: typeof __VLS_export;
37
+ export default _default;
38
+ type __VLS_WithSlots<T, S> = T & {
39
+ new (): {
40
+ $slots: S;
41
+ };
42
+ };
@@ -0,0 +1,9 @@
1
+ import type { HeroCommandTab } from '../types';
2
+ type __VLS_Props = {
3
+ command: string | HeroCommandTab[];
4
+ /** No actions sit under this command — print the bare line, without the "Install" heading. */
5
+ bare?: boolean;
6
+ };
7
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
+ declare const _default: typeof __VLS_export;
9
+ export default _default;
@@ -0,0 +1,19 @@
1
+ export interface SponsorItem {
2
+ name: string;
3
+ img: string;
4
+ url: string;
5
+ }
6
+ export interface SponsorTier {
7
+ tier?: string;
8
+ size?: 'xmini' | 'mini' | 'small' | 'medium' | 'big';
9
+ items: SponsorItem[];
10
+ }
11
+ type __VLS_Props = {
12
+ message?: string;
13
+ actionText?: string;
14
+ actionLink?: string;
15
+ data: SponsorTier[] | SponsorItem[];
16
+ };
17
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
+ declare const _default: typeof __VLS_export;
19
+ export default _default;
@@ -0,0 +1,17 @@
1
+ declare const __VLS_template: () => {
2
+ __VLS_Slots: {
3
+ 'nav-bar-title-before'?: (props: {}) => any;
4
+ } & {
5
+ 'nav-bar-title-after'?: (props: {}) => any;
6
+ };
7
+ };
8
+ type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
9
+ declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
10
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
11
+ declare const _default: typeof __VLS_export;
12
+ export default _default;
13
+ type __VLS_WithSlots<T, S> = T & {
14
+ new (): {
15
+ $slots: S;
16
+ };
17
+ };
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;