@heartlandone/vega 2.102.0 → 2.103.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 (387) hide show
  1. package/dist/cjs/{app-globals-49c2a999.js → app-globals-85986306.js} +10 -10
  2. package/dist/cjs/{code-block-06e6591f.js → code-block-72de6c4d.js} +80 -1
  3. package/dist/cjs/{component-value-history-controller-slimmer.abstract-f29908f8.js → component-value-history-controller-slimmer.abstract-23d2b3d8.js} +3 -3
  4. package/dist/cjs/{content-state-8c862e5e.js → content-state-ff40bdc6.js} +38 -5
  5. package/dist/cjs/{date-required-rule-b672c432.js → date-required-rule-608e704b.js} +1 -1
  6. package/dist/cjs/{design-token-351ffd2c.js → design-token-a101a8d0.js} +3 -3
  7. package/dist/cjs/{element-appender-slimmer-f932b166.js → element-appender-slimmer-b93cc564.js} +2 -2
  8. package/dist/cjs/{form-field-controller-slimmer-5adb86ae.js → form-field-controller-slimmer-124d54ea.js} +1 -1
  9. package/dist/cjs/{image-annotation-action-25907d6b.js → image-annotation-action-1ee41bc7.js} +2 -2
  10. package/dist/cjs/{image-extension-1cf84f27.js → image-extension-6a92c524.js} +247 -5
  11. package/dist/cjs/index.cjs.js +17 -17
  12. package/dist/cjs/{inject-keyboard-manager-84d33920.js → inject-keyboard-manager-32d7dd0e.js} +1 -1
  13. package/dist/cjs/{internal-calendar-period-factory-3c5236be.js → internal-calendar-period-factory-c3198ea7.js} +1 -1
  14. package/dist/cjs/{internal-translation-controller-eae8a8de.js → internal-translation-controller-0d67ca4d.js} +1 -0
  15. package/dist/cjs/{keyboard-manager-baa83a61.js → keyboard-manager-332eec89.js} +1 -1
  16. package/dist/cjs/{keyboard-manager-slimmer-d1974b28.js → keyboard-manager-slimmer-a2872981.js} +1 -1
  17. package/dist/cjs/{link-extension-2a6133b7.js → link-extension-1b4ed437.js} +3 -3
  18. package/dist/cjs/loader.cjs.js +12 -12
  19. package/dist/cjs/{month-view-generator-a6827548.js → month-view-generator-b6a2b8be.js} +1 -1
  20. package/dist/cjs/{public-rules-7f26e0ae.js → public-rules-2066613c.js} +7 -7
  21. package/dist/cjs/{range-518b95a2.js → range-712fe703.js} +1 -1
  22. package/dist/cjs/{responsive-format-facade-95c54444.js → responsive-format-facade-44d33457.js} +1 -1
  23. package/dist/cjs/{rich-text-editor-required-rule-5d0c76ec.js → rich-text-editor-required-rule-1aa75d22.js} +1 -1
  24. package/dist/cjs/{split-cell-operation-28f6f8d9.js → split-cell-operation-afc82323.js} +3 -3
  25. package/dist/cjs/{state-border-formatter-6c284859.js → state-border-formatter-49984fd6.js} +1 -1
  26. package/dist/cjs/{string-format-strategy.abstract-f15b6196.js → string-format-strategy.abstract-bd563c01.js} +1 -1
  27. package/dist/cjs/{string-input-formatter-slimmer-5a3f1b55.js → string-input-formatter-slimmer-4faebac9.js} +1 -1
  28. package/dist/cjs/{string-mask-strategy-af6f3ba0.js → string-mask-strategy-624c4398.js} +2 -2
  29. package/dist/cjs/{style-formatter-324211fd.js → style-formatter-151d89a3.js} +2 -2
  30. package/dist/cjs/{time-required-rule-9e714442.js → time-required-rule-8cd8f9b9.js} +1 -1
  31. package/dist/cjs/{token-extension-86723cad.js → token-extension-72d0cb08.js} +1011 -767
  32. package/dist/cjs/{translation-slimmer-0227ee24.js → translation-slimmer-1771d01f.js} +1 -1
  33. package/dist/cjs/{type-guard-29e01bd4.js → type-guard-cce6fe1f.js} +1 -1
  34. package/dist/cjs/{valid-credit-card-number-rule-4ec364af.js → valid-credit-card-number-rule-b13c2fc4.js} +1 -1
  35. package/dist/cjs/vega-accordion.cjs.entry.js +6 -6
  36. package/dist/cjs/vega-app-header-button.cjs.entry.js +5 -5
  37. package/dist/cjs/vega-box.cjs.entry.js +6 -6
  38. package/dist/cjs/vega-button-circle.cjs.entry.js +5 -5
  39. package/dist/cjs/vega-button.cjs.entry.js +3 -3
  40. package/dist/cjs/vega-calendar_5.cjs.entry.js +7 -7
  41. package/dist/cjs/vega-card.cjs.entry.js +5 -5
  42. package/dist/cjs/vega-carousel.cjs.entry.js +3 -3
  43. package/dist/cjs/vega-checkbox_2.cjs.entry.js +2 -2
  44. package/dist/cjs/vega-chip.cjs.entry.js +5 -5
  45. package/dist/cjs/vega-code-block.cjs.entry.js +8 -8
  46. package/dist/cjs/vega-color-picker.cjs.entry.js +2 -2
  47. package/dist/cjs/vega-color-swatch-picker.cjs.entry.js +3 -3
  48. package/dist/cjs/vega-color-swatch.cjs.entry.js +2 -2
  49. package/dist/cjs/vega-combo-box.cjs.entry.js +8 -8
  50. package/dist/cjs/vega-date-picker_2.cjs.entry.js +13 -13
  51. package/dist/cjs/vega-dialog_2.cjs.entry.js +3 -3
  52. package/dist/cjs/vega-divider.cjs.entry.js +5 -5
  53. package/dist/cjs/vega-dropdown_5.cjs.entry.js +7 -7
  54. package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
  55. package/dist/cjs/vega-field-label.cjs.entry.js +2 -2
  56. package/dist/cjs/vega-file-uploader.cjs.entry.js +3 -3
  57. package/dist/cjs/vega-flag-icon.cjs.entry.js +5 -5
  58. package/dist/cjs/vega-flex.cjs.entry.js +6 -6
  59. package/dist/cjs/vega-font.cjs.entry.js +5 -5
  60. package/dist/cjs/vega-form.cjs.entry.js +2 -2
  61. package/dist/cjs/vega-grid.cjs.entry.js +5 -5
  62. package/dist/cjs/vega-icon.cjs.entry.js +5 -5
  63. package/dist/cjs/vega-image-uploader.cjs.entry.js +5 -5
  64. package/dist/cjs/vega-input-credit-card.cjs.entry.js +6 -6
  65. package/dist/cjs/vega-input-numeric.cjs.entry.js +12 -14
  66. package/dist/cjs/vega-input-passcode.cjs.entry.js +5 -5
  67. package/dist/cjs/vega-input-phone-number.cjs.entry.js +4 -4
  68. package/dist/cjs/vega-input-range.cjs.entry.js +3 -3
  69. package/dist/cjs/vega-input-select.cjs.entry.js +5 -5
  70. package/dist/cjs/vega-input.cjs.entry.js +31 -27
  71. package/dist/cjs/vega-left-nav_5.cjs.entry.js +7 -7
  72. package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +3 -3
  73. package/dist/cjs/vega-pagination-page-size-selector-mobile.cjs.entry.js +2 -2
  74. package/dist/cjs/vega-pagination.cjs.entry.js +4 -4
  75. package/dist/cjs/vega-popover_2.cjs.entry.js +8 -8
  76. package/dist/cjs/vega-progress-tracker_2.cjs.entry.js +3 -3
  77. package/dist/cjs/vega-radio_2.cjs.entry.js +5 -5
  78. package/dist/cjs/vega-rich-text-bookmark-editor.cjs.entry.js +2 -2
  79. package/dist/cjs/vega-rich-text-content.cjs.entry.js +6 -6
  80. package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +474 -207
  81. package/dist/cjs/vega-rich-text-find-replace-panel.cjs.entry.js +1 -1
  82. package/dist/cjs/vega-rich-text-special-characters-panel.cjs.entry.js +5 -5
  83. package/dist/cjs/vega-rich-text-table-properties_3.cjs.entry.js +8 -8
  84. package/dist/cjs/vega-selection-chip_2.cjs.entry.js +4 -4
  85. package/dist/cjs/vega-selection-tile_2.cjs.entry.js +2 -2
  86. package/dist/cjs/vega-sidenav_3.cjs.entry.js +3 -3
  87. package/dist/cjs/vega-signature-capture.cjs.entry.js +7 -7
  88. package/dist/cjs/vega-stepper.cjs.entry.js +2 -2
  89. package/dist/cjs/vega-tab-group_2.cjs.entry.js +6 -6
  90. package/dist/cjs/vega-table_11.cjs.entry.js +4 -4
  91. package/dist/cjs/vega-textarea.cjs.entry.js +2 -2
  92. package/dist/cjs/vega-time-picker_2.cjs.entry.js +9 -9
  93. package/dist/cjs/vega-toggle-switch.cjs.entry.js +2 -2
  94. package/dist/cjs/vega-tooltip_2.cjs.entry.js +6 -6
  95. package/dist/cjs/vega.cjs.js +12 -12
  96. package/dist/collection/components/vega-input/slimmers/controllers/vega-input-state-controller.js +0 -14
  97. package/dist/collection/components/vega-input/slimmers/renderers/vega-input-input-container-renderer.js +11 -2
  98. package/dist/collection/components/vega-input/slimmers/renderers/vega-input-input-renderer.js +11 -1
  99. package/dist/collection/components/vega-input/vega-input.js +52 -8
  100. package/dist/collection/components/vega-input-numeric/slimmers/renderers/vega-input-numeric-renderer.js +7 -1
  101. package/dist/collection/components/vega-input-numeric/vega-input-numeric.js +0 -8
  102. package/dist/collection/components/vega-rich-text-editor/constants/constant.js +4 -0
  103. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/sequential-composition-strategy.js +31 -0
  104. package/dist/collection/components/vega-rich-text-editor/dto/actions/modify-content-action.abstract.js +1 -0
  105. package/dist/collection/components/vega-rich-text-editor/dto/actions/sequential-composition-action.js +14 -0
  106. package/dist/collection/components/vega-rich-text-editor/dto/content-state.js +4 -1
  107. package/dist/collection/components/vega-rich-text-editor/dto/flush-changes-payload.js +1 -0
  108. package/dist/collection/components/vega-rich-text-editor/dto/nodes/image-node.js +3 -2
  109. package/dist/collection/components/vega-rich-text-editor/extensions/functions/dto/function-block.js +30 -0
  110. package/dist/collection/components/vega-rich-text-editor/extensions/functions/element-to-dto-strategies/div-to-function-block-strategy.js +1 -0
  111. package/dist/collection/components/vega-rich-text-editor/extensions/paste/controllers/chooser-positioner.js +107 -0
  112. package/dist/collection/components/vega-rich-text-editor/extensions/paste/controllers/paste-chooser-controller.js +91 -0
  113. package/dist/collection/components/vega-rich-text-editor/extensions/paste/controllers/paste-event-interceptor.js +47 -0
  114. package/dist/collection/components/vega-rich-text-editor/extensions/paste/controllers/selection-snapshot-service.js +54 -0
  115. package/dist/collection/components/vega-rich-text-editor/extensions/paste/parse-local-images-helper/image-extractor.js +17 -0
  116. package/dist/collection/components/vega-rich-text-editor/extensions/paste/paste-chooser-ui.js +3 -1
  117. package/dist/collection/components/vega-rich-text-editor/extensions/paste/paste-extension.js +41 -354
  118. package/dist/collection/components/vega-rich-text-editor/extensions/paste/pipeline/data-transfer-builder.js +36 -0
  119. package/dist/collection/components/vega-rich-text-editor/extensions/paste/pipeline/paste-dispatcher.js +23 -0
  120. package/dist/collection/components/vega-rich-text-editor/extensions/paste/pipeline/paste-processing-pipeline.js +30 -0
  121. package/dist/collection/components/vega-rich-text-editor/extensions/paste/strategies/paste-processing-strategy.abstract.js +34 -0
  122. package/dist/collection/components/vega-rich-text-editor/extensions/paste/strategies/paste-strategy-selector.js +19 -0
  123. package/dist/collection/components/vega-rich-text-editor/extensions/paste/strategies/plain-paste-strategy.js +74 -0
  124. package/dist/collection/components/vega-rich-text-editor/extensions/paste/type.js +1 -0
  125. package/dist/collection/components/vega-rich-text-editor/helpers/utils.js +67 -0
  126. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/abstract-delete-content-handler.js +67 -11
  127. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/backward-delete-content-handler.js +4 -17
  128. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/base-handler.js +34 -1
  129. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/forward-delete-content-handler.js +13 -32
  130. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-line-break-handler.js +60 -25
  131. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-paragraph-handler.js +55 -19
  132. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-paste-handler.js +165 -59
  133. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-text-handler.js +55 -21
  134. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/user-input-controller.js +2 -16
  135. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/value-controller.js +11 -1
  136. package/dist/collection/components/vega-rich-text-editor/utils/html-to-plain-text-utils.js +240 -0
  137. package/dist/collection/helpers/translation/locales/en.js +1 -0
  138. package/dist/esm/{app-globals-da5c83c2.js → app-globals-8cdfc5c9.js} +10 -10
  139. package/dist/esm/{code-block-d8f83d85.js → code-block-9360c331.js} +74 -2
  140. package/dist/esm/{component-value-history-controller-slimmer.abstract-642e7147.js → component-value-history-controller-slimmer.abstract-9ea58806.js} +3 -3
  141. package/dist/esm/{content-state-486eae1d.js → content-state-67a12e74.js} +38 -5
  142. package/dist/esm/{date-required-rule-08695d25.js → date-required-rule-66b5bf02.js} +1 -1
  143. package/dist/esm/{design-token-df3331d9.js → design-token-acd1efeb.js} +3 -3
  144. package/dist/esm/{element-appender-slimmer-f02a227f.js → element-appender-slimmer-7e5bc1e9.js} +2 -2
  145. package/dist/esm/{form-field-controller-slimmer-a7c0a0f8.js → form-field-controller-slimmer-d653c494.js} +1 -1
  146. package/dist/esm/{image-annotation-action-df744ba5.js → image-annotation-action-9525be48.js} +2 -2
  147. package/dist/esm/{image-extension-20b39140.js → image-extension-aea75132.js} +246 -6
  148. package/dist/esm/index.js +17 -17
  149. package/dist/esm/{inject-keyboard-manager-399ed867.js → inject-keyboard-manager-f6522d2f.js} +1 -1
  150. package/dist/esm/{internal-calendar-period-factory-7b866c3b.js → internal-calendar-period-factory-261df2f2.js} +1 -1
  151. package/dist/esm/{internal-translation-controller-4a7ee4d5.js → internal-translation-controller-3637e47e.js} +1 -0
  152. package/dist/esm/{keyboard-manager-f5d13a34.js → keyboard-manager-53e8d8d0.js} +1 -1
  153. package/dist/esm/{keyboard-manager-slimmer-f40dcb54.js → keyboard-manager-slimmer-b3de042d.js} +1 -1
  154. package/dist/esm/{link-extension-3f93d70d.js → link-extension-57ba9520.js} +3 -3
  155. package/dist/esm/loader.js +12 -12
  156. package/dist/esm/{month-view-generator-0c665987.js → month-view-generator-15215a09.js} +1 -1
  157. package/dist/esm/{public-rules-470a1dac.js → public-rules-c77a1550.js} +7 -7
  158. package/dist/esm/{range-8e89fb54.js → range-3c74e1c8.js} +1 -1
  159. package/dist/esm/{responsive-format-facade-55131a33.js → responsive-format-facade-1b325d06.js} +1 -1
  160. package/dist/esm/{rich-text-editor-required-rule-06caf383.js → rich-text-editor-required-rule-cfd32ba2.js} +1 -1
  161. package/dist/esm/{split-cell-operation-e158366a.js → split-cell-operation-85a036f9.js} +3 -3
  162. package/dist/esm/{state-border-formatter-2b73fa08.js → state-border-formatter-ce3495b0.js} +1 -1
  163. package/dist/esm/{string-format-strategy.abstract-8c7937e3.js → string-format-strategy.abstract-8ce04558.js} +1 -1
  164. package/dist/esm/{string-input-formatter-slimmer-681c6b71.js → string-input-formatter-slimmer-0d60ba7d.js} +1 -1
  165. package/dist/esm/{string-mask-strategy-b8cceee6.js → string-mask-strategy-cabc1d50.js} +2 -2
  166. package/dist/esm/{style-formatter-fcd70869.js → style-formatter-00fe4f1c.js} +2 -2
  167. package/dist/esm/{time-required-rule-ce50859b.js → time-required-rule-57ceeae9.js} +1 -1
  168. package/dist/esm/{token-extension-2401e753.js → token-extension-645a9520.js} +1011 -767
  169. package/dist/esm/{translation-slimmer-b3f3cf65.js → translation-slimmer-b69057eb.js} +1 -1
  170. package/dist/esm/{type-guard-08c82e08.js → type-guard-204094c6.js} +1 -1
  171. package/dist/esm/{valid-credit-card-number-rule-66bad519.js → valid-credit-card-number-rule-0874e19f.js} +1 -1
  172. package/dist/esm/vega-accordion.entry.js +6 -6
  173. package/dist/esm/vega-app-header-button.entry.js +5 -5
  174. package/dist/esm/vega-box.entry.js +6 -6
  175. package/dist/esm/vega-button-circle.entry.js +5 -5
  176. package/dist/esm/vega-button.entry.js +3 -3
  177. package/dist/esm/vega-calendar_5.entry.js +7 -7
  178. package/dist/esm/vega-card.entry.js +5 -5
  179. package/dist/esm/vega-carousel.entry.js +3 -3
  180. package/dist/esm/vega-checkbox_2.entry.js +2 -2
  181. package/dist/esm/vega-chip.entry.js +5 -5
  182. package/dist/esm/vega-code-block.entry.js +8 -8
  183. package/dist/esm/vega-color-picker.entry.js +2 -2
  184. package/dist/esm/vega-color-swatch-picker.entry.js +3 -3
  185. package/dist/esm/vega-color-swatch.entry.js +2 -2
  186. package/dist/esm/vega-combo-box.entry.js +8 -8
  187. package/dist/esm/vega-date-picker_2.entry.js +13 -13
  188. package/dist/esm/vega-dialog_2.entry.js +3 -3
  189. package/dist/esm/vega-divider.entry.js +5 -5
  190. package/dist/esm/vega-dropdown_5.entry.js +7 -7
  191. package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
  192. package/dist/esm/vega-field-label.entry.js +2 -2
  193. package/dist/esm/vega-file-uploader.entry.js +3 -3
  194. package/dist/esm/vega-flag-icon.entry.js +5 -5
  195. package/dist/esm/vega-flex.entry.js +6 -6
  196. package/dist/esm/vega-font.entry.js +5 -5
  197. package/dist/esm/vega-form.entry.js +2 -2
  198. package/dist/esm/vega-grid.entry.js +5 -5
  199. package/dist/esm/vega-icon.entry.js +5 -5
  200. package/dist/esm/vega-image-uploader.entry.js +5 -5
  201. package/dist/esm/vega-input-credit-card.entry.js +6 -6
  202. package/dist/esm/vega-input-numeric.entry.js +12 -14
  203. package/dist/esm/vega-input-passcode.entry.js +5 -5
  204. package/dist/esm/vega-input-phone-number.entry.js +4 -4
  205. package/dist/esm/vega-input-range.entry.js +3 -3
  206. package/dist/esm/vega-input-select.entry.js +5 -5
  207. package/dist/esm/vega-input.entry.js +31 -27
  208. package/dist/esm/vega-left-nav_5.entry.js +7 -7
  209. package/dist/esm/vega-loader-wrapper_2.entry.js +3 -3
  210. package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +2 -2
  211. package/dist/esm/vega-pagination.entry.js +4 -4
  212. package/dist/esm/vega-popover_2.entry.js +8 -8
  213. package/dist/esm/vega-progress-tracker_2.entry.js +3 -3
  214. package/dist/esm/vega-radio_2.entry.js +5 -5
  215. package/dist/esm/vega-rich-text-bookmark-editor.entry.js +2 -2
  216. package/dist/esm/vega-rich-text-content.entry.js +6 -6
  217. package/dist/esm/vega-rich-text-editor_4.entry.js +474 -207
  218. package/dist/esm/vega-rich-text-find-replace-panel.entry.js +1 -1
  219. package/dist/esm/vega-rich-text-special-characters-panel.entry.js +5 -5
  220. package/dist/esm/vega-rich-text-table-properties_3.entry.js +8 -8
  221. package/dist/esm/vega-selection-chip_2.entry.js +4 -4
  222. package/dist/esm/vega-selection-tile_2.entry.js +2 -2
  223. package/dist/esm/vega-sidenav_3.entry.js +3 -3
  224. package/dist/esm/vega-signature-capture.entry.js +7 -7
  225. package/dist/esm/vega-stepper.entry.js +2 -2
  226. package/dist/esm/vega-tab-group_2.entry.js +6 -6
  227. package/dist/esm/vega-table_11.entry.js +4 -4
  228. package/dist/esm/vega-textarea.entry.js +2 -2
  229. package/dist/esm/vega-time-picker_2.entry.js +9 -9
  230. package/dist/esm/vega-toggle-switch.entry.js +2 -2
  231. package/dist/esm/vega-tooltip_2.entry.js +6 -6
  232. package/dist/esm/vega.js +12 -12
  233. package/dist/sri/vega-sri-manifest.json +321 -321
  234. package/dist/types/components/vega-input/slimmers/controllers/vega-input-state-controller.d.ts +0 -2
  235. package/dist/types/components/vega-input/slimmers/renderers/vega-input-input-container-renderer.d.ts +4 -0
  236. package/dist/types/components/vega-input/slimmers/renderers/vega-input-input-renderer.d.ts +2 -0
  237. package/dist/types/components/vega-input/vega-input.d.ts +15 -3
  238. package/dist/types/components/vega-input-numeric/slimmers/renderers/vega-input-numeric-renderer.d.ts +2 -0
  239. package/dist/types/components/vega-input-numeric/vega-input-numeric.d.ts +0 -2
  240. package/dist/types/components/vega-rich-text-editor/constants/constant.d.ts +4 -0
  241. package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/sequential-composition-strategy.d.ts +14 -0
  242. package/dist/types/components/vega-rich-text-editor/dto/actions/modify-content-action.abstract.d.ts +4 -1
  243. package/dist/types/components/vega-rich-text-editor/dto/actions/sequential-composition-action.d.ts +30 -0
  244. package/dist/types/components/vega-rich-text-editor/dto/flush-changes-payload.d.ts +16 -0
  245. package/dist/types/components/vega-rich-text-editor/extensions/functions/dto/function-block.d.ts +7 -0
  246. package/dist/types/components/vega-rich-text-editor/extensions/paste/controllers/chooser-positioner.d.ts +33 -0
  247. package/dist/types/components/vega-rich-text-editor/extensions/paste/controllers/paste-chooser-controller.d.ts +43 -0
  248. package/dist/types/components/vega-rich-text-editor/extensions/paste/controllers/paste-event-interceptor.d.ts +22 -0
  249. package/dist/types/components/vega-rich-text-editor/extensions/paste/controllers/selection-snapshot-service.d.ts +29 -0
  250. package/dist/types/components/vega-rich-text-editor/extensions/paste/parse-local-images-helper/image-extractor.d.ts +13 -0
  251. package/dist/types/components/vega-rich-text-editor/extensions/paste/parse-local-images-helper/paste-image-parser.d.ts +1 -1
  252. package/dist/types/components/vega-rich-text-editor/extensions/paste/parse-local-images-helper/pending-image-registry.d.ts +1 -1
  253. package/dist/types/components/vega-rich-text-editor/extensions/paste/paste-chooser-ui.d.ts +1 -0
  254. package/dist/types/components/vega-rich-text-editor/extensions/paste/paste-extension.d.ts +28 -93
  255. package/dist/types/components/vega-rich-text-editor/extensions/paste/pipeline/data-transfer-builder.d.ts +10 -0
  256. package/dist/types/components/vega-rich-text-editor/extensions/paste/pipeline/paste-dispatcher.d.ts +8 -0
  257. package/dist/types/components/vega-rich-text-editor/extensions/paste/pipeline/paste-processing-pipeline.d.ts +18 -0
  258. package/dist/types/components/vega-rich-text-editor/extensions/paste/strategies/paste-processing-strategy.abstract.d.ts +28 -6
  259. package/dist/types/components/vega-rich-text-editor/extensions/paste/strategies/paste-strategy-selector.d.ts +13 -0
  260. package/dist/types/components/vega-rich-text-editor/extensions/paste/strategies/plain-paste-strategy.d.ts +29 -0
  261. package/dist/types/components/vega-rich-text-editor/extensions/paste/type.d.ts +35 -0
  262. package/dist/types/components/vega-rich-text-editor/helpers/utils.d.ts +47 -0
  263. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/abstract-delete-content-handler.d.ts +17 -6
  264. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/backward-delete-content-handler.d.ts +5 -1
  265. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/base-handler.d.ts +30 -1
  266. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/forward-delete-content-handler.d.ts +5 -1
  267. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-line-break-handler.d.ts +21 -4
  268. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-paragraph-handler.d.ts +12 -4
  269. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-paste-handler.d.ts +38 -5
  270. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-text-handler.d.ts +7 -2
  271. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/user-input-controller.d.ts +2 -0
  272. package/dist/types/components/vega-rich-text-editor/utils/html-to-plain-text-utils.d.ts +31 -0
  273. package/dist/types/components.d.ts +24 -0
  274. package/dist/types/helpers/translation/interface.d.ts +1 -0
  275. package/dist/types/types/public-api.d.ts +2 -1
  276. package/dist/vega/index.esm.js +1 -1
  277. package/dist/vega/{p-8a4cc7c2.entry.js → p-0169f71c.entry.js} +1 -1
  278. package/dist/vega/p-018bb83b.entry.js +1 -0
  279. package/dist/vega/{p-25e51acb.js → p-08bf08d2.js} +1 -1
  280. package/dist/vega/{p-85a940c0.entry.js → p-0b33753f.entry.js} +1 -1
  281. package/dist/vega/{p-a5fa260b.js → p-1537b1e4.js} +1 -1
  282. package/dist/vega/{p-7dfb1481.entry.js → p-17f6dc94.entry.js} +1 -1
  283. package/dist/vega/{p-dd673eb4.entry.js → p-1a4d1991.entry.js} +1 -1
  284. package/dist/vega/{p-557b64bd.js → p-1b2e5898.js} +1 -1
  285. package/dist/vega/{p-2256eb09.entry.js → p-1f1f93bf.entry.js} +1 -1
  286. package/dist/vega/{p-d86e0b01.js → p-1fb953f8.js} +1 -1
  287. package/dist/vega/{p-03efc67a.entry.js → p-2171b571.entry.js} +1 -1
  288. package/dist/vega/p-255fe20b.js +1 -0
  289. package/dist/vega/{p-cf5c5515.js → p-261cf764.js} +1 -1
  290. package/dist/vega/{p-f0b49ae4.entry.js → p-27e77ea1.entry.js} +1 -1
  291. package/dist/vega/{p-109f0e33.entry.js → p-28acbe42.entry.js} +1 -1
  292. package/dist/vega/{p-27c9c2a5.entry.js → p-2acc600a.entry.js} +1 -1
  293. package/dist/vega/p-2fc2299f.js +1 -0
  294. package/dist/vega/{p-b48caf90.entry.js → p-2ff659a1.entry.js} +1 -1
  295. package/dist/vega/{p-527c3211.entry.js → p-322da1eb.entry.js} +1 -1
  296. package/dist/vega/{p-dffe47db.js → p-3283fa2f.js} +1 -1
  297. package/dist/vega/p-3567dc55.entry.js +1 -0
  298. package/dist/vega/{p-c6419eb3.entry.js → p-36b795c6.entry.js} +1 -1
  299. package/dist/vega/p-37714a3a.js +1 -0
  300. package/dist/vega/{p-d7e59f31.js → p-3b4e2ba0.js} +1 -1
  301. package/dist/vega/{p-3d060d2f.entry.js → p-3b911043.entry.js} +1 -1
  302. package/dist/vega/{p-5c6d36ef.entry.js → p-3e270b65.entry.js} +1 -1
  303. package/dist/vega/{p-b68f55e2.js → p-4043508a.js} +1 -1
  304. package/dist/vega/p-4151d4a8.js +1 -0
  305. package/dist/vega/{p-c6b6987e.js → p-45af801f.js} +1 -1
  306. package/dist/vega/p-48c2150b.entry.js +1 -0
  307. package/dist/vega/p-4b253f74.entry.js +1 -0
  308. package/dist/vega/{p-75c7f8ea.entry.js → p-4cdc064d.entry.js} +1 -1
  309. package/dist/vega/{p-1d8a8507.entry.js → p-4e4b50f3.entry.js} +1 -1
  310. package/dist/vega/{p-d8fa2f19.entry.js → p-564110ba.entry.js} +1 -1
  311. package/dist/vega/p-5f377954.js +1 -1
  312. package/dist/vega/{p-bec31ffc.entry.js → p-608d3559.entry.js} +1 -1
  313. package/dist/vega/{p-3ce7521e.entry.js → p-64eb05d3.entry.js} +1 -1
  314. package/dist/vega/{p-2f5c4b61.entry.js → p-66bf209b.entry.js} +1 -1
  315. package/dist/vega/{p-83f5ef3a.entry.js → p-69eadbd8.entry.js} +1 -1
  316. package/dist/vega/{p-c66c6fd2.entry.js → p-6c4edee8.entry.js} +1 -1
  317. package/dist/vega/p-6e16bb3a.js +1 -0
  318. package/dist/vega/{p-7d748545.entry.js → p-76f4fdba.entry.js} +1 -1
  319. package/dist/vega/{p-4c6989ae.entry.js → p-7874055b.entry.js} +1 -1
  320. package/dist/vega/{p-ca60a74b.entry.js → p-7d3d24f6.entry.js} +1 -1
  321. package/dist/vega/{p-3bfb53e3.js → p-7f9ad7bc.js} +1 -1
  322. package/dist/vega/{p-18ddc6a4.entry.js → p-8193f4ef.entry.js} +1 -1
  323. package/dist/vega/{p-816064f2.entry.js → p-8197d172.entry.js} +1 -1
  324. package/dist/vega/{p-634b138c.entry.js → p-8ac0b1b2.entry.js} +1 -1
  325. package/dist/vega/{p-553510d8.entry.js → p-8c61db9d.entry.js} +1 -1
  326. package/dist/vega/{p-061a76c3.entry.js → p-8de29082.entry.js} +1 -1
  327. package/dist/vega/{p-325b804d.entry.js → p-8e59606f.entry.js} +1 -1
  328. package/dist/vega/p-8ea41806.js +1 -0
  329. package/dist/vega/{p-ff9090af.entry.js → p-9153c2f5.entry.js} +1 -1
  330. package/dist/vega/{p-a0c87e88.entry.js → p-92411f56.entry.js} +1 -1
  331. package/dist/vega/{p-049e64b1.entry.js → p-94d65dcf.entry.js} +1 -1
  332. package/dist/vega/{p-a261a675.entry.js → p-9a96fb05.entry.js} +1 -1
  333. package/dist/vega/{p-7044bb48.js → p-9fcfd738.js} +1 -1
  334. package/dist/vega/{p-b1e1c7d0.js → p-a2c7a3bc.js} +1 -1
  335. package/dist/vega/p-a2dcde12.js +1 -0
  336. package/dist/vega/{p-be0eb72f.js → p-a60d75d9.js} +1 -1
  337. package/dist/vega/{p-5a347a15.js → p-a9fc4043.js} +1 -1
  338. package/dist/vega/{p-efef0dfe.entry.js → p-abe5f7f0.entry.js} +1 -1
  339. package/dist/vega/{p-197388a5.entry.js → p-ac98c189.entry.js} +1 -1
  340. package/dist/vega/{p-dd273d89.entry.js → p-ade903b3.entry.js} +1 -1
  341. package/dist/vega/{p-c0eb8c58.js → p-affb40e8.js} +1 -1
  342. package/dist/vega/{p-277aab9b.js → p-b3a1cd22.js} +1 -1
  343. package/dist/vega/p-b63a90b3.entry.js +1 -0
  344. package/dist/vega/{p-f9f96030.entry.js → p-ba050d63.entry.js} +1 -1
  345. package/dist/vega/{p-bf0b46c1.js → p-ba67eb96.js} +1 -1
  346. package/dist/vega/{p-f0c6e9c5.entry.js → p-c08ac33f.entry.js} +1 -1
  347. package/dist/vega/{p-46be74fc.entry.js → p-c7ec97d1.entry.js} +1 -1
  348. package/dist/vega/{p-effbfc50.entry.js → p-ca1fe571.entry.js} +1 -1
  349. package/dist/vega/{p-408c3ad4.entry.js → p-cc9fc36a.entry.js} +1 -1
  350. package/dist/vega/{p-741e064e.entry.js → p-d044d54f.entry.js} +1 -1
  351. package/dist/vega/{p-0e0e66c9.entry.js → p-d3a9355c.entry.js} +1 -1
  352. package/dist/vega/p-d5a75228.js +1 -0
  353. package/dist/vega/{p-76135e80.entry.js → p-dc83fa6b.entry.js} +1 -1
  354. package/dist/vega/{p-92efdbf0.entry.js → p-dcfce26e.entry.js} +1 -1
  355. package/dist/vega/p-df9585f6.js +3 -0
  356. package/dist/vega/{p-f5f26b44.entry.js → p-e2c8a470.entry.js} +1 -1
  357. package/dist/vega/{p-23781e76.js → p-e33a954f.js} +1 -1
  358. package/dist/vega/{p-e577dda8.entry.js → p-e5fc6583.entry.js} +1 -1
  359. package/dist/vega/p-e668cf11.js +1 -0
  360. package/dist/vega/{p-0338f621.entry.js → p-e6b0a292.entry.js} +1 -1
  361. package/dist/vega/{p-381d8781.js → p-e84c2589.js} +1 -1
  362. package/dist/vega/{p-1b97e751.entry.js → p-eb945d34.entry.js} +1 -1
  363. package/dist/vega/{p-d8a0e3e0.entry.js → p-ebe1dd2b.entry.js} +1 -1
  364. package/dist/vega/{p-6beaf1c8.entry.js → p-f818bb20.entry.js} +1 -1
  365. package/dist/vega/p-f981cf2c.js +1 -0
  366. package/dist/vega/p-f9d09b0c.js +1 -0
  367. package/dist/vega/{p-4d20a56f.js → p-fdbdf12f.js} +1 -1
  368. package/dist/vega/{p-48100d38.entry.js → p-fee080b9.entry.js} +1 -1
  369. package/dist/vega/vega.esm.js +1 -1
  370. package/package.json +1 -1
  371. package/dist/vega/p-040bd9ca.js +0 -1
  372. package/dist/vega/p-087240db.js +0 -1
  373. package/dist/vega/p-15052b2e.entry.js +0 -1
  374. package/dist/vega/p-28c16885.js +0 -1
  375. package/dist/vega/p-30cc31dd.entry.js +0 -1
  376. package/dist/vega/p-3ec4d710.js +0 -1
  377. package/dist/vega/p-43ea1e86.js +0 -1
  378. package/dist/vega/p-7228088b.entry.js +0 -1
  379. package/dist/vega/p-7f711049.js +0 -1
  380. package/dist/vega/p-7fd15dd1.js +0 -1
  381. package/dist/vega/p-85695819.js +0 -1
  382. package/dist/vega/p-8e1f30ec.entry.js +0 -1
  383. package/dist/vega/p-9680dfe6.js +0 -1
  384. package/dist/vega/p-ae12cc3f.js +0 -3
  385. package/dist/vega/p-c0823f32.js +0 -1
  386. package/dist/vega/p-c5af2ecc.entry.js +0 -1
  387. package/dist/vega/p-fa43272c.js +0 -1
