foldkit-richtext-dom 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/input.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { n as EditorPlacement } from "./editor-bundle-dnjyuk1P.mjs";
1
+ import { EditorPlacement } from "./editor-bundle.mjs";
2
2
  import * as RichText from "foldkit-richtext";
3
3
  import { Schema } from "effect";
4
4
  import { Bundle } from "foldkit-bundle";
@@ -26,7 +26,7 @@ export declare const EditorInput: Bundle.Bundle<"RichTextInput", {
26
26
  } | {
27
27
  readonly type: "Heading";
28
28
  readonly id: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
29
- readonly level: 2 | 1 | 4 | 6 | 3 | 5;
29
+ readonly level: 1 | 2 | 3 | 4 | 5 | 6;
30
30
  readonly children: readonly {
31
31
  readonly type: "Text";
32
32
  readonly id: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
@@ -39,6 +39,12 @@ export declare const EditorInput: Bundle.Bundle<"RichTextInput", {
39
39
  })[];
40
40
  }[];
41
41
  } | {
42
+ readonly type: "Node";
43
+ readonly kind: string;
44
+ readonly id: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
45
+ readonly props: {
46
+ readonly [x: string]: Schema.Json;
47
+ };
42
48
  readonly children: readonly {
43
49
  readonly type: "Text";
44
50
  readonly id: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
@@ -50,12 +56,6 @@ export declare const EditorInput: Bundle.Bundle<"RichTextInput", {
50
56
  };
51
57
  })[];
52
58
  }[];
53
- readonly type: "Node";
54
- readonly id: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
55
- readonly props: {
56
- readonly [x: string]: Schema.Json;
57
- };
58
- readonly kind: string;
59
59
  readonly blocks?: readonly RichText.Block[];
60
60
  } | {
61
61
  readonly type: "Unknown";
@@ -82,12 +82,12 @@ export declare const EditorInput: Bundle.Bundle<"RichTextInput", {
82
82
  readonly anchor: {
83
83
  readonly node: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
84
84
  readonly offset: number;
85
- readonly affinity: "before" | "after";
85
+ readonly affinity: "after" | "before";
86
86
  };
87
87
  readonly focus: {
88
88
  readonly node: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
89
89
  readonly offset: number;
90
- readonly affinity: "before" | "after";
90
+ readonly affinity: "after" | "before";
91
91
  };
92
92
  } | {
93
93
  readonly type: "Node";
@@ -115,7 +115,7 @@ export declare const EditorInput: Bundle.Bundle<"RichTextInput", {
115
115
  } | {
116
116
  readonly type: "Heading";
117
117
  readonly id: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
118
- readonly level: 2 | 1 | 4 | 6 | 3 | 5;
118
+ readonly level: 1 | 2 | 3 | 4 | 5 | 6;
119
119
  readonly children: readonly {
120
120
  readonly type: "Text";
121
121
  readonly id: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
@@ -128,6 +128,12 @@ export declare const EditorInput: Bundle.Bundle<"RichTextInput", {
128
128
  })[];
129
129
  }[];
130
130
  } | {
131
+ readonly type: "Node";
132
+ readonly kind: string;
133
+ readonly id: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
134
+ readonly props: {
135
+ readonly [x: string]: Schema.Json;
136
+ };
131
137
  readonly children: readonly {
132
138
  readonly type: "Text";
133
139
  readonly id: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
@@ -139,12 +145,6 @@ export declare const EditorInput: Bundle.Bundle<"RichTextInput", {
139
145
  };
140
146
  })[];
141
147
  }[];
142
- readonly type: "Node";
143
- readonly id: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
144
- readonly props: {
145
- readonly [x: string]: Schema.Json;
146
- };
147
- readonly kind: string;
148
148
  readonly blocks?: readonly RichText.Block[];
