feat: editor improvements and architectural grid prototype
Multiple feature additions and improvements across the application: - NextGen Editor: drag handles, smart paste, block actions - Structured views: Kanban and table layouts for notes - Architectural Grid: new brainstorming/agent interface prototype - Flashcards: SM-2 revision algorithm with AI generation - MCP server: robustness improvements - Graph/PDF chat: fix click propagation and copy behavior - Various UI/UX enhancements and bug fixes Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,12 +1,9 @@
|
||||
import type { NotesLayoutMode, NotesViewType } from '@/components/notes-list-views'
|
||||
import type { NotesLayoutMode } from '@/components/notes-list-views'
|
||||
|
||||
export const NOTES_LAYOUT_COOKIE = 'memento-notes-layout'
|
||||
export const NOTES_VIEW_TYPE_COOKIE = 'memento-notes-view-type'
|
||||
export const NOTES_LAYOUT_STORAGE_KEY = 'memento-notes-layout'
|
||||
export const NOTES_VIEW_TYPE_STORAGE_KEY = 'memento-notes-view-type'
|
||||
|
||||
const LAYOUT_VALUES: NotesLayoutMode[] = ['grid', 'list', 'table', 'kanban', 'gallery']
|
||||
const VIEW_TYPE_VALUES: NotesViewType[] = ['notes', 'tasks']
|
||||
|
||||
export function parseNotesLayoutMode(value: string | undefined | null): NotesLayoutMode {
|
||||
if (value && (LAYOUT_VALUES as string[]).includes(value)) {
|
||||
@@ -17,19 +14,8 @@ export function parseNotesLayoutMode(value: string | undefined | null): NotesLay
|
||||
return 'list'
|
||||
}
|
||||
|
||||
export function parseNotesViewType(value: string | undefined | null): NotesViewType {
|
||||
if (value && (VIEW_TYPE_VALUES as string[]).includes(value)) return value as NotesViewType
|
||||
return 'notes'
|
||||
}
|
||||
|
||||
export function setNotesLayoutPreference(layout: NotesLayoutMode) {
|
||||
if (typeof window === 'undefined') return
|
||||
localStorage.setItem(NOTES_LAYOUT_STORAGE_KEY, layout)
|
||||
document.cookie = `${NOTES_LAYOUT_COOKIE}=${layout}; path=/; max-age=31536000; SameSite=Lax`
|
||||
}
|
||||
|
||||
export function setNotesViewTypePreference(viewType: NotesViewType) {
|
||||
if (typeof window === 'undefined') return
|
||||
localStorage.setItem(NOTES_VIEW_TYPE_STORAGE_KEY, viewType)
|
||||
document.cookie = `${NOTES_VIEW_TYPE_COOKIE}=${viewType}; path=/; max-age=31536000; SameSite=Lax`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user