@supatype/common 0.3.6 → 0.8.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 (48) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/.turbo/turbo-test.log +14 -0
  3. package/.turbo/turbo-typecheck.log +2 -2
  4. package/LICENSE +1 -1
  5. package/dist/analytics.d.ts.map +1 -1
  6. package/dist/analytics.js.map +1 -1
  7. package/dist/auth.d.ts.map +1 -1
  8. package/dist/auth.js +11 -1
  9. package/dist/auth.js.map +1 -1
  10. package/dist/build-env.d.ts +7 -0
  11. package/dist/build-env.d.ts.map +1 -0
  12. package/dist/build-env.js +17 -0
  13. package/dist/build-env.js.map +1 -0
  14. package/dist/config.d.ts.map +1 -1
  15. package/dist/config.js +2 -6
  16. package/dist/config.js.map +1 -1
  17. package/dist/content.d.ts.map +1 -1
  18. package/dist/content.js +2 -6
  19. package/dist/content.js.map +1 -1
  20. package/dist/index.d.ts +1 -1
  21. package/dist/index.d.ts.map +1 -1
  22. package/dist/index.js +1 -1
  23. package/dist/index.js.map +1 -1
  24. package/dist/richtext-tree.d.ts +55 -0
  25. package/dist/richtext-tree.d.ts.map +1 -0
  26. package/dist/richtext-tree.js +208 -0
  27. package/dist/richtext-tree.js.map +1 -0
  28. package/dist/richtext.d.ts +8 -67
  29. package/dist/richtext.d.ts.map +1 -1
  30. package/dist/richtext.js +59 -80
  31. package/dist/richtext.js.map +1 -1
  32. package/package.json +8 -4
  33. package/src/analytics.ts +3 -2
  34. package/src/auth.ts +10 -1
  35. package/src/build-env.ts +16 -0
  36. package/src/config.ts +3 -5
  37. package/src/content.ts +2 -5
  38. package/src/index.ts +1 -1
  39. package/src/posthog-js.d.ts +1 -1
  40. package/src/richtext-tree.ts +274 -0
  41. package/src/richtext.ts +67 -112
  42. package/tests/fixtures/lexical-code-block.json +92 -0
  43. package/tests/fixtures/lexical-documents.json +1345 -0
  44. package/tests/richtext-cases.ts +154 -0
  45. package/tests/richtext.test.ts +73 -0
  46. package/tests/tsconfig.json +10 -0
  47. package/tsconfig.json +3 -2
  48. package/tsconfig.tsbuildinfo +1 -1