149
149
  } | {
150
150
  readonly type: "Unknown";
@@ -171,12 +171,12 @@ export declare const EditorInput: Bundle.Bundle<"RichTextInput", {
171
171
  readonly anchor: {
172
172
  readonly node: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
173
173
  readonly offset: number;
174
- readonly affinity: "before" | "after";
174
+ readonly affinity: "after" | "before";
175
175
  };
176
176
  readonly focus: {
177
177
  readonly node: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
178
178
  readonly offset: number;
179
- readonly affinity: "before" | "after";
179
+ readonly affinity: "after" | "before";
180
180
  };
181
181
  } | {
182
182
  readonly type: "Node";
@@ -203,7 +203,7 @@ export declare const EditorInput: Bundle.Bundle<"RichTextInput", {
203
203
  } | {
204
204
  readonly type: "Heading";
205
205
  readonly id: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
206
- readonly level: 2 | 1 | 4 | 6 | 3 | 5;
206
+ readonly level: 1 | 2 | 3 | 4 | 5 | 6;
207
207
  readonly children: readonly {
208
208
  readonly type: "Text";
209
209
  readonly id: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
@@ -216,6 +216,12 @@ export declare const EditorInput: Bundle.Bundle<"RichTextInput", {
216
216
  })[];
217
217
  }[];
218
218
  } | {
219
+ readonly type: "Node";
220
+ readonly kind: string;
221
+ readonly id: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
222
+ readonly props: {
223
+ readonly [x: string]: Schema.Json;
224
+ };
219
225
  readonly children: readonly {
220
226
  readonly type: "Text";
221
227
  readonly id: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
@@ -227,12 +233,6 @@ export declare const EditorInput: Bundle.Bundle<"RichTextInput", {
227
233
  };
228
234
  })[];
229
235
  }[];
230
- readonly type: "Node";
231
- readonly id: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
232
- readonly props: {
233
- readonly [x: string]: Schema.Json;
234
- };
235
- readonly kind: string;
236
236
  readonly blocks?: readonly RichText.Block[];
237
237
  } | {
238
238
  readonly type: "Unknown";
@@ -259,12 +259,12 @@ export declare const EditorInput: Bundle.Bundle<"RichTextInput", {
259
259
  readonly anchor: {
260
260
  readonly node: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
261
261
  readonly offset: number;
262
- readonly affinity: "before" | "after";
262
+ readonly affinity: "after" | "before";
263
263
  };
264
264
  readonly focus: {
265
265
  readonly node: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
266
266
  readonly offset: number;
267
- readonly affinity: "before" | "after";
267
+ readonly affinity: "after" | "before";
268
268
  };
269
269
  } | {
270
270
  readonly type: "Node";
@@ -277,18 +277,6 @@ export declare const EditorInput: Bundle.Bundle<"RichTextInput", {
277
277
  readonly menuIndex: number;
278
278
  readonly hostId: string;
279
279
  }, {
280
- readonly _tag: "Typed";
281
- readonly text: string;
282
- } | {
283
- readonly _tag: "Backspace";
284
- } | {
285
- readonly _tag: "DeletedForward";
286
- } | {
287
- readonly _tag: "Entered";
288
- } | {
289
- readonly _tag: "ToggledMark";
290
- readonly mark: string;
291
- } | {
292
280
  readonly _tag: "AppliedMark";
293
281
  readonly mark: string | {
294
282
  readonly name: string;
@@ -296,25 +284,11 @@ export declare const EditorInput: Bundle.Bundle<"RichTextInput", {
296
284
  readonly [x: string]: Schema.Json;
297
285
  };
298
286
  };
287
+ } | {
288
+ readonly _tag: "Backspace";
299
289
  } | {
300
290
  readonly _tag: "ClearedMark";
301
291
  readonly mark: string;
302
- } | {
303
- readonly _tag: "RetypedBlock";
304
- readonly block: {
305
- readonly type: "Paragraph";
306
- } | {
307
- readonly type: "Heading";
308
- readonly level: 2 | 1 | 4 | 6 | 3 | 5;
309
- };
310
- } | {
311
- readonly _tag: "WrappedBlock";
312
- readonly containers: readonly {
313
- readonly kind: string;
314
- readonly props?: {
315
- readonly [x: string]: Schema.Json;
316
- };
317
- }[];
318
292
  } | {
319
293
  readonly _tag: "ConvertedBlock";
320
294
  readonly to: {
@@ -323,6 +297,10 @@ export declare const EditorInput: Bundle.Bundle<"RichTextInput", {
323
297
  readonly [x: string]: Schema.Json;
324
298
  };
325
299
  };
300
+ } | {
301
+ readonly _tag: "DeletedForward";
302
+ } | {
303
+ readonly _tag: "Entered";
326
304
  } | {
327
305
  readonly _tag: "LiftedBlock";
328
306
  } | {
@@ -335,24 +313,6 @@ export declare const EditorInput: Bundle.Bundle<"RichTextInput", {
335
313
  readonly after: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
336
314
  readonly before?: never;
337
315
  };
338
- } | {
339
- readonly _tag: "Selected";
340
- readonly selection: {
341
- readonly type: "Range";
342
- readonly anchor: {
343
- readonly node: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
344
- readonly offset: number;
345
- readonly affinity: "before" | "after";
346
- };
347
- readonly focus: {
348
- readonly node: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
349
- readonly offset: number;
350
- readonly affinity: "before" | "after";
351
- };
352
- } | {
353
- readonly type: "Node";
354
- readonly node: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
355
- } | null;
356
316
  } | {
357
317
  readonly _tag: "Pasted";
358
318
  readonly slice: {
@@ -374,7 +334,7 @@ export declare const EditorInput: Bundle.Bundle<"RichTextInput", {
374
334
  } | {
375
335
  readonly type: "Heading";
376
336
  readonly id: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
377
- readonly level: 2 | 1 | 4 | 6 | 3 | 5;
337
+ readonly level: 1 | 2 | 3 | 4 | 5 | 6;
378
338
  readonly children: readonly {
379
339
  readonly type: "Text";
380
340
  readonly id: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
@@ -387,6 +347,12 @@ export declare const EditorInput: Bundle.Bundle<"RichTextInput", {
387
347
  })[];
388
348
  }[];
389
349
  } | {
350
+ readonly type: "Node";
351
+ readonly kind: string;
352
+ readonly id: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
353
+ readonly props: {
354
+ readonly [x: string]: Schema.Json;
355
+ };
390
356
  readonly children: readonly {
391
357
  readonly type: "Text";
392
358
  readonly id: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
@@ -398,12 +364,6 @@ export declare const EditorInput: Bundle.Bundle<"RichTextInput", {
398
364
  };
399
365
  })[];
400
366
  }[];
401
- readonly type: "Node";
402
- readonly id: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
403
- readonly props: {
404
- readonly [x: string]: Schema.Json;
405
- };
406
- readonly kind: string;
407
367
  readonly blocks?: readonly RichText.Block[];
408
368
  } | {
409
369
  readonly type: "Unknown";
@@ -426,11 +386,51 @@ export declare const EditorInput: Bundle.Bundle<"RichTextInput", {
426
386
  })[];
427
387
  };
