@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.
Files changed (49) hide show
  1. package/dist/calls.d.ts +15 -0
  2. package/dist/calls.js +20 -0
  3. package/dist/create.d.ts +17 -0
  4. package/dist/create.js +29 -0
  5. package/dist/engine.d.ts +125 -0
  6. package/dist/engine.js +176 -0
  7. package/dist/errors.d.ts +13 -0
  8. package/dist/errors.js +5 -0
  9. package/dist/extensions.generated.d.ts +1022 -0
  10. package/dist/extensions.generated.js +744 -0
  11. package/dist/extras.generated.d.ts +5803 -0
  12. package/dist/extras.generated.js +2600 -0
  13. package/dist/full.d.ts +21 -0
  14. package/dist/full.js +63 -0
  15. package/dist/gemoji.generated.d.ts +29 -0
  16. package/dist/gemoji.generated.js +30 -0
  17. package/dist/load.d.ts +21 -0
  18. package/dist/load.js +41 -0
  19. package/dist/mod.d.ts +25 -0
  20. package/dist/mod.js +24 -0
  21. package/dist/native.d.ts +115 -0
  22. package/dist/native.js +235 -0
  23. package/dist/scene-types.d.ts +223 -0
  24. package/dist/scene-types.js +1 -0
  25. package/dist/scene.d.ts +105 -0
  26. package/dist/scene.js +153 -0
  27. package/dist/ssr.d.ts +66 -0
  28. package/dist/ssr.js +98 -0
  29. package/dist/types.d.ts +232 -0
  30. package/dist/types.js +1 -0
  31. package/package.json +89 -5
  32. package/readme.md +96 -0
  33. package/wasm/canvist_headless_wasm.d.ts +216 -0
  34. package/wasm/canvist_headless_wasm.js +910 -0
  35. package/wasm/canvist_headless_wasm_bg.wasm +0 -0
  36. package/wasm/canvist_headless_wasm_bg.wasm.d.ts +44 -0
  37. package/wasm-full/canvist_headless_full.d.ts +223 -0
  38. package/wasm-full/canvist_headless_full.js +923 -0
  39. package/wasm-full/canvist_headless_full_bg.wasm +0 -0
  40. package/wasm-full/canvist_headless_full_bg.wasm.d.ts +45 -0
  41. package/wasm-scene/canvist_headless_scene.d.ts +332 -0
  42. package/wasm-scene/canvist_headless_scene.js +1231 -0
  43. package/wasm-scene/canvist_headless_scene_bg.wasm +0 -0
  44. package/wasm-scene/canvist_headless_scene_bg.wasm.d.ts +66 -0
  45. package/wasm-ssr/canvist_headless_ssr.d.ts +250 -0
  46. package/wasm-ssr/canvist_headless_ssr.js +1025 -0
  47. package/wasm-ssr/canvist_headless_ssr_bg.wasm +0 -0
  48. package/wasm-ssr/canvist_headless_ssr_bg.wasm.d.ts +50 -0
  49. package/README.md +0 -3
