@rcarls/rc-textarea 0.6.0 → 0.7.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/CHANGELOG.md +189 -0
- package/README.md +67 -31
- package/dist/custom-elements.json +612 -21
- package/dist/folding-action-controller-sxM3IomW.js +91 -0
- package/dist/folding-action-controller-sxM3IomW.js.map +1 -0
- package/dist/{line-actions-controller-BcsnmSPS.js → line-actions-controller-DUdXQxMA.js} +912 -790
- package/dist/line-actions-controller-DUdXQxMA.js.map +1 -0
- package/dist/rc-textarea-define.js +2 -2
- package/dist/rc-textarea-folding.js +5 -0
- package/dist/rc-textarea-folding.js.map +1 -0
- package/dist/rc-textarea.js +1 -1
- package/dist/types/packages/rc-textarea/src/decoration.d.ts +1 -0
- package/dist/types/packages/rc-textarea/src/document.d.ts +1 -0
- package/dist/types/packages/rc-textarea/src/folding-action-controller.d.ts +46 -0
- package/dist/types/packages/rc-textarea/src/folding.d.ts +2 -0
- package/dist/types/packages/rc-textarea/src/index.d.ts +1 -1
- package/dist/types/packages/rc-textarea/src/line-actions-controller.d.ts +4 -3
- package/dist/types/packages/rc-textarea/src/rc-textarea.d.ts +119 -18
- package/dist/types/packages/rc-textarea/src/selection.d.ts +2 -0
- package/dist/types/packages/rc-textarea/src/types.d.ts +52 -9
- package/package.json +9 -3
- package/dist/line-actions-controller-BcsnmSPS.js.map +0 -1
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
],
|
|
61
|
-
"description": "Remap all decorations in `decorations` from positions in `oldValue` to\npositions in `newValue`, assuming a single contiguous edit.\n\n- `MarkDecoration`: remapped via `remapMarkRange`; dropped if collapsed.\n- `LineDecoration`: dropped if its line falls within the deleted region;\n otherwise shifted by the line delta.\n- `WidgetDecoration`: treated like a zero-width mark at its offset.\n\nReturns a new array. The input array and its elements are not mutated."
|
|
61
|
+
"description": "Remap all decorations in `decorations` from positions in `oldValue` to\npositions in `newValue`, assuming a single contiguous edit.\n\n- `MarkDecoration`: remapped via `remapMarkRange`; dropped if collapsed.\n- `LineDecoration`: dropped if its line falls within the deleted region;\n otherwise shifted by the line delta.\n- `WidgetDecoration`: treated like a zero-width mark at its offset.\n- `FoldDecoration`: dropped; the owning plugin recalculates source ranges.\n\nReturns a new array. The input array and its elements are not mutated."
|
|
62
62
|
},
|
|
63
63
|
{
|
|
64
64
|
"kind": "function",
|
|
@@ -280,6 +280,13 @@
|
|
|
280
280
|
"readonly": true,
|
|
281
281
|
"default": "new RCScrollBlot(registry, $documentRoot)"
|
|
282
282
|
},
|
|
283
|
+
{
|
|
284
|
+
"kind": "field",
|
|
285
|
+
"name": "lineSignatures",
|
|
286
|
+
"privacy": "private",
|
|
287
|
+
"readonly": true,
|
|
288
|
+
"default": "new WeakMap<HTMLElement, string>()"
|
|
289
|
+
},
|
|
283
290
|
{
|
|
284
291
|
"kind": "method",
|
|
285
292
|
"name": "build",
|
|
@@ -353,6 +360,206 @@
|
|
|
353
360
|
}
|
|
354
361
|
]
|
|
355
362
|
},
|
|
363
|
+
{
|
|
364
|
+
"kind": "javascript-module",
|
|
365
|
+
"path": "src/folding-action-controller.ts",
|
|
366
|
+
"declarations": [
|
|
367
|
+
{
|
|
368
|
+
"kind": "class",
|
|
369
|
+
"description": "Reconcile independent, accessible folding actions without owning their content.",
|
|
370
|
+
"name": "FoldingActionController",
|
|
371
|
+
"members": [
|
|
372
|
+
{
|
|
373
|
+
"kind": "field",
|
|
374
|
+
"name": "entries",
|
|
375
|
+
"privacy": "private",
|
|
376
|
+
"readonly": true,
|
|
377
|
+
"default": "new Map<string, Entry>()"
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
"kind": "field",
|
|
381
|
+
"name": "gutterGroupElements",
|
|
382
|
+
"privacy": "private",
|
|
383
|
+
"readonly": true,
|
|
384
|
+
"default": "new Map<number, HTMLElement>()"
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
"kind": "field",
|
|
388
|
+
"name": "api",
|
|
389
|
+
"type": {
|
|
390
|
+
"text": "RCTextareaPluginAPI"
|
|
391
|
+
},
|
|
392
|
+
"privacy": "private",
|
|
393
|
+
"readonly": true,
|
|
394
|
+
"default": "api"
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
"kind": "field",
|
|
398
|
+
"name": "options",
|
|
399
|
+
"type": {
|
|
400
|
+
"text": "FoldingActionControllerOptions"
|
|
401
|
+
},
|
|
402
|
+
"privacy": "private",
|
|
403
|
+
"readonly": true,
|
|
404
|
+
"default": "options"
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
"kind": "method",
|
|
408
|
+
"name": "updateIcon",
|
|
409
|
+
"privacy": "private",
|
|
410
|
+
"return": {
|
|
411
|
+
"type": {
|
|
412
|
+
"text": "void"
|
|
413
|
+
}
|
|
414
|
+
},
|
|
415
|
+
"parameters": [
|
|
416
|
+
{
|
|
417
|
+
"name": "entry",
|
|
418
|
+
"type": {
|
|
419
|
+
"text": "Entry"
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
]
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
"kind": "method",
|
|
426
|
+
"name": "applyState",
|
|
427
|
+
"privacy": "private",
|
|
428
|
+
"return": {
|
|
429
|
+
"type": {
|
|
430
|
+
"text": "void"
|
|
431
|
+
}
|
|
432
|
+
},
|
|
433
|
+
"parameters": [
|
|
434
|
+
{
|
|
435
|
+
"name": "entry",
|
|
436
|
+
"type": {
|
|
437
|
+
"text": "Entry"
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
]
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
"kind": "method",
|
|
444
|
+
"name": "getDecorations",
|
|
445
|
+
"return": {
|
|
446
|
+
"type": {
|
|
447
|
+
"text": "DecorationInput[]"
|
|
448
|
+
}
|
|
449
|
+
},
|
|
450
|
+
"parameters": [
|
|
451
|
+
{
|
|
452
|
+
"name": "actions",
|
|
453
|
+
"type": {
|
|
454
|
+
"text": "readonly FoldingAction[]"
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
],
|
|
458
|
+
"description": "Return trigger and collapsed-range decorations; callers provide any panel widget."
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
"kind": "method",
|
|
462
|
+
"name": "isExpanded",
|
|
463
|
+
"return": {
|
|
464
|
+
"type": {
|
|
465
|
+
"text": "boolean | undefined"
|
|
466
|
+
}
|
|
467
|
+
},
|
|
468
|
+
"parameters": [
|
|
469
|
+
{
|
|
470
|
+
"name": "key",
|
|
471
|
+
"type": {
|
|
472
|
+
"text": "string"
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
],
|
|
476
|
+
"description": "Get expansion state for an existing key."
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
"kind": "method",
|
|
480
|
+
"name": "clear",
|
|
481
|
+
"return": {
|
|
482
|
+
"type": {
|
|
483
|
+
"text": "void"
|
|
484
|
+
}
|
|
485
|
+
},
|
|
486
|
+
"description": "Discard expansion state and return focus before removing a focused control."
|
|
487
|
+
},
|
|
488
|
+
{
|
|
489
|
+
"kind": "method",
|
|
490
|
+
"name": "release",
|
|
491
|
+
"privacy": "private",
|
|
492
|
+
"return": {
|
|
493
|
+
"type": {
|
|
494
|
+
"text": "void"
|
|
495
|
+
}
|
|
496
|
+
},
|
|
497
|
+
"parameters": [
|
|
498
|
+
{
|
|
499
|
+
"name": "entry",
|
|
500
|
+
"type": {
|
|
501
|
+
"text": "Entry"
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
]
|
|
505
|
+
}
|
|
506
|
+
]
|
|
507
|
+
},
|
|
508
|
+
{
|
|
509
|
+
"kind": "variable",
|
|
510
|
+
"name": "$button"
|
|
511
|
+
}
|
|
512
|
+
],
|
|
513
|
+
"exports": [
|
|
514
|
+
{
|
|
515
|
+
"kind": "js",
|
|
516
|
+
"name": "FoldingActionController",
|
|
517
|
+
"declaration": {
|
|
518
|
+
"name": "FoldingActionController",
|
|
519
|
+
"module": "src/folding-action-controller.ts"
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
]
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
"kind": "javascript-module",
|
|
526
|
+
"path": "src/folding.ts",
|
|
527
|
+
"declarations": [],
|
|
528
|
+
"exports": [
|
|
529
|
+
{
|
|
530
|
+
"kind": "js",
|
|
531
|
+
"name": "FoldingActionController",
|
|
532
|
+
"declaration": {
|
|
533
|
+
"name": "FoldingActionController",
|
|
534
|
+
"module": "./folding-action-controller.js"
|
|
535
|
+
}
|
|
536
|
+
},
|
|
537
|
+
{
|
|
538
|
+
"kind": "js",
|
|
539
|
+
"name": "FoldingAction",
|
|
540
|
+
"declaration": {
|
|
541
|
+
"name": "FoldingAction",
|
|
542
|
+
"module": "./folding-action-controller.js"
|
|
543
|
+
}
|
|
544
|
+
},
|
|
545
|
+
{
|
|
546
|
+
"kind": "js",
|
|
547
|
+
"name": "FoldingActionControllerOptions",
|
|
548
|
+
"declaration": {
|
|
549
|
+
"name": "FoldingActionControllerOptions",
|
|
550
|
+
"module": "./folding-action-controller.js"
|
|
551
|
+
}
|
|
552
|
+
},
|
|
553
|
+
{
|
|
554
|
+
"kind": "js",
|
|
555
|
+
"name": "SourceFoldRange",
|
|
556
|
+
"declaration": {
|
|
557
|
+
"name": "SourceFoldRange",
|
|
558
|
+
"module": "./folding-action-controller.js"
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
]
|
|
562
|
+
},
|
|
356
563
|
{
|
|
357
564
|
"kind": "javascript-module",
|
|
358
565
|
"path": "src/index.ts",
|
|
@@ -414,6 +621,14 @@
|
|
|
414
621
|
"module": "./types.js"
|
|
415
622
|
}
|
|
416
623
|
},
|
|
624
|
+
{
|
|
625
|
+
"kind": "js",
|
|
626
|
+
"name": "FoldDecoration",
|
|
627
|
+
"declaration": {
|
|
628
|
+
"name": "FoldDecoration",
|
|
629
|
+
"module": "./types.js"
|
|
630
|
+
}
|
|
631
|
+
},
|
|
417
632
|
{
|
|
418
633
|
"kind": "js",
|
|
419
634
|
"name": "RCTextareaPlugin",
|
|
@@ -840,7 +1055,7 @@
|
|
|
840
1055
|
"declarations": [
|
|
841
1056
|
{
|
|
842
1057
|
"kind": "class",
|
|
843
|
-
"description": "Textarea wrapper with line decorations, gutter rendering,
|
|
1058
|
+
"description": "Textarea wrapper with line decorations, gutter rendering, folding actions, and plugin hooks.\n\nProvide a native `<textarea>` as the direct child when the component is\neditable. Read-only displays may be driven from `value` or `defaultValue`.",
|
|
844
1059
|
"name": "RCTextarea",
|
|
845
1060
|
"cssProperties": [
|
|
846
1061
|
{
|
|
@@ -859,9 +1074,9 @@
|
|
|
859
1074
|
"default": "Field"
|
|
860
1075
|
},
|
|
861
1076
|
{
|
|
862
|
-
"description": "Text color
|
|
1077
|
+
"description": "Text color",
|
|
863
1078
|
"name": "--rc-textarea-color",
|
|
864
|
-
"default": "FieldText"
|
|
1079
|
+
"default": "var(--rc-field-text, FieldText)"
|
|
865
1080
|
},
|
|
866
1081
|
{
|
|
867
1082
|
"description": "Font family",
|
|
@@ -879,10 +1094,25 @@
|
|
|
879
1094
|
"default": "1.5"
|
|
880
1095
|
},
|
|
881
1096
|
{
|
|
882
|
-
"description": "
|
|
883
|
-
"name": "--rc-textarea-padding",
|
|
1097
|
+
"description": "Block padding of the editor and gutter; any `padding-block` value",
|
|
1098
|
+
"name": "--rc-textarea-padding-block",
|
|
1099
|
+
"default": "0.5em"
|
|
1100
|
+
},
|
|
1101
|
+
{
|
|
1102
|
+
"description": "Inline padding on both sides of the editor and before the gutter; one length, which the active line highlight bleeds through",
|
|
1103
|
+
"name": "--rc-textarea-padding-inline",
|
|
884
1104
|
"default": "0.5em"
|
|
885
1105
|
},
|
|
1106
|
+
{
|
|
1107
|
+
"description": "Minimum width of the gutter, including its padding",
|
|
1108
|
+
"name": "--rc-textarea-gutter-min-inline-size",
|
|
1109
|
+
"default": "24px"
|
|
1110
|
+
},
|
|
1111
|
+
{
|
|
1112
|
+
"description": "Reserved inline space and minimum block size for trailing controls",
|
|
1113
|
+
"name": "--rc-textarea-trailing-size",
|
|
1114
|
+
"default": "2.5em"
|
|
1115
|
+
},
|
|
886
1116
|
{
|
|
887
1117
|
"description": "Focus ring outline",
|
|
888
1118
|
"name": "--rc-textarea-focus-outline",
|
|
@@ -894,7 +1124,7 @@
|
|
|
894
1124
|
"default": "FieldText"
|
|
895
1125
|
},
|
|
896
1126
|
{
|
|
897
|
-
"description": "Active line highlight color",
|
|
1127
|
+
"description": "Active line highlight color, including editor and gutter padding",
|
|
898
1128
|
"name": "--rc-textarea-active-line-bg",
|
|
899
1129
|
"default": "transparent"
|
|
900
1130
|
},
|
|
@@ -918,10 +1148,80 @@
|
|
|
918
1148
|
"name": "--rc-textarea-gutter-font-family",
|
|
919
1149
|
"default": "var(--rc-textarea-font-family, monospace)"
|
|
920
1150
|
},
|
|
1151
|
+
{
|
|
1152
|
+
"description": "Gap between a retained line number and custom gutter content",
|
|
1153
|
+
"name": "--rc-textarea-gutter-content-gap",
|
|
1154
|
+
"default": "0.25em"
|
|
1155
|
+
},
|
|
921
1156
|
{
|
|
922
1157
|
"description": "Space between gutter labels and text",
|
|
923
1158
|
"name": "--rc-textarea-gutter-padding-inline-end",
|
|
924
1159
|
"default": "0.75em"
|
|
1160
|
+
},
|
|
1161
|
+
{
|
|
1162
|
+
"description": "Gap between inline line actions; popover actions default to 4px",
|
|
1163
|
+
"name": "--rc-line-actions-gap",
|
|
1164
|
+
"default": "2px"
|
|
1165
|
+
},
|
|
1166
|
+
{
|
|
1167
|
+
"description": "Inline-start margin before line actions",
|
|
1168
|
+
"name": "--rc-line-actions-margin-start",
|
|
1169
|
+
"default": "6px"
|
|
1170
|
+
},
|
|
1171
|
+
{
|
|
1172
|
+
"description": "Inline line-action padding; popover actions default to 4px 6px",
|
|
1173
|
+
"name": "--rc-line-action-padding",
|
|
1174
|
+
"default": "1px"
|
|
1175
|
+
},
|
|
1176
|
+
{
|
|
1177
|
+
"description": "Line-action border; the popover surface defaults to 1px solid ButtonBorder",
|
|
1178
|
+
"name": "--rc-line-action-border",
|
|
1179
|
+
"default": "none"
|
|
1180
|
+
},
|
|
1181
|
+
{
|
|
1182
|
+
"description": "Line-action border radius; the popover surface defaults to 4px",
|
|
1183
|
+
"name": "--rc-line-action-border-radius",
|
|
1184
|
+
"default": "3px"
|
|
1185
|
+
},
|
|
1186
|
+
{
|
|
1187
|
+
"description": "Line-action background; the popover surface defaults to Canvas",
|
|
1188
|
+
"name": "--rc-line-action-bg",
|
|
1189
|
+
"default": "transparent"
|
|
1190
|
+
},
|
|
1191
|
+
{
|
|
1192
|
+
"description": "Line-action color; popover actions default to ButtonText",
|
|
1193
|
+
"name": "--rc-line-action-color",
|
|
1194
|
+
"default": "inherit"
|
|
1195
|
+
},
|
|
1196
|
+
{
|
|
1197
|
+
"description": "Inline line-action font size; popover actions default to 0.85em",
|
|
1198
|
+
"name": "--rc-line-action-font-size",
|
|
1199
|
+
"default": "1em"
|
|
1200
|
+
},
|
|
1201
|
+
{
|
|
1202
|
+
"description": "Resting opacity of inline line actions",
|
|
1203
|
+
"name": "--rc-line-action-opacity",
|
|
1204
|
+
"default": "0.4"
|
|
1205
|
+
},
|
|
1206
|
+
{
|
|
1207
|
+
"description": "Hover and focus opacity of inline line actions",
|
|
1208
|
+
"name": "--rc-line-action-hover-opacity",
|
|
1209
|
+
"default": "1"
|
|
1210
|
+
},
|
|
1211
|
+
{
|
|
1212
|
+
"description": "Hover and focus background; popover actions default to ButtonFace",
|
|
1213
|
+
"name": "--rc-line-action-hover-bg",
|
|
1214
|
+
"default": "transparent"
|
|
1215
|
+
},
|
|
1216
|
+
{
|
|
1217
|
+
"description": "Hover and focus text color",
|
|
1218
|
+
"name": "--rc-line-action-hover-color",
|
|
1219
|
+
"default": "inherit"
|
|
1220
|
+
},
|
|
1221
|
+
{
|
|
1222
|
+
"description": "Line-action popover shadow",
|
|
1223
|
+
"name": "--rc-line-action-shadow",
|
|
1224
|
+
"default": "0 2px 8px color-mix(in srgb, CanvasText 15%, transparent)"
|
|
925
1225
|
}
|
|
926
1226
|
],
|
|
927
1227
|
"cssParts": [
|
|
@@ -937,6 +1237,14 @@
|
|
|
937
1237
|
"description": "The gutter's line-label list.",
|
|
938
1238
|
"name": "gutter-cells"
|
|
939
1239
|
},
|
|
1240
|
+
{
|
|
1241
|
+
"description": "Native button created by a folding action; style its visual appearance without changing its target or keyboard behavior.",
|
|
1242
|
+
"name": "fold-trigger"
|
|
1243
|
+
},
|
|
1244
|
+
{
|
|
1245
|
+
"description": "Consumer-supplied icon inside a folding action button, when provided.",
|
|
1246
|
+
"name": "fold-icon"
|
|
1247
|
+
},
|
|
940
1248
|
{
|
|
941
1249
|
"description": "The container positioning the editor over the slotted textarea.",
|
|
942
1250
|
"name": "editor-area"
|
|
@@ -1006,16 +1314,43 @@
|
|
|
1006
1314
|
"attribute": "auto-grow",
|
|
1007
1315
|
"reflects": true
|
|
1008
1316
|
},
|
|
1317
|
+
{
|
|
1318
|
+
"kind": "field",
|
|
1319
|
+
"name": "lineDirection",
|
|
1320
|
+
"type": {
|
|
1321
|
+
"text": "'auto' | 'base'"
|
|
1322
|
+
},
|
|
1323
|
+
"default": "'base'",
|
|
1324
|
+
"description": "How each line's direction is chosen. `base` gives every line the editor's\nbase direction, which suits code. `auto` gives a line with a letter the\ndirection of its first strong character, for prose that mixes scripts, and\nholds lines without one (empty, digits, punctuation) to the base direction.",
|
|
1325
|
+
"attribute": "line-direction",
|
|
1326
|
+
"reflects": true
|
|
1327
|
+
},
|
|
1009
1328
|
{
|
|
1010
1329
|
"kind": "field",
|
|
1011
1330
|
"name": "readOnly",
|
|
1012
1331
|
"type": {
|
|
1013
1332
|
"text": "boolean"
|
|
1014
1333
|
},
|
|
1015
|
-
"
|
|
1016
|
-
"
|
|
1017
|
-
|
|
1018
|
-
|
|
1334
|
+
"description": "Whether the slotted `<textarea>` is `readonly`. The native control is the\nsource of truth; set `readonly` on it to change this state.",
|
|
1335
|
+
"readonly": true
|
|
1336
|
+
},
|
|
1337
|
+
{
|
|
1338
|
+
"kind": "field",
|
|
1339
|
+
"name": "_readOnly",
|
|
1340
|
+
"type": {
|
|
1341
|
+
"text": "boolean"
|
|
1342
|
+
},
|
|
1343
|
+
"privacy": "private",
|
|
1344
|
+
"default": "false"
|
|
1345
|
+
},
|
|
1346
|
+
{
|
|
1347
|
+
"kind": "field",
|
|
1348
|
+
"name": "_textareaAttributeObserver",
|
|
1349
|
+
"type": {
|
|
1350
|
+
"text": "MutationObserver | null"
|
|
1351
|
+
},
|
|
1352
|
+
"privacy": "private",
|
|
1353
|
+
"default": "null"
|
|
1019
1354
|
},
|
|
1020
1355
|
{
|
|
1021
1356
|
"kind": "field",
|
|
@@ -1115,7 +1450,22 @@
|
|
|
1115
1450
|
"name": "_textareaController",
|
|
1116
1451
|
"privacy": "protected",
|
|
1117
1452
|
"readonly": true,
|
|
1118
|
-
"default": "new NativeChildController<HTMLTextAreaElement>(this, { selector: ':scope > textarea', observe: true, onChange: ($textarea, $previousTextarea) => this._setupTextarea($textarea, $previousTextarea), onMissing: () => { if (import.meta.env.DEV
|
|
1453
|
+
"default": "new NativeChildController<HTMLTextAreaElement>(this, { selector: ':scope > textarea', observe: true, onChange: ($textarea, $previousTextarea) => this._setupTextarea($textarea, $previousTextarea), onMissing: () => { if (import.meta.env.DEV) { warnMissingDirectChild(this, { selector: ':scope > textarea', message: '[rc-textarea] No direct child <textarea> found. Place a native <textarea> inside <rc-textarea>.', }); } }, })"
|
|
1454
|
+
},
|
|
1455
|
+
{
|
|
1456
|
+
"kind": "field",
|
|
1457
|
+
"name": "_flowController",
|
|
1458
|
+
"privacy": "protected",
|
|
1459
|
+
"readonly": true,
|
|
1460
|
+
"default": "new FlowController(this)"
|
|
1461
|
+
},
|
|
1462
|
+
{
|
|
1463
|
+
"kind": "field",
|
|
1464
|
+
"name": "_localeController",
|
|
1465
|
+
"privacy": "protected",
|
|
1466
|
+
"readonly": true,
|
|
1467
|
+
"default": "new LocaleController(this, { onChange: () => this._scheduleRender(), })",
|
|
1468
|
+
"description": "The interface locale, which formats line numbers."
|
|
1119
1469
|
},
|
|
1120
1470
|
{
|
|
1121
1471
|
"kind": "field",
|
|
@@ -1222,6 +1572,25 @@
|
|
|
1222
1572
|
"privacy": "protected",
|
|
1223
1573
|
"default": "false"
|
|
1224
1574
|
},
|
|
1575
|
+
{
|
|
1576
|
+
"kind": "field",
|
|
1577
|
+
"name": "_contentAttributesPendingRender",
|
|
1578
|
+
"type": {
|
|
1579
|
+
"text": "boolean"
|
|
1580
|
+
},
|
|
1581
|
+
"privacy": "private",
|
|
1582
|
+
"default": "false"
|
|
1583
|
+
},
|
|
1584
|
+
{
|
|
1585
|
+
"kind": "field",
|
|
1586
|
+
"name": "_tabMovesFocus",
|
|
1587
|
+
"type": {
|
|
1588
|
+
"text": "boolean"
|
|
1589
|
+
},
|
|
1590
|
+
"privacy": "private",
|
|
1591
|
+
"default": "false",
|
|
1592
|
+
"description": "Set by Escape: the next Tab moves focus instead of inserting `\\t`."
|
|
1593
|
+
},
|
|
1225
1594
|
{
|
|
1226
1595
|
"kind": "field",
|
|
1227
1596
|
"name": "_isRendering",
|
|
@@ -1281,16 +1650,57 @@
|
|
|
1281
1650
|
"privacy": "protected",
|
|
1282
1651
|
"default": "null"
|
|
1283
1652
|
},
|
|
1653
|
+
{
|
|
1654
|
+
"kind": "field",
|
|
1655
|
+
"name": "_gutterBlockAxis",
|
|
1656
|
+
"type": {
|
|
1657
|
+
"text": "'x' | 'y' | null"
|
|
1658
|
+
},
|
|
1659
|
+
"privacy": "protected",
|
|
1660
|
+
"default": "null"
|
|
1661
|
+
},
|
|
1284
1662
|
{
|
|
1285
1663
|
"kind": "field",
|
|
1286
1664
|
"name": "_gutterLabels",
|
|
1287
1665
|
"type": {
|
|
1288
|
-
"text": "(string | null)[]"
|
|
1666
|
+
"text": "(\n | string\n | HTMLElement\n | null\n | { number: string; content: string | HTMLElement }\n )[]"
|
|
1289
1667
|
},
|
|
1290
1668
|
"privacy": "protected",
|
|
1291
1669
|
"default": "[]",
|
|
1292
1670
|
"description": "Cached per-line gutter labels from the last render — reused by ResizeObserver."
|
|
1293
1671
|
},
|
|
1672
|
+
{
|
|
1673
|
+
"kind": "field",
|
|
1674
|
+
"name": "_accessibleGutterLines",
|
|
1675
|
+
"privacy": "protected",
|
|
1676
|
+
"default": "new Set<number>()",
|
|
1677
|
+
"description": "Gutter cells with explicitly accessible plugin controls."
|
|
1678
|
+
},
|
|
1679
|
+
{
|
|
1680
|
+
"kind": "field",
|
|
1681
|
+
"name": "_foldedRanges",
|
|
1682
|
+
"type": {
|
|
1683
|
+
"text": "FoldDecoration[]"
|
|
1684
|
+
},
|
|
1685
|
+
"privacy": "protected",
|
|
1686
|
+
"default": "[]",
|
|
1687
|
+
"description": "Collapsed source ranges from the most recent render."
|
|
1688
|
+
},
|
|
1689
|
+
{
|
|
1690
|
+
"kind": "field",
|
|
1691
|
+
"name": "_foldBounds",
|
|
1692
|
+
"type": {
|
|
1693
|
+
"text": "FoldBounds[]"
|
|
1694
|
+
},
|
|
1695
|
+
"privacy": "protected",
|
|
1696
|
+
"default": "[]"
|
|
1697
|
+
},
|
|
1698
|
+
{
|
|
1699
|
+
"kind": "field",
|
|
1700
|
+
"name": "_hiddenGutterLines",
|
|
1701
|
+
"privacy": "protected",
|
|
1702
|
+
"default": "new Set<number>()"
|
|
1703
|
+
},
|
|
1294
1704
|
{
|
|
1295
1705
|
"kind": "field",
|
|
1296
1706
|
"name": "value",
|
|
@@ -1309,6 +1719,98 @@
|
|
|
1309
1719
|
"description": "Initial uncontrolled value.",
|
|
1310
1720
|
"attribute": "default-value"
|
|
1311
1721
|
},
|
|
1722
|
+
{
|
|
1723
|
+
"kind": "method",
|
|
1724
|
+
"name": "_observeTextarea",
|
|
1725
|
+
"privacy": "private",
|
|
1726
|
+
"return": {
|
|
1727
|
+
"type": {
|
|
1728
|
+
"text": "void"
|
|
1729
|
+
}
|
|
1730
|
+
},
|
|
1731
|
+
"parameters": [
|
|
1732
|
+
{
|
|
1733
|
+
"name": "$textarea",
|
|
1734
|
+
"type": {
|
|
1735
|
+
"text": "HTMLTextAreaElement"
|
|
1736
|
+
}
|
|
1737
|
+
}
|
|
1738
|
+
]
|
|
1739
|
+
},
|
|
1740
|
+
{
|
|
1741
|
+
"kind": "method",
|
|
1742
|
+
"name": "_syncContentAttributes",
|
|
1743
|
+
"privacy": "protected",
|
|
1744
|
+
"return": {
|
|
1745
|
+
"type": {
|
|
1746
|
+
"text": "void"
|
|
1747
|
+
}
|
|
1748
|
+
},
|
|
1749
|
+
"description": "Mirror the native textarea's content attributes onto the editor. `lang`\npicks glyphs, the spelling dictionary and word boundaries; `spellcheck`\nstays off unless the textarea sets it. The host's own `lang` is the\ninterface language and is never copied."
|
|
1750
|
+
},
|
|
1751
|
+
{
|
|
1752
|
+
"kind": "method",
|
|
1753
|
+
"name": "_syncContentDirection",
|
|
1754
|
+
"privacy": "protected",
|
|
1755
|
+
"return": {
|
|
1756
|
+
"type": {
|
|
1757
|
+
"text": "void"
|
|
1758
|
+
}
|
|
1759
|
+
},
|
|
1760
|
+
"description": "Set the editor's base direction from the textarea's `dir`. `auto` reads\nthe native control's directionality, including its LTR neutral fallback;\nwithout `dir` the editor inherits. Composition keeps the current direction\nso the IME session isn't disturbed."
|
|
1761
|
+
},
|
|
1762
|
+
{
|
|
1763
|
+
"kind": "method",
|
|
1764
|
+
"name": "_contentLang",
|
|
1765
|
+
"privacy": "protected",
|
|
1766
|
+
"return": {
|
|
1767
|
+
"type": {
|
|
1768
|
+
"text": "string"
|
|
1769
|
+
}
|
|
1770
|
+
},
|
|
1771
|
+
"description": "The textarea's `lang`, or `''` when it sets none."
|
|
1772
|
+
},
|
|
1773
|
+
{
|
|
1774
|
+
"kind": "method",
|
|
1775
|
+
"name": "_contentDirection",
|
|
1776
|
+
"privacy": "protected",
|
|
1777
|
+
"return": {
|
|
1778
|
+
"type": {
|
|
1779
|
+
"text": "'ltr' | 'rtl'"
|
|
1780
|
+
}
|
|
1781
|
+
},
|
|
1782
|
+
"description": "The editor's resolved base direction."
|
|
1783
|
+
},
|
|
1784
|
+
{
|
|
1785
|
+
"kind": "method",
|
|
1786
|
+
"name": "_syncLineDirections",
|
|
1787
|
+
"privacy": "protected",
|
|
1788
|
+
"return": {
|
|
1789
|
+
"type": {
|
|
1790
|
+
"text": "void"
|
|
1791
|
+
}
|
|
1792
|
+
},
|
|
1793
|
+
"parameters": [
|
|
1794
|
+
{
|
|
1795
|
+
"name": "value",
|
|
1796
|
+
"type": {
|
|
1797
|
+
"text": "string"
|
|
1798
|
+
}
|
|
1799
|
+
}
|
|
1800
|
+
],
|
|
1801
|
+
"description": "Mark lines with no strong character so `line-direction=\"auto\"` holds them\nto the base direction. Reads the model value, which composition text\ndoesn't reach until `compositionend`, so a composing line keeps its mark."
|
|
1802
|
+
},
|
|
1803
|
+
{
|
|
1804
|
+
"kind": "method",
|
|
1805
|
+
"name": "_syncReadOnly",
|
|
1806
|
+
"privacy": "protected",
|
|
1807
|
+
"return": {
|
|
1808
|
+
"type": {
|
|
1809
|
+
"text": "void"
|
|
1810
|
+
}
|
|
1811
|
+
},
|
|
1812
|
+
"description": "Mirror the native textarea's `readonly` attribute: the editor stays a\nfocusable, selectable textbox that announces `aria-readonly`, and edits\nare blocked by the existing input guards."
|
|
1813
|
+
},
|
|
1312
1814
|
{
|
|
1313
1815
|
"kind": "method",
|
|
1314
1816
|
"name": "_onSlotChange",
|
|
@@ -1377,6 +1879,42 @@
|
|
|
1377
1879
|
"name": "_onBeforeInput",
|
|
1378
1880
|
"privacy": "protected"
|
|
1379
1881
|
},
|
|
1882
|
+
{
|
|
1883
|
+
"kind": "method",
|
|
1884
|
+
"name": "_revealFoldAtOffset",
|
|
1885
|
+
"privacy": "protected",
|
|
1886
|
+
"return": {
|
|
1887
|
+
"type": {
|
|
1888
|
+
"text": "boolean"
|
|
1889
|
+
}
|
|
1890
|
+
},
|
|
1891
|
+
"parameters": [
|
|
1892
|
+
{
|
|
1893
|
+
"name": "offset",
|
|
1894
|
+
"type": {
|
|
1895
|
+
"text": "number"
|
|
1896
|
+
}
|
|
1897
|
+
}
|
|
1898
|
+
]
|
|
1899
|
+
},
|
|
1900
|
+
{
|
|
1901
|
+
"kind": "method",
|
|
1902
|
+
"name": "_revealFoldForEdit",
|
|
1903
|
+
"privacy": "protected",
|
|
1904
|
+
"return": {
|
|
1905
|
+
"type": {
|
|
1906
|
+
"text": "boolean"
|
|
1907
|
+
}
|
|
1908
|
+
},
|
|
1909
|
+
"parameters": [
|
|
1910
|
+
{
|
|
1911
|
+
"name": "inputType",
|
|
1912
|
+
"type": {
|
|
1913
|
+
"text": "string"
|
|
1914
|
+
}
|
|
1915
|
+
}
|
|
1916
|
+
]
|
|
1917
|
+
},
|
|
1380
1918
|
{
|
|
1381
1919
|
"kind": "method",
|
|
1382
1920
|
"name": "_onInput",
|
|
@@ -1417,6 +1955,24 @@
|
|
|
1417
1955
|
"name": "_onKeyDown",
|
|
1418
1956
|
"privacy": "protected"
|
|
1419
1957
|
},
|
|
1958
|
+
{
|
|
1959
|
+
"kind": "method",
|
|
1960
|
+
"name": "_isWidgetEvent",
|
|
1961
|
+
"privacy": "protected",
|
|
1962
|
+
"return": {
|
|
1963
|
+
"type": {
|
|
1964
|
+
"text": "boolean"
|
|
1965
|
+
}
|
|
1966
|
+
},
|
|
1967
|
+
"parameters": [
|
|
1968
|
+
{
|
|
1969
|
+
"name": "event",
|
|
1970
|
+
"type": {
|
|
1971
|
+
"text": "Event"
|
|
1972
|
+
}
|
|
1973
|
+
}
|
|
1974
|
+
]
|
|
1975
|
+
},
|
|
1420
1976
|
{
|
|
1421
1977
|
"kind": "method",
|
|
1422
1978
|
"name": "_insertText",
|
|
@@ -1477,6 +2033,11 @@
|
|
|
1477
2033
|
],
|
|
1478
2034
|
"description": "Replace the current selection with `text`.\nWhen the selection is collapsed this is equivalent to `insertText`."
|
|
1479
2035
|
},
|
|
2036
|
+
{
|
|
2037
|
+
"kind": "field",
|
|
2038
|
+
"name": "_onCopy",
|
|
2039
|
+
"privacy": "protected"
|
|
2040
|
+
},
|
|
1480
2041
|
{
|
|
1481
2042
|
"kind": "field",
|
|
1482
2043
|
"name": "_onPaste",
|
|
@@ -1669,7 +2230,7 @@
|
|
|
1669
2230
|
"privacy": "protected",
|
|
1670
2231
|
"return": {
|
|
1671
2232
|
"type": {
|
|
1672
|
-
"text": "(string | null)[]"
|
|
2233
|
+
"text": "(string | HTMLElement | null | { number: string; content: string | HTMLElement })[]"
|
|
1673
2234
|
}
|
|
1674
2235
|
},
|
|
1675
2236
|
"parameters": [
|
|
@@ -1695,7 +2256,7 @@
|
|
|
1695
2256
|
"text": "void"
|
|
1696
2257
|
}
|
|
1697
2258
|
},
|
|
1698
|
-
"description": "Synchronize the
|
|
2259
|
+
"description": "Synchronize the block size of each gutter cell to match the\ncorresponding `.line` element in the editor.\n\nIn non-word-wrap mode without block widgets the gutter uses a uniform\nline height. Wrapped lines and block widgets use per-line heights instead.\nAlso copies the editor's computed block padding to the\ngutter to compensate for browser UA overrides on contenteditable."
|
|
1699
2260
|
},
|
|
1700
2261
|
{
|
|
1701
2262
|
"kind": "method",
|
|
@@ -1711,7 +2272,7 @@
|
|
|
1711
2272
|
"name": "labels",
|
|
1712
2273
|
"optional": true,
|
|
1713
2274
|
"type": {
|
|
1714
|
-
"text": "(string | null)[]"
|
|
2275
|
+
"text": "(string | HTMLElement | null | { number: string; content: string | HTMLElement })[]"
|
|
1715
2276
|
}
|
|
1716
2277
|
}
|
|
1717
2278
|
],
|
|
@@ -1845,13 +2406,17 @@
|
|
|
1845
2406
|
"fieldName": "autoGrow"
|
|
1846
2407
|
},
|
|
1847
2408
|
{
|
|
1848
|
-
"description": "
|
|
1849
|
-
"name": "
|
|
2409
|
+
"description": "How each line's direction is chosen. `base` gives every line the editor's\nbase direction, which suits code. `auto` gives a line with a letter the\ndirection of its first strong character, for prose that mixes scripts, and\nholds lines without one (empty, digits, punctuation) to the base direction.",
|
|
2410
|
+
"name": "line-direction",
|
|
1850
2411
|
"type": {
|
|
1851
|
-
"text": "
|
|
2412
|
+
"text": "'auto' | 'base'"
|
|
1852
2413
|
},
|
|
1853
|
-
"default": "
|
|
1854
|
-
"fieldName": "
|
|
2414
|
+
"default": "'base'",
|
|
2415
|
+
"fieldName": "lineDirection"
|
|
2416
|
+
},
|
|
2417
|
+
{
|
|
2418
|
+
"description": "Reflected while the slotted `<textarea>` is `readonly`. The editor stays focusable and selectable, announces `aria-readonly`, and blocks edits.",
|
|
2419
|
+
"name": "data-readonly"
|
|
1855
2420
|
},
|
|
1856
2421
|
{
|
|
1857
2422
|
"description": "The current field value.\n\nSetting this property puts the component into\ncontrolled mode (host owns the value, changes are reflected\nimmediately, no change events dispatched)",
|
|
@@ -1947,6 +2512,24 @@
|
|
|
1947
2512
|
],
|
|
1948
2513
|
"description": "Converts a plain-text offset to a (node, nodeOffset) DOM position inside `$root`.\n\nReturns null if offset is out of range."
|
|
1949
2514
|
},
|
|
2515
|
+
{
|
|
2516
|
+
"kind": "function",
|
|
2517
|
+
"name": "getSelectionFocusNode",
|
|
2518
|
+
"return": {
|
|
2519
|
+
"type": {
|
|
2520
|
+
"text": "Node | null"
|
|
2521
|
+
}
|
|
2522
|
+
},
|
|
2523
|
+
"parameters": [
|
|
2524
|
+
{
|
|
2525
|
+
"name": "$root",
|
|
2526
|
+
"type": {
|
|
2527
|
+
"text": "Element"
|
|
2528
|
+
}
|
|
2529
|
+
}
|
|
2530
|
+
],
|
|
2531
|
+
"description": "Returns the current selection focus node when it belongs to `$root`."
|
|
2532
|
+
},
|
|
1950
2533
|
{
|
|
1951
2534
|
"kind": "function",
|
|
1952
2535
|
"name": "saveSelection",
|
|
@@ -2007,6 +2590,14 @@
|
|
|
2007
2590
|
"module": "src/selection.ts"
|
|
2008
2591
|
}
|
|
2009
2592
|
},
|
|
2593
|
+
{
|
|
2594
|
+
"kind": "js",
|
|
2595
|
+
"name": "getSelectionFocusNode",
|
|
2596
|
+
"declaration": {
|
|
2597
|
+
"name": "getSelectionFocusNode",
|
|
2598
|
+
"module": "src/selection.ts"
|
|
2599
|
+
}
|
|
2600
|
+
},
|
|
2010
2601
|
{
|
|
2011
2602
|
"kind": "js",
|
|
2012
2603
|
"name": "saveSelection",
|