428
388
  } | {
429
- readonly _tag: "Undone";
389
+ readonly _tag: "Patched";
430
390
  } | {
431
391
  readonly _tag: "Redone";
432
392
  } | {
433
- readonly _tag: "Patched";
393
+ readonly _tag: "RetypedBlock";
394
+ readonly block: {
395
+ readonly type: "Paragraph";
396
+ } | {
397
+ readonly type: "Heading";
398
+ readonly level: 1 | 2 | 3 | 4 | 5 | 6;
399
+ };
400
+ } | {
401
+ readonly _tag: "Selected";
402
+ readonly selection: {
403
+ readonly type: "Range";
404
+ readonly anchor: {
405
+ readonly node: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
406
+ readonly offset: number;
407
+ readonly affinity: "after" | "before";
408
+ };
409
+ readonly focus: {
410
+ readonly node: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
411
+ readonly offset: number;
412
+ readonly affinity: "after" | "before";
413
+ };
414
+ } | {
415
+ readonly type: "Node";
416
+ readonly node: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
417
+ } | null;
418
+ } | {
419
+ readonly _tag: "ToggledMark";
420
+ readonly mark: string;
421
+ } | {
422
+ readonly _tag: "Typed";
423
+ readonly text: string;
424
+ } | {
425
+ readonly _tag: "Undone";
426
+ } | {
427
+ readonly _tag: "WrappedBlock";
428
+ readonly containers: readonly {
429
+ readonly kind: string;
430
+ readonly props?: {
431
+ readonly [x: string]: Schema.Json;
432
+ };
433
+ }[];
434
434
  }, never, never, never, void, {}, {}>;
