@memorysmithapp/markdown-renderer 0.3.2 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/README.md +50 -4
  2. package/dist/Markdown.d.ts +6 -2
  3. package/dist/Markdown.js +126 -17
  4. package/dist/NoteActions.d.ts +9 -0
  5. package/dist/NoteActions.js +68 -0
  6. package/dist/NoteBody.d.ts +32 -2
  7. package/dist/NoteBody.js +74 -7
  8. package/dist/edit/AttachDialog.d.ts +23 -0
  9. package/dist/edit/AttachDialog.js +126 -0
  10. package/dist/edit/ContextMenu.d.ts +29 -0
  11. package/dist/edit/ContextMenu.js +95 -0
  12. package/dist/edit/LanguageControl.d.ts +19 -0
  13. package/dist/edit/LanguageControl.js +124 -0
  14. package/dist/edit/NoteEditor.d.ts +44 -0
  15. package/dist/edit/NoteEditor.js +520 -0
  16. package/dist/edit/SaveNoticeDialog.d.ts +15 -0
  17. package/dist/edit/SaveNoticeDialog.js +41 -0
  18. package/dist/edit/analyze.d.ts +150 -0
  19. package/dist/edit/analyze.js +268 -0
  20. package/dist/edit/blocks.d.ts +97 -0
  21. package/dist/edit/blocks.js +481 -0
  22. package/dist/edit/commands.d.ts +78 -0
  23. package/dist/edit/commands.js +257 -0
  24. package/dist/edit/frontmatter.d.ts +45 -0
  25. package/dist/edit/frontmatter.js +142 -0
  26. package/dist/edit/index.d.ts +5 -0
  27. package/dist/edit/index.js +7 -0
  28. package/dist/edit/live.d.ts +28 -0
  29. package/dist/edit/live.js +675 -0
  30. package/dist/edit/saves.d.ts +48 -0
  31. package/dist/edit/saves.js +73 -0
  32. package/dist/edit/table.d.ts +58 -0
  33. package/dist/edit/table.js +185 -0
  34. package/dist/file-types.d.ts +30 -0
  35. package/dist/file-types.js +70 -0
  36. package/dist/highlight.d.ts +21 -7
  37. package/dist/highlight.js +56 -7
  38. package/dist/host.d.ts +82 -3
  39. package/dist/host.js +16 -0
  40. package/dist/index.d.ts +6 -4
  41. package/dist/index.js +1 -0
  42. package/dist/mode-icons.d.ts +6 -0
  43. package/dist/mode-icons.js +11 -0
  44. package/dist/prism-grammars.d.ts +18 -0
  45. package/dist/prism-grammars.js +305 -0
  46. package/dist/remark-callouts.d.ts +6 -0
  47. package/dist/remark-callouts.js +2 -2
  48. package/dist/remark-ring.d.ts +5 -0
  49. package/dist/remark-ring.js +25 -15
  50. package/dist/slots.js +17 -1
  51. package/dist/strings.d.ts +129 -1
  52. package/dist/strings.js +127 -1
  53. package/dist/task-saves.d.ts +35 -0
  54. package/dist/task-saves.js +86 -0
  55. package/dist/theme.d.ts +47 -0
  56. package/dist/theme.js +2 -2
  57. package/package.json +14 -2
  58. package/structure.css +355 -0
  59. package/theme-default.css +1099 -0
