@g9tm/lynxcontrols-richtext 0.0.0-stage → 2.5.8

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/README.md +32 -2
  2. package/catalog/cards/G9RichLines.md +16 -0
  3. package/catalog/cards/G9RichText.md +17 -0
  4. package/catalog/cards/G9RichTextEditor.md +17 -0
  5. package/catalog/catalog.json +1667 -0
  6. package/catalog/index.md +7 -0
  7. package/dist/.tsbuildinfo +1 -0
  8. package/dist/bidi.d.ts +24 -0
  9. package/dist/bidi.d.ts.map +1 -0
  10. package/dist/bidi.jsx +102 -0
  11. package/dist/editor.d.ts +111 -0
  12. package/dist/editor.d.ts.map +1 -0
  13. package/dist/editor.jsx +556 -0
  14. package/dist/element-core.d.ts +60 -0
  15. package/dist/element-core.d.ts.map +1 -0
  16. package/dist/element-core.jsx +173 -0
  17. package/dist/element-types.d.ts +31 -0
  18. package/dist/element-types.d.ts.map +1 -0
  19. package/dist/element-types.jsx +1 -0
  20. package/dist/index.d.ts +10 -0
  21. package/dist/index.d.ts.map +1 -0
  22. package/dist/index.jsx +8 -0
  23. package/dist/lines-view.d.ts +27 -0
  24. package/dist/lines-view.d.ts.map +1 -0
  25. package/dist/lines-view.jsx +100 -0
  26. package/dist/mentions.d.ts +30 -0
  27. package/dist/mentions.d.ts.map +1 -0
  28. package/dist/mentions.jsx +40 -0
  29. package/dist/ot.d.ts +49 -0
  30. package/dist/ot.d.ts.map +1 -0
  31. package/dist/ot.jsx +306 -0
  32. package/dist/protocol.d.ts +199 -0
  33. package/dist/protocol.d.ts.map +1 -0
  34. package/dist/protocol.jsx +11 -0
  35. package/dist/rich-text.d.ts +48 -0
  36. package/dist/rich-text.d.ts.map +1 -0
  37. package/dist/rich-text.jsx +186 -0
  38. package/dist/richtext.css +411 -0
  39. package/dist/richtext.css.map +1 -0
  40. package/dist/session.d.ts +142 -0
  41. package/dist/session.d.ts.map +1 -0
  42. package/dist/session.jsx +665 -0
  43. package/dist/yjs.d.ts +3 -0
  44. package/dist/yjs.d.ts.map +1 -0
  45. package/dist/yjs.jsx +2 -0
  46. package/dist/ymodel.d.ts +178 -0
  47. package/dist/ymodel.d.ts.map +1 -0
  48. package/dist/ymodel.jsx +1379 -0
  49. package/package.json +68 -4
