feat(notes): liens internes, onglet Réseau, living blocks et consentement IA
Rend les liens entre notes visibles et persistants (sync NoteLink au save, auto-save, graphe réseau rafraîchi), ajoute living blocks, Memory Echo, recherche globale, consentement IA explicite et consolide les prototypes design en architectural-grid. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
23
memento-note/lib/note-change-sync.ts
Normal file
23
memento-note/lib/note-change-sync.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import type { Note } from '@/lib/types'
|
||||
|
||||
export const NOTE_CHANGE_EVENT = 'memento-note-changed'
|
||||
export const NOTE_REQUEST_SAVE_EVENT = 'memento-request-note-save'
|
||||
|
||||
export type NoteChangeEvent =
|
||||
| { type: 'updated'; note: Note }
|
||||
| { type: 'deleted'; noteId: string; notebookId?: string | null }
|
||||
| { type: 'created'; note: Note }
|
||||
|
||||
export type NoteCollectionActions = {
|
||||
onTogglePin?: (note: Note) => void | Promise<void>
|
||||
onDeleteNote?: (note: Note) => void | Promise<void>
|
||||
onArchiveNote?: (note: Note) => void | Promise<void>
|
||||
onMoveToNotebook?: (note: Note, notebookId: string | null) => void | Promise<void>
|
||||
onNotePatch?: (noteId: string, patch: Partial<Note>) => void
|
||||
onNoteIllustrationGenerated?: (noteId: string) => void | Promise<void>
|
||||
}
|
||||
|
||||
export function emitNoteChange(detail: NoteChangeEvent) {
|
||||
if (typeof window === 'undefined') return
|
||||
window.dispatchEvent(new CustomEvent(NOTE_CHANGE_EVENT, { detail }))
|
||||
}
|
||||
Reference in New Issue
Block a user