@canvist/headless 0.0.0-stage → 0.2.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.
- package/dist/calls.d.ts +15 -0
- package/dist/calls.js +20 -0
- package/dist/create.d.ts +17 -0
- package/dist/create.js +29 -0
- package/dist/engine.d.ts +125 -0
- package/dist/engine.js +176 -0
- package/dist/errors.d.ts +13 -0
- package/dist/errors.js +5 -0
- package/dist/extensions.generated.d.ts +1022 -0
- package/dist/extensions.generated.js +744 -0
- package/dist/extras.generated.d.ts +5803 -0
- package/dist/extras.generated.js +2600 -0
- package/dist/full.d.ts +21 -0
- package/dist/full.js +63 -0
- package/dist/gemoji.generated.d.ts +29 -0
- package/dist/gemoji.generated.js +30 -0
- package/dist/load.d.ts +21 -0
- package/dist/load.js +41 -0
- package/dist/mod.d.ts +25 -0
- package/dist/mod.js +24 -0
- package/dist/native.d.ts +115 -0
- package/dist/native.js +235 -0
- package/dist/scene-types.d.ts +223 -0
- package/dist/scene-types.js +1 -0
- package/dist/scene.d.ts +105 -0
- package/dist/scene.js +153 -0
- package/dist/ssr.d.ts +66 -0
- package/dist/ssr.js +98 -0
- package/dist/types.d.ts +232 -0
- package/dist/types.js +1 -0
- package/package.json +89 -5
- package/readme.md +96 -0
- package/wasm/canvist_headless_wasm.d.ts +216 -0
- package/wasm/canvist_headless_wasm.js +910 -0
- package/wasm/canvist_headless_wasm_bg.wasm +0 -0
- package/wasm/canvist_headless_wasm_bg.wasm.d.ts +44 -0
- package/wasm-full/canvist_headless_full.d.ts +223 -0
- package/wasm-full/canvist_headless_full.js +923 -0
- package/wasm-full/canvist_headless_full_bg.wasm +0 -0
- package/wasm-full/canvist_headless_full_bg.wasm.d.ts +45 -0
- package/wasm-scene/canvist_headless_scene.d.ts +332 -0
- package/wasm-scene/canvist_headless_scene.js +1231 -0
- package/wasm-scene/canvist_headless_scene_bg.wasm +0 -0
- package/wasm-scene/canvist_headless_scene_bg.wasm.d.ts +66 -0
- package/wasm-ssr/canvist_headless_ssr.d.ts +250 -0
- package/wasm-ssr/canvist_headless_ssr.js +1025 -0
- package/wasm-ssr/canvist_headless_ssr_bg.wasm +0 -0
- package/wasm-ssr/canvist_headless_ssr_bg.wasm.d.ts +50 -0
- package/README.md +0 -3
|
@@ -0,0 +1,744 @@
|
|
|
1
|
+
// Generated by scripts/generate.ts from canvist_extensions' metadata snapshots. Do not edit.
|
|
2
|
+
/** The `undoInputRule` extension. */
|
|
3
|
+
export const undoInputRule = {
|
|
4
|
+
"commands": [],
|
|
5
|
+
"name": "undoInputRule",
|
|
6
|
+
"nodes": [],
|
|
7
|
+
"queries": []
|
|
8
|
+
};
|
|
9
|
+
/** The `paragraph` extension. */
|
|
10
|
+
export const paragraph = {
|
|
11
|
+
"commands": [
|
|
12
|
+
/** Turn the selected text blocks into paragraphs. */
|
|
13
|
+
{
|
|
14
|
+
"args": [],
|
|
15
|
+
"name": "setParagraph"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"name": "paragraph",
|
|
19
|
+
"nodes": [
|
|
20
|
+
{
|
|
21
|
+
"attrs": [],
|
|
22
|
+
"kind": "block",
|
|
23
|
+
"name": "paragraph"
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"queries": [
|
|
27
|
+
/** Whether every selected text block is a paragraph. */
|
|
28
|
+
{
|
|
29
|
+
"args": [],
|
|
30
|
+
"name": "isParagraph",
|
|
31
|
+
"returns": {
|
|
32
|
+
"type": "bool"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
};
|
|
37
|
+
/** The `doc` extension. */
|
|
38
|
+
export const doc = {
|
|
39
|
+
"commands": [],
|
|
40
|
+
"name": "doc",
|
|
41
|
+
"nodes": [],
|
|
42
|
+
"queries": []
|
|
43
|
+
};
|
|
44
|
+
/** The `baseKeymap` extension. */
|
|
45
|
+
export const baseKeymap = {
|
|
46
|
+
"commands": [],
|
|
47
|
+
"name": "baseKeymap",
|
|
48
|
+
"nodes": [],
|
|
49
|
+
"queries": []
|
|
50
|
+
};
|
|
51
|
+
/** The `trailingNode` extension. */
|
|
52
|
+
export const trailingNode = {
|
|
53
|
+
"commands": [],
|
|
54
|
+
"name": "trailingNode",
|
|
55
|
+
"nodes": [],
|
|
56
|
+
"queries": []
|
|
57
|
+
};
|
|
58
|
+
/** The `heading` extension. */
|
|
59
|
+
export const heading = {
|
|
60
|
+
"commands": [
|
|
61
|
+
/** Make the selected text blocks headings of a level, or paragraphs if they already are. */
|
|
62
|
+
{
|
|
63
|
+
"args": [
|
|
64
|
+
/** The heading level. */
|
|
65
|
+
{
|
|
66
|
+
"name": "level",
|
|
67
|
+
"type": {
|
|
68
|
+
"max": 6,
|
|
69
|
+
"min": 1,
|
|
70
|
+
"type": "int"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
"name": "toggleHeading"
|
|
75
|
+
},
|
|
76
|
+
/** Make the selected text blocks headings of a level. */
|
|
77
|
+
{
|
|
78
|
+
"args": [
|
|
79
|
+
/** The heading level. */
|
|
80
|
+
{
|
|
81
|
+
"name": "level",
|
|
82
|
+
"type": {
|
|
83
|
+
"max": 6,
|
|
84
|
+
"min": 1,
|
|
85
|
+
"type": "int"
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
],
|
|
89
|
+
"name": "setHeading"
|
|
90
|
+
}
|
|
91
|
+
],
|
|
92
|
+
"name": "heading",
|
|
93
|
+
"nodes": [
|
|
94
|
+
{
|
|
95
|
+
"attrs": [
|
|
96
|
+
/** The heading level. */
|
|
97
|
+
{
|
|
98
|
+
"default": 1,
|
|
99
|
+
"name": "level",
|
|
100
|
+
"type": {
|
|
101
|
+
"max": 6,
|
|
102
|
+
"min": 1,
|
|
103
|
+
"type": "int"
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
],
|
|
107
|
+
"kind": "block",
|
|
108
|
+
"name": "heading"
|
|
109
|
+
}
|
|
110
|
+
],
|
|
111
|
+
"queries": [
|
|
112
|
+
/** The level every selected text block shares, or null if they are not all headings of one level. */
|
|
113
|
+
{
|
|
114
|
+
"args": [],
|
|
115
|
+
"name": "headingLevel",
|
|
116
|
+
"returns": {
|
|
117
|
+
"of": {
|
|
118
|
+
"max": 6,
|
|
119
|
+
"min": 1,
|
|
120
|
+
"type": "int"
|
|
121
|
+
},
|
|
122
|
+
"type": "nullable"
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
]
|
|
126
|
+
};
|
|
127
|
+
/** The `blockquote` extension. */
|
|
128
|
+
export const blockquote = {
|
|
129
|
+
"commands": [
|
|
130
|
+
/** Wrap the selected blocks in a quote, or lift them out of one. */
|
|
131
|
+
{
|
|
132
|
+
"args": [],
|
|
133
|
+
"name": "toggleBlockquote"
|
|
134
|
+
}
|
|
135
|
+
],
|
|
136
|
+
"name": "blockquote",
|
|
137
|
+
"nodes": [
|
|
138
|
+
{
|
|
139
|
+
"attrs": [],
|
|
140
|
+
"kind": "block",
|
|
141
|
+
"name": "blockquote"
|
|
142
|
+
}
|
|
143
|
+
],
|
|
144
|
+
"queries": [
|
|
145
|
+
/** Whether the selection is inside a quote. */
|
|
146
|
+
{
|
|
147
|
+
"args": [],
|
|
148
|
+
"name": "isBlockquote",
|
|
149
|
+
"returns": {
|
|
150
|
+
"type": "bool"
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
]
|
|
154
|
+
};
|
|
155
|
+
/** The `codeBlock` extension. */
|
|
156
|
+
export const codeBlock = {
|
|
157
|
+
"commands": [
|
|
158
|
+
/** Make the selected text blocks code, or paragraphs if they already are code. */
|
|
159
|
+
{
|
|
160
|
+
"args": [
|
|
161
|
+
/** The code's language, such as `rust`. */
|
|
162
|
+
{
|
|
163
|
+
"default": null,
|
|
164
|
+
"name": "language",
|
|
165
|
+
"type": {
|
|
166
|
+
"of": {
|
|
167
|
+
"type": "string"
|
|
168
|
+
},
|
|
169
|
+
"type": "nullable"
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
],
|
|
173
|
+
"name": "toggleCodeBlock"
|
|
174
|
+
},
|
|
175
|
+
/** Make the selected text blocks code in a language. */
|
|
176
|
+
{
|
|
177
|
+
"args": [
|
|
178
|
+
/** The code's language, such as `rust`. */
|
|
179
|
+
{
|
|
180
|
+
"default": null,
|
|
181
|
+
"name": "language",
|
|
182
|
+
"type": {
|
|
183
|
+
"of": {
|
|
184
|
+
"type": "string"
|
|
185
|
+
},
|
|
186
|
+
"type": "nullable"
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
],
|
|
190
|
+
"name": "setCodeBlock"
|
|
191
|
+
}
|
|
192
|
+
],
|
|
193
|
+
"name": "codeBlock",
|
|
194
|
+
"nodes": [
|
|
195
|
+
{
|
|
196
|
+
"attrs": [
|
|
197
|
+
/** The code's language, such as `rust`. */
|
|
198
|
+
{
|
|
199
|
+
"default": null,
|
|
200
|
+
"name": "language",
|
|
201
|
+
"type": {
|
|
202
|
+
"of": {
|
|
203
|
+
"type": "string"
|
|
204
|
+
},
|
|
205
|
+
"type": "nullable"
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
],
|
|
209
|
+
"kind": "block",
|
|
210
|
+
"name": "codeBlock"
|
|
211
|
+
}
|
|
212
|
+
],
|
|
213
|
+
"queries": [
|
|
214
|
+
/** Whether the selection is in a code block. */
|
|
215
|
+
{
|
|
216
|
+
"args": [],
|
|
217
|
+
"name": "isCodeBlock",
|
|
218
|
+
"returns": {
|
|
219
|
+
"type": "bool"
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
/** The language of the code block holding the selection, or null. */
|
|
223
|
+
{
|
|
224
|
+
"args": [],
|
|
225
|
+
"name": "codeBlockLanguage",
|
|
226
|
+
"returns": {
|
|
227
|
+
"of": {
|
|
228
|
+
"type": "string"
|
|
229
|
+
},
|
|
230
|
+
"type": "nullable"
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
]
|
|
234
|
+
};
|
|
235
|
+
/** The `hardBreak` extension. */
|
|
236
|
+
export const hardBreak = {
|
|
237
|
+
"commands": [
|
|
238
|
+
/** Insert a line break at the selection. */
|
|
239
|
+
{
|
|
240
|
+
"args": [],
|
|
241
|
+
"name": "setHardBreak"
|
|
242
|
+
}
|
|
243
|
+
],
|
|
244
|
+
"name": "hardBreak",
|
|
245
|
+
"nodes": [
|
|
246
|
+
{
|
|
247
|
+
"attrs": [],
|
|
248
|
+
"kind": "embed",
|
|
249
|
+
"name": "hardBreak"
|
|
250
|
+
}
|
|
251
|
+
],
|
|
252
|
+
"queries": []
|
|
253
|
+
};
|
|
254
|
+
/** The `horizontalRule` extension. */
|
|
255
|
+
export const horizontalRule = {
|
|
256
|
+
"commands": [
|
|
257
|
+
/** Insert a horizontal rule at the selection. */
|
|
258
|
+
{
|
|
259
|
+
"args": [],
|
|
260
|
+
"name": "setHorizontalRule"
|
|
261
|
+
}
|
|
262
|
+
],
|
|
263
|
+
"name": "horizontalRule",
|
|
264
|
+
"nodes": [
|
|
265
|
+
{
|
|
266
|
+
"attrs": [],
|
|
267
|
+
"kind": "block",
|
|
268
|
+
"name": "horizontalRule"
|
|
269
|
+
}
|
|
270
|
+
],
|
|
271
|
+
"queries": []
|
|
272
|
+
};
|
|
273
|
+
/** The `bulletList` extension. */
|
|
274
|
+
export const bulletList = {
|
|
275
|
+
"commands": [
|
|
276
|
+
/** Wrap the selection in a bullet list, convert another list into one, or lift it out. */
|
|
277
|
+
{
|
|
278
|
+
"args": [],
|
|
279
|
+
"name": "toggleBulletList"
|
|
280
|
+
}
|
|
281
|
+
],
|
|
282
|
+
"name": "bulletList",
|
|
283
|
+
"nodes": [
|
|
284
|
+
{
|
|
285
|
+
"attrs": [],
|
|
286
|
+
"kind": "block",
|
|
287
|
+
"name": "bulletList"
|
|
288
|
+
}
|
|
289
|
+
],
|
|
290
|
+
"queries": [
|
|
291
|
+
/** Whether the selection is inside a bullet list. */
|
|
292
|
+
{
|
|
293
|
+
"args": [],
|
|
294
|
+
"name": "isBulletList",
|
|
295
|
+
"returns": {
|
|
296
|
+
"type": "bool"
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
]
|
|
300
|
+
};
|
|
301
|
+
/** The `orderedList` extension. */
|
|
302
|
+
export const orderedList = {
|
|
303
|
+
"commands": [
|
|
304
|
+
/** Wrap the selection in an ordered list, convert another list into one, or lift it out. */
|
|
305
|
+
{
|
|
306
|
+
"args": [],
|
|
307
|
+
"name": "toggleOrderedList"
|
|
308
|
+
},
|
|
309
|
+
/** Number the ordered list around the selection from a start number. */
|
|
310
|
+
{
|
|
311
|
+
"args": [
|
|
312
|
+
/** The number of the first item. */
|
|
313
|
+
{
|
|
314
|
+
"name": "start",
|
|
315
|
+
"type": {
|
|
316
|
+
"type": "int"
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
],
|
|
320
|
+
"name": "setOrderedListStart"
|
|
321
|
+
}
|
|
322
|
+
],
|
|
323
|
+
"name": "orderedList",
|
|
324
|
+
"nodes": [
|
|
325
|
+
{
|
|
326
|
+
"attrs": [
|
|
327
|
+
/** The number of the first item. */
|
|
328
|
+
{
|
|
329
|
+
"default": 1,
|
|
330
|
+
"name": "start",
|
|
331
|
+
"type": {
|
|
332
|
+
"type": "int"
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
],
|
|
336
|
+
"kind": "block",
|
|
337
|
+
"name": "orderedList"
|
|
338
|
+
}
|
|
339
|
+
],
|
|
340
|
+
"queries": [
|
|
341
|
+
/** Whether the selection is inside an ordered list. */
|
|
342
|
+
{
|
|
343
|
+
"args": [],
|
|
344
|
+
"name": "isOrderedList",
|
|
345
|
+
"returns": {
|
|
346
|
+
"type": "bool"
|
|
347
|
+
}
|
|
348
|
+
},
|
|
349
|
+
/** The start number of the ordered list around the selection, or null. */
|
|
350
|
+
{
|
|
351
|
+
"args": [],
|
|
352
|
+
"name": "orderedListStart",
|
|
353
|
+
"returns": {
|
|
354
|
+
"of": {
|
|
355
|
+
"type": "int"
|
|
356
|
+
},
|
|
357
|
+
"type": "nullable"
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
]
|
|
361
|
+
};
|
|
362
|
+
/** The `listItem` extension. */
|
|
363
|
+
export const listItem = {
|
|
364
|
+
"commands": [
|
|
365
|
+
/** Split the item at the caret. */
|
|
366
|
+
{
|
|
367
|
+
"args": [],
|
|
368
|
+
"name": "splitListItem"
|
|
369
|
+
},
|
|
370
|
+
/** Nest the selected items in the item before them. */
|
|
371
|
+
{
|
|
372
|
+
"args": [],
|
|
373
|
+
"name": "sinkListItem"
|
|
374
|
+
},
|
|
375
|
+
/** Lift the selected items one level. */
|
|
376
|
+
{
|
|
377
|
+
"args": [],
|
|
378
|
+
"name": "liftListItem"
|
|
379
|
+
}
|
|
380
|
+
],
|
|
381
|
+
"name": "listItem",
|
|
382
|
+
"nodes": [
|
|
383
|
+
{
|
|
384
|
+
"attrs": [],
|
|
385
|
+
"kind": "block",
|
|
386
|
+
"name": "listItem"
|
|
387
|
+
}
|
|
388
|
+
],
|
|
389
|
+
"queries": []
|
|
390
|
+
};
|
|
391
|
+
/** The `taskList` extension. */
|
|
392
|
+
export const taskList = {
|
|
393
|
+
"commands": [
|
|
394
|
+
/** Wrap the selection in a task list, convert another list into one, or lift it out. */
|
|
395
|
+
{
|
|
396
|
+
"args": [],
|
|
397
|
+
"name": "toggleTaskList"
|
|
398
|
+
},
|
|
399
|
+
/** Check or uncheck the task at the caret. */
|
|
400
|
+
{
|
|
401
|
+
"args": [],
|
|
402
|
+
"name": "toggleTask"
|
|
403
|
+
},
|
|
404
|
+
/** Check or uncheck the task at the caret. */
|
|
405
|
+
{
|
|
406
|
+
"args": [
|
|
407
|
+
/** Whether the task is done. */
|
|
408
|
+
{
|
|
409
|
+
"name": "checked",
|
|
410
|
+
"type": {
|
|
411
|
+
"type": "bool"
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
],
|
|
415
|
+
"name": "setTaskChecked"
|
|
416
|
+
},
|
|
417
|
+
/** Split the item at the caret. */
|
|
418
|
+
{
|
|
419
|
+
"args": [],
|
|
420
|
+
"name": "splitTaskItem"
|
|
421
|
+
},
|
|
422
|
+
/** Nest the selected items in the item before them. */
|
|
423
|
+
{
|
|
424
|
+
"args": [],
|
|
425
|
+
"name": "sinkTaskItem"
|
|
426
|
+
},
|
|
427
|
+
/** Lift the selected items one level. */
|
|
428
|
+
{
|
|
429
|
+
"args": [],
|
|
430
|
+
"name": "liftTaskItem"
|
|
431
|
+
}
|
|
432
|
+
],
|
|
433
|
+
"name": "taskList",
|
|
434
|
+
"nodes": [
|
|
435
|
+
{
|
|
436
|
+
"attrs": [],
|
|
437
|
+
"kind": "block",
|
|
438
|
+
"name": "taskList"
|
|
439
|
+
},
|
|
440
|
+
{
|
|
441
|
+
"attrs": [
|
|
442
|
+
/** Whether the task is done. */
|
|
443
|
+
{
|
|
444
|
+
"default": false,
|
|
445
|
+
"name": "checked",
|
|
446
|
+
"type": {
|
|
447
|
+
"type": "bool"
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
],
|
|
451
|
+
"kind": "block",
|
|
452
|
+
"name": "taskItem"
|
|
453
|
+
}
|
|
454
|
+
],
|
|
455
|
+
"queries": [
|
|
456
|
+
/** Whether the selection is inside a task list. */
|
|
457
|
+
{
|
|
458
|
+
"args": [],
|
|
459
|
+
"name": "isTaskList",
|
|
460
|
+
"returns": {
|
|
461
|
+
"type": "bool"
|
|
462
|
+
}
|
|
463
|
+
},
|
|
464
|
+
/** Whether the task around the selection is checked, or null outside tasks. */
|
|
465
|
+
{
|
|
466
|
+
"args": [],
|
|
467
|
+
"name": "isTaskChecked",
|
|
468
|
+
"returns": {
|
|
469
|
+
"of": {
|
|
470
|
+
"type": "bool"
|
|
471
|
+
},
|
|
472
|
+
"type": "nullable"
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
]
|
|
476
|
+
};
|
|
477
|
+
/** The `bold` extension. */
|
|
478
|
+
export const bold = {
|
|
479
|
+
"commands": [
|
|
480
|
+
/** Add the mark to the selection, or remove it if every selected character has it. */
|
|
481
|
+
{
|
|
482
|
+
"args": [],
|
|
483
|
+
"name": "toggleBold"
|
|
484
|
+
},
|
|
485
|
+
/** Add the mark to the selection. */
|
|
486
|
+
{
|
|
487
|
+
"args": [],
|
|
488
|
+
"name": "setBold"
|
|
489
|
+
},
|
|
490
|
+
/** Remove the mark from the selection. */
|
|
491
|
+
{
|
|
492
|
+
"args": [],
|
|
493
|
+
"name": "unsetBold"
|
|
494
|
+
}
|
|
495
|
+
],
|
|
496
|
+
"name": "bold",
|
|
497
|
+
"nodes": [
|
|
498
|
+
{
|
|
499
|
+
"attrs": [],
|
|
500
|
+
"kind": "mark",
|
|
501
|
+
"name": "bold"
|
|
502
|
+
}
|
|
503
|
+
],
|
|
504
|
+
"queries": [
|
|
505
|
+
/** Whether the mark is active at the selection. */
|
|
506
|
+
{
|
|
507
|
+
"args": [],
|
|
508
|
+
"name": "isBold",
|
|
509
|
+
"returns": {
|
|
510
|
+
"type": "bool"
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
]
|
|
514
|
+
};
|
|
515
|
+
/** The `italic` extension. */
|
|
516
|
+
export const italic = {
|
|
517
|
+
"commands": [
|
|
518
|
+
/** Add the mark to the selection, or remove it if every selected character has it. */
|
|
519
|
+
{
|
|
520
|
+
"args": [],
|
|
521
|
+
"name": "toggleItalic"
|
|
522
|
+
},
|
|
523
|
+
/** Add the mark to the selection. */
|
|
524
|
+
{
|
|
525
|
+
"args": [],
|
|
526
|
+
"name": "setItalic"
|
|
527
|
+
},
|
|
528
|
+
/** Remove the mark from the selection. */
|
|
529
|
+
{
|
|
530
|
+
"args": [],
|
|
531
|
+
"name": "unsetItalic"
|
|
532
|
+
}
|
|
533
|
+
],
|
|
534
|
+
"name": "italic",
|
|
535
|
+
"nodes": [
|
|
536
|
+
{
|
|
537
|
+
"attrs": [],
|
|
538
|
+
"kind": "mark",
|
|
539
|
+
"name": "italic"
|
|
540
|
+
}
|
|
541
|
+
],
|
|
542
|
+
"queries": [
|
|
543
|
+
/** Whether the mark is active at the selection. */
|
|
544
|
+
{
|
|
545
|
+
"args": [],
|
|
546
|
+
"name": "isItalic",
|
|
547
|
+
"returns": {
|
|
548
|
+
"type": "bool"
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
]
|
|
552
|
+
};
|
|
553
|
+
/** The `underline` extension. */
|
|
554
|
+
export const underline = {
|
|
555
|
+
"commands": [
|
|
556
|
+
/** Add the mark to the selection, or remove it if every selected character has it. */
|
|
557
|
+
{
|
|
558
|
+
"args": [],
|
|
559
|
+
"name": "toggleUnderline"
|
|
560
|
+
},
|
|
561
|
+
/** Add the mark to the selection. */
|
|
562
|
+
{
|
|
563
|
+
"args": [],
|
|
564
|
+
"name": "setUnderline"
|
|
565
|
+
},
|
|
566
|
+
/** Remove the mark from the selection. */
|
|
567
|
+
{
|
|
568
|
+
"args": [],
|
|
569
|
+
"name": "unsetUnderline"
|
|
570
|
+
}
|
|
571
|
+
],
|
|
572
|
+
"name": "underline",
|
|
573
|
+
"nodes": [
|
|
574
|
+
{
|
|
575
|
+
"attrs": [],
|
|
576
|
+
"kind": "mark",
|
|
577
|
+
"name": "underline"
|
|
578
|
+
}
|
|
579
|
+
],
|
|
580
|
+
"queries": [
|
|
581
|
+
/** Whether the mark is active at the selection. */
|
|
582
|
+
{
|
|
583
|
+
"args": [],
|
|
584
|
+
"name": "isUnderline",
|
|
585
|
+
"returns": {
|
|
586
|
+
"type": "bool"
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
]
|
|
590
|
+
};
|
|
591
|
+
/** The `strike` extension. */
|
|
592
|
+
export const strike = {
|
|
593
|
+
"commands": [
|
|
594
|
+
/** Add the mark to the selection, or remove it if every selected character has it. */
|
|
595
|
+
{
|
|
596
|
+
"args": [],
|
|
597
|
+
"name": "toggleStrike"
|
|
598
|
+
},
|
|
599
|
+
/** Add the mark to the selection. */
|
|
600
|
+
{
|
|
601
|
+
"args": [],
|
|
602
|
+
"name": "setStrike"
|
|
603
|
+
},
|
|
604
|
+
/** Remove the mark from the selection. */
|
|
605
|
+
{
|
|
606
|
+
"args": [],
|
|
607
|
+
"name": "unsetStrike"
|
|
608
|
+
}
|
|
609
|
+
],
|
|
610
|
+
"name": "strike",
|
|
611
|
+
"nodes": [
|
|
612
|
+
{
|
|
613
|
+
"attrs": [],
|
|
614
|
+
"kind": "mark",
|
|
615
|
+
"name": "strike"
|
|
616
|
+
}
|
|
617
|
+
],
|
|
618
|
+
"queries": [
|
|
619
|
+
/** Whether the mark is active at the selection. */
|
|
620
|
+
{
|
|
621
|
+
"args": [],
|
|
622
|
+
"name": "isStrike",
|
|
623
|
+
"returns": {
|
|
624
|
+
"type": "bool"
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
]
|
|
628
|
+
};
|
|
629
|
+
/** The `code` extension. */
|
|
630
|
+
export const code = {
|
|
631
|
+
"commands": [
|
|
632
|
+
/** Add the mark to the selection, or remove it if every selected character has it. */
|
|
633
|
+
{
|
|
634
|
+
"args": [],
|
|
635
|
+
"name": "toggleCode"
|
|
636
|
+
},
|
|
637
|
+
/** Add the mark to the selection. */
|
|
638
|
+
{
|
|
639
|
+
"args": [],
|
|
640
|
+
"name": "setCode"
|
|
641
|
+
},
|
|
642
|
+
/** Remove the mark from the selection. */
|
|
643
|
+
{
|
|
644
|
+
"args": [],
|
|
645
|
+
"name": "unsetCode"
|
|
646
|
+
}
|
|
647
|
+
],
|
|
648
|
+
"name": "code",
|
|
649
|
+
"nodes": [
|
|
650
|
+
{
|
|
651
|
+
"attrs": [],
|
|
652
|
+
"kind": "mark",
|
|
653
|
+
"name": "code"
|
|
654
|
+
}
|
|
655
|
+
],
|
|
656
|
+
"queries": [
|
|
657
|
+
/** Whether the mark is active at the selection. */
|
|
658
|
+
{
|
|
659
|
+
"args": [],
|
|
660
|
+
"name": "isCode",
|
|
661
|
+
"returns": {
|
|
662
|
+
"type": "bool"
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
]
|
|
666
|
+
};
|
|
667
|
+
/** The `link` extension. */
|
|
668
|
+
export const link = {
|
|
669
|
+
"commands": [
|
|
670
|
+
/** Link the selection to a URL, or update the link it already has. */
|
|
671
|
+
{
|
|
672
|
+
"args": [
|
|
673
|
+
/** The link target. */
|
|
674
|
+
{
|
|
675
|
+
"name": "href",
|
|
676
|
+
"type": {
|
|
677
|
+
"type": "string"
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
],
|
|
681
|
+
"name": "setLink"
|
|
682
|
+
},
|
|
683
|
+
/** Remove links from the selection. */
|
|
684
|
+
{
|
|
685
|
+
"args": [],
|
|
686
|
+
"name": "unsetLink"
|
|
687
|
+
}
|
|
688
|
+
],
|
|
689
|
+
"name": "link",
|
|
690
|
+
"nodes": [
|
|
691
|
+
{
|
|
692
|
+
"attrs": [
|
|
693
|
+
/** The link target. */
|
|
694
|
+
{
|
|
695
|
+
"default": null,
|
|
696
|
+
"name": "href",
|
|
697
|
+
"type": {
|
|
698
|
+
"of": {
|
|
699
|
+
"type": "string"
|
|
700
|
+
},
|
|
701
|
+
"type": "nullable"
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
],
|
|
705
|
+
"kind": "mark",
|
|
706
|
+
"name": "link"
|
|
707
|
+
}
|
|
708
|
+
],
|
|
709
|
+
"queries": [
|
|
710
|
+
/** The href of the link at the selection, or null. */
|
|
711
|
+
{
|
|
712
|
+
"args": [],
|
|
713
|
+
"name": "linkHref",
|
|
714
|
+
"returns": {
|
|
715
|
+
"of": {
|
|
716
|
+
"type": "string"
|
|
717
|
+
},
|
|
718
|
+
"type": "nullable"
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
]
|
|
722
|
+
};
|
|
723
|
+
/** The `history` extension. */
|
|
724
|
+
export const history = {
|
|
725
|
+
"commands": [
|
|
726
|
+
/** Undo the last group of changes. */
|
|
727
|
+
{
|
|
728
|
+
"args": [],
|
|
729
|
+
"name": "undo"
|
|
730
|
+
},
|
|
731
|
+
/** Redo the last undone group. */
|
|
732
|
+
{
|
|
733
|
+
"args": [],
|
|
734
|
+
"name": "redo"
|
|
735
|
+
}
|
|
736
|
+
],
|
|
737
|
+
"name": "history",
|
|
738
|
+
"nodes": [],
|
|
739
|
+
"queries": []
|
|
740
|
+
};
|
|
741
|
+
/** The extensions every engine registers. */
|
|
742
|
+
export const core = [undoInputRule, paragraph, doc, baseKeymap];
|
|
743
|
+
/** Every optional StarterKit extension, the default for `createEngine`. */
|
|
744
|
+
export const starterKit = [trailingNode, heading, blockquote, codeBlock, hardBreak, horizontalRule, bulletList, orderedList, listItem, taskList, bold, italic, underline, strike, code, link, history];
|