@bndynet/vue-site 0.1.11 → 1.0.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/README.md CHANGED
@@ -5,6 +5,7 @@ Configurable Vue 3 site framework: one package, `site.config.ts`, and Markdown p
5
5
  ## Features
6
6
 
7
7
  - Config-driven nav (Lucide icon names)
8
+ - Permission-gated nav via a `visible` predicate (sync or async; hides item and skips its route)
8
9
  - Markdown (`?raw`) or Vue pages
9
10
  - highlight.js, light/dark theme + localStorage
10
11
  - Project `README.md` as Home
@@ -87,6 +88,8 @@ Add `"dev": "vue-site dev"` (or `vs dev`) in `package.json` scripts if you like.
87
88
  | `page` | `() => import('./page.md?raw')` or `() => import('./Page.vue')` |
88
89
  | `path` | Route path (derived from `label` if omitted) |
89
90
  | `children` | Nested group |
91
+ | `link` | Render as a hyperlink (internal route path or external URL) instead of a page route |
92
+ | `visible` | `() => boolean \| Promise<boolean>`, awaited once at startup. Return `false` to hide the item from the nav and skip its route (not reachable by direct URL). A hidden parent hides its subtree; a group with no remaining children is pruned. Not reactive to later changes. |
90
93
 
91
94
  ### `ThemeConfig`
92
95
 
@@ -2,4 +2,5 @@ export declare function useNavLayout(): {
2
2
  tieredNav: import('vue').ComputedRef<boolean>;
3
3
  sidebarNav: import('vue').ComputedRef<import('..').ResolvedNavItem[]>;
4
4
  showSidebar: import('vue').ComputedRef<boolean>;
5
+ standalone: import('vue').ComputedRef<boolean>;
5
6
  };
package/dist/index.d.ts CHANGED
@@ -4,5 +4,5 @@ export { useTheme, themeRefKey } from './composables/useTheme';
4
4
  export { useSiteConfig } from './composables/useSiteConfig';
5
5
  export { builtinThemePalettes } from './theme/presets';
6
6
  export { ElMessage, ElMessageBox, ElNotification, } from 'element-plus';
7
- export type { SiteConfig, SiteEnvConfig, SiteViteConfig, SiteExternalLink, NavItem, ThemeConfig, ThemeOption, ThemePaletteVars, ResolvedNavItem, } from './types';
7
+ export type { SiteConfig, SiteEnvConfig, SiteViteConfig, SiteExternalLink, NavItem, StandalonePage, ThemeConfig, ThemeOption, ThemePaletteVars, ResolvedNavItem, } from './types';
8
8
  export declare function defineConfig(config: SiteConfig): SiteConfig;