@frontfactory/vitepress-theme 1.8.0 → 1.10.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 +39 -0
- package/README.md +11 -391
- package/config.d.ts +4 -3
- package/config.js +58 -40
- package/dist/style.css +1 -1
- package/node/banner.d.ts +3 -0
- package/node/banner.js +14 -0
- package/node/blog.d.ts +11 -0
- package/node/blog.js +63 -0
- package/node/llms.js +4 -3
- package/node/og.js +5 -6
- package/node/options.d.ts +1 -0
- package/node/options.js +17 -0
- package/node/page-actions.d.ts +12 -0
- package/node/page-actions.js +34 -0
- package/node/pages.js +34 -14
- package/node/rss.js +13 -21
- package/package.json +1 -1
- package/src/blog/posts.data.ts +7 -4
- package/src/components/FfBackToTop.vue +6 -36
- package/src/components/FfBanner.vue +3 -2
- package/src/components/FfCopyStatus.vue +6 -14
- package/src/components/FfDocMeta.vue +299 -24
- package/src/components/FfFeedback.vue +4 -9
- package/src/components/FfHero.vue +14 -33
- package/src/components/FfHeroActions.vue +44 -0
- package/src/components/FfHeroCommand.vue +3 -2
- package/src/components/FfPost.vue +6 -4
- package/src/components/FfProgress.vue +6 -40
- package/src/composables/blog.ts +8 -11
- package/src/composables/copy.ts +29 -0
- package/src/composables/frame.ts +50 -0
- package/src/composables/options.ts +9 -1
- package/src/composables/tabs.ts +2 -35
- package/src/composables/transient.ts +27 -0
- package/src/content/Tabs.vue +27 -6
- package/src/internal.ts +1 -0
- package/src/layout/FfLayout.vue +3 -3
- package/src/styles/_base.scss +5 -9
- package/src/styles/_blocks.scss +4 -7
- package/src/styles/_blog.scss +4 -5
- package/src/styles/_code.scss +12 -20
- package/src/styles/_content.scss +153 -63
- package/src/styles/_doc.scss +26 -25
- package/src/styles/_home.scss +31 -61
- package/src/styles/_mixins.scss +87 -0
- package/src/styles/_motion.scss +12 -10
- package/src/styles/_nav.scss +12 -19
- package/src/styles/_sidebar.scss +5 -8
- package/src/styles/_tokens.scss +19 -4
- package/src/types.ts +31 -4
- package/types/components/FfHeroActions.vue.d.ts +19 -0
- package/types/composables/blog.d.ts +3 -4
- package/types/composables/copy.d.ts +6 -0
- package/types/composables/frame.d.ts +6 -0
- package/types/composables/tabs.d.ts +0 -5
- package/types/composables/transient.d.ts +6 -0
- package/types/internal.d.ts +1 -0
- package/types/types.d.ts +29 -4
package/types/internal.d.ts
CHANGED
|
@@ -7,3 +7,4 @@ export { default as VPSponsors } from 'vitepress/dist/client/theme-default/compo
|
|
|
7
7
|
export { useLangs } from 'vitepress/dist/client/theme-default/composables/langs.js';
|
|
8
8
|
export { useLayout } from 'vitepress/dist/client/theme-default/composables/layout.js';
|
|
9
9
|
export { normalizeLink } from 'vitepress/dist/client/theme-default/support/utils.js';
|
|
10
|
+
export { isExternal } from 'vitepress/dist/client/shared.js';
|
package/types/types.d.ts
CHANGED
|
@@ -83,12 +83,28 @@ export interface ThemeLabels {
|
|
|
83
83
|
feedbackThanks?: string;
|
|
84
84
|
/** Button copying the page as Markdown. Defaults to `Copy as Markdown`. */
|
|
85
85
|
copyMarkdown?: string;
|
|
86
|
+
/** Second line of the Markdown menu item. Defaults to `Page source`. */
|
|
87
|
+
copyMarkdownHint?: string;
|
|
88
|
+
/** Accessible name of the chevron opening the page actions menu. Defaults to `More page actions`. */
|
|
89
|
+
pageActions?: string;
|
|
90
|
+
/** Main button copying the page URL. Defaults to `Copy link`. */
|
|
91
|
+
copyLink?: string;
|
|
92
|
+
/** Trigger of the menu when there is nothing to copy. Defaults to `Share`. */
|
|
93
|
+
share?: string;
|
|
94
|
+
/** Confirmation shown once the page URL is copied. Defaults to `Link copied`. */
|
|
95
|
+
linkCopied?: string;
|
|
96
|
+
/** Share menu item; `{0}` is the network name. Defaults to `Share on {0}`. */
|
|
97
|
+
shareOn?: string;
|
|
86
98
|
/** Accessible name of the version menu, followed by the current version. Defaults to `Version`. */
|
|
87
99
|
versionSwitcher?: string;
|
|
88
100
|
/** Author line of a post; `{0}` is the name. Defaults to `By {0}`. */
|
|
89
101
|
blogBy?: string;
|
|
90
102
|
/** Message of a blog index without any post. Defaults to `No posts yet`. */
|
|
91
103
|
blogEmpty?: string;
|
|
104
|
+
/** Tooltip of the back-to-top control, unless the default theme's `returnToTopLabel` is set. Defaults to `Return to top`. */
|
|
105
|
+
returnToTop?: string;
|
|
106
|
+
/** Screen-reader announcement once a code block is copied. Defaults to `Copied`. */
|
|
107
|
+
codeCopied?: string;
|
|
92
108
|
}
|
|
93
109
|
/** One author of the blog, declared in `ff.blog.authors` and referred to by key from a post. */
|
|
94
110
|
export interface BlogAuthor {
|
|
@@ -117,7 +133,7 @@ export interface BlogConfig {
|
|
|
117
133
|
export interface OgFont {
|
|
118
134
|
/** Family name, also used to draw the text. The first font of the list is the one used. */
|
|
119
135
|
name: string;
|
|
120
|
-
/** TTF, OTF or WOFF file (not WOFF2), relative to the
|
|
136
|
+
/** TTF, OTF or WOFF file (not WOFF2), relative to the VitePress root (the folder holding `.vitepress`). */
|
|
121
137
|
path: string;
|
|
122
138
|
weight?: number;
|
|
123
139
|
style?: 'normal' | 'italic';
|
|
@@ -205,10 +221,19 @@ export interface ThemeOptions {
|
|
|
205
221
|
*/
|
|
206
222
|
feedback?: boolean | FeedbackConfig;
|
|
207
223
|
/**
|
|
208
|
-
*
|
|
209
|
-
*
|
|
210
|
-
*
|
|
224
|
+
* Menu in the page kicker with page actions. By default only "Copy link" is on; `true` turns on
|
|
225
|
+
* every action and `false` turns the menu off.
|
|
226
|
+
* The Markdown source is injected by `ffTransformPageData`, which a site defining its own
|
|
227
|
+
* `transformPageData` must call from it. Mastodon has no universal share intent, so its link
|
|
228
|
+
* targets `mastodonInstance` (defaults to `mastodon.social`).
|
|
211
229
|
*/
|
|
230
|
+
pageActions?: boolean | {
|
|
231
|
+
copyMarkdown?: boolean;
|
|
232
|
+
copyLink?: boolean;
|
|
233
|
+
share?: Array<'x' | 'linkedin' | 'bluesky' | 'mastodon'>;
|
|
234
|
+
mastodonInstance?: string;
|
|
235
|
+
};
|
|
236
|
+
/** @deprecated Use `pageActions: { copyMarkdown: true }`. */
|
|
212
237
|
copyMarkdown?: boolean;
|
|
213
238
|
/**
|
|
214
239
|
* Writes `llms.txt` and `llms-full.txt` to the output directory at the end of the build. Off by
|