@@ -0,0 +1,1345 @@
1
+ {
2
+ "formats": {
3
+ "root": {
4
+ "children": [
5
+ {
6
+ "children": [
7
+ {
8
+ "detail": 0,
9
+ "format": 1,
10
+ "mode": "normal",
11
+ "style": "",
12
+ "text": "bold",
13
+ "type": "text",
14
+ "version": 1
15
+ },
16
+ {
17
+ "detail": 0,
18
+ "format": 2,
19
+ "mode": "normal",
20
+ "style": "",
21
+ "text": "italic",
22
+ "type": "text",
23
+ "version": 1
24
+ },
25
+ {
26
+ "detail": 0,
27
+ "format": 4,
28
+ "mode": "normal",
29
+ "style": "",
30
+ "text": "strikethrough",
31
+ "type": "text",
32
+ "version": 1
33
+ },
34
+ {
35
+ "detail": 0,
36
+ "format": 8,
37
+ "mode": "normal",
38
+ "style": "",
39
+ "text": "underline",
40
+ "type": "text",
41
+ "version": 1
42
+ },
43
+ {
44
+ "detail": 0,
45
+ "format": 16,
46
+ "mode": "normal",
47
+ "style": "",
48
+ "text": "code",
49
+ "type": "text",
50
+ "version": 1
51
+ },
52
+ {
53
+ "detail": 0,
54
+ "format": 32,
55
+ "mode": "normal",
56
+ "style": "",
57
+ "text": "subscript",
58
+ "type": "text",
59
+ "version": 1
60
+ },
61
+ {
62
+ "detail": 0,
63
+ "format": 64,
64
+ "mode": "normal",
65
+ "style": "",
66
+ "text": "superscript",
67
+ "type": "text",
68
+ "version": 1
69
+ },
70
+ {
71
+ "detail": 0,
72
+ "format": 128,
73
+ "mode": "normal",
74
+ "style": "",
75
+ "text": "highlight",
76
+ "type": "text",
77
+ "version": 1
78
+ },
79
+ {
80
+ "detail": 0,
81
+ "format": 256,
82
+ "mode": "normal",
83
+ "style": "",
84
+ "text": "lowercase",
85
+ "type": "text",
86
+ "version": 1
87
+ },
88
+ {
89
+ "detail": 0,
90
+ "format": 512,
91
+ "mode": "normal",
92
+ "style": "",
93
+ "text": "uppercase",
94
+ "type": "text",
95
+ "version": 1
96
+ },
97
+ {
98
+ "detail": 0,
99
+ "format": 1024,
100
+ "mode": "normal",
101
+ "style": "",
102
+ "text": "capitalize",
103
+ "type": "text",
104
+ "version": 1
105
+ }
106
+ ],
107
+ "direction": null,
108
+ "format": "",
109
+ "indent": 0,
110
+ "type": "paragraph",
111
+ "version": 1,
112
+ "textFormat": 1,
113
+ "textStyle": ""
114
+ }
115
+ ],
116
+ "direction": null,
117
+ "format": "",
118
+ "indent": 0,
119
+ "type": "root",
120
+ "version": 1
121
+ }
122
+ },
123
+ "formatCombinations": {
124
+ "root": {
125
+ "children": [
126
+ {
127
+ "children": [
128
+ {
129
+ "detail": 0,
130
+ "format": 3,
131
+ "mode": "normal",
132
+ "style": "",
133
+ "text": "bold italic",
134
+ "type": "text",
135
+ "version": 1
136
+ },
137
+ {
138
+ "detail": 0,
139
+ "format": 17,
140
+ "mode": "normal",
141
+ "style": "",
142
+ "text": "bold code",
143
+ "type": "text",
144
+ "version": 1
145
+ },
146
+ {
147
+ "detail": 0,
148
+ "format": 12,
149
+ "mode": "normal",
150
+ "style": "",
151
+ "text": "underline strikethrough",
152
+ "type": "text",
153
+ "version": 1
154
+ },
155
+ {
156
+ "detail": 0,
157
+ "format": 159,
158
+ "mode": "normal",
159
+ "style": "",
160
+ "text": "everything",
161
+ "type": "text",
162
+ "version": 1
163
+ },
164
+ {
165
+ "detail": 0,
166
+ "format": 64,
167
+ "mode": "normal",
168
+ "style": "",
169
+ "text": "sub and sup",
170
+ "type": "text",
171
+ "version": 1
172
+ }
173
+ ],
174
+ "direction": null,
175
+ "format": "",
176
+ "indent": 0,
177
+ "type": "paragraph",
178
+ "version": 1,
179
+ "textFormat": 3,
180
+ "textStyle": ""
181
+ }
182
+ ],
183
+ "direction": null,
184
+ "format": "",
185
+ "indent": 0,
186
+ "type": "root",
187
+ "version": 1
188
+ }
189
+ },
190
+ "headings": {
191
+ "root": {
192
+ "children": [
193
+ {
194
+ "children": [
195
+ {
196
+ "detail": 0,
197
+ "format": 0,
198
+ "mode": "normal",
199
+ "style": "",
200
+ "text": "Heading h1",
201
+ "type": "text",
202
+ "version": 1
203
+ }
204
+ ],
205
+ "direction": null,
206
+ "format": "",
207
+ "indent": 0,
208
+ "type": "heading",
209
+ "version": 1,
210
+ "tag": "h1"
211
+ },
212
+ {
213
+ "children": [
214
+ {
215
+ "detail": 0,
216
+ "format": 0,
217
+ "mode": "normal",
218
+ "style": "",
219
+ "text": "Heading h2",
220
+ "type": "text",
221
+ "version": 1
222
+ }
223
+ ],
224
+ "direction": null,
225
+ "format": "",
226
+ "indent": 0,
227
+ "type": "heading",
228
+ "version": 1,
229
+ "tag": "h2"
230
+ },
231
+ {
232
+ "children": [
233
+ {
234
+ "detail": 0,
235
+ "format": 0,
236
+ "mode": "normal",
237
+ "style": "",
238
+ "text": "Heading h3",
239
+ "type": "text",
240
+ "version": 1
241
+ }
242
+ ],
243
+ "direction": null,
244
+ "format": "",
245
+ "indent": 0,
246
+ "type": "heading",
247
+ "version": 1,
248
+ "tag": "h3"
249
+ },
250
+ {
251
+ "children": [
252
+ {
253
+ "detail": 0,
254
+ "format": 0,
255
+ "mode": "normal",
256
+ "style": "",
257
+ "text": "Heading h4",
258
+ "type": "text",
259
+ "version": 1
260
+ }
261
+ ],
262
+ "direction": null,
263
+ "format": "",
264
+ "indent": 0,
265
+ "type": "heading",
266
+ "version": 1,
267
+ "tag": "h4"
268
+ },
269
+ {
270
+ "children": [
271
+ {
272
+ "detail": 0,
273
+ "format": 0,
274
+ "mode": "normal",
275
+ "style": "",
276
+ "text": "Heading h5",
277
+ "type": "text",
278
+ "version": 1
279
+ }
280
+ ],
281
+ "direction": null,
282
+ "format": "",
283
+ "indent": 0,
284
+ "type": "heading",
285
+ "version": 1,
286
+ "tag": "h5"
287
+ },
288
+ {
289
+ "children": [
290
+ {
291
+ "detail": 0,
292
+ "format": 0,
293
+ "mode": "normal",
294
+ "style": "",
295
+ "text": "Heading h6",
296
+ "type": "text",
297
+ "version": 1
298
+ }
299
+ ],
300
+ "direction": null,
301
+ "format": "",
302
+ "indent": 0,
303
+ "type": "heading",
304
+ "version": 1,
305
+ "tag": "h6"
306
+ }
307
+ ],
308
+ "direction": null,
309
+ "format": "",
310
+ "indent": 0,
311
+ "type": "root",
312
+ "version": 1
313
+ }
314
+ },
315
+ "blockAttributes": {
316
+ "root": {
317
+ "children": [
318
+ {
319
+ "children": [
320
+ {
321
+ "detail": 0,
322
+ "format": 0,
323
+ "mode": "normal",
324
+ "style": "",
325
+ "text": "left",
326
+ "type": "text",
327
+ "version": 1
328
+ }
329
+ ],
330
+ "direction": null,
331
+ "format": "left",
332
+ "indent": 0,
333
+ "type": "paragraph",
334
+ "version": 1,
335
+ "textFormat": 0,
336
+ "textStyle": ""
337
+ },
338
+ {
339
+ "children": [
340
+ {
341
+ "detail": 0,
342
+ "format": 0,
343
+ "mode": "normal",
344
+ "style": "",
345
+ "text": "center",
346
+ "type": "text",
347
+ "version": 1
348
+ }
349
+ ],
350
+ "direction": null,
351
+ "format": "center",
352
+ "indent": 0,
353
+ "type": "paragraph",
354
+ "version": 1,
355
+ "textFormat": 0,
356
+ "textStyle": ""
357
+ },
358
+ {
359
+ "children": [
360
+ {
361
+ "detail": 0,
362
+ "format": 0,
363
+ "mode": "normal",
364
+ "style": "",
365
+ "text": "right",
366
+ "type": "text",
367
+ "version": 1
368
+ }
369
+ ],
370
+ "direction": null,
371
+ "format": "right",
372
+ "indent": 0,
373
+ "type": "paragraph",
374
+ "version": 1,
375
+ "textFormat": 0,
376
+ "textStyle": ""
377
+ },
378
+ {
379
+ "children": [
380
+ {
381
+ "detail": 0,
382
+ "format": 0,
383
+ "mode": "normal",
384
+ "style": "",
385
+ "text": "justify",
386
+ "type": "text",
387
+ "version": 1
388
+ }
389
+ ],
390
+ "direction": null,
391
+ "format": "justify",
392
+ "indent": 0,
393
+ "type": "paragraph",
394
+ "version": 1,
395
+ "textFormat": 0,
396
+ "textStyle": ""
397
+ },
398
+ {
399
+ "children": [
400
+ {
401
+ "detail": 0,
402
+ "format": 0,
403
+ "mode": "normal",
404
+ "style": "",
405
+ "text": "start",
406
+ "type": "text",
407
+ "version": 1
408
+ }
409
+ ],
410
+ "direction": null,
411
+ "format": "start",
412
+ "indent": 0,
413
+ "type": "paragraph",
414
+ "version": 1,
415
+ "textFormat": 0,
416
+ "textStyle": ""
417
+ },
418
+ {
419
+ "children": [
420
+ {
421
+ "detail": 0,
422
+ "format": 0,
423
+ "mode": "normal",
424
+ "style": "",
425
+ "text": "end",
426
+ "type": "text",
427
+ "version": 1
428
+ }
429
+ ],
430
+ "direction": null,
431
+ "format": "end",
432
+ "indent": 0,
433
+ "type": "paragraph",
434
+ "version": 1,
435
+ "textFormat": 0,
436
+ "textStyle": ""
437
+ },
438
+ {
439
+ "children": [
440
+ {
441
+ "detail": 0,
442
+ "format": 0,
443
+ "mode": "normal",
444
+ "style": "",
445
+ "text": "indented twice",
446
+ "type": "text",
447
+ "version": 1
448
+ }
449
+ ],
450
+ "direction": null,
451
+ "format": "",
452
+ "indent": 2,
453
+ "type": "paragraph",
454
+ "version": 1,
455
+ "textFormat": 0,
456
+ "textStyle": ""
457
+ }
458
+ ],
459
+ "direction": null,
460
+ "format": "",
461
+ "indent": 0,
462
+ "type": "root",
463
+ "version": 1
464
+ }
465
+ },
466
+ "quote": {
467
+ "root": {
468
+ "children": [
469
+ {
470
+ "children": [
471
+ {
472
+ "detail": 0,
473
+ "format": 0,
474
+ "mode": "normal",
475
+ "style": "",
476
+ "text": "Quoted ",
477
+ "type": "text",
478
+ "version": 1
479
+ },
480
+ {
481
+ "detail": 0,
482
+ "format": 2,
483
+ "mode": "normal",
484
+ "style": "",
485
+ "text": "words",
486
+ "type": "text",
487
+ "version": 1
488
+ }
489
+ ],
490
+ "direction": null,
491
+ "format": "",
492
+ "indent": 0,
493
+ "type": "quote",
494
+ "version": 1
495
+ }
496
+ ],
497
+ "direction": null,
498
+ "format": "",
499
+ "indent": 0,
500
+ "type": "root",
501
+ "version": 1
502
+ }
503
+ },
504
+ "lists": {
505
+ "root": {
506
+ "children": [
507
+ {
508
+ "children": [
509
+ {
510
+ "children": [
511
+ {
512
+ "detail": 0,
513
+ "format": 0,
514
+ "mode": "normal",
515
+ "style": "",
516
+ "text": "apple",
517
+ "type": "text",
518
+ "version": 1
519
+ }
520
+ ],
521
+ "direction": null,
522
+ "format": "",
523
+ "indent": 0,
524
+ "type": "listitem",
525
+ "version": 1,
526
+ "value": 1
527
+ },
528
+ {
529
+ "children": [
530
+ {
531
+ "detail": 0,
532
+ "format": 1,
533
+ "mode": "normal",
534
+ "style": "",
535
+ "text": "pear",
536
+ "type": "text",
537
+ "version": 1
538
+ }
539
+ ],
540
+ "direction": null,
541
+ "format": "",
542
+ "indent": 0,
543
+ "type": "listitem",
544
+ "version": 1,
545
+ "value": 2
546
+ }
547
+ ],
548
+ "direction": null,
549
+ "format": "",
550
+ "indent": 0,
551
+ "type": "list",
552
+ "version": 1,
553
+ "listType": "bullet",
554
+ "start": 1,
555
+ "tag": "ul"
556
+ },
557
+ {
558
+ "children": [
559
+ {
560
+ "children": [
561
+ {
562
+ "detail": 0,
563
+ "format": 0,
564
+ "mode": "normal",
565
+ "style": "",
566
+ "text": "first",
567
+ "type": "text",
568
+ "version": 1
569
+ }
570
+ ],
571
+ "direction": null,
572
+ "format": "",
573
+ "indent": 0,
574
+ "type": "listitem",
575
+ "version": 1,
576
+ "value": 3
577
+ },
578
+ {
579
+ "children": [
580
+ {
581
+ "detail": 0,
582
+ "format": 0,
583
+ "mode": "normal",
584
+ "style": "",
585
+ "text": "second",
586
+ "type": "text",
587
+ "version": 1
588
+ }
589
+ ],
590
+ "direction": null,
591
+ "format": "",
592
+ "indent": 0,
593
+ "type": "listitem",
594
+ "version": 1,
595
+ "value": 4
596
+ }
597
+ ],
598
+ "direction": null,
599
+ "format": "",
600
+ "indent": 0,
601
+ "type": "list",
602
+ "version": 1,
603
+ "listType": "number",
604
+ "start": 3,
605
+ "tag": "ol"
606
+ },
607
+ {
608
+ "children": [
609
+ {
610
+ "children": [
611
+ {
612
+ "detail": 0,
613
+ "format": 0,
614
+ "mode": "normal",
615
+ "style": "",
616
+ "text": "done",
617
+ "type": "text",
618
+ "version": 1
619
+ }
620
+ ],
621
+ "direction": null,
622
+ "format": "",
623
+ "indent": 0,
624
+ "type": "listitem",
625
+ "version": 1,
626
+ "checked": true,
627
+ "value": 1
628
+ },
629
+ {
630
+ "children": [
631
+ {
632
+ "detail": 0,
633
+ "format": 0,
634
+ "mode": "normal",
635
+ "style": "",
636
+ "text": "todo",
637
+ "type": "text",
638
+ "version": 1
639
+ }
640
+ ],
641
+ "direction": null,
642
+ "format": "",
643
+ "indent": 0,
644
+ "type": "listitem",
645
+ "version": 1,
646
+ "checked": false,
647
+ "value": 2
648
+ }
649
+ ],
650
+ "direction": null,
651
+ "format": "",
652
+ "indent": 0,
653
+ "type": "list",
654
+ "version": 1,
655
+ "listType": "check",
656
+ "start": 1,
657
+ "tag": "ul"
658
+ }
659
+ ],
660
+ "direction": null,
661
+ "format": "",
662
+ "indent": 0,
663
+ "type": "root",
664
+ "version": 1
665
+ }
666
+ },
667
+ "nestedList": {
668
+ "root": {
669
+ "children": [
670
+ {
671
+ "children": [
672
+ {
673
+ "children": [
674
+ {
675
+ "detail": 0,
676
+ "format": 0,
677
+ "mode": "normal",
678
+ "style": "",
679
+ "text": "outer one",
680
+ "type": "text",
681
+ "version": 1
682
+ }
683
+ ],
684
+ "direction": null,
685
+ "format": "",
686
+ "indent": 0,
687
+ "type": "listitem",
688
+ "version": 1,
689
+ "value": 1
690
+ },
691
+ {
692
+ "children": [
693
+ {
694
+ "children": [
695
+ {
696
+ "children": [
697
+ {
698
+ "detail": 0,
699
+ "format": 0,
700
+ "mode": "normal",
701
+ "style": "",
702
+ "text": "inner one",
703
+ "type": "text",
704
+ "version": 1
705
+ }
706
+ ],
707
+ "direction": null,
708
+ "format": "",
709
+ "indent": 1,
710
+ "type": "listitem",
711
+ "version": 1,
712
+ "value": 1
713
+ },
714
+ {
715
+ "children": [
716
+ {
717
+ "detail": 0,
718
+ "format": 0,
719
+ "mode": "normal",
720
+ "style": "",
721
+ "text": "inner two",
722
+ "type": "text",
723
+ "version": 1
724
+ }
725
+ ],
726
+ "direction": null,
727
+ "format": "",
728
+ "indent": 1,
729
+ "type": "listitem",
730
+ "version": 1,
731
+ "value": 2
732
+ }
733
+ ],
734
+ "direction": null,
735
+ "format": "",
736
+ "indent": 0,
737
+ "type": "list",
738
+ "version": 1,
739
+ "listType": "bullet",
740
+ "start": 1,
741
+ "tag": "ul"
742
+ }
743
+ ],
744
+ "direction": null,
745
+ "format": "",
746
+ "indent": 0,
747
+ "type": "listitem",
748
+ "version": 1,
749
+ "value": 2
750
+ },
751
+ {
752
+ "children": [
753
+ {
754
+ "detail": 0,
755
+ "format": 0,
756
+ "mode": "normal",
757
+ "style": "",
758
+ "text": "outer two",
759
+ "type": "text",
760
+ "version": 1
761
+ }
762
+ ],
763
+ "direction": null,
764
+ "format": "",
765
+ "indent": 0,
766
+ "type": "listitem",
767
+ "version": 1,
768
+ "value": 2
769
+ }
770
+ ],
771
+ "direction": null,
772
+ "format": "",
773
+ "indent": 0,
774
+ "type": "list",
775
+ "version": 1,
776
+ "listType": "number",
777
+ "start": 1,
778
+ "tag": "ol"
779
+ }
780
+ ],
781
+ "direction": null,
782
+ "format": "",
783
+ "indent": 0,
784
+ "type": "root",
785
+ "version": 1
786
+ }
787
+ },
788
+ "links": {
789
+ "root": {
790
+ "children": [
791
+ {
792
+ "children": [
793
+ {
794
+ "children": [
795
+ {
796
+ "detail": 0,
797
+ "format": 0,
798
+ "mode": "normal",
799
+ "style": "",
800
+ "text": "plain",
801
+ "type": "text",
802
+ "version": 1
803
+ }
804
+ ],
805
+ "direction": null,
806
+ "format": "",
807
+ "indent": 0,
808
+ "type": "link",
809
+ "version": 1,
810
+ "rel": null,
811
+ "target": null,
812
+ "title": null,
813
+ "url": "https://example.com/a?b=1&c=2"
814
+ }
815
+ ],
816
+ "direction": null,
817
+ "format": "",
818
+ "indent": 0,
819
+ "type": "paragraph",
820
+ "version": 1,
821
+ "textFormat": 0,
822
+ "textStyle": ""
823
+ },
824
+ {
825
+ "children": [
826
+ {
827
+ "children": [
828
+ {
829
+ "detail": 0,
830
+ "format": 0,
831
+ "mode": "normal",
832
+ "style": "",
833
+ "text": "new tab",
834
+ "type": "text",
835
+ "version": 1
836
+ }
837
+ ],
838
+ "direction": null,
839
+ "format": "",
840
+ "indent": 0,
841
+ "type": "link",
842
+ "version": 1,
843
+ "rel": "noreferrer",
844
+ "target": "_blank",
845
+ "title": "A \"title\"",
846
+ "url": "https://example.com"
847
+ }
848
+ ],
849
+ "direction": null,
850
+ "format": "",
851
+ "indent": 0,
852
+ "type": "paragraph",
853
+ "version": 1,
854
+ "textFormat": 0,
855
+ "textStyle": ""
856
+ },
857
+ {
858
+ "children": [
859
+ {
860
+ "children": [
861
+ {
862
+ "detail": 0,
863
+ "format": 0,
864
+ "mode": "normal",
865
+ "style": "",
866
+ "text": "relative",
867
+ "type": "text",
868
+ "version": 1
869
+ }
870
+ ],
871
+ "direction": null,
872
+ "format": "",
873
+ "indent": 0,
874
+ "type": "link",
875
+ "version": 1,
876
+ "rel": null,
877
+ "target": null,
878
+ "title": null,
879
+ "url": "/relative/path"
880
+ }
881
+ ],
882
+ "direction": null,
883
+ "format": "",
884
+ "indent": 0,
885
+ "type": "paragraph",
886
+ "version": 1,
887
+ "textFormat": 0,
888
+ "textStyle": ""
889
+ },
890
+ {
891
+ "children": [
892
+ {
893
+ "children": [
894
+ {
895
+ "detail": 0,
896
+ "format": 0,
897
+ "mode": "normal",
898
+ "style": "",
899
+ "text": "mail",
900
+ "type": "text",
901
+ "version": 1
902
+ }
903
+ ],
904
+ "direction": null,
905
+ "format": "",
906
+ "indent": 0,
907
+ "type": "link",
908
+ "version": 1,
909
+ "rel": null,
910
+ "target": null,
911
+ "title": null,
912
+ "url": "mailto:someone@example.com"
913
+ }
914
+ ],
915
+ "direction": null,
916
+ "format": "",
917
+ "indent": 0,
918
+ "type": "paragraph",
919
+ "version": 1,
920
+ "textFormat": 0,
921
+ "textStyle": ""
922
+ },
923
+ {
924
+ "children": [
925
+ {
926
+ "children": [
927
+ {
928
+ "detail": 0,
929
+ "format": 0,
930
+ "mode": "normal",
931
+ "style": "",
932
+ "text": "https://auto.example.com",
933
+ "type": "text",
934
+ "version": 1
935
+ }
936
+ ],
937
+ "direction": null,
938
+ "format": "",
939
+ "indent": 0,
940
+ "type": "autolink",
941
+ "version": 1,
942
+ "rel": null,
943
+ "target": null,
944
+ "title": null,
945
+ "url": "https://auto.example.com",
946
+ "isUnlinked": false
947
+ }
948
+ ],
949
+ "direction": null,
950
+ "format": "",
951
+ "indent": 0,
952
+ "type": "paragraph",
953
+ "version": 1,
954
+ "textFormat": 0,
955
+ "textStyle": ""
956
+ },
957
+ {
958
+ "children": [
959
+ {
960
+ "children": [
961
+ {
962
+ "detail": 0,
963
+ "format": 0,
964
+ "mode": "normal",
965
+ "style": "",
966
+ "text": "unlinked",
967
+ "type": "text",
968
+ "version": 1
969
+ }
970
+ ],
971
+ "direction": null,
972
+ "format": "",
973
+ "indent": 0,
974
+ "type": "autolink",
975
+ "version": 1,
976
+ "rel": null,
977
+ "target": null,
978
+ "title": null,
979
+ "url": "https://unlinked.example.com",
980
+ "isUnlinked": true
981
+ }
982
+ ],
983
+ "direction": null,
984
+ "format": "",
985
+ "indent": 0,
986
+ "type": "paragraph",
987
+ "version": 1,
988
+ "textFormat": 0,
989
+ "textStyle": ""
990
+ }
991
+ ],
992
+ "direction": null,
993
+ "format": "",
994
+ "indent": 0,
995
+ "type": "root",
996
+ "version": 1
997
+ }
998
+ },
999
+ "breaks": {
1000
+ "root": {
1001
+ "children": [
1002
+ {
1003
+ "children": [
1004
+ {
1005
+ "detail": 0,
1006
+ "format": 0,
1007
+ "mode": "normal",
1008
+ "style": "",
1009
+ "text": "line one",
1010
+ "type": "text",
1011
+ "version": 1
1012
+ },
1013
+ {
1014
+ "type": "linebreak",
1015
+ "version": 1
1016
+ },
1017
+ {
1018
+ "detail": 0,
1019
+ "format": 0,
1020
+ "mode": "normal",
1021
+ "style": "",
1022
+ "text": "line two",
1023
+ "type": "text",
1024
+ "version": 1
1025
+ },
1026
+ {
1027
+ "detail": 2,
1028
+ "format": 0,
1029
+ "mode": "normal",
1030
+ "style": "",
1031
+ "text": "\t",
1032
+ "type": "tab",
1033
+ "version": 1
1034
+ },
1035
+ {
1036
+ "detail": 0,
1037
+ "format": 0,
1038
+ "mode": "normal",
1039
+ "style": "",
1040
+ "text": "after tab",
1041
+ "type": "text",
1042
+ "version": 1
1043
+ }
1044
+ ],
1045
+ "direction": null,
1046
+ "format": "",
1047
+ "indent": 0,
1048
+ "type": "paragraph",
1049
+ "version": 1,
1050
+ "textFormat": 0,
1051
+ "textStyle": ""
1052
+ }
1053
+ ],
1054
+ "direction": null,
1055
+ "format": "",
1056
+ "indent": 0,
1057
+ "type": "root",
1058
+ "version": 1
1059
+ }
1060
+ },
1061
+ "horizontalRule": {
1062
+ "root": {
1063
+ "children": [
1064
+ {
1065
+ "children": [
1066
+ {
1067
+ "detail": 0,
1068
+ "format": 0,
1069
+ "mode": "normal",
1070
+ "style": "",
1071
+ "text": "above",
1072
+ "type": "text",
1073
+ "version": 1
1074
+ }
1075
+ ],
1076
+ "direction": null,
1077
+ "format": "",
1078
+ "indent": 0,
1079
+ "type": "paragraph",
1080
+ "version": 1,
1081
+ "textFormat": 0,
1082
+ "textStyle": ""
1083
+ },
1084
+ {
1085
+ "type": "horizontalrule",
1086
+ "version": 1
1087
+ },
1088
+ {
1089
+ "children": [
1090
+ {
1091
+ "detail": 0,
1092
+ "format": 0,
1093
+ "mode": "normal",
1094
+ "style": "",
1095
+ "text": "below",
1096
+ "type": "text",
1097
+ "version": 1
1098
+ }
1099
+ ],
1100
+ "direction": null,
1101
+ "format": "",
1102
+ "indent": 0,
1103
+ "type": "paragraph",
1104
+ "version": 1,
1105
+ "textFormat": 0,
1106
+ "textStyle": ""
1107
+ }
1108
+ ],
1109
+ "direction": null,
1110
+ "format": "",
1111
+ "indent": 0,
1112
+ "type": "root",
1113
+ "version": 1
1114
+ }
1115
+ },
1116
+ "xss": {
1117
+ "root": {
1118
+ "children": [
1119
+ {
1120
+ "children": [
1121
+ {
1122
+ "detail": 0,
1123
+ "format": 0,
1124
+ "mode": "normal",
1125
+ "style": "",
1126
+ "text": "<script>alert(\"x\")</script> & 'quotes'",
1127
+ "type": "text",
1128
+ "version": 1
1129
+ }
1130
+ ],
1131
+ "direction": null,
1132
+ "format": "",
1133
+ "indent": 0,
1134
+ "type": "paragraph",
1135
+ "version": 1,
1136
+ "textFormat": 0,
1137
+ "textStyle": ""
1138
+ },
1139
+ {
1140
+ "children": [
1141
+ {
1142
+ "children": [
1143
+ {
1144
+ "detail": 0,
1145
+ "format": 0,
1146
+ "mode": "normal",
1147
+ "style": "",
1148
+ "text": "js",
1149
+ "type": "text",
1150
+ "version": 1
1151
+ }
1152
+ ],
1153
+ "direction": null,
1154
+ "format": "",
1155
+ "indent": 0,
1156
+ "type": "link",
1157
+ "version": 1,
1158
+ "rel": null,
1159
+ "target": null,
1160
+ "title": null,
1161
+ "url": "javascript:alert(1)"
1162
+ }
1163
+ ],
1164
+ "direction": null,
1165
+ "format": "",
1166
+ "indent": 0,
1167
+ "type": "paragraph",
1168
+ "version": 1,
1169
+ "textFormat": 0,
1170
+ "textStyle": ""
1171
+ },
1172
+ {
1173
+ "children": [
1174
+ {
1175
+ "children": [
1176
+ {
1177
+ "detail": 0,
1178
+ "format": 0,
1179
+ "mode": "normal",
1180
+ "style": "",
1181
+ "text": "js mixed case",
1182
+ "type": "text",
1183
+ "version": 1
1184
+ }
1185
+ ],
1186
+ "direction": null,
1187
+ "format": "",
1188
+ "indent": 0,
1189
+ "type": "link",
1190
+ "version": 1,
1191
+ "rel": null,
1192
+ "target": null,
1193
+ "title": null,
1194
+ "url": " JaVaScRiPt:alert(1)"
1195
+ }
1196
+ ],
1197
+ "direction": null,
1198
+ "format": "",
1199
+ "indent": 0,
1200
+ "type": "paragraph",
1201
+ "version": 1,
1202
+ "textFormat": 0,
1203
+ "textStyle": ""
1204
+ },
1205
+ {
1206
+ "children": [
1207
+ {
1208
+ "children": [
1209
+ {
1210
+ "detail": 0,
1211
+ "format": 0,
1212
+ "mode": "normal",
1213
+ "style": "",
1214
+ "text": "js with tab",
1215
+ "type": "text",
1216
+ "version": 1
1217
+ }
1218
+ ],
1219
+ "direction": null,
1220
+ "format": "",
1221
+ "indent": 0,
1222
+ "type": "link",
1223
+ "version": 1,
1224
+ "rel": null,
1225
+ "target": null,
1226
+ "title": null,
1227
+ "url": "java\tscript:alert(1)"
1228
+ }
1229
+ ],
1230
+ "direction": null,
1231
+ "format": "",
1232
+ "indent": 0,
1233
+ "type": "paragraph",
1234
+ "version": 1,
1235
+ "textFormat": 0,
1236
+ "textStyle": ""
1237
+ },
1238
+ {
1239
+ "children": [
1240
+ {
1241
+ "children": [
1242
+ {
1243
+ "detail": 0,
1244
+ "format": 0,
1245
+ "mode": "normal",
1246
+ "style": "",
1247
+ "text": "data url",
1248
+ "type": "text",
1249
+ "version": 1
1250
+ }
1251
+ ],
1252
+ "direction": null,
1253
+ "format": "",
1254
+ "indent": 0,
1255
+ "type": "link",
1256
+ "version": 1,
1257
+ "rel": null,
1258
+ "target": null,
1259
+ "title": null,
1260
+ "url": "data:text/html,<script>alert(1)</script>"
1261
+ }
1262
+ ],
1263
+ "direction": null,
1264
+ "format": "",
1265
+ "indent": 0,
1266
+ "type": "paragraph",
1267
+ "version": 1,
1268
+ "textFormat": 0,
1269
+ "textStyle": ""
1270
+ },
1271
+ {
1272
+ "children": [
1273
+ {
1274
+ "children": [
1275
+ {
1276
+ "detail": 0,
1277
+ "format": 0,
1278
+ "mode": "normal",
1279
+ "style": "",
1280
+ "text": "vbscript",
1281
+ "type": "text",
1282
+ "version": 1
1283
+ }
1284
+ ],
1285
+ "direction": null,
1286
+ "format": "",
1287
+ "indent": 0,
1288
+ "type": "link",
1289
+ "version": 1,
1290
+ "rel": null,
1291
+ "target": null,
1292
+ "title": null,
1293
+ "url": "vbscript:msgbox(1)"
1294
+ }
1295
+ ],
1296
+ "direction": null,
1297
+ "format": "",
1298
+ "indent": 0,
1299
+ "type": "paragraph",
1300
+ "version": 1,
1301
+ "textFormat": 0,
1302
+ "textStyle": ""
1303
+ },
1304
+ {
1305
+ "children": [
1306
+ {
1307
+ "children": [
1308
+ {
1309
+ "detail": 0,
1310
+ "format": 0,
1311
+ "mode": "normal",
1312
+ "style": "",
1313
+ "text": "attribute breakout",
1314
+ "type": "text",
1315
+ "version": 1
1316
+ }
1317
+ ],
1318
+ "direction": null,
1319
+ "format": "",
1320
+ "indent": 0,
1321
+ "type": "link",
1322
+ "version": 1,
1323
+ "rel": null,
1324
+ "target": "\"><script>",
1325
+ "title": null,
1326
+ "url": "https://example.com/\"><script>alert(1)</script>"
1327
+ }
1328
+ ],
1329
+ "direction": null,
1330
+ "format": "",
1331
+ "indent": 0,
1332
+ "type": "paragraph",
1333
+ "version": 1,
1334
+ "textFormat": 0,
1335
+ "textStyle": ""
1336
+ }
1337
+ ],
1338
+ "direction": null,
1339
+ "format": "",
1340
+ "indent": 0,
1341
+ "type": "root",
1342
+ "version": 1
1343
+ }
1344
+ }
1345
+ }