@rcarls/rc-textarea 0.5.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.
Files changed (30) hide show
  1. package/CHANGELOG.md +204 -0
  2. package/README.md +67 -31
  3. package/dist/custom-elements.json +637 -41
  4. package/dist/folding-action-controller-sxM3IomW.js +91 -0
  5. package/dist/folding-action-controller-sxM3IomW.js.map +1 -0
  6. package/dist/{line-actions-controller-CB8U0WvH.js → line-actions-controller-DUdXQxMA.js} +912 -785
  7. package/dist/line-actions-controller-DUdXQxMA.js.map +1 -0
  8. package/dist/rc-textarea-define.js +2 -2
  9. package/dist/rc-textarea-folding.js +5 -0
  10. package/dist/rc-textarea-folding.js.map +1 -0
  11. package/dist/rc-textarea.js +1 -1
  12. package/dist/types/packages/rc-textarea/src/blots.d.ts +1 -1
  13. package/dist/types/packages/rc-textarea/src/decoration.d.ts +3 -2
  14. package/dist/types/packages/rc-textarea/src/document.d.ts +2 -1
  15. package/dist/types/packages/rc-textarea/src/folding-action-controller.d.ts +46 -0
  16. package/dist/types/packages/rc-textarea/src/folding.d.ts +2 -0
  17. package/dist/types/packages/rc-textarea/src/index.d.ts +7 -7
  18. package/dist/types/packages/rc-textarea/src/line-actions-controller.d.ts +5 -4
  19. package/dist/types/packages/rc-textarea/src/line-decorator.d.ts +1 -1
  20. package/dist/types/packages/rc-textarea/src/pattern-matcher.d.ts +1 -1
  21. package/dist/types/packages/rc-textarea/src/rc-textarea.d.ts +123 -20
  22. package/dist/types/packages/rc-textarea/src/selection.d.ts +2 -0
  23. package/dist/types/packages/rc-textarea/src/types.d.ts +52 -9
  24. package/package.json +9 -3
  25. package/dist/line-actions-controller-CB8U0WvH.js.map +0 -1
  26. package/dist/types/packages/rc-textarea/src/decoration.unit.test.d.ts +0 -1
  27. package/dist/types/packages/rc-textarea/src/line-decorator.test.d.ts +0 -1
  28. package/dist/types/packages/rc-textarea/src/pattern-matcher.unit.test.d.ts +0 -1
  29. package/dist/types/packages/rc-textarea/src/rc-textarea.test.d.ts +0 -0
  30. package/dist/types/packages/rc-textarea/src/test-helpers.d.ts +0 -20
package/CHANGELOG.md CHANGED
@@ -1,5 +1,209 @@
1
1
  # @rcarls/rc-textarea
2
2
 
