@thomasfosterau/effect-richtext 0.0.0 → 0.1.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 (176) hide show
  1. package/LICENSE +48 -0
  2. package/README.md +117 -1
  3. package/dist/_virtual/_rolldown/runtime.js +12 -0
  4. package/dist/commands/commands.d.ts +323 -0
  5. package/dist/commands/commands.js +722 -0
  6. package/dist/commands/internal.js +43 -0
  7. package/dist/commands/keymaps.d.ts +46 -0
  8. package/dist/commands/keymaps.js +64 -0
  9. package/dist/commands.d.ts +3 -0
  10. package/dist/commands.js +3 -0
  11. package/dist/compat/commands.d.ts +250 -0
  12. package/dist/compat/commands.js +275 -0
  13. package/dist/compat/internal/core.d.ts +20 -0
  14. package/dist/compat/internal/core.js +148 -0
  15. package/dist/compat/internal/props.js +82 -0
  16. package/dist/compat/keymap.d.ts +21 -0
  17. package/dist/compat/keymap.js +38 -0
  18. package/dist/compat/model.d.ts +893 -0
  19. package/dist/compat/model.js +1212 -0
  20. package/dist/compat/orderedmap.d.ts +74 -0
  21. package/dist/compat/orderedmap.js +124 -0
  22. package/dist/compat/schema-basic.d.ts +38 -0
  23. package/dist/compat/schema-basic.js +238 -0
  24. package/dist/compat/schema-list.d.ts +81 -0
  25. package/dist/compat/schema-list.js +156 -0
  26. package/dist/compat/state.d.ts +415 -0
  27. package/dist/compat/state.js +689 -0
  28. package/dist/compat/test-builder.d.ts +98 -0
  29. package/dist/compat/test-builder.js +197 -0
  30. package/dist/compat/transform.d.ts +458 -0
  31. package/dist/compat/transform.js +803 -0
  32. package/dist/compat/view.d.ts +411 -0
  33. package/dist/compat/view.js +409 -0
  34. package/dist/dropcursor.d.ts +46 -0
  35. package/dist/dropcursor.js +176 -0
  36. package/dist/extensions/defaults.d.ts +716 -0
  37. package/dist/extensions/defaults.js +209 -0
  38. package/dist/extensions/editor.d.ts +246 -0
  39. package/dist/extensions/editor.js +271 -0
  40. package/dist/extensions/extension.d.ts +375 -0
  41. package/dist/extensions/extension.js +233 -0
  42. package/dist/extensions.d.ts +4 -0
  43. package/dist/extensions.js +4 -0
  44. package/dist/gapcursor.d.ts +66 -0
  45. package/dist/gapcursor.js +273 -0
  46. package/dist/history.d.ts +178 -0
  47. package/dist/history.js +412 -0
  48. package/dist/html.d.ts +158 -0
  49. package/dist/html.js +164 -0
  50. package/dist/inputrules.d.ts +271 -0
  51. package/dist/inputrules.js +321 -0
  52. package/dist/internal/attempt.js +15 -0
  53. package/dist/internal/json.js +29 -0
  54. package/dist/keymap/keymap.d.ts +130 -0
  55. package/dist/keymap/keymap.js +159 -0
  56. package/dist/keymap.d.ts +2 -0
  57. package/dist/keymap.js +1 -0
  58. package/dist/markdown/errors.d.ts +23 -0
  59. package/dist/markdown/errors.js +26 -0
  60. package/dist/markdown/from_markdown.d.ts +185 -0
  61. package/dist/markdown/from_markdown.js +266 -0
  62. package/dist/markdown/schema.d.ts +522 -0
  63. package/dist/markdown/schema.js +292 -0
  64. package/dist/markdown/to_markdown.d.ts +251 -0
  65. package/dist/markdown/to_markdown.js +413 -0
  66. package/dist/markdown.d.ts +5 -0
  67. package/dist/markdown.js +5 -0
  68. package/dist/model/attrsCodec.js +48 -0
  69. package/dist/model/comparedeep.js +17 -0
  70. package/dist/model/content.d.ts +232 -0
  71. package/dist/model/content.js +630 -0
  72. package/dist/model/diff.js +66 -0
  73. package/dist/model/dom.d.ts +3 -0
  74. package/dist/model/errors.d.ts +90 -0
  75. package/dist/model/errors.js +76 -0
  76. package/dist/model/fragment.d.ts +131 -0
  77. package/dist/model/fragment.js +262 -0
  78. package/dist/model/from_dom.d.ts +299 -0
  79. package/dist/model/from_dom.js +618 -0
  80. package/dist/model/json.d.ts +37 -0
  81. package/dist/model/json.js +126 -0
  82. package/dist/model/mark.d.ts +73 -0
  83. package/dist/model/mark.js +121 -0
  84. package/dist/model/node.d.ts +267 -0
  85. package/dist/model/node.js +434 -0
  86. package/dist/model/replace.d.ts +78 -0
  87. package/dist/model/replace.js +207 -0
  88. package/dist/model/resolvedpos.d.ts +196 -0
  89. package/dist/model/resolvedpos.js +305 -0
  90. package/dist/model/schema.d.ts +740 -0
  91. package/dist/model/schema.js +451 -0
  92. package/dist/model/to_dom.d.ts +169 -0
  93. package/dist/model/to_dom.js +238 -0
  94. package/dist/model.d.ts +12 -0
  95. package/dist/model.js +12 -0
  96. package/dist/placeholder.d.ts +53 -0
  97. package/dist/placeholder.js +79 -0
  98. package/dist/reactive/observer.d.ts +54 -0
  99. package/dist/reactive/observer.js +61 -0
  100. package/dist/reactive/selectors.d.ts +22 -0
  101. package/dist/reactive/selectors.js +61 -0
  102. package/dist/reactive/stateref.d.ts +72 -0
  103. package/dist/reactive/stateref.js +71 -0
  104. package/dist/reactive/streams.d.ts +83 -0
  105. package/dist/reactive/streams.js +85 -0
  106. package/dist/reactive.d.ts +16 -0
  107. package/dist/reactive.js +26 -0
  108. package/dist/schema-basic.d.ts +448 -0
  109. package/dist/schema-basic.js +269 -0
  110. package/dist/schema-list/commands.d.ts +66 -0
  111. package/dist/schema-list/commands.js +203 -0
  112. package/dist/schema-list.d.ts +92 -0
  113. package/dist/schema-list.js +100 -0
  114. package/dist/state/errors.d.ts +39 -0
  115. package/dist/state/errors.js +32 -0
  116. package/dist/state/plugin.d.ts +232 -0
  117. package/dist/state/plugin.js +82 -0
  118. package/dist/state/selection.d.ts +297 -0
  119. package/dist/state/selection.js +486 -0
  120. package/dist/state/state.d.ts +212 -0
  121. package/dist/state/state.js +489 -0
  122. package/dist/state/transaction.d.ts +145 -0
  123. package/dist/state/transaction.js +195 -0
  124. package/dist/state.d.ts +6 -0
  125. package/dist/state.js +6 -0
  126. package/dist/test-builder.d.ts +3582 -0
  127. package/dist/test-builder.js +239 -0
  128. package/dist/transform/attr_step.d.ts +60 -0
  129. package/dist/transform/attr_step.js +105 -0
  130. package/dist/transform/errors.d.ts +50 -0
  131. package/dist/transform/errors.js +35 -0
  132. package/dist/transform/map.d.ts +182 -0
  133. package/dist/transform/map.js +280 -0
  134. package/dist/transform/mark.js +98 -0
  135. package/dist/transform/mark_set_step.js +69 -0
  136. package/dist/transform/mark_step.d.ts +113 -0
  137. package/dist/transform/mark_step.js +225 -0
  138. package/dist/transform/replace.d.ts +18 -0
  139. package/dist/transform/replace.js +381 -0
  140. package/dist/transform/replace_step.d.ts +109 -0
  141. package/dist/transform/replace_step.js +175 -0
  142. package/dist/transform/step.d.ts +157 -0
  143. package/dist/transform/step.js +168 -0
  144. package/dist/transform/structure.d.ts +89 -0
  145. package/dist/transform/structure.js +350 -0
  146. package/dist/transform/transform.d.ts +248 -0
  147. package/dist/transform/transform.js +373 -0
  148. package/dist/transform.d.ts +10 -0
  149. package/dist/transform.js +10 -0
  150. package/dist/view/browser.js +39 -0
  151. package/dist/view/capturekeys.js +282 -0
  152. package/dist/view/clipboard.d.ts +8 -0
  153. package/dist/view/clipboard.js +245 -0
  154. package/dist/view/decoration.d.ts +339 -0
  155. package/dist/view/decoration.js +566 -0
  156. package/dist/view/dom.d.ts +18 -0
  157. package/dist/view/dom.js +140 -0
  158. package/dist/view/domchange.js +295 -0
  159. package/dist/view/domcoords.d.ts +22 -0
  160. package/dist/view/domcoords.js +448 -0
  161. package/dist/view/domobserver.d.ts +47 -0
  162. package/dist/view/domobserver.js +328 -0
  163. package/dist/view/errors.d.ts +18 -0
  164. package/dist/view/errors.js +21 -0
  165. package/dist/view/input.d.ts +58 -0
  166. package/dist/view/input.js +704 -0
  167. package/dist/view/selection.js +198 -0
  168. package/dist/view/view.d.ts +699 -0
  169. package/dist/view/view.js +623 -0
  170. package/dist/view/viewdesc.d.ts +236 -0
  171. package/dist/view/viewdesc.js +1205 -0
  172. package/dist/view-css.d.ts +43 -0
  173. package/dist/view-css.js +124 -0
  174. package/dist/view.d.ts +6 -0
  175. package/dist/view.js +4 -0
  176. package/package.json +200 -4