@@ -15,7 +15,6 @@ import { InsertPasteHandler } from './helper/input-event-handler/insert-paste-ha
15
15
  import { KeyboardLinkHandler } from './helper/input-event-handler/keyboard-link-handler';
16
16
  import { generateUUID } from '../../../../utils/misc';
17
17
  import { RTECodeBlock } from '../../dto/blocks/code-block';
18
- import { RTE_UPDATE_SOURCE_KEY, RTEUpdateSource } from '../../constants/constant';
19
18
  /** Used to monitoring the user input actions by event listener */
20
19
  export class UserInputController extends VegaSlimmer {
21
20
  constructor() {
@@ -37,6 +36,8 @@ export class UserInputController extends VegaSlimmer {
37
36
  };
38
37
  /**
39
38
  * When a user performs an input action within the editable element, this function is triggered.
39
+ * Each handler owns its own `flushOptions` on `BaseHandler`, so the value update flows through
40
+ * the shared flush-changes action pipeline without this method having to construct or forward it.
40
41
  *
41
42
  * @param {InputEvent} e the before input event object
42
43
  */
@@ -50,41 +51,26 @@ export class UserInputController extends VegaSlimmer {
50
51
  return;
51
52
  }
52
53
  this.insertCompositionTextController.removeObserver();
53
- let updateFlag = false;
54
- let updateSource = RTEUpdateSource.Default;
55
54
  switch (inputType) {
56
55
  case 'insertParagraph':
57
- updateFlag = true;
58
56
  this.insertParagraphHandler.execute(this.value, this.selectionController, this.host, e);
59
57
  break;
60
58
  case 'insertText':
61
- updateFlag = true;
62
- updateSource =
63
- e[RTE_UPDATE_SOURCE_KEY] === RTEUpdateSource.Composition
64
- ? RTEUpdateSource.Composition
65
- : RTEUpdateSource.Default;
66
59
  this.insertTextHandler.execute(this.value, this.selectionController, this.host, e);
67
60
  break;
68
61
  case 'insertLineBreak':
69
- updateFlag = true;
70
62
  this.insertLineBreakHandler.execute(this.value, this.selectionController, this.host, e);
71
63
  break;
72
64
  case 'deleteContentForward':
73
- updateFlag = true;
74
65
  this.forwardDeleteContentHandler.execute(this.value, this.selectionController, this.host, e);
75
66
  break;
76
67
  case 'deleteContentBackward':
77
- updateFlag = true;
78
68
  this.backwardDeleteContentHandler.execute(this.value, this.selectionController, this.host, e);
79
69
  break;
80
70
  case 'insertFromPaste':
81
- updateFlag = true;
82
71
  this.insertPasteHandler.execute(this.value, this.selectionController, this.host, e);
83
72
  break;
84
73
  }
85
- if (updateFlag) {
86
- void this.valueController.flushChanges(this.value, true, updateSource);
87
- }
88
74
  };
89
75
  }