3
+ ## 0.7.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 079e025: Standardize component styling contracts for the breaking 0.7 release.
8
+
9
+ BREAKING CHANGE: Rename the Markdown editor's `--rme-*` properties to
10
+ `--rc-markdown-editor-*`, `--rc-app-bar-background` to `--rc-app-bar-bg`,
11
+ `--rc-textarea-radius` to `--rc-textarea-border-radius`, the transfer-list
12
+ `--rc-transfer-list-panel-*` properties to `--rc-transfer-list-listbox-*`,
13
+ `--rc-chip-group-webkit-scrollbar-display` to
14
+ `--rc-chip-group-scrollbar-display`, and `--rc-text` to `--rc-field-text`.
15
+ Compatibility aliases are intentionally not provided.
16
+
17
+ BREAKING CHANGE: Replace `--rc-select-chip-padding-inline` and
18
+ `--rc-combobox-chip-padding-inline` with explicit `*-padding-inline-start` and
19
+ `*-padding-inline-end` tokens. Generated removable chips now reserve the full
20
+ remove target and its edge offset, so their indicator cannot overlap label text.
21
+
22
+ Add canonical app-bar elevation, transfer-list listbox radius, and textarea
23
+ line-action tokens. Add logical `rc-chip` inline-padding properties so themes
24
+ can implement Material's icon-aware spacing without overriding authored child
25
+ styles. Make `rc-field` consume the shared semantic token layer,
26
+ and place the `rc-chip` and `rc-search-bar` light-DOM structural styles in the
27
+ `rc-base` cascade layer so normal consumer rules override them.
28
+
29
+ Prevent decorative, `aria-hidden` trailing list content from intercepting a
30
+ whole-row action target, and keep segmented-list item geometry from leaking
31
+ into nested standard lists.
32
+
33
+ Remove unused Material navigation-rail toggle tokens and obsolete list-item
34
+ theme tokens. Register the segmented-button private theme seam and enforce
35
+ token ownership, documentation, removed-name, selector-budget, and cascade
36
+ layer contracts through the component architecture audit.
37
+
38
+ - 905083b: Give `rc-textarea` a content language and direction separate from its
39
+ interface. The slotted `<textarea>` describes the text: its `lang` and
40
+ `spellcheck` are mirrored onto the editor, so the browser picks the right
41
+ glyphs and spelling dictionary, and its `dir` sets the editor's base
42
+ direction. `dir="auto"` resolves from the value's first strong character,
43
+ uses LTR when there is none (matching native HTML), and updates as the value changes.
44
+ Without `dir`, the editor inherits as before. The host's own `lang` stays
45
+ the interface language.
46
+
47
+ A new `line-direction` attribute (`lineDirection` property) chooses how
48
+ each line's direction is set. `base`, the default, keeps every line in the
49
+ editor's direction. `auto` orders and aligns each line with a letter by its
50
+ own first strong character, for prose that mixes scripts, and holds lines
51
+ without one (empty lines, quantities) to the base direction. Widgets and
52
+ line messages are now bidi-isolated, so they never reorder neighboring
53
+ text.
54
+
55
+ Changes to the native textarea's `lang` or `dir` rerun plugin rendering.
56
+ The plugin API adds `contentDirection`, `contentLang` and
57
+ `lineDirection(line)`. The React and Solid typings add `lineDirection` and
58
+ `line-direction`.
59
+
60
+ **Breaking:**
61
+
62
+ - Line numbers are formatted with `Intl.NumberFormat` for the interface
63
+ locale (the host's `lang`, else `<html lang>`), so an `ar-EG` interface
64
+ shows Arabic-Indic digits. Set `lang="ar-EG-u-nu-latn"`, or another
65
+ `-u-nu-latn` tag, on the host to keep Latin digits.
66
+ - `getWordAtCursor()` segments words with `Intl.Segmenter` for the
67
+ textarea's `lang` instead of matching ASCII `\w`. Accented and non-Latin
68
+ words are now found whole, and `don't` and `3.14` are one word each;
69
+ `snake_case` still is. Without `Intl.Segmenter` it scans letters, digits
70
+ and `_`.
71
+
72
+ - 6b99ced: **Breaking:** replace `LineDisclosureController` with `FoldingActionController`.
73
+ Pass a caller-owned panel as `target` and render it through a block widget, or pass
74
+ `{ fromLine, toLine }` to fold source lines. Panel creation and content revision now
75
+ belong to the plugin. Set `initiallyExpanded: false` to retain the old diagnostic
76
+ panel default; call `clear()` when document identity changes.
77
+
78
+ Folding actions keep source text, form values, and undo history intact. The Markdown
79
+ plugin adds gutter folds for heading sections, lists, code blocks, block quotes,
80
+ and GFM tables. The base gutter has a 24px minimum width; Material uses 48px.
81
+ Folding buttons expose `fold-trigger` and `fold-icon` CSS parts, and
82
+ `createMarkdownPlugin({ folding: { createTriggerIcon } })` lets consumers choose
83
+ the Markdown fold icon.
84
+
85
+ - d3fc2f3: Add independent line disclosures with accessible gutter or trailing controls,
86
+ configurable trigger icons, block widgets, and DOM gutter markers. Preserve keyed
87
+ widget content across unchanged renders and exclude diagnostic content from source
88
+ copying. Accessible widgets use
89
+ Tab for focus navigation; ordinary text editors retain tab insertion.
90
+ Gutter disclosures can retain a line-number lane alongside the trigger and other
91
+ markers, including when line numbers are toggled after mount.
92
+ - 3325191: **Breaking:** take `rc-textarea`'s read-only state from the slotted `<textarea readonly>` and
93
+ remove the `read-only` attribute and its display styling without border or padding. A read-only
94
+ editor keeps the enabled field appearance, stays focusable and selectable, announces `aria-
95
+ readonly` with the native control's label, and rejects edits. The host reflects `data-readonly`,
96
+ and `readOnly` is now a getter. The plugin `transform()` hook runs while the textarea is
97
+ `readonly`.
98
+
99
+ `rc-markdown-editor` passes its `read-only` state to a native textarea in its source editor.
100
+ Material and Substrate fields skip the hover affordance for a read-only control and keep its
101
+ focus indicator.
102
+
103
+ Migration: replace `<rc-textarea read-only>` with `readonly` on the slotted textarea, for
104
+ example `<rc-textarea><textarea aria-label="Notes" readonly></textarea></rc-textarea>`. Replace
105
+ `editor.readOnly = value` with `textarea.readOnly = value`. Read-only content that is not a form
106
+ value belongs in ordinary text or list markup instead.
107
+
108
+ - 0e2d878: **Breaking:** replace `--rc-textarea-padding` with `--rc-textarea-padding-block` and
109
+ `--rc-textarea-padding-inline`. The active line highlight bleeds through the inline padding by
110
+ negating it, which a multi-value shorthand made invalid: inside a Material filled `rc-field`
111
+ (`0 1rem 0.5rem`) the highlight stopped short of the field's edges in the editor and gutter.
112
+ `--rc-textarea-padding-inline` is one length applied to both inline sides, so the bleed stays
113
+ valid and follows RTL and vertical writing modes through logical insets.
114
+ `--rc-textarea-padding-block` accepts any `padding-block` value.
115
+
116
+ Migration: split each `--rc-textarea-padding` declaration. A single length `L` becomes
117
+ `--rc-textarea-padding-block: L; --rc-textarea-padding-inline: L`. A shorthand
118
+ `T X B` becomes `--rc-textarea-padding-block: T B; --rc-textarea-padding-inline: X`.
119
+
120
+ ### Patch Changes
121
+
122
+ - 5c006de: Ship component CSS minified. Package builds now run the CSS in Lit `css` styles
123
+ and light-DOM structural styles through Lightning CSS, removing comments and
124
+ whitespace while keeping source maps that resolve to each template. Rendered
125
+ styles are unchanged.
126
+
127
+ `@rcarls/rc-common` adds `cssText`, an identity tag that marks a plain CSS
128
+ string for minification. `rc-chip`, `rc-disclosure`, and `rc-accordion` now
129
+ depend on `@rcarls/rc-common` for it.
130
+
131
+ - b764a3c: Observe interface locale changes through containing shadow roots and the host's own document.
132
+ An explicit empty `lang` now means an unknown locale rather than falling back to `<html lang>`.
133
+ Typeahead compares complete grapheme prefixes, including decomposed accents and collation
134
+ expansions. Default interpolating messages format numeric positions in the interface locale
135
+ while translation callbacks continue to receive numbers and can accept an optional locale.
136
+ Default messages isolate consumer text whose direction is unknown. Textarea content direction
137
+ uses the native LTR fallback for neutral `dir="auto"` content, recognizes Arabic Letter Mark and
138
+ isolate controls, and reruns plugins when the native textarea's `lang` or `dir` changes.
139
+ - cc0205d: Use logical CSS properties so layout follows the reading direction and
140
+ writing mode: the textarea gutter border and alignment, line-action and
141
+ diagnostic-message spacing, the markdown editor's block quote and list
142
+ indents, and block-axis scrolling for listbox, select, combobox, and markdown
143
+ panes, each keeping its physical declaration as a fallback.
144
+ - 50c0657: Align the line-actions popover and the markdown editor's link popover to the
145
+ inline start of what they belong to, so they sit under the right edge in RTL
146
+ instead of the left.
147
+ - 8387c20: Extend the `rc-textarea` active-line highlight edge to edge. The active line
148
+ and its gutter cell now paint `--rc-textarea-active-line-bg` through the editor
149
+ and gutter padding, so the row reads as one band across the whole control.
150
+ - c328259: Keep textarea gutter rows aligned with editor lines in vertical writing modes.
151
+ - f1433a9: `LineActionsOptions.createIcon` and `FoldingActionControllerOptions.createTriggerIcon`
152
+ now accept any `Element`, so an icon can be a plain inline `<svg>` rather than an
153
+ `HTMLElement` such as an icon custom element. Existing callbacks still type-check.
154
+ - 4617b45: Keep active-line and cursor tracking consistent when browsers expose a shadow-DOM selection
155
+ through different selection APIs.
156
+ - 54067cc: Tab no longer traps keyboard focus in the editor. Escape followed by Tab moves focus to the next control, and Shift+Tab moves focus to the previous control instead of inserting a tab character.
157
+ - 57d6371: Size line-number gutter rows in local CSS pixels under zoom so wrapped and
158
+ unwrapped lines stay aligned with their editor rows.
159
+ - Updated dependencies [e3dfa59]
160
+ - Updated dependencies [50d5610]
161
+ - Updated dependencies [9ee769c]
162
+ - Updated dependencies [1179f24]
163
+ - Updated dependencies [595fe37]
164
+ - Updated dependencies [38cd00c]
165
+ - Updated dependencies [5c006de]
166
+ - Updated dependencies [a6553ff]
167
+ - Updated dependencies [2205478]
168
+ - Updated dependencies [4341311]
169
+ - Updated dependencies [899bb5e]
170
+ - Updated dependencies [25fcfe0]
171
+ - Updated dependencies [51f6403]
172
+ - Updated dependencies [9caca6b]
173
+ - Updated dependencies [b764a3c]
174
+ - Updated dependencies [54d9ead]
175
+ - Updated dependencies [b9175e9]
176
+ - Updated dependencies [c8b762b]
177
+ - Updated dependencies [55e1e7f]
178
+ - Updated dependencies [f1ca82d]
179
+ - Updated dependencies [b87f27b]
180
+ - Updated dependencies [32ebead]
181
+ - Updated dependencies [bfefedd]
182
+ - Updated dependencies [c130173]
183
+ - Updated dependencies [11680b6]
184
+ - Updated dependencies [223d36c]
185
+ - Updated dependencies [7b91a44]
186
+ - Updated dependencies [aa04ead]
187
+ - Updated dependencies [ac65b5b]
188
+ - Updated dependencies [afcfef8]
189
+ - Updated dependencies [11ef1ad]
190
+ - @rcarls/rc-common@0.7.0
191
+
192
+ ## 0.6.0
193
+
194
+ ### Patch Changes
195
+
196
+ - 985067e: Allow `rc-textarea` to shrink below its intrinsic content width so `word-wrap`
197
+ wraps long, unbroken lines inside narrow grid and flex layouts instead of
198
+ forcing the consumer layout to overflow.
199
+ - 57370e4: Align component metadata, aggregate framework typings, development-time native-child
200
+ validation, controlled menu state, package declarations, and public documentation before the
201
+ next release.
202
+ - Updated dependencies [6683eb9]
203
+ - Updated dependencies [ee7ba6c]
204
+ - Updated dependencies [30eb232]
205
+ - @rcarls/rc-common@0.6.0
206
+
3
207
  ## 0.5.0
4
208
 
5
209
  ### Minor Changes
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # rc-textarea
2
2
 
3
- Textarea wrapper with line decorations, gutter rendering, inline widgets, and plugin hooks.
3
+ Textarea wrapper with line decorations, gutter rendering, folding actions, and plugin hooks.
4
4
 
5
5
  Docs: [https://richardcarls.github.io/rc-webcomponents/components/rc-textarea](https://richardcarls.github.io/rc-webcomponents/components/rc-textarea).
6
6
 
@@ -85,16 +85,31 @@ When the user edits, the slotted textarea is kept in sync and dispatches a nativ
85
85
 
86
86
  ## Common Options
87
87
 
88
- | Attribute | Property | Description |
89
- | -------------- | ------------- | ----------------------------------------------------------------------------------- |
90
- | `line-numbers` | `lineNumbers` | Show sequential line numbers in the gutter. |
91
- | `gutter` | `gutter` | Show an empty gutter that plugins can populate with `LineDecoration.gutterContent`. |
92
- | `word-wrap` | `wordWrap` | Wrap long lines instead of scrolling horizontally. |
93
- | `auto-grow` | `autoGrow` | Let the field grow vertically with content. |
94
- | `read-only` | `readOnly` | Render selectable, non-editable content. |
88
+ | Attribute | Property | Description |
89
+ | ---------------- | --------------- | ----------------------------------------------------------------------------------------- |
90
+ | `line-numbers` | `lineNumbers` | Show sequential line numbers in the gutter. |
91
+ | `gutter` | `gutter` | Show an empty gutter that plugins can populate with `LineDecoration.gutterContent`. |
92
+ | `word-wrap` | `wordWrap` | Wrap long lines instead of scrolling horizontally. |
93
+ | `auto-grow` | `autoGrow` | Let the field grow vertically with content. |
94
+ | `line-direction` | `lineDirection` | `base` (default) gives every line the editor's direction; `auto` gives each line its own. |
95
+
96
+ Read-only state comes from the slotted native control: set `readonly` on the `<textarea>`. The
97
+ editor keeps the enabled field appearance, stays focusable and selectable, announces
98
+ `aria-readonly`, and rejects edits. The host reflects `data-readonly`, and the `readOnly` getter
99
+ reports the state.
100
+
101
+ Put the content's `lang`, `dir` and `spellcheck` on the slotted `<textarea>`: the editor mirrors
102
+ `lang` and `spellcheck`, and takes its base direction from `dir` (`auto` follows the native
103
+ textarea's first strong character, or LTR when there is none). Changing the textarea's
104
+ `lang` or `dir` reruns plugins. The host's own `lang` stays the interface language and formats
105
+ line numbers.
106
+ Add `line-direction="auto"` for prose that mixes scripts; lines without a letter keep the base
107
+ direction.
95
108
 
96
109
  Use a plugin with `LineDecoration.gutterContent` for sparse numbering. Put accessible names on
97
110
  the slotted textarea with `aria-label` or a real `<label for="...">`.
111
+ Use `gutterLineNumber: true` with custom content to display the built-in number
112
+ and a plugin control together when `line-numbers` is enabled.
98
113
 
99
114
  The main JavaScript-only properties are:
100
115
 
@@ -234,31 +249,42 @@ for the field, then add component tokens for editor-specific surfaces.
234
249
 
235
250
  The component reads inherited tokens where possible:
236
251
 
237
- | Token | Use |
238
- | -------------- | ------------------------------------------------------------ |
239
- | `--rc-text` | Fallback text color before `--rc-textarea-color`. |
240
- | `color-scheme` | Inherited by the host so system colors match the page theme. |
252
+ | Token | Use |
253
+ | ----------------- | ------------------------------------------------------------ |
254
+ | `--rc-field-text` | Fallback text color before `--rc-textarea-color`. |
255
+ | `color-scheme` | Inherited by the host so system colors match the page theme. |
241
256
 
242
257
  ### Component Tokens
243
258
 
244
- | Token | Default | Use |
245
- | ----------------------------------------- | ------------------------------------------- | ------------------------------------- |
246
- | `--rc-textarea-font-family` | `monospace` | Editor font family. |
247
- | `--rc-textarea-font-size` | `1em` | Editor and gutter font size. |
248
- | `--rc-textarea-line-height` | `1.5` | Editor and gutter line height. |
249
- | `--rc-textarea-padding` | `0.5em` | Editor and gutter padding. |
250
- | `--rc-textarea-background` | `Field` | Field background. |
251
- | `--rc-textarea-color` | `var(--rc-text, FieldText)` | Field text color. |
252
- | `--rc-textarea-caret-color` | `var(--rc-textarea-color, FieldText)` | Caret color. |
253
- | `--rc-textarea-border` | `1px solid ButtonBorder` | Field border. |
254
- | `--rc-textarea-border-radius` | `2px` | Field corner radius. |
255
- | `--rc-textarea-focus-outline` | `2px solid Highlight` | Focus ring. |
256
- | `--rc-textarea-active-line-bg` | `transparent` | Active line background. |
257
- | `--rc-textarea-gutter-bg` | `Canvas` | Gutter background. |
258
- | `--rc-textarea-gutter-color` | `GrayText` | Gutter text color. |
259
- | `--rc-textarea-gutter-border` | `1px solid ButtonBorder` | Gutter separator. |
260
- | `--rc-textarea-gutter-font-family` | `var(--rc-textarea-font-family, monospace)` | Gutter font family. |
261
- | `--rc-textarea-gutter-padding-inline-end` | `0.75em` | Space between gutter labels and text. |
259
+ | Token | Default | Use |
260
+ | ----------------------------------------- | ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
261
+ | `--rc-textarea-font-family` | `monospace` | Editor font family. |
262
+ | `--rc-textarea-font-size` | `1em` | Editor and gutter font size. |
263
+ | `--rc-textarea-line-height` | `1.5` | Editor and gutter line height. |
264
+ | `--rc-textarea-padding-block` | `0.5em` | Editor and gutter block padding; any `padding-block` value. |
265
+ | `--rc-textarea-padding-inline` | `0.5em` | Editor inline padding (both sides) and gutter start padding; one length, which the active line highlight bleeds through. |
266
+ | `--rc-textarea-gutter-min-inline-size` | `24px` | Minimum gutter width including padding; Material uses `48px`. |
267
+ | `--rc-textarea-background` | `Field` | Field background. |
268
+ | `--rc-textarea-color` | `var(--rc-field-text, FieldText)` | Field text color. |
269
+ | `--rc-textarea-caret-color` | `var(--rc-textarea-color, FieldText)` | Caret color. |
270
+ | `--rc-textarea-border` | `1px solid ButtonBorder` | Field border. |
271
+ | `--rc-textarea-border-radius` | `2px` | Field corner radius. |
272
+ | `--rc-textarea-focus-outline` | `2px solid Highlight` | Focus ring. |
273
+ | `--rc-textarea-active-line-bg` | `transparent` | Full-width active line highlight. |
274
+ | `--rc-textarea-gutter-bg` | `Canvas` | Gutter background. |
275
+ | `--rc-textarea-gutter-color` | `GrayText` | Gutter text color. |
276
+ | `--rc-textarea-gutter-border` | `1px solid ButtonBorder` | Gutter separator. |
277
+ | `--rc-textarea-gutter-font-family` | `var(--rc-textarea-font-family, monospace)` | Gutter font family. |
278
+ | `--rc-textarea-gutter-padding-inline-end` | `0.75em` | Space between gutter labels and text. |
279
+
280
+ Line actions added by plugins use the `--rc-line-action-*` family. Inline actions default to
281
+ compact, inherited styling; popover actions use `Canvas`, `ButtonText`, and `ButtonFace` system
282
+ colors where their surface needs an independent default. The public hooks are
283
+ `--rc-line-actions-gap`, `--rc-line-actions-margin-start`, `--rc-line-action-padding`,
284
+ `--rc-line-action-border`, `--rc-line-action-border-radius`, `--rc-line-action-bg`,
285
+ `--rc-line-action-color`, `--rc-line-action-font-size`, `--rc-line-action-opacity`,
286
+ `--rc-line-action-hover-opacity`, `--rc-line-action-hover-bg`,
287
+ `--rc-line-action-hover-color`, and `--rc-line-action-shadow`.
262
288
 
263
289
  ```css
264
290
  rc-textarea {
@@ -274,7 +300,8 @@ rc-textarea {
274
300
 
275
301
  ### Parts And Decoration Styles
276
302
 
277
- The exposed CSS parts are `root`, `gutter`, `gutter-cells`, `editor-area`, and `editor`.
303
+ The exposed CSS parts are `root`, `gutter`, `gutter-cells`, `editor-area`, `editor`,
304
+ `fold-trigger`, and `fold-icon` (when a plugin supplies an icon).
278
305
 
279
306
  ```css
280
307
  rc-textarea::part(editor) {
@@ -291,6 +318,8 @@ syntax highlighter.
291
318
  | Key | Behavior |
292
319
  | --------------------------------- | ------------------------------------------------------------ |
293
320
  | `Tab` | Inserts `\t`. |
321
+ | `Escape`, then `Tab` | Moves focus to the next control instead of inserting `\t`. |
322
+ | `Shift+Tab` | Moves focus to the previous control. |
294
323
  | `Ctrl/Cmd+Z` | Undo. |
295
324
  | `Ctrl/Cmd+Y` / `Ctrl/Cmd+Shift+Z` | Redo. |
296
325
  | `Paste` | Inserts plain text only and normalizes line endings to `\n`. |
@@ -298,6 +327,13 @@ syntax highlighter.
298
327
 
299
328
  ## More Detail
300
329
 
330
+ `FoldingActionController` provides independent accessible buttons for caller-owned panels
331
+ or source-line ranges. It retains expansion by key and leaves content creation to the plugin.
332
+ Source folds hide complete editor and gutter lines while preserving the submitted text.
333
+ Buttons can sit in the gutter or trailing lane. See the
334
+ [interactive folding examples](https://richardcarls.github.io/rc-webcomponents/components/rc-textarea#folding-actions)
335
+ for setup and lifecycle details.
336
+
301
337
  - [PLUGIN_AUTHORING.md](PLUGIN_AUTHORING.md) covers custom plugins, decoration types,
302
338
  selection APIs, stylesheet injection, and parser/highlighter recipes.
303
339
  - [ARCHITECTURE.md](ARCHITECTURE.md) is an internal contributor reference for the rendering