@heartlandone/vega 2.95.0 → 2.96.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 (181) hide show
  1. package/dist/cjs/{app-globals-76815382.js → app-globals-38afea36.js} +7 -7
  2. package/dist/cjs/{code-block-493c7ce7.js → code-block-4126dc3b.js} +1501 -55
  3. package/dist/cjs/{component-value-history-controller-slimmer.abstract-ab21fcbf.js → component-value-history-controller-slimmer.abstract-38ba956e.js} +2 -2
  4. package/dist/cjs/{content-state-fc34a814.js → content-state-50e8a03c.js} +142 -580
  5. package/dist/cjs/{element-appender-slimmer-1d6323c2.js → element-appender-slimmer-7773fdab.js} +115 -0
  6. package/dist/cjs/{image-annotation-action-7c4cd316.js → image-annotation-action-89363de8.js} +2 -2
  7. package/dist/cjs/{image-extension-30a7c10f.js → image-extension-c881c454.js} +2 -2
  8. package/dist/cjs/index.cjs.js +10 -10
  9. package/dist/cjs/{link-extension-92a63cb7.js → link-extension-b7f99a52.js} +2 -2
  10. package/dist/cjs/loader.cjs.js +7 -7
  11. package/dist/cjs/{public-rules-9e1ea1d9.js → public-rules-72894208.js} +3 -3
  12. package/dist/cjs/{range-30219330.js → range-95d41dea.js} +1 -1
  13. package/dist/cjs/{rich-text-editor-required-rule-23bf7485.js → rich-text-editor-required-rule-4d6d2493.js} +1 -1
  14. package/dist/cjs/{split-cell-operation-43752212.js → split-cell-operation-70be116d.js} +2 -2
  15. package/dist/cjs/{token-extension-d123d9d0.js → token-extension-eb828948.js} +35 -11
  16. package/dist/cjs/vega-code-block.cjs.entry.js +3 -3
  17. package/dist/cjs/vega-date-picker_2.cjs.entry.js +1 -1
  18. package/dist/cjs/vega-dropdown_5.cjs.entry.js +27 -4
  19. package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
  20. package/dist/cjs/vega-popover_2.cjs.entry.js +1 -1
  21. package/dist/cjs/vega-rich-text-content.cjs.entry.js +58 -9
  22. package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +608 -90
  23. package/dist/cjs/vega-rich-text-table-properties_3.cjs.entry.js +3 -3
  24. package/dist/cjs/vega-section-title.cjs.entry.js +896 -14
  25. package/dist/cjs/vega-time-picker_2.cjs.entry.js +1 -1
  26. package/dist/cjs/vega-tooltip_2.cjs.entry.js +1 -1
  27. package/dist/cjs/vega.cjs.js +7 -7
  28. package/dist/collection/components/vega-combo-box/vega-combo-box.js +2 -2
  29. package/dist/collection/components/vega-dropdown/vega-dropdown.js +30 -7
  30. package/dist/collection/components/vega-input-select/vega-input-select.js +2 -2
  31. package/dist/collection/components/vega-rich-text-content/vega-rich-text-content.css +4 -0
  32. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-delete-node-content-strategy.js +29 -0
  33. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-delete-text-or-decorator-node-strategy.js +10 -1
  34. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-transform-to-list-strategy.js +8 -3
  35. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-annotation-strategy.abstract.js +60 -0
  36. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-replace-nest-list-strategy.js +36 -4
  37. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-items-strategy.abstract.js +27 -0
  38. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-nest-items-strategy.js +74 -0
  39. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-remove-list-item-strategy.js +81 -1
  40. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-transform-selection.js +30 -0
  41. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-transform-to-list-strategy.js +160 -9
  42. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-transform-to-paragraph-strategy.js +376 -10
  43. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-unnest-items-strategy.js +104 -0
  44. package/dist/collection/components/vega-rich-text-editor/dto/actions/modify-content-action.abstract.js +2 -0
  45. package/dist/collection/components/vega-rich-text-editor/dto/actions/nest-list-items-action.js +12 -0
  46. package/dist/collection/components/vega-rich-text-editor/dto/actions/unnest-list-items-action.js +12 -0
  47. package/dist/collection/components/vega-rich-text-editor/dto/annotations/list-annotation.js +12 -0
  48. package/dist/collection/components/vega-rich-text-editor/dto/blocks/list-block.js +10 -1
  49. package/dist/collection/components/vega-rich-text-editor/dto/blocks/list-item-block.js +11 -3
  50. package/dist/collection/components/vega-rich-text-editor/dto/content-state.js +7 -1
  51. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/list-block/list-block-filter-styles-strategy.js +8 -4
  52. package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/list-block-renderer.js +34 -1
  53. package/dist/collection/components/vega-rich-text-editor/dto/renderers/blocks/list-item-block-renderer.js +20 -3
  54. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotation-handler/table-annotation-handler-base.js +25 -1
  55. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/li-to-rte-list-item-block-strategy.js +2 -0
  56. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/abstract-delete-content-handler.js +29 -0
  57. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/bullets-numbers/bullets-numbers-toolbar-button-slimmer.js +30 -1
  58. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/bullets-numbers/helper/abstract-list-keyboard-handler.js +204 -0
  59. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/bullets-numbers/helper/list-shift-tab-outdent-handler.js +42 -0
  60. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/bullets-numbers/helper/list-tab-indent-handler.js +34 -0
  61. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/bullets-numbers/list-keyboard-slimmer.js +180 -0
  62. package/dist/collection/components/vega-section-title/slimmers/a11y-tree/build-section-title-a11y-tree.js +54 -0
  63. package/dist/collection/components/vega-section-title/slimmers/renderers/vega-section-title-renderer.js +4 -4
  64. package/dist/collection/components/vega-section-title/vega-section-title.js +18 -2
  65. package/dist/collection/helpers/a11y-tree/a11y-node-dto.js +210 -0
  66. package/dist/collection/helpers/a11y-tree/a11y-tree-applier.js +189 -0
  67. package/dist/collection/helpers/a11y-tree/a11y-tree.types.js +48 -0
  68. package/dist/collection/helpers/a11y-tree/strategies/baseline-strategy.js +78 -0
  69. package/dist/collection/helpers/a11y-tree/strategies/firefox-nvda-strategy.js +56 -0
  70. package/dist/collection/helpers/a11y-tree/strategies/webkit-voiceover-strategy.js +140 -0
  71. package/dist/collection/helpers/a11y-tree/strategy-resolver.js +172 -0
  72. package/dist/collection/helpers/slimmers/a11y-tree-slimmer.js +54 -0
  73. package/dist/collection/helpers/slimmers/element-appender/element-appender-slimmer.js +29 -0
  74. package/dist/collection/helpers/slimmers/element-appender/visibility-modifiers/clip-on-scroll-modifier.js +70 -0
  75. package/dist/collection/helpers/slimmers/element-appender/visibility-modifiers/visibility-modifier.interface.js +1 -0
  76. package/dist/collection/helpers/ui/element-appender.js +16 -0
  77. package/dist/esm/{app-globals-eafcc7a1.js → app-globals-d7b651c1.js} +7 -7
  78. package/dist/esm/{code-block-e12588fe.js → code-block-0a88b481.js} +1495 -51
  79. package/dist/esm/{component-value-history-controller-slimmer.abstract-4e8eb313.js → component-value-history-controller-slimmer.abstract-6846edfa.js} +2 -2
  80. package/dist/esm/{content-state-8032467a.js → content-state-79ca99e5.js} +105 -541
  81. package/dist/esm/{element-appender-slimmer-7fcb944b.js → element-appender-slimmer-73ad10ae.js} +115 -0
  82. package/dist/esm/{image-annotation-action-08a20d5e.js → image-annotation-action-bb299ef1.js} +2 -2
  83. package/dist/esm/{image-extension-b6c7e4a7.js → image-extension-48a96f98.js} +2 -2
  84. package/dist/esm/index.js +8 -8
  85. package/dist/esm/{link-extension-97fcb8fb.js → link-extension-09534514.js} +2 -2
  86. package/dist/esm/loader.js +7 -7
  87. package/dist/esm/{public-rules-c06f0d2a.js → public-rules-5eb03ef0.js} +3 -3
  88. package/dist/esm/{range-e999837f.js → range-d4deb7df.js} +1 -1
  89. package/dist/esm/{rich-text-editor-required-rule-71f8ee98.js → rich-text-editor-required-rule-5bbbce23.js} +1 -1
  90. package/dist/esm/{split-cell-operation-359f8082.js → split-cell-operation-7f3058ad.js} +2 -2
  91. package/dist/esm/{token-extension-f5bf9c21.js → token-extension-40c32bcc.js} +30 -6
  92. package/dist/esm/vega-code-block.entry.js +3 -3
  93. package/dist/esm/vega-date-picker_2.entry.js +1 -1
  94. package/dist/esm/vega-dropdown_5.entry.js +27 -4
  95. package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
  96. package/dist/esm/vega-popover_2.entry.js +1 -1
  97. package/dist/esm/vega-rich-text-content.entry.js +58 -9
  98. package/dist/esm/vega-rich-text-editor_4.entry.js +604 -86
  99. package/dist/esm/vega-rich-text-table-properties_3.entry.js +3 -3
  100. package/dist/esm/vega-section-title.entry.js +897 -15
  101. package/dist/esm/vega-time-picker_2.entry.js +1 -1
  102. package/dist/esm/vega-tooltip_2.entry.js +1 -1
  103. package/dist/esm/vega.js +7 -7
  104. package/dist/sri/vega-sri-manifest.json +94 -94
  105. package/dist/types/components/vega-combo-box/vega-combo-box.d.ts +6 -6
  106. package/dist/types/components/vega-dropdown/types.d.ts +2 -2
  107. package/dist/types/components/vega-dropdown/vega-dropdown.d.ts +32 -9
  108. package/dist/types/components/vega-input-select/vega-input-select.d.ts +6 -6
  109. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-annotation-strategy.abstract.d.ts +36 -0
  110. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-item-replace-nest-list-strategy.d.ts +14 -2
  111. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-items-strategy.abstract.d.ts +22 -0
  112. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-nest-items-strategy.d.ts +21 -0
  113. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-remove-list-item-strategy.d.ts +14 -0
  114. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-transform-selection.d.ts +15 -0
  115. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-transform-to-list-strategy.d.ts +30 -3
  116. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-transform-to-paragraph-strategy.d.ts +99 -3
  117. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/list-unnest-items-strategy.d.ts +22 -0
  118. package/dist/types/components/vega-rich-text-editor/dto/actions/modify-content-action.abstract.d.ts +2 -0
  119. package/dist/types/components/vega-rich-text-editor/dto/actions/nest-list-items-action.d.ts +11 -0
  120. package/dist/types/components/vega-rich-text-editor/dto/actions/unnest-list-items-action.d.ts +11 -0
  121. package/dist/types/components/vega-rich-text-editor/dto/annotations/list-annotation.d.ts +8 -0
  122. package/dist/types/components/vega-rich-text-editor/dto/blocks/list-block.d.ts +6 -1
  123. package/dist/types/components/vega-rich-text-editor/dto/blocks/list-item-block.d.ts +5 -1
  124. package/dist/types/components/vega-rich-text-editor/dto/content-state.d.ts +2 -2
  125. package/dist/types/components/vega-rich-text-editor/dto/renderers/blocks/list-block-renderer.d.ts +2 -0
  126. package/dist/types/components/vega-rich-text-editor/dto/renderers/blocks/list-item-block-renderer.d.ts +8 -0
  127. package/dist/types/components/vega-rich-text-editor/extensions/table/annotation-handler/table-annotation-handler-base.d.ts +18 -0
  128. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/bullets-numbers/bullets-numbers-toolbar-button-slimmer.d.ts +8 -0
  129. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/bullets-numbers/helper/abstract-list-keyboard-handler.d.ts +99 -0
  130. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/bullets-numbers/helper/list-shift-tab-outdent-handler.d.ts +15 -0
  131. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/bullets-numbers/helper/list-tab-indent-handler.d.ts +15 -0
  132. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/bullets-numbers/list-keyboard-slimmer.d.ts +73 -0
  133. package/dist/types/components/vega-section-title/slimmers/a11y-tree/build-section-title-a11y-tree.d.ts +41 -0
  134. package/dist/types/components/vega-section-title/vega-section-title.d.ts +9 -0
  135. package/dist/types/components.d.ts +10 -10
  136. package/dist/types/helpers/a11y-tree/a11y-node-dto.d.ts +173 -0
  137. package/dist/types/helpers/a11y-tree/a11y-tree-applier.d.ts +28 -0
  138. package/dist/types/helpers/a11y-tree/a11y-tree.types.d.ts +137 -0
  139. package/dist/types/helpers/a11y-tree/strategies/baseline-strategy.d.ts +18 -0
  140. package/dist/types/helpers/a11y-tree/strategies/firefox-nvda-strategy.d.ts +16 -0
  141. package/dist/types/helpers/a11y-tree/strategies/webkit-voiceover-strategy.d.ts +23 -0
  142. package/dist/types/helpers/a11y-tree/strategy-resolver.d.ts +59 -0
  143. package/dist/types/helpers/slimmers/a11y-tree-slimmer.d.ts +49 -0
  144. package/dist/types/helpers/slimmers/element-appender/element-appender-slimmer.d.ts +9 -0
  145. package/dist/types/helpers/slimmers/element-appender/visibility-modifiers/clip-on-scroll-modifier.d.ts +37 -0
  146. package/dist/types/helpers/slimmers/element-appender/visibility-modifiers/visibility-modifier.interface.d.ts +56 -0
  147. package/dist/types/helpers/ui/element-appender.d.ts +7 -0
  148. package/dist/vega/index.esm.js +1 -1
  149. package/dist/vega/{p-9c39f90b.entry.js → p-1dfbc542.entry.js} +1 -1
  150. package/dist/vega/{p-e235020b.entry.js → p-22cc174e.entry.js} +1 -1
  151. package/dist/vega/{p-b187b82d.entry.js → p-2df5d59b.entry.js} +1 -1
  152. package/dist/vega/{p-f7e459cd.js → p-312d8205.js} +1 -1
  153. package/dist/vega/{p-a7209700.js → p-3345d903.js} +1 -1
  154. package/dist/vega/{p-02355de8.js → p-3c23ec90.js} +1 -1
  155. package/dist/vega/p-55e0014a.js +3 -0
  156. package/dist/vega/p-5f377954.js +1 -1
  157. package/dist/vega/p-65fee02f.entry.js +1 -0
  158. package/dist/vega/p-6a51d720.js +1 -0
  159. package/dist/vega/{p-fe24b459.js → p-6c7b6d45.js} +1 -1
  160. package/dist/vega/{p-579cdeae.js → p-84b7a775.js} +1 -1
  161. package/dist/vega/{p-df828d90.entry.js → p-96da7d30.entry.js} +1 -1
  162. package/dist/vega/{p-88be9ec5.js → p-9d3f69cb.js} +1 -1
  163. package/dist/vega/{p-8a001caa.js → p-9f11b579.js} +1 -1
  164. package/dist/vega/{p-ba2b9663.entry.js → p-acaff62d.entry.js} +1 -1
  165. package/dist/vega/p-b63319e9.entry.js +1 -0
  166. package/dist/vega/{p-c079c935.entry.js → p-b660f38c.entry.js} +1 -1
  167. package/dist/vega/p-b8ffa42f.entry.js +1 -0
  168. package/dist/vega/{p-4fe40b76.js → p-c4564904.js} +1 -1
  169. package/dist/vega/p-d9158512.js +1 -0
  170. package/dist/vega/p-e62d41ee.js +1 -0
  171. package/dist/vega/{p-9f7154d2.js → p-ec5dee32.js} +1 -1
  172. package/dist/vega/{p-05d04c07.entry.js → p-f29d9707.entry.js} +1 -1
  173. package/dist/vega/vega.esm.js +1 -1
  174. package/package.json +3 -2
  175. package/dist/vega/p-0be4df0a.js +0 -1
  176. package/dist/vega/p-38c9d782.js +0 -1
  177. package/dist/vega/p-513bc0d9.js +0 -1
  178. package/dist/vega/p-8d4b85e7.entry.js +0 -1
  179. package/dist/vega/p-c5d3b008.entry.js +0 -1
  180. package/dist/vega/p-d25ca0c3.entry.js +0 -1
  181. package/dist/vega/p-f4da615a.js +0 -3
