@rcarls/rc-textarea 0.1.0 → 0.3.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/README.md +173 -1176
- package/dist/custom-elements.json +168 -72
- package/dist/{line-actions-controller-BsM6DJ0b.js → line-actions-controller-ChmbiQ-G.js} +573 -532
- package/dist/line-actions-controller-ChmbiQ-G.js.map +1 -0
- package/dist/rc-textarea-define.js +2 -2
- package/dist/rc-textarea.js +1 -1
- package/dist/types/packages/rc-textarea/src/blots.d.ts +7 -7
- package/dist/types/packages/rc-textarea/src/decoration.d.ts +5 -2
- package/dist/types/packages/rc-textarea/src/document.d.ts +7 -9
- package/dist/types/packages/rc-textarea/src/line-actions-controller.d.ts +12 -9
- package/dist/types/packages/rc-textarea/src/line-decorator.d.ts +9 -8
- package/dist/types/packages/rc-textarea/src/pattern-matcher.d.ts +4 -2
- package/dist/types/packages/rc-textarea/src/rc-textarea.d.ts +101 -32
- package/dist/types/packages/rc-textarea/src/selection.d.ts +17 -13
- package/dist/types/packages/rc-textarea/src/test-helpers.d.ts +6 -4
- package/dist/types/packages/rc-textarea/src/types.d.ts +119 -40
- package/package.json +7 -8
- package/dist/demo.css +0 -85
- package/dist/demo.js +0 -40
- package/dist/line-actions-controller-BsM6DJ0b.js.map +0 -1
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
},
|
|
87
87
|
{
|
|
88
88
|
"kind": "function",
|
|
89
|
-
"name": "
|
|
89
|
+
"name": "remapDecorations",
|
|
90
90
|
"return": {
|
|
91
91
|
"type": {
|
|
92
92
|
"text": "Decoration[]"
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
"name": "addDecoration",
|
|
120
120
|
"return": {
|
|
121
121
|
"type": {
|
|
122
|
-
"text": "
|
|
122
|
+
"text": ""
|
|
123
123
|
}
|
|
124
124
|
},
|
|
125
125
|
"parameters": [
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
138
|
],
|
|
139
|
-
"description": "Add a single decoration to `map`, assigning it a fresh UUID as its `id
|
|
139
|
+
"description": "Add a single decoration to `map`, assigning it a fresh UUID as its `id`."
|
|
140
140
|
},
|
|
141
141
|
{
|
|
142
142
|
"kind": "function",
|
|
@@ -198,9 +198,9 @@
|
|
|
198
198
|
},
|
|
199
199
|
{
|
|
200
200
|
"kind": "js",
|
|
201
|
-
"name": "
|
|
201
|
+
"name": "remapDecorations",
|
|
202
202
|
"declaration": {
|
|
203
|
-
"name": "
|
|
203
|
+
"name": "remapDecorations",
|
|
204
204
|
"module": "src/decoration.ts"
|
|
205
205
|
}
|
|
206
206
|
},
|
|
@@ -268,17 +268,17 @@
|
|
|
268
268
|
{
|
|
269
269
|
"kind": "class",
|
|
270
270
|
"description": "",
|
|
271
|
-
"name": "
|
|
271
|
+
"name": "RCDocument",
|
|
272
272
|
"members": [
|
|
273
273
|
{
|
|
274
274
|
"kind": "field",
|
|
275
275
|
"name": "scroll",
|
|
276
276
|
"type": {
|
|
277
|
-
"text": "
|
|
277
|
+
"text": "RCScrollBlot"
|
|
278
278
|
},
|
|
279
279
|
"privacy": "private",
|
|
280
280
|
"readonly": true,
|
|
281
|
-
"default": "new
|
|
281
|
+
"default": "new RCScrollBlot(registry, $documentRoot)"
|
|
282
282
|
},
|
|
283
283
|
{
|
|
284
284
|
"kind": "method",
|
|
@@ -302,7 +302,7 @@
|
|
|
302
302
|
}
|
|
303
303
|
}
|
|
304
304
|
],
|
|
305
|
-
"description": "Rebuild the document tree
|
|
305
|
+
"description": "Rebuild the document tree.\n\nReuses existing `.line` elements in place to preserve DOM identity\nacross renders (fixes DevTools node tracking and mouse gesture continuity)."
|
|
306
306
|
},
|
|
307
307
|
{
|
|
308
308
|
"kind": "method",
|
|
@@ -317,7 +317,7 @@
|
|
|
317
317
|
},
|
|
318
318
|
{
|
|
319
319
|
"kind": "function",
|
|
320
|
-
"name": "
|
|
320
|
+
"name": "getText",
|
|
321
321
|
"return": {
|
|
322
322
|
"type": {
|
|
323
323
|
"text": "string"
|
|
@@ -325,29 +325,29 @@
|
|
|
325
325
|
},
|
|
326
326
|
"parameters": [
|
|
327
327
|
{
|
|
328
|
-
"name": "editorEl",
|
|
328
|
+
"name": "$editorEl",
|
|
329
329
|
"type": {
|
|
330
330
|
"text": "HTMLElement"
|
|
331
331
|
}
|
|
332
332
|
}
|
|
333
333
|
],
|
|
334
|
-
"description": "Extracts plain text directly from the
|
|
334
|
+
"description": "Extracts plain text directly from the contenteditable DOM."
|
|
335
335
|
}
|
|
336
336
|
],
|
|
337
337
|
"exports": [
|
|
338
338
|
{
|
|
339
339
|
"kind": "js",
|
|
340
|
-
"name": "
|
|
340
|
+
"name": "RCDocument",
|
|
341
341
|
"declaration": {
|
|
342
|
-
"name": "
|
|
342
|
+
"name": "RCDocument",
|
|
343
343
|
"module": "src/document.ts"
|
|
344
344
|
}
|
|
345
345
|
},
|
|
346
346
|
{
|
|
347
347
|
"kind": "js",
|
|
348
|
-
"name": "
|
|
348
|
+
"name": "getText",
|
|
349
349
|
"declaration": {
|
|
350
|
-
"name": "
|
|
350
|
+
"name": "getText",
|
|
351
351
|
"module": "src/document.ts"
|
|
352
352
|
}
|
|
353
353
|
}
|
|
@@ -772,7 +772,7 @@
|
|
|
772
772
|
}
|
|
773
773
|
}
|
|
774
774
|
],
|
|
775
|
-
"description": "Factory that wraps a `LineDecoratorPlugin` in a full `RCTextareaPlugin`.\n\nHandles the boilerplate that every per-line decorator needs:\n- CSS injection via `api.adoptStyleSheet` on mount\n- `lineStart` offset bookkeeping when converting line-relative offsets to\n absolute document offsets\n- Subscribing to external change signals and calling `api.scheduleUpdate()`\n- Cleanup of subscribers on destroy"
|
|
775
|
+
"description": "Factory that wraps a `LineDecoratorPlugin` in a full `RCTextareaPlugin`.\n\nHandles the boilerplate that every per-line decorator needs:\n\n- CSS injection via `api.adoptStyleSheet` on mount\n- `lineStart` offset bookkeeping when converting line-relative offsets to\n absolute document offsets\n- Subscribing to external change signals and calling `api.scheduleUpdate()`\n- Cleanup of subscribers on destroy"
|
|
776
776
|
}
|
|
777
777
|
],
|
|
778
778
|
"exports": [
|
|
@@ -795,7 +795,7 @@
|
|
|
795
795
|
"name": "matchPatternResults",
|
|
796
796
|
"return": {
|
|
797
797
|
"type": {
|
|
798
|
-
"text": "{
|
|
798
|
+
"text": "{\n markDecorations: Omit<MarkDecoration, 'id'>[];\n lineDecorations: Omit<LineDecoration, 'id'>[];\n}"
|
|
799
799
|
}
|
|
800
800
|
},
|
|
801
801
|
"parameters": [
|
|
@@ -812,7 +812,7 @@
|
|
|
812
812
|
}
|
|
813
813
|
}
|
|
814
814
|
],
|
|
815
|
-
"description": "Run all `patterns` against `value` and collect every match as decorations.\n\nFor each pattern:\n- If `captureGroups` is set, one `MarkDecoration` is emitted
|
|
815
|
+
"description": "Run all `patterns` against `value` and collect every match as decorations.\n\nFor each pattern:\n\n- If `captureGroups` is set, one `MarkDecoration` is emitted per named\n capture group instead of one for the whole match. Unmatched optional\n groups are silently skipped. The `d` flag (match indices) is added to\n the regex automatically.\n- Otherwise, one `MarkDecoration` covering the entire match is emitted,\n using the styling fields copied directly from the pattern.\n- If `createLineDecoration` is provided, it is called for every match\n (regardless of `captureGroups`) and may produce a paired `LineDecoration`.\n\nThe global flag is added automatically if missing to ensure all occurrences\nare found and to avoid stateful `lastIndex` bugs on the caller's regex.\n\nZero-length matches are skipped to prevent infinite loops."
|
|
816
816
|
}
|
|
817
817
|
],
|
|
818
818
|
"exports": [
|
|
@@ -840,21 +840,21 @@
|
|
|
840
840
|
"declarations": [
|
|
841
841
|
{
|
|
842
842
|
"kind": "class",
|
|
843
|
-
"description": "
|
|
843
|
+
"description": "Textarea wrapper with line decorations, gutter rendering, inline widgets, 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
844
|
"name": "RCTextarea",
|
|
845
845
|
"cssProperties": [
|
|
846
846
|
{
|
|
847
|
-
"description": "Border around the
|
|
847
|
+
"description": "Border around the field",
|
|
848
848
|
"name": "--rc-textarea-border",
|
|
849
849
|
"default": "1px solid ButtonBorder"
|
|
850
850
|
},
|
|
851
851
|
{
|
|
852
|
-
"description": "Border radius of the
|
|
852
|
+
"description": "Border radius of the field",
|
|
853
853
|
"name": "--rc-textarea-border-radius",
|
|
854
854
|
"default": "2px"
|
|
855
855
|
},
|
|
856
856
|
{
|
|
857
|
-
"description": "Background color of the
|
|
857
|
+
"description": "Background color of the field",
|
|
858
858
|
"name": "--rc-textarea-background",
|
|
859
859
|
"default": "Field"
|
|
860
860
|
},
|
|
@@ -879,7 +879,7 @@
|
|
|
879
879
|
"default": "1.5"
|
|
880
880
|
},
|
|
881
881
|
{
|
|
882
|
-
"description": "Padding inside the
|
|
882
|
+
"description": "Padding inside the field area",
|
|
883
883
|
"name": "--rc-textarea-padding",
|
|
884
884
|
"default": "0.5em"
|
|
885
885
|
},
|
|
@@ -916,7 +916,7 @@
|
|
|
916
916
|
],
|
|
917
917
|
"slots": [
|
|
918
918
|
{
|
|
919
|
-
"description": "Accepts a native `<textarea>` element for form wiring
|
|
919
|
+
"description": "Accepts a native `<textarea>` element for form wiring.",
|
|
920
920
|
"name": ""
|
|
921
921
|
}
|
|
922
922
|
],
|
|
@@ -937,6 +937,7 @@
|
|
|
937
937
|
"text": "boolean"
|
|
938
938
|
},
|
|
939
939
|
"default": "false",
|
|
940
|
+
"description": "Show sequential line numbers in the gutter. Enables the gutter implicitly.",
|
|
940
941
|
"attribute": "line-numbers",
|
|
941
942
|
"reflects": true
|
|
942
943
|
},
|
|
@@ -946,10 +947,19 @@
|
|
|
946
947
|
"type": {
|
|
947
948
|
"text": "boolean"
|
|
948
949
|
},
|
|
949
|
-
"
|
|
950
|
+
"deprecated": "Use a plugin with `LineDecoration.gutterContent` to implement\nsparse line numbering. This property will be removed before v1.0.",
|
|
950
951
|
"attribute": "list-numbers",
|
|
951
952
|
"reflects": true
|
|
952
953
|
},
|
|
954
|
+
{
|
|
955
|
+
"kind": "field",
|
|
956
|
+
"name": "_listNumbers",
|
|
957
|
+
"type": {
|
|
958
|
+
"text": "boolean"
|
|
959
|
+
},
|
|
960
|
+
"privacy": "private",
|
|
961
|
+
"default": "false"
|
|
962
|
+
},
|
|
953
963
|
{
|
|
954
964
|
"kind": "field",
|
|
955
965
|
"name": "gutter",
|
|
@@ -957,6 +967,7 @@
|
|
|
957
967
|
"text": "boolean"
|
|
958
968
|
},
|
|
959
969
|
"default": "false",
|
|
970
|
+
"description": "Enable the gutter column without any built-in content.\n\nPlugins can populate individual cells via `LineDecoration.gutterContent`.\nFor sequential line numbers use `lineNumbers` / `line-numbers` instead.",
|
|
960
971
|
"attribute": "gutter",
|
|
961
972
|
"reflects": true
|
|
962
973
|
},
|
|
@@ -967,6 +978,7 @@
|
|
|
967
978
|
"text": "boolean"
|
|
968
979
|
},
|
|
969
980
|
"default": "false",
|
|
981
|
+
"description": "Wrap long lines within the field to prevent horizontal overflow.",
|
|
970
982
|
"attribute": "word-wrap",
|
|
971
983
|
"reflects": true
|
|
972
984
|
},
|
|
@@ -977,6 +989,7 @@
|
|
|
977
989
|
"text": "boolean"
|
|
978
990
|
},
|
|
979
991
|
"default": "false",
|
|
992
|
+
"description": "Allow the field to grow vertically with content to prevent vertical overflow.",
|
|
980
993
|
"attribute": "auto-grow",
|
|
981
994
|
"reflects": true
|
|
982
995
|
},
|
|
@@ -987,6 +1000,7 @@
|
|
|
987
1000
|
"text": "boolean"
|
|
988
1001
|
},
|
|
989
1002
|
"default": "false",
|
|
1003
|
+
"description": "Disable editing. The field renders as a styled read-only display.",
|
|
990
1004
|
"attribute": "read-only",
|
|
991
1005
|
"reflects": true
|
|
992
1006
|
},
|
|
@@ -996,9 +1010,18 @@
|
|
|
996
1010
|
"type": {
|
|
997
1011
|
"text": "string | null"
|
|
998
1012
|
},
|
|
999
|
-
"
|
|
1013
|
+
"deprecated": "Set `aria-label` on the slotted `<textarea>` instead, or\nassociate a `<label>` element via its `for`/`id` pair. This property\nwill be removed before v1.0.",
|
|
1000
1014
|
"attribute": "label"
|
|
1001
1015
|
},
|
|
1016
|
+
{
|
|
1017
|
+
"kind": "field",
|
|
1018
|
+
"name": "_label",
|
|
1019
|
+
"type": {
|
|
1020
|
+
"text": "string | null"
|
|
1021
|
+
},
|
|
1022
|
+
"privacy": "private",
|
|
1023
|
+
"default": "null"
|
|
1024
|
+
},
|
|
1002
1025
|
{
|
|
1003
1026
|
"kind": "field",
|
|
1004
1027
|
"name": "plugin",
|
|
@@ -1013,7 +1036,31 @@
|
|
|
1013
1036
|
"type": {
|
|
1014
1037
|
"text": "DecorationInput[]"
|
|
1015
1038
|
},
|
|
1016
|
-
"description": "
|
|
1039
|
+
"description": "Imperatively set an external layer of decorations. Ideal for reactive frameworks.\n\n```tsx\n// Solid\n<rc-textarea decorations={decorations()} />\n\n// React 19+\n<rc-textarea decorations={decorations} />\n```\n\nMerges with plugin decorations and pattern decorations on every render.\nSetting this property triggers a new render; setting it to `undefined` or `[]`\nclears any previously set external decorations."
|
|
1040
|
+
},
|
|
1041
|
+
{
|
|
1042
|
+
"kind": "field",
|
|
1043
|
+
"name": "_$editor",
|
|
1044
|
+
"type": {
|
|
1045
|
+
"text": "HTMLElement"
|
|
1046
|
+
},
|
|
1047
|
+
"privacy": "protected"
|
|
1048
|
+
},
|
|
1049
|
+
{
|
|
1050
|
+
"kind": "field",
|
|
1051
|
+
"name": "_$gutterCells",
|
|
1052
|
+
"type": {
|
|
1053
|
+
"text": "HTMLElement"
|
|
1054
|
+
},
|
|
1055
|
+
"privacy": "protected"
|
|
1056
|
+
},
|
|
1057
|
+
{
|
|
1058
|
+
"kind": "field",
|
|
1059
|
+
"name": "_$slot",
|
|
1060
|
+
"type": {
|
|
1061
|
+
"text": "HTMLSlotElement"
|
|
1062
|
+
},
|
|
1063
|
+
"privacy": "protected"
|
|
1017
1064
|
},
|
|
1018
1065
|
{
|
|
1019
1066
|
"kind": "field",
|
|
@@ -1054,26 +1101,33 @@
|
|
|
1054
1101
|
"kind": "field",
|
|
1055
1102
|
"name": "_document",
|
|
1056
1103
|
"type": {
|
|
1057
|
-
"text": "
|
|
1104
|
+
"text": "RCDocument | null"
|
|
1058
1105
|
},
|
|
1059
1106
|
"privacy": "private",
|
|
1060
1107
|
"default": "null"
|
|
1061
1108
|
},
|
|
1062
1109
|
{
|
|
1063
1110
|
"kind": "field",
|
|
1064
|
-
"name": "
|
|
1111
|
+
"name": "_$textareaRef",
|
|
1065
1112
|
"type": {
|
|
1066
1113
|
"text": "WeakRef<HTMLTextAreaElement> | null"
|
|
1067
1114
|
},
|
|
1068
1115
|
"privacy": "private",
|
|
1069
1116
|
"default": "null"
|
|
1070
1117
|
},
|
|
1118
|
+
{
|
|
1119
|
+
"kind": "field",
|
|
1120
|
+
"name": "_textareaController",
|
|
1121
|
+
"privacy": "private",
|
|
1122
|
+
"readonly": true,
|
|
1123
|
+
"default": "new NativeChildController<HTMLTextAreaElement>(this, { selector: ':scope > textarea', observe: true, onChange: ($textarea, $previousTextarea) => this._setupTextarea($textarea, $previousTextarea), onMissing: () => { if (import.meta.env.DEV && !this.readOnly) { warnMissingDirectChild(this, { selector: ':scope > textarea', message: '[rc-textarea] No direct child <textarea> found. Place a native <textarea> inside <rc-textarea>.', }); } }, })"
|
|
1124
|
+
},
|
|
1071
1125
|
{
|
|
1072
1126
|
"kind": "field",
|
|
1073
1127
|
"name": "_pluginDecorations",
|
|
1074
1128
|
"privacy": "protected",
|
|
1075
1129
|
"default": "new Map<string, Decoration>()",
|
|
1076
|
-
"description": "Plugin-owned decorations
|
|
1130
|
+
"description": "Plugin-owned decorations"
|
|
1077
1131
|
},
|
|
1078
1132
|
{
|
|
1079
1133
|
"kind": "field",
|
|
@@ -1093,7 +1147,7 @@
|
|
|
1093
1147
|
},
|
|
1094
1148
|
"privacy": "private",
|
|
1095
1149
|
"default": "[]",
|
|
1096
|
-
"description": "
|
|
1150
|
+
"description": "Imperative decorations (set directly via the `decorations` property)"
|
|
1097
1151
|
},
|
|
1098
1152
|
{
|
|
1099
1153
|
"kind": "field",
|
|
@@ -1184,13 +1238,13 @@
|
|
|
1184
1238
|
},
|
|
1185
1239
|
{
|
|
1186
1240
|
"kind": "field",
|
|
1187
|
-
"name": "
|
|
1241
|
+
"name": "_$activeLine",
|
|
1188
1242
|
"type": {
|
|
1189
1243
|
"text": "HTMLElement | null"
|
|
1190
1244
|
},
|
|
1191
1245
|
"privacy": "private",
|
|
1192
1246
|
"default": "null",
|
|
1193
|
-
"description": "The currently highlighted `.
|
|
1247
|
+
"description": "The currently highlighted `.line` element (active line)."
|
|
1194
1248
|
},
|
|
1195
1249
|
{
|
|
1196
1250
|
"kind": "field",
|
|
@@ -1212,7 +1266,7 @@
|
|
|
1212
1266
|
},
|
|
1213
1267
|
"privacy": "private",
|
|
1214
1268
|
"default": "[]",
|
|
1215
|
-
"description": "
|
|
1269
|
+
"description": "Synthetic undo/redo stack (DOM rebuilds invalidate native undo)"
|
|
1216
1270
|
},
|
|
1217
1271
|
{
|
|
1218
1272
|
"kind": "field",
|
|
@@ -1248,6 +1302,7 @@
|
|
|
1248
1302
|
"type": {
|
|
1249
1303
|
"text": "string"
|
|
1250
1304
|
},
|
|
1305
|
+
"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)",
|
|
1251
1306
|
"attribute": "value"
|
|
1252
1307
|
},
|
|
1253
1308
|
{
|
|
@@ -1256,7 +1311,7 @@
|
|
|
1256
1311
|
"type": {
|
|
1257
1312
|
"text": "string | undefined"
|
|
1258
1313
|
},
|
|
1259
|
-
"description": "Initial uncontrolled
|
|
1314
|
+
"description": "Initial uncontrolled value.",
|
|
1260
1315
|
"attribute": "defaultValue"
|
|
1261
1316
|
},
|
|
1262
1317
|
{
|
|
@@ -1269,6 +1324,36 @@
|
|
|
1269
1324
|
}
|
|
1270
1325
|
}
|
|
1271
1326
|
},
|
|
1327
|
+
{
|
|
1328
|
+
"kind": "method",
|
|
1329
|
+
"name": "_setupTextarea",
|
|
1330
|
+
"privacy": "private",
|
|
1331
|
+
"return": {
|
|
1332
|
+
"type": {
|
|
1333
|
+
"text": "void"
|
|
1334
|
+
}
|
|
1335
|
+
},
|
|
1336
|
+
"parameters": [
|
|
1337
|
+
{
|
|
1338
|
+
"name": "$textarea",
|
|
1339
|
+
"type": {
|
|
1340
|
+
"text": "HTMLTextAreaElement | null"
|
|
1341
|
+
}
|
|
1342
|
+
},
|
|
1343
|
+
{
|
|
1344
|
+
"name": "$previousTextarea",
|
|
1345
|
+
"optional": true,
|
|
1346
|
+
"type": {
|
|
1347
|
+
"text": "HTMLTextAreaElement | null"
|
|
1348
|
+
}
|
|
1349
|
+
}
|
|
1350
|
+
]
|
|
1351
|
+
},
|
|
1352
|
+
{
|
|
1353
|
+
"kind": "field",
|
|
1354
|
+
"name": "_onTextareaInvalid",
|
|
1355
|
+
"privacy": "private"
|
|
1356
|
+
},
|
|
1272
1357
|
{
|
|
1273
1358
|
"kind": "method",
|
|
1274
1359
|
"name": "_bindEditorEvents",
|
|
@@ -1280,7 +1365,7 @@
|
|
|
1280
1365
|
},
|
|
1281
1366
|
"parameters": [
|
|
1282
1367
|
{
|
|
1283
|
-
"name": "
|
|
1368
|
+
"name": "$editor",
|
|
1284
1369
|
"type": {
|
|
1285
1370
|
"text": "HTMLElement"
|
|
1286
1371
|
}
|
|
@@ -1405,7 +1490,7 @@
|
|
|
1405
1490
|
"text": "void"
|
|
1406
1491
|
}
|
|
1407
1492
|
},
|
|
1408
|
-
"description": "Reset the undo/redo history. Call when the
|
|
1493
|
+
"description": "Reset the undo/redo history. Call when the field receives entirely new content."
|
|
1409
1494
|
},
|
|
1410
1495
|
{
|
|
1411
1496
|
"kind": "method",
|
|
@@ -1478,7 +1563,8 @@
|
|
|
1478
1563
|
"text": "RCTextareaPlugin"
|
|
1479
1564
|
}
|
|
1480
1565
|
}
|
|
1481
|
-
]
|
|
1566
|
+
],
|
|
1567
|
+
"description": "Register and mount a plugin imperatively.\nReplaces any currently active plugin. Prefer the `plugin` property for\nreactive-framework integrations."
|
|
1482
1568
|
},
|
|
1483
1569
|
{
|
|
1484
1570
|
"kind": "method",
|
|
@@ -1487,7 +1573,8 @@
|
|
|
1487
1573
|
"type": {
|
|
1488
1574
|
"text": "void"
|
|
1489
1575
|
}
|
|
1490
|
-
}
|
|
1576
|
+
},
|
|
1577
|
+
"description": "Unmount the active plugin, clear its decorations, and release its stylesheets."
|
|
1491
1578
|
},
|
|
1492
1579
|
{
|
|
1493
1580
|
"kind": "method",
|
|
@@ -1525,7 +1612,8 @@
|
|
|
1525
1612
|
"text": "Omit<TextPattern, 'id'>"
|
|
1526
1613
|
}
|
|
1527
1614
|
}
|
|
1528
|
-
]
|
|
1615
|
+
],
|
|
1616
|
+
"description": "Register a text pattern that generates decorations on every render pass.\nReturns the pattern ID, which can be passed to `removePattern` to unregister it."
|
|
1529
1617
|
},
|
|
1530
1618
|
{
|
|
1531
1619
|
"kind": "method",
|
|
@@ -1542,7 +1630,8 @@
|
|
|
1542
1630
|
"text": "string"
|
|
1543
1631
|
}
|
|
1544
1632
|
}
|
|
1545
|
-
]
|
|
1633
|
+
],
|
|
1634
|
+
"description": "Remove a previously registered pattern by the ID returned from `addPattern`."
|
|
1546
1635
|
},
|
|
1547
1636
|
{
|
|
1548
1637
|
"kind": "method",
|
|
@@ -1551,7 +1640,8 @@
|
|
|
1551
1640
|
"type": {
|
|
1552
1641
|
"text": "void"
|
|
1553
1642
|
}
|
|
1554
|
-
}
|
|
1643
|
+
},
|
|
1644
|
+
"description": "Remove all registered patterns and trigger a re-render."
|
|
1555
1645
|
},
|
|
1556
1646
|
{
|
|
1557
1647
|
"kind": "method",
|
|
@@ -1594,7 +1684,7 @@
|
|
|
1594
1684
|
"default": "this._value"
|
|
1595
1685
|
}
|
|
1596
1686
|
],
|
|
1597
|
-
"description": "Compute the label string for each gutter cell based on the current gutter\nmode (`lineNumbers`, `listNumbers
|
|
1687
|
+
"description": "Compute the label string for each gutter cell based on the current gutter\nmode (`lineNumbers`, `listNumbers` (deprecated), `gutter`) and any\n`LineDecoration.gutterContent` overrides in `allDecorations`.\n\nReturns one entry per line (same length as `value.split('\\n')`):\n- `string` — the label to display\n- `null` — render an empty cell"
|
|
1598
1688
|
},
|
|
1599
1689
|
{
|
|
1600
1690
|
"kind": "method",
|
|
@@ -1605,7 +1695,7 @@
|
|
|
1605
1695
|
"text": "void"
|
|
1606
1696
|
}
|
|
1607
1697
|
},
|
|
1608
|
-
"description": "Synchronize the pixel height of each gutter cell to match the\ncorresponding `.
|
|
1698
|
+
"description": "Synchronize the pixel height of each gutter cell to match the\ncorresponding `.line` element in the editor.\n\nIn non-word-wrap mode the gutter uses a uniform `line-height` mirrored\nfrom the editor's first line. In word-wrap mode each cell gets an explicit\n`height` so wrapped lines stay vertically aligned with their gutter label.\nAlso copies the editor's computed `paddingTop`/`paddingBottom` to the\ngutter to compensate for browser UA overrides on contenteditable."
|
|
1609
1699
|
},
|
|
1610
1700
|
{
|
|
1611
1701
|
"kind": "method",
|
|
@@ -1627,6 +1717,16 @@
|
|
|
1627
1717
|
],
|
|
1628
1718
|
"description": "Add, remove, or update `.gutter-cell` spans so their count and text\ncontent match `labels`. When `labels` is provided the cached\n`_gutterLabels` is updated first; otherwise the cached labels are reused\n(called by the `ResizeObserver` without a new render pass)."
|
|
1629
1719
|
},
|
|
1720
|
+
{
|
|
1721
|
+
"kind": "method",
|
|
1722
|
+
"name": "_syncLabel",
|
|
1723
|
+
"privacy": "private",
|
|
1724
|
+
"return": {
|
|
1725
|
+
"type": {
|
|
1726
|
+
"text": "void"
|
|
1727
|
+
}
|
|
1728
|
+
}
|
|
1729
|
+
},
|
|
1630
1730
|
{
|
|
1631
1731
|
"kind": "method",
|
|
1632
1732
|
"name": "_syncTypography",
|
|
@@ -1638,7 +1738,7 @@
|
|
|
1638
1738
|
},
|
|
1639
1739
|
"parameters": [
|
|
1640
1740
|
{
|
|
1641
|
-
"name": "textarea",
|
|
1741
|
+
"name": "$textarea",
|
|
1642
1742
|
"type": {
|
|
1643
1743
|
"text": "HTMLTextAreaElement"
|
|
1644
1744
|
}
|
|
@@ -1678,16 +1778,6 @@
|
|
|
1678
1778
|
}
|
|
1679
1779
|
}
|
|
1680
1780
|
]
|
|
1681
|
-
},
|
|
1682
|
-
{
|
|
1683
|
-
"kind": "method",
|
|
1684
|
-
"name": "_getEditorEl",
|
|
1685
|
-
"privacy": "private",
|
|
1686
|
-
"return": {
|
|
1687
|
-
"type": {
|
|
1688
|
-
"text": "HTMLElement | null"
|
|
1689
|
-
}
|
|
1690
|
-
}
|
|
1691
1781
|
}
|
|
1692
1782
|
],
|
|
1693
1783
|
"events": [
|
|
@@ -1702,14 +1792,14 @@
|
|
|
1702
1792
|
"type": {
|
|
1703
1793
|
"text": "CustomEvent"
|
|
1704
1794
|
},
|
|
1705
|
-
"description": "Fired when the
|
|
1795
|
+
"description": "Fired when the field loses focus"
|
|
1706
1796
|
},
|
|
1707
1797
|
{
|
|
1708
1798
|
"name": "rc-textarea-change",
|
|
1709
1799
|
"type": {
|
|
1710
1800
|
"text": "CustomEvent"
|
|
1711
1801
|
},
|
|
1712
|
-
"description": "Fired when the
|
|
1802
|
+
"description": "Fired when the field value changes"
|
|
1713
1803
|
}
|
|
1714
1804
|
],
|
|
1715
1805
|
"attributes": [
|
|
@@ -1719,6 +1809,7 @@
|
|
|
1719
1809
|
"text": "boolean"
|
|
1720
1810
|
},
|
|
1721
1811
|
"default": "false",
|
|
1812
|
+
"description": "Show sequential line numbers in the gutter. Enables the gutter implicitly.",
|
|
1722
1813
|
"fieldName": "lineNumbers"
|
|
1723
1814
|
},
|
|
1724
1815
|
{
|
|
@@ -1726,7 +1817,7 @@
|
|
|
1726
1817
|
"type": {
|
|
1727
1818
|
"text": "boolean"
|
|
1728
1819
|
},
|
|
1729
|
-
"
|
|
1820
|
+
"deprecated": "Use a plugin with `LineDecoration.gutterContent` to implement\nsparse line numbering. This property will be removed before v1.0.",
|
|
1730
1821
|
"fieldName": "listNumbers"
|
|
1731
1822
|
},
|
|
1732
1823
|
{
|
|
@@ -1735,6 +1826,7 @@
|
|
|
1735
1826
|
"text": "boolean"
|
|
1736
1827
|
},
|
|
1737
1828
|
"default": "false",
|
|
1829
|
+
"description": "Enable the gutter column without any built-in content.\n\nPlugins can populate individual cells via `LineDecoration.gutterContent`.\nFor sequential line numbers use `lineNumbers` / `line-numbers` instead.",
|
|
1738
1830
|
"fieldName": "gutter"
|
|
1739
1831
|
},
|
|
1740
1832
|
{
|
|
@@ -1743,6 +1835,7 @@
|
|
|
1743
1835
|
"text": "boolean"
|
|
1744
1836
|
},
|
|
1745
1837
|
"default": "false",
|
|
1838
|
+
"description": "Wrap long lines within the field to prevent horizontal overflow.",
|
|
1746
1839
|
"fieldName": "wordWrap"
|
|
1747
1840
|
},
|
|
1748
1841
|
{
|
|
@@ -1751,6 +1844,7 @@
|
|
|
1751
1844
|
"text": "boolean"
|
|
1752
1845
|
},
|
|
1753
1846
|
"default": "false",
|
|
1847
|
+
"description": "Allow the field to grow vertically with content to prevent vertical overflow.",
|
|
1754
1848
|
"fieldName": "autoGrow"
|
|
1755
1849
|
},
|
|
1756
1850
|
{
|
|
@@ -1759,6 +1853,7 @@
|
|
|
1759
1853
|
"text": "boolean"
|
|
1760
1854
|
},
|
|
1761
1855
|
"default": "false",
|
|
1856
|
+
"description": "Disable editing. The field renders as a styled read-only display.",
|
|
1762
1857
|
"fieldName": "readOnly"
|
|
1763
1858
|
},
|
|
1764
1859
|
{
|
|
@@ -1766,7 +1861,7 @@
|
|
|
1766
1861
|
"type": {
|
|
1767
1862
|
"text": "string | null"
|
|
1768
1863
|
},
|
|
1769
|
-
"
|
|
1864
|
+
"deprecated": "Set `aria-label` on the slotted `<textarea>` instead, or\nassociate a `<label>` element via its `for`/`id` pair. This property\nwill be removed before v1.0.",
|
|
1770
1865
|
"fieldName": "label"
|
|
1771
1866
|
},
|
|
1772
1867
|
{
|
|
@@ -1774,6 +1869,7 @@
|
|
|
1774
1869
|
"type": {
|
|
1775
1870
|
"text": "string"
|
|
1776
1871
|
},
|
|
1872
|
+
"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)",
|
|
1777
1873
|
"fieldName": "value"
|
|
1778
1874
|
},
|
|
1779
1875
|
{
|
|
@@ -1781,7 +1877,7 @@
|
|
|
1781
1877
|
"type": {
|
|
1782
1878
|
"text": "string | undefined"
|
|
1783
1879
|
},
|
|
1784
|
-
"description": "Initial uncontrolled
|
|
1880
|
+
"description": "Initial uncontrolled value.",
|
|
1785
1881
|
"fieldName": "defaultValue"
|
|
1786
1882
|
}
|
|
1787
1883
|
],
|
|
@@ -1818,13 +1914,13 @@
|
|
|
1818
1914
|
},
|
|
1819
1915
|
"parameters": [
|
|
1820
1916
|
{
|
|
1821
|
-
"name": "root",
|
|
1917
|
+
"name": "$root",
|
|
1822
1918
|
"type": {
|
|
1823
1919
|
"text": "Element"
|
|
1824
1920
|
}
|
|
1825
1921
|
},
|
|
1826
1922
|
{
|
|
1827
|
-
"name": "targetNode",
|
|
1923
|
+
"name": "$targetNode",
|
|
1828
1924
|
"type": {
|
|
1829
1925
|
"text": "Node"
|
|
1830
1926
|
}
|
|
@@ -1836,7 +1932,7 @@
|
|
|
1836
1932
|
}
|
|
1837
1933
|
}
|
|
1838
1934
|
],
|
|
1839
|
-
"description": "Converts a DOM (node, nodeOffset) pair inside
|
|
1935
|
+
"description": "Converts a DOM (node, nodeOffset) pair inside `$root` to a plain-text offset.\nReturns the end-of-content offset if the target was not found inside `$root`."
|
|
1840
1936
|
},
|
|
1841
1937
|
{
|
|
1842
1938
|
"kind": "function",
|
|
@@ -1848,7 +1944,7 @@
|
|
|
1848
1944
|
},
|
|
1849
1945
|
"parameters": [
|
|
1850
1946
|
{
|
|
1851
|
-
"name": "root",
|
|
1947
|
+
"name": "$root",
|
|
1852
1948
|
"type": {
|
|
1853
1949
|
"text": "Element"
|
|
1854
1950
|
}
|
|
@@ -1860,7 +1956,7 @@
|
|
|
1860
1956
|
}
|
|
1861
1957
|
}
|
|
1862
1958
|
],
|
|
1863
|
-
"description": "Converts a plain-text offset to a (node, nodeOffset) DOM position inside
|
|
1959
|
+
"description": "Converts a plain-text offset to a (node, nodeOffset) DOM position inside `$root`.\n\nReturns null if offset is out of range."
|
|
1864
1960
|
},
|
|
1865
1961
|
{
|
|
1866
1962
|
"kind": "function",
|
|
@@ -1872,13 +1968,13 @@
|
|
|
1872
1968
|
},
|
|
1873
1969
|
"parameters": [
|
|
1874
1970
|
{
|
|
1875
|
-
"name": "root",
|
|
1971
|
+
"name": "$root",
|
|
1876
1972
|
"type": {
|
|
1877
1973
|
"text": "Element"
|
|
1878
1974
|
}
|
|
1879
1975
|
}
|
|
1880
1976
|
],
|
|
1881
|
-
"description": "Captures the current browser selection as plain-text offsets relative to
|
|
1977
|
+
"description": "Captures the current browser selection as plain-text offsets relative to `$root`.\n\nReturns null if there is no selection or the selection is outside `$root`."
|
|
1882
1978
|
},
|
|
1883
1979
|
{
|
|
1884
1980
|
"kind": "function",
|
|
@@ -1890,7 +1986,7 @@
|
|
|
1890
1986
|
},
|
|
1891
1987
|
"parameters": [
|
|
1892
1988
|
{
|
|
1893
|
-
"name": "root",
|
|
1989
|
+
"name": "$root",
|
|
1894
1990
|
"type": {
|
|
1895
1991
|
"text": "Element"
|
|
1896
1992
|
}
|
|
@@ -1902,7 +1998,7 @@
|
|
|
1902
1998
|
}
|
|
1903
1999
|
}
|
|
1904
2000
|
],
|
|
1905
|
-
"description": "Restores a previously saved selection inside
|
|
2001
|
+
"description": "Restores a previously saved selection inside `$root`.\n\nSilently does nothing if the saved offsets are out of range."
|
|
1906
2002
|
}
|
|
1907
2003
|
],
|
|
1908
2004
|
"exports": [
|
|
@@ -2015,7 +2111,7 @@
|
|
|
2015
2111
|
},
|
|
2016
2112
|
"parameters": [
|
|
2017
2113
|
{
|
|
2018
|
-
"name": "editor",
|
|
2114
|
+
"name": "$editor",
|
|
2019
2115
|
"type": {
|
|
2020
2116
|
"text": "HTMLElement"
|
|
2021
2117
|
}
|
|
@@ -2027,7 +2123,7 @@
|
|
|
2027
2123
|
}
|
|
2028
2124
|
}
|
|
2029
2125
|
],
|
|
2030
|
-
"description": "Dispatches a synthetic paste event carrying plain text onto
|
|
2126
|
+
"description": "Dispatches a synthetic paste event carrying plain text onto `$editor`.\n\nUsing a plain Event + manual clipboardData override because `new ClipboardEvent`\nwith a DataTransfer in the init dict is not reliable across browsers (Firefox\nignores the init's clipboardData).\n\nThe paste handler only calls `e.clipboardData?.getData('text/plain')`, so\na minimal duck-typed mock is enough."
|
|
2031
2127
|
}
|
|
2032
2128
|
],
|
|
2033
2129
|
"exports": [
|