@@ -0,0 +1,2600 @@
1
+ // Generated by scripts/generate.ts from canvist_extensions' metadata snapshots. Do not edit.
2
+ import { starterKit } from "./extensions.generated.js";
3
+ /** The `textStyle` extension. */
4
+ export const textStyle = {
5
+ "commands": [
6
+ /** Remove text styles whose attributes are all unset. */
7
+ {
8
+ "args": [],
9
+ "name": "removeEmptyTextStyle"
10
+ }
11
+ ],
12
+ "name": "textStyle",
13
+ "nodes": [
14
+ {
15
+ "attrs": [],
16
+ "kind": "mark",
17
+ "name": "textStyle"
18
+ }
19
+ ],
20
+ "queries": []
21
+ };
22
+ /** The `mention` extension. */
23
+ export const mention = {
24
+ "commands": [
25
+ /** Replace the mention suggestion, or insert at the caret, with a mention and a space. */
26
+ {
27
+ "args": [
28
+ /** What the mention points at. */
29
+ {
30
+ "name": "id",
31
+ "type": {
32
+ "type": "string"
33
+ }
34
+ },
35
+ /** The text shown after the trigger character. */
36
+ {
37
+ "default": null,
38
+ "name": "label",
39
+ "type": {
40
+ "of": {
41
+ "type": "string"
42
+ },
43
+ "type": "nullable"
44
+ }
45
+ }
46
+ ],
47
+ "name": "insertMention"
48
+ },
49
+ /** Stop suggesting mentions until another trigger character is typed. */
50
+ {
51
+ "args": [],
52
+ "name": "dismissMentionSuggestion"
53
+ }
54
+ ],
55
+ "name": "mention",
56
+ "nodes": [
57
+ {
58
+ "attrs": [
59
+ /** What the mention points at, such as a user id. */
60
+ {
61
+ "default": null,
62
+ "name": "id",
63
+ "type": {
64
+ "of": {
65
+ "type": "string"
66
+ },
67
+ "type": "nullable"
68
+ }
69
+ },
70
+ /** The text shown after the trigger character. */
71
+ {
72
+ "default": null,
73
+ "name": "label",
74
+ "type": {
75
+ "of": {
76
+ "type": "string"
77
+ },
78
+ "type": "nullable"
79
+ }
80
+ },
81
+ /** The character that started the mention. */
82
+ {
83
+ "default": "@",
84
+ "name": "mentionSuggestionChar",
85
+ "type": {
86
+ "type": "string"
87
+ }
88
+ }
89
+ ],
90
+ "kind": "embed",
91
+ "name": "mention"
92
+ }
93
+ ],
94
+ "queries": [
95
+ /** The trigger character and the query typed after it, while a mention is suggested. */
96
+ {
97
+ "args": [],
98
+ "name": "mentionSuggestion",
99
+ "returns": {
100
+ "of": {
101
+ "fields": [
102
+ /** The trigger character. */
103
+ {
104
+ "name": "char",
105
+ "type": {
106
+ "type": "string"
107
+ }
108
+ },
109
+ /** The text typed after it. */
110
+ {
111
+ "name": "query",
112
+ "type": {
113
+ "type": "string"
114
+ }
115
+ }
116
+ ],
117
+ "type": "record"
118
+ },
119
+ "type": "nullable"
120
+ }
121
+ }
122
+ ]
123
+ };
124
+ /** The `details` extension. */
125
+ export const details = {
126
+ "commands": [
127
+ /** Wrap the selected blocks in an open details block with an empty summary. */
128
+ {
129
+ "args": [],
130
+ "name": "setDetails"
131
+ },
132
+ /** Replace the details around the selection with its summary and content. */
133
+ {
134
+ "args": [],
135
+ "name": "unsetDetails"
136
+ },
137
+ /** Open the details around the selection, or close it. */
138
+ {
139
+ "args": [],
140
+ "name": "toggleDetailsOpen"
141
+ }
142
+ ],
143
+ "name": "details",
144
+ "nodes": [
145
+ {
146
+ "attrs": [
147
+ /** Whether the content shows. */
148
+ {
149
+ "default": false,
150
+ "name": "open",
151
+ "type": {
152
+ "type": "bool"
153
+ }
154
+ }
155
+ ],
156
+ "kind": "block",
157
+ "name": "details"
158
+ },
159
+ {
160
+ "attrs": [],
161
+ "kind": "block",
162
+ "name": "detailsSummary"
163
+ },
164
+ {
165
+ "attrs": [],
166
+ "kind": "block",
167
+ "name": "detailsContent"
168
+ }
169
+ ],
170
+ "queries": [
171
+ /** Whether the details around the selection is open, or null outside one. */
172
+ {
173
+ "args": [],
174
+ "name": "detailsOpen",
175
+ "returns": {
176
+ "of": {
177
+ "type": "bool"
178
+ },
179
+ "type": "nullable"
180
+ }
181
+ }
182
+ ]
183
+ };
184
+ /** The `subscript` extension. */
185
+ export const subscript = {
186
+ "commands": [
187
+ /** Add the mark to the selection, or remove it if every selected character has it. */
188
+ {
189
+ "args": [],
190
+ "name": "toggleSubscript"
191
+ },
192
+ /** Add the mark to the selection. */
193
+ {
194
+ "args": [],
195
+ "name": "setSubscript"
196
+ },
197
+ /** Remove the mark from the selection. */
198
+ {
199
+ "args": [],
200
+ "name": "unsetSubscript"
201
+ }
202
+ ],
203
+ "name": "subscript",
204
+ "nodes": [
205
+ {
206
+ "attrs": [],
207
+ "kind": "mark",
208
+ "name": "subscript"
209
+ }
210
+ ],
211
+ "queries": [
212
+ /** Whether the mark is active at the selection. */
213
+ {
214
+ "args": [],
215
+ "name": "isSubscript",
216
+ "returns": {
217
+ "type": "bool"
218
+ }
219
+ }
220
+ ]
221
+ };
222
+ /** The `superscript` extension. */
223
+ export const superscript = {
224
+ "commands": [
225
+ /** Add the mark to the selection, or remove it if every selected character has it. */
226
+ {
227
+ "args": [],
228
+ "name": "toggleSuperscript"
229
+ },
230
+ /** Add the mark to the selection. */
231
+ {
232
+ "args": [],
233
+ "name": "setSuperscript"
234
+ },
235
+ /** Remove the mark from the selection. */
236
+ {
237
+ "args": [],
238
+ "name": "unsetSuperscript"
239
+ }
240
+ ],
241
+ "name": "superscript",
242
+ "nodes": [
243
+ {
244
+ "attrs": [],
245
+ "kind": "mark",
246
+ "name": "superscript"
247
+ }
248
+ ],
249
+ "queries": [
250
+ /** Whether the mark is active at the selection. */
251
+ {
252
+ "args": [],
253
+ "name": "isSuperscript",
254
+ "returns": {
255
+ "type": "bool"
256
+ }
257
+ }
258
+ ]
259
+ };
260
+ /** The `highlight` extension. */
261
+ export const highlight = {
262
+ "commands": [
263
+ /** Highlight the selection, in a colour or the theme's. */
264
+ {
265
+ "args": [
266
+ /** The highlight colour, such as `#fef08a`, or null for the theme's colour. */
267
+ {
268
+ "default": null,
269
+ "name": "color",
270
+ "type": {
271
+ "of": {
272
+ "type": "string"
273
+ },
274
+ "type": "nullable"
275
+ }
276
+ }
277
+ ],
278
+ "name": "setHighlight"
279
+ },
280
+ /** Remove the selection's highlight in a colour, or highlight it in that colour. */
281
+ {
282
+ "args": [
283
+ /** The highlight colour, such as `#fef08a`, or null for the theme's colour. */
284
+ {
285
+ "default": null,
286
+ "name": "color",
287
+ "type": {
288
+ "of": {
289
+ "type": "string"
290
+ },
291
+ "type": "nullable"
292
+ }
293
+ }
294
+ ],
295
+ "name": "toggleHighlight"
296
+ },
297
+ /** Remove highlights from the selection. */
298
+ {
299
+ "args": [],
300
+ "name": "unsetHighlight"
301
+ }
302
+ ],
303
+ "name": "highlight",
304
+ "nodes": [
305
+ {
306
+ "attrs": [
307
+ /** The highlight colour, such as `#fef08a`, or null for the theme's colour. */
308
+ {
309
+ "default": null,
310
+ "name": "color",
311
+ "type": {
312
+ "of": {
313
+ "type": "string"
314
+ },
315
+ "type": "nullable"
316
+ }
317
+ }
318
+ ],
319
+ "kind": "mark",
320
+ "name": "highlight"
321
+ }
322
+ ],
323
+ "queries": [
324
+ /** Whether the selection is highlighted. */
325
+ {
326
+ "args": [],
327
+ "name": "isHighlight",
328
+ "returns": {
329
+ "type": "bool"
330
+ }
331
+ },
332
+ /** The colour every selected character is highlighted in, or null. */
333
+ {
334
+ "args": [],
335
+ "name": "highlightColor",
336
+ "returns": {
337
+ "of": {
338
+ "type": "string"
339
+ },
340
+ "type": "nullable"
341
+ }
342
+ }
343
+ ]
344
+ };
345
+ /** The `color` extension. */
346
+ export const color = {
347
+ "commands": [
348
+ /** Set the style on the selection, keeping its other styles. */
349
+ {
350
+ "args": [
351
+ /** The text colour, any CSS colour such as `#958df1`. */
352
+ {
353
+ "name": "color",
354
+ "type": {
355
+ "type": "string"
356
+ }
357
+ }
358
+ ],
359
+ "name": "setColor"
360
+ },
361
+ /** Clear the style from the selection. */
362
+ {
363
+ "args": [],
364
+ "name": "unsetColor"
365
+ }
366
+ ],
367
+ "name": "color",
368
+ "nodes": [
369
+ {
370
+ "attrs": [
371
+ /** The text colour, any CSS colour such as `#958df1`. */
372
+ {
373
+ "default": null,
374
+ "name": "color",
375
+ "type": {
376
+ "of": {
377
+ "type": "string"
378
+ },
379
+ "type": "nullable"
380
+ }
381
+ }
382
+ ],
383
+ "kind": "mark",
384
+ "name": "textStyle"
385
+ }
386
+ ],
387
+ "queries": [
388
+ /** The value every selected character shares, or null. */
389
+ {
390
+ "args": [],
391
+ "name": "color",
392
+ "returns": {
393
+ "of": {
394
+ "type": "string"
395
+ },
396
+ "type": "nullable"
397
+ }
398
+ }
399
+ ]
400
+ };
401
+ /** The `backgroundColor` extension. */
402
+ export const backgroundColor = {
403
+ "commands": [
404
+ /** Set the style on the selection, keeping its other styles. */
405
+ {
406
+ "args": [
407
+ /** The background colour behind the text, any CSS colour. */
408
+ {
409
+ "name": "backgroundColor",
410
+ "type": {
411
+ "type": "string"
412
+ }
413
+ }
414
+ ],
415
+ "name": "setBackgroundColor"
416
+ },
417
+ /** Clear the style from the selection. */
418
+ {
419
+ "args": [],
420
+ "name": "unsetBackgroundColor"
421
+ }
422
+ ],
423
+ "name": "backgroundColor",
424
+ "nodes": [
425
+ {
426
+ "attrs": [
427
+ /** The background colour behind the text, any CSS colour. */
428
+ {
429
+ "default": null,
430
+ "name": "backgroundColor",
431
+ "type": {
432
+ "of": {
433
+ "type": "string"
434
+ },
435
+ "type": "nullable"
436
+ }
437
+ }
438
+ ],
439
+ "kind": "mark",
440
+ "name": "textStyle"
441
+ }
442
+ ],
443
+ "queries": [
444
+ /** The value every selected character shares, or null. */
445
+ {
446
+ "args": [],
447
+ "name": "backgroundColor",
448
+ "returns": {
449
+ "of": {
450
+ "type": "string"
451
+ },
452
+ "type": "nullable"
453
+ }
454
+ }
455
+ ]
456
+ };
457
+ /** The `fontFamily` extension. */
458
+ export const fontFamily = {
459
+ "commands": [
460
+ /** Set the style on the selection, keeping its other styles. */
461
+ {
462
+ "args": [
463
+ /** The CSS font family list, such as `Inter, sans-serif`. */
464
+ {
465
+ "name": "fontFamily",
466
+ "type": {
467
+ "type": "string"
468
+ }
469
+ }
470
+ ],
471
+ "name": "setFontFamily"
472
+ },
473
+ /** Clear the style from the selection. */
474
+ {
475
+ "args": [],
476
+ "name": "unsetFontFamily"
477
+ }
478
+ ],
479
+ "name": "fontFamily",
480
+ "nodes": [
481
+ {
482
+ "attrs": [
483
+ /** The CSS font family list, such as `Inter, sans-serif`. */
484
+ {
485
+ "default": null,
486
+ "name": "fontFamily",
487
+ "type": {
488
+ "of": {
489
+ "type": "string"
490
+ },
491
+ "type": "nullable"
492
+ }
493
+ }
494
+ ],
495
+ "kind": "mark",
496
+ "name": "textStyle"
497
+ }
498
+ ],
499
+ "queries": [
500
+ /** The value every selected character shares, or null. */
501
+ {
502
+ "args": [],
503
+ "name": "fontFamily",
504
+ "returns": {
505
+ "of": {
506
+ "type": "string"
507
+ },
508
+ "type": "nullable"
509
+ }
510
+ }
511
+ ]
512
+ };
513
+ /** The `fontSize` extension. */
514
+ export const fontSize = {
515
+ "commands": [
516
+ /** Set the style on the selection, keeping its other styles. */
517
+ {
518
+ "args": [
519
+ /** The font size, such as `18px`. */
520
+ {
521
+ "name": "fontSize",
522
+ "type": {
523
+ "type": "string"
524
+ }
525
+ }
526
+ ],
527
+ "name": "setFontSize"
528
+ },
529
+ /** Clear the style from the selection. */
530
+ {
531
+ "args": [],
532
+ "name": "unsetFontSize"
533
+ }
534
+ ],
535
+ "name": "fontSize",
536
+ "nodes": [
537
+ {
538
+ "attrs": [
539
+ /** The font size, such as `18px`. */
540
+ {
541
+ "default": null,
542
+ "name": "fontSize",
543
+ "type": {
544
+ "of": {
545
+ "type": "string"
546
+ },
547
+ "type": "nullable"
548
+ }
549
+ }
550
+ ],
551
+ "kind": "mark",
552
+ "name": "textStyle"
553
+ }
554
+ ],
555
+ "queries": [
556
+ /** The value every selected character shares, or null. */
557
+ {
558
+ "args": [],
559
+ "name": "fontSize",
560
+ "returns": {
561
+ "of": {
562
+ "type": "string"
563
+ },
564
+ "type": "nullable"
565
+ }
566
+ }
567
+ ]
568
+ };
569
+ /** The `lineHeight` extension. */
570
+ export const lineHeight = {
571
+ "commands": [
572
+ /** Set the style on the selection, keeping its other styles. */
573
+ {
574
+ "args": [
575
+ /** The line height as a multiple of the font size, such as `1.5`. */
576
+ {
577
+ "name": "lineHeight",
578
+ "type": {
579
+ "type": "string"
580
+ }
581
+ }
582
+ ],
583
+ "name": "setLineHeight"
584
+ },
585
+ /** Clear the style from the selection. */
586
+ {
587
+ "args": [],
588
+ "name": "unsetLineHeight"
589
+ }
590
+ ],
591
+ "name": "lineHeight",
592
+ "nodes": [
593
+ {
594
+ "attrs": [
595
+ /** The line height as a multiple of the font size, such as `1.5`. */
596
+ {
597
+ "default": null,
598
+ "name": "lineHeight",
599
+ "type": {
600
+ "of": {
601
+ "type": "string"
602
+ },
603
+ "type": "nullable"
604
+ }
605
+ }
606
+ ],
607
+ "kind": "mark",
608
+ "name": "textStyle"
609
+ }
610
+ ],
611
+ "queries": [
612
+ /** The value every selected character shares, or null. */
613
+ {
614
+ "args": [],
615
+ "name": "lineHeight",
616
+ "returns": {
617
+ "of": {
618
+ "type": "string"
619
+ },
620
+ "type": "nullable"
621
+ }
622
+ }
623
+ ]
624
+ };
625
+ /** The `textAlign` extension. */
626
+ export const textAlign = {
627
+ "commands": [
628
+ /** Align the selected text blocks. */
629
+ {
630
+ "args": [
631
+ /** The alignment: left, center, right, or justify. */
632
+ {
633
+ "name": "alignment",
634
+ "type": {
635
+ "enum": [
636
+ "left",
637
+ "center",
638
+ "right",
639
+ "justify"
640
+ ],
641
+ "type": "string"
642
+ }
643
+ }
644
+ ],
645
+ "name": "setTextAlign"
646
+ },
647
+ /** Clear the alignment of the selected text blocks. */
648
+ {
649
+ "args": [],
650
+ "name": "unsetTextAlign"
651
+ },
652
+ /** Clear the alignment if every selected text block has it, otherwise set it. */
653
+ {
654
+ "args": [
655
+ /** The alignment: left, center, right, or justify. */
656
+ {
657
+ "name": "alignment",
658
+ "type": {
659
+ "enum": [
660
+ "left",
661
+ "center",
662
+ "right",
663
+ "justify"
664
+ ],
665
+ "type": "string"
666
+ }
667
+ }
668
+ ],
669
+ "name": "toggleTextAlign"
670
+ }
671
+ ],
672
+ "name": "textAlign",
673
+ "nodes": [
674
+ {
675
+ "attrs": [
676
+ /** How the block's lines align, or null to follow the text direction. */
677
+ {
678
+ "default": null,
679
+ "name": "textAlign",
680
+ "type": {
681
+ "of": {
682
+ "enum": [
683
+ "left",
684
+ "center",
685
+ "right",
686
+ "justify"
687
+ ],
688
+ "type": "string"
689
+ },
690
+ "type": "nullable"
691
+ }
692
+ }
693
+ ],
694
+ "kind": "block",
695
+ "name": "heading"
696
+ },
697
+ {
698
+ "attrs": [
699
+ /** How the block's lines align, or null to follow the text direction. */
700
+ {
701
+ "default": null,
702
+ "name": "textAlign",
703
+ "type": {
704
+ "of": {
705
+ "enum": [
706
+ "left",
707
+ "center",
708
+ "right",
709
+ "justify"
710
+ ],
711
+ "type": "string"
712
+ },
713
+ "type": "nullable"
714
+ }
715
+ }
716
+ ],
717
+ "kind": "block",
718
+ "name": "paragraph"
719
+ }
720
+ ],
721
+ "queries": [
722
+ /** The alignment every selected text block shares, or null. */
723
+ {
724
+ "args": [],
725
+ "name": "textAlign",
726
+ "returns": {
727
+ "of": {
728
+ "enum": [
729
+ "left",
730
+ "center",
731
+ "right",
732
+ "justify"
733
+ ],
734
+ "type": "string"
735
+ },
736
+ "type": "nullable"
737
+ }
738
+ }
739
+ ]
740
+ };
741
+ /** The `characterCount` extension. */
742
+ export const characterCount = {
743
+ "commands": [
744
+ /** Change the character limit, or remove it with null. */
745
+ {
746
+ "args": [
747
+ /** The most characters the document may hold, from 0 to 4294967295, or null for no limit. */
748
+ {
749
+ "name": "limit",
750
+ "type": {
751
+ "of": {
752
+ "type": "int"
753
+ },
754
+ "type": "nullable"
755
+ }
756
+ }
757
+ ],
758
+ "name": "setCharacterLimit"
759
+ }
760
+ ],
761
+ "name": "characterCount",
762
+ "nodes": [],
763
+ "queries": [
764
+ /** The characters in the document: grapheme clusters, leaving out embeds. */
765
+ {
766
+ "args": [],
767
+ "name": "characters",
768
+ "returns": {
769
+ "type": "int"
770
+ }
771
+ },
772
+ /** The words in the document. */
773
+ {
774
+ "args": [],
775
+ "name": "words",
776
+ "returns": {
777
+ "type": "int"
778
+ }
779
+ },
780
+ /** The character limit in force, or null. */
781
+ {
782
+ "args": [],
783
+ "name": "characterLimit",
784
+ "returns": {
785
+ "of": {
786
+ "type": "int"
787
+ },
788
+ "type": "nullable"
789
+ }
790
+ }
791
+ ]
792
+ };
793
+ /** The `placeholder` extension. */
794
+ export const placeholder = {
795
+ "commands": [
796
+ /** Change the placeholder text. */
797
+ {
798
+ "args": [
799
+ /** The placeholder text. */
800
+ {
801
+ "name": "placeholder",
802
+ "type": {
803
+ "type": "string"
804
+ }
805
+ }
806
+ ],
807
+ "name": "setPlaceholder"
808
+ }
809
+ ],
810
+ "name": "placeholder",
811
+ "nodes": [],
812
+ "queries": [
813
+ /** The placeholder the caret's empty block shows, or null. */
814
+ {
815
+ "args": [],
816
+ "name": "placeholder",
817
+ "returns": {
818
+ "of": {
819
+ "type": "string"
820
+ },
821
+ "type": "nullable"
822
+ }
823
+ }
824
+ ]
825
+ };
826
+ /** The `hashtag` extension. */
827
+ export const hashtag = {
828
+ "commands": [
829
+ /** Replace the hashtag suggestion, or insert at the caret, with `#tag` and a space. */
830
+ {
831
+ "args": [
832
+ /** The tag, with or without `#`. */
833
+ {
834
+ "name": "tag",
835
+ "type": {
836
+ "type": "string"
837
+ }
838
+ }
839
+ ],
840
+ "name": "insertHashtag"
841
+ },
842
+ /** Stop suggesting hashtags until another `#` is typed. */
843
+ {
844
+ "args": [],
845
+ "name": "dismissHashtagSuggestion"
846
+ }
847
+ ],
848
+ "name": "hashtag",
849
+ "nodes": [
850
+ {
851
+ "attrs": [
852
+ /** The tag, without `#`. */
853
+ {
854
+ "default": null,
855
+ "name": "tag",
856
+ "type": {
857
+ "of": {
858
+ "type": "string"
859
+ },
860
+ "type": "nullable"
861
+ }
862
+ }
863
+ ],
864
+ "kind": "mark",
865
+ "name": "hashtag"
866
+ }
867
+ ],
868
+ "queries": [
869
+ /** The trigger character and the query typed after it, while a hashtag is suggested. */
870
+ {
871
+ "args": [],
872
+ "name": "hashtagSuggestion",
873
+ "returns": {
874
+ "of": {
875
+ "fields": [
876
+ /** The trigger character. */
877
+ {
878
+ "name": "char",
879
+ "type": {
880
+ "type": "string"
881
+ }
882
+ },
883
+ /** The text typed after it. */
884
+ {
885
+ "name": "query",
886
+ "type": {
887
+ "type": "string"
888
+ }
889
+ }
890
+ ],
891
+ "type": "record"
892
+ },
893
+ "type": "nullable"
894
+ }
895
+ },
896
+ /** Every tag in the document, sorted, without `#`. */
897
+ {
898
+ "args": [],
899
+ "name": "hashtags",
900
+ "returns": {
901
+ "of": {
902
+ "type": "string"
903
+ },
904
+ "type": "list"
905
+ }
906
+ }
907
+ ]
908
+ };
909
+ /** The `emoji` extension. */
910
+ export const emoji = {
911
+ "commands": [
912
+ /** Replace the emoji suggestion, or insert at the caret, with the emoji for a shortcode. */
913
+ {
914
+ "args": [
915
+ /** The shortcode, such as `smile`. */
916
+ {
917
+ "name": "name",
918
+ "type": {
919
+ "type": "string"
920
+ }
921
+ }
922
+ ],
923
+ "name": "setEmoji"
924
+ },
925
+ /** Stop suggesting emoji until another `:` is typed. */
926
+ {
927
+ "args": [],
928
+ "name": "dismissEmojiSuggestion"
929
+ }
930
+ ],
931
+ "name": "emoji",
932
+ "nodes": [
933
+ {
934
+ "attrs": [
935
+ /** The shortcode, such as `smile`. */
936
+ {
937
+ "default": null,
938
+ "name": "name",
939
+ "type": {
940
+ "of": {
941
+ "type": "string"
942
+ },
943
+ "type": "nullable"
944
+ }
945
+ },
946
+ /** The emoji itself, so it draws without the table. */
947
+ {
948
+ "default": null,
949
+ "name": "emoji",
950
+ "type": {
951
+ "of": {
952
+ "type": "string"
953
+ },
954
+ "type": "nullable"
955
+ }
956
+ }
957
+ ],
958
+ "kind": "embed",
959
+ "name": "emoji"
960
+ }
961
+ ],
962
+ "queries": [
963
+ /** The trigger character and the query typed after it, while an emoji is suggested. */
964
+ {
965
+ "args": [],
966
+ "name": "emojiSuggestion",
967
+ "returns": {
968
+ "of": {
969
+ "fields": [
970
+ /** The trigger character. */
971
+ {
972
+ "name": "char",
973
+ "type": {
974
+ "type": "string"
975
+ }
976
+ },
977
+ /** The text typed after it. */
978
+ {
979
+ "name": "query",
980
+ "type": {
981
+ "type": "string"
982
+ }
983
+ }
984
+ ],
985
+ "type": "record"
986
+ },
987
+ "type": "nullable"
988
+ }
989
+ },
990
+ /** Emoji whose shortcode contains the query, those starting with it first. */
991
+ {
992
+ "args": [
993
+ /** What to look for, such as `smi`. */
994
+ {
995
+ "name": "query",
996
+ "type": {
997
+ "type": "string"
998
+ }
999
+ },
1000
+ /** The most matches to return. */
1001
+ {
1002
+ "default": 10,
1003
+ "name": "limit",
1004
+ "type": {
1005
+ "type": "int"
1006
+ }
1007
+ }
1008
+ ],
1009
+ "name": "searchEmoji",
1010
+ "returns": {
1011
+ "of": {
1012
+ "fields": [
1013
+ /** The shortcode. */
1014
+ {
1015
+ "name": "name",
1016
+ "type": {
1017
+ "type": "string"
1018
+ }
1019
+ },
1020
+ /** The emoji. */
1021
+ {
1022
+ "name": "emoji",
1023
+ "type": {
1024
+ "type": "string"
1025
+ }
1026
+ }
1027
+ ],
1028
+ "type": "record"
1029
+ },
1030
+ "type": "list"
1031
+ }
1032
+ }
1033
+ ]
1034
+ };
1035
+ /** The `image` extension. */
1036
+ export const image = {
1037
+ "commands": [
1038
+ /** Insert an image at the selection. */
1039
+ {
1040
+ "args": [
1041
+ /** The image URL. */
1042
+ {
1043
+ "name": "src",
1044
+ "type": {
1045
+ "type": "string"
1046
+ }
1047
+ },
1048
+ /** Text describing the image, for screen readers. */
1049
+ {
1050
+ "default": null,
1051
+ "name": "alt",
1052
+ "type": {
1053
+ "of": {
1054
+ "type": "string"
1055
+ },
1056
+ "type": "nullable"
1057
+ }
1058
+ },
1059
+ /** A title shown on hover. */
1060
+ {
1061
+ "default": null,
1062
+ "name": "title",
1063
+ "type": {
1064
+ "of": {
1065
+ "type": "string"
1066
+ },
1067
+ "type": "nullable"
1068
+ }
1069
+ },
1070
+ /** The width in pixels. */
1071
+ {
1072
+ "default": null,
1073
+ "name": "width",
1074
+ "type": {
1075
+ "of": {
1076
+ "type": "float"
1077
+ },
1078
+ "type": "nullable"
1079
+ }
1080
+ },
1081
+ /** The height in pixels. */
1082
+ {
1083
+ "default": null,
1084
+ "name": "height",
1085
+ "type": {
1086
+ "of": {
1087
+ "type": "float"
1088
+ },
1089
+ "type": "nullable"
1090
+ }
1091
+ }
1092
+ ],
1093
+ "name": "setImage"
1094
+ }
1095
+ ],
1096
+ "name": "image",
1097
+ "nodes": [
1098
+ {
1099
+ "attrs": [
1100
+ /** The image URL. */
1101
+ {
1102
+ "default": null,
1103
+ "name": "src",
1104
+ "type": {
1105
+ "of": {
1106
+ "type": "string"
1107
+ },
1108
+ "type": "nullable"
1109
+ }
1110
+ },
1111
+ /** Text describing the image, for screen readers. */
1112
+ {
1113
+ "default": null,
1114
+ "name": "alt",
1115
+ "type": {
1116
+ "of": {
1117
+ "type": "string"
1118
+ },
1119
+ "type": "nullable"
1120
+ }
1121
+ },
1122
+ /** A title shown on hover. */
1123
+ {
1124
+ "default": null,
1125
+ "name": "title",
1126
+ "type": {
1127
+ "of": {
1128
+ "type": "string"
1129
+ },
1130
+ "type": "nullable"
1131
+ }
1132
+ },
1133
+ /** The width in pixels. */
1134
+ {
1135
+ "default": null,
1136
+ "name": "width",
1137
+ "type": {
1138
+ "of": {
1139
+ "type": "float"
1140
+ },
1141
+ "type": "nullable"
1142
+ }
1143
+ },
1144
+ /** The height in pixels. */
1145
+ {
1146
+ "default": null,
1147
+ "name": "height",
1148
+ "type": {
1149
+ "of": {
1150
+ "type": "float"
1151
+ },
1152
+ "type": "nullable"
1153
+ }
1154
+ }
1155
+ ],
1156
+ "kind": "block",
1157
+ "name": "image"
1158
+ }
1159
+ ],
1160
+ "queries": []
1161
+ };
1162
+ /** The `youtube` extension. */
1163
+ export const youtube = {
1164
+ "commands": [
1165
+ /** Insert a YouTube video at the selection. */
1166
+ {
1167
+ "args": [
1168
+ /** The video URL. */
1169
+ {
1170
+ "name": "src",
1171
+ "type": {
1172
+ "type": "string"
1173
+ }
1174
+ },
1175
+ /** Where playback starts, in seconds. */
1176
+ {
1177
+ "default": 0,
1178
+ "name": "start",
1179
+ "type": {
1180
+ "type": "float"
1181
+ }
1182
+ },
1183
+ /** The width in pixels. */
1184
+ {
1185
+ "default": 640,
1186
+ "name": "width",
1187
+ "type": {
1188
+ "type": "float"
1189
+ }
1190
+ },
1191
+ /** The height in pixels. */
1192
+ {
1193
+ "default": 480,
1194
+ "name": "height",
1195
+ "type": {
1196
+ "type": "float"
1197
+ }
1198
+ }
1199
+ ],
1200
+ "name": "setYoutubeVideo"
1201
+ }
1202
+ ],
1203
+ "name": "youtube",
1204
+ "nodes": [
1205
+ {
1206
+ "attrs": [
1207
+ /** The video URL. */
1208
+ {
1209
+ "default": null,
1210
+ "name": "src",
1211
+ "type": {
1212
+ "of": {
1213
+ "type": "string"
1214
+ },
1215
+ "type": "nullable"
1216
+ }
1217
+ },
1218
+ /** Where playback starts, in seconds. */
1219
+ {
1220
+ "default": 0,
1221
+ "name": "start",
1222
+ "type": {
1223
+ "type": "float"
1224
+ }
1225
+ },
1226
+ /** The width in pixels. */
1227
+ {
1228
+ "default": 640,
1229
+ "name": "width",
1230
+ "type": {
1231
+ "type": "float"
1232
+ }
1233
+ },
1234
+ /** The height in pixels. */
1235
+ {
1236
+ "default": 480,
1237
+ "name": "height",
1238
+ "type": {
1239
+ "type": "float"
1240
+ }
1241
+ }
1242
+ ],
1243
+ "kind": "block",
1244
+ "name": "youtube"
1245
+ }
1246
+ ],
1247
+ "queries": []
1248
+ };
1249
+ /** The `twitch` extension. */
1250
+ export const twitch = {
1251
+ "commands": [
1252
+ /** Insert a Twitch video, clip, or channel at the selection. */
1253
+ {
1254
+ "args": [
1255
+ /** The video, clip, or channel URL. */
1256
+ {
1257
+ "name": "src",
1258
+ "type": {
1259
+ "type": "string"
1260
+ }
1261
+ },
1262
+ /** The width in pixels. */
1263
+ {
1264
+ "default": 640,
1265
+ "name": "width",
1266
+ "type": {
1267
+ "type": "float"
1268
+ }
1269
+ },
1270
+ /** The height in pixels. */
1271
+ {
1272
+ "default": 480,
1273
+ "name": "height",
1274
+ "type": {
1275
+ "type": "float"
1276
+ }
1277
+ },
1278
+ /** Start playing straight away. */
1279
+ {
1280
+ "default": false,
1281
+ "name": "autoplay",
1282
+ "type": {
1283
+ "type": "bool"
1284
+ }
1285
+ },
1286
+ /** Start muted. */
1287
+ {
1288
+ "default": false,
1289
+ "name": "muted",
1290
+ "type": {
1291
+ "type": "bool"
1292
+ }
1293
+ }
1294
+ ],
1295
+ "name": "setTwitchVideo"
1296
+ }
1297
+ ],
1298
+ "name": "twitch",
1299
+ "nodes": [
1300
+ {
1301
+ "attrs": [
1302
+ /** The video, clip, or channel URL. */
1303
+ {
1304
+ "default": null,
1305
+ "name": "src",
1306
+ "type": {
1307
+ "of": {
1308
+ "type": "string"
1309
+ },
1310
+ "type": "nullable"
1311
+ }
1312
+ },
1313
+ /** The width in pixels. */
1314
+ {
1315
+ "default": 640,
1316
+ "name": "width",
1317
+ "type": {
1318
+ "type": "float"
1319
+ }
1320
+ },
1321
+ /** The height in pixels. */
1322
+ {
1323
+ "default": 480,
1324
+ "name": "height",
1325
+ "type": {
1326
+ "type": "float"
1327
+ }
1328
+ },
1329
+ /** Start playing straight away. */
1330
+ {
1331
+ "default": false,
1332
+ "name": "autoplay",
1333
+ "type": {
1334
+ "type": "bool"
1335
+ }
1336
+ },
1337
+ /** Start muted. */
1338
+ {
1339
+ "default": false,
1340
+ "name": "muted",
1341
+ "type": {
1342
+ "type": "bool"
1343
+ }
1344
+ }
1345
+ ],
1346
+ "kind": "block",
1347
+ "name": "twitch"
1348
+ }
1349
+ ],
1350
+ "queries": []
1351
+ };
1352
+ /** The `audio` extension. */
1353
+ export const audio = {
1354
+ "commands": [
1355
+ /** Insert an audio player at the selection. */
1356
+ {
1357
+ "args": [
1358
+ /** The audio URL. */
1359
+ {
1360
+ "name": "src",
1361
+ "type": {
1362
+ "type": "string"
1363
+ }
1364
+ },
1365
+ /** Show playback controls. */
1366
+ {
1367
+ "default": true,
1368
+ "name": "controls",
1369
+ "type": {
1370
+ "type": "bool"
1371
+ }
1372
+ },
1373
+ /** Start playing straight away. */
1374
+ {
1375
+ "default": false,
1376
+ "name": "autoplay",
1377
+ "type": {
1378
+ "type": "bool"
1379
+ }
1380
+ },
1381
+ /** Play again from the start when it ends. */
1382
+ {
1383
+ "default": false,
1384
+ "name": "loop",
1385
+ "type": {
1386
+ "type": "bool"
1387
+ }
1388
+ },
1389
+ /** Start muted. */
1390
+ {
1391
+ "default": false,
1392
+ "name": "muted",
1393
+ "type": {
1394
+ "type": "bool"
1395
+ }
1396
+ }
1397
+ ],
1398
+ "name": "setAudio"
1399
+ }
1400
+ ],
1401
+ "name": "audio",
1402
+ "nodes": [
1403
+ {
1404
+ "attrs": [
1405
+ /** The audio URL. */
1406
+ {
1407
+ "default": null,
1408
+ "name": "src",
1409
+ "type": {
1410
+ "of": {
1411
+ "type": "string"
1412
+ },
1413
+ "type": "nullable"
1414
+ }
1415
+ },
1416
+ /** Show playback controls. */
1417
+ {
1418
+ "default": true,
1419
+ "name": "controls",
1420
+ "type": {
1421
+ "type": "bool"
1422
+ }
1423
+ },
1424
+ /** Start playing straight away. */
1425
+ {
1426
+ "default": false,
1427
+ "name": "autoplay",
1428
+ "type": {
1429
+ "type": "bool"
1430
+ }
1431
+ },
1432
+ /** Play again from the start when it ends. */
1433
+ {
1434
+ "default": false,
1435
+ "name": "loop",
1436
+ "type": {
1437
+ "type": "bool"
1438
+ }
1439
+ },
1440
+ /** Start muted. */
1441
+ {
1442
+ "default": false,
1443
+ "name": "muted",
1444
+ "type": {
1445
+ "type": "bool"
1446
+ }
1447
+ }
1448
+ ],
1449
+ "kind": "block",
1450
+ "name": "audio"
1451
+ }
1452
+ ],
1453
+ "queries": []
1454
+ };
1455
+ /** The `file` extension. */
1456
+ export const file = {
1457
+ "commands": [
1458
+ /** Insert a file attachment at the selection. */
1459
+ {
1460
+ "args": [
1461
+ /** Where the file can be downloaded. */
1462
+ {
1463
+ "name": "url",
1464
+ "type": {
1465
+ "type": "string"
1466
+ }
1467
+ },
1468
+ /** The file's name, such as `report.pdf`. */
1469
+ {
1470
+ "default": null,
1471
+ "name": "fileName",
1472
+ "type": {
1473
+ "of": {
1474
+ "type": "string"
1475
+ },
1476
+ "type": "nullable"
1477
+ }
1478
+ },
1479
+ /** The file's media type, such as `application/pdf`. */
1480
+ {
1481
+ "default": null,
1482
+ "name": "fileType",
1483
+ "type": {
1484
+ "of": {
1485
+ "type": "string"
1486
+ },
1487
+ "type": "nullable"
1488
+ }
1489
+ },
1490
+ /** The file's size in bytes. */
1491
+ {
1492
+ "default": 0,
1493
+ "name": "fileSize",
1494
+ "type": {
1495
+ "type": "float"
1496
+ }
1497
+ }
1498
+ ],
1499
+ "name": "insertFile"
1500
+ }
1501
+ ],
1502
+ "name": "file",
1503
+ "nodes": [
1504
+ {
1505
+ "attrs": [
1506
+ /** Where the file can be downloaded. */
1507
+ {
1508
+ "default": null,
1509
+ "name": "url",
1510
+ "type": {
1511
+ "of": {
1512
+ "type": "string"
1513
+ },
1514
+ "type": "nullable"
1515
+ }
1516
+ },
1517
+ /** The file's name, such as `report.pdf`. */
1518
+ {
1519
+ "default": null,
1520
+ "name": "fileName",
1521
+ "type": {
1522
+ "of": {
1523
+ "type": "string"
1524
+ },
1525
+ "type": "nullable"
1526
+ }
1527
+ },
1528
+ /** The file's media type, such as `application/pdf`. */
1529
+ {
1530
+ "default": null,
1531
+ "name": "fileType",
1532
+ "type": {
1533
+ "of": {
1534
+ "type": "string"
1535
+ },
1536
+ "type": "nullable"
1537
+ }
1538
+ },
1539
+ /** The file's size in bytes. */
1540
+ {
1541
+ "default": 0,
1542
+ "name": "fileSize",
1543
+ "type": {
1544
+ "type": "float"
1545
+ }
1546
+ }
1547
+ ],
1548
+ "kind": "block",
1549
+ "name": "file"
1550
+ }
1551
+ ],
1552
+ "queries": []
1553
+ };
1554
+ /** The `callout` extension. */
1555
+ export const callout = {
1556
+ "commands": [
1557
+ /** Wrap the selection in a callout, or lift it out of the callout around it. */
1558
+ {
1559
+ "args": [
1560
+ /** The callout type: info, warning, error, success, or blank. */
1561
+ {
1562
+ "default": "info",
1563
+ "name": "type",
1564
+ "type": {
1565
+ "enum": [
1566
+ "info",
1567
+ "warning",
1568
+ "error",
1569
+ "success",
1570
+ "blank"
1571
+ ],
1572
+ "type": "string"
1573
+ }
1574
+ }
1575
+ ],
1576
+ "name": "toggleCallout"
1577
+ },
1578
+ /** Change the type of the callout around the selection. */
1579
+ {
1580
+ "args": [
1581
+ /** The callout type: info, warning, error, success, or blank. */
1582
+ {
1583
+ "name": "type",
1584
+ "type": {
1585
+ "enum": [
1586
+ "info",
1587
+ "warning",
1588
+ "error",
1589
+ "success",
1590
+ "blank"
1591
+ ],
1592
+ "type": "string"
1593
+ }
1594
+ }
1595
+ ],
1596
+ "name": "setCalloutType"
1597
+ }
1598
+ ],
1599
+ "name": "callout",
1600
+ "nodes": [
1601
+ {
1602
+ "attrs": [
1603
+ /** The callout type: info, warning, error, success, or blank. */
1604
+ {
1605
+ "default": "info",
1606
+ "name": "type",
1607
+ "type": {
1608
+ "enum": [
1609
+ "info",
1610
+ "warning",
1611
+ "error",
1612
+ "success",
1613
+ "blank"
1614
+ ],
1615
+ "type": "string"
1616
+ }
1617
+ }
1618
+ ],
1619
+ "kind": "block",
1620
+ "name": "callout"
1621
+ }
1622
+ ],
1623
+ "queries": [
1624
+ /** The type of the callout around the selection, or null outside one. */
1625
+ {
1626
+ "args": [],
1627
+ "name": "calloutType",
1628
+ "returns": {
1629
+ "of": {
1630
+ "enum": [
1631
+ "info",
1632
+ "warning",
1633
+ "error",
1634
+ "success",
1635
+ "blank"
1636
+ ],
1637
+ "type": "string"
1638
+ },
1639
+ "type": "nullable"
1640
+ }
1641
+ }
1642
+ ]
1643
+ };
1644
+ /** The `mathematics` extension. */
1645
+ export const mathematics = {
1646
+ "commands": [
1647
+ /** Insert an inline formula at the selection. */
1648
+ {
1649
+ "args": [
1650
+ /** The formula, in LaTeX. */
1651
+ {
1652
+ "name": "latex",
1653
+ "type": {
1654
+ "type": "string"
1655
+ }
1656
+ }
1657
+ ],
1658
+ "name": "insertInlineMath"
1659
+ },
1660
+ /** Insert a block formula at the selection. */
1661
+ {
1662
+ "args": [
1663
+ /** The formula, in LaTeX. */
1664
+ {
1665
+ "name": "latex",
1666
+ "type": {
1667
+ "type": "string"
1668
+ }
1669
+ }
1670
+ ],
1671
+ "name": "insertBlockMath"
1672
+ }
1673
+ ],
1674
+ "name": "mathematics",
1675
+ "nodes": [
1676
+ {
1677
+ "attrs": [
1678
+ /** The formula, in LaTeX. */
1679
+ {
1680
+ "default": "",
1681
+ "name": "latex",
1682
+ "type": {
1683
+ "type": "string"
1684
+ }
1685
+ }
1686
+ ],
1687
+ "kind": "embed",
1688
+ "name": "inlineMath"
1689
+ },
1690
+ {
1691
+ "attrs": [
1692
+ /** The formula, in LaTeX. */
1693
+ {
1694
+ "default": "",
1695
+ "name": "latex",
1696
+ "type": {
1697
+ "type": "string"
1698
+ }
1699
+ }
1700
+ ],
1701
+ "kind": "block",
1702
+ "name": "blockMath"
1703
+ }
1704
+ ],
1705
+ "queries": []
1706
+ };
1707
+ /** The `findAndReplace` extension. */
1708
+ export const findAndReplace = {
1709
+ "commands": [
1710
+ /** Search for a term, or stop searching when it is empty. */
1711
+ {
1712
+ "args": [
1713
+ /** The text to find. */
1714
+ {
1715
+ "name": "term",
1716
+ "type": {
1717
+ "type": "string"
1718
+ }
1719
+ }
1720
+ ],
1721
+ "name": "setSearchTerm"
1722
+ },
1723
+ /** Match case exactly, or ignore it. */
1724
+ {
1725
+ "args": [
1726
+ /** Whether case must match. */
1727
+ {
1728
+ "name": "caseSensitive",
1729
+ "type": {
1730
+ "type": "bool"
1731
+ }
1732
+ }
1733
+ ],
1734
+ "name": "setCaseSensitive"
1735
+ },
1736
+ /** Select the next match after the selection, wrapping at the end. */
1737
+ {
1738
+ "args": [],
1739
+ "name": "nextSearchResult"
1740
+ },
1741
+ /** Select the previous match before the selection, wrapping at the start. */
1742
+ {
1743
+ "args": [],
1744
+ "name": "previousSearchResult"
1745
+ },
1746
+ /** Replace the selected match and select the next, or select the next match. */
1747
+ {
1748
+ "args": [
1749
+ /** The text to put in place of a match. */
1750
+ {
1751
+ "name": "replacement",
1752
+ "type": {
1753
+ "type": "string"
1754
+ }
1755
+ }
1756
+ ],
1757
+ "name": "replace"
1758
+ },
1759
+ /** Replace every match of the search term. */
1760
+ {
1761
+ "args": [
1762
+ /** The text to put in place of a match. */
1763
+ {
1764
+ "name": "replacement",
1765
+ "type": {
1766
+ "type": "string"
1767
+ }
1768
+ }
1769
+ ],
1770
+ "name": "replaceAll"
1771
+ }
1772
+ ],
1773
+ "name": "findAndReplace",
1774
+ "nodes": [],
1775
+ "queries": [
1776
+ /** The search term, how many matches it has, and which one is selected, or null when not searching. */
1777
+ {
1778
+ "args": [],
1779
+ "name": "searchResults",
1780
+ "returns": {
1781
+ "of": {
1782
+ "fields": [
1783
+ /** The search term. */
1784
+ {
1785
+ "name": "term",
1786
+ "type": {
1787
+ "type": "string"
1788
+ }
1789
+ },
1790
+ /** How many matches there are. */
1791
+ {
1792
+ "name": "count",
1793
+ "type": {
1794
+ "type": "int"
1795
+ }
1796
+ },
1797
+ /** The index of the selected match, or null. */
1798
+ {
1799
+ "name": "current",
1800
+ "type": {
1801
+ "of": {
1802
+ "type": "int"
1803
+ },
1804
+ "type": "nullable"
1805
+ }
1806
+ },
1807
+ /** Whether case must match. */
1808
+ {
1809
+ "name": "caseSensitive",
1810
+ "type": {
1811
+ "type": "bool"
1812
+ }
1813
+ }
1814
+ ],
1815
+ "type": "record"
1816
+ },
1817
+ "type": "nullable"
1818
+ }
1819
+ }
1820
+ ]
1821
+ };
1822
+ /** The `tableOfContents` extension. */
1823
+ export const tableOfContents = {
1824
+ "commands": [
1825
+ /** Put the caret at the start of a heading, by its place in the table of contents. */
1826
+ {
1827
+ "args": [
1828
+ /** The heading's place in the table of contents, from zero. */
1829
+ {
1830
+ "name": "index",
1831
+ "type": {
1832
+ "type": "int"
1833
+ }
1834
+ }
1835
+ ],
1836
+ "name": "goToHeading"
1837
+ }
1838
+ ],
1839
+ "name": "tableOfContents",
1840
+ "nodes": [],
1841
+ "queries": [
1842
+ /** The document's headings in order, with their levels, text, outline numbers, and which one the selection is under. */
1843
+ {
1844
+ "args": [],
1845
+ "name": "tableOfContents",
1846
+ "returns": {
1847
+ "of": {
1848
+ "fields": [
1849
+ /** The heading level, from 1. */
1850
+ {
1851
+ "name": "level",
1852
+ "type": {
1853
+ "type": "int"
1854
+ }
1855
+ },
1856
+ /** The heading's text. */
1857
+ {
1858
+ "name": "text",
1859
+ "type": {
1860
+ "type": "string"
1861
+ }
1862
+ },
1863
+ /** Its outline number, such as `2.1`. */
1864
+ {
1865
+ "name": "number",
1866
+ "type": {
1867
+ "type": "string"
1868
+ }
1869
+ },
1870
+ /** Whether the selection is under it. */
1871
+ {
1872
+ "name": "active",
1873
+ "type": {
1874
+ "type": "bool"
1875
+ }
1876
+ }
1877
+ ],
1878
+ "type": "record"
1879
+ },
1880
+ "type": "list"
1881
+ }
1882
+ }
1883
+ ]
1884
+ };
1885
+ /** The `comments` extension. */
1886
+ export const comments = {
1887
+ "commands": [
1888
+ /** Add a thread to the selected text. */
1889
+ {
1890
+ "args": [
1891
+ /** The thread's id, from the host. */
1892
+ {
1893
+ "name": "threadId",
1894
+ "type": {
1895
+ "type": "string"
1896
+ }
1897
+ }
1898
+ ],
1899
+ "name": "setComment"
1900
+ },
1901
+ /** Remove a thread from the whole document. */
1902
+ {
1903
+ "args": [
1904
+ /** The thread's id, from the host. */
1905
+ {
1906
+ "name": "threadId",
1907
+ "type": {
1908
+ "type": "string"
1909
+ }
1910
+ }
1911
+ ],
1912
+ "name": "unsetComment"
1913
+ }
1914
+ ],
1915
+ "name": "comments",
1916
+ "nodes": [
1917
+ {
1918
+ "attrs": [
1919
+ /** The ids of the threads on this text. */
1920
+ {
1921
+ "default": [],
1922
+ "name": "threads",
1923
+ "type": {
1924
+ "of": {
1925
+ "type": "string"
1926
+ },
1927
+ "type": "list"
1928
+ }
1929
+ }
1930
+ ],
1931
+ "kind": "mark",
1932
+ "name": "comment"
1933
+ }
1934
+ ],
1935
+ "queries": [
1936
+ /** The threads on the text at the selection head. */
1937
+ {
1938
+ "args": [],
1939
+ "name": "activeComments",
1940
+ "returns": {
1941
+ "of": {
1942
+ "type": "string"
1943
+ },
1944
+ "type": "list"
1945
+ }
1946
+ },
1947
+ /** Every thread in the document, in the order it first appears, with the text it covers. */
1948
+ {
1949
+ "args": [],
1950
+ "name": "comments",
1951
+ "returns": {
1952
+ "of": {
1953
+ "fields": [
1954
+ /** The thread's id. */
1955
+ {
1956
+ "name": "threadId",
1957
+ "type": {
1958
+ "type": "string"
1959
+ }
1960
+ },
1961
+ /** The text it covers. */
1962
+ {
1963
+ "name": "text",
1964
+ "type": {
1965
+ "type": "string"
1966
+ }
1967
+ }
1968
+ ],
1969
+ "type": "record"
1970
+ },
1971
+ "type": "list"
1972
+ }
1973
+ }
1974
+ ]
1975
+ };
1976
+ /** The `dragHandle` extension. */
1977
+ export const dragHandle = {
1978
+ "commands": [
1979
+ /** Move the selected blocks up past their previous sibling. */
1980
+ {
1981
+ "args": [],
1982
+ "name": "moveBlockUp"
1983
+ },
1984
+ /** Move the selected blocks down past their next sibling. */
1985
+ {
1986
+ "args": [],
1987
+ "name": "moveBlockDown"
1988
+ },
1989
+ /** Move the selected blocks to just before a sibling, by its index, as a drop does. */
1990
+ {
1991
+ "args": [
1992
+ /** The sibling to move before, from zero; past the last moves to the end. */
1993
+ {
1994
+ "name": "index",
1995
+ "type": {
1996
+ "type": "int"
1997
+ }
1998
+ }
1999
+ ],
2000
+ "name": "moveBlocksTo"
2001
+ }
2002
+ ],
2003
+ "name": "dragHandle",
2004
+ "nodes": [],
2005
+ "queries": []
2006
+ };
2007
+ /** The `clearFormatting` extension. */
2008
+ export const clearFormatting = {
2009
+ "commands": [
2010
+ /** Remove every mark from the selection. */
2011
+ {
2012
+ "args": [],
2013
+ "name": "unsetAllMarks"
2014
+ },
2015
+ /** Turn the selected blocks into plain paragraphs, out of quotes and lists. */
2016
+ {
2017
+ "args": [],
2018
+ "name": "clearNodes"
2019
+ },
2020
+ /** Remove every mark and turn the selected blocks into plain paragraphs. */
2021
+ {
2022
+ "args": [],
2023
+ "name": "clearFormatting"
2024
+ }
2025
+ ],
2026
+ "name": "clearFormatting",
2027
+ "nodes": [],
2028
+ "queries": []
2029
+ };
2030
+ /** The `ink` extension. */
2031
+ export const ink = {
2032
+ "commands": [
2033
+ /** Insert an empty drawing at the selection. */
2034
+ {
2035
+ "args": [
2036
+ /** The height in drawing units, from 1 to 4000. */
2037
+ {
2038
+ "default": 400,
2039
+ "name": "height",
2040
+ "type": {
2041
+ "type": "int"
2042
+ }
2043
+ }
2044
+ ],
2045
+ "name": "insertInk"
2046
+ },
2047
+ /** Add a stroke to a drawing. */
2048
+ {
2049
+ "args": [
2050
+ /** Which drawing, by its place in `inks`, from zero. */
2051
+ {
2052
+ "name": "ink",
2053
+ "type": {
2054
+ "type": "int"
2055
+ }
2056
+ },
2057
+ /** `x, y` pairs in drawing units. */
2058
+ {
2059
+ "name": "points",
2060
+ "type": {
2061
+ "of": {
2062
+ "type": "float"
2063
+ },
2064
+ "type": "list"
2065
+ }
2066
+ },
2067
+ /** A `#rrggbb` colour, or null for the text colour. */
2068
+ {
2069
+ "default": null,
2070
+ "name": "color",
2071
+ "type": {
2072
+ "of": {
2073
+ "type": "string"
2074
+ },
2075
+ "type": "nullable"
2076
+ }
2077
+ },
2078
+ /** The width in drawing units, or null for the theme's. */
2079
+ {
2080
+ "default": null,
2081
+ "name": "width",
2082
+ "type": {
2083
+ "of": {
2084
+ "type": "float"
2085
+ },
2086
+ "type": "nullable"
2087
+ }
2088
+ }
2089
+ ],
2090
+ "name": "addInkStroke"
2091
+ },
2092
+ /** Remove the last stroke of a drawing. */
2093
+ {
2094
+ "args": [
2095
+ /** Which drawing, by its place in `inks`, from zero. */
2096
+ {
2097
+ "name": "ink",
2098
+ "type": {
2099
+ "type": "int"
2100
+ }
2101
+ }
2102
+ ],
2103
+ "name": "undoInkStroke"
2104
+ },
2105
+ /** Remove every stroke of a drawing. */
2106
+ {
2107
+ "args": [
2108
+ /** Which drawing, by its place in `inks`, from zero. */
2109
+ {
2110
+ "name": "ink",
2111
+ "type": {
2112
+ "type": "int"
2113
+ }
2114
+ }
2115
+ ],
2116
+ "name": "clearInk"
2117
+ }
2118
+ ],
2119
+ "name": "ink",
2120
+ "nodes": [
2121
+ {
2122
+ "attrs": [
2123
+ /** The height in drawing units; the width is always 1000. */
2124
+ {
2125
+ "default": 400,
2126
+ "name": "height",
2127
+ "type": {
2128
+ "type": "int"
2129
+ }
2130
+ },
2131
+ /** The strokes, oldest first. */
2132
+ {
2133
+ "default": [],
2134
+ "name": "strokes",
2135
+ "type": {
2136
+ "of": {
2137
+ "fields": [
2138
+ /** `x, y` pairs in drawing units. */
2139
+ {
2140
+ "name": "points",
2141
+ "type": {
2142
+ "of": {
2143
+ "type": "float"
2144
+ },
2145
+ "type": "list"
2146
+ }
2147
+ },
2148
+ /** A `#rrggbb` colour, or null for the text colour. */
2149
+ {
2150
+ "default": null,
2151
+ "name": "color",
2152
+ "type": {
2153
+ "of": {
2154
+ "type": "string"
2155
+ },
2156
+ "type": "nullable"
2157
+ }
2158
+ },
2159
+ /** The width in drawing units, or null for the theme's. */
2160
+ {
2161
+ "default": null,
2162
+ "name": "width",
2163
+ "type": {
2164
+ "of": {
2165
+ "type": "float"
2166
+ },
2167
+ "type": "nullable"
2168
+ }
2169
+ }
2170
+ ],
2171
+ "type": "record"
2172
+ },
2173
+ "type": "list"
2174
+ }
2175
+ }
2176
+ ],
2177
+ "kind": "block",
2178
+ "name": "ink"
2179
+ }
2180
+ ],
2181
+ "queries": [
2182
+ /** Every drawing in the document, in order, with its height and how many strokes it has. */
2183
+ {
2184
+ "args": [],
2185
+ "name": "inks",
2186
+ "returns": {
2187
+ "of": {
2188
+ "fields": [
2189
+ /** The height in drawing units. */
2190
+ {
2191
+ "name": "height",
2192
+ "type": {
2193
+ "type": "int"
2194
+ }
2195
+ },
2196
+ /** How many strokes it has. */
2197
+ {
2198
+ "name": "strokes",
2199
+ "type": {
2200
+ "type": "int"
2201
+ }
2202
+ }
2203
+ ],
2204
+ "type": "record"
2205
+ },
2206
+ "type": "list"
2207
+ }
2208
+ }
2209
+ ]
2210
+ };
2211
+ /** The `kinetic` extension. */
2212
+ export const kinetic = {
2213
+ "commands": [
2214
+ /** Make the selection move. */
2215
+ {
2216
+ "args": [
2217
+ /** How the text moves: wave, shake, pulse, or rainbow. */
2218
+ {
2219
+ "default": "wave",
2220
+ "name": "effect",
2221
+ "type": {
2222
+ "enum": [
2223
+ "wave",
2224
+ "shake",
2225
+ "pulse",
2226
+ "rainbow"
2227
+ ],
2228
+ "type": "string"
2229
+ }
2230
+ }
2231
+ ],
2232
+ "name": "setKinetic"
2233
+ },
2234
+ /** Make the selection move, or still when it already does. */
2235
+ {
2236
+ "args": [
2237
+ /** How the text moves: wave, shake, pulse, or rainbow. */
2238
+ {
2239
+ "default": "wave",
2240
+ "name": "effect",
2241
+ "type": {
2242
+ "enum": [
2243
+ "wave",
2244
+ "shake",
2245
+ "pulse",
2246
+ "rainbow"
2247
+ ],
2248
+ "type": "string"
2249
+ }
2250
+ }
2251
+ ],
2252
+ "name": "toggleKinetic"
2253
+ },
2254
+ /** Make the selection still. */
2255
+ {
2256
+ "args": [],
2257
+ "name": "unsetKinetic"
2258
+ }
2259
+ ],
2260
+ "name": "kinetic",
2261
+ "nodes": [
2262
+ {
2263
+ "attrs": [
2264
+ /** How the text moves: wave, shake, pulse, or rainbow. */
2265
+ {
2266
+ "default": "wave",
2267
+ "name": "effect",
2268
+ "type": {
2269
+ "enum": [
2270
+ "wave",
2271
+ "shake",
2272
+ "pulse",
2273
+ "rainbow"
2274
+ ],
2275
+ "type": "string"
2276
+ }
2277
+ }
2278
+ ],
2279
+ "kind": "mark",
2280
+ "name": "kinetic"
2281
+ }
2282
+ ],
2283
+ "queries": [
2284
+ /** How the text at the selection moves, or null when it is still. */
2285
+ {
2286
+ "args": [],
2287
+ "name": "kineticEffect",
2288
+ "returns": {
2289
+ "of": {
2290
+ "enum": [
2291
+ "wave",
2292
+ "shake",
2293
+ "pulse",
2294
+ "rainbow"
2295
+ ],
2296
+ "type": "string"
2297
+ },
2298
+ "type": "nullable"
2299
+ }
2300
+ }
2301
+ ]
2302
+ };
2303
+ /** The `typography` extension. */
2304
+ export const typography = {
2305
+ "commands": [],
2306
+ "name": "typography",
2307
+ "nodes": [],
2308
+ "queries": []
2309
+ };
2310
+ /** The `table` extension. */
2311
+ export const table = {
2312
+ "commands": [
2313
+ /** Insert a table of empty cells at the selection, with the caret in the first cell. */
2314
+ {
2315
+ "args": [
2316
+ /** How many rows, from 1 to 1000. */
2317
+ {
2318
+ "default": 3,
2319
+ "name": "rows",
2320
+ "type": {
2321
+ "type": "int"
2322
+ }
2323
+ },
2324
+ /** How many columns, from 1 to 1000. */
2325
+ {
2326
+ "default": 3,
2327
+ "name": "cols",
2328
+ "type": {
2329
+ "type": "int"
2330
+ }
2331
+ },
2332
+ /** Whether the first row is header cells. */
2333
+ {
2334
+ "default": true,
2335
+ "name": "withHeaderRow",
2336
+ "type": {
2337
+ "type": "bool"
2338
+ }
2339
+ }
2340
+ ],
2341
+ "name": "insertTable"
2342
+ },
2343
+ /** Add a column left of the selected cells. */
2344
+ {
2345
+ "args": [],
2346
+ "name": "addColumnBefore"
2347
+ },
2348
+ /** Add a column right of the selected cells. */
2349
+ {
2350
+ "args": [],
2351
+ "name": "addColumnAfter"
2352
+ },
2353
+ /** Delete the selected columns. */
2354
+ {
2355
+ "args": [],
2356
+ "name": "deleteColumn"
2357
+ },
2358
+ /** Add a row above the selected cells. */
2359
+ {
2360
+ "args": [],
2361
+ "name": "addRowBefore"
2362
+ },
2363
+ /** Add a row below the selected cells. */
2364
+ {
2365
+ "args": [],
2366
+ "name": "addRowAfter"
2367
+ },
2368
+ /** Delete the selected rows. */
2369
+ {
2370
+ "args": [],
2371
+ "name": "deleteRow"
2372
+ },
2373
+ /** Delete the table around the selection. */
2374
+ {
2375
+ "args": [],
2376
+ "name": "deleteTable"
2377
+ },
2378
+ /** Merge the selected cells into one. */
2379
+ {
2380
+ "args": [],
2381
+ "name": "mergeCells"
2382
+ },
2383
+ /** Split the merged cell holding the selection. */
2384
+ {
2385
+ "args": [],
2386
+ "name": "splitCell"
2387
+ },
2388
+ /** Merge the selected cells, or split the merged cell holding the caret. */
2389
+ {
2390
+ "args": [],
2391
+ "name": "mergeOrSplit"
2392
+ },
2393
+ /** Toggle header cells for the first row. */
2394
+ {
2395
+ "args": [],
2396
+ "name": "toggleHeaderRow"
2397
+ },
2398
+ /** Toggle header cells for the first column. */
2399
+ {
2400
+ "args": [],
2401
+ "name": "toggleHeaderColumn"
2402
+ },
2403
+ /** Toggle header cells for the selected cells. */
2404
+ {
2405
+ "args": [],
2406
+ "name": "toggleHeaderCell"
2407
+ },
2408
+ /** Set an attribute of the selected cells, or remove it when the value is null. */
2409
+ {
2410
+ "args": [
2411
+ /** The attribute, such as `backgroundColor`. */
2412
+ {
2413
+ "name": "name",
2414
+ "type": {
2415
+ "type": "string"
2416
+ }
2417
+ },
2418
+ /** Its value, or null to remove it. */
2419
+ {
2420
+ "name": "value",
2421
+ "type": {
2422
+ "of": {
2423
+ "type": "string"
2424
+ },
2425
+ "type": "nullable"
2426
+ }
2427
+ }
2428
+ ],
2429
+ "name": "setCellAttribute"
2430
+ },
2431
+ /** Select the next cell's content. */
2432
+ {
2433
+ "args": [],
2434
+ "name": "goToNextCell"
2435
+ },
2436
+ /** Select the previous cell's content. */
2437
+ {
2438
+ "args": [],
2439
+ "name": "goToPreviousCell"
2440
+ },
2441
+ /** Give every short row of every table empty cells up to its width. */
2442
+ {
2443
+ "args": [],
2444
+ "name": "fixTables"
2445
+ }
2446
+ ],
2447
+ "name": "table",
2448
+ "nodes": [
2449
+ {
2450
+ "attrs": [],
2451
+ "kind": "block",
2452
+ "name": "table"
2453
+ },
2454
+ {
2455
+ "attrs": [],
2456
+ "kind": "block",
2457
+ "name": "tableRow"
2458
+ },
2459
+ {
2460
+ "attrs": [
2461
+ /** How many columns the cell spans. */
2462
+ {
2463
+ "default": 1,
2464
+ "name": "colspan",
2465
+ "type": {
2466
+ "type": "int"
2467
+ }
2468
+ },
2469
+ /** How many rows the cell spans. */
2470
+ {
2471
+ "default": 1,
2472
+ "name": "rowspan",
2473
+ "type": {
2474
+ "type": "int"
2475
+ }
2476
+ },
2477
+ /** The width in pixels the cell gives each column it spans, or 0 for none. */
2478
+ {
2479
+ "default": null,
2480
+ "name": "colwidth",
2481
+ "type": {
2482
+ "of": {
2483
+ "of": {
2484
+ "type": "int"
2485
+ },
2486
+ "type": "list"
2487
+ },
2488
+ "type": "nullable"
2489
+ }
2490
+ }
2491
+ ],
2492
+ "kind": "block",
2493
+ "name": "tableCell"
2494
+ },
2495
+ {
2496
+ "attrs": [
2497
+ /** How many columns the cell spans. */
2498
+ {
2499
+ "default": 1,
2500
+ "name": "colspan",
2501
+ "type": {
2502
+ "type": "int"
2503
+ }
2504
+ },
2505
+ /** How many rows the cell spans. */
2506
+ {
2507
+ "default": 1,
2508
+ "name": "rowspan",
2509
+ "type": {
2510
+ "type": "int"
2511
+ }
2512
+ },
2513
+ /** The width in pixels the cell gives each column it spans, or 0 for none. */
2514
+ {
2515
+ "default": null,
2516
+ "name": "colwidth",
2517
+ "type": {
2518
+ "of": {
2519
+ "of": {
2520
+ "type": "int"
2521
+ },
2522
+ "type": "list"
2523
+ },
2524
+ "type": "nullable"
2525
+ }
2526
+ }
2527
+ ],
2528
+ "kind": "block",
2529
+ "name": "tableHeader"
2530
+ }
2531
+ ],
2532
+ "queries": [
2533
+ /** Where the selection head sits in its table, or null outside one. */
2534
+ {
2535
+ "args": [],
2536
+ "name": "tableCell",
2537
+ "returns": {
2538
+ "of": {
2539
+ "fields": [
2540
+ /** The cell's top row, from zero. */
2541
+ {
2542
+ "name": "row",
2543
+ "type": {
2544
+ "type": "int"
2545
+ }
2546
+ },
2547
+ /** The cell's leftmost column, from zero. */
2548
+ {
2549
+ "name": "column",
2550
+ "type": {
2551
+ "type": "int"
2552
+ }
2553
+ },
2554
+ /** How many rows it spans. */
2555
+ {
2556
+ "name": "rowspan",
2557
+ "type": {
2558
+ "type": "int"
2559
+ }
2560
+ },
2561
+ /** How many columns it spans. */
2562
+ {
2563
+ "name": "colspan",
2564
+ "type": {
2565
+ "type": "int"
2566
+ }
2567
+ },
2568
+ /** Whether it is a header cell. */
2569
+ {
2570
+ "name": "header",
2571
+ "type": {
2572
+ "type": "bool"
2573
+ }
2574
+ },
2575
+ /** How many rows its table has. */
2576
+ {
2577
+ "name": "rows",
2578
+ "type": {
2579
+ "type": "int"
2580
+ }
2581
+ },
2582
+ /** How many columns its table has. */
2583
+ {
2584
+ "name": "columns",
2585
+ "type": {
2586
+ "type": "int"
2587
+ }
2588
+ }
2589
+ ],
2590
+ "type": "record"
2591
+ },
2592
+ "type": "nullable"
2593
+ }
2594
+ }
2595
+ ]
2596
+ };
2597
+ /** Every extension beyond the StarterKit, which `@canvist/headless/full` compiles in. */
2598
+ export const extras = [textStyle, mention, details, subscript, superscript, highlight, color, backgroundColor, fontFamily, fontSize, lineHeight, textAlign, characterCount, placeholder, hashtag, emoji, image, youtube, twitch, audio, file, callout, mathematics, findAndReplace, tableOfContents, comments, dragHandle, clearFormatting, ink, kinetic, typography, table];
2599
+ /** Every optional extension canvist ships, the StarterKit's included. */
2600
+ export const allExtensions = [...starterKit, ...extras];