@frontfactory/vitepress-theme 1.9.0 → 1.11.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 (48) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/README.md +12 -405
  3. package/config.js +7 -10
  4. package/dist/style.css +1 -1
  5. package/node/banner.d.ts +3 -0
  6. package/node/banner.js +14 -0
  7. package/node/blog.d.ts +8 -0
  8. package/node/blog.js +46 -0
  9. package/node/options.d.ts +1 -0
  10. package/node/options.js +17 -0
  11. package/node/page-actions.d.ts +12 -0
  12. package/node/page-actions.js +34 -0
  13. package/node/pages.js +20 -8
  14. package/node/rss.js +10 -15
  15. package/package.json +2 -1
  16. package/src/blog/posts.data.ts +5 -3
  17. package/src/components/FfBackToTop.vue +5 -35
  18. package/src/components/FfBanner.vue +3 -2
  19. package/src/components/FfCopyStatus.vue +6 -14
  20. package/src/components/FfDocMeta.vue +13 -17
  21. package/src/components/FfFeedback.vue +4 -9
  22. package/src/components/FfFooter.vue +2 -2
  23. package/src/components/FfHero.vue +2 -2
  24. package/src/components/FfPost.vue +2 -1
  25. package/src/components/FfProgress.vue +6 -40
  26. package/src/composables/blog.ts +8 -14
  27. package/src/composables/copy.ts +4 -11
  28. package/src/composables/frame.ts +50 -0
  29. package/src/composables/transient.ts +27 -0
  30. package/src/content/Card.vue +16 -4
  31. package/src/content/Tabs.vue +3 -0
  32. package/src/styles/_code.scss +6 -8
  33. package/src/styles/_content.scss +22 -3
  34. package/src/styles/_doc.scss +65 -1
  35. package/src/styles/_docsearch.scss +94 -0
  36. package/src/styles/_home.scss +28 -13
  37. package/src/styles/_mixins.scss +24 -0
  38. package/src/styles/_motion.scss +1 -1
  39. package/src/styles/_nav.scss +102 -0
  40. package/src/styles/_not-found.scss +81 -0
  41. package/src/styles/_team.scss +141 -0
  42. package/src/styles/index.scss +3 -0
  43. package/src/types.ts +3 -2
  44. package/types/composables/blog.d.ts +3 -4
  45. package/types/composables/frame.d.ts +6 -0
  46. package/types/composables/transient.d.ts +6 -0
  47. package/types/content/Tabs.vue.d.ts +2 -0
  48. package/types/types.d.ts +3 -2
@@ -1,10 +1,9 @@
1
- import type { BlogAuthor } from '../types';
1
+ import { resolveAuthor } from '../../node/blog.js';
2
+ export { resolveAuthor };
2
3
  /** Blog options, with the directory normalised (no slash at either end). */
3
4
  export declare function useBlog(): {
4
5
  dir: import("vue").ComputedRef<string>;
5
6
  isPost: import("vue").ComputedRef<boolean>;
6
- authors: import("vue").ComputedRef<Record<string, BlogAuthor>>;
7
+ authors: import("vue").ComputedRef<Record<string, import("../types.js").BlogAuthor>>;
7
8
  };
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
9
  export declare function formatDate(date: string, lang: string): string;
@@ -0,0 +1,6 @@
1
+ import { type MaybeRefOrGetter } from 'vue';
2
+ /**
3
+ * Runs `update` once, then at most once per frame however many of the window `events` fire. Listens
4
+ * only while `enabled` is true and follows it if it changes; everything is undone on unmount.
5
+ */
6
+ export declare function useFrameListener(enabled: MaybeRefOrGetter<boolean>, update: () => void, events: string[]): void;
@@ -0,0 +1,6 @@
1
+ /** A flag that turns itself off `ms` milliseconds after `start()`; the timer dies with the component. */
2
+ export declare function useTransientFlag(ms?: number): {
3
+ active: import("vue").Ref<boolean, boolean>;
4
+ start: () => void;
5
+ stop: () => void;
6
+ };
@@ -1,6 +1,8 @@
1
1
  type __VLS_Props = {
2
2
  /** Groups sharing a key switch together, and the choice is remembered across visits. */
3
3
  syncKey?: string;
4
+ /** Accessible name of the tab list. */
5
+ ariaLabel?: string;
4
6
  };
5
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>;
6
8
  declare const _default: typeof __VLS_export;
package/types/types.d.ts CHANGED
@@ -221,8 +221,9 @@ export interface ThemeOptions {
221
221
  */
222
222
  feedback?: boolean | FeedbackConfig;
223
223
  /**
224
- * Menu in the page kicker with page actions. Off by default; `true` turns on every action. The
225
- * Markdown source is injected by `ffTransformPageData`, which a site defining its own
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
226
227
  * `transformPageData` must call from it. Mastodon has no universal share intent, so its link
227
228
  * targets `mastodonInstance` (defaults to `mastodon.social`).
228
229
  */