@@ -0,0 +1,1667 @@
1
+ {
2
+ "catalogVersion": 1,
3
+ "package": "@g9tm/lynxcontrols-richtext",
4
+ "version": "2.5.8",
5
+ "generatedBy": "node scripts/check-docs.mjs --write",
6
+ "components": [
7
+ {
8
+ "id": "richtext.richtext.G9RichLines",
9
+ "export": "G9RichLines",
10
+ "from": "@g9tm/lynxcontrols-richtext",
11
+ "kind": "component",
12
+ "family": "richtext",
13
+ "summary": "The styled lines of a text (`text` split at `\\n`, one `RtLine` each).",
14
+ "since": null,
15
+ "props": [
16
+ {
17
+ "name": "className",
18
+ "type": {
19
+ "kind": "string"
20
+ },
21
+ "required": false,
22
+ "serializable": true,
23
+ "role": "appearance"
24
+ },
25
+ {
26
+ "name": "direction",
27
+ "type": {
28
+ "kind": "enum",
29
+ "values": [
30
+ "ltr",
31
+ "rtl"
32
+ ]
33
+ },
34
+ "required": false,
35
+ "default": "ltr",
36
+ "serializable": true,
37
+ "role": "behaviour",
38
+ "doc": "The document's direction (a line without its own takes it). Default `ltr`."
39
+ },
40
+ {
41
+ "name": "editing",
42
+ "type": {
43
+ "kind": "number"
44
+ },
45
+ "required": false,
46
+ "serializable": true,
47
+ "role": "behaviour",
48
+ "doc": "The line being edited (drawn by `renderLine`)."
49
+ },
50
+ {
51
+ "name": "lines",
52
+ "type": {
53
+ "kind": "array",
54
+ "items": {
55
+ "kind": "object",
56
+ "fields": [
57
+ {
58
+ "name": "t",
59
+ "required": true,
60
+ "type": {
61
+ "kind": "enum",
62
+ "values": [
63
+ "code",
64
+ "p",
65
+ "h1",
66
+ "h2",
67
+ "h3",
68
+ "hr",
69
+ "img"
70
+ ]
71
+ },
72
+ "serializable": true
73
+ },
74
+ {
75
+ "name": "dir",
76
+ "required": false,
77
+ "type": {
78
+ "kind": "enum",
79
+ "values": [
80
+ "ltr",
81
+ "rtl"
82
+ ]
83
+ },
84
+ "serializable": true
85
+ },
86
+ {
87
+ "name": "ind",
88
+ "required": false,
89
+ "type": {
90
+ "kind": "number"
91
+ },
92
+ "serializable": true
93
+ },
94
+ {
95
+ "name": "q",
96
+ "required": false,
97
+ "type": {
98
+ "kind": "number"
99
+ },
100
+ "serializable": true
101
+ },
102
+ {
103
+ "name": "mk",
104
+ "required": false,
105
+ "type": {
106
+ "kind": "unknown",
107
+ "text": "{ k: \"n\" | \"b\" | \"t\"; n?: string; c?: boolean; }"
108
+ },
109
+ "serializable": false
110
+ },
111
+ {
112
+ "name": "done",
113
+ "required": false,
114
+ "type": {
115
+ "kind": "boolean"
116
+ },
117
+ "serializable": true
118
+ },
119
+ {
120
+ "name": "co",
121
+ "required": false,
122
+ "type": {
123
+ "kind": "enum",
124
+ "values": [
125
+ "info",
126
+ "success",
127
+ "warning",
128
+ "danger"
129
+ ]
130
+ },
131
+ "serializable": true
132
+ },
133
+ {
134
+ "name": "cell",
135
+ "required": false,
136
+ "type": {
137
+ "kind": "unknown",
138
+ "text": "{ r: number; c: number; h?: boolean; top?: boolean; }"
139
+ },
140
+ "serializable": false
141
+ },
142
+ {
143
+ "name": "cf",
144
+ "required": false,
145
+ "type": {
146
+ "kind": "boolean"
147
+ },
148
+ "serializable": true
149
+ },
150
+ {
151
+ "name": "cl",
152
+ "required": false,
153
+ "type": {
154
+ "kind": "boolean"
155
+ },
156
+ "serializable": true
157
+ },
158
+ {
159
+ "name": "img",
160
+ "required": false,
161
+ "type": {
162
+ "kind": "unknown",
163
+ "text": "{ key: string; src?: string; alt?: string; }"
164
+ },
165
+ "serializable": false
166
+ },
167
+ {
168
+ "name": "r",
169
+ "required": true,
170
+ "type": {
171
+ "kind": "array",
172
+ "items": {
173
+ "kind": "unknown",
174
+ "text": "RtRun"
175
+ }
176
+ },
177
+ "serializable": false
178
+ }
179
+ ]
180
+ }
181
+ },
182
+ "required": true,
183
+ "serializable": false,
184
+ "role": "behaviour"
185
+ },
186
+ {
187
+ "name": "onTapLine",
188
+ "type": {
189
+ "kind": "event",
190
+ "payload": "index: number"
191
+ },
192
+ "required": false,
193
+ "serializable": false,
194
+ "role": "event"
195
+ },
196
+ {
197
+ "name": "onToggleCheck",
198
+ "type": {
199
+ "kind": "event",
200
+ "payload": "index: number"
201
+ },
202
+ "required": false,
203
+ "serializable": false,
204
+ "role": "event"
205
+ },
206
+ {
207
+ "name": "renderLine",
208
+ "type": {
209
+ "kind": "render",
210
+ "receives": [
211
+ {
212
+ "name": "index",
213
+ "type": "number"
214
+ },
215
+ {
216
+ "name": "line",
217
+ "type": "RtLine"
218
+ },
219
+ {
220
+ "name": "text",
221
+ "type": "string"
222
+ }
223
+ ],
224
+ "returns": "ReactNode"
225
+ },
226
+ "required": false,
227
+ "serializable": false,
228
+ "role": "slot"
229
+ },
230
+ {
231
+ "name": "text",
232
+ "type": {
233
+ "kind": "string"
234
+ },
235
+ "required": true,
236
+ "serializable": true,
237
+ "role": "content"
238
+ }
239
+ ],
240
+ "anchor": null,
241
+ "accessibility": {
242
+ "labelFrom": [
243
+ "text"
244
+ ],
245
+ "labelRequired": false
246
+ },
247
+ "targets": {
248
+ "android": "unmeasured",
249
+ "ios": "unmeasured",
250
+ "windows": "unmeasured",
251
+ "macos": "unmeasured",
252
+ "web": "unmeasured"
253
+ },
254
+ "evidence": {
255
+ "ledger": []
256
+ },
257
+ "tokens": [
258
+ "Error",
259
+ "Info",
260
+ "Outline",
261
+ "OutlineVariant",
262
+ "Primary",
263
+ "PrimaryContainer",
264
+ "Success",
265
+ "Surface",
266
+ "SurfaceContainer",
267
+ "SurfaceContainerHigh",
268
+ "TextPrimary",
269
+ "TextSecondary",
270
+ "TextTertiary",
271
+ "Warning"
272
+ ],
273
+ "example": {
274
+ "line": "<G9RichLines lines={lines} text=\"Label\" />",
275
+ "from": "generated"
276
+ }
277
+ },
278
+ {
279
+ "id": "richtext.richtext.G9RichText",
280
+ "export": "G9RichText",
281
+ "from": "@g9tm/lynxcontrols-richtext",
282
+ "kind": "component",
283
+ "family": "richtext",
284
+ "summary": "An editable rich text on the host's element (or drawn, on the desktop).",
285
+ "since": null,
286
+ "props": [
287
+ {
288
+ "name": "bottomInset",
289
+ "type": {
290
+ "kind": "number"
291
+ },
292
+ "required": false,
293
+ "serializable": true,
294
+ "role": "behaviour",
295
+ "doc": "Room under the content (a floating toolbar)."
296
+ },
297
+ {
298
+ "name": "className",
299
+ "type": {
300
+ "kind": "string"
301
+ },
302
+ "required": false,
303
+ "serializable": true,
304
+ "role": "appearance"
305
+ },
306
+ {
307
+ "name": "editable",
308
+ "type": {
309
+ "kind": "boolean"
310
+ },
311
+ "required": true,
312
+ "serializable": true,
313
+ "role": "behaviour"
314
+ },
315
+ {
316
+ "name": "onFocusChange",
317
+ "type": {
318
+ "kind": "event",
319
+ "payload": "focused: boolean"
320
+ },
321
+ "required": false,
322
+ "serializable": false,
323
+ "role": "event"
324
+ },
325
+ {
326
+ "name": "onTapObject",
327
+ "type": {
328
+ "kind": "event",
329
+ "payload": "pos: number"
330
+ },
331
+ "required": false,
332
+ "serializable": false,
333
+ "role": "event",
334
+ "doc": "An inline object tapped (a chip): its position in the text."
335
+ },
336
+ {
337
+ "name": "palette",
338
+ "type": {
339
+ "kind": "object",
340
+ "fields": [
341
+ {
342
+ "name": "text",
343
+ "required": true,
344
+ "type": {
345
+ "kind": "string"
346
+ },
347
+ "serializable": true
348
+ },
349
+ {
350
+ "name": "text2",
351
+ "required": true,
352
+ "type": {
353
+ "kind": "string"
354
+ },
355
+ "serializable": true
356
+ },
357
+ {
358
+ "name": "text3",
359
+ "required": true,
360
+ "type": {
361
+ "kind": "string"
362
+ },
363
+ "serializable": true
364
+ },
365
+ {
366
+ "name": "accent",
367
+ "required": true,
368
+ "type": {
369
+ "kind": "string"
370
+ },
371
+ "serializable": true
372
+ },
373
+ {
374
+ "name": "link",
375
+ "required": true,
376
+ "type": {
377
+ "kind": "string"
378
+ },
379
+ "serializable": true
380
+ },
381
+ {
382
+ "name": "border",
383
+ "required": true,
384
+ "type": {
385
+ "kind": "string"
386
+ },
387
+ "serializable": true
388
+ },
389
+ {
390
+ "name": "surface2",
391
+ "required": true,
392
+ "type": {
393
+ "kind": "string"
394
+ },
395
+ "serializable": true
396
+ },
397
+ {
398
+ "name": "selection",
399
+ "required": true,
400
+ "type": {
401
+ "kind": "string"
402
+ },
403
+ "serializable": true
404
+ },
405
+ {
406
+ "name": "info",
407
+ "required": true,
408
+ "type": {
409
+ "kind": "string"
410
+ },
411
+ "serializable": true
412
+ },
413
+ {
414
+ "name": "success",
415
+ "required": true,
416
+ "type": {
417
+ "kind": "string"
418
+ },
419
+ "serializable": true
420
+ },
421
+ {
422
+ "name": "warning",
423
+ "required": true,
424
+ "type": {
425
+ "kind": "string"
426
+ },
427
+ "serializable": true
428
+ },
429
+ {
430
+ "name": "danger",
431
+ "required": true,
432
+ "type": {
433
+ "kind": "string"
434
+ },
435
+ "serializable": true
436
+ }
437
+ ]
438
+ },
439
+ "required": false,
440
+ "serializable": true,
441
+ "role": "behaviour",
442
+ "doc": "The element's colours; default the theme's."
443
+ },
444
+ {
445
+ "name": "placeholder",
446
+ "type": {
447
+ "kind": "string"
448
+ },
449
+ "required": true,
450
+ "serializable": true,
451
+ "role": "content"
452
+ },
453
+ {
454
+ "name": "port",
455
+ "type": {
456
+ "kind": "object",
457
+ "fields": [
458
+ {
459
+ "name": "target",
460
+ "required": true,
461
+ "type": {
462
+ "kind": "object",
463
+ "fields": [
464
+ {
465
+ "name": "invoke",
466
+ "required": true,
467
+ "type": {
468
+ "kind": "event",
469
+ "payload": "options: uiMethodOptions",
470
+ "returns": "SelectorQuery"
471
+ },
472
+ "serializable": false
473
+ },
474
+ {
475
+ "name": "path",
476
+ "required": true,
477
+ "type": {
478
+ "kind": "event",
479
+ "payload": "callback: PathCallback",
480
+ "returns": "SelectorQuery"
481
+ },
482
+ "serializable": false
483
+ },
484
+ {
485
+ "name": "fields",
486
+ "required": true,
487
+ "type": {
488
+ "kind": "event",
489
+ "payload": "fields: Required<FieldsParams> extends Record<keyof T, boolean> ? T : FieldsParams, callback: (data: { [K in keyof Required<FieldsParams> as T[K] extends true ? K : never]: FieldsData[K]; } | null, status: { data: string; code: number; }) => void",
490
+ "returns": "SelectorQuery"
491
+ },
492
+ "serializable": false
493
+ },
494
+ {
495
+ "name": "animate",
496
+ "required": true,
497
+ "type": {
498
+ "kind": "event",
499
+ "payload": "animations: AnimationV2 | AnimationV2[]",
500
+ "returns": "SelectorQuery"
501
+ },
502
+ "serializable": false
503
+ },
504
+ {
505
+ "name": "playAnimation",
506
+ "required": true,
507
+ "type": {
508
+ "kind": "event",
509
+ "payload": "ids: string | string[]",
510
+ "returns": "SelectorQuery"
511
+ },
512
+ "serializable": false
513
+ },
514
+ {
515
+ "name": "pauseAnimation",
516
+ "required": true,
517
+ "type": {
518
+ "kind": "event",
519
+ "payload": "ids: string | string[]",
520
+ "returns": "SelectorQuery"
521
+ },
522
+ "serializable": false
523
+ },
524
+ {
525
+ "name": "cancelAnimation",
526
+ "required": true,
527
+ "type": {
528
+ "kind": "event",
529
+ "payload": "ids: string | string[]",
530
+ "returns": "SelectorQuery"
531
+ },
532
+ "serializable": false
533
+ },
534
+ {
535
+ "name": "setNativeProps",
536
+ "required": true,
537
+ "type": {
538
+ "kind": "event",
539
+ "payload": "nativeProps: Record<string, any>",
540
+ "returns": "SelectorQuery"
541
+ },
542
+ "serializable": false
543
+ }
544
+ ]
545
+ },
546
+ "serializable": false
547
+ },
548
+ {
549
+ "name": "direct",
550
+ "required": true,
551
+ "type": {
552
+ "kind": "event",
553
+ "payload": "message: RtMessage"
554
+ },
555
+ "serializable": false
556
+ },
557
+ {
558
+ "name": "send",
559
+ "required": true,
560
+ "type": {
561
+ "kind": "event",
562
+ "payload": "message: RtMessage"
563
+ },
564
+ "serializable": false
565
+ },
566
+ {
567
+ "name": "attach",
568
+ "required": true,
569
+ "type": {
570
+ "kind": "event",
571
+ "payload": "target: NodesRef | null"
572
+ },
573
+ "serializable": false
574
+ },
575
+ {
576
+ "name": "attachDirect",
577
+ "required": true,
578
+ "type": {
579
+ "kind": "event",
580
+ "payload": "handler: ((message: RtMessage) => void) | null"
581
+ },
582
+ "serializable": false
583
+ }
584
+ ]
585
+ },
586
+ "required": true,
587
+ "serializable": false,
588
+ "role": "behaviour"
589
+ },
590
+ {
591
+ "name": "session",
592
+ "type": {
593
+ "kind": "object",
594
+ "fields": [
595
+ {
596
+ "name": "edit",
597
+ "required": true,
598
+ "type": {
599
+ "kind": "event",
600
+ "payload": "event: RtEdit"
601
+ },
602
+ "serializable": false
603
+ },
604
+ {
605
+ "name": "select",
606
+ "required": true,
607
+ "type": {
608
+ "kind": "event",
609
+ "payload": "event: RtSelect"
610
+ },
611
+ "serializable": false
612
+ },
613
+ {
614
+ "name": "applied",
615
+ "required": true,
616
+ "type": {
617
+ "kind": "event",
618
+ "payload": "event: RtApplied"
619
+ },
620
+ "serializable": false
621
+ },
622
+ {
623
+ "name": "action",
624
+ "required": true,
625
+ "type": {
626
+ "kind": "event",
627
+ "payload": "event: RtAction"
628
+ },
629
+ "serializable": false
630
+ },
631
+ {
632
+ "name": "reset",
633
+ "required": true,
634
+ "type": {
635
+ "kind": "event",
636
+ "payload": null
637
+ },
638
+ "serializable": false
639
+ }
640
+ ]
641
+ },
642
+ "required": true,
643
+ "serializable": false,
644
+ "role": "behaviour"
645
+ },
646
+ {
647
+ "name": "surface",
648
+ "type": {
649
+ "kind": "enum",
650
+ "values": [
651
+ "element",
652
+ "drawn"
653
+ ]
654
+ },
655
+ "required": false,
656
+ "serializable": true,
657
+ "role": "behaviour",
658
+ "doc": "`'element'` (default): the host's `<g9-richtext>`; `'drawn'`: Lynx views (a host without the element)."
659
+ }
660
+ ],
661
+ "anchor": null,
662
+ "accessibility": {
663
+ "labelFrom": [
664
+ "placeholder"
665
+ ],
666
+ "labelRequired": false
667
+ },
668
+ "targets": {
669
+ "android": "unmeasured",
670
+ "ios": "unmeasured",
671
+ "windows": "unmeasured",
672
+ "macos": "unmeasured",
673
+ "web": "unmeasured"
674
+ },
675
+ "evidence": {
676
+ "ledger": []
677
+ },
678
+ "tokens": [
679
+ "Error",
680
+ "Info",
681
+ "Outline",
682
+ "OutlineVariant",
683
+ "Primary",
684
+ "PrimaryContainer",
685
+ "Success",
686
+ "Surface",
687
+ "SurfaceContainer",
688
+ "SurfaceContainerHigh",
689
+ "TextPrimary",
690
+ "TextSecondary",
691
+ "TextTertiary",
692
+ "Warning"
693
+ ],
694
+ "example": {
695
+ "line": "<G9RichText editable placeholder=\"placeholder\" port={port} session={session} />",
696
+ "from": "generated"
697
+ }
698
+ },
699
+ {
700
+ "id": "richtext.richtext.G9RichTextEditor",
701
+ "export": "G9RichTextEditor",
702
+ "from": "@g9tm/lynxcontrols-richtext",
703
+ "kind": "component",
704
+ "family": "richtext",
705
+ "summary": "The live document's editor: the element, the toolbar and the suggestions.",
706
+ "since": null,
707
+ "props": [
708
+ {
709
+ "name": "className",
710
+ "type": {
711
+ "kind": "string"
712
+ },
713
+ "required": false,
714
+ "serializable": true,
715
+ "role": "appearance"
716
+ },
717
+ {
718
+ "name": "editable",
719
+ "type": {
720
+ "kind": "boolean"
721
+ },
722
+ "required": true,
723
+ "serializable": true,
724
+ "role": "behaviour"
725
+ },
726
+ {
727
+ "name": "footer",
728
+ "type": {
729
+ "kind": "slot",
730
+ "accepts": "any"
731
+ },
732
+ "required": false,
733
+ "serializable": false,
734
+ "role": "slot",
735
+ "doc": "Under the text (a word count); on a phone hidden while the toolbar is up."
736
+ },
737
+ {
738
+ "name": "id",
739
+ "type": {
740
+ "kind": "string"
741
+ },
742
+ "required": false,
743
+ "serializable": true,
744
+ "role": "identity"
745
+ },
746
+ {
747
+ "name": "labels",
748
+ "type": {
749
+ "kind": "object",
750
+ "name": "G9RichTextEditorLabels"
751
+ },
752
+ "required": false,
753
+ "serializable": false,
754
+ "role": "behaviour"
755
+ },
756
+ {
757
+ "name": "links",
758
+ "type": {
759
+ "kind": "event",
760
+ "payload": "query: string",
761
+ "returns": "Promise<readonly G9RichLinkOption[]>"
762
+ },
763
+ "required": false,
764
+ "serializable": false,
765
+ "role": "event",
766
+ "doc": "`[[`: the targets to link."
767
+ },
768
+ {
769
+ "name": "onOpenLink",
770
+ "type": {
771
+ "kind": "event",
772
+ "payload": "href: string"
773
+ },
774
+ "required": false,
775
+ "serializable": false,
776
+ "role": "event",
777
+ "doc": "A chip tapped."
778
+ },
779
+ {
780
+ "name": "palette",
781
+ "type": {
782
+ "kind": "object",
783
+ "fields": [
784
+ {
785
+ "name": "text",
786
+ "required": true,
787
+ "type": {
788
+ "kind": "string"
789
+ },
790
+ "serializable": true
791
+ },
792
+ {
793
+ "name": "text2",
794
+ "required": true,
795
+ "type": {
796
+ "kind": "string"
797
+ },
798
+ "serializable": true
799
+ },
800
+ {
801
+ "name": "text3",
802
+ "required": true,
803
+ "type": {
804
+ "kind": "string"
805
+ },
806
+ "serializable": true
807
+ },
808
+ {
809
+ "name": "accent",
810
+ "required": true,
811
+ "type": {
812
+ "kind": "string"
813
+ },
814
+ "serializable": true
815
+ },
816
+ {
817
+ "name": "link",
818
+ "required": true,
819
+ "type": {
820
+ "kind": "string"
821
+ },
822
+ "serializable": true
823
+ },
824
+ {
825
+ "name": "border",
826
+ "required": true,
827
+ "type": {
828
+ "kind": "string"
829
+ },
830
+ "serializable": true
831
+ },
832
+ {
833
+ "name": "surface2",
834
+ "required": true,
835
+ "type": {
836
+ "kind": "string"
837
+ },
838
+ "serializable": true
839
+ },
840
+ {
841
+ "name": "selection",
842
+ "required": true,
843
+ "type": {
844
+ "kind": "string"
845
+ },
846
+ "serializable": true
847
+ },
848
+ {
849
+ "name": "info",
850
+ "required": true,
851
+ "type": {
852
+ "kind": "string"
853
+ },
854
+ "serializable": true
855
+ },
856
+ {
857
+ "name": "success",
858
+ "required": true,
859
+ "type": {
860
+ "kind": "string"
861
+ },
862
+ "serializable": true
863
+ },
864
+ {
865
+ "name": "warning",
866
+ "required": true,
867
+ "type": {
868
+ "kind": "string"
869
+ },
870
+ "serializable": true
871
+ },
872
+ {
873
+ "name": "danger",
874
+ "required": true,
875
+ "type": {
876
+ "kind": "string"
877
+ },
878
+ "serializable": true
879
+ }
880
+ ]
881
+ },
882
+ "required": false,
883
+ "serializable": true,
884
+ "role": "behaviour"
885
+ },
886
+ {
887
+ "name": "people",
888
+ "type": {
889
+ "kind": "event",
890
+ "payload": "query: string",
891
+ "returns": "Promise<readonly G9RichMention[]>"
892
+ },
893
+ "required": false,
894
+ "serializable": false,
895
+ "role": "event",
896
+ "doc": "`@`: the people to suggest."
897
+ },
898
+ {
899
+ "name": "placeholder",
900
+ "type": {
901
+ "kind": "string"
902
+ },
903
+ "required": true,
904
+ "serializable": true,
905
+ "role": "content"
906
+ },
907
+ {
908
+ "name": "port",
909
+ "type": {
910
+ "kind": "object",
911
+ "fields": [
912
+ {
913
+ "name": "target",
914
+ "required": true,
915
+ "type": {
916
+ "kind": "object",
917
+ "fields": [
918
+ {
919
+ "name": "invoke",
920
+ "required": true,
921
+ "type": {
922
+ "kind": "event",
923
+ "payload": "options: uiMethodOptions",
924
+ "returns": "SelectorQuery"
925
+ },
926
+ "serializable": false
927
+ },
928
+ {
929
+ "name": "path",
930
+ "required": true,
931
+ "type": {
932
+ "kind": "event",
933
+ "payload": "callback: PathCallback",
934
+ "returns": "SelectorQuery"
935
+ },
936
+ "serializable": false
937
+ },
938
+ {
939
+ "name": "fields",
940
+ "required": true,
941
+ "type": {
942
+ "kind": "event",
943
+ "payload": "fields: Required<FieldsParams> extends Record<keyof T, boolean> ? T : FieldsParams, callback: (data: { [K in keyof Required<FieldsParams> as T[K] extends true ? K : never]: FieldsData[K]; } | null, status: { data: string; code: number; }) => void",
944
+ "returns": "SelectorQuery"
945
+ },
946
+ "serializable": false
947
+ },
948
+ {
949
+ "name": "animate",
950
+ "required": true,
951
+ "type": {
952
+ "kind": "event",
953
+ "payload": "animations: AnimationV2 | AnimationV2[]",
954
+ "returns": "SelectorQuery"
955
+ },
956
+ "serializable": false
957
+ },
958
+ {
959
+ "name": "playAnimation",
960
+ "required": true,
961
+ "type": {
962
+ "kind": "event",
963
+ "payload": "ids: string | string[]",
964
+ "returns": "SelectorQuery"
965
+ },
966
+ "serializable": false
967
+ },
968
+ {
969
+ "name": "pauseAnimation",
970
+ "required": true,
971
+ "type": {
972
+ "kind": "event",
973
+ "payload": "ids: string | string[]",
974
+ "returns": "SelectorQuery"
975
+ },
976
+ "serializable": false
977
+ },
978
+ {
979
+ "name": "cancelAnimation",
980
+ "required": true,
981
+ "type": {
982
+ "kind": "event",
983
+ "payload": "ids: string | string[]",
984
+ "returns": "SelectorQuery"
985
+ },
986
+ "serializable": false
987
+ },
988
+ {
989
+ "name": "setNativeProps",
990
+ "required": true,
991
+ "type": {
992
+ "kind": "event",
993
+ "payload": "nativeProps: Record<string, any>",
994
+ "returns": "SelectorQuery"
995
+ },
996
+ "serializable": false
997
+ }
998
+ ]
999
+ },
1000
+ "serializable": false
1001
+ },
1002
+ {
1003
+ "name": "direct",
1004
+ "required": true,
1005
+ "type": {
1006
+ "kind": "event",
1007
+ "payload": "message: RtMessage"
1008
+ },
1009
+ "serializable": false
1010
+ },
1011
+ {
1012
+ "name": "send",
1013
+ "required": true,
1014
+ "type": {
1015
+ "kind": "event",
1016
+ "payload": "message: RtMessage"
1017
+ },
1018
+ "serializable": false
1019
+ },
1020
+ {
1021
+ "name": "attach",
1022
+ "required": true,
1023
+ "type": {
1024
+ "kind": "event",
1025
+ "payload": "target: NodesRef | null"
1026
+ },
1027
+ "serializable": false
1028
+ },
1029
+ {
1030
+ "name": "attachDirect",
1031
+ "required": true,
1032
+ "type": {
1033
+ "kind": "event",
1034
+ "payload": "handler: ((message: RtMessage) => void) | null"
1035
+ },
1036
+ "serializable": false
1037
+ }
1038
+ ]
1039
+ },
1040
+ "required": true,
1041
+ "serializable": false,
1042
+ "role": "behaviour"
1043
+ },
1044
+ {
1045
+ "name": "promptLink",
1046
+ "type": {
1047
+ "kind": "event",
1048
+ "payload": null,
1049
+ "returns": "Promise<string | null>"
1050
+ },
1051
+ "required": false,
1052
+ "serializable": false,
1053
+ "role": "event",
1054
+ "doc": "Asks for a link's address (the app's dialog); null when cancelled."
1055
+ },
1056
+ {
1057
+ "name": "session",
1058
+ "type": {
1059
+ "kind": "object",
1060
+ "name": "RichTextSession"
1061
+ },
1062
+ "required": true,
1063
+ "serializable": false,
1064
+ "role": "behaviour"
1065
+ },
1066
+ {
1067
+ "name": "surface",
1068
+ "type": {
1069
+ "kind": "enum",
1070
+ "values": [
1071
+ "element",
1072
+ "drawn"
1073
+ ]
1074
+ },
1075
+ "required": false,
1076
+ "serializable": true,
1077
+ "role": "behaviour"
1078
+ },
1079
+ {
1080
+ "name": "today",
1081
+ "type": {
1082
+ "kind": "event",
1083
+ "payload": null,
1084
+ "returns": "string"
1085
+ },
1086
+ "required": false,
1087
+ "serializable": false,
1088
+ "role": "event",
1089
+ "doc": "Today as `YYYY-MM-DD` (the date chip)."
1090
+ },
1091
+ {
1092
+ "name": "toolbar",
1093
+ "type": {
1094
+ "kind": "enum",
1095
+ "values": [
1096
+ "none",
1097
+ "auto",
1098
+ "top",
1099
+ "bottom"
1100
+ ]
1101
+ },
1102
+ "required": false,
1103
+ "serializable": true,
1104
+ "role": "behaviour",
1105
+ "doc": "`'auto'` (default): the bottom on a phone while the text has the focus, else the top."
1106
+ },
1107
+ {
1108
+ "name": "uploadImage",
1109
+ "type": {
1110
+ "kind": "event",
1111
+ "payload": null,
1112
+ "returns": "Promise<{ readonly key: string; readonly alt: string; } | null>"
1113
+ },
1114
+ "required": false,
1115
+ "serializable": false,
1116
+ "role": "event",
1117
+ "doc": "Picks and uploads a picture: its storage key (null when cancelled)."
1118
+ },
1119
+ {
1120
+ "name": "version",
1121
+ "type": {
1122
+ "kind": "number"
1123
+ },
1124
+ "required": true,
1125
+ "serializable": true,
1126
+ "role": "behaviour",
1127
+ "doc": "The session's version ({@link useG9RichTextSession}): the toolbar and suggestions follow it."
1128
+ }
1129
+ ],
1130
+ "anchor": null,
1131
+ "accessibility": {
1132
+ "labelFrom": [
1133
+ "placeholder"
1134
+ ],
1135
+ "labelRequired": false
1136
+ },
1137
+ "targets": {
1138
+ "android": "unmeasured",
1139
+ "ios": "unmeasured",
1140
+ "windows": "unmeasured",
1141
+ "macos": "unmeasured",
1142
+ "web": "unmeasured"
1143
+ },
1144
+ "evidence": {
1145
+ "ledger": []
1146
+ },
1147
+ "tokens": [
1148
+ "Error",
1149
+ "Info",
1150
+ "Outline",
1151
+ "OutlineVariant",
1152
+ "Primary",
1153
+ "PrimaryContainer",
1154
+ "Success",
1155
+ "Surface",
1156
+ "SurfaceContainer",
1157
+ "SurfaceContainerHigh",
1158
+ "TextPrimary",
1159
+ "TextSecondary",
1160
+ "TextTertiary",
1161
+ "Warning"
1162
+ ],
1163
+ "example": {
1164
+ "line": "<G9RichTextEditor editable placeholder=\"placeholder\" port={port} session={session} version={1} />",
1165
+ "from": "generated"
1166
+ }
1167
+ }
1168
+ ],
1169
+ "exports": [
1170
+ {
1171
+ "id": "richtext.element-core.Applied",
1172
+ "export": "Applied",
1173
+ "from": "@g9tm/lynxcontrols-richtext/element-core",
1174
+ "kind": "interface",
1175
+ "signature": "Applied",
1176
+ "summary": "The element's side of the `<g9-richtext>` protocol without any view: what every host's element does with its text, its lines and the app's messages (protocol.ts). The web host's element uses this class as is; the Android element (Kotlin) follows it line by line; tests drive it against a real session."
1177
+ },
1178
+ {
1179
+ "id": "richtext.richtext.compose",
1180
+ "export": "compose",
1181
+ "from": "@g9tm/lynxcontrols-richtext",
1182
+ "kind": "function",
1183
+ "signature": "(a: TextOp, b: TextOp): TextOp",
1184
+ "summary": "`a` then `b` as one operation."
1185
+ },
1186
+ {
1187
+ "id": "richtext.richtext.diff",
1188
+ "export": "diff",
1189
+ "from": "@g9tm/lynxcontrols-richtext",
1190
+ "kind": "function",
1191
+ "signature": "(before: string, after: string, hint?: number): TextOp",
1192
+ "summary": "The smallest single replacement turning `before` into `after` (common prefix and suffix). `hint`: a position the change is known to touch (the caret) — among equal answers the one closest to it is taken, so typing \"a\" after \"a\" is an insert at the caret, not at the start of the run."
1193
+ },
1194
+ {
1195
+ "id": "richtext.element-core.ElementCore",
1196
+ "export": "ElementCore",
1197
+ "from": "@g9tm/lynxcontrols-richtext/element-core",
1198
+ "kind": "class",
1199
+ "signature": "typeof ElementCore",
1200
+ "summary": "The `<g9-richtext>` element's model shared by every host: lines, edits, the caret and the app's messages."
1201
+ },
1202
+ {
1203
+ "id": "richtext.richtext.fromReplacements",
1204
+ "export": "fromReplacements",
1205
+ "from": "@g9tm/lynxcontrols-richtext",
1206
+ "kind": "function",
1207
+ "signature": "(length: number, replacements: Replacement[]): TextOp",
1208
+ "summary": "Several replacements (sequential positions) as one operation on a text of `length`."
1209
+ },
1210
+ {
1211
+ "id": "richtext.yjs.G9_RICH_LOCAL_ORIGIN",
1212
+ "export": "G9_RICH_LOCAL_ORIGIN",
1213
+ "from": "@g9tm/lynxcontrols-richtext/yjs",
1214
+ "kind": "constant",
1215
+ "signature": "{ readonly g9: \"richtext\"; }",
1216
+ "summary": "Origin of this client's own changes (undo tracks only these; the sync pushes everything that is not the server's)."
1217
+ },
1218
+ {
1219
+ "id": "richtext.yjs.G9RichAttrs",
1220
+ "export": "G9RichAttrs",
1221
+ "from": "@g9tm/lynxcontrols-richtext/yjs",
1222
+ "kind": "type",
1223
+ "signature": "Attrs",
1224
+ "summary": "A block's or mark's attributes."
1225
+ },
1226
+ {
1227
+ "id": "richtext.yjs.G9RichBlockType",
1228
+ "export": "G9RichBlockType",
1229
+ "from": "@g9tm/lynxcontrols-richtext/yjs",
1230
+ "kind": "type",
1231
+ "signature": "BlockType",
1232
+ "summary": "A text block's kind."
1233
+ },
1234
+ {
1235
+ "id": "richtext.yjs.G9RichCalloutTone",
1236
+ "export": "G9RichCalloutTone",
1237
+ "from": "@g9tm/lynxcontrols-richtext/yjs",
1238
+ "kind": "type",
1239
+ "signature": "CalloutTone",
1240
+ "summary": "A callout's tone."
1241
+ },
1242
+ {
1243
+ "id": "richtext.yjs.G9RichDocModel",
1244
+ "export": "G9RichDocModel",
1245
+ "from": "@g9tm/lynxcontrols-richtext/yjs",
1246
+ "kind": "class",
1247
+ "signature": "typeof DocModel",
1248
+ "summary": "A Yjs document as flat text with lines, marks and blocks (the element's model of it)."
1249
+ },
1250
+ {
1251
+ "id": "richtext.yjs.G9RichElementPort",
1252
+ "export": "G9RichElementPort",
1253
+ "from": "@g9tm/lynxcontrols-richtext/yjs",
1254
+ "kind": "interface",
1255
+ "signature": "ElementPort",
1256
+ "summary": "One open document between the `<g9-richtext>` element and the Yjs document (protocol.ts): the element's edits go into the model, the model's changes (collaborators, commands, undo) go to the element, and both stay in step although they run on different threads."
1257
+ },
1258
+ {
1259
+ "id": "richtext.richtext.G9RichJsonNode",
1260
+ "export": "G9RichJsonNode",
1261
+ "from": "@g9tm/lynxcontrols-richtext",
1262
+ "kind": "interface",
1263
+ "signature": "JsonNode",
1264
+ "summary": "A ProseMirror JSON node (what `editor.getJSON()` returns)."
1265
+ },
1266
+ {
1267
+ "id": "richtext.richtext.G9RichLinesProps",
1268
+ "export": "G9RichLinesProps",
1269
+ "from": "@g9tm/lynxcontrols-richtext",
1270
+ "kind": "interface",
1271
+ "signature": "G9RichLinesProps",
1272
+ "summary": "Props of `G9RichLines`."
1273
+ },
1274
+ {
1275
+ "id": "richtext.richtext.G9RichLinkOption",
1276
+ "export": "G9RichLinkOption",
1277
+ "from": "@g9tm/lynxcontrols-richtext",
1278
+ "kind": "interface",
1279
+ "signature": "G9RichLinkOption",
1280
+ "summary": "A target `[[` suggests (a task, a document, a meeting)."
1281
+ },
1282
+ {
1283
+ "id": "richtext.yjs.G9RichListKind",
1284
+ "export": "G9RichListKind",
1285
+ "from": "@g9tm/lynxcontrols-richtext/yjs",
1286
+ "kind": "type",
1287
+ "signature": "ListKind",
1288
+ "summary": "A list's kind."
1289
+ },
1290
+ {
1291
+ "id": "richtext.richtext.G9RichMention",
1292
+ "export": "G9RichMention",
1293
+ "from": "@g9tm/lynxcontrols-richtext",
1294
+ "kind": "interface",
1295
+ "signature": "G9RichMention",
1296
+ "summary": "A person `@` suggests."
1297
+ },
1298
+ {
1299
+ "id": "richtext.richtext.G9RichMentionCandidate",
1300
+ "export": "G9RichMentionCandidate",
1301
+ "from": "@g9tm/lynxcontrols-richtext",
1302
+ "kind": "interface",
1303
+ "signature": "MentionCandidate",
1304
+ "summary": "A person a mention can name."
1305
+ },
1306
+ {
1307
+ "id": "richtext.yjs.G9RichModelContext",
1308
+ "export": "G9RichModelContext",
1309
+ "from": "@g9tm/lynxcontrols-richtext/yjs",
1310
+ "kind": "interface",
1311
+ "signature": "ModelContext",
1312
+ "summary": "How the reader sees objects: names, chips, dates, pictures, list numbers (labels come from the app)."
1313
+ },
1314
+ {
1315
+ "id": "richtext.yjs.g9RichPlainContext",
1316
+ "export": "g9RichPlainContext",
1317
+ "from": "@g9tm/lynxcontrols-richtext/yjs",
1318
+ "kind": "constant",
1319
+ "signature": "ModelContext",
1320
+ "summary": "The model context without a schema of the app's (paragraphs, lists, marks)."
1321
+ },
1322
+ {
1323
+ "id": "richtext.yjs.G9RichSelection",
1324
+ "export": "G9RichSelection",
1325
+ "from": "@g9tm/lynxcontrols-richtext/yjs",
1326
+ "kind": "interface",
1327
+ "signature": "Selection",
1328
+ "summary": "A selection in the flat text (anchor and head)."
1329
+ },
1330
+ {
1331
+ "id": "richtext.yjs.G9RichSelectionState",
1332
+ "export": "G9RichSelectionState",
1333
+ "from": "@g9tm/lynxcontrols-richtext/yjs",
1334
+ "kind": "interface",
1335
+ "signature": "SelectionState",
1336
+ "summary": "What the toolbar shows for the selection."
1337
+ },
1338
+ {
1339
+ "id": "richtext.yjs.G9RichSessionOptions",
1340
+ "export": "G9RichSessionOptions",
1341
+ "from": "@g9tm/lynxcontrols-richtext/yjs",
1342
+ "kind": "interface",
1343
+ "signature": "SessionOptions",
1344
+ "summary": "What a session needs: the document, the element's port and its callbacks."
1345
+ },
1346
+ {
1347
+ "id": "richtext.richtext.G9RichTextEditorLabels",
1348
+ "export": "G9RichTextEditorLabels",
1349
+ "from": "@g9tm/lynxcontrols-richtext",
1350
+ "kind": "interface",
1351
+ "signature": "G9RichTextEditorLabels",
1352
+ "summary": "The editor's words (the app's language); English when left out."
1353
+ },
1354
+ {
1355
+ "id": "richtext.richtext.G9RichTextEditorProps",
1356
+ "export": "G9RichTextEditorProps",
1357
+ "from": "@g9tm/lynxcontrols-richtext",
1358
+ "kind": "interface",
1359
+ "signature": "G9RichTextEditorProps",
1360
+ "summary": "Props of `G9RichTextEditor`."
1361
+ },
1362
+ {
1363
+ "id": "richtext.richtext.G9RichTextElementProps",
1364
+ "export": "G9RichTextElementProps",
1365
+ "from": "@g9tm/lynxcontrols-richtext",
1366
+ "kind": "interface",
1367
+ "signature": "G9RichTextElementProps",
1368
+ "summary": "The attributes and events of `<g9-richtext>`."
1369
+ },
1370
+ {
1371
+ "id": "richtext.richtext.g9RichTextPalette",
1372
+ "export": "g9RichTextPalette",
1373
+ "from": "@g9tm/lynxcontrols-richtext",
1374
+ "kind": "function",
1375
+ "signature": "(resolve: (token: string) => string): RtPalette",
1376
+ "summary": "The element's colours from the theme (it cannot read CSS variables)."
1377
+ },
1378
+ {
1379
+ "id": "richtext.richtext.G9RichTextPort",
1380
+ "export": "G9RichTextPort",
1381
+ "from": "@g9tm/lynxcontrols-richtext",
1382
+ "kind": "class",
1383
+ "signature": "typeof G9RichTextPort",
1384
+ "summary": "The session's way to the element: create it first, give it to the session (`port`), then to `G9RichText`. Before the element exists nothing is sent; mounting asks the session for the full state."
1385
+ },
1386
+ {
1387
+ "id": "richtext.richtext.G9RichTextProps",
1388
+ "export": "G9RichTextProps",
1389
+ "from": "@g9tm/lynxcontrols-richtext",
1390
+ "kind": "interface",
1391
+ "signature": "G9RichTextProps",
1392
+ "summary": "Props of `G9RichText`."
1393
+ },
1394
+ {
1395
+ "id": "richtext.yjs.G9RichTextSession",
1396
+ "export": "G9RichTextSession",
1397
+ "from": "@g9tm/lynxcontrols-richtext/yjs",
1398
+ "kind": "class",
1399
+ "signature": "typeof RichTextSession",
1400
+ "summary": "A document and its element together: edits both ways, selection, marks, blocks and undo."
1401
+ },
1402
+ {
1403
+ "id": "richtext.richtext.G9RichTextSessionHandle",
1404
+ "export": "G9RichTextSessionHandle",
1405
+ "from": "@g9tm/lynxcontrols-richtext",
1406
+ "kind": "interface",
1407
+ "signature": "G9RichTextSessionHandle<S>",
1408
+ "summary": "A session with the port and the toolbar's tick."
1409
+ },
1410
+ {
1411
+ "id": "richtext.richtext.G9RichTextSessionLike",
1412
+ "export": "G9RichTextSessionLike",
1413
+ "from": "@g9tm/lynxcontrols-richtext",
1414
+ "kind": "interface",
1415
+ "signature": "G9RichTextSessionLike",
1416
+ "summary": "What drives the element: a session (G9RichTextSession of `@g9tm/lynxcontrols-richtext/yjs`, or the app's own)."
1417
+ },
1418
+ {
1419
+ "id": "richtext.richtext.guillemet",
1420
+ "export": "guillemet",
1421
+ "from": "@g9tm/lynxcontrols-richtext",
1422
+ "kind": "function",
1423
+ "signature": "(pair: string): string | null",
1424
+ "summary": "Persian punctuation typed with a Latin keyboard layout: `<<` → «, `>>` → ». Returns the replacement for the two characters just typed, or null."
1425
+ },
1426
+ {
1427
+ "id": "richtext.richtext.lineClass",
1428
+ "export": "lineClass",
1429
+ "from": "@g9tm/lynxcontrols-richtext",
1430
+ "kind": "function",
1431
+ "signature": "(line: RtLine, rtl?: boolean): string",
1432
+ "summary": "A line's box classes (`rtl`: the line reads right to left)."
1433
+ },
1434
+ {
1435
+ "id": "richtext.richtext.lineStyle",
1436
+ "export": "lineStyle",
1437
+ "from": "@g9tm/lynxcontrols-richtext",
1438
+ "kind": "function",
1439
+ "signature": "(line: RtLine, rtl?: boolean): Record<string, string>",
1440
+ "summary": "A line's indent (on its reading start: physical sides, Lynx has no logical ones) and explicit direction."
1441
+ },
1442
+ {
1443
+ "id": "richtext.element-core.mapPos",
1444
+ "export": "mapPos",
1445
+ "from": "@g9tm/lynxcontrols-richtext/element-core",
1446
+ "kind": "function",
1447
+ "signature": "(pos: number, op: { from: number; to: number; text: string; }): number",
1448
+ "summary": "A position through a replacement; a caret stays before text inserted right at it."
1449
+ },
1450
+ {
1451
+ "id": "richtext.protocol.MARK",
1452
+ "export": "MARK",
1453
+ "from": "@g9tm/lynxcontrols-richtext/protocol",
1454
+ "kind": "constant",
1455
+ "signature": "{ readonly bold: 1; readonly italic: 2; readonly underline: 4; readonly strike: 8; readonly code: 16; readonly link: 32; }",
1456
+ "summary": "Inline marks as bits."
1457
+ },
1458
+ {
1459
+ "id": "richtext.protocol.MarkName",
1460
+ "export": "MarkName",
1461
+ "from": "@g9tm/lynxcontrols-richtext/protocol",
1462
+ "kind": "type",
1463
+ "signature": "\"bold\" | \"link\" | \"strike\" | \"code\" | \"italic\" | \"underline\"",
1464
+ "summary": "An inline mark's name."
1465
+ },
1466
+ {
1467
+ "id": "richtext.richtext.matchPeople",
1468
+ "export": "matchPeople",
1469
+ "from": "@g9tm/lynxcontrols-richtext",
1470
+ "kind": "function",
1471
+ "signature": "(people: MentionCandidate[], query: string, limit?: number, exclude?: string | null): MentionCandidate[]",
1472
+ "summary": "People matching what was typed after"
1473
+ },
1474
+ {
1475
+ "id": "richtext.richtext.mentionIds",
1476
+ "export": "mentionIds",
1477
+ "from": "@g9tm/lynxcontrols-richtext",
1478
+ "kind": "function",
1479
+ "signature": "(node: JsonNode | null | undefined): string[]",
1480
+ "summary": "The distinct people a document mentions, in order of first appearance."
1481
+ },
1482
+ {
1483
+ "id": "richtext.richtext.nextDirection",
1484
+ "export": "nextDirection",
1485
+ "from": "@g9tm/lynxcontrols-richtext",
1486
+ "kind": "function",
1487
+ "signature": "(current: BlockDir): BlockDir",
1488
+ "summary": "The toolbar's direction button cycles: automatic → right-to-left → left-to-right → automatic."
1489
+ },
1490
+ {
1491
+ "id": "richtext.richtext.normalizeForSearch",
1492
+ "export": "normalizeForSearch",
1493
+ "from": "@g9tm/lynxcontrols-richtext",
1494
+ "kind": "function",
1495
+ "signature": "(text: string): string",
1496
+ "summary": "Text for search/indexing comparisons: lower case, Arabic yeh/kaf as Persian, no ZWNJ/tatweel/diacritics — so \"مي‌خواهم\", \"میخواهم\" and \"می‌خواهم\" all match."
1497
+ },
1498
+ {
1499
+ "id": "richtext.protocol.OBJ",
1500
+ "export": "OBJ",
1501
+ "from": "@g9tm/lynxcontrols-richtext/protocol",
1502
+ "kind": "constant",
1503
+ "signature": "\"\"",
1504
+ "summary": "U+FFFC: an inline or block object in the text."
1505
+ },
1506
+ {
1507
+ "id": "richtext.richtext.Replacement",
1508
+ "export": "Replacement",
1509
+ "from": "@g9tm/lynxcontrols-richtext",
1510
+ "kind": "interface",
1511
+ "signature": "Replacement",
1512
+ "summary": "A replaced range and its new text."
1513
+ },
1514
+ {
1515
+ "id": "richtext.richtext.resolvedDirection",
1516
+ "export": "resolvedDirection",
1517
+ "from": "@g9tm/lynxcontrols-richtext",
1518
+ "kind": "function",
1519
+ "signature": "(attr: BlockDir, text: string, fallback: \"ltr\" | \"rtl\"): \"ltr\" | \"rtl\"",
1520
+ "summary": "What a block shows: its explicit direction, else its first strong letter, else the page's direction."
1521
+ },
1522
+ {
1523
+ "id": "richtext.protocol.RtAction",
1524
+ "export": "RtAction",
1525
+ "from": "@g9tm/lynxcontrols-richtext/protocol",
1526
+ "kind": "type",
1527
+ "signature": "RtAction",
1528
+ "summary": "element → app: something besides typing."
1529
+ },
1530
+ {
1531
+ "id": "richtext.protocol.RtApplied",
1532
+ "export": "RtApplied",
1533
+ "from": "@g9tm/lynxcontrols-richtext/protocol",
1534
+ "kind": "interface",
1535
+ "signature": "RtApplied",
1536
+ "summary": "element → app: message `rev` was applied (so the app can forget what came before)."
1537
+ },
1538
+ {
1539
+ "id": "richtext.protocol.RtAtom",
1540
+ "export": "RtAtom",
1541
+ "from": "@g9tm/lynxcontrols-richtext/protocol",
1542
+ "kind": "interface",
1543
+ "signature": "RtAtom",
1544
+ "summary": "An object inside a line (a mention, a picture): one character in the flat text."
1545
+ },
1546
+ {
1547
+ "id": "richtext.protocol.RtEdit",
1548
+ "export": "RtEdit",
1549
+ "from": "@g9tm/lynxcontrols-richtext/protocol",
1550
+ "kind": "interface",
1551
+ "signature": "RtEdit",
1552
+ "summary": "element → app: the user changed the text (replace `from..to` of the element's text, which had `len` characters)."
1553
+ },
1554
+ {
1555
+ "id": "richtext.protocol.RtLine",
1556
+ "export": "RtLine",
1557
+ "from": "@g9tm/lynxcontrols-richtext/protocol",
1558
+ "kind": "interface",
1559
+ "signature": "RtLine",
1560
+ "summary": "The style of one line of the text."
1561
+ },
1562
+ {
1563
+ "id": "richtext.protocol.RtMessage",
1564
+ "export": "RtMessage",
1565
+ "from": "@g9tm/lynxcontrols-richtext/protocol",
1566
+ "kind": "interface",
1567
+ "signature": "RtMessage",
1568
+ "summary": "app → element."
1569
+ },
1570
+ {
1571
+ "id": "richtext.protocol.RtPalette",
1572
+ "export": "RtPalette",
1573
+ "from": "@g9tm/lynxcontrols-richtext/protocol",
1574
+ "kind": "interface",
1575
+ "signature": "RtPalette",
1576
+ "summary": "Colours for the element (it cannot read the app's CSS variables): `#rrggbb` / `#rrggbbaa`."
1577
+ },
1578
+ {
1579
+ "id": "richtext.protocol.RtRun",
1580
+ "export": "RtRun",
1581
+ "from": "@g9tm/lynxcontrols-richtext/protocol",
1582
+ "kind": "interface",
1583
+ "signature": "RtRun",
1584
+ "summary": "One run of a line's text with the same look."
1585
+ },
1586
+ {
1587
+ "id": "richtext.protocol.RtSelect",
1588
+ "export": "RtSelect",
1589
+ "from": "@g9tm/lynxcontrols-richtext/protocol",
1590
+ "kind": "interface",
1591
+ "signature": "RtSelect",
1592
+ "summary": "element → app: the selection after edit `seq` (anchor, head)."
1593
+ },
1594
+ {
1595
+ "id": "richtext.protocol.RtSplice",
1596
+ "export": "RtSplice",
1597
+ "from": "@g9tm/lynxcontrols-richtext/protocol",
1598
+ "kind": "interface",
1599
+ "signature": "RtSplice",
1600
+ "summary": "The line array changed: replace `del` lines at `at` with `ins` (positions in the array as the element has it)."
1601
+ },
1602
+ {
1603
+ "id": "richtext.protocol.SOFT_BREAK",
1604
+ "export": "SOFT_BREAK",
1605
+ "from": "@g9tm/lynxcontrols-richtext/protocol",
1606
+ "kind": "constant",
1607
+ "signature": "\"\\u2028\"",
1608
+ "summary": "U+2028 from the element: a line break inside the paragraph (Shift+Enter), not a new paragraph."
1609
+ },
1610
+ {
1611
+ "id": "richtext.yjs.spliceOf",
1612
+ "export": "spliceOf",
1613
+ "from": "@g9tm/lynxcontrols-richtext/yjs",
1614
+ "kind": "function",
1615
+ "signature": "(before: RtLine[], after: RtLine[]): RtSplice | null",
1616
+ "summary": "The line array change between two states (common start and end kept)."
1617
+ },
1618
+ {
1619
+ "id": "richtext.richtext.textClass",
1620
+ "export": "textClass",
1621
+ "from": "@g9tm/lynxcontrols-richtext",
1622
+ "kind": "function",
1623
+ "signature": "(line: RtLine): string",
1624
+ "summary": "A line's text classes (the heading or code size, a done task struck through)."
1625
+ },
1626
+ {
1627
+ "id": "richtext.richtext.TextOp",
1628
+ "export": "TextOp",
1629
+ "from": "@g9tm/lynxcontrols-richtext",
1630
+ "kind": "class",
1631
+ "signature": "typeof TextOp",
1632
+ "summary": "An operation on a text (retain, insert, delete), composed and transformed."
1633
+ },
1634
+ {
1635
+ "id": "richtext.richtext.transform",
1636
+ "export": "transform",
1637
+ "from": "@g9tm/lynxcontrols-richtext",
1638
+ "kind": "function",
1639
+ "signature": "(a: TextOp, b: TextOp): [TextOp, TextOp]",
1640
+ "summary": "`a` and `b` were made on the same text; returns `[a', b']` with apply(apply(s, a), b') === apply(apply(s, b), a'). Inserts at one place: `a`'s first."
1641
+ },
1642
+ {
1643
+ "id": "richtext.richtext.useG9RichTextSession",
1644
+ "export": "useG9RichTextSession",
1645
+ "from": "@g9tm/lynxcontrols-richtext",
1646
+ "kind": "hook",
1647
+ "signature": "<S extends { destroy?: () => void; }>(create: (port: G9RichTextPort, onState: () => void) => S, deps: readonly unknown[]): G9RichTextSessionHandle<S>",
1648
+ "summary": "Makes the app's session after mount (never during a render) with the editor's port and a throttled state callback, and destroys it on unmount or when `deps` change."
1649
+ },
1650
+ {
1651
+ "id": "richtext.richtext.wantsZwnj",
1652
+ "export": "wantsZwnj",
1653
+ "from": "@g9tm/lynxcontrols-richtext",
1654
+ "kind": "function",
1655
+ "signature": "(textBefore: string): boolean",
1656
+ "summary": "Shift+Space types a ZWNJ right after a Persian/Arabic letter (\"می\" + ZWNJ + \"خواهم\"); elsewhere it is a space."
1657
+ },
1658
+ {
1659
+ "id": "richtext.richtext.ZWNJ",
1660
+ "export": "ZWNJ",
1661
+ "from": "@g9tm/lynxcontrols-richtext",
1662
+ "kind": "constant",
1663
+ "signature": "\"‌\"",
1664
+ "summary": "The zero-width non-joiner (نیم‌فاصله)."
1665
+ }
1666
+ ]
1667
+ }