@@ -11,8 +11,19 @@ interface UseNoteHistoryComposableState {
11
11
*/
12
12
noteHistory : Ref < NoteHistoryMeta [ ] | null > ;
13
13
14
+ /**
15
+ * Content of the certain history record
16
+ */
14
17
historyContent : Ref < NoteHistoryRecord [ 'content' ] | undefined > ;
18
+
19
+ /**
20
+ * Tools that are used in current history content
21
+ */
15
22
historyTools : Ref < NoteHistoryRecord [ 'tools' ] | undefined > ;
23
+
24
+ /**
25
+ * Metadata of the history record
26
+ */
16
27
historyMeta : Ref < NoteHistoryMeta | undefined > ;
17
28
}
18
29
@@ -29,10 +40,28 @@ interface UseNoteHistoryComposableOptions {
29
40
}
30
41
31
42
export default function useNoteHistory ( options : UseNoteHistoryComposableOptions ) : UseNoteHistoryComposableState {
43
+ /**
44
+ * Array of the note history metadata
45
+ * Used fot presentation of the note history
46
+ */
32
47
const noteHistory = ref < NoteHistoryMeta [ ] | null > ( null ) ;
33
48
49
+ /**
50
+ * Content of the current note history record
51
+ * Used for the presentation of certain history record
52
+ */
34
53
const historyContent = ref < NoteHistoryRecord [ 'content' ] | undefined > ( undefined ) ;
54
+
55
+ /**
56
+ * Note tools used in current note history content
57
+ * Used for the content displaying in editor
58
+ */
35
59
const historyTools = ref < NoteHistoryRecord [ 'tools' ] | undefined > ( undefined ) ;
60
+
61
+ /**
62
+ * Meta data of the note history record
63
+ * Used fot informative presnetation of the note history record
64
+ */
36
65
const historyMeta = ref < NoteHistoryMeta | undefined > ( undefined ) ;
37
66
38
67
const currentNoteId = computed ( ( ) => toValue ( options . noteId ) ) ;
0 commit comments