@@ -0,0 +1,150 @@
1
+ /**
2
+ * Where each construct of a note sits in its bytes, for the editor to draw (ADR-006).
3
+ *
4
+ * The editor's model is the note's text, and the page is drawn over it: every construct the
5
+ * reading surface draws is found here as ranges of that text — what it covers, which characters
6
+ * are its notation and which are its content — so the editor can hide the notation, style the
7
+ * content, or draw a block in place, and never rewrite a byte it did not touch.
8
+ *
9
+ * The text is read by the reading surface's own parser (`remark-parse` with GFM and math, at the
10
+ * options of `readingPlugins`), and the notation that parser leaves as text — callouts, wikilinks,
11
+ * marked text, comments, block identifiers — by the same patterns the reading surface uses. No
12
+ * React and no DOM: the analysis is a pure function of the text, and tested as one.
13
+ */
14
+ /** A range of the text: `from` included, `to` excluded. */
15
+ export interface Span {
16
+ readonly from: number;
17
+ readonly to: number;
18
+ }
19
+ export type InlineMark = 'em' | 'strong' | 'strike' | 'highlight' | 'code';
20
+ /** A construct of the note, found in its text. */
21
+ export type Construct = {
22
+ readonly kind: 'frontmatter';
23
+ readonly from: number;
24
+ readonly to: number;
25
+ } | {
26
+ readonly kind: 'heading';
27
+ readonly from: number;
28
+ readonly to: number;
29
+ readonly level: number;
30
+ readonly marker: Span;
31
+ } | {
32
+ readonly kind: 'mark';
33
+ readonly mark: InlineMark;
34
+ readonly from: number;
35
+ readonly to: number;
36
+ readonly open: Span;
37
+ readonly close: Span;
38
+ } | {
39
+ readonly kind: 'link';
40
+ readonly from: number;
41
+ readonly to: number;
42
+ /** The label; `null` for an address written bare, which has no notation to hide. */
43
+ readonly label: Span | null;
44
+ readonly url: string;
45
+ } | {
46
+ readonly kind: 'wikilink';
47
+ readonly from: number;
48
+ readonly to: number;
49
+ readonly target: string;
50
+ /** What the page shows: the alias, or the target. */
51
+ readonly label: Span;
52
+ readonly embed: boolean;
53
+ } | {
54
+ readonly kind: 'image';
55
+ readonly from: number;
56
+ readonly to: number;
57
+ } | {
58
+ readonly kind: 'inlineMath';
59
+ readonly from: number;
60
+ readonly to: number;
61
+ readonly tex: string;
62
+ } | {
63
+ readonly kind: 'mathBlock';
64
+ readonly from: number;
65
+ readonly to: number;
66
+ readonly tex: string;
67
+ } | {
68
+ readonly kind: 'code';
69
+ readonly from: number;
70
+ readonly to: number;
71
+ readonly language: string | null;
72
+ /** The fence lines; `null` for an indented block. */
73
+ readonly open: Span | null;
74
+ readonly close: Span | null;
75
+ readonly code: string;
76
+ } | {
77
+ readonly kind: 'callout';
78
+ readonly from: number;
79
+ readonly to: number;
80
+ readonly type: string;
81
+ readonly fold: '+' | '-' | null;
82
+ /** `[!type]` and its fold marker, in the first line. */
83
+ readonly marker: Span;
84
+ } | {
85
+ readonly kind: 'quoteMarker';
86
+ readonly from: number;
87
+ readonly to: number;
88
+ } | {
89
+ readonly kind: 'table';
90
+ readonly from: number;
91
+ readonly to: number;
92
+ } | {
93
+ readonly kind: 'listMarker';
94
+ readonly from: number;
95
+ readonly to: number;
96
+ readonly ordered: boolean;
97
+ /** The task box after the marker, `[ ]` or `[x]`. */
98
+ readonly task: (Span & {
99
+ readonly checked: boolean;
100
+ }) | null;
101
+ } | {
102
+ readonly kind: 'rule';
103
+ readonly from: number;
104
+ readonly to: number;
105
+ } | {
106
+ readonly kind: 'embed';
107
+ readonly from: number;
108
+ readonly to: number;
109
+ readonly target: string;
110
+ readonly anchor: string | null;
111
+ } | {
112
+ readonly kind: 'footnoteRef';
113
+ readonly from: number;
114
+ readonly to: number;
115
+ readonly label: string;
116
+ } | {
117
+ readonly kind: 'footnoteDef';
118
+ readonly from: number;
119
+ readonly to: number;
120
+ readonly label: string;
121
+ readonly marker: Span;
122
+ } | {
123
+ readonly kind: 'comment';
124
+ readonly from: number;
125
+ readonly to: number;
126
+ } | {
127
+ readonly kind: 'blockId';
128
+ readonly from: number;
129
+ readonly to: number;
130
+ readonly id: string;
131
+ } | {
132
+ readonly kind: 'html';
133
+ readonly from: number;
134
+ readonly to: number;
135
+ } | {
136
+ readonly kind: 'definition';
137
+ readonly from: number;
138
+ readonly to: number;
139
+ };
140
+ export type ConstructKind = Construct['kind'];
141
+ /** The constructs of a note, in the order of their `from`. */
142
+ export interface Analysis {
143
+ readonly constructs: readonly Construct[];
144
+ /** Where the body starts: after the frontmatter, or 0. */
145
+ readonly bodyFrom: number;
146
+ }
147
+ /** The frontmatter block, from its first `---` to the end of its closing line, or `null`. */
148
+ export declare function frontmatterSpan(text: string): Span | null;
149
+ /** The constructs of a note's text. Offsets are into `text` as given. */
150
+ export declare function analyze(text: string): Analysis;
@@ -0,0 +1,268 @@
1
+ /**
2
+ * Where each construct of a note sits in its bytes, for the editor to draw (ADR-006).
3
+ *
4
+ * The editor's model is the note's text, and the page is drawn over it: every construct the
5
+ * reading surface draws is found here as ranges of that text — what it covers, which characters
6
+ * are its notation and which are its content — so the editor can hide the notation, style the
7
+ * content, or draw a block in place, and never rewrite a byte it did not touch.
8
+ *
9
+ * The text is read by the reading surface's own parser (`remark-parse` with GFM and math, at the
10
+ * options of `readingPlugins`), and the notation that parser leaves as text — callouts, wikilinks,
11
+ * marked text, comments, block identifiers — by the same patterns the reading surface uses. No
12
+ * React and no DOM: the analysis is a pure function of the text, and tested as one.
13
+ */
14
+ import remarkGfm from 'remark-gfm';
15
+ import remarkMath from 'remark-math';
16
+ import remarkParse from 'remark-parse';
17
+ import { unified } from 'unified';
18
+ import { codeRegions, commentRegions, insideCode } from '../markdown.js';
19
+ import { CALLOUT_MARKER } from '../remark-callouts.js';
20
+ import { breaksDollarRule } from '../remark-ring.js';
21
+ let parser = null;
22
+ function parse(text) {
23
+ // The micromark extensions of `readingPlugins`, at its options; the transforms that rewrite the
24
+ // tree are not run, because they drop the positions this reads.
25
+ parser ??= unified().use(remarkParse).use(remarkGfm, { singleTilde: false }).use(remarkMath);
26
+ return parser.parse(text);
27
+ }
28
+ const FRONTMATTER_CLOSE = /\n---[ \t]*(?:\n|$)/;
29
+ /** Same as the reading surface's: `[[target#anchor|alias]]`, with an optional bang. */
30
+ const WIKILINK = /(!)?\[\[([^\]|]+?)(?:\|([^\]]+?))?\]\]/g;
31
+ const HIGHLIGHT = /==([^=\n]+)==/g;
32
+ const BLOCK_ID = /[ \t]\^([A-Za-z0-9-]+)[ \t]*$/;
33
+ const LIST_MARKER = /^([-*+]|\d{1,9}[.)])([ \t]+|$)(\[([ xX])\](?=[ \t]|$))?/;
34
+ const QUOTE_MARKERS = /^(?:[ \t]{0,3}>[ \t]?)+/;
35
+ const EMBED_LINE = /^!\[\[([^\]|#]+?)(?:#([^\]|]+?))?(?:\|[^\]]*?)?\]\]$/;
36
+ /** The frontmatter block, from its first `---` to the end of its closing line, or `null`. */
37
+ export function frontmatterSpan(text) {
38
+ if (!text.startsWith('---\n'))
39
+ return null;
40
+ const close = FRONTMATTER_CLOSE.exec(text.slice(3));
41
+ if (!close)
42
+ return null;
43
+ return { from: 0, to: 3 + close.index + close[0].length };
44
+ }
45
+ const offsets = (node) => {
46
+ const from = node.position?.start.offset;
47
+ const to = node.position?.end.offset;
48
+ return from === undefined || to === undefined ? null : { from, to };
49
+ };
50
+ /** The constructs of a note's text. Offsets are into `text` as given. */
51
+ export function analyze(text) {
52
+ const found = [];
53
+ const front = frontmatterSpan(text);
54
+ const bodyFrom = front?.to ?? 0;
55
+ if (front)
56
+ found.push({ kind: 'frontmatter', ...front });
57
+ // The body is parsed alone, padded so that every offset is an offset of the note.
58
+ const tree = parse('\n'.repeat(bodyFrom) + text.slice(bodyFrom));
59
+ const comments = commentRegions(text).filter(([from]) => from >= bodyFrom);
60
+ for (const [from, to] of comments)
61
+ found.push({ kind: 'comment', from, to });
62
+ const inComment = (at) => comments.some(([from, to]) => at >= from && at < to);
63
+ const code = codeRegions(text);
64
+ // Wikilinks first: what a wikilink covers is drawn as one link, and nothing inside it is read again.
65
+ const wikilinks = [];
66
+ for (const match of text.slice(bodyFrom).matchAll(WIKILINK)) {
67
+ const from = bodyFrom + (match.index ?? 0);
68
+ const to = from + match[0].length;
69
+ if (insideCode(code, from) || inComment(from))
70
+ continue;
71
+ const embed = match[1] === '!';
72
+ const target = match[2] ?? '';
73
+ const head = from + (embed ? 3 : 2);
74
+ const label = match[3] !== undefined
75
+ ? { from: to - 2 - match[3].length, to: to - 2 }
76
+ : { from: head, to: head + target.length };
77
+ wikilinks.push({ from, to });
78
+ // In a table cell the pipe before an alias is escaped, and the backslash is not part of the target.
79
+ found.push({ kind: 'wikilink', from, to, target: target.split('#')[0].replace(/\\$/, '').trim(), label, embed });
80
+ }
81
+ const inWikilink = (span) => wikilinks.some((link) => span.from < link.to && span.to > link.from);
82
+ const visit = (node, inCallout) => {
83
+ const span = offsets(node);
84
+ const children = node.children ?? [];
85
+ if (span && !inComment(span.from)) {
86
+ switch (node.type) {
87
+ case 'heading': {
88
+ const line = text.slice(span.from, span.to);
89
+ const marker = /^#{1,6}(?:[ \t]+|$)/.exec(line);
90
+ if (marker) {
91
+ found.push({
92
+ kind: 'heading',
93
+ ...span,
94
+ level: node.depth ?? 1,
95
+ marker: { from: span.from, to: span.from + marker[0].length },
96
+ });
97
+ }
98
+ break;
99
+ }
100
+ case 'emphasis':
101
+ case 'strong':
102
+ case 'delete': {
103
+ const first = children[0] && offsets(children[0]);
104
+ const last = children[children.length - 1] && offsets(children[children.length - 1]);
105
+ if (first && last && !inWikilink(span)) {
106
+ found.push({
107
+ kind: 'mark',
108
+ mark: node.type === 'emphasis' ? 'em' : node.type === 'strong' ? 'strong' : 'strike',
109
+ ...span,
110
+ open: { from: span.from, to: first.from },
111
+ close: { from: last.to, to: span.to },
112
+ });
113
+ }
114
+ break;
115
+ }
116
+ case 'inlineCode': {
117
+ const raw = text.slice(span.from, span.to);
118
+ const ticks = /^`+/.exec(raw)?.[0].length ?? 1;
119
+ found.push({
120
+ kind: 'mark',
121
+ mark: 'code',
122
+ ...span,
123
+ open: { from: span.from, to: span.from + ticks },
124
+ close: { from: span.to - ticks, to: span.to },
125
+ });
126
+ break;
127
+ }
128
+ case 'link': {
129
+ if (inWikilink(span))
130
+ break;
131
+ const raw = text.slice(span.from, span.to);
132
+ const first = children[0] && offsets(children[0]);
133
+ const last = children[children.length - 1] && offsets(children[children.length - 1]);
134
+ const label = raw.startsWith('[') && first && last ? { from: first.from, to: last.to } : null;
135
+ found.push({ kind: 'link', ...span, label, url: node.url ?? '' });
136
+ break;
137
+ }
138
+ case 'image':
139
+ if (!inWikilink(span))
140
+ found.push({ kind: 'image', ...span });
141
+ break;
142
+ case 'inlineMath':
143
+ if (!breaksDollarRule(text, span.from, span.to)) {
144
+ found.push({ kind: 'inlineMath', ...span, tex: node.value ?? '' });
145
+ }
146
+ break;
147
+ case 'math':
148
+ found.push({ kind: 'mathBlock', ...span, tex: node.value ?? '' });
149
+ break;
150
+ case 'code': {
151
+ const lines = text.slice(span.from, span.to).split('\n');
152
+ const head = lines[0] ?? '';
153
+ const fence = /^([ \t]*(?:>[ \t]?)*[ \t]*)(`{3,}|~{3,})/.exec(head);
154
+ const tail = lines[lines.length - 1] ?? '';
155
+ const closes = fence !== null && lines.length > 1 && new RegExp(`^[ \\t>]*\\${fence[2][0]}{${fence[2].length},}[ \\t]*$`).test(tail);
156
+ found.push({
157
+ kind: 'code',
158
+ ...span,
159
+ language: node.lang ?? null,
160
+ open: fence ? { from: span.from, to: span.from + head.length } : null,
161
+ close: closes ? { from: span.to - tail.length, to: span.to } : null,
162
+ code: node.value ?? '',
163
+ });
164
+ return;
165
+ }
166
+ case 'blockquote': {
167
+ const first = text.slice(span.from, text.indexOf('\n', span.from) === -1 ? span.to : text.indexOf('\n', span.from));
168
+ const quote = QUOTE_MARKERS.exec(first);
169
+ const callout = quote ? CALLOUT_MARKER.exec(first.slice(quote[0].length)) : null;
170
+ if (callout && quote && !inCallout) {
171
+ const markerFrom = span.from + quote[0].length;
172
+ const markerText = /^\[![^\]]+\][+-]?/.exec(first.slice(quote[0].length))?.[0] ?? '';
173
+ found.push({
174
+ kind: 'callout',
175
+ ...span,
176
+ type: (callout[1] ?? 'note').toLowerCase(),
177
+ fold: callout[2] === '+' || callout[2] === '-' ? callout[2] : null,
178
+ marker: { from: markerFrom, to: markerFrom + markerText.length },
179
+ });
180
+ for (const child of children)
181
+ visit(child, true);
182
+ return;
183
+ }
184
+ if (!inCallout) {
185
+ // Each line's markers, which the page hides while the line is not being edited.
186
+ let at = span.from;
187
+ while (at < span.to) {
188
+ const end = text.indexOf('\n', at);
189
+ const lineEnd = end === -1 || end > span.to ? span.to : end;
190
+ const marker = QUOTE_MARKERS.exec(text.slice(at, lineEnd));
191
+ if (marker)
192
+ found.push({ kind: 'quoteMarker', from: at, to: at + marker[0].length });
193
+ at = lineEnd + 1;
194
+ }
195
+ }
196
+ break;
197
+ }
198
+ case 'table':
199
+ found.push({ kind: 'table', ...span });
200
+ return;
201
+ case 'listItem': {
202
+ const marker = LIST_MARKER.exec(text.slice(span.from, span.to));
203
+ if (marker) {
204
+ const markerTo = span.from + marker[1].length + (marker[2]?.length ?? 0);
205
+ const task = marker[3] !== undefined && node.checked !== null && node.checked !== undefined
206
+ ? { from: markerTo, to: markerTo + 3, checked: node.checked }
207
+ : null;
208
+ found.push({ kind: 'listMarker', from: span.from, to: markerTo, ordered: /\d/.test(marker[1]), task });
209
+ }
210
+ break;
211
+ }
212
+ case 'thematicBreak':
213
+ found.push({ kind: 'rule', ...span });
214
+ return;
215
+ case 'paragraph': {
216
+ const raw = text.slice(span.from, span.to);
217
+ const embed = EMBED_LINE.exec(raw.trim());
218
+ if (embed && !raw.includes('\n') && !inCallout && span.from === text.lastIndexOf('\n', span.from - 1) + 1) {
219
+ found.push({ kind: 'embed', ...span, target: embed[1].trim(), anchor: embed[2]?.trim() ?? null });
220
+ return;
221
+ }
222
+ // Marked text and a block identifier are characters to the parser, found here on the
223
+ // paragraph's own lines and never inside code.
224
+ for (const match of raw.matchAll(HIGHLIGHT)) {
225
+ const from = span.from + (match.index ?? 0);
226
+ const to = from + match[0].length;
227
+ if (insideCode(code, from) || inWikilink({ from, to }))
228
+ continue;
229
+ found.push({ kind: 'mark', mark: 'highlight', from, to, open: { from, to: from + 2 }, close: { from: to - 2, to } });
230
+ }
231
+ const lastLineFrom = span.from + raw.lastIndexOf('\n') + 1;
232
+ const id = BLOCK_ID.exec(text.slice(lastLineFrom, span.to));
233
+ if (id) {
234
+ const from = lastLineFrom + (id.index ?? 0) + 1;
235
+ found.push({ kind: 'blockId', from, to: from + 1 + id[1].length, id: id[1] });
236
+ }
237
+ break;
238
+ }
239
+ case 'footnoteReference':
240
+ found.push({ kind: 'footnoteRef', ...span, label: node.label ?? node.identifier ?? '' });
241
+ break;
242
+ case 'footnoteDefinition': {
243
+ const marker = /^\[\^[^\]]+\]:[ \t]?/.exec(text.slice(span.from, span.to));
244
+ if (marker) {
245
+ found.push({
246
+ kind: 'footnoteDef',
247
+ ...span,
248
+ label: node.label ?? node.identifier ?? '',
249
+ marker: { from: span.from, to: span.from + marker[0].length },
250
+ });
251
+ }
252
+ break;
253
+ }
254
+ case 'html':
255
+ found.push({ kind: 'html', ...span });
256
+ return;
257
+ case 'definition':
258
+ found.push({ kind: 'definition', ...span });
259
+ return;
260
+ }
261
+ }
262
+ for (const child of children)
263
+ visit(child, inCallout);
264
+ };
265
+ visit(tree, false);
266
+ found.sort((a, b) => a.from - b.from || b.to - a.to);
267
+ return { constructs: found, bodyFrom };
268
+ }
@@ -0,0 +1,97 @@
1
+ /**
2
+ * The blocks the editor draws in place of their text while the author is not editing it, each
3
+ * drawn by the reading surface's own components so that edit mode looks like the page (ADR-006):
4
+ * a run of notation through `Markdown`, a callout with its type and folding controls, a table
5
+ * whose cells are edited where they stand (#56), and the frontmatter as a form (#58).
6
+ *
7
+ * Every edit they make is a change to the note's bytes, dispatched to the editor; none of them
8
+ * keeps a copy of the note.
9
+ */
10
+ import type { EditorView } from '@codemirror/view';
11
+ import { type ReactNode } from 'react';
12
+ /** A run of notation drawn as the reading surface draws it: comments out, wikilinks resolved, embeds expanded. */
13
+ export declare function Snippet({ text }: {
14
+ text: string;
15
+ }): import("react").JSX.Element;
16
+ /** The types a callout may take from the toolbar: the families the default theme draws. */
17
+ export declare const CALLOUT_TYPES: readonly ["note", "info", "todo", "abstract", "tip", "success", "question", "warning", "failure", "danger", "bug", "example", "quote"];
18
+ /**
19
+ * A callout drawn as the page draws it, with its type and its folding chosen in place: each
20
+ * choice rewrites the marker `[!type]±` of its first line and nothing else (#55).
21
+ */
22
+ export declare function CalloutBlock({ view, text, marker }: {
23
+ view: EditorView;
24
+ text: string;
25
+ marker: {
26
+ from: number;
27
+ to: number;
28
+ type: string;
29
+ fold: '+' | '-' | null;
30
+ };
31
+ }): import("react").JSX.Element;
32
+ /**
33
+ * A table whose cells are edited where they stand. A cell commits its text when it loses the focus,
34
+ * or on Enter (to the cell below) and Tab (to the next one); each commit rewrites that cell's
35
+ * content only. The controls add and remove rows and columns and align the column of the cell last
36
+ * focused.
37
+ */
38
+ export declare function TableBlock({ view, from, to }: {
39
+ view: EditorView;
40
+ from: number;
41
+ to: number;
42
+ }): import("react").JSX.Element;
43
+ /** Shows a block as its text: the cursor goes into it, and the editor draws its source. */
44
+ export declare function reveal(view: EditorView, at: number): void;
45
+ export declare function PropertiesBlock({ view, to }: {
46
+ view: EditorView;
47
+ to: number;
48
+ }): import("react").JSX.Element | null;
49
+ /** The control a note with no frontmatter shows above its body, which gives it one. */
50
+ export declare function AddProperties({ view }: {
51
+ view: EditorView;
52
+ }): import("react").JSX.Element;
53
+ export declare const ICONS: {
54
+ readonly add: ReactNode;
55
+ readonly remove: ReactNode;
56
+ readonly source: ReactNode;
57
+ readonly rowAdd: ReactNode;
58
+ readonly rowRemove: ReactNode;
59
+ readonly columnAdd: ReactNode;
60
+ readonly columnRemove: ReactNode;
61
+ readonly alignLeft: ReactNode;
62
+ readonly alignCenter: ReactNode;
63
+ readonly alignRight: ReactNode;
64
+ readonly undo: ReactNode;
65
+ readonly redo: ReactNode;
66
+ readonly bold: ReactNode;
67
+ readonly italic: ReactNode;
68
+ readonly strikethrough: ReactNode;
69
+ readonly highlight: ReactNode;
70
+ readonly code: ReactNode;
71
+ readonly link: ReactNode;
72
+ readonly wikilink: ReactNode;
73
+ readonly bulletList: ReactNode;
74
+ readonly orderedList: ReactNode;
75
+ readonly taskList: ReactNode;
76
+ readonly quote: ReactNode;
77
+ readonly callout: ReactNode;
78
+ readonly table: ReactNode;
79
+ readonly codeBlock: ReactNode;
80
+ readonly math: ReactNode;
81
+ readonly diagram: ReactNode;
82
+ readonly rule: ReactNode;
83
+ readonly footnote: ReactNode;
84
+ readonly comment: ReactNode;
85
+ readonly caret: ReactNode;
86
+ readonly cut: ReactNode;
87
+ readonly copy: ReactNode;
88
+ readonly paste: ReactNode;
89
+ readonly attach: ReactNode;
90
+ readonly revert: ReactNode;
91
+ readonly saving: ReactNode;
92
+ readonly saved: ReactNode;
93
+ readonly notSaved: ReactNode;
94
+ readonly alert: ReactNode;
95
+ readonly edit: ReactNode;
96
+ readonly view: ReactNode;
97
+ };