90
76
  /**
@@ -36,7 +36,17 @@ export class ValueController extends VegaSlimmer {
36
36
  const flushChangesWithDebounce = debounce(() => {
37
37
  void this.valueController.flushChanges(this.value);
38
38
  }, ValueController.VALUE_CHANGE_DEBOUNCE_TIME, this);
39
- this.flushChangeObserver = new Observer(this.isAcceptableFlushChange.bind(this), flushChangesWithDebounce);
39
+ this.flushChangeObserver = new Observer(this.isAcceptableFlushChange.bind(this), (payload) => {
40
+ // When a handler asks to bypass the debounce (direct user gestures like `beforeinput`),
41
+ // invoke `flushChanges` immediately with the payload as-is. Defaults live on the emitter
42
+ // side (`BaseHandler.flushOptions`) — the observer trusts the payload and does not
43
+ // re-apply fallback values, so there is a single source of truth.
44
+ if (payload && payload.bypassDebounce) {
45
+ void this.valueController.flushChanges(this.value, payload.recordHistory, payload.updateSource);
46
+ return;
47
+ }
48
+ flushChangesWithDebounce();
49
+ });
40
50
  ChangeManager.register(domNodeSubjectFactory.getSubject(this.host, VegaInternalRichTextEditorFlushChanges), this.flushChangeObserver);
41
51
  }
42
52
  /**
@@ -0,0 +1,240 @@
1
+ import { normalizePlainTextLines, PRESERVED_SPACE, PRESERVED_TAB } from '../helpers/utils';
2
+ /**
3
+ * Block-level HTML tags that introduce a visible line break when converting
4
+ * HTML to plain text. Hard-coded because this is HTML spec knowledge that
5
+ * cannot be derived at runtime and must be kept in sync with the spec.
6
+ *
7
+ * Trade-off: this is a blocklist, so unknown/custom elements default to inline.
8
+ * That is acceptable for this plain-text fallback (clipboard HTML rarely
9
+ * contains custom block elements); an inline allowlist would be more robust
10
+ * but is unnecessary here.
11
+ *
12
+ * @see https://developer.mozilla.org/docs/Glossary/Block-level_content
13
+ */
14
+ const BLOCK_LEVEL_TAGS = new Set([
15
+ 'address',
16
+ 'article',
17
+ 'aside',
18
+ 'blockquote',
19
+ 'dd',
20
+ 'details',
21
+ 'dialog',
22
+ 'div',
23
+ 'dl',
24
+ 'dt',
25
+ 'figure',
26
+ 'footer',
27
+ 'form',
28
+ 'h1',
29
+ 'h2',
30
+ 'h3',
31
+ 'h4',
32
+ 'h5',
33
+ 'h6',
34
+ 'header',
35
+ 'hr',
36
+ 'li',
37
+ 'main',
38
+ 'nav',
39
+ 'ol',
40
+ 'p',
41
+ 'pre',
42
+ 'section',
43
+ 'table',
44
+ 'tbody',
45
+ 'tfoot',
46
+ 'thead',
47
+ 'tr',
48
+ 'ul',
49
+ ]);
50
+ /**
51
+ * Inline `display` values that turn a nominally inline tag into a visual block-level box
52
+ * (e.g. Jira/Confluence code lines: `<span style="display: flex; white-space: pre-wrap;">`).
53
+ */
54
+ const BLOCK_LIKE_DISPLAY_VALUES = new Set([
55
+ 'block',
56
+ 'flex',
57
+ 'grid',
58
+ 'table',
59
+ 'list-item',
60
+ 'flow-root',
61
+ ]);
62
+ /**
63
+ * @param {Element} el Candidate element.
64
+ * @returns {boolean} Whether the element's inline `style="display: ..."` puts it in the block flow.
65
+ */
66
+ function hasBlockLikeInlineDisplay(el) {
67
+ const inlineStyle = el.style;
68
+ if (!inlineStyle) {
69
+ return false;
70
+ }
71
+ return BLOCK_LIKE_DISPLAY_VALUES.has(inlineStyle.display);
72
+ }
73
+ // `pre-line` intentionally excluded: it keeps `\n` but collapses spaces/tabs.
74
+ const WHITESPACE_PRESERVING_VALUES = new Set(['pre', 'pre-wrap', 'break-spaces']);
75
+ /**
76
+ * @param {Element} el Candidate element.
77
+ * @returns {boolean} Whether the element's inline `style="white-space: ..."` preserves source whitespace.
78
+ */
79
+ function preservesWhitespaceInlineStyle(el) {
80
+ const inlineStyle = el.style;
81
+ if (!inlineStyle) {
82
+ return false;
83
+ }
84
+ return WHITESPACE_PRESERVING_VALUES.has(inlineStyle.whiteSpace);
85
+ }
86
+ /**
87
+ * Resolves the preformatted text of a code-block element, or `null` when the element is not a
88
+ * code block. A Vega code block serializes to `<vega-code-block data-content data-language>` whose
89
+ * `data-content` attribute is the authoritative source (its shadow-DOM `<code>` may be empty in some
90
+ * browsers); external editors emit `<pre>`/`<code data-language>` whose `textContent` carries the
91
+ * code. Both keep their newlines/indentation so plain paste renders one paragraph per line.
92
+ *
93
+ * @param {Element} el Candidate element.
94
+ * @returns {string | null} Code text with line breaks preserved, or `null` when not a code block.
95
+ */
96
+ function resolveCodeBlockText(el) {
97
+ var _a, _b, _c;
98
+ const tagName = el.tagName.toLowerCase();
99
+ if (tagName === 'vega-code-block') {
100
+ return (_b = (_a = el.getAttribute('data-content')) !== null && _a !== void 0 ? _a : el.textContent) !== null && _b !== void 0 ? _b : '';
101
+ }
102
+ if ((tagName === 'pre' || tagName === 'code') && el.hasAttribute('data-language')) {
103
+ return (_c = el.textContent) !== null && _c !== void 0 ? _c : '';
104
+ }
105
+ return null;
106
+ }
107
+ /**
108
+ * Recursively builds text content, inserting `\n` at block-level element and `<br>` boundaries.
109
+ *
110
+ * @param {Node} node DOM node to extract text from.
111
+ * @param {boolean} preserveWhitespace Whether whitespace should be retained for preformatted content.
112
+ * @param {boolean} preserveNewlines Keep literal `\n` in text nodes as line breaks (used inside table
113
+ * cells, where a Vega line break is a text node rendered as `<span>\n</span>` rather than a `<br>`).
114
+ * @returns {string} Extracted text with line breaks preserved.
115
+ */
116
+ function extractBlockAwareText(node, preserveWhitespace, preserveNewlines = false) {
117
+ let text = '';
118
+ node.childNodes.forEach((child) => {
119
+ var _a, _b, _c;
120
+ if (child.nodeType === Node.TEXT_NODE) {
121
+ const textContent = (_a = child.textContent) !== null && _a !== void 0 ? _a : '';
122
+ if (preserveWhitespace) {
123
+ text += textContent.replace(/ /g, PRESERVED_SPACE).replace(/\t/g, PRESERVED_TAB);
124
+ return;
125
+ }
126
+ const parentElement = child.parentElement;
127
+ const hasBlockChild = Array.from((_b = parentElement === null || parentElement === void 0 ? void 0 : parentElement.children) !== null && _b !== void 0 ? _b : []).some((element) => BLOCK_LEVEL_TAGS.has(element.tagName.toLowerCase()));
128
+ if (!/\S/.test(textContent) && hasBlockChild) {
129
+ return;
130
+ }
131
+ // Collapse only whitespace runs that cross a markup newline (source-format indentation
132
+ // between tags); real space/tab runs inside a text node are user content and stay verbatim.
133
+ // Inside a cell (preserveNewlines) the collapse keeps the newline as-is.
134
+ text += textContent.replace(preserveNewlines ? /[^\S\u00A0\n]*\n[^\S\u00A0\n]*/g : /[^\S\u00A0]*\n[^\S\u00A0]*/g, preserveNewlines ? '\n' : ' ');
135
+ return;
136
+ }
137
+ if (child.nodeType !== Node.ELEMENT_NODE) {
138
+ return;
139
+ }
140
+ const el = child;
141
+ const tagName = el.tagName.toLowerCase();
142
+ if (tagName === 'br') {
143
+ text += '\n';
144
+ return;
145
+ }
146
+ if (tagName === 'img') {
147
+ text += (_c = el.getAttribute('alt')) !== null && _c !== void 0 ? _c : '';
148
+ return;
149
+ }
150
+ // Code blocks keep their newlines/indentation verbatim so each line becomes its own
151
+ // paragraph on plain paste, instead of collapsing to a single line.
152
+ const codeBlockText = resolveCodeBlockText(el);
153
+ if (codeBlockText !== null) {
154
+ const preservedCode = codeBlockText
155
+ .replace(/ /g, PRESERVED_SPACE)
156
+ .replace(/\t/g, PRESERVED_TAB);
157
+ if (text !== '' && !text.endsWith('\n')) {
158
+ text += '\n';
159
+ }
160
+ text += preservedCode;
161
+ if (preservedCode === '' || !text.endsWith('\n')) {
162
+ text += '\n';
163
+ }
164
+ return;
165
+ }
166
+ if (BLOCK_LEVEL_TAGS.has(tagName) || hasBlockLikeInlineDisplay(el)) {
167
+ const blockText = extractBlockAwareText(el, preserveWhitespace || tagName === 'pre', preserveNewlines);
168
+ // Empty list items and empty structural `div`s (ProseMirror table scaffolding: sticky
169
+ // sentinels, row-control wrappers, borders) are artifacts, not intentional blank lines, so
170
+ // skip them. Keep meaningful empty blocks: break-only div and div containing an image but
171
+ // no extractable text. Empty `<p>`/headings still keep their blank line via the logic below.
172
+ if ((tagName === 'li' && blockText.trim() === '') ||
173
+ (tagName === 'div' && blockText === '' && el.querySelector('img') === null)) {
174
+ return;
175
+ }
176
+ if (text !== '' && !text.endsWith('\n')) {
177
+ text += '\n';
178
+ }
179
+ text += blockText;
180
+ if (blockText === '' || !text.endsWith('\n')) {
181
+ text += '\n';
182
+ }
183
+ return;
184
+ }
185
+ // Put each cell on its own line while keeping the cell's own blank lines (empty
186
+ // paragraphs and Vega text-node line breaks); tabs inside a cell collapse to a space so
187
+ // they don't look like columns.
188
+ if (tagName === 'td' || tagName === 'th') {
189
+ const cellText = extractBlockAwareText(el, preserveWhitespace, true)
190
+ .replace(/\t+/g, ' ')
191
+ .replace(/^\n+|\n+$/g, '');
192
+ text += `${cellText}\n`;
193
+ return;
194
+ }
195
+ text += extractBlockAwareText(el, preserveWhitespace || tagName === 'pre', preserveNewlines || preservesWhitespaceInlineStyle(el));
196
+ });
197
+ return text;
198
+ }
199
+ /**
200
+ * Converts HTML to plain text, preserving line breaks introduced by block-level elements and `<br>`.
201
+ * Used as a fallback when clipboard data lacks a `text/plain` payload, so structural breaks
202
+ * (e.g. `<h1>Heading</h1><p>Body</p>`) survive as `Heading\nBody` instead of being flattened.
203
+ *
204
+ * @param {string} html HTML content to convert.
205
+ * @param {HtmlToPlainTextOptions} options Plain-text conversion options.
206
+ * @returns {string} Block-aware plain text with normalized `\n` line endings.
207
+ */
208
+ export function htmlToPlainText(html, options = {}) {
209
+ if (!html) {
210
+ return '';
211
+ }
212
+ const parsed = new DOMParser().parseFromString(html, 'text/html');
213
+ if (!parsed.body) {
214
+ return '';
215
+ }
216
+ // Per-paragraph trim: sentinels (`\u0001`/`\u0002`) are not in `\s`, so code-block indentation
217
+ // emitted by the preservation branch survives; NBSP is in `\s`, so noise from non-code sources is dropped.
218
+ const normalizedText = normalizePlainTextLines(extractBlockAwareText(parsed.body, false))
219
+ .map((line) => line.trim())
220
+ .join('\n');
221
+ const textWithoutStructuralBreak = options.preserveBoundaryBlankLines
222
+ ? normalizedText.replace(/\n$/, '')
223
+ : normalizedText.replace(/^\n+|\n+$/g, '');
224
+ if (options.keepPreservedWhitespaceMarkers) {
225
+ return textWithoutStructuralBreak;
226
+ }
227
+ return textWithoutStructuralBreak.split(PRESERVED_SPACE).join(' ').split(PRESERVED_TAB).join('\t');
228
+ }
229
+ /**
230
+ * Detects whether the clipboard HTML contains a table anywhere. Plain paste uses this together
231
+ * with a tab check on `text/plain`: a tab-separated `text/plain` only reflects a table's row/
232
+ * column layout when the clipboard actually has a table, so that combination is pasted from
233
+ * `text/plain` verbatim (its line breaks are trusted as-is), regardless of any surrounding content.
234
+ *
235
+ * @param {string} html HTML content to inspect.
236
+ * @returns {boolean} Whether the HTML contains a table.
237
+ */
238
+ export function htmlContainsTable(html) {
239
+ return /<table[\s/>]/i.test(html);
240
+ }
@@ -225,6 +225,7 @@ export const staticTranslations = {
225
225
  'Currency': 'Currency',
226
226
  'Use rich text': 'Use rich text',
227
227
  'Rich Text Editor. Editing area: main. ': 'Rich Text Editor. Editing area: main. ',
228
+ 'Use plain text': 'Use plain text',
228
229
  'Paste options': 'Paste options',
229
230
  'Required': 'Required',
230
231
  'Disabled': 'Disabled',
@@ -1,23 +1,23 @@
1
1
  import { F as FeatureFlag } from './feature-flag-controller-3fd04ea9.js';
2
- import { V as VegaLoader, a as VegaNotify, b as VegaEventManager, c as VegaZIndexManager, w as waitForVega, d as VegaSkeletonLoader, e as VegaTranslation, f as VegaRTETokenExtension, g as VegaRTELanguageExtension, h as VegaRTEDefaultLineHeightOptions, i as VegaRTEFunctionExtension, j as VegaRTETableExtension, k as VegaRTEHorizontalLineExtension, l as VegaRTEBlockquoteExtension, m as VegaRTESpecialCharactersExtension, n as VegaRTEFindReplaceExtension, o as VegaRTESpecialCharactersEssentials, p as VegaRTESpecialCharactersLatin, q as VegaRTESpecialCharactersMathematical, r as VegaRTESpecialCharactersArrows, s as VegaRTESpecialCharactersCurrency, t as VegaRTESpecialCharactersText, u as VegaRTELineHeightExtension, v as VegaRTEPasteExtension, x as VegaRTEFullscreenExtension, y as VegaRTECopyExtension, z as VegaRTECutExtension, A as VegaRTEWordCountExtension, B as VegaCalendarPeriodFactory } from './token-extension-2401e753.js';
3
- import { V as VegaThemeManager } from './split-cell-operation-e158366a.js';
2
+ import { V as VegaLoader, a as VegaNotify, b as VegaEventManager, c as VegaZIndexManager, w as waitForVega, d as VegaSkeletonLoader, e as VegaTranslation, f as VegaRTETokenExtension, g as VegaRTELanguageExtension, h as VegaRTEDefaultLineHeightOptions, i as VegaRTEFunctionExtension, j as VegaRTETableExtension, k as VegaRTEHorizontalLineExtension, l as VegaRTEBlockquoteExtension, m as VegaRTESpecialCharactersExtension, n as VegaRTEFindReplaceExtension, o as VegaRTESpecialCharactersEssentials, p as VegaRTESpecialCharactersLatin, q as VegaRTESpecialCharactersMathematical, r as VegaRTESpecialCharactersArrows, s as VegaRTESpecialCharactersCurrency, t as VegaRTESpecialCharactersText, u as VegaRTELineHeightExtension, v as VegaRTEPasteExtension, x as VegaRTEFullscreenExtension, y as VegaRTECopyExtension, z as VegaRTECutExtension, A as VegaRTEWordCountExtension, B as VegaCalendarPeriodFactory } from './token-extension-645a9520.js';
3
+ import { V as VegaThemeManager } from './split-cell-operation-85a036f9.js';
4
4
  import { M as MapToComponentMethod, V as VegaSlimmer, s as setVegaLogLevel, G as GlobalSlimmersRegistry } from './global-slimmer-registry-17c4efd4.js';
5
5
  import { V as VegaDialog } from './vega-dialog-controller-f2d3b6c9.js';
6
6
  import { T as TypographyUrls } from './typography-19c3b9be.js';
7
7
  import { V as VegaIconManager } from './icon-manager-236d6c23.js';
8
- import { V as VegaInternalTranslation, s as staticTranslations } from './internal-translation-controller-4a7ee4d5.js';
9
- import { V as ValidCreditCardNumberRule } from './valid-credit-card-number-rule-66bad519.js';
8
+ import { V as VegaInternalTranslation, s as staticTranslations } from './internal-translation-controller-3637e47e.js';
9
+ import { V as ValidCreditCardNumberRule } from './valid-credit-card-number-rule-0874e19f.js';
10
10
  import { v as vegaEnvManager } from './vega-env-manager-8f8dc473.js';
11
11
  import { U as UPDATE_TRANSLATION } from './static-subject-title-1c86e974.js';
12
12
  import { C as ChangeManager } from './change-manager-6a7eb88c.js';
13
13
  import { O as Observer } from './observer-3959f9dd.js';
14
14
  import { f as forceUpdate } from './index-090d31ca.js';
15
- import { V as VegaRTEContent } from './content-state-486eae1d.js';
15
+ import { V as VegaRTEContent } from './content-state-67a12e74.js';
16
16
  import { v as vegaNonceManager, s as setVegaNonce } from './vega-nonce-manager-497e5eb5.js';
17
- import { V as VegaRTEPresetToolbarItems } from './code-block-d8f83d85.js';
18
- import { V as VegaRTEBookmarkExtension, a as VegaRTEImageExtension } from './image-extension-20b39140.js';
19
- import { V as VegaRTELinkExtension } from './link-extension-3f93d70d.js';
20
- import './type-guard-08c82e08.js';
17
+ import { V as VegaRTEPresetToolbarItems } from './code-block-9360c331.js';
18
+ import { V as VegaRTEBookmarkExtension, a as VegaRTEImageExtension } from './image-extension-aea75132.js';
19
+ import { V as VegaRTELinkExtension } from './link-extension-57ba9520.js';
20
+ import './type-guard-204094c6.js';
21
21
  import { C as COUNTRIES } from './countries-50d3339b.js';
22
22
 
23
23
  var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
@@ -434,7 +434,7 @@ function injectVegaCountryNamesIntoGlobal() {
434
434
  * Inject VegaPublicValidationRules to global as a public api
435
435
  */
436
436
  function injectVegaPublicValidationRules() {
437
- void import('./public-rules-470a1dac.js').then((module) => {
437
+ void import('./public-rules-c77a1550.js').then((module) => {
438
438
  Object.entries(module).forEach(([name, value]) => {
439
439
  globalThis[name] = value;
440
440
  });
@@ -3,7 +3,7 @@ import { d as domNodeSubjectFactory } from './dom-node-subject-observer-factory-
3
3
  import { e as VegaInternalRichTextEditorFlushChanges, f as VegaInternalRichTextEditorSelectionRangeChange } from './vega-internal-event-id-02093067.js';
4
4
  import { d as dashCaseToCamel, c as camelToDashCase } from './string-a953eafc.js';
5
5
  import { L as LogUtility } from './global-slimmer-registry-17c4efd4.js';
6
- import { i as isNonNullable } from './type-guard-08c82e08.js';
6
+ import { i as isNonNullable } from './type-guard-204094c6.js';
7
7
  import { T as TypographyUrls } from './typography-19c3b9be.js';
8
8
  import { D as Discriminated } from './discriminated-fe5bf3c8.js';
9
9
  import { g as generateUUID } from './misc-9fdbcfbb.js';
@@ -163,6 +163,7 @@ var ModifyContentActionType;
163
163
  ModifyContentActionType["INSERT_NODE_TO_NEAREST_ROOT"] = "INSERT_NODE_TO_NEAREST_ROOT";
164
164
  ModifyContentActionType["PASTE_CONTENT"] = "PASTE_CONTENT";
165
165
  ModifyContentActionType["DELETE_SELECTED_CONTENT"] = "DELETE_SELECTED_CONTENT";
166
+ ModifyContentActionType["SEQUENTIAL_COMPOSITION"] = "SEQUENTIAL_COMPOSITION";
166
167
  })(ModifyContentActionType || (ModifyContentActionType = {}));
167
168
  /**
168
169
  * Abstract class for update node content, delete node, insert node
@@ -270,6 +271,73 @@ function escapeHtmlAttribute(value) {
270
271
  .replace(/>/g, '&gt;')
271
272
  .replace(/"/g, '&quot;'));
272
273
  }
274
+ /**
275
+ * Normalizes clipboard line endings and splits into lines. Low-level primitive behind
276
+ * `toPlainPasteLines`, which layers boundary-whitespace handling on top and is the single
277
+ * conversion source used by plain-mode paste.
278
+ *
279
+ * @param {string} text Raw clipboard plain text.
280
+ * @returns {string[]} Lines with `\r\n`/`\r` normalized to `\n` and split on `\n`.
281
+ */
282
+ function normalizePlainTextLines(text) {
283
+ return text.replace(/\r\n?/g, '\n').split('\n');
284
+ }
285
+ /**
286
+ * Sentinels for whitespace that must survive plain-mode boundary collapsing (e.g. code-block
287
+ * indentation derived from HTML). `htmlToPlainText` can emit these in place of real spaces/tabs so
288
+ * that `toPlainPasteLines` leaves them untouched — they are not matched by `\s` — and decodes them
289
+ * back to real characters after collapsing the paste's insignificant leading/trailing whitespace.
290
+ */
291
+ const PRESERVED_SPACE = '\u0001';
292
+ const PRESERVED_TAB = '\u0002';
293
+ /**
294
+ * Restores {@link PRESERVED_SPACE}/{@link PRESERVED_TAB} sentinels back to real spaces/tabs.
295
+ *
296
+ * @param {string} text Text that may contain preserved-whitespace sentinels.
297
+ * @returns {string} Text with sentinels decoded to real whitespace.
298
+ */
299
+ function decodePreservedWhitespace(text) {
300
+ return text.split(PRESERVED_SPACE).join(' ').split(PRESERVED_TAB).join('\t');
301
+ }
302
+ /**
303
+ * Single source of truth for plain-mode paste conversion: turns raw clipboard text into
304
+ * the canonical list of lines used by both representations of the pasted content — the
305
+ * `text/html` payload emitted by `PlainPasteProcessingStrategy` and the RTE text/newline
306
+ * nodes built by `InsertPasteHandler`. Both must derive from this helper so whitespace and
307
+ * boundary handling cannot drift apart.
308
+ *
309
+ * Per-paragraph handling: lines carrying {@link PRESERVED_SPACE}/{@link PRESERVED_TAB}
310
+ * sentinels come from code-block sources (via the preservation branch of
311
+ * `extractBlockAwareText`) and are kept verbatim so significant indentation survives;
312
+ * all other lines get a normal `String.prototype.trim()` (including NBSP) so
313
+ * paragraph-boundary whitespace from non-code sources is treated as noise.
314
+ * When `decodeEncodedWhitespace` is enabled, sentinels are decoded back to real
315
+ * space/tab characters after the per-line pass.
316
+ *
317
+ * @param {string} text Raw clipboard plain text.
318
+ * @param {boolean} decodeEncodedWhitespace Whether HTML-derived sentinels should be decoded.
319
+ * @returns {string[]} Canonical plain-mode lines.
320
+ */
321
+ function toPlainPasteLines(text, decodeEncodedWhitespace = false) {
322
+ const lines = normalizePlainTextLines(text);
323
+ return lines.map((line) => {
324
+ const hasSentinel = line.includes(PRESERVED_SPACE) || line.includes(PRESERVED_TAB);
325
+ const normalized = hasSentinel ? line : line.trim();
326
+ return decodeEncodedWhitespace ? decodePreservedWhitespace(normalized) : normalized;
327
+ });
328
+ }
329
+ /**
330
+ * Serializes canonical plain-mode lines into paragraph-per-line HTML.
331
+ *
332
+ * Built as a string rather than via DOM `outerHTML` serialization, which collapses
333
+ * consecutive spaces in non-`<pre>` text nodes and would lose intentional whitespace.
334
+ *
335
+ * @param {string[]} lines Canonical plain-mode lines from {@link toPlainPasteLines}.
336
+ * @returns {string} Paragraph HTML where each line is an individual paragraph.
337
+ */
338
+ function plainPasteLinesToHtml(lines) {
339
+ return lines.map((line) => `<p>${escapeHtml(line)}</p>`).join('');
340
+ }
273
341
 
274
342
  /**
275
343
  * Abstract strategy class for filtering default styles in the rich text editor.
@@ -3072,12 +3140,16 @@ const RTE_BLOCK_BOUNDARY_ATTRIBUTE = 'data-vega-rte-block-boundary';
3072
3140
  * whether to preserve the original inline styles.
3073
3141
  */
3074
3142
  const RTE_PASTE_MODE_DATA_TYPE = 'application/x-vega-rte-paste-mode';
3143
+ /** Marks synthetic plain-paste text whose preserved-whitespace sentinels require decoding. */
3144
+ const RTE_PRESERVED_WHITESPACE_DATA_TYPE = 'application/x-vega-rte-preserved-whitespace';
3075
3145
  /**
3076
3146
  * Custom DataTransfer MIME type value used to indicate that the paste content
3077
3147
  * originated from Microsoft Word.
3078
3148
  */
3079
3149
  const RTE_PASTE_MODE_WORD = 'word';
3080
3150
  const RTE_WORD_COUNT_KEY = 'rte-word-count';
3151
+ /** Custom paste mode value used to insert clipboard content without formatting. */
3152
+ const RTE_PASTE_MODE_PLAIN = 'plain';
3081
3153
 
3082
3154
  /**
3083
3155
  * Annotation to make text with text color
@@ -6949,4 +7021,4 @@ RTECodeBlock.typeName = 'RTECodeBlock';
6949
7021
  })();
6950
7022
  RTECodeBlock.CODE_BLOCK_PLACEHOLDER_CLASS_NAME = 'code-block-placeholder-element';
6951
7023
 
6952
- export { ITALIC_FONT_STYLE as $, ActionHandleStrategyRegistry as A, BlockAnnotation as B, CommonAnnotationTypeEnum as C, CommonAnnotation as D, ReplaceChildNodesAction as E, BlockMergeNodesStrategy as F, BlockReplaceNodesStrategy as G, HTML_VOID_TAGS as H, InsertChildrenAfterAction as I, HorizontalAlignmentAnnotationAction as J, BlockUpdateHorizontalAlignmentStrategy as K, BlockDeleteNodeContentStrategy as L, ModifyContentAction as M, NodeAnnotationTypeEnum as N, RemoveChildrenStrategy as O, RemoveNestListAction as P, ReplaceNestListAction as Q, RTETextNode as R, SplitBlockWithNodeAction as S, RTEListBlock as T, UpdateTextAction as U, VegaRTEPresetToolbarItems as V, BOLD_FONT_WEIGHT_KEYWORD as W, BOLD_FONT_WEIGHT as X, createStyleMapFromElement as Y, RTE_TEXT_COLORS as Z, RTE_DEFAULT_TEXT_COLOR as _, RTEBlock as a, STRIKETHROUGH_TEXT_DECORATION as a0, UNDERLINE_TEXT_DECORATION as a1, TextStyleAnnotation as a2, RTEHtmlBlock as a3, Predicate as a4, ListAnnotation as a5, HorizontalAlignmentAnnotation as a6, CodeAnnotation as a7, TEXT_STYLE_DEFAULT_FONT_WEIGHT as a8, LinkFilterStylesStrategy as a9, RTEUpdateSource as aA, escapeHtml as aB, RTE_PASTE_MODE_WORD as aC, RTE_UPDATE_SOURCE_KEY as aD, RTE_EMAIL_LINK_TYPE_KEY as aE, RTE_DEFAULT_LINK_TYPE_KEY as aF, RTE_SUPPORTED_LINK_TYPE_KEYS as aG, CodeBlockFilterStylesStrategy as aa, CodeBlockNodeFilterStylesStrategy as ab, SyncUpSelectionAction as ac, escapeHtmlAttribute as ad, BoldAnnotationAction as ae, DeleteNodeAnnotationAction as af, ActionHandlerInterceptorRegistry as ag, CodeLanguage as ah, CustomClassAnnotation as ai, VegaRTEDefaultTextStyleItems as aj, ZERO_WIDTH_SPACE as ak, LinkAnnotationAction as al, UpdateCodeBlockAction as am, SelectionChangeAction as an, TextColorAnnotationAction as ao, VegaRTEOneRowHeightPx as ap, ItalicAnnotationAction as aq, UnderlineAnnotationAction as ar, TextStyleAnnotationAction as as, BoldAnnotation as at, BlockAnnotationTypeEnum as au, ClearFormattingAnnotationAction as av, CodeAnnotationAction as aw, StrikethroughAnnotationAction as ax, IndentAnnotationAction as ay, TransformParagraphAction as az, RTETextBlock as b, RTE_BLOCK_BOUNDARY_ATTRIBUTE as c, RTEAnnotationStyle as d, ActionHandleStrategy as e, AppendChildrenAction as f, RTENode as g, InsertChildrenBeforeAction as h, InternalAnnotationTypeEnum as i, ModifyContentActionType as j, AnnotationAction as k, RemoveChildrenAction as l, CustomAttributeAnnotation as m, RTEDTOClassManager$1 as n, RTEFilterStylesStrategy as o, RTEDecoratorNode as p, RTECodeBlock as q, RTEListItemBlock as r, stateEntityRenderingRegistry as s, RTECodeBlockNode as t, CustomStyleAnnotation as u, RTEFilterStylesStrategyRegistry as v, RTE_PASTE_MODE_DATA_TYPE as w, RTE_WORD_COUNT_KEY as x, NodeAnnotation as y, NodeTypeEnum as z };
7024
+ export { BOLD_FONT_WEIGHT as $, ActionHandleStrategyRegistry as A, BlockAnnotation as B, CommonAnnotationTypeEnum as C, RTE_WORD_COUNT_KEY as D, NodeAnnotation as E, NodeTypeEnum as F, CommonAnnotation as G, HTML_VOID_TAGS as H, InsertChildrenAfterAction as I, escapeHtml as J, ReplaceChildNodesAction as K, BlockMergeNodesStrategy as L, ModifyContentAction as M, NodeAnnotationTypeEnum as N, BlockReplaceNodesStrategy as O, HorizontalAlignmentAnnotationAction as P, BlockUpdateHorizontalAlignmentStrategy as Q, RTETextNode as R, SplitBlockWithNodeAction as S, BlockDeleteNodeContentStrategy as T, UpdateTextAction as U, VegaRTEPresetToolbarItems as V, RemoveChildrenStrategy as W, RemoveNestListAction as X, ReplaceNestListAction as Y, RTEListBlock as Z, BOLD_FONT_WEIGHT_KEYWORD as _, RTENode as a, createStyleMapFromElement as a0, RTE_TEXT_COLORS as a1, RTE_DEFAULT_TEXT_COLOR as a2, ITALIC_FONT_STYLE as a3, STRIKETHROUGH_TEXT_DECORATION as a4, UNDERLINE_TEXT_DECORATION as a5, TextStyleAnnotation as a6, RTEHtmlBlock as a7, Predicate as a8, ListAnnotation as a9, BoldAnnotation as aA, BlockAnnotationTypeEnum as aB, ClearFormattingAnnotationAction as aC, CodeAnnotationAction as aD, StrikethroughAnnotationAction as aE, IndentAnnotationAction as aF, TransformParagraphAction as aG, RTEUpdateSource as aH, RTE_UPDATE_SOURCE_KEY as aI, RTE_PASTE_MODE_PLAIN as aJ, RTE_PASTE_MODE_WORD as aK, RTE_EMAIL_LINK_TYPE_KEY as aL, RTE_DEFAULT_LINK_TYPE_KEY as aM, RTE_SUPPORTED_LINK_TYPE_KEYS as aN, HorizontalAlignmentAnnotation as aa, CodeAnnotation as ab, TEXT_STYLE_DEFAULT_FONT_WEIGHT as ac, LinkFilterStylesStrategy as ad, CodeBlockFilterStylesStrategy as ae, CodeBlockNodeFilterStylesStrategy as af, SyncUpSelectionAction as ag, escapeHtmlAttribute as ah, BoldAnnotationAction as ai, DeleteNodeAnnotationAction as aj, normalizePlainTextLines as ak, PRESERVED_SPACE as al, PRESERVED_TAB as am, ActionHandlerInterceptorRegistry as an, CodeLanguage as ao, CustomClassAnnotation as ap, VegaRTEDefaultTextStyleItems as aq, ZERO_WIDTH_SPACE as ar, LinkAnnotationAction as as, UpdateCodeBlockAction as at, SelectionChangeAction as au, TextColorAnnotationAction as av, VegaRTEOneRowHeightPx as aw, ItalicAnnotationAction as ax, UnderlineAnnotationAction as ay, TextStyleAnnotationAction as az, RTEBlock as b, RTETextBlock as c, RTE_BLOCK_BOUNDARY_ATTRIBUTE as d, RTEAnnotationStyle as e, ActionHandleStrategy as f, AppendChildrenAction as g, InsertChildrenBeforeAction as h, InternalAnnotationTypeEnum as i, ModifyContentActionType as j, AnnotationAction as k, RemoveChildrenAction as l, CustomAttributeAnnotation as m, RTEDTOClassManager$1 as n, RTEFilterStylesStrategy as o, RTEDecoratorNode as p, RTECodeBlock as q, RTEListItemBlock as r, stateEntityRenderingRegistry as s, RTECodeBlockNode as t, CustomStyleAnnotation as u, RTEFilterStylesStrategyRegistry as v, plainPasteLinesToHtml as w, toPlainPasteLines as x, RTE_PRESERVED_WHITESPACE_DATA_TYPE as y, RTE_PASTE_MODE_DATA_TYPE as z };
@@ -1,15 +1,15 @@
1
1
  import { c as MapToComponentField, M as MapToComponentMethod } from './global-slimmer-registry-17c4efd4.js';
2
- import { t as RTECodeBlockNode, R as RTETextNode, ak as ZERO_WIDTH_SPACE, s as stateEntityRenderingRegistry, p as RTEDecoratorNode, g as RTENode, a as RTEBlock, an as SelectionChangeAction, i as InternalAnnotationTypeEnum, q as RTECodeBlock } from './code-block-d8f83d85.js';
2
+ import { t as RTECodeBlockNode, R as RTETextNode, ar as ZERO_WIDTH_SPACE, s as stateEntityRenderingRegistry, p as RTEDecoratorNode, a as RTENode, b as RTEBlock, au as SelectionChangeAction, i as InternalAnnotationTypeEnum, q as RTECodeBlock } from './code-block-9360c331.js';
3
3
  import { d as debounce } from './timer-9321173b.js';
4
4
  import { g as getActiveElement } from './component-7d906393.js';
5
5
  import { C as ChangeManager } from './change-manager-6a7eb88c.js';
6
6
  import { d as domNodeSubjectFactory, D as DomNodeSubjectObserverFactory } from './dom-node-subject-observer-factory-bb7e68a0.js';
7
7
  import { f as VegaInternalRichTextEditorSelectionRangeChange, c as VegaInternalUpdateRTECursorPosition } from './vega-internal-event-id-02093067.js';
8
8
  import { O as Observer } from './observer-3959f9dd.js';
9
- import { R as RTERange } from './range-8e89fb54.js';
9
+ import { R as RTERange } from './range-3c74e1c8.js';
10
10
  import { A as AutoRunWhenReRenderTaskQueueSlimmer } from './auto-run-when-re-render-task-queue-slimmer.abstract-27820d4c.js';
11
11
  import { i as isHTMLElement } from './ui-80e610f4.js';
12
- import { K as KeyboardManagerSlimmer } from './keyboard-manager-slimmer-f40dcb54.js';
12
+ import { K as KeyboardManagerSlimmer } from './keyboard-manager-slimmer-b3de042d.js';
13
13
 
14
14
  let processing = false;
15
15
  /**
@@ -1,6 +1,6 @@
1
- import { e as ActionHandleStrategy, q as RTECodeBlock, h as InsertChildrenBeforeAction, l as RemoveChildrenAction, s as stateEntityRenderingRegistry, y as NodeAnnotation, N as NodeAnnotationTypeEnum, p as RTEDecoratorNode, z as NodeTypeEnum, D as CommonAnnotation, A as ActionHandleStrategyRegistry, k as AnnotationAction, j as ModifyContentActionType, E as ReplaceChildNodesAction, I as InsertChildrenAfterAction, f as AppendChildrenAction, M as ModifyContentAction, b as RTETextBlock, R as RTETextNode, S as SplitBlockWithNodeAction, a as RTEBlock, F as BlockMergeNodesStrategy, G as BlockReplaceNodesStrategy, J as HorizontalAlignmentAnnotationAction, K as BlockUpdateHorizontalAlignmentStrategy, L as BlockDeleteNodeContentStrategy, U as UpdateTextAction, O as RemoveChildrenStrategy, P as RemoveNestListAction, r as RTEListItemBlock, Q as ReplaceNestListAction, T as RTEListBlock, W as BOLD_FONT_WEIGHT_KEYWORD, X as BOLD_FONT_WEIGHT, Y as createStyleMapFromElement, Z as RTE_TEXT_COLORS, _ as RTE_DEFAULT_TEXT_COLOR, $ as ITALIC_FONT_STYLE, a0 as STRIKETHROUGH_TEXT_DECORATION, a1 as UNDERLINE_TEXT_DECORATION, v as RTEFilterStylesStrategyRegistry, a2 as TextStyleAnnotation, a3 as RTEHtmlBlock, c as RTE_BLOCK_BOUNDARY_ATTRIBUTE, o as RTEFilterStylesStrategy, a4 as Predicate$1, a5 as ListAnnotation, a6 as HorizontalAlignmentAnnotation, a7 as CodeAnnotation, a8 as TEXT_STYLE_DEFAULT_FONT_WEIGHT, n as RTEDTOClassManager, a9 as LinkFilterStylesStrategy, aa as CodeBlockFilterStylesStrategy, t as RTECodeBlockNode, ab as CodeBlockNodeFilterStylesStrategy, ac as SyncUpSelectionAction } from './code-block-d8f83d85.js';
1
+ import { f as ActionHandleStrategy, q as RTECodeBlock, h as InsertChildrenBeforeAction, l as RemoveChildrenAction, s as stateEntityRenderingRegistry, E as NodeAnnotation, N as NodeAnnotationTypeEnum, p as RTEDecoratorNode, F as NodeTypeEnum, G as CommonAnnotation, J as escapeHtml, A as ActionHandleStrategyRegistry, k as AnnotationAction, j as ModifyContentActionType, K as ReplaceChildNodesAction, I as InsertChildrenAfterAction, g as AppendChildrenAction, M as ModifyContentAction, c as RTETextBlock, R as RTETextNode, S as SplitBlockWithNodeAction, b as RTEBlock, L as BlockMergeNodesStrategy, O as BlockReplaceNodesStrategy, P as HorizontalAlignmentAnnotationAction, Q as BlockUpdateHorizontalAlignmentStrategy, T as BlockDeleteNodeContentStrategy, U as UpdateTextAction, W as RemoveChildrenStrategy, X as RemoveNestListAction, r as RTEListItemBlock, Y as ReplaceNestListAction, Z as RTEListBlock, _ as BOLD_FONT_WEIGHT_KEYWORD, $ as BOLD_FONT_WEIGHT, a0 as createStyleMapFromElement, a1 as RTE_TEXT_COLORS, a2 as RTE_DEFAULT_TEXT_COLOR, a3 as ITALIC_FONT_STYLE, a4 as STRIKETHROUGH_TEXT_DECORATION, a5 as UNDERLINE_TEXT_DECORATION, v as RTEFilterStylesStrategyRegistry, a6 as TextStyleAnnotation, a7 as RTEHtmlBlock, d as RTE_BLOCK_BOUNDARY_ATTRIBUTE, o as RTEFilterStylesStrategy, a8 as Predicate$1, a9 as ListAnnotation, aa as HorizontalAlignmentAnnotation, ab as CodeAnnotation, ac as TEXT_STYLE_DEFAULT_FONT_WEIGHT, n as RTEDTOClassManager, ad as LinkFilterStylesStrategy, ae as CodeBlockFilterStylesStrategy, t as RTECodeBlockNode, af as CodeBlockNodeFilterStylesStrategy, ag as SyncUpSelectionAction } from './code-block-9360c331.js';
2
2
  import { g as generateUUID } from './misc-9fdbcfbb.js';
3
- import { i as isNonNullable } from './type-guard-08c82e08.js';
3
+ import { i as isNonNullable } from './type-guard-204094c6.js';
4
4
  import { C as ChangeManager } from './change-manager-6a7eb88c.js';
5
5
  import { d as domNodeSubjectFactory } from './dom-node-subject-observer-factory-bb7e68a0.js';
6
6
  import { c as VegaInternalUpdateRTECursorPosition, d as VegaInternalRichTextEditDeleteSelectedNodes, e as VegaInternalRichTextEditorFlushChanges } from './vega-internal-event-id-02093067.js';
@@ -485,8 +485,8 @@ class RTEImageNode extends RTEDecoratorNode {
485
485
  toHtml(options) {
486
486
  const imageAnnotation = this.getAnnotationByType(NodeAnnotationTypeEnum.IMAGE);
487
487
  const attrStr = super.generateAttributeString(options, ...[
488
- imageAnnotation && imageAnnotation.alt ? `alt="${imageAnnotation.alt}"` : null,
489
- `src="${this.url}"`,
488
+ imageAnnotation && imageAnnotation.alt ? `alt="${escapeHtml(imageAnnotation.alt)}"` : null,
489
+ `src="${escapeHtml(this.url)}"`,
490
490
  imageAnnotation && imageAnnotation.size ? `data-size="${imageAnnotation.size}"` : null,
491
491
  ].filter(isNonNullable));
492
492
  return `<img${attrStr}>`;
@@ -4429,6 +4429,37 @@ class DeleteSelectedContentStrategy extends ActionHandleStrategy {
4429
4429
  }
4430
4430
  }
4431
4431
 
4432
+ /**
4433
+ * Runs each step of a `SequentialCompositionAction` against its own target. Inner leaf actions stay
4434
+ * non-flushable, so only the outer composition emits the single flush notification. A step can be a
4435
+ * factory that builds its operation(s) at apply time, reading earlier applied actions by their type.
4436
+ */
4437
+ class SequentialCompositionStrategy extends ActionHandleStrategy {
4438
+ /**
4439
+ * @inheritDoc
4440
+ */
4441
+ handleAction(action) {
4442
+ const results = new Map();
4443
+ const context = {
4444
+ // eslint-disable-next-line jsdoc/require-jsdoc
4445
+ getAction: (type) => results.get(type),
4446
+ };
4447
+ action.steps.forEach((step) => {
4448
+ const produced = typeof step === 'function' ? step(context) : step;
4449
+ if (!produced) {
4450
+ return;
4451
+ }
4452
+ const operations = Array.isArray(produced) ? produced : [produced];
4453
+ operations.forEach((operation) => {
4454
+ // Avoid multiple flush value
4455
+ operation.action.isFlushable = false;
4456
+ operation.target.apply(operation.action);
4457
+ results.set(operation.action.type, operation.action);
4458
+ });
4459
+ });
4460
+ }
4461
+ }
4462
+
4432
4463
  /**
4433
4464
  * Default commit strategy — the candidate becomes the committed value. Rejection
4434
4465
  * is handled exclusively by interceptors that veto the commit by not executing.
@@ -4605,12 +4636,13 @@ class VegaRTEContent extends Discriminated {
4605
4636
  * @param {ModifyContentAction} action - Modify content action
4606
4637
  */
4607
4638
  apply(action) {
4639
+ var _a;
4608
4640
  ActionHandleStrategyRegistry.executeTheStrategy(action, this);
4609
4641
  // Check if the action has been executed and is flushable
4610
4642
  if (action['executedFlag'] && action.isFlushable) {
4611
4643
  const host = stateEntityRenderingRegistry.getDOMByEntity(this);
4612
4644
  if (host) {
4613
- ChangeManager.notify(domNodeSubjectFactory.getSubject(host, VegaInternalRichTextEditorFlushChanges), {});
4645
+ ChangeManager.notify(domNodeSubjectFactory.getSubject(host, VegaInternalRichTextEditorFlushChanges), (_a = action.flushPayload) !== null && _a !== void 0 ? _a : {});
4614
4646
  }
4615
4647
  }
4616
4648
  }
@@ -4716,6 +4748,7 @@ VegaRTEContent.typeName = 'VegaRTEContent';
4716
4748
  ActionHandleStrategyRegistry.register(ModifyContentActionType.UPDATE_CURSOR_POSITION, VegaRTEContent.typeName, new UpdateCursorPositionStrategy());
4717
4749
  ActionHandleStrategyRegistry.register(ModifyContentActionType.DELETE_SELECTED_CONTENT, VegaRTEContent.typeName, new DeleteSelectedContentStrategy());
4718
4750
  ActionHandleStrategyRegistry.register(COMMIT_VALUE, VegaRTEContent.typeName, new CommitValueStrategy());
4751
+ ActionHandleStrategyRegistry.register(ModifyContentActionType.SEQUENTIAL_COMPOSITION, VegaRTEContent.typeName, new SequentialCompositionStrategy());
4719
4752
  })();
4720
4753
 
4721
4754
  export { AnnotationGeneratorStrategyAbstract as A, BlockToRTEBlockStrategyAbstract as B, COMMIT_VALUE as C, ElementToDTOStrategy as E, HtmlBlockStrategy as H, InsertNewParagraphAction as I, MergeTwoBlocksNodesAction as M, PasteContentStrategy as P, RTEImageBlock as R, StylePreservator as S, UpdateCursorPositionAction as U, VegaRTEContent as V, InsertChildrenBeforeStrategy as a, RTEImageNode as b, RTEDTOActionStrategyManager$1 as c, ElementToDTOClassStrategyManager as d, ImageAnnotation as e, CommitValueAction as f, ElementToDtoStrategyProcessor$1 as g, htmlElementToAnnotationGenerator as h };
@@ -1,4 +1,4 @@
1
- import { U as isDateStr } from './type-guard-08c82e08.js';
1
+ import { U as isDateStr } from './type-guard-204094c6.js';
2
2
  import { I as InternalFormFieldValidationRule } from './internal-form-field-validation-rule.abstract-f5b6bdbf.js';
3
3
 
4
4
  /**
@@ -1,9 +1,9 @@
1
- import { m as StateBackgroundColorFormatter, n as isSpacingTokenType, o as isBorderRadiusTokenType, p as isBorderColorTokenType, q as isBackgroundColorTokenType, r as isTextColorTokenType, s as isBreakpointsTokenType, t as isShadowsTokenType, l as Spacing, u as isBorderStyleType, B as BorderRadius, c as Colors, j as Shadows, v as isTypographyTokenType } from './type-guard-08c82e08.js';
1
+ import { m as StateBackgroundColorFormatter, n as isSpacingTokenType, o as isBorderRadiusTokenType, p as isBorderColorTokenType, q as isBackgroundColorTokenType, r as isTextColorTokenType, s as isBreakpointsTokenType, t as isShadowsTokenType, l as Spacing, u as isBorderStyleType, B as BorderRadius, c as Colors, j as Shadows, v as isTypographyTokenType } from './type-guard-204094c6.js';
2
2
  import { B as Breakpoints } from './breakpoints-d9faf11c.js';
3
3
  import { L as LogUtility } from './global-slimmer-registry-17c4efd4.js';
4
- import { R as ResponsiveFormatFacade } from './responsive-format-facade-55131a33.js';
4
+ import { R as ResponsiveFormatFacade } from './responsive-format-facade-1b325d06.js';
5
5
  import { a as TypographyKeys } from './typography-19c3b9be.js';
6
- import { S as StateBorderFormatter, a as StateShadowFormatter, b as StateBorderColorFormatter } from './state-border-formatter-2b73fa08.js';
6
+ import { S as StateBorderFormatter, a as StateShadowFormatter, b as StateBorderColorFormatter } from './state-border-formatter-ce3495b0.js';
7
7
  import { B as BorderStyle } from './ui-93922c59.js';
8
8
 
9
9
  /**
@@ -4,8 +4,8 @@ import { I as InternalVegaZIndexManager } from './internal-vega-z-index-manager-
4
4
  import { c as createDynamicSlimmer } from './dynamic-slimmer-90b8af32.js';
5
5
  import { P as PageResizeObserverSlimmer } from './page-resize-observer-slimmer-e24d36c5.js';
6
6
  import { A as Alignments, P as Placements } from './ui-93922c59.js';
7
- import { J as isTranslocationType, i as isNonNullable, a9 as isEATriggerStrategy } from './type-guard-08c82e08.js';
8
- import { R as ResponsiveFormatFacade } from './responsive-format-facade-55131a33.js';
7
+ import { J as isTranslocationType, i as isNonNullable, a9 as isEATriggerStrategy } from './type-guard-204094c6.js';
8
+ import { R as ResponsiveFormatFacade } from './responsive-format-facade-1b325d06.js';
9
9
  import { t as tryGetDocument } from './try-get-document-bef0f526.js';
10
10
  import { F as FeatureFlag } from './feature-flag-controller-3fd04ea9.js';
11
11
  import { C as ChangeManager } from './change-manager-6a7eb88c.js';