UNPKG

@stacksjs/stx

Version:

A performant UI Framework. Powered by Bun.

53 lines 1.6 kB
/** * Generate bookmarks panel HTML */ export declare function getBookmarksPanelHtml(bookmarks: Bookmark[]): string; /** * Generate bookmarks panel styles */ export declare function getBookmarksPanelStyles(): string; /** * Generate bookmarks client script */ export declare function getBookmarksScript(): string; /** * Bookmark entry */ export declare interface Bookmark { id: string name: string storyId: string variantId: string props: Record<string, any> created: number notes?: string color?: string } /** * Bookmarks storage */ export declare interface BookmarksStorage { version: number bookmarks: Bookmark[] } /** * Bookmarks manager */ export declare class BookmarksManager { private storage: BookmarksStorage; private storagePath: string; private dirty: any; constructor(rootDir: string); private loadStorage(): BookmarksStorage; save(): Promise<void>; addBookmark(storyId: string, variantId: string, props: Record<string, any>, options?: { name?: string, notes?: string, color?: string }): Bookmark; getAllBookmarks(): Bookmark[]; getBookmarksForStory(storyId: string): Bookmark[]; getBookmark(id: string): Bookmark | undefined; isBookmarked(storyId: string, variantId: string): boolean; updateBookmark(id: string, updates: Partial<Omit<Bookmark, 'id' | 'created'>>): Bookmark | undefined; deleteBookmark(id: string): boolean; toggleBookmark(storyId: string, variantId: string, props: Record<string, any>): { added: boolean, bookmark?: Bookmark }; exportBookmarks(): string; importBookmarks(json: string, merge?: any): number; }