@@ -269,19 +269,19 @@ export declare class VegaInputSelect {
269
269
  */
270
270
  searchTrigger: EventEmitter<VegaDropdownSearchTriggerEventDetail>;
271
271
  /**
272
- * An event emitter notifying that the Select All option in the dropdown has been clicked.
272
+ * An event emitter only fired when the Select All checkbox in the dropdown has been clicked.
273
273
  *
274
- * The event's `detail` property is `true` when all items become selected,
275
- * and `false` when Select All is cleared.
274
+ * The event's `detail` property is `true` when the Select All checkbox is clicked to select all items,
275
+ * and `false` when the Select All checkbox is clicked to clear all selected items.
276
276
  *
277
277
  * @vegaVersion 2.95.0
278
278
  */
279
279
  vegaDropdownSelectAllClick: EventEmitter<boolean>;
280
280
  /**
281
- * An event emitter notifying that the Select All option in the dropdown has been clicked.
281
+ * An event emitter only fired when the Select All checkbox in the dropdown has been clicked.
282
282
  *
283
- * The event's `detail` property is `true` when all items become selected,
284
- * and `false` when Select All is cleared.
283
+ * The event's `detail` property is `true` when the Select All checkbox is clicked to select all items,
284
+ * and `false` when the Select All checkbox is clicked to clear all selected items.
285
285
  *
286
286
  * @eventSemantics namespace:native
287
287
  * @vegaVersion 2.95.0
@@ -0,0 +1,36 @@
1
+ import { ModifyContentAction } from '../../actions/modify-content-action.abstract';
2
+ import { RTEBlock } from '../../blocks/block.abstract';
3
+ import { RTEListBlock } from '../../blocks/list-block';
4
+ import { ActionHandleStrategy } from '../action-handle-strategy.abstract';
5
+ /**
6
+ * Base strategy for list operations that reconstruct or merge list containers.
7
+ * Keeps annotation cloning and equality rules consistent across those operations.
8
+ */
9
+ export declare abstract class ListAnnotationStrategy<T extends ModifyContentAction, Target extends RTEBlock> extends ActionHandleStrategy<T, Target> {
10
+ /**
11
+ * Copy list-container annotations without sharing mutable annotation instances.
12
+ * Factory-provided defaults remain intact unless the source supplies the same key.
13
+ *
14
+ * @param {RTEListBlock} source - List whose annotations should be copied.
15
+ * @param {RTEListBlock} target - Newly created list receiving the annotations.
16
+ */
17
+ protected copyListAnnotations(source: RTEListBlock, target: RTEListBlock): void;
18
+ /**
19
+ * Compare list annotations independently of map/object insertion order. Map keys
20
+ * are compared separately because rendering annotations such as LIST intentionally
21
+ * do not serialize to the DTO but still affect the rendered list.
22
+ * Array order remains significant because it can affect rendered class order.
23
+ *
24
+ * @param {RTEListBlock} first - First list to compare.
25
+ * @param {RTEListBlock} second - Second list to compare.
26
+ * @returns {boolean} Whether both list containers have equivalent annotations.
27
+ */
28
+ protected haveSameListAnnotations(first: RTEListBlock, second: RTEListBlock): boolean;
29
+ /**
30
+ * Recursively sort object keys for stable annotation comparison.
31
+ *
32
+ * @param {unknown} value - Annotation value to normalize.
33
+ * @returns {unknown} Normalized annotation value.
34
+ */
35
+ private normalizeAnnotationValue;
36
+ }
@@ -1,12 +1,24 @@
1
1
  import { ReplaceNestListAction } from '../../actions/replace-nest-list-action';
2
2
  import type { RTEListItemBlock } from '../../blocks/list-item-block';
3
- import { ActionHandleStrategy } from '../action-handle-strategy.abstract';
3
+ import { ListAnnotationStrategy } from './list-annotation-strategy.abstract';
4
4
  /**
5
5
  * Replace list item nest list strategy.
6
+ *
7
+ * This is the single write-through point for `nestList` mutations. It automatically
8
+ * normalizes the incoming array by merging adjacent lists only when their types
9
+ * and container annotations match. Styled list boundaries remain independent.
6
10
  */
7
- export declare class ListItemReplaceNestListStrategy extends ActionHandleStrategy<ReplaceNestListAction, RTEListItemBlock> {
11
+ export declare class ListItemReplaceNestListStrategy extends ListAnnotationStrategy<ReplaceNestListAction, RTEListItemBlock> {
8
12
  /**
9
13
  * @inheritDoc
10
14
  */
11
15
  protected handleAction(action: ReplaceNestListAction, target: RTEListItemBlock): void;
16
+ /**
17
+ * Merge adjacent entries that share the same list type and annotations.
18
+ * This is an idempotent O(n) pass — calling it on an already-normalized array is a no-op.
19
+ *
20
+ * @param {RTEListBlock[]} lists - The nest list array to normalize.
21
+ * @returns {RTEListBlock[]} A new array with adjacent same-type entries merged.
22
+ */
23
+ private mergeAdjacentSameType;
12
24
  }
@@ -0,0 +1,22 @@
1
+ import { NestListItemsAction } from '../../actions/nest-list-items-action';
2
+ import { UnnestListItemsAction } from '../../actions/unnest-list-items-action';
3
+ import { RTEListBlock } from '../../blocks/list-block';
4
+ import { RTEListItemBlock } from '../../blocks/list-item-block';
5
+ import { ActionHandleStrategy } from '../action-handle-strategy.abstract';
6
+ declare type ListItemsSelectionAction = NestListItemsAction | UnnestListItemsAction;
7
+ /**
8
+ * Shared base strategy for list-item operations that require ordered contiguous
9
+ * item selection within the same target list.
10
+ */
11
+ export declare abstract class AbstractListItemsStrategy<T extends ListItemsSelectionAction, R = void> extends ActionHandleStrategy<T, RTEListBlock, R> {
12
+ /**
13
+ * Returns selected list items ordered by their position in target and validated
14
+ * as a contiguous range. Returns an empty array when selection is invalid.
15
+ *
16
+ * @param {RTEListBlock} target - The target list block containing selected items.
17
+ * @param {RTEListItemBlock[]} selectedBlocks - Selected list items from action payload.
18
+ * @returns {RTEListItemBlock[]} Ordered contiguous selected items, or empty array.
19
+ */
20
+ protected getOrderedContiguousItems(target: RTEListBlock, selectedBlocks: RTEListItemBlock[]): RTEListItemBlock[];
21
+ }
22
+ export {};
@@ -0,0 +1,21 @@
1
+ import { NestListItemsAction } from '../../actions/nest-list-items-action';
2
+ import { RTEListBlock } from '../../blocks/list-block';
3
+ import { AbstractListItemsStrategy } from './list-items-strategy.abstract';
4
+ /**
5
+ * Move selected list items into a nested list under the previous sibling.
6
+ */
7
+ export declare class ListNestItemsStrategy extends AbstractListItemsStrategy<NestListItemsAction> {
8
+ /**
9
+ * @inheritDoc
10
+ */
11
+ protected handleAction(action: NestListItemsAction, target: RTEListBlock): void;
12
+ /**
13
+ * Recursively unify all nestLists of a list item (and its descendants) to the given type.
14
+ * Adjacent same-type merge is handled automatically by ListItemReplaceNestListStrategy
15
+ * when ReplaceNestListAction is applied, so this method only needs to set the type.
16
+ *
17
+ * @param {RTEListItemBlock} item - The list item whose descendants should be normalized.
18
+ * @param {RTEListBlock['type']} targetType - The target list type used for normalization.
19
+ */
20
+ private unifyDescendantNestLists;
21
+ }
@@ -12,4 +12,18 @@ export declare class ListRemoveListItemStrategy extends RemoveChildrenStrategy {
12
12
  * @param {RTEListBlock} target - The list block.
13
13
  */
14
14
  protected handleAction(action: RemoveChildrenAction, target: RTEListBlock): void;
15
+ /**
16
+ * Promote nested lists of the list item being removed by one level.
17
+ *
18
+ * Same-type nested lists are flattened into the current (target) list to avoid
19
+ * creating redundant list wrappers. Different-type nested lists stay nested under
20
+ * the parent list item as siblings of the target list, positioned relative to the
21
+ * target so document order is preserved. When the parent is the root content, the
22
+ * different-type lists are inserted right after the target list instead.
23
+ *
24
+ * @param {RTEListItemBlock} removingListItem - The list item being removed.
25
+ * @param {RTEListBlock} target - The list currently containing the item.
26
+ * @param {number} removingIndex - The original index of the removing item.
27
+ */
28
+ private promoteNestListsToUpperLevel;
15
29
  }
@@ -0,0 +1,15 @@
1
+ import { ListType } from '../../../interface';
2
+ import { RTEBlock } from '../../blocks/block.abstract';
3
+ /**
4
+ * Normalize a mixed paragraph/list selection before rebuilding it as a list.
5
+ *
6
+ * Selected list items whose owning ancestor item is also selected remain inside
7
+ * that ancestor's nestList instead of being emitted again as flattened siblings.
8
+ * Their immediate list type is still updated because the nested item was part of
9
+ * the toolbar selection.
10
+ *
11
+ * @param {RTEBlock[]} selectedBlocks - Blocks selected by the toolbar action.
12
+ * @param {ListType} listType - Target list type.
13
+ * @returns {RTEBlock[]} Top-level selected blocks to emit into the rebuilt list.
14
+ */
15
+ export declare function normalizeMixedListSelection(selectedBlocks: RTEBlock[], listType: ListType): RTEBlock[];
@@ -1,12 +1,39 @@
1
1
  import { TransformListAction } from '../../actions/transform-list-action';
2
- import type { RTEListBlock } from '../../blocks/list-block';
3
- import { ActionHandleStrategy } from '../action-handle-strategy.abstract';
2
+ import { RTEListBlock } from '../../blocks/list-block';
3
+ import { ListAnnotationStrategy } from './list-annotation-strategy.abstract';
4
4
  /**
5
5
  * Convert the selected blocks to list strategy.
6
6
  */
7
- export declare class ListTransformToListStrategy extends ActionHandleStrategy<TransformListAction, RTEListBlock> {
7
+ export declare class ListTransformToListStrategy extends ListAnnotationStrategy<TransformListAction, RTEListBlock> {
8
8
  /**
9
9
  * @inheritDoc
10
10
  */
11
11
  protected handleAction(action: TransformListAction, target: RTEListBlock): void;
12
+ /**
13
+ * Convert a single list's type in place, preserving its items and their nested
14
+ * structure. Root lists are swapped in the content children; nested lists are
15
+ * swapped inside their parent item's nestList.
16
+ *
17
+ * @param {RTEListBlock} list - The list whose type should be converted.
18
+ * @param {RTEListBlock['type']} listType - The target list type.
19
+ */
20
+ private convertListTypeInPlace;
21
+ /**
22
+ * Handle the case where selected blocks span multiple nestLists under the same parent item.
23
+ * Transform each affected list and then merge adjacent same-type lists.
24
+ *
25
+ * @param {TransformListAction} action - The transform action with selection and target list type.
26
+ * @param {RTEListBlock} target - The nested list where transformation starts.
27
+ */
28
+ private handleCrossListTransform;
29
+ /**
30
+ * Create a replacement list through the owning content factory while retaining
31
+ * the source list's container annotations.
32
+ *
33
+ * @param {VegaRTEContent} rootContent - Editor content owning the factory.
34
+ * @param {RTEListBlock} source - List whose annotations should be retained.
35
+ * @param {RTEListBlock['type']} listType - Replacement list type.
36
+ * @returns {RTEListBlock} New annotated list shell.
37
+ */
38
+ private createListFromSource;
12
39
  }
@@ -1,14 +1,110 @@
1
1
  import { TransformParagraphAction } from '../../actions/transform-paragraph-action';
2
- import type { RTEListBlock } from '../../blocks/list-block';
3
- import { ActionHandleStrategy } from '../action-handle-strategy.abstract';
2
+ import { RTEListBlock } from '../../blocks/list-block';
3
+ import { ListAnnotationStrategy } from './list-annotation-strategy.abstract';
4
4
  /**
5
5
  * Convert the selected list block to paragraph strategy.
6
6
  */
7
- export declare class ListTransformToParagraphStrategy extends ActionHandleStrategy<TransformParagraphAction, RTEListBlock> {
7
+ export declare class ListTransformToParagraphStrategy extends ListAnnotationStrategy<TransformParagraphAction, RTEListBlock> {
8
8
  /**
9
9
  * @inheritDoc
10
10
  */
11
11
  protected handleAction(action: TransformParagraphAction, target: RTEListBlock): void;
12
+ /**
13
+ * Ensure the action is applied to the first selected item's parent list and
14
+ * every selected item belongs to the same editor content.
15
+ *
16
+ * @param {RTEListItemBlock[][]} selectedSegments - Normalized selection segments.
17
+ * @param {RTEListBlock} target - List receiving the transform action.
18
+ * @returns {boolean} Whether the target and root content are consistent.
19
+ */
20
+ private hasConsistentTargetAndRoot;
21
+ /**
22
+ * Capture selected text nodes in document order before reverse-order tree
23
+ * mutations move them into paragraphs.
24
+ *
25
+ * @param {RTEListItemBlock[][]} selectedSegments - Normalized selection segments.
26
+ */
27
+ private syncSelection;
28
+ /**
29
+ * Transform one normalized segment without recursively dispatching another
30
+ * flushable action.
31
+ *
32
+ * @param {RTEListItemBlock[]} segment - Contiguous items sharing one parent list.
33
+ */
34
+ private transformSegment;
35
+ /**
36
+ * Handle the case where the target list is at root level (parent is VegaRTEContent).
37
+ *
38
+ * @param {TransformParagraphAction} action - The paragraph transform action.
39
+ * @param {RTEListBlock} target - The root list being transformed.
40
+ */
41
+ private handleRootListCase;
42
+ /**
43
+ * Handle the case where the target list is nested (parent is RTEListItemBlock).
44
+ *
45
+ * Algorithm:
46
+ * 1. Build the ancestor path from root list down to the target nested list.
47
+ * 2. At each level on the path, collect "trailing" items (items after the ancestor).
48
+ * 3. Trim each list along the path to keep only the "before" portion.
49
+ * 4. Collect trailing items from all levels + selected item's own nestList children.
50
+ * 5. Group trailing items into lists by consecutive type.
51
+ * 6. Insert into content: [before-root-list, paragraphs, ...after-lists].
52
+ *
53
+ * @param {TransformParagraphAction} action - The paragraph transform action.
54
+ * @param {RTEListBlock} target - The nested list being transformed.
55
+ */
56
+ private handleNestedListCase;
57
+ /**
58
+ * Normalize selected items into document order and split them into contiguous
59
+ * segments that share the same immediate parent list. Unlike Shift+Tab, the
60
+ * toolbar action keeps selected descendants so every selected item becomes a
61
+ * paragraph.
62
+ *
63
+ * @param {RTEBlock[]} selectedBlocks - Raw selected blocks.
64
+ * @returns {RTEListItemBlock[][]} Parent-based contiguous selection segments.
65
+ */
66
+ private getSelectedSegments;
67
+ /**
68
+ * Resolve a list item's structural document path, including the positions of
69
+ * root lists, owning list items, nested lists, and the item itself.
70
+ *
71
+ * @param {RTEListItemBlock} item - Selected list item.
72
+ * @returns {number[] | null} Structural path, or null for a detached item.
73
+ */
74
+ private getStructuralPath;
75
+ /**
76
+ * Resolve a root list's path through zero or more HTML containers to the
77
+ * editor content.
78
+ *
79
+ * @param {RTEListBlock} rootList - List whose parent is a content container.
80
+ * @returns {number[] | null} Container path, or null for detached/cyclic ownership.
81
+ */
82
+ private getContainerPath;
83
+ /**
84
+ * Compare two structural paths in document order.
85
+ *
86
+ * @param {number[]} firstPath - First structural path.
87
+ * @param {number[]} secondPath - Second structural path.
88
+ * @returns {number} Relative document order.
89
+ */
90
+ private compareStructuralPaths;
91
+ /**
92
+ * Append a list to an operation-local block sequence, merging only with the
93
+ * immediately preceding same-type list in that sequence.
94
+ *
95
+ * @param {RTEBlock[]} blocks - Operation-local output sequence.
96
+ * @param {RTEListBlock} list - List to append or merge.
97
+ */
98
+ private appendListBlock;
99
+ /**
100
+ * Create a list through the content factory and retain the source list's
101
+ * container annotations when a structural split requires a new list block.
102
+ *
103
+ * @param {VegaRTEContent} rootContent - Editor content that owns the factory.
104
+ * @param {RTEListBlock} source - List whose type and annotations should be retained.
105
+ * @returns {RTEListBlock} Newly created list shell.
106
+ */
107
+ private createListFromSource;
12
108
  /**
13
109
  * Converts a RTEListItemBlock to a RTETextBlock representing a paragraph.
14
110
  *
@@ -0,0 +1,22 @@
1
+ import { UnnestListItemsAction } from '../../actions/unnest-list-items-action';
2
+ import { RTEListBlock } from '../../blocks/list-block';
3
+ import { AbstractListItemsStrategy } from './list-items-strategy.abstract';
4
+ /**
5
+ * Promote selected nested list items one level up.
6
+ */
7
+ export declare class ListUnnestItemsStrategy extends AbstractListItemsStrategy<UnnestListItemsAction> {
8
+ /**
9
+ * @inheritDoc
10
+ */
11
+ protected handleAction(action: UnnestListItemsAction, target: RTEListBlock): void;
12
+ /**
13
+ * Collect and remove nestList entries that appear after the given target list
14
+ * in the parent item's nestList array. These trailing entries need to be
15
+ * transferred to the unnested item to preserve visual document order.
16
+ *
17
+ * @param {RTEListItemBlock} parentListItem - The list item owning the nestList.
18
+ * @param {RTEListBlock} target - The list being removed (used as the reference point).
19
+ * @returns {RTEListBlock[]} The trailing nestList entries (already removed from parentListItem).
20
+ */
21
+ private collectTrailingNestLists;
22
+ }
@@ -15,6 +15,8 @@ export declare enum ModifyContentActionType {
15
15
  'LINE_BREAK_MULTIPLE_BLOCKS' = "LINE_BREAK_MULTIPLE_BLOCKS",
16
16
  'TRANSFORM_LIST_BLOCK' = "TRANSFORM_LIST_BLOCK",
17
17
  'TRANSFORM_PARAGRAPH_BLOCK' = "TRANSFORM_PARAGRAPH_BLOCK",
18
+ 'NEST_LIST_ITEMS' = "NEST_LIST_ITEMS",
19
+ 'UNNEST_LIST_ITEMS' = "UNNEST_LIST_ITEMS",
18
20
  'DELETE_BLOCK_CONTENT' = "DELETE_BLOCK_CONTENT",
19
21
  'INSERT_IMAGE_TO_BLOCK' = "INSERT_IMAGE_TO_BLOCK",
20
22
  'UPDATE_IMAGE_NODE_URL' = "UPDATE_IMAGE_NODE_URL",
@@ -0,0 +1,11 @@
1
+ import { RTEListItemBlock } from '../blocks/list-item-block';
2
+ import { ModifyContentAction, ModifyContentActionType } from './modify-content-action.abstract';
3
+ /**
4
+ * Action to nest the selected list items under the previous sibling.
5
+ */
6
+ export declare class NestListItemsAction extends ModifyContentAction {
7
+ readonly type: ModifyContentActionType;
8
+ isFlushable: boolean;
9
+ selectedBlocks: RTEListItemBlock[];
10
+ constructor(selectedBlocks: RTEListItemBlock[]);
11
+ }
@@ -0,0 +1,11 @@
1
+ import { RTEListItemBlock } from '../blocks/list-item-block';
2
+ import { ModifyContentAction, ModifyContentActionType } from './modify-content-action.abstract';
3
+ /**
4
+ * Action to promote the selected nested list items one level up.
5
+ */
6
+ export declare class UnnestListItemsAction extends ModifyContentAction {
7
+ readonly type: ModifyContentActionType;
8
+ isFlushable: boolean;
9
+ selectedBlocks: RTEListItemBlock[];
10
+ constructor(selectedBlocks: RTEListItemBlock[]);
11
+ }
@@ -12,6 +12,14 @@ export declare class ListAnnotation extends BlockAnnotation {
12
12
  * @returns {AnnotationStyle} The default styles.
13
13
  */
14
14
  static getDefaultStyles(): AnnotationStyle;
15
+ /**
16
+ * Get the default standalone styles for a list block's item marker
17
+ * (`li::marker`). Capping the marker font-size keeps bullets/numbers
18
+ * at a normal size when list items are styled as title/subtitle.
19
+ *
20
+ * @returns {AnnotationStyle} The default marker styles.
21
+ */
22
+ static getDefaultMarkerStyles(): AnnotationStyle;
15
23
  /**
16
24
  * @inheritDoc
17
25
  */
@@ -7,7 +7,12 @@ import { Nullable } from '../../../../types/general';
7
7
  import { RTEHtmlBlock } from './html-block';
8
8
  export declare type RTEListBlockTagType = 'ol' | 'ul';
9
9
  /**
10
- * List block
10
+ * List block.
11
+ *
12
+ * Bidirectional nesting contract:
13
+ * - Every child list item must have item.parent === this list block.
14
+ * - If this list block is nested, its parent must be a list item and that
15
+ * list item keeps this block in listItem.nestList.
11
16
  */
12
17
  export declare class RTEListBlock extends RTEBlock<VegaRTEContent | RTEListItemBlock | RTEHtmlBlock, RTEListItemBlock> {
13
18
  static readonly dtoName: string;
@@ -3,7 +3,11 @@ import { RTETextNode } from '../nodes/text-node';
3
3
  import { RTEListBlock } from './list-block';
4
4
  import { RTETextBlock } from './text-block';
5
5
  /**
6
- * List item block
6
+ * List item block.
7
+ *
8
+ * Bidirectional nesting contract:
9
+ * - nestList stores nested list blocks owned by this list item.
10
+ * - Every nested list block must have listBlock.parent === this list item.
7
11
  */
8
12
  export declare class RTEListItemBlock extends RTETextBlock {
9
13
  static readonly dtoName: string;
@@ -86,10 +86,10 @@ export declare class VegaRTEContent {
86
86
  /**
87
87
  * Convert text to list.
88
88
  *
89
- * @param {RTETextBlock} block - block
89
+ * @param {RTETextBlock | RTEListItemBlock} block - Block to convert or rebuild.
90
90
  * @returns {RTEListItemBlock} list item block dto.
91
91
  */
92
- toListItem(block: RTETextBlock): RTEListItemBlock;
92
+ toListItem(block: RTETextBlock | RTEListItemBlock): RTEListItemBlock;
93
93
  /**
94
94
  * create list.
95
95
  *
@@ -3,6 +3,8 @@ import { RTEListBlock } from '../../blocks/list-block';
3
3
  import { RTERenderContext } from '../../../interface';
4
4
  declare class RTEListBlockRenderer extends RTEBlockRenderer {
5
5
  render(block: RTEListBlock, renderContext: RTERenderContext): HTMLElement;
6
+ private resolveListMarker;
7
+ private getListDepth;
6
8
  }
7
9
  declare const _default: RTEListBlockRenderer;
8
10
  export default _default;
@@ -3,6 +3,14 @@ import { RTERenderContext } from '../../../interface';
3
3
  import { RTEBlockTextNodesRenderer } from './block-text-nodes-renderer.abstract';
4
4
  declare class RTEListItemBlockRenderer extends RTEBlockTextNodesRenderer {
5
5
  render(block: RTEListItemBlock, renderContext: RTERenderContext): HTMLElement;
6
+ /**
7
+ * Include structural ownership and direct nested-list identity in the key so
8
+ * list mutations recreate the li when its rendered child shape changes.
9
+ *
10
+ * @param {RTEListItemBlock} block - List item being rendered.
11
+ * @returns {string} Structure-aware render key.
12
+ */
13
+ private getRenderKey;
6
14
  private renderChildren;
7
15
  }
8
16
  declare const _default: RTEListItemBlockRenderer;
@@ -5,6 +5,13 @@ import { VegaRTETableBorderType } from '../annotations/table-annotation';
5
5
  * Base class for table annotation handlers with common extraction methods.
6
6
  */
7
7
  export declare abstract class TableAnnotationHandlerBase extends AnnotationGeneratorStrategyAbstract {
8
+ /**
9
+ * CSS border-width keywords. These are produced as serialization artifacts when a
10
+ * shorthand border without an explicit width is round-tripped (e.g. `border: none`
11
+ * expands to `border-width: medium`). They are not valid numeric dimensions for the
12
+ * table/cell properties "Weight" field, so they are normalized away on import.
13
+ */
14
+ private static readonly BORDER_WIDTH_KEYWORDS;
8
15
  /**
9
16
  * Extract background color from element.
10
17
  *
@@ -19,6 +26,17 @@ export declare abstract class TableAnnotationHandlerBase extends AnnotationGener
19
26
  * @returns {Nullable<VegaRTETableBorderType>} Border properties.
20
27
  */
21
28
  protected getBorder(element: HTMLElement): Nullable<VegaRTETableBorderType>;
29
+ /**
30
+ * Normalize a border width read from the DOM, dropping the `initial` value and the
31
+ * CSS keyword widths (`thin`/`medium`/`thick`). Those only appear as serialization
32
+ * artifacts of shorthand borders (e.g. `border: none` → `border-width: medium`) and
33
+ * are not valid numeric dimensions, so leaving them in would populate the properties
34
+ * "Weight" field with an invalid value and block the whole form from saving.
35
+ *
36
+ * @param {string} borderWidth - The raw border width read from the element style.
37
+ * @returns {string} The normalized border width (empty string when it is a keyword).
38
+ */
39
+ protected normalizeBorderWidth(borderWidth: string): string;
22
40
  /**
23
41
  * Extract width from element.
24
42
  *
@@ -1,13 +1,21 @@
1
1
  import { ToolbarInternalButtonConfig } from '../toolbar-button-slimmer.abstract';
2
2
  import { VegaRichTextEditor } from '../../../../vega-rich-text-editor';
3
+ import { ListKeyboardSlimmer } from './list-keyboard-slimmer';
3
4
  import { BulletsToolbarButtonSlimmer } from './bullets-toolbar-button-slimmer';
4
5
  import { NumbersToolbarButtonSlimmer } from './numbers-toolbar-button-slimmer';
5
6
  import { VisualModeToolbarButtonSlimmer } from '../visual-mode-toolbar-button-slimmer.abstract';
6
7
  export declare class BulletsNumbersToolbarButtonSlimmer extends VisualModeToolbarButtonSlimmer {
7
8
  protected readonly selectionController: VegaRichTextEditor['selectionController'];
9
+ protected readonly valueController: VegaRichTextEditor['valueController'];
10
+ protected readonly value: VegaRichTextEditor['value'];
11
+ protected readonly toolbarItems: VegaRichTextEditor['toolbarItems'];
12
+ protected readonly vegaRichTextEditorRenderer: VegaRichTextEditor['vegaRichTextEditorRenderer'];
8
13
  protected readonly bulletsToolbarButtonSlimmer: BulletsToolbarButtonSlimmer;
9
14
  protected readonly numbersToolbarButtonSlimmer: NumbersToolbarButtonSlimmer;
15
+ protected readonly listKeyboardSlimmer: ListKeyboardSlimmer;
10
16
  protected popoverRef: HTMLVegaPopoverElement;
17
+ disconnectedCallback(): void;
18
+ componentDidLoad(): void;
11
19
  componentWillRender(): void;
12
20
  constructor();
13
21
  protected renderBtnWrapper(renderBtn: (toolbarInternalButton: ToolbarInternalButtonConfig) => HTMLElement): HTMLElement;
@@ -0,0 +1,99 @@
1
+ import { Nullable } from '../../../../../../../types/general';
2
+ import { RTEBlock } from '../../../../../dto/blocks/block.abstract';
3
+ import { RTEListItemBlock } from '../../../../../dto/blocks/list-item-block';
4
+ import { RTETextNode } from '../../../../../dto/nodes/text-node';
5
+ /**
6
+ * Abstract base for list keyboard (Tab / Shift+Tab) handlers.
7
+ * Provides shared selection-normalization utilities used by both the indent
8
+ * and outdent concrete handlers.
9
+ */
10
+ export declare abstract class AbstractListKeyboardHandler {
11
+ /**
12
+ * Filter the ordered selection down to only the "root" items —
13
+ * items whose ancestor is not also present in the selection.
14
+ *
15
+ * @param {RTEListItemBlock[]} selection - Ordered selected list items.
16
+ * @returns {RTEListItemBlock[]} Root items that do not have selected ancestors.
17
+ */
18
+ protected getOutdentRoots(selection: RTEListItemBlock[]): RTEListItemBlock[];
19
+ /**
20
+ * Check whether a list item has an ancestor that is also selected.
21
+ *
22
+ * @param {RTEListItemBlock} item - Item to inspect.
23
+ * @param {Set<RTEListItemBlock>} selectedItems - Selected items lookup set.
24
+ * @returns {boolean} True when an ancestor item is selected.
25
+ */
26
+ protected hasSelectedAncestor(item: RTEListItemBlock, selectedItems: Set<RTEListItemBlock>): boolean;
27
+ /**
28
+ * Split an ordered flat list of items into groups that share the same
29
+ * parent list and are contiguous siblings.
30
+ *
31
+ * @param {RTEListItemBlock[]} selection - Ordered list-item selection.
32
+ * @returns {RTEListItemBlock[][]} Contiguous parent-based segments.
33
+ */
34
+ protected splitSelectionIntoParentSegments(selection: RTEListItemBlock[]): RTEListItemBlock[][];
35
+ /**
36
+ * Normalize the selection and split into parent-based contiguous segments.
37
+ * Returns null when the result is empty.
38
+ *
39
+ * @param {RTEBlock[]} selectedBlocks - Raw selected blocks.
40
+ * @returns {RTEListItemBlock[][] | null} Contiguous segments or null when invalid.
41
+ */
42
+ protected normalizeToSegments(selectedBlocks: RTEBlock[]): RTEListItemBlock[][] | null;
43
+ /**
44
+ * Return the first and last RTETextNode spanning the provided blocks,
45
+ * or null when either boundary cannot be resolved.
46
+ *
47
+ * @param {RTEBlock[]} blocks - Blocks defining the range boundary.
48
+ * @returns {Nullable<[RTETextNode, RTETextNode]>} First and last boundary nodes.
49
+ */
50
+ protected getSelectionBoundary(blocks: RTEBlock[]): Nullable<[RTETextNode, RTETextNode]>;
51
+ /**
52
+ * Normalize the raw selectedBlocks into an ordered list of RTEListItemBlocks,
53
+ * truncating at the first non-list block. Returns null when no list items
54
+ * are present.
55
+ *
56
+ * @param {RTEBlock[]} selectedBlocks - Raw selected blocks.
57
+ * @returns {RTEListItemBlock[] | null} Ordered list items or null.
58
+ */
59
+ protected getOrderedListItems(selectedBlocks: RTEBlock[]): RTEListItemBlock[] | null;
60
+ /**
61
+ * Collect contiguous selected list items until a non-list block is found.
62
+ *
63
+ * @param {RTEBlock[]} selectedBlocks - Raw selected blocks.
64
+ * @returns {RTEListItemBlock[]} Selected list items up to first non-list block.
65
+ */
66
+ protected getSelectedListItemsUntilFirstNonList(selectedBlocks: RTEBlock[]): RTEListItemBlock[];
67
+ /**
68
+ * Build a hierarchical index path for a list item in the list tree.
69
+ *
70
+ * @param {RTEListItemBlock} item - Item whose tree path is being resolved.
71
+ * @returns {number[]} Tree index path from root to the item.
72
+ */
73
+ protected getTreePath(item: RTEListItemBlock): number[];
74
+ /**
75
+ * Compare two list-item tree paths.
76
+ *
77
+ * @param {number[]} a - First tree path.
78
+ * @param {number[]} b - Second tree path.
79
+ * @returns {number} Negative when a < b, positive when a > b, otherwise 0.
80
+ */
81
+ protected compareTreePath(a: number[], b: number[]): number;
82
+ /**
83
+ * Check whether a value exposes a children array.
84
+ *
85
+ * @param {unknown} entity - Candidate value.
86
+ * @returns {boolean} True when entity has children array.
87
+ */
88
+ protected hasChildren(entity: unknown): entity is {
89
+ children: unknown[];
90
+ };
91
+ /**
92
+ * Execute the keyboard action for the given selection and return the
93
+ * resulting selection boundaries, or null when no action was taken.
94
+ *
95
+ * @param {RTEBlock[]} selectedBlocks - Currently selected blocks.
96
+ * @returns {Array<Nullable<[RTETextNode, RTETextNode]>> | null} Selection boundaries after action.
97
+ */
98
+ abstract execute(selectedBlocks: RTEBlock[]): Array<Nullable<[RTETextNode, RTETextNode]>> | null;
99
+ }
@@ -0,0 +1,15 @@
1
+ import { Nullable } from '../../../../../../../types/general';
2
+ import { RTEBlock } from '../../../../../dto/blocks/block.abstract';
3
+ import { RTETextNode } from '../../../../../dto/nodes/text-node';
4
+ import { AbstractListKeyboardHandler } from './abstract-list-keyboard-handler';
5
+ /**
6
+ * Handles Shift+Tab key list outdent.
7
+ * Normalizes the selection, then promotes each segment, either moving nested
8
+ * items or promoting top-level items to paragraphs.
9
+ */
10
+ export declare class ListShiftTabOutdentHandler extends AbstractListKeyboardHandler {
11
+ /**
12
+ * @inheritDoc
13
+ */
14
+ execute(selectedBlocks: RTEBlock[]): Array<Nullable<[RTETextNode, RTETextNode]>> | null;
15
+ }