@frontfactory/vitepress-theme 1.6.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 (95) hide show
  1. package/CHANGELOG.md +214 -0
  2. package/README.md +160 -8
  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 +49 -26
  11. package/src/blog/posts.data.ts +46 -0
  12. package/src/components/FfBackToTop.vue +33 -10
  13. package/src/components/FfBanner.vue +42 -8
  14. package/src/components/FfCopyStatus.vue +64 -0
  15. package/src/components/FfDocMeta.vue +50 -46
  16. package/src/components/FfFeature.vue +18 -7
  17. package/src/components/FfFeedback.vue +96 -0
  18. package/src/components/FfFooter.vue +11 -5
  19. package/src/components/FfHero.vue +20 -10
  20. package/src/components/FfHeroCommand.vue +24 -27
  21. package/src/components/FfHomeSponsors.vue +2 -2
  22. package/src/components/FfNavBarTitle.vue +63 -0
  23. package/src/components/FfPost.vue +49 -0
  24. package/src/components/FfProgress.vue +69 -0
  25. package/src/components/FfVersionSwitcher.vue +20 -0
  26. package/src/composables/blog.ts +38 -0
  27. package/src/composables/options.ts +19 -14
  28. package/src/composables/relativeTime.ts +59 -0
  29. package/src/composables/tabs.ts +155 -0
  30. package/src/content/Api.vue +6 -2
  31. package/src/content/Badge.vue +26 -0
  32. package/src/content/Callout.vue +27 -0
  33. package/src/content/FileTree.vue +118 -0
  34. package/src/content/Tab.vue +11 -0
  35. package/src/content/Tabs.vue +74 -0
  36. package/src/content/Timeline.vue +19 -0
  37. package/src/content/TimelineItem.vue +37 -0
  38. package/src/content/timeline.ts +4 -0
  39. package/src/index.ts +37 -1
  40. package/src/internal.ts +7 -2
  41. package/src/layout/FfBlog.vue +62 -0
  42. package/src/layout/FfLayout.vue +17 -1
  43. package/src/styles/_base.scss +20 -5
  44. package/src/styles/_blocks.scss +25 -1
  45. package/src/styles/_blog.scss +131 -0
  46. package/src/styles/_breakpoints.scss +26 -0
  47. package/src/styles/_code.scss +5 -5
  48. package/src/styles/_content.scss +280 -12
  49. package/src/styles/_doc.scss +18 -5
  50. package/src/styles/_home.scss +37 -17
  51. package/src/styles/_motion.scss +22 -2
  52. package/src/styles/_nav.scss +81 -8
  53. package/src/styles/_print.scss +77 -0
  54. package/src/styles/_sidebar.scss +2 -2
  55. package/src/styles/_tokens.scss +75 -9
  56. package/src/styles/index.scss +2 -0
  57. package/src/types.ts +140 -2
  58. package/types/blog/posts.data.d.ts +14 -0
  59. package/types/components/FfBackToTop.vue.d.ts +3 -0
  60. package/types/components/FfBanner.vue.d.ts +3 -0
  61. package/types/components/FfCopyStatus.vue.d.ts +3 -0
  62. package/types/components/FfDocMeta.vue.d.ts +3 -0
  63. package/types/components/FfFeature.vue.d.ts +13 -0
  64. package/types/components/FfFeedback.vue.d.ts +3 -0
  65. package/types/components/FfFooter.vue.d.ts +3 -0
  66. package/types/components/FfHero.vue.d.ts +42 -0
  67. package/types/components/FfHeroCommand.vue.d.ts +9 -0
  68. package/types/components/FfHomeSponsors.vue.d.ts +19 -0
  69. package/types/components/FfNavBarTitle.vue.d.ts +17 -0
  70. package/types/components/FfPost.vue.d.ts +3 -0
  71. package/types/components/FfProgress.vue.d.ts +3 -0
  72. package/types/components/FfVersionSwitcher.vue.d.ts +3 -0
  73. package/types/composables/blog.d.ts +10 -0
  74. package/types/composables/link.d.ts +12 -0
  75. package/types/composables/options.d.ts +15 -0
  76. package/types/composables/relativeTime.d.ts +2 -0
  77. package/types/composables/tabs.d.ts +15 -0
  78. package/types/content/Api.vue.d.ts +27 -0
  79. package/types/content/Badge.vue.d.ts +21 -0
  80. package/types/content/Callout.vue.d.ts +24 -0
  81. package/types/content/Card.vue.d.ts +23 -0
  82. package/types/content/CardGrid.vue.d.ts +20 -0
  83. package/types/content/FileTree.vue.d.ts +6 -0
  84. package/types/content/Kbd.vue.d.ts +15 -0
  85. package/types/content/Steps.vue.d.ts +15 -0
  86. package/types/content/Tab.vue.d.ts +19 -0
  87. package/types/content/Tabs.vue.d.ts +7 -0
  88. package/types/content/Timeline.vue.d.ts +21 -0
  89. package/types/content/TimelineItem.vue.d.ts +21 -0
  90. package/types/content/timeline.d.ts +3 -0
  91. package/types/index.d.ts +25 -0
  92. package/types/internal.d.ts +9 -0
  93. package/types/layout/FfBlog.vue.d.ts +3 -0
  94. package/types/layout/FfLayout.vue.d.ts +23 -0
  95. package/types/types.d.ts +256 -0
