-
-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c9d58bd
commit 33b7c99
Showing
1 changed file
with
37 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,56 @@ | ||
import type { NavItem, NoteItem, NotesOptions, ThemeConfig } from '../shared/index.js' | ||
|
||
export function definePlumeNotesConfig(notes: NotesOptions): NotesOptions { | ||
return notes | ||
export type { | ||
NotesOptions, | ||
NoteItem, | ||
NoteItem as NotesItem, | ||
} | ||
|
||
export function definePlumeNotesItemConfig(item: NoteItem): NoteItem { | ||
return item | ||
/** | ||
* 主题配置,在单独的 `plume.config.ts` 中使用的类型帮助函数 | ||
*/ | ||
export function defineThemeConfig(config: ThemeConfig): ThemeConfig { | ||
return config | ||
} | ||
|
||
/** | ||
* 主题导航栏配置帮助函数 | ||
*/ | ||
export function defineNavbarConfig(navbar: NavItem[]): NavItem[] { | ||
return navbar | ||
} | ||
|
||
/** | ||
* @deprecated move to `defineNavbarConfig` | ||
* 主题 notes 配置帮助函数 | ||
*/ | ||
export function defineNavbar(navbar: NavItem[]): NavItem[] { | ||
return navbar | ||
export function defineNotesConfig(notes: NotesOptions): NotesOptions { | ||
return notes | ||
} | ||
|
||
export type { | ||
NotesOptions, | ||
NoteItem, | ||
NoteItem as NotesItem, | ||
/** | ||
* 主题 notes item 配置帮助函数 | ||
*/ | ||
export function defineNoteConfig(note: NoteItem): NoteItem { | ||
return note | ||
} | ||
|
||
/** | ||
* 主题配置,在单独的 `plume.config.ts` 中使用的类型帮助函数 | ||
* @deprecated use `defineNotesConfig` instead | ||
*/ | ||
export function defineThemeConfig(config: ThemeConfig): ThemeConfig { | ||
return config | ||
export function definePlumeNotesConfig(notes: NotesOptions): NotesOptions { | ||
return notes | ||
} | ||
|
||
/** | ||
* @deprecated use `defineNoteConfig` instead | ||
*/ | ||
export function definePlumeNotesItemConfig(item: NoteItem): NoteItem { | ||
return item | ||
} | ||
|
||
/** | ||
* @deprecated move to `defineNavbarConfig` | ||
*/ | ||
export function defineNavbar(navbar: NavItem[]): NavItem[] { | ||
return navbar | ||
} |