@@ -0,0 +1,522 @@
1
+ import { DocSchema } from "../model/schema.js";
2
+ import { Mark } from "../model/mark.js";
3
+ import { Node } from "../model/node.js";
4
+ import { ContentExpr } from "../model/content.js";
5
+ import "../model.js";
6
+ import * as S from "effect/Schema";
7
+ /**
8
+ * The node specs of the Markdown schema.
9
+ *
10
+ * @since 0.1.0
11
+ * @category specs
12
+ */
13
+ export declare const nodes: {
14
+ doc: {
15
+ readonly content: ContentExpr<"block">;
16
+ };
17
+ paragraph: {
18
+ readonly content: ContentExpr<"inline">;
19
+ readonly group: "block";
20
+ readonly parseDOM: readonly [{
21
+ readonly tag: "p";
22
+ }];
23
+ readonly toDOM: () => [string, number];
24
+ };
25
+ blockquote: {
26
+ readonly content: ContentExpr<"block">;
27
+ readonly group: "block";
28
+ readonly parseDOM: readonly [{
29
+ readonly tag: "blockquote";
30
+ }];
31
+ readonly toDOM: () => [string, number];
32
+ };
33
+ horizontal_rule: {
34
+ readonly group: "block";
35
+ readonly parseDOM: readonly [{
36
+ readonly tag: "hr";
37
+ }];
38
+ readonly toDOM: () => [string, string[]];
39
+ };
40
+ heading: {
41
+ readonly attrs: {
42
+ readonly level: {
43
+ readonly schema: S.Number;
44
+ readonly default: 1;
45
+ };
46
+ };
47
+ readonly content: ContentExpr<"text" | "image">;
48
+ readonly group: "block";
49
+ readonly defining: true;
50
+ readonly parseDOM: readonly [{
51
+ readonly tag: "h1";
52
+ readonly attrs: {
53
+ readonly level: 1;
54
+ };
55
+ }, {
56
+ readonly tag: "h2";
57
+ readonly attrs: {
58
+ readonly level: 2;
59
+ };
60
+ }, {
61
+ readonly tag: "h3";
62
+ readonly attrs: {
63
+ readonly level: 3;
64
+ };
65
+ }, {
66
+ readonly tag: "h4";
67
+ readonly attrs: {
68
+ readonly level: 4;
69
+ };
70
+ }, {
71
+ readonly tag: "h5";
72
+ readonly attrs: {
73
+ readonly level: 5;
74
+ };
75
+ }, {
76
+ readonly tag: "h6";
77
+ readonly attrs: {
78
+ readonly level: 6;
79
+ };
80
+ }];
81
+ readonly toDOM: (node: Node<any, any>) => [string, number];
82
+ };
83
+ code_block: {
84
+ readonly content: ContentExpr<"text">;
85
+ readonly group: "block";
86
+ readonly code: true;
87
+ readonly defining: true;
88
+ readonly marks: "";
89
+ readonly attrs: {
90
+ readonly params: {
91
+ readonly schema: S.String;
92
+ readonly default: "";
93
+ };
94
+ };
95
+ readonly parseDOM: readonly [{
96
+ readonly tag: "pre";
97
+ readonly preserveWhitespace: "full";
98
+ readonly getAttrs: (node: HTMLElement) => {
99
+ params: string;
100
+ };
101
+ }];
102
+ readonly toDOM: (node: Node<any, any>) => [string, {
103
+ "data-params": any;
104
+ } | {
105
+ "data-params"?: never;
106
+ }, (string | number)[]];
107
+ };
108
+ ordered_list: {
109
+ readonly content: ContentExpr<"list_item">;
110
+ readonly group: "block";
111
+ readonly attrs: {
112
+ readonly order: {
113
+ readonly schema: S.Number;
114
+ readonly default: 1;
115
+ };
116
+ readonly tight: {
117
+ readonly schema: S.Boolean;
118
+ readonly default: false;
119
+ };
120
+ };
121
+ readonly parseDOM: readonly [{
122
+ readonly tag: "ol";
123
+ readonly getAttrs: (dom: HTMLElement) => {
124
+ order: number;
125
+ tight: boolean;
126
+ };
127
+ }];
128
+ readonly toDOM: (node: Node<any, any>) => [string, {
129
+ start: any;
130
+ "data-tight": string | null;
131
+ }, number];
132
+ };
133
+ bullet_list: {
134
+ readonly content: ContentExpr<"list_item">;
135
+ readonly group: "block";
136
+ readonly attrs: {
137
+ readonly tight: {
138
+ readonly schema: S.Boolean;
139
+ readonly default: false;
140
+ };
141
+ };
142
+ readonly parseDOM: readonly [{
143
+ readonly tag: "ul";
144
+ readonly getAttrs: (dom: HTMLElement) => {
145
+ tight: boolean;
146
+ };
147
+ }];
148
+ readonly toDOM: (node: Node<any, any>) => [string, {
149
+ "data-tight": string | null;
150
+ }, number];
151
+ };
152
+ list_item: {
153
+ readonly content: ContentExpr<"block">;
154
+ readonly defining: true;
155
+ readonly parseDOM: readonly [{
156
+ readonly tag: "li";
157
+ }];
158
+ readonly toDOM: () => [string, number];
159
+ };
160
+ text: {
161
+ readonly group: "inline";
162
+ };
163
+ image: {
164
+ readonly inline: true;
165
+ readonly attrs: {
166
+ readonly src: S.String;
167
+ readonly alt: {
168
+ readonly schema: S.NullOr<S.String>;
169
+ readonly default: null;
170
+ };
171
+ readonly title: {
172
+ readonly schema: S.NullOr<S.String>;
173
+ readonly default: null;
174
+ };
175
+ };
176
+ readonly group: "inline";
177
+ readonly draggable: true;
178
+ readonly parseDOM: readonly [{
179
+ readonly tag: "img[src]";
180
+ readonly getAttrs: (dom: HTMLElement) => {
181
+ src: string | null;
182
+ title: string | null;
183
+ alt: string | null;
184
+ };
185
+ }];
186
+ readonly toDOM: (node: Node<any, any>) => [string, {
187
+ src: any;
188
+ alt: any;
189
+ title: any;
190
+ }];
191
+ };
192
+ hard_break: {
193
+ readonly inline: true;
194
+ readonly group: "inline";
195
+ readonly selectable: false;
196
+ readonly parseDOM: readonly [{
197
+ readonly tag: "br";
198
+ }];
199
+ readonly toDOM: () => [string];
200
+ };
201
+ };
202
+ /**
203
+ * The mark specs of the Markdown schema.
204
+ *
205
+ * @since 0.1.0
206
+ * @category specs
207
+ */
208
+ export declare const marks: {
209
+ em: {
210
+ readonly parseDOM: readonly [{
211
+ readonly tag: "i";
212
+ }, {
213
+ readonly tag: "em";
214
+ }, {
215
+ readonly style: "font-style=italic";
216
+ }, {
217
+ readonly style: "font-style=normal";
218
+ readonly clearMark: (m: Mark<any, any>) => boolean;
219
+ }];
220
+ readonly toDOM: () => [string];
221
+ };
222
+ strong: {
223
+ readonly parseDOM: readonly [{
224
+ readonly tag: "strong";
225
+ }, {
226
+ readonly tag: "b";
227
+ readonly getAttrs: (node: HTMLElement) => false | null;
228
+ }, {
229
+ readonly style: "font-weight=400";
230
+ readonly clearMark: (m: Mark<any, any>) => boolean;
231
+ }, {
232
+ readonly style: "font-weight";
233
+ readonly getAttrs: (value: string) => false | null;
234
+ }];
235
+ readonly toDOM: () => [string];
236
+ };
237
+ link: {
238
+ readonly attrs: {
239
+ readonly href: S.String;
240
+ readonly title: {
241
+ readonly schema: S.NullOr<S.String>;
242
+ readonly default: null;
243
+ };
244
+ };
245
+ readonly inclusive: false;
246
+ readonly parseDOM: readonly [{
247
+ readonly tag: "a[href]";
248
+ readonly getAttrs: (dom: HTMLElement) => {
249
+ href: string | null;
250
+ title: string | null;
251
+ };
252
+ }];
253
+ readonly toDOM: (node: Mark<any, any>) => [string, {
254
+ href: any;
255
+ title: any;
256
+ }];
257
+ };
258
+ code: {
259
+ readonly code: true;
260
+ readonly parseDOM: readonly [{
261
+ readonly tag: "code";
262
+ }];
263
+ readonly toDOM: () => [string];
264
+ };
265
+ };
266
+ /**
267
+ * Document schema for the data model used by CommonMark.
268
+ *
269
+ * @since 0.1.0
270
+ * @category schemas
271
+ */
272
+ export declare const schema: DocSchema<{
273
+ doc: {
274
+ readonly content: ContentExpr<"block">;
275
+ };
276
+ paragraph: {
277
+ readonly content: ContentExpr<"inline">;
278
+ readonly group: "block";
279
+ readonly parseDOM: readonly [{
280
+ readonly tag: "p";
281
+ }];
282
+ readonly toDOM: () => [string, number];
283
+ };
284
+ blockquote: {
285
+ readonly content: ContentExpr<"block">;
286
+ readonly group: "block";
287
+ readonly parseDOM: readonly [{
288
+ readonly tag: "blockquote";
289
+ }];
290
+ readonly toDOM: () => [string, number];
291
+ };
292
+ horizontal_rule: {
293
+ readonly group: "block";
294
+ readonly parseDOM: readonly [{
295
+ readonly tag: "hr";
296
+ }];
297
+ readonly toDOM: () => [string, string[]];
298
+ };
299
+ heading: {
300
+ readonly attrs: {
301
+ readonly level: {
302
+ readonly schema: S.Number;
303
+ readonly default: 1;
304
+ };
305
+ };
306
+ readonly content: ContentExpr<"text" | "image">;
307
+ readonly group: "block";
308
+ readonly defining: true;
309
+ readonly parseDOM: readonly [{
310
+ readonly tag: "h1";
311
+ readonly attrs: {
312
+ readonly level: 1;
313
+ };
314
+ }, {
315
+ readonly tag: "h2";
316
+ readonly attrs: {
317
+ readonly level: 2;
318
+ };
319
+ }, {
320
+ readonly tag: "h3";
321
+ readonly attrs: {
322
+ readonly level: 3;
323
+ };
324
+ }, {
325
+ readonly tag: "h4";
326
+ readonly attrs: {
327
+ readonly level: 4;
328
+ };
329
+ }, {
330
+ readonly tag: "h5";
331
+ readonly attrs: {
332
+ readonly level: 5;
333
+ };
334
+ }, {
335
+ readonly tag: "h6";
336
+ readonly attrs: {
337
+ readonly level: 6;
338
+ };
339
+ }];
340
+ readonly toDOM: (node: Node<any, any>) => [string, number];
341
+ };
342
+ code_block: {
343
+ readonly content: ContentExpr<"text">;
344
+ readonly group: "block";
345
+ readonly code: true;
346
+ readonly defining: true;
347
+ readonly marks: "";
348
+ readonly attrs: {
349
+ readonly params: {
350
+ readonly schema: S.String;
351
+ readonly default: "";
352
+ };
353
+ };
354
+ readonly parseDOM: readonly [{
355
+ readonly tag: "pre";
356
+ readonly preserveWhitespace: "full";
357
+ readonly getAttrs: (node: HTMLElement) => {
358
+ params: string;
359
+ };
360
+ }];
361
+ readonly toDOM: (node: Node<any, any>) => [string, {
362
+ "data-params": any;
363
+ } | {
364
+ "data-params"?: never;
365
+ }, (string | number)[]];
366
+ };
367
+ ordered_list: {
368
+ readonly content: ContentExpr<"list_item">;
369
+ readonly group: "block";
370
+ readonly attrs: {
371
+ readonly order: {
372
+ readonly schema: S.Number;
373
+ readonly default: 1;
374
+ };
375
+ readonly tight: {
376
+ readonly schema: S.Boolean;
377
+ readonly default: false;
378
+ };
379
+ };
380
+ readonly parseDOM: readonly [{
381
+ readonly tag: "ol";
382
+ readonly getAttrs: (dom: HTMLElement) => {
383
+ order: number;
384
+ tight: boolean;
385
+ };
386
+ }];
387
+ readonly toDOM: (node: Node<any, any>) => [string, {
388
+ start: any;
389
+ "data-tight": string | null;
390
+ }, number];
391
+ };
392
+ bullet_list: {
393
+ readonly content: ContentExpr<"list_item">;
394
+ readonly group: "block";
395
+ readonly attrs: {
396
+ readonly tight: {
397
+ readonly schema: S.Boolean;
398
+ readonly default: false;
399
+ };
400
+ };
401
+ readonly parseDOM: readonly [{
402
+ readonly tag: "ul";
403
+ readonly getAttrs: (dom: HTMLElement) => {
404
+ tight: boolean;
405
+ };
406
+ }];
407
+ readonly toDOM: (node: Node<any, any>) => [string, {
408
+ "data-tight": string | null;
409
+ }, number];
410
+ };
411
+ list_item: {
412
+ readonly content: ContentExpr<"block">;
413
+ readonly defining: true;
414
+ readonly parseDOM: readonly [{
415
+ readonly tag: "li";
416
+ }];
417
+ readonly toDOM: () => [string, number];
418
+ };
419
+ text: {
420
+ readonly group: "inline";
421
+ };
422
+ image: {
423
+ readonly inline: true;
424
+ readonly attrs: {
425
+ readonly src: S.String;
426
+ readonly alt: {
427
+ readonly schema: S.NullOr<S.String>;
428
+ readonly default: null;
429
+ };
430
+ readonly title: {
431
+ readonly schema: S.NullOr<S.String>;
432
+ readonly default: null;
433
+ };
434
+ };
435
+ readonly group: "inline";
436
+ readonly draggable: true;
437
+ readonly parseDOM: readonly [{
438
+ readonly tag: "img[src]";
439
+ readonly getAttrs: (dom: HTMLElement) => {
440
+ src: string | null;
441
+ title: string | null;
442
+ alt: string | null;
443
+ };
444
+ }];
445
+ readonly toDOM: (node: Node<any, any>) => [string, {
446
+ src: any;
447
+ alt: any;
448
+ title: any;
449
+ }];
450
+ };
451
+ hard_break: {
452
+ readonly inline: true;
453
+ readonly group: "inline";
454
+ readonly selectable: false;
455
+ readonly parseDOM: readonly [{
456
+ readonly tag: "br";
457
+ }];
458
+ readonly toDOM: () => [string];
459
+ };
460
+ }, {
461
+ em: {
462
+ readonly parseDOM: readonly [{
463
+ readonly tag: "i";
464
+ }, {
465
+ readonly tag: "em";
466
+ }, {
467
+ readonly style: "font-style=italic";
468
+ }, {
469
+ readonly style: "font-style=normal";
470
+ readonly clearMark: (m: Mark<any, any>) => boolean;
471
+ }];
472
+ readonly toDOM: () => [string];
473
+ };
474
+ strong: {
475
+ readonly parseDOM: readonly [{
476
+ readonly tag: "strong";
477
+ }, {
478
+ readonly tag: "b";
479
+ readonly getAttrs: (node: HTMLElement) => false | null;
480
+ }, {
481
+ readonly style: "font-weight=400";
482
+ readonly clearMark: (m: Mark<any, any>) => boolean;
483
+ }, {
484
+ readonly style: "font-weight";
485
+ readonly getAttrs: (value: string) => false | null;
486
+ }];
487
+ readonly toDOM: () => [string];
488
+ };
489
+ link: {
490
+ readonly attrs: {
491
+ readonly href: S.String;
492
+ readonly title: {
493
+ readonly schema: S.NullOr<S.String>;
494
+ readonly default: null;
495
+ };
496
+ };
497
+ readonly inclusive: false;
498
+ readonly parseDOM: readonly [{
499
+ readonly tag: "a[href]";
500
+ readonly getAttrs: (dom: HTMLElement) => {
501
+ href: string | null;
502
+ title: string | null;
503
+ };
504
+ }];
505
+ readonly toDOM: (node: Mark<any, any>) => [string, {
506
+ href: any;
507
+ title: any;
508
+ }];
509
+ };
510
+ code: {
511
+ readonly code: true;
512
+ readonly parseDOM: readonly [{
513
+ readonly tag: "code";
514
+ }];
515
+ readonly toDOM: () => [string];
516
+ };
517
+ }>;
518
+ /**
519
+ * @since 0.1.0
520
+ * @category schemas
521
+ */
522
+ export type MarkdownSchema = typeof schema;