435
435
  /**
436
436
  * A form control editing a document, placed at `hostId` with everything `editorAt` places
@@ -457,7 +457,7 @@ export declare const richTextInput: (hostId: string, placement?: EditorPlacement
457
457
  } | {
458
458
  readonly type: "Heading";
459
459
  readonly id: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
460
- readonly level: 2 | 1 | 4 | 6 | 3 | 5;
460
+ readonly level: 1 | 2 | 3 | 4 | 5 | 6;
461
461
  readonly children: readonly {
462
462
  readonly type: "Text";
463
463
  readonly id: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
@@ -470,6 +470,12 @@ export declare const richTextInput: (hostId: string, placement?: EditorPlacement
470
470
  })[];
471
471
  }[];
472
472
  } | {
473
+ readonly type: "Node";
474
+ readonly kind: string;
475
+ readonly id: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
476
+ readonly props: {
477
+ readonly [x: string]: Schema.Json;
478
+ };
473
479
  readonly children: readonly {
474
480
  readonly type: "Text";
475
481
  readonly id: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
@@ -481,12 +487,6 @@ export declare const richTextInput: (hostId: string, placement?: EditorPlacement
481
487
  };
482
488
  })[];
483
489
  }[];
484
- readonly type: "Node";
485
- readonly id: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
486
- readonly props: {
487
- readonly [x: string]: Schema.Json;
488
- };
489
- readonly kind: string;
490
490
  readonly blocks?: readonly RichText.Block[];
491
491
  } | {
492
492
  readonly type: "Unknown";
@@ -513,12 +513,12 @@ export declare const richTextInput: (hostId: string, placement?: EditorPlacement
513
513
  readonly anchor: {
514
514
  readonly node: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
515
515
  readonly offset: number;
516
- readonly affinity: "before" | "after";
516
+ readonly affinity: "after" | "before";
517
517
  };
518
518
  readonly focus: {
519
519
  readonly node: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
520
520
  readonly offset: number;
521
- readonly affinity: "before" | "after";
521
+ readonly affinity: "after" | "before";
522
522
  };
523
523
  } | {
524
524
  readonly type: "Node";
@@ -546,7 +546,7 @@ export declare const richTextInput: (hostId: string, placement?: EditorPlacement
546
546
  } | {
547
547
  readonly type: "Heading";
548
548
  readonly id: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
549
- readonly level: 2 | 1 | 4 | 6 | 3 | 5;
549
+ readonly level: 1 | 2 | 3 | 4 | 5 | 6;
550
550
  readonly children: readonly {
551
551
  readonly type: "Text";
552
552
  readonly id: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
@@ -559,6 +559,12 @@ export declare const richTextInput: (hostId: string, placement?: EditorPlacement
559
559
  })[];
560
560
  }[];
561
561
  } | {
562
+ readonly type: "Node";
563
+ readonly kind: string;
564
+ readonly id: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
565
+ readonly props: {
566
+ readonly [x: string]: Schema.Json;
567
+ };
562
568
  readonly children: readonly {
563
569
  readonly type: "Text";
564
570
  readonly id: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
@@ -570,12 +576,6 @@ export declare const richTextInput: (hostId: string, placement?: EditorPlacement
570
576
  };
571
577
  })[];
572
578
  }[];
573
- readonly type: "Node";
574
- readonly id: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
575
- readonly props: {
576
- readonly [x: string]: Schema.Json;
577
- };
578
- readonly kind: string;
579
579
  readonly blocks?: readonly RichText.Block[];
580
580
  } | {
581
581
  readonly type: "Unknown";
@@ -602,12 +602,12 @@ export declare const richTextInput: (hostId: string, placement?: EditorPlacement
602
602
  readonly anchor: {
603
603
  readonly node: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
604
604
  readonly offset: number;
605
- readonly affinity: "before" | "after";
605
+ readonly affinity: "after" | "before";
606
606
  };
607
607
  readonly focus: {
608
608
  readonly node: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
609
609
  readonly offset: number;
610
- readonly affinity: "before" | "after";
610
+ readonly affinity: "after" | "before";
611
611
  };
612
612
  } | {
613
613
  readonly type: "Node";
@@ -634,7 +634,7 @@ export declare const richTextInput: (hostId: string, placement?: EditorPlacement
634
634
  } | {
635
635
  readonly type: "Heading";
636
636
  readonly id: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
637
- readonly level: 2 | 1 | 4 | 6 | 3 | 5;
637
+ readonly level: 1 | 2 | 3 | 4 | 5 | 6;
638
638
  readonly children: readonly {
639
639
  readonly type: "Text";
640
640
  readonly id: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
@@ -647,6 +647,12 @@ export declare const richTextInput: (hostId: string, placement?: EditorPlacement
647
647
  })[];
648
648
  }[];
649
649
  } | {
650
+ readonly type: "Node";
651
+ readonly kind: string;
652
+ readonly id: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
653
+ readonly props: {
654
+ readonly [x: string]: Schema.Json;
655
+ };
650
656
  readonly children: readonly {
651
657
  readonly type: "Text";
652
658
  readonly id: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
@@ -658,12 +664,6 @@ export declare const richTextInput: (hostId: string, placement?: EditorPlacement
658
664
  };
659
665
  })[];
660
666
  }[];
661
- readonly type: "Node";
662
- readonly id: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
663
- readonly props: {
664
- readonly [x: string]: Schema.Json;
665
- };
666
- readonly kind: string;
667
667
  readonly blocks?: readonly RichText.Block[];
668
668
  } | {
669
669
  readonly type: "Unknown";
@@ -690,12 +690,12 @@ export declare const richTextInput: (hostId: string, placement?: EditorPlacement
690
690
  readonly anchor: {
691
691
  readonly node: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
692
692
  readonly offset: number;
693
- readonly affinity: "before" | "after";
693
+ readonly affinity: "after" | "before";
694
694
  };
695
695
  readonly focus: {
696
696
  readonly node: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
697
697
  readonly offset: number;
698
- readonly affinity: "before" | "after";
698
+ readonly affinity: "after" | "before";
699
699
  };
700
700
  } | {
701
701
  readonly type: "Node";
@@ -708,18 +708,6 @@ export declare const richTextInput: (hostId: string, placement?: EditorPlacement
708
708
  readonly menuIndex: number;
709
709
  readonly hostId: string;
710
710
  }, {
711
- readonly _tag: "Typed";
712
- readonly text: string;
713
- } | {
714
- readonly _tag: "Backspace";
715
- } | {
716
- readonly _tag: "DeletedForward";
717
- } | {
718
- readonly _tag: "Entered";
719
- } | {
720
- readonly _tag: "ToggledMark";
721
- readonly mark: string;
722
- } | {
723
711
  readonly _tag: "AppliedMark";
724
712
  readonly mark: string | {
725
713
  readonly name: string;
@@ -727,25 +715,11 @@ export declare const richTextInput: (hostId: string, placement?: EditorPlacement
727
715
  readonly [x: string]: Schema.Json;
728
716
  };
729
717
  };
718
+ } | {
719
+ readonly _tag: "Backspace";
730
720
  } | {
731
721
  readonly _tag: "ClearedMark";
732
722
  readonly mark: string;
733
- } | {
734
- readonly _tag: "RetypedBlock";
735
- readonly block: {
736
- readonly type: "Paragraph";
737
- } | {
738
- readonly type: "Heading";
739
- readonly level: 2 | 1 | 4 | 6 | 3 | 5;
740
- };
741
- } | {
742
- readonly _tag: "WrappedBlock";
743
- readonly containers: readonly {
744
- readonly kind: string;
745
- readonly props?: {
746
- readonly [x: string]: Schema.Json;
747
- };
748
- }[];
749
723
  } | {
750
724
  readonly _tag: "ConvertedBlock";
751
725
  readonly to: {
@@ -754,6 +728,10 @@ export declare const richTextInput: (hostId: string, placement?: EditorPlacement
754
728
  readonly [x: string]: Schema.Json;
755
729
  };
756
730
  };
731
+ } | {
732
+ readonly _tag: "DeletedForward";
733
+ } | {
734
+ readonly _tag: "Entered";
757
735
  } | {
758
736
  readonly _tag: "LiftedBlock";
759
737
  } | {
@@ -766,24 +744,6 @@ export declare const richTextInput: (hostId: string, placement?: EditorPlacement
766
744
  readonly after: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
767
745
  readonly before?: never;
768
746
  };
769
- } | {
770
- readonly _tag: "Selected";
771
- readonly selection: {
772
- readonly type: "Range";
773
- readonly anchor: {
774
- readonly node: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
775
- readonly offset: number;
776
- readonly affinity: "before" | "after";
777
- };
778
- readonly focus: {
779
- readonly node: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
780
- readonly offset: number;
781
- readonly affinity: "before" | "after";
782
- };
783
- } | {
784
- readonly type: "Node";
785
- readonly node: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
786
- } | null;
787
747
  } | {
788
748
  readonly _tag: "Pasted";
789
749
  readonly slice: {
@@ -805,7 +765,7 @@ export declare const richTextInput: (hostId: string, placement?: EditorPlacement
805
765
  } | {
806
766
  readonly type: "Heading";
807
767
  readonly id: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
808
- readonly level: 2 | 1 | 4 | 6 | 3 | 5;
768
+ readonly level: 1 | 2 | 3 | 4 | 5 | 6;
809
769
  readonly children: readonly {
810
770
  readonly type: "Text";
811
771
  readonly id: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
@@ -818,6 +778,12 @@ export declare const richTextInput: (hostId: string, placement?: EditorPlacement
818
778
  })[];
819
779
  }[];
820
780
  } | {
781
+ readonly type: "Node";
782
+ readonly kind: string;
783
+ readonly id: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
784
+ readonly props: {
785
+ readonly [x: string]: Schema.Json;
786
+ };
821
787
  readonly children: readonly {
822
788
  readonly type: "Text";
823
789
  readonly id: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
@@ -829,12 +795,6 @@ export declare const richTextInput: (hostId: string, placement?: EditorPlacement
829
795
  };
830
796
  })[];
831
797
  }[];
832
- readonly type: "Node";
833
- readonly id: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
834
- readonly props: {
835
- readonly [x: string]: Schema.Json;
836
- };
837
- readonly kind: string;
838
798
  readonly blocks?: readonly RichText.Block[];
839
799
  } | {
840
800
  readonly type: "Unknown";
@@ -857,11 +817,51 @@ export declare const richTextInput: (hostId: string, placement?: EditorPlacement
857
817
  })[];
858
818
  };
859
819
  } | {
860
- readonly _tag: "Undone";
820
+ readonly _tag: "Patched";
861
821
  } | {
862
822
  readonly _tag: "Redone";
863
823
  } | {
864
- readonly _tag: "Patched";
824
+ readonly _tag: "RetypedBlock";
825
+ readonly block: {
826
+ readonly type: "Paragraph";
827
+ } | {
828
+ readonly type: "Heading";
829
+ readonly level: 1 | 2 | 3 | 4 | 5 | 6;
830
+ };
831
+ } | {
832
+ readonly _tag: "Selected";
833
+ readonly selection: {
834
+ readonly type: "Range";
835
+ readonly anchor: {
836
+ readonly node: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
837
+ readonly offset: number;
838
+ readonly affinity: "after" | "before";
839
+ };
840
+ readonly focus: {
841
+ readonly node: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
842
+ readonly offset: number;
843
+ readonly affinity: "after" | "before";
844
+ };
845
+ } | {
846
+ readonly type: "Node";
847
+ readonly node: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
848
+ } | null;
849
+ } | {
850
+ readonly _tag: "ToggledMark";
851
+ readonly mark: string;
852
+ } | {
853
+ readonly _tag: "Typed";
854
+ readonly text: string;
855
+ } | {
856
+ readonly _tag: "Undone";
857
+ } | {
858
+ readonly _tag: "WrappedBlock";
859
+ readonly containers: readonly {
860
+ readonly kind: string;
861
+ readonly props?: {
862
+ readonly [x: string]: Schema.Json;
863
+ };
864
+ }[];
865
865
  }, {
866
866
  readonly version: 1;
867
867
  readonly children: readonly ({
@@ -881,7 +881,7 @@ export declare const richTextInput: (hostId: string, placement?: EditorPlacement
881
881
  } | {
882
882
  readonly type: "Heading";
883
883
  readonly id: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
884
- readonly level: 2 | 1 | 4 | 6 | 3 | 5;
884
+ readonly level: 1 | 2 | 3 | 4 | 5 | 6;
885
885
  readonly children: readonly {
886
886
  readonly type: "Text";
887
887
  readonly id: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
@@ -894,6 +894,12 @@ export declare const richTextInput: (hostId: string, placement?: EditorPlacement
894
894
  })[];
895
895
  }[];
896
896
  } | {
897
+ readonly type: "Node";
898
+ readonly kind: string;
899
+ readonly id: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
900
+ readonly props: {
901
+ readonly [x: string]: Schema.Json;
902
+ };
897
903
  readonly children: readonly {
898
904
  readonly type: "Text";
899
905
  readonly id: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
@@ -905,12 +911,6 @@ export declare const richTextInput: (hostId: string, placement?: EditorPlacement
905
911
  };
906
912
  })[];
907
913
  }[];
908
- readonly type: "Node";
909
- readonly id: string & import("effect/Brand").Brand<"foldkit-richtext/NodeId">;
910
- readonly props: {
911
- readonly [x: string]: Schema.Json;
912
- };
913
- readonly kind: string;
914
914
  readonly blocks?: readonly RichText.Block[];
915
915
  } | {
916
916
  readonly type: "Unknown";
@@ -1 +1 @@
1
- {"version":3,"file":"input.d.mts","names":[],"sources":["../src/input.ts"],"mappings":";;;;;;qBAyCa,aAAW,OAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBA6BX,gBAAiB,gBAAgB,YAAW,2CAAoB"}
1
+ {"version":3,"file":"input.d.mts","names":[],"sources":["../src/input.ts"],"mappings":";;;;;;qBAyCa,aAAW,OAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBA6BX,gBAAa,gBAAkB,YAAa,2CAAe"}
@@ -1 +1 @@
1
- {"version":3,"file":"toolbar.d.mts","names":[],"sources":["../src/floating.ts","../src/drag.ts","../src/toolbar.ts"],"mappings":";;;;;;qBAyJa,iBAAe,MAAA;;;;;;;qBAmBf,aAAW,MAAA;;;;;;;;;;;qBCuDX,WAAS,MAAA;;;;;;;;;;;;;;;;;;;iBCvNL;WACN,UAAU,SAAS;WACnB,WAAW,SAAS;WACpB,aAAa;;iBAGP,eAAe;WACrB,OAAO;;WAEP,QAAQ;;WAER,YAAY,iBAAiB;;;;;;;qBAQ3B,aAAc,OAAO,cAAc;;qBAMnC,eACV,SAAS,SAAS,eAAe,cACjC,GAAG,YAAY,aAAW"}
1
+ {"version":3,"file":"toolbar.d.mts","names":[],"sources":["../src/floating.ts","../src/drag.ts","../src/toolbar.ts"],"mappings":";;;;;;qBAyJa,iBAAe,MAAA;;;;;;;qBAmBf,aAAW,MAAA;;;;;;;;;;;qBCuDX,WAAS,MAAA;;;;;;;;;;;;;;;;;;;iBCvNL;WACN,UAAU,SAAS;WACnB,WAAW,SAAS;WACpB,aAAa;;iBAGP,eAAe;WACrB,OAAO;;WAEP,QAAQ;;WAER,YAAY,iBAAiB;;;;;;;qBAQ3B,aAAU,OAAW,cAAY;;qBAMjC,eACV,SAAO,SAAW,eAAe,cAAQ,GACtC,YAAY,aAAW"}
@@ -1 +1 @@
1
- {"version":3,"file":"view.d.mts","names":[],"sources":["../src/view.ts"],"mappings":";;;;qBA2Ha,eACX,QAAQ,cAAc,SAAS,QAC/B,WAAU,SAAS,cAClB,cAAc;;;;;;;qBAQJ,iBACX,UAAU,SAAS,UACnB,WAAU,SAAS,WACnB,cAAa,SAAS,kBACrB;;;;;;;qBAsEU,iBACX,UAAU,SAAS,UACnB,WAAU,SAAS,WACnB,cAAa,SAAS,kBACrB"}
1
+ {"version":3,"file":"view.d.mts","names":[],"sources":["../src/view.ts"],"mappings":";;;;qBA2Ha,eAAY,QACf,cAAc,SAAS,QAAM,WAC3B,SAAS,cAClB,cAAc;;;;;;;qBAQJ,iBAAc,UACf,SAAS,UAAQ,WACjB,SAAS,WAAS,cACf,SAAS,kBACrB;;;;;;;qBAsEU,iBAAc,UACf,SAAS,UAAQ,WACjB,SAAS,WAAS,cACf,SAAS,kBACrB"}