package/src/types.ts CHANGED
@@ -58,8 +58,6 @@ export interface ThemeLabels {
58
58
  lastUpdated?: string
59
59
  /** Heading of the hero install panel. Defaults to `Install`. */
60
60
  heroInstall?: string
61
- /** Hero copy button. Defaults to `Copy`. */
62
- heroCopy?: string
63
61
  /** Hero copy button once the command is on the clipboard. Defaults to `Copied`. */
64
62
  heroCopied?: string
65
63
  /** Accessible name of the hero copy button; `{0}` is the command. Defaults to `Copy {0}`. */
@@ -68,10 +66,93 @@ export interface ThemeLabels {
68
66
  backToTop?: string
69
67
  /** Heading of the footer social column. Defaults to `Follow`. */
70
68
  footerSocial?: string
69
+ /** Hidden hint after links that open in a new tab. Defaults to `opens in a new tab`. */
70
+ newTab?: string
71
71
  /** Heading of the sponsors section. Defaults to `Sponsors`. */
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. */
@@ -108,6 +189,11 @@ export interface HeroExtras {
108
189
  meta?: HeroMetaItem[]
109
190
  }
110
191
 
192
+ /**
193
+ * Text fields documented as accepting inline HTML (banner text, hero and feature copy, footer
194
+ * message) are rendered as-is. They come from the site's own config and frontmatter, so they are
195
+ * trusted: never feed them user-submitted content.
196
+ */
111
197
  export interface ThemeOptions {
112
198
  /** Dismissible announcement bar above the navigation. */
113
199
  banner?: BannerConfig
@@ -122,6 +208,42 @@ export interface ThemeOptions {
122
208
  footerSocial?: boolean
123
209
  /** Floating back-to-top control. Defaults to `true`. */
124
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
125
247
  /** Order of the search box and the nav menu links in the top bar. Defaults to `search-first`. */
126
248
  navOrder?: 'search-first' | 'menu-first'
127
249
  /**
@@ -129,6 +251,11 @@ export interface ThemeOptions {
129
251
  * to `false` to have it scroll away with the page instead.
130
252
  */
131
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'
132
259
  /** Overrides for the strings this theme adds. Declare them per locale to translate them. */
133
260
  labels?: ThemeLabels
134
261
  }
@@ -137,4 +264,15 @@ export interface ThemeConfig extends DefaultTheme.Config {
137
264
  ff?: ThemeOptions
138
265
  }
139
266
 
267
+ // Declares `themeConfig.ff` on the default theme's own config type, so a host's `defineConfig`
268
+ // accepts it and the theme reads it without a cast.
269
+ declare module 'vitepress/theme' {
270
+ // eslint-disable-next-line @typescript-eslint/no-namespace
271
+ namespace DefaultTheme {
272
+ interface Config {
273
+ ff?: ThemeOptions
274
+ }
275
+ }
276
+ }
277
+
140
278
  export type { DefaultTheme };
@@ -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;
@@ -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,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;
@@ -0,0 +1,2 @@
1
+ /** Formats a timestamp relative to now, in the largest unit it spans: "3 days ago". */
2
+ export declare function formatRelative(timestamp: number, lang: string): string;
@@ -0,0 +1,15 @@
1
+ import { type MaybeRefOrGetter } from 'vue';
2
+ /**
3
+ * Active tab of a group of labels. With a sync key, the choice is shared by label with every
4
+ * group using the same key and remembered across visits.
5
+ */
6
+ export declare function useTabs(labels: MaybeRefOrGetter<string[]>, syncKey?: MaybeRefOrGetter<string | undefined>): {
7
+ active: import("vue").ComputedRef<number>;
8
+ select: (index: number) => void;
9
+ onKeydown: (event: KeyboardEvent) => void;
10
+ };
11
+ /** Copies a string to the clipboard and flags it as copied for two seconds. */
12
+ export declare function useCopy(text: MaybeRefOrGetter<string>): {
13
+ copied: import("vue").Ref<boolean, boolean>;
14
+ copy: () => Promise<void>;
15
+ };
@@ -0,0 +1,27 @@
1
+ type __VLS_Props = {
2
+ /** Symbol being documented, e.g. `refs()`. */
3
+ name: string;
4
+ /** Free-form kind label, e.g. `function`, `mixin`, `option`. */
5
+ kind?: string;
6
+ /** One-line signature shown under the heading. */
7
+ signature?: string;
8
+ /** Version the symbol appeared in. */
9
+ since?: string;
10
+ /** Marks the symbol as deprecated. */
11
+ deprecated?: boolean;
12
+ };
13
+ declare const __VLS_template: () => {
14
+ __VLS_Slots: {
15
+ default?: (props: {}) => any;
16
+ };
17
+ };
18
+ type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
19
+ 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>;
20
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
21
+ declare const _default: typeof __VLS_export;
22
+ export default _default;
23
+ type __VLS_WithSlots<T, S> = T & {
24
+ new (): {
25
+ $slots: S;
26
+ };
27
+ };
@@ -0,0 +1,21 @@
1
+ type __VLS_Props = {
2
+ /** Text of the badge; for `since`, the version, printed through the `apiSince` label. */
3
+ text?: string;
4
+ /** `tip`, `info`, `warning` and `danger` come from VitePress; `new`, `beta`, `deprecated` and `since` from the theme. */
5
+ type?: string;
6
+ };
7
+ declare const __VLS_template: () => {
8
+ __VLS_Slots: {
9
+ default?: (props: {}) => any;
10
+ };
11
+ };
12
+ type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
13
+ 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>;
14
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
15
+ declare const _default: typeof __VLS_export;
16
+ export default _default;
17
+ type __VLS_WithSlots<T, S> = T & {
18
+ new (): {
19
+ $slots: S;
20
+ };
21
+ };
@@ -0,0 +1,24 @@
1
+ type __VLS_Props = {
2
+ /** One of the container types: `tip`, `info`, `note`, `important`, `warning`, `danger`, `caution`. */
3
+ type?: string;
4
+ /** Label printed above the text. Defaults to the type, like a container. */
5
+ title?: string;
6
+ };
7
+ declare const __VLS_template: () => {
8
+ __VLS_Slots: {
9
+ default?: (props: {}) => any;
10
+ };
11
+ };
12
+ type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
13
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
14
+ title: string;
15
+ type: string;
16
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
17
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
18
+ declare const _default: typeof __VLS_export;
19
+ export default _default;
20
+ type __VLS_WithSlots<T, S> = T & {
21
+ new (): {
22
+ $slots: S;
23
+ };
24
+ };
@@ -0,0 +1,23 @@
1
+ type __VLS_Props = {
2
+ title: string;
3
+ /** Inline SVG or emoji shown above the title. */
4
+ icon?: string;
5
+ link?: string;
6
+ rel?: string;
7
+ target?: string;
8
+ };
9
+ declare const __VLS_template: () => {
10
+ __VLS_Slots: {
11
+ default?: (props: {}) => any;
12
+ };
13
+ };
14
+ type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
15
+ 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>;
16
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
17
+ declare const _default: typeof __VLS_export;
18
+ export default _default;
19
+ type __VLS_WithSlots<T, S> = T & {
20
+ new (): {
21
+ $slots: S;
22
+ };
23
+ };
@@ -0,0 +1,20 @@
1
+ type __VLS_Props = {
2
+ columns?: number | string;
3
+ };
4
+ declare const __VLS_template: () => {
5
+ __VLS_Slots: {
6
+ default?: (props: {}) => any;
7
+ };
8
+ };
9
+ type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
10
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
11
+ columns: string | number;
12
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
14
+ declare const _default: typeof __VLS_export;
15
+ export default _default;
16
+ type __VLS_WithSlots<T, S> = T & {
17
+ new (): {
18
+ $slots: S;
19
+ };
20
+ };
@@ -0,0 +1,6 @@
1
+ import { type VNode } from 'vue';
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
4
+ declare const __VLS_export: import("vue").DefineComponent<{}, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
5
+ [key: string]: any;
6
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,15 @@
1
+ declare const __VLS_template: () => {
2
+ __VLS_Slots: {
3
+ default?: (props: {}) => any;
4
+ };
5
+ };
6
+ type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
7
+ 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>;
8
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
9
+ declare const _default: typeof __VLS_export;
10
+ export default _default;
11
+ type __VLS_WithSlots<T, S> = T & {
12
+ new (): {
13
+ $slots: S;
14
+ };
15
+ };
@@ -0,0 +1,15 @@
1
+ declare const __VLS_template: () => {
2
+ __VLS_Slots: {
3
+ default?: (props: {}) => any;
4
+ };
5
+ };
6
+ type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
7
+ 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>;
8
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
9
+ declare const _default: typeof __VLS_export;
10
+ export default _default;
11
+ type __VLS_WithSlots<T, S> = T & {
12
+ new (): {
13
+ $slots: S;
14
+ };
15
+ };
@@ -0,0 +1,19 @@
1
+ type __VLS_Props = {
2
+ /** Text of the tab; also the value shared between groups with the same `syncKey`. */
3
+ label: string;
4
+ };
5
+ declare const __VLS_template: () => {
6
+ __VLS_Slots: {
7
+ default?: (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,7 @@
1
+ type __VLS_Props = {
2
+ /** Groups sharing a key switch together, and the choice is remembered across visits. */
3
+ syncKey?: string;
4
+ };
5
+ 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>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
@@ -0,0 +1,21 @@
1
+ type __VLS_Props = {
2
+ /** Heading level of the entry titles, to fit the outline the timeline sits in. */
3
+ level?: 2 | 3 | 4 | 5 | 6;
4
+ };
5
+ declare const __VLS_template: () => {
6
+ __VLS_Slots: {
7
+ default?: (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<{}>, {
12
+ level: 2 | 3 | 4 | 5 | 6;
13
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
15
+ declare const _default: typeof __VLS_export;
16
+ export default _default;
17
+ type __VLS_WithSlots<T, S> = T & {
18
+ new (): {
19
+ $slots: S;
20
+ };
21
+ };