@frontfactory/vitepress-theme 1.7.0 → 1.9.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.
- package/CHANGELOG.md +83 -0
- package/README.md +163 -7
- package/config.d.ts +27 -1
- package/config.js +186 -21
- package/dist/style.css +1 -1
- package/node/blog.d.ts +3 -0
- package/node/blog.js +19 -0
- package/node/llms.js +32 -0
- package/node/og.js +158 -0
- package/node/pages.js +162 -0
- package/node/rss.js +78 -0
- package/package.json +42 -28
- package/src/blog/posts.data.ts +47 -0
- package/src/components/FfBackToTop.vue +19 -10
- package/src/components/FfBanner.vue +24 -6
- package/src/components/FfCopyStatus.vue +64 -0
- package/src/components/FfDocMeta.vue +325 -3
- package/src/components/FfFeature.vue +18 -7
- package/src/components/FfFeedback.vue +96 -0
- package/src/components/FfHero.vue +26 -35
- package/src/components/FfHeroActions.vue +44 -0
- package/src/components/FfHeroCommand.vue +22 -35
- package/src/components/FfHomeSponsors.vue +2 -2
- package/src/components/FfNavBarTitle.vue +63 -0
- package/src/components/FfPost.vue +50 -0
- package/src/components/FfProgress.vue +69 -0
- package/src/components/FfVersionSwitcher.vue +20 -0
- package/src/composables/blog.ts +41 -0
- package/src/composables/copy.ts +36 -0
- package/src/composables/options.ts +20 -1
- package/src/composables/tabs.ts +122 -0
- package/src/content/Api.vue +6 -2
- package/src/content/Badge.vue +26 -0
- package/src/content/Callout.vue +27 -0
- package/src/content/FileTree.vue +118 -0
- package/src/content/Tab.vue +11 -0
- package/src/content/Tabs.vue +95 -0
- package/src/content/Timeline.vue +19 -0
- package/src/content/TimelineItem.vue +37 -0
- package/src/content/timeline.ts +4 -0
- package/src/index.ts +37 -1
- package/src/internal.ts +8 -2
- package/src/layout/FfBlog.vue +62 -0
- package/src/layout/FfLayout.vue +20 -4
- package/src/styles/_base.scss +6 -14
- package/src/styles/_blocks.scss +29 -8
- package/src/styles/_blog.scss +130 -0
- package/src/styles/_breakpoints.scss +26 -0
- package/src/styles/_code.scss +11 -17
- package/src/styles/_content.scss +377 -18
- package/src/styles/_doc.scss +32 -29
- package/src/styles/_home.scss +47 -65
- package/src/styles/_mixins.scss +63 -0
- package/src/styles/_motion.scss +24 -13
- package/src/styles/_nav.scss +90 -24
- package/src/styles/_print.scss +77 -0
- package/src/styles/_sidebar.scss +7 -10
- package/src/styles/_tokens.scss +92 -11
- package/src/styles/index.scss +2 -0
- package/src/types.ts +148 -0
- package/types/blog/posts.data.d.ts +14 -0
- package/types/components/FfBackToTop.vue.d.ts +3 -0
- package/types/components/FfBanner.vue.d.ts +3 -0
- package/types/components/FfCopyStatus.vue.d.ts +3 -0
- package/types/components/FfDocMeta.vue.d.ts +3 -0
- package/types/components/FfFeature.vue.d.ts +13 -0
- package/types/components/FfFeedback.vue.d.ts +3 -0
- package/types/components/FfFooter.vue.d.ts +3 -0
- package/types/components/FfHero.vue.d.ts +42 -0
- package/types/components/FfHeroActions.vue.d.ts +19 -0
- package/types/components/FfHeroCommand.vue.d.ts +9 -0
- package/types/components/FfHomeSponsors.vue.d.ts +19 -0
- package/types/components/FfNavBarTitle.vue.d.ts +17 -0
- package/types/components/FfPost.vue.d.ts +3 -0
- package/types/components/FfProgress.vue.d.ts +3 -0
- package/types/components/FfVersionSwitcher.vue.d.ts +3 -0
- package/types/composables/blog.d.ts +10 -0
- package/types/composables/copy.d.ts +6 -0
- package/types/composables/link.d.ts +12 -0
- package/types/composables/options.d.ts +15 -0
- package/types/composables/relativeTime.d.ts +2 -0
- package/types/composables/tabs.d.ts +10 -0
- package/types/content/Api.vue.d.ts +27 -0
- package/types/content/Badge.vue.d.ts +21 -0
- package/types/content/Callout.vue.d.ts +24 -0
- package/types/content/Card.vue.d.ts +23 -0
- package/types/content/CardGrid.vue.d.ts +20 -0
- package/types/content/FileTree.vue.d.ts +6 -0
- package/types/content/Kbd.vue.d.ts +15 -0
- package/types/content/Steps.vue.d.ts +15 -0
- package/types/content/Tab.vue.d.ts +19 -0
- package/types/content/Tabs.vue.d.ts +7 -0
- package/types/content/Timeline.vue.d.ts +21 -0
- package/types/content/TimelineItem.vue.d.ts +21 -0
- package/types/content/timeline.d.ts +3 -0
- package/types/index.d.ts +25 -0
- package/types/internal.d.ts +10 -0
- package/types/layout/FfBlog.vue.d.ts +3 -0
- package/types/layout/FfLayout.vue.d.ts +23 -0
- package/types/types.d.ts +280 -0
package/src/styles/_sidebar.scss
CHANGED
|
@@ -23,11 +23,8 @@
|
|
|
23
23
|
|
|
24
24
|
.VPSidebar .nav {
|
|
25
25
|
padding-top: 1.5rem;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
// Sections are numbered from the stylesheet: 01, 02, 03 — no config, no markup.
|
|
29
26
|
|
|
30
|
-
|
|
27
|
+
// Sections are numbered from the stylesheet: 01, 02, 03 — no config, no markup.
|
|
31
28
|
counter-reset: ff-section;
|
|
32
29
|
}
|
|
33
30
|
|
|
@@ -62,7 +59,7 @@
|
|
|
62
59
|
.VPSidebar .group > .VPSidebarItem.level-0 > .item::before {
|
|
63
60
|
content: counter(ff-section, decimal-leading-zero);
|
|
64
61
|
font-family: #{mg.ref("font-mono")};
|
|
65
|
-
font-size:
|
|
62
|
+
font-size: #{mg.ref("size-small")};
|
|
66
63
|
font-weight: 600;
|
|
67
64
|
line-height: 1.4;
|
|
68
65
|
letter-spacing: 0.02em;
|
|
@@ -72,11 +69,11 @@
|
|
|
72
69
|
.VPSidebarItem.level-0 > .item > .text {
|
|
73
70
|
padding: 0;
|
|
74
71
|
font-family: #{mg.ref("font-mono")};
|
|
75
|
-
font-size:
|
|
72
|
+
font-size: #{mg.ref("size-small")};
|
|
76
73
|
font-weight: 600;
|
|
77
74
|
line-height: 1.4;
|
|
78
75
|
text-transform: uppercase;
|
|
79
|
-
letter-spacing:
|
|
76
|
+
letter-spacing: #{mg.ref("tracking-label-wide")};
|
|
80
77
|
color: #{mg.ref("color-ink")};
|
|
81
78
|
}
|
|
82
79
|
|
|
@@ -88,7 +85,7 @@
|
|
|
88
85
|
.VPSidebarItem.level-2 .text,
|
|
89
86
|
.VPSidebarItem.level-3 .text {
|
|
90
87
|
padding: 0.25rem 0;
|
|
91
|
-
font-size:
|
|
88
|
+
font-size: #{mg.ref("size-ui")};
|
|
92
89
|
font-weight: 450;
|
|
93
90
|
line-height: 1.6;
|
|
94
91
|
color: #{mg.ref("color-ink-muted")};
|
|
@@ -110,7 +107,7 @@
|
|
|
110
107
|
font-size: #{mg.ref("size-label")};
|
|
111
108
|
font-weight: 600;
|
|
112
109
|
text-transform: uppercase;
|
|
113
|
-
letter-spacing:
|
|
110
|
+
letter-spacing: #{mg.ref("tracking-label-tight")};
|
|
114
111
|
color: #{mg.ref("color-ink-faint")};
|
|
115
112
|
}
|
|
116
113
|
|
|
@@ -125,7 +122,7 @@
|
|
|
125
122
|
.VPSidebarItem.level-2 .text,
|
|
126
123
|
.VPSidebarItem.level-3 .text {
|
|
127
124
|
padding: 0.375rem 0;
|
|
128
|
-
font-size:
|
|
125
|
+
font-size: #{mg.ref("size-small")};
|
|
129
126
|
}
|
|
130
127
|
|
|
131
128
|
.VPSidebarItem.is-active > .item > .indicator {
|
package/src/styles/_tokens.scss
CHANGED
|
@@ -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,11 +27,20 @@ $scales: (
|
|
|
24
27
|
),
|
|
25
28
|
"tracking": (
|
|
26
29
|
"display": -0.025em,
|
|
27
|
-
"
|
|
30
|
+
"title": -0.03em,
|
|
31
|
+
"heading": -0.02em,
|
|
32
|
+
"subheading": -0.015em,
|
|
33
|
+
"tight": -0.01em,
|
|
34
|
+
"label": 0.1em,
|
|
35
|
+
"label-tight": 0.06em,
|
|
36
|
+
"label-wide": 0.08em
|
|
28
37
|
),
|
|
29
38
|
"size": (
|
|
30
39
|
"label": 0.6875rem,
|
|
31
40
|
"meta": 0.75rem,
|
|
41
|
+
"small": 0.8125rem,
|
|
42
|
+
"ui": 0.875rem,
|
|
43
|
+
"ui-lg": 0.9375rem,
|
|
32
44
|
"body": 1rem,
|
|
33
45
|
"lead": 1.125rem,
|
|
34
46
|
"h1": clamp(1.625rem, 1.3rem + 1.3vw, 2rem),
|
|
@@ -41,8 +53,9 @@ $scales: (
|
|
|
41
53
|
"tight": 1.15
|
|
42
54
|
),
|
|
43
55
|
"radius": (
|
|
44
|
-
"
|
|
45
|
-
"
|
|
56
|
+
"xs": 0.125rem,
|
|
57
|
+
"sm": 0.3125rem,
|
|
58
|
+
"md": 0.625rem
|
|
46
59
|
),
|
|
47
60
|
"rule": (
|
|
48
61
|
"width": 1px,
|
|
@@ -51,11 +64,19 @@ $scales: (
|
|
|
51
64
|
"motion": (
|
|
52
65
|
"duration": 200ms,
|
|
53
66
|
"duration-slow": 420ms,
|
|
67
|
+
"duration-fade": 250ms,
|
|
68
|
+
"duration-enter": 650ms,
|
|
69
|
+
"duration-enter-panel": 800ms,
|
|
70
|
+
"duration-enter-image": 900ms,
|
|
71
|
+
"stagger": 20ms,
|
|
54
72
|
"ease": cubic-bezier(0.2, 0.6, 0.2, 1)
|
|
55
73
|
),
|
|
56
74
|
"banner": (
|
|
57
75
|
"height": 2.6875rem
|
|
58
76
|
),
|
|
77
|
+
"z": (
|
|
78
|
+
"float": 20
|
|
79
|
+
),
|
|
59
80
|
|
|
60
81
|
/* The two washes of light behind the hero. Off by default: they are a house style, not a*/
|
|
61
82
|
/* structural part of the layout, and they read as noise under a headline that is already*/
|
|
@@ -93,7 +114,11 @@ $light: (
|
|
|
93
114
|
"accent-glow": rgb(39 69 207 / 0.16),
|
|
94
115
|
"success": #1c7a52,
|
|
95
116
|
"warning": #8a5a00,
|
|
96
|
-
"danger": #b32835
|
|
117
|
+
"danger": #b32835,
|
|
118
|
+
"shadow-sm": rgb(0 0 0 / 0.05),
|
|
119
|
+
"shadow-md": rgb(0 0 0 / 0.08),
|
|
120
|
+
"shadow-lg": rgb(0 0 0 / 0.1),
|
|
121
|
+
"shadow-xl": rgb(0 0 0 / 0.12)
|
|
97
122
|
)
|
|
98
123
|
);
|
|
99
124
|
|
|
@@ -114,7 +139,11 @@ $dark: (
|
|
|
114
139
|
"accent-glow": rgb(148 168 255 / 0.2),
|
|
115
140
|
"success": #4ac48b,
|
|
116
141
|
"warning": #e0a942,
|
|
117
|
-
"danger": #f0707f
|
|
142
|
+
"danger": #f0707f,
|
|
143
|
+
"shadow-sm": rgb(0 0 0 / 0.3),
|
|
144
|
+
"shadow-md": rgb(0 0 0 / 0.4),
|
|
145
|
+
"shadow-lg": rgb(0 0 0 / 0.45),
|
|
146
|
+
"shadow-xl": rgb(0 0 0 / 0.5)
|
|
118
147
|
)
|
|
119
148
|
);
|
|
120
149
|
|
|
@@ -135,6 +164,58 @@ $dark: (
|
|
|
135
164
|
color-scheme: dark;
|
|
136
165
|
}
|
|
137
166
|
|
|
167
|
+
// --------------------------------------------------------------------------------------------- //
|
|
168
|
+
// Accent presets
|
|
169
|
+
//
|
|
170
|
+
// Ready-made accents picked with `themeConfig.ff.preset`, which sets data-ff-preset on <html>.
|
|
171
|
+
// Each one is an accent and its hover per scheme; the soft and glow washes derive from the accent.
|
|
172
|
+
// The light accents keep at least 4.5:1 against both the paper and white text on top of them.
|
|
173
|
+
// --------------------------------------------------------------------------------------------- //
|
|
174
|
+
|
|
175
|
+
$presets: (
|
|
176
|
+
"emerald": (
|
|
177
|
+
"light": (#0f7a55, #0b5e41, #fff),
|
|
178
|
+
"dark": (#4fd1a1, #7fe0bc, #0c1512)
|
|
179
|
+
),
|
|
180
|
+
"crimson": (
|
|
181
|
+
"light": (#b4233c, #8f1a2f, #fff),
|
|
182
|
+
"dark": (#ff8a9b, #ffb0bc, #1a0d10)
|
|
183
|
+
),
|
|
184
|
+
"violet": (
|
|
185
|
+
"light": (#6d3fd1, #5530a8, #fff),
|
|
186
|
+
"dark": (#b9a2ff, #d0c2ff, #140f20)
|
|
187
|
+
),
|
|
188
|
+
"amber": (
|
|
189
|
+
"light": (#a35200, #7f3f00, #fff),
|
|
190
|
+
"dark": (#f5b452, #f8ca82, #1a1206)
|
|
191
|
+
)
|
|
192
|
+
);
|
|
193
|
+
|
|
194
|
+
@function preset-colors($colors, $soft, $glow) {
|
|
195
|
+
$accent: list.nth($colors, 1);
|
|
196
|
+
|
|
197
|
+
@return (
|
|
198
|
+
"color": (
|
|
199
|
+
"accent": $accent,
|
|
200
|
+
"accent-hover": list.nth($colors, 2),
|
|
201
|
+
"accent-contrast": list.nth($colors, 3),
|
|
202
|
+
"accent-soft": color.change($accent, $alpha: $soft),
|
|
203
|
+
"accent-glow": color.change($accent, $alpha: $glow)
|
|
204
|
+
)
|
|
205
|
+
);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
// The dark selector carries the attribute too, so it outweighs the light preset rule.
|
|
209
|
+
@each $name, $preset in $presets {
|
|
210
|
+
:root[data-ff-preset="#{$name}"] {
|
|
211
|
+
@include mg.emit(preset-colors(map.get($preset, "light"), 0.09, 0.16));
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
:root.dark[data-ff-preset="#{$name}"] {
|
|
215
|
+
@include mg.emit(preset-colors(map.get($preset, "dark"), 0.13, 0.2));
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
138
219
|
// --------------------------------------------------------------------------------------------- //
|
|
139
220
|
// Bridge to the VitePress default theme
|
|
140
221
|
//
|
|
@@ -179,9 +260,9 @@ $dark: (
|
|
|
179
260
|
/* Elevation is a hairline job here — only overlays keep a shadow. */
|
|
180
261
|
--vp-shadow-1: none;
|
|
181
262
|
--vp-shadow-2: none;
|
|
182
|
-
--vp-shadow-3: 0 16px 40px
|
|
183
|
-
--vp-shadow-4: 0 16px 40px
|
|
184
|
-
--vp-shadow-5: 0 24px 64px
|
|
263
|
+
--vp-shadow-3: 0 16px 40px #{mg.ref("color-shadow-md")};
|
|
264
|
+
--vp-shadow-4: 0 16px 40px #{mg.ref("color-shadow-lg")};
|
|
265
|
+
--vp-shadow-5: 0 24px 64px #{mg.ref("color-shadow-xl")};
|
|
185
266
|
|
|
186
267
|
/**
|
|
187
268
|
* Distance from the edge of the viewport to the content band — the frame the whole theme is
|
|
@@ -197,7 +278,7 @@ $dark: (
|
|
|
197
278
|
*/
|
|
198
279
|
--vp-nav-bg-color: #{mg.ref("color-paper")};
|
|
199
280
|
--vp-nav-backdrop-filter: none;
|
|
200
|
-
--vp-layout-max-width:
|
|
281
|
+
--vp-layout-max-width: #{mg.ref("layout-wide")};
|
|
201
282
|
--vp-sidebar-width: 15rem;
|
|
202
283
|
--vp-header-anchor-symbol: "#";
|
|
203
284
|
--vp-code-font-size: 0.8125em;
|
|
@@ -225,7 +306,7 @@ $dark: (
|
|
|
225
306
|
--vp-button-alt-hover-text: #{mg.ref("color-ink")};
|
|
226
307
|
--vp-button-alt-hover-bg: transparent;
|
|
227
308
|
--vp-button-alt-active-bg: #{mg.ref("color-surface-alt")};
|
|
228
|
-
--vp-custom-block-font-size:
|
|
229
|
-
--vp-custom-block-code-font-size:
|
|
309
|
+
--vp-custom-block-font-size: #{mg.ref("size-ui-lg")};
|
|
310
|
+
--vp-custom-block-code-font-size: #{mg.ref("size-small")};
|
|
230
311
|
--vp-home-hero-name-color: #{mg.ref("color-ink")};
|
|
231
312
|
}
|
package/src/styles/index.scss
CHANGED
package/src/types.ts
CHANGED
|
@@ -72,6 +72,103 @@ 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
|
+
/** Second line of the Markdown menu item. Defaults to `Page source`. */
|
|
92
|
+
copyMarkdownHint?: string
|
|
93
|
+
/** Accessible name of the chevron opening the page actions menu. Defaults to `More page actions`. */
|
|
94
|
+
pageActions?: string
|
|
95
|
+
/** Main button copying the page URL. Defaults to `Copy link`. */
|
|
96
|
+
copyLink?: string
|
|
97
|
+
/** Trigger of the menu when there is nothing to copy. Defaults to `Share`. */
|
|
98
|
+
share?: string
|
|
99
|
+
/** Confirmation shown once the page URL is copied. Defaults to `Link copied`. */
|
|
100
|
+
linkCopied?: string
|
|
101
|
+
/** Share menu item; `{0}` is the network name. Defaults to `Share on {0}`. */
|
|
102
|
+
shareOn?: string
|
|
103
|
+
/** Accessible name of the version menu, followed by the current version. Defaults to `Version`. */
|
|
104
|
+
versionSwitcher?: string
|
|
105
|
+
/** Author line of a post; `{0}` is the name. Defaults to `By {0}`. */
|
|
106
|
+
blogBy?: string
|
|
107
|
+
/** Message of a blog index without any post. Defaults to `No posts yet`. */
|
|
108
|
+
blogEmpty?: string
|
|
109
|
+
/** Tooltip of the back-to-top control, unless the default theme's `returnToTopLabel` is set. Defaults to `Return to top`. */
|
|
110
|
+
returnToTop?: string
|
|
111
|
+
/** Screen-reader announcement once a code block is copied. Defaults to `Copied`. */
|
|
112
|
+
codeCopied?: string
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/** One author of the blog, declared in `ff.blog.authors` and referred to by key from a post. */
|
|
116
|
+
export interface BlogAuthor {
|
|
117
|
+
name: string
|
|
118
|
+
/** Page the author's name links to. */
|
|
119
|
+
link?: string
|
|
120
|
+
/** Small portrait printed before the name. */
|
|
121
|
+
avatar?: string
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/** RSS feed of the blog, set with `ff.blog.rss`. Needs the optional `feed` package. */
|
|
125
|
+
export interface BlogRssConfig {
|
|
126
|
+
/** Absolute site address the feed links to. Defaults to `sitemap.hostname`. */
|
|
127
|
+
hostname?: string
|
|
128
|
+
copyright?: string
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/** Blog settings, `ff.blog`. A post is a Markdown page under `dir` with a `date` in its frontmatter. */
|
|
132
|
+
export interface BlogConfig {
|
|
133
|
+
/** Directory of the posts, relative to the source root. Defaults to `blog`. */
|
|
134
|
+
dir?: string
|
|
135
|
+
/** Authors by key; a post's `author` is such a key, or a plain name. */
|
|
136
|
+
authors?: Record<string, BlogAuthor>
|
|
137
|
+
/** Writes `feed.xml` at the end of the build. Off by default. */
|
|
138
|
+
rss?: boolean | BlogRssConfig
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/** One font handed to the Open Graph image renderer. */
|
|
142
|
+
export interface OgFont {
|
|
143
|
+
/** Family name, also used to draw the text. The first font of the list is the one used. */
|
|
144
|
+
name: string
|
|
145
|
+
/** TTF, OTF or WOFF file (not WOFF2), relative to the VitePress root (the folder holding `.vitepress`). */
|
|
146
|
+
path: string
|
|
147
|
+
weight?: number
|
|
148
|
+
style?: 'normal' | 'italic'
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/** Open Graph images, set with `ff.og`. Needs the optional `satori` and `@resvg/resvg-js` packages. */
|
|
152
|
+
export interface OgConfig {
|
|
153
|
+
fonts: OgFont[]
|
|
154
|
+
/** Absolute site address the image URLs point to. Defaults to `sitemap.hostname`. */
|
|
155
|
+
hostname?: string
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/** Options of the page feedback widget, when `ff.feedback` is an object instead of `true`. */
|
|
159
|
+
export interface FeedbackConfig {
|
|
160
|
+
/** Endpoint that receives each vote as a `sendBeacon` POST. Without it, only the `ff:feedback` event fires. */
|
|
161
|
+
url?: string
|
|
162
|
+
/** Question to ask, instead of the `feedbackQuestion` label. */
|
|
163
|
+
question?: string
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/** Version menu of the navigation bar, set with `ff.versions`. */
|
|
167
|
+
export interface VersionsConfig {
|
|
168
|
+
/** Version of the site being read; it is the text of the menu button. */
|
|
169
|
+
current: string
|
|
170
|
+
/** Other versions, each pointing at its own copy of the docs. */
|
|
171
|
+
items: FooterLink[]
|
|
75
172
|
}
|
|
76
173
|
|
|
77
174
|
/** One entry of the colophon strip printed under the hero. */
|
|
@@ -127,6 +224,52 @@ export interface ThemeOptions {
|
|
|
127
224
|
footerSocial?: boolean
|
|
128
225
|
/** Floating back-to-top control. Defaults to `true`. */
|
|
129
226
|
backToTop?: boolean
|
|
227
|
+
/**
|
|
228
|
+
* Thin reading-progress bar pinned to the top of the viewport. Off by default; a page opts out
|
|
229
|
+
* with `progress: false` in its frontmatter.
|
|
230
|
+
*/
|
|
231
|
+
progress?: boolean
|
|
232
|
+
/**
|
|
233
|
+
* "Was this page helpful?" widget under each doc page. Off by default; a page opts out with
|
|
234
|
+
* `feedback: false` in its frontmatter. Each vote is sent to `url` with `navigator.sendBeacon`
|
|
235
|
+
* as a JSON string `{ page, value: 'yes' | 'no', lang }`, and always dispatched on `window` as
|
|
236
|
+
* an `ff:feedback` CustomEvent carrying the same object in `detail`.
|
|
237
|
+
*/
|
|
238
|
+
feedback?: boolean | FeedbackConfig
|
|
239
|
+
/**
|
|
240
|
+
* Menu in the page kicker with page actions. Off by default; `true` turns on every action. The
|
|
241
|
+
* Markdown source is injected by `ffTransformPageData`, which a site defining its own
|
|
242
|
+
* `transformPageData` must call from it. Mastodon has no universal share intent, so its link
|
|
243
|
+
* targets `mastodonInstance` (defaults to `mastodon.social`).
|
|
244
|
+
*/
|
|
245
|
+
pageActions?:
|
|
246
|
+
| boolean
|
|
247
|
+
| {
|
|
248
|
+
copyMarkdown?: boolean
|
|
249
|
+
copyLink?: boolean
|
|
250
|
+
share?: Array<'x' | 'linkedin' | 'bluesky' | 'mastodon'>
|
|
251
|
+
mastodonInstance?: string
|
|
252
|
+
}
|
|
253
|
+
/** @deprecated Use `pageActions: { copyMarkdown: true }`. */
|
|
254
|
+
copyMarkdown?: boolean
|
|
255
|
+
/**
|
|
256
|
+
* Writes `llms.txt` and `llms-full.txt` to the output directory at the end of the build. Off by
|
|
257
|
+
* default; a page opts out with `llms: false` in its frontmatter.
|
|
258
|
+
*/
|
|
259
|
+
llms?: boolean
|
|
260
|
+
/**
|
|
261
|
+
* Blog: `layout: blog` on the index page lists the posts of `dir`, each post gets a dated
|
|
262
|
+
* header, and `rss` writes a feed at build time.
|
|
263
|
+
*/
|
|
264
|
+
blog?: BlogConfig
|
|
265
|
+
/**
|
|
266
|
+
* One 1200x630 PNG per page in `og/`, with the matching `og:image` and `twitter:card` tags.
|
|
267
|
+
* Off by default; a page opts out with `og: false` in its frontmatter. It needs fonts, so it
|
|
268
|
+
* is an object (`true` alone is rejected at build time).
|
|
269
|
+
*/
|
|
270
|
+
og?: boolean | OgConfig
|
|
271
|
+
/** Version menu in the navigation bar, after the other controls. */
|
|
272
|
+
versions?: VersionsConfig
|
|
130
273
|
/** Order of the search box and the nav menu links in the top bar. Defaults to `search-first`. */
|
|
131
274
|
navOrder?: 'search-first' | 'menu-first'
|
|
132
275
|
/**
|
|
@@ -134,6 +277,11 @@ export interface ThemeOptions {
|
|
|
134
277
|
* to `false` to have it scroll away with the page instead.
|
|
135
278
|
*/
|
|
136
279
|
navSticky?: boolean
|
|
280
|
+
/**
|
|
281
|
+
* Ready-made accent, in both schemes, instead of the default indigo. Set on `<html>` by an
|
|
282
|
+
* inline head script, so it paints from the first frame and reaches teleported overlays.
|
|
283
|
+
*/
|
|
284
|
+
preset?: 'emerald' | 'crimson' | 'violet' | 'amber'
|
|
137
285
|
/** Overrides for the strings this theme adds. Declare them per locale to translate them. */
|
|
138
286
|
labels?: ThemeLabels
|
|
139
287
|
}
|
|
@@ -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,19 @@
|
|
|
1
|
+
import type { HeroAction } from './FfHero.vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
actions: HeroAction[];
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_template: () => {
|
|
6
|
+
__VLS_Slots: {
|
|
7
|
+
before?: (props: {}) => any;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
11
|
+
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>;
|
|
12
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
13
|
+
declare const _default: typeof __VLS_export;
|
|
14
|
+
export default _default;
|
|
15
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
16
|
+
new (): {
|
|
17
|
+
$slots: S;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
@@ -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;
|
|
@@ -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,10 @@
|
|
|
1
|
+
import type { BlogAuthor } from '../types';
|
|
2
|
+
/** Blog options, with the directory normalised (no slash at either end). */
|
|
3
|
+
export declare function useBlog(): {
|
|
4
|
+
dir: import("vue").ComputedRef<string>;
|
|
5
|
+
isPost: import("vue").ComputedRef<boolean>;
|
|
6
|
+
authors: import("vue").ComputedRef<Record<string, BlogAuthor>>;
|
|
7
|
+
};
|
|
8
|
+
/** `author` is a key of `ff.blog.authors`, or a plain name used as is. */
|
|
9
|
+
export declare function resolveAuthor(authors: Record<string, BlogAuthor>, value?: string): BlogAuthor | null;
|
|
10
|
+
export declare function formatDate(date: string, lang: string): string;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type MaybeRefOrGetter } from 'vue';
|
|
2
|
+
/** Copies a string to the clipboard and flags it as copied for two seconds. */
|
|
3
|
+
export declare function useCopy(text: MaybeRefOrGetter<string>): {
|
|
4
|
+
copied: import("vue").Ref<boolean, boolean>;
|
|
5
|
+
copy: () => Promise<void>;
|
|
6
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `VPLink` wiring shared by every card-like block that is either a link or a plain container
|
|
3
|
+
* (`FfFeature`, `Card`): the tag follows the link, and the icon VitePress would otherwise add next
|
|
4
|
+
* to external links is always suppressed since these blocks draw their own.
|
|
5
|
+
*/
|
|
6
|
+
export declare function cardLinkProps(link?: string, rel?: string, target?: string): {
|
|
7
|
+
readonly href: string | undefined;
|
|
8
|
+
readonly rel: string | undefined;
|
|
9
|
+
readonly target: string | undefined;
|
|
10
|
+
readonly noIcon: true;
|
|
11
|
+
readonly tag: "a" | "div";
|
|
12
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ThemeLabels, ThemeOptions } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Theme options declared under `themeConfig.ff`, with an empty object as a fallback so callers
|
|
4
|
+
* never have to guard.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useThemeOptions(): import("vue").ComputedRef<ThemeOptions>;
|
|
7
|
+
/** English fallbacks for every string this theme adds. */
|
|
8
|
+
export declare const defaultLabels: Required<ThemeLabels>;
|
|
9
|
+
/**
|
|
10
|
+
* Labels for the current locale. VitePress merges `themeConfig` per locale before it reaches the
|
|
11
|
+
* client, so a site translates the theme by declaring `ff.labels` under each locale.
|
|
12
|
+
*/
|
|
13
|
+
export declare function useLabels(): import("vue").ComputedRef<Required<ThemeLabels>>;
|
|
14
|
+
/** Fills the `{0}` placeholder of a label. */
|
|
15
|
+
export declare function format(label: string, value: string | number): string;
|