@globalpayments/vega 2.87.0 → 2.88.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 (589) hide show
  1. package/dist/cjs/action-color-accessibility-validator-15fa91e4.js +1817 -0
  2. package/dist/cjs/{app-globals-885090b1.js → app-globals-6fbbcb2f.js} +16 -7
  3. package/dist/cjs/{child-nodes-event-prevent-slimmer-b7498e5a.js → child-nodes-event-prevent-slimmer-01930b4e.js} +1 -1
  4. package/dist/cjs/{code-block-15411c14.js → code-block-00fee034.js} +31 -13
  5. package/dist/cjs/{component-value-history-controller-slimmer.abstract-5218e4b3.js → component-value-history-controller-slimmer.abstract-066645b3.js} +25 -5
  6. package/dist/cjs/{content-state-a69d99b4.js → content-state-d4f54659.js} +66 -54
  7. package/dist/cjs/{dark-mode-style-controller-bd765afb.js → dark-mode-style-controller-ed481250.js} +41 -2
  8. package/dist/cjs/{date-required-rule-d65727c5.js → date-required-rule-4cea8fc8.js} +1 -1
  9. package/dist/cjs/{design-token-3bc36220.js → design-token-ad9f413c.js} +3 -3
  10. package/dist/cjs/{element-appender-slimmer-f86e6811.js → element-appender-slimmer-d04aa177.js} +2 -2
  11. package/dist/cjs/{event-emit-slimmer-73c42d7e.js → event-emit-slimmer-5fd6e54a.js} +1 -1
  12. package/dist/cjs/{form-field-controller-slimmer-44091874.js → form-field-controller-slimmer-23d112bd.js} +1 -1
  13. package/dist/cjs/{image-annotation-action-aad07357.js → image-annotation-action-bcf2a1b4.js} +4 -4
  14. package/dist/cjs/index-58ea899e.js +4 -0
  15. package/dist/cjs/index.cjs.js +27 -17
  16. package/dist/cjs/{inject-keyboard-manager-d06b337e.js → inject-keyboard-manager-acaf1530.js} +1 -1
  17. package/dist/cjs/{internal-translation-controller-f0da24b2.js → internal-translation-controller-a1250419.js} +8 -0
  18. package/dist/cjs/{internal-vega-event-manager-063c17cb.js → internal-vega-event-manager-c515cf5e.js} +2 -2
  19. package/dist/cjs/{keyboard-manager-1e045791.js → keyboard-manager-6821709a.js} +1 -1
  20. package/dist/cjs/{keyboard-manager-slimmer-861d991f.js → keyboard-manager-slimmer-74528545.js} +1 -1
  21. package/dist/cjs/loader.cjs.js +13 -12
  22. package/dist/cjs/{month-view-generator-8ed9818e.js → month-view-generator-61578283.js} +1 -1
  23. package/dist/cjs/{public-rules-c7726702.js → public-rules-d2fbbbf5.js} +8 -8
  24. package/dist/cjs/{range-d6fb50a4.js → range-e797475c.js} +1 -1
  25. package/dist/cjs/replace-selected-text-action-a098523f.js +20 -0
  26. package/dist/cjs/{responsive-format-facade-9647775d.js → responsive-format-facade-bf330592.js} +1 -1
  27. package/dist/cjs/{rich-text-editor-required-rule-a1a070ce.js → rich-text-editor-required-rule-ba9d42fa.js} +1 -1
  28. package/dist/cjs/{split-cell-operation-39b19943.js → split-cell-operation-91ee6894.js} +79 -16
  29. package/dist/cjs/{state-border-formatter-1a483a9b.js → state-border-formatter-fd194e53.js} +1 -1
  30. package/dist/cjs/{string-format-strategy.abstract-2aec209d.js → string-format-strategy.abstract-af9fc35e.js} +1 -1
  31. package/dist/cjs/{string-input-formatter-slimmer-e061bd10.js → string-input-formatter-slimmer-a3fb1292.js} +1 -1
  32. package/dist/cjs/{string-mask-strategy-4bc07c00.js → string-mask-strategy-2054f3fb.js} +2 -2
  33. package/dist/cjs/{style-formatter-263d5eb6.js → style-formatter-7d60fb70.js} +2 -2
  34. package/dist/cjs/{time-required-rule-f9a7e897.js → time-required-rule-ba450bbd.js} +1 -1
  35. package/dist/cjs/{token-extension-927062b9.js → token-extension-8b69f7e1.js} +1136 -26
  36. package/dist/cjs/{translation-slimmer-a4a7f0eb.js → translation-slimmer-aee3fb1c.js} +1 -1
  37. package/dist/cjs/{type-guard-c1195e50.js → type-guard-424efe26.js} +1 -1
  38. package/dist/cjs/{valid-credit-card-number-rule-22f3e6cf.js → valid-credit-card-number-rule-6bd5834c.js} +1 -1
  39. package/dist/cjs/vega-accordion.cjs.entry.js +22 -15
  40. package/dist/cjs/vega-app-footer.cjs.entry.js +1 -1
  41. package/dist/cjs/vega-app-header-button.cjs.entry.js +9 -9
  42. package/dist/cjs/vega-banner.cjs.entry.js +3 -3
  43. package/dist/cjs/vega-box.cjs.entry.js +6 -6
  44. package/dist/cjs/vega-brand-logo.cjs.entry.js +1 -1
  45. package/dist/cjs/vega-breadcrumb.cjs.entry.js +4 -4
  46. package/dist/cjs/vega-button-circle.cjs.entry.js +9 -9
  47. package/dist/cjs/vega-button-group_2.cjs.entry.js +4 -4
  48. package/dist/cjs/vega-button-link.cjs.entry.js +4 -4
  49. package/dist/cjs/vega-button.cjs.entry.js +7 -7
  50. package/dist/cjs/vega-calendar_4.cjs.entry.js +10 -10
  51. package/dist/cjs/vega-card.cjs.entry.js +5 -5
  52. package/dist/cjs/vega-carousel.cjs.entry.js +6 -6
  53. package/dist/cjs/vega-checkbox_2.cjs.entry.js +6 -6
  54. package/dist/cjs/vega-chip.cjs.entry.js +9 -9
  55. package/dist/cjs/vega-code-block.cjs.entry.js +16 -15
  56. package/dist/cjs/vega-color-picker.cjs.entry.js +5 -5
  57. package/dist/cjs/vega-color-swatch-picker.cjs.entry.js +7 -7
  58. package/dist/cjs/vega-color-swatch.cjs.entry.js +5 -5
  59. package/dist/cjs/vega-combo-box.cjs.entry.js +23 -10
  60. package/dist/cjs/vega-date-picker_2.cjs.entry.js +327 -267
  61. package/dist/cjs/vega-dialog_2.cjs.entry.js +7 -7
  62. package/dist/cjs/vega-divider.cjs.entry.js +5 -5
  63. package/dist/cjs/vega-dropdown_5.cjs.entry.js +11 -11
  64. package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
  65. package/dist/cjs/{vega-event-id-f95480b7.js → vega-event-id-39dedd17.js} +2 -0
  66. package/dist/cjs/vega-field-label.cjs.entry.js +22 -5
  67. package/dist/cjs/vega-file-uploader.cjs.entry.js +20 -7
  68. package/dist/cjs/vega-flag-icon.cjs.entry.js +5 -5
  69. package/dist/cjs/vega-flex.cjs.entry.js +6 -6
  70. package/dist/cjs/vega-font.cjs.entry.js +5 -5
  71. package/dist/cjs/vega-form.cjs.entry.js +7 -7
  72. package/dist/cjs/vega-grid.cjs.entry.js +5 -5
  73. package/dist/cjs/vega-icon.cjs.entry.js +5 -5
  74. package/dist/cjs/vega-image-uploader.cjs.entry.js +10 -10
  75. package/dist/cjs/vega-input-credit-card.cjs.entry.js +10 -10
  76. package/dist/cjs/vega-input-numeric.cjs.entry.js +9 -9
  77. package/dist/cjs/vega-input-passcode.cjs.entry.js +23 -10
  78. package/dist/cjs/vega-input-phone-number.cjs.entry.js +22 -9
  79. package/dist/cjs/vega-input-range.cjs.entry.js +7 -7
  80. package/dist/cjs/vega-input-select.cjs.entry.js +9 -9
  81. package/dist/cjs/vega-input.cjs.entry.js +23 -10
  82. package/dist/cjs/vega-item-toggle.cjs.entry.js +3 -3
  83. package/dist/cjs/vega-left-nav_5.cjs.entry.js +11 -11
  84. package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +3 -3
  85. package/dist/cjs/vega-page-notification_2.cjs.entry.js +1 -1
  86. package/dist/cjs/vega-pagination-page-selector-mobile.cjs.entry.js +3 -3
  87. package/dist/cjs/vega-pagination-page-size-selector-mobile.cjs.entry.js +3 -3
  88. package/dist/cjs/vega-pagination.cjs.entry.js +8 -8
  89. package/dist/cjs/vega-popover_2.cjs.entry.js +11 -11
  90. package/dist/cjs/vega-progress-tracker_2.cjs.entry.js +6 -6
  91. package/dist/cjs/vega-radio_2.cjs.entry.js +9 -9
  92. package/dist/cjs/vega-rich-text-content.cjs.entry.js +7 -7
  93. package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +289 -193
  94. package/dist/cjs/vega-rich-text-special-characters-panel.cjs.entry.js +400 -0
  95. package/dist/cjs/vega-rich-text-table-properties_3.cjs.entry.js +12 -12
  96. package/dist/cjs/vega-section-title.cjs.entry.js +3 -2
  97. package/dist/cjs/vega-segment-control.cjs.entry.js +3 -3
  98. package/dist/cjs/vega-selection-chip_2.cjs.entry.js +8 -8
  99. package/dist/cjs/vega-selection-tile_2.cjs.entry.js +6 -6
  100. package/dist/cjs/vega-sidenav_3.cjs.entry.js +6 -6
  101. package/dist/cjs/vega-signature-capture.cjs.entry.js +10 -10
  102. package/dist/cjs/vega-stepper.cjs.entry.js +6 -6
  103. package/dist/cjs/vega-tab-group_2.cjs.entry.js +4 -4
  104. package/dist/cjs/vega-table_11.cjs.entry.js +8 -8
  105. package/dist/cjs/vega-textarea.cjs.entry.js +17 -7
  106. package/dist/cjs/vega-time-picker_2.cjs.entry.js +13 -13
  107. package/dist/cjs/vega-toggle-switch.cjs.entry.js +5 -5
  108. package/dist/cjs/vega-tooltip_2.cjs.entry.js +6 -6
  109. package/dist/cjs/vega.cjs.js +13 -12
  110. package/dist/collection/collection-manifest.json +6 -0
  111. package/dist/collection/components/vega-accordion/slimmers/vega-accordion-renderer.js +12 -5
  112. package/dist/collection/components/vega-accordion/vega-accordion.css +23 -0
  113. package/dist/collection/components/vega-accordion/vega-accordion.js +28 -0
  114. package/dist/collection/components/vega-box/vega-box.js +3 -3
  115. package/dist/collection/components/vega-code-block/slimmers/renderers/vega-code-block-copy-button-renderer.js +2 -2
  116. package/dist/collection/components/vega-code-block/vega-code-block.js +4 -0
  117. package/dist/collection/components/vega-combo-box/slimmers/renderers/vega-combo-box-renderer.js +4 -1
  118. package/dist/collection/components/vega-combo-box/vega-combo-box.js +34 -0
  119. package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/slimmers/controllers/vega-date-picker-calendar-size-controller.js +46 -0
  120. package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-calendar-header-render.js +8 -4
  121. package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-calendar-year-month-switcher-renderer.js +3 -3
  122. package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-month-item-renderer.js +0 -3
  123. package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/vega-date-picker-calendar.js +67 -6
  124. package/dist/collection/components/vega-field-label/vega-field-label.css +37 -0
  125. package/dist/collection/components/vega-field-label/vega-field-label.js +40 -0
  126. package/dist/collection/components/vega-file-uploader/slimmers/renderers/vega-file-uploader-renderer.js +4 -1
  127. package/dist/collection/components/vega-file-uploader/vega-file-uploader.js +34 -0
  128. package/dist/collection/components/vega-input/slimmers/renderers/vega-input-renderer.js +4 -1
  129. package/dist/collection/components/vega-input/vega-input.js +34 -0
  130. package/dist/collection/components/vega-input-passcode/slimmers/renderers/vega-input-passcode-renderer.js +4 -1
  131. package/dist/collection/components/vega-input-passcode/vega-input-passcode.js +34 -0
  132. package/dist/collection/components/vega-input-phone-number/slimmers/renderers/vega-input-phone-number-renderer.js +4 -1
  133. package/dist/collection/components/vega-input-phone-number/vega-input-phone-number.js +34 -0
  134. package/dist/collection/components/vega-rich-text-editor/assets/redo.js +3 -0
  135. package/dist/collection/components/vega-rich-text-editor/assets/undo.js +3 -0
  136. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/action-handle-strategy.abstract.js +1 -1
  137. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-delete-node-content-strategy.js +1 -1
  138. package/dist/collection/components/vega-rich-text-editor/dto/annotations/annotation-style.js +2 -2
  139. package/dist/collection/components/vega-rich-text-editor/dto/blocks/block.abstract.js +5 -0
  140. package/dist/collection/components/vega-rich-text-editor/dto/blocks/code-block.js +2 -0
  141. package/dist/collection/components/vega-rich-text-editor/dto/blocks/html-block.js +2 -0
  142. package/dist/collection/components/vega-rich-text-editor/dto/blocks/image-block.js +2 -0
  143. package/dist/collection/components/vega-rich-text-editor/dto/blocks/list-block.js +2 -0
  144. package/dist/collection/components/vega-rich-text-editor/dto/blocks/list-item-block.js +2 -0
  145. package/dist/collection/components/vega-rich-text-editor/dto/blocks/text-block.js +2 -0
  146. package/dist/collection/components/vega-rich-text-editor/dto/content-state.js +3 -0
  147. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/code-block/code-block-filter-styles-strategy.js +1 -1
  148. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/filter-styles-strategy-registry.js +1 -1
  149. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/list-block/list-block-filter-styles-strategy.js +1 -1
  150. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/list-block/list-heading-item-block-filter-styles-strategy.js +1 -1
  151. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/list-block/list-item-block-filter-styles-strategy.js +1 -1
  152. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/list-block/list-title-item-block-filter-styles-strategy.js +1 -1
  153. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/predicate.js +4 -4
  154. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/text-block/paragraph-filter-styles-strategy.js +1 -2
  155. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/text-node/title-heading-node-filter-styles-strategy.js +1 -1
  156. package/dist/collection/components/vega-rich-text-editor/dto/nodes/code-block-node.js +2 -0
  157. package/dist/collection/components/vega-rich-text-editor/dto/nodes/image-node.js +2 -0
  158. package/dist/collection/components/vega-rich-text-editor/dto/nodes/node.abstract.js +5 -0
  159. package/dist/collection/components/vega-rich-text-editor/dto/nodes/text-node.js +2 -0
  160. package/dist/collection/components/vega-rich-text-editor/dto/setup.js +29 -29
  161. package/dist/collection/components/vega-rich-text-editor/extensions/base-toolbar-button-renderer.js +105 -1
  162. package/dist/collection/components/vega-rich-text-editor/extensions/extension.abstract.js +50 -1
  163. package/dist/collection/components/vega-rich-text-editor/extensions/functions/dto/function-block.js +2 -0
  164. package/dist/collection/components/vega-rich-text-editor/extensions/functions/dto/logic-control-block.js +2 -0
  165. package/dist/collection/components/vega-rich-text-editor/extensions/functions/dto/logic-control-node.js +2 -0
  166. package/dist/collection/components/vega-rich-text-editor/extensions/functions/function-extension.js +4 -2
  167. package/dist/collection/components/vega-rich-text-editor/extensions/line-height/action-handler-strategies/block-update-line-height-strategy.js +18 -0
  168. package/dist/collection/components/vega-rich-text-editor/extensions/line-height/actions/line-height-annotation-action.js +20 -0
  169. package/dist/collection/components/vega-rich-text-editor/extensions/line-height/annotations/line-height-annotation.js +61 -0
  170. package/dist/collection/components/vega-rich-text-editor/extensions/line-height/assets/line-height.js +3 -0
  171. package/dist/collection/components/vega-rich-text-editor/extensions/line-height/constants.js +11 -0
  172. package/dist/collection/components/vega-rich-text-editor/extensions/line-height/element-to-dto-strategies/line-height-annotation-handler.js +41 -0
  173. package/dist/collection/components/vega-rich-text-editor/extensions/line-height/element-to-dto-strategies/line-height-filter-styles-strategy.js +41 -0
  174. package/dist/collection/components/vega-rich-text-editor/extensions/line-height/element-to-dto-strategies/line-height-from-json-handler.js +65 -0
  175. package/dist/collection/components/vega-rich-text-editor/extensions/line-height/line-height-extension.js +44 -0
  176. package/dist/collection/components/vega-rich-text-editor/extensions/line-height/line-height-toolbar-button-renderer.js +131 -0
  177. package/dist/collection/components/vega-rich-text-editor/extensions/special-characters/constants/arrow-characters.js +24 -0
  178. package/dist/collection/components/vega-rich-text-editor/extensions/special-characters/constants/currency-characters.js +38 -0
  179. package/dist/collection/components/vega-rich-text-editor/extensions/special-characters/constants/default-categories.js +37 -0
  180. package/dist/collection/components/vega-rich-text-editor/extensions/special-characters/constants/latin-characters.js +130 -0
  181. package/dist/collection/components/vega-rich-text-editor/extensions/special-characters/constants/mathematical-characters.js +46 -0
  182. package/dist/collection/components/vega-rich-text-editor/extensions/special-characters/constants/text-characters.js +29 -0
  183. package/dist/collection/components/vega-rich-text-editor/extensions/special-characters/special-characters-extension.js +34 -0
  184. package/dist/collection/components/vega-rich-text-editor/extensions/special-characters/special-characters-icon.js +3 -0
  185. package/dist/collection/components/vega-rich-text-editor/extensions/special-characters/special-characters-toolbar-button-renderer.js +184 -0
  186. package/dist/collection/components/vega-rich-text-editor/extensions/special-characters/types.js +1 -0
  187. package/dist/collection/components/vega-rich-text-editor/extensions/special-characters/vega-rich-text-special-characters-panel/constants.js +11 -0
  188. package/dist/collection/components/vega-rich-text-editor/extensions/special-characters/vega-rich-text-special-characters-panel/slimmers/controllers/special-characters-panel-keyboard-controller.js +85 -0
  189. package/dist/collection/components/vega-rich-text-editor/extensions/special-characters/vega-rich-text-special-characters-panel/slimmers/renderers/special-characters-panel-renderer.js +210 -0
  190. package/dist/collection/components/vega-rich-text-editor/extensions/special-characters/vega-rich-text-special-characters-panel/vega-rich-text-special-characters-panel.css +66 -0
  191. package/dist/collection/components/vega-rich-text-editor/extensions/special-characters/vega-rich-text-special-characters-panel/vega-rich-text-special-characters-panel.js +174 -0
  192. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotation-handler/table-annotation-handler.js +1 -1
  193. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotation-handler/table-cell-annotation-handler.js +1 -1
  194. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotation-handler/table-head-cell-annotation-handler.js +1 -1
  195. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-block.js +2 -0
  196. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-body-block.js +2 -0
  197. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-caption-block.js +2 -0
  198. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-cell-block.js +2 -0
  199. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-head-block.js +2 -0
  200. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-head-cell-block.js +2 -0
  201. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-row-block.js +2 -0
  202. package/dist/collection/components/vega-rich-text-editor/extensions/table/filter-styles-strategies/table-block/table-block-filter-styles-strategy.js +1 -1
  203. package/dist/collection/components/vega-rich-text-editor/extensions/table/filter-styles-strategies/table-caption/table-caption-filter-styles-strategy.js +1 -1
  204. package/dist/collection/components/vega-rich-text-editor/extensions/table/filter-styles-strategies/table-cell/table-cell-filter-styles-strategy.js +1 -1
  205. package/dist/collection/components/vega-rich-text-editor/extensions/table/table-extension.js +4 -4
  206. package/dist/collection/components/vega-rich-text-editor/extensions/tokens/token-extension.js +5 -2
  207. package/dist/collection/components/vega-rich-text-editor/extensions/tokens/token-node.js +2 -0
  208. package/dist/collection/components/vega-rich-text-editor/extensions/type.js +1 -0
  209. package/dist/collection/components/vega-rich-text-editor/helpers/extension-context-manager.js +8 -2
  210. package/dist/collection/components/vega-rich-text-editor/public-api.js +4 -0
  211. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/bold-annotaion-handler.js +1 -1
  212. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/code-annotation-handler.js +1 -1
  213. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/color-annotation-handler.js +1 -1
  214. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/html-element-to-annotation-generator.js +3 -3
  215. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/image-alt-annotation-handler.js +1 -1
  216. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/image-size-annotation-handler.js +1 -1
  217. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/indent-annotation-handler.js +1 -1
  218. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/inline-html-annotation-handler.js +1 -1
  219. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/italic-annotation-handler.js +1 -1
  220. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/link-annotation-handler.js +1 -1
  221. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/strike-through-annotation-handler.js +1 -1
  222. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/text-align-annotation-handler.js +1 -1
  223. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/text-style-annotation-handler.js +1 -1
  224. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/underline-annotation-handler.js +1 -1
  225. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/history-controller.js +1 -0
  226. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/state-entity-rendering-registry.js +1 -1
  227. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/toolbar-renderer.js +14 -0
  228. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/redo-toolbar-button-slimmer.js +36 -0
  229. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/undo-toolbar-button-slimmer.js +36 -0
  230. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/vega-rich-text-editor-renderer.js +4 -1
  231. package/dist/collection/components/vega-rich-text-editor/vega-rich-text-editor.js +44 -0
  232. package/dist/collection/components/vega-section-title/slimmers/renderers/vega-section-title-renderer.js +1 -1
  233. package/dist/collection/components/vega-section-title/vega-section-title.js +2 -1
  234. package/dist/collection/components/vega-textarea/vega-textarea.js +35 -1
  235. package/dist/collection/constants/runtime-metrics-payload-definition/public-api/ThemeManager/runtime-metrics-payload-definition.js +30 -10
  236. package/dist/collection/constants/ui.js +1 -0
  237. package/dist/collection/global/scripts/before-vega-load.js +13 -0
  238. package/dist/collection/helpers/event-manager/event-id/component-event-id-map.js +2 -2
  239. package/dist/collection/helpers/event-manager/event-id/vega-event-id.js +1 -0
  240. package/dist/collection/helpers/slimmers/component-value-history-controller-slimmer.abstract.js +22 -2
  241. package/dist/collection/helpers/theme/controllers/action-color-accessibility-validator.js +34 -0
  242. package/dist/collection/helpers/theme/internal-theme-manager.js +39 -2
  243. package/dist/collection/helpers/theme/theme-manager.js +33 -2
  244. package/dist/collection/helpers/translation/locales/en.js +8 -0
  245. package/dist/esm/action-color-accessibility-validator-3d8efb64.js +1815 -0
  246. package/dist/esm/{app-globals-be458779.js → app-globals-98c3d676.js} +16 -7
  247. package/dist/esm/{child-nodes-event-prevent-slimmer-0a406a71.js → child-nodes-event-prevent-slimmer-2f823df2.js} +1 -1
  248. package/dist/esm/{code-block-ff52d912.js → code-block-6261a99d.js} +32 -14
  249. package/dist/esm/{component-value-history-controller-slimmer.abstract-ad5f29cd.js → component-value-history-controller-slimmer.abstract-07488472.js} +25 -5
  250. package/dist/esm/{content-state-6fccd284.js → content-state-9bf85e00.js} +66 -54
  251. package/dist/esm/{dark-mode-style-controller-e9a6b097.js → dark-mode-style-controller-fcda24ec.js} +40 -3
  252. package/dist/esm/{date-required-rule-70324452.js → date-required-rule-281aab50.js} +1 -1
  253. package/dist/esm/{design-token-0e6fb2c4.js → design-token-b7ce7ed4.js} +3 -3
  254. package/dist/esm/{element-appender-slimmer-afe5a638.js → element-appender-slimmer-3926470f.js} +2 -2
  255. package/dist/esm/{event-emit-slimmer-697ad0b7.js → event-emit-slimmer-0990037c.js} +1 -1
  256. package/dist/esm/{form-field-controller-slimmer-9e70a18d.js → form-field-controller-slimmer-24aca6c4.js} +1 -1
  257. package/dist/esm/{image-annotation-action-245eaa54.js → image-annotation-action-dadda36f.js} +4 -4
  258. package/dist/esm/index-090d31ca.js +4 -0
  259. package/dist/esm/index.js +18 -17
  260. package/dist/esm/{inject-keyboard-manager-05d5db90.js → inject-keyboard-manager-6317d1b3.js} +1 -1
  261. package/dist/esm/{internal-translation-controller-d8217d93.js → internal-translation-controller-0b9589d0.js} +8 -0
  262. package/dist/esm/{internal-vega-event-manager-1ac5ee9a.js → internal-vega-event-manager-dc4c3a37.js} +2 -2
  263. package/dist/esm/{keyboard-manager-26e2fc32.js → keyboard-manager-69761aa6.js} +1 -1
  264. package/dist/esm/{keyboard-manager-slimmer-012a9a9b.js → keyboard-manager-slimmer-c2d038f0.js} +1 -1
  265. package/dist/esm/loader.js +13 -12
  266. package/dist/esm/{month-view-generator-918f1f88.js → month-view-generator-4c1ee949.js} +1 -1
  267. package/dist/esm/{public-rules-22320bdf.js → public-rules-da28b413.js} +8 -8
  268. package/dist/esm/{range-76f8e7dd.js → range-342cbce9.js} +1 -1
  269. package/dist/esm/replace-selected-text-action-a45bee4b.js +18 -0
  270. package/dist/esm/{responsive-format-facade-2a1d6398.js → responsive-format-facade-3ca1422d.js} +1 -1
  271. package/dist/esm/{rich-text-editor-required-rule-6eb90840.js → rich-text-editor-required-rule-46d0bc5b.js} +1 -1
  272. package/dist/esm/{split-cell-operation-7652e813.js → split-cell-operation-1d114aa3.js} +79 -16
  273. package/dist/esm/{state-border-formatter-a243f3fc.js → state-border-formatter-3ebc76a4.js} +1 -1
  274. package/dist/esm/{string-format-strategy.abstract-f6625ed7.js → string-format-strategy.abstract-95d691e1.js} +1 -1
  275. package/dist/esm/{string-input-formatter-slimmer-e801bd7e.js → string-input-formatter-slimmer-e18d202c.js} +1 -1
  276. package/dist/esm/{string-mask-strategy-53cb9b33.js → string-mask-strategy-43d846ac.js} +2 -2
  277. package/dist/esm/{style-formatter-a622a045.js → style-formatter-197e2fd3.js} +2 -2
  278. package/dist/esm/{time-required-rule-2fd8df50.js → time-required-rule-78d8ecf1.js} +1 -1
  279. package/dist/esm/{token-extension-5838c71b.js → token-extension-30011dc4.js} +1128 -27
  280. package/dist/esm/{translation-slimmer-32353a1c.js → translation-slimmer-49903fc8.js} +1 -1
  281. package/dist/esm/{type-guard-ed1004cc.js → type-guard-b18807dc.js} +1 -1
  282. package/dist/esm/{valid-credit-card-number-rule-7c9d6808.js → valid-credit-card-number-rule-fe1c8a9c.js} +1 -1
  283. package/dist/esm/vega-accordion.entry.js +22 -15
  284. package/dist/esm/vega-app-footer.entry.js +1 -1
  285. package/dist/esm/vega-app-header-button.entry.js +9 -9
  286. package/dist/esm/vega-banner.entry.js +3 -3
  287. package/dist/esm/vega-box.entry.js +6 -6
  288. package/dist/esm/vega-brand-logo.entry.js +1 -1
  289. package/dist/esm/vega-breadcrumb.entry.js +4 -4
  290. package/dist/esm/vega-button-circle.entry.js +9 -9
  291. package/dist/esm/vega-button-group_2.entry.js +4 -4
  292. package/dist/esm/vega-button-link.entry.js +4 -4
  293. package/dist/esm/vega-button.entry.js +7 -7
  294. package/dist/esm/vega-calendar_4.entry.js +10 -10
  295. package/dist/esm/vega-card.entry.js +5 -5
  296. package/dist/esm/vega-carousel.entry.js +6 -6
  297. package/dist/esm/vega-checkbox_2.entry.js +6 -6
  298. package/dist/esm/vega-chip.entry.js +9 -9
  299. package/dist/esm/vega-code-block.entry.js +16 -15
  300. package/dist/esm/vega-color-picker.entry.js +5 -5
  301. package/dist/esm/vega-color-swatch-picker.entry.js +7 -7
  302. package/dist/esm/vega-color-swatch.entry.js +5 -5
  303. package/dist/esm/vega-combo-box.entry.js +23 -10
  304. package/dist/esm/vega-date-picker_2.entry.js +327 -267
  305. package/dist/esm/vega-dialog_2.entry.js +7 -7
  306. package/dist/esm/vega-divider.entry.js +5 -5
  307. package/dist/esm/vega-dropdown_5.entry.js +11 -11
  308. package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
  309. package/dist/esm/{vega-event-id-578c6c6d.js → vega-event-id-20494454.js} +2 -1
  310. package/dist/esm/vega-field-label.entry.js +22 -5
  311. package/dist/esm/vega-file-uploader.entry.js +20 -7
  312. package/dist/esm/vega-flag-icon.entry.js +5 -5
  313. package/dist/esm/vega-flex.entry.js +6 -6
  314. package/dist/esm/vega-font.entry.js +5 -5
  315. package/dist/esm/vega-form.entry.js +7 -7
  316. package/dist/esm/vega-grid.entry.js +5 -5
  317. package/dist/esm/vega-icon.entry.js +5 -5
  318. package/dist/esm/vega-image-uploader.entry.js +10 -10
  319. package/dist/esm/vega-input-credit-card.entry.js +10 -10
  320. package/dist/esm/vega-input-numeric.entry.js +9 -9
  321. package/dist/esm/vega-input-passcode.entry.js +23 -10
  322. package/dist/esm/vega-input-phone-number.entry.js +22 -9
  323. package/dist/esm/vega-input-range.entry.js +7 -7
  324. package/dist/esm/vega-input-select.entry.js +9 -9
  325. package/dist/esm/vega-input.entry.js +23 -10
  326. package/dist/esm/vega-item-toggle.entry.js +3 -3
  327. package/dist/esm/vega-left-nav_5.entry.js +11 -11
  328. package/dist/esm/vega-loader-wrapper_2.entry.js +3 -3
  329. package/dist/esm/vega-page-notification_2.entry.js +1 -1
  330. package/dist/esm/vega-pagination-page-selector-mobile.entry.js +3 -3
  331. package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +3 -3
  332. package/dist/esm/vega-pagination.entry.js +8 -8
  333. package/dist/esm/vega-popover_2.entry.js +11 -11
  334. package/dist/esm/vega-progress-tracker_2.entry.js +6 -6
  335. package/dist/esm/vega-radio_2.entry.js +9 -9
  336. package/dist/esm/vega-rich-text-content.entry.js +7 -7
  337. package/dist/esm/vega-rich-text-editor_4.entry.js +285 -189
  338. package/dist/esm/vega-rich-text-special-characters-panel.entry.js +396 -0
  339. package/dist/esm/vega-rich-text-table-properties_3.entry.js +12 -12
  340. package/dist/esm/vega-section-title.entry.js +3 -2
  341. package/dist/esm/vega-segment-control.entry.js +3 -3
  342. package/dist/esm/vega-selection-chip_2.entry.js +8 -8
  343. package/dist/esm/vega-selection-tile_2.entry.js +6 -6
  344. package/dist/esm/vega-sidenav_3.entry.js +6 -6
  345. package/dist/esm/vega-signature-capture.entry.js +10 -10
  346. package/dist/esm/vega-stepper.entry.js +6 -6
  347. package/dist/esm/vega-tab-group_2.entry.js +4 -4
  348. package/dist/esm/vega-table_11.entry.js +8 -8
  349. package/dist/esm/vega-textarea.entry.js +17 -7
  350. package/dist/esm/vega-time-picker_2.entry.js +13 -13
  351. package/dist/esm/vega-toggle-switch.entry.js +5 -5
  352. package/dist/esm/vega-tooltip_2.entry.js +6 -6
  353. package/dist/esm/vega.js +13 -12
  354. package/dist/sri/vega-sri-manifest.json +363 -351
  355. package/dist/types/components/vega-accordion/slimmers/vega-accordion-renderer.d.ts +1 -0
  356. package/dist/types/components/vega-accordion/vega-accordion.d.ts +14 -0
  357. package/dist/types/components/vega-code-block/vega-code-block.d.ts +1 -0
  358. package/dist/types/components/vega-combo-box/slimmers/renderers/vega-combo-box-renderer.d.ts +1 -0
  359. package/dist/types/components/vega-combo-box/vega-combo-box.d.ts +10 -0
  360. package/dist/types/components/vega-date-picker/vega-date-picker-calendar/slimmers/controllers/vega-date-picker-calendar-size-controller.d.ts +20 -0
  361. package/dist/types/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-calendar-header-render.d.ts +2 -1
  362. package/dist/types/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-calendar-year-month-switcher-renderer.d.ts +1 -1
  363. package/dist/types/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-month-item-renderer.d.ts +0 -1
  364. package/dist/types/components/vega-date-picker/vega-date-picker-calendar/vega-date-picker-calendar.d.ts +22 -2
  365. package/dist/types/components/vega-field-label/vega-field-label.d.ts +12 -0
  366. package/dist/types/components/vega-file-uploader/slimmers/renderers/vega-file-uploader-renderer.d.ts +1 -0
  367. package/dist/types/components/vega-file-uploader/vega-file-uploader.d.ts +10 -0
  368. package/dist/types/components/vega-input/slimmers/renderers/vega-input-renderer.d.ts +1 -0
  369. package/dist/types/components/vega-input/vega-input.d.ts +10 -0
  370. package/dist/types/components/vega-input-passcode/slimmers/renderers/vega-input-passcode-renderer.d.ts +1 -0
  371. package/dist/types/components/vega-input-passcode/vega-input-passcode.d.ts +10 -0
  372. package/dist/types/components/vega-input-phone-number/slimmers/renderers/vega-input-phone-number-renderer.d.ts +1 -0
  373. package/dist/types/components/vega-input-phone-number/vega-input-phone-number.d.ts +10 -0
  374. package/dist/types/components/vega-rich-text-editor/assets/redo.d.ts +3 -0
  375. package/dist/types/components/vega-rich-text-editor/assets/undo.d.ts +3 -0
  376. package/dist/types/components/vega-rich-text-editor/dto/annotations/annotation-style.d.ts +1 -1
  377. package/dist/types/components/vega-rich-text-editor/dto/blocks/block.abstract.d.ts +5 -0
  378. package/dist/types/components/vega-rich-text-editor/dto/blocks/code-block.d.ts +2 -0
  379. package/dist/types/components/vega-rich-text-editor/dto/blocks/html-block.d.ts +2 -0
  380. package/dist/types/components/vega-rich-text-editor/dto/blocks/image-block.d.ts +2 -0
  381. package/dist/types/components/vega-rich-text-editor/dto/blocks/list-block.d.ts +2 -0
  382. package/dist/types/components/vega-rich-text-editor/dto/blocks/list-item-block.d.ts +2 -0
  383. package/dist/types/components/vega-rich-text-editor/dto/blocks/text-block.d.ts +2 -0
  384. package/dist/types/components/vega-rich-text-editor/dto/content-state.d.ts +3 -0
  385. package/dist/types/components/vega-rich-text-editor/dto/nodes/code-block-node.d.ts +2 -0
  386. package/dist/types/components/vega-rich-text-editor/dto/nodes/image-node.d.ts +2 -0
  387. package/dist/types/components/vega-rich-text-editor/dto/nodes/node.abstract.d.ts +5 -0
  388. package/dist/types/components/vega-rich-text-editor/dto/nodes/text-node.d.ts +2 -0
  389. package/dist/types/components/vega-rich-text-editor/extensions/base-toolbar-button-renderer.d.ts +31 -0
  390. package/dist/types/components/vega-rich-text-editor/extensions/extension.abstract.d.ts +19 -0
  391. package/dist/types/components/vega-rich-text-editor/extensions/functions/dto/function-block.d.ts +2 -0
  392. package/dist/types/components/vega-rich-text-editor/extensions/functions/dto/logic-control-block.d.ts +2 -0
  393. package/dist/types/components/vega-rich-text-editor/extensions/functions/dto/logic-control-node.d.ts +2 -0
  394. package/dist/types/components/vega-rich-text-editor/extensions/functions/function-extension.d.ts +2 -1
  395. package/dist/types/components/vega-rich-text-editor/extensions/line-height/action-handler-strategies/block-update-line-height-strategy.d.ts +18 -0
  396. package/dist/types/components/vega-rich-text-editor/extensions/line-height/actions/line-height-annotation-action.d.ts +16 -0
  397. package/dist/types/components/vega-rich-text-editor/extensions/line-height/annotations/line-height-annotation.d.ts +46 -0
  398. package/dist/types/components/vega-rich-text-editor/extensions/line-height/assets/line-height.d.ts +3 -0
  399. package/dist/types/components/vega-rich-text-editor/extensions/line-height/constants.d.ts +6 -0
  400. package/dist/types/components/vega-rich-text-editor/extensions/line-height/element-to-dto-strategies/line-height-annotation-handler.d.ts +23 -0
  401. package/dist/types/components/vega-rich-text-editor/extensions/line-height/element-to-dto-strategies/line-height-filter-styles-strategy.d.ts +26 -0
  402. package/dist/types/components/vega-rich-text-editor/extensions/line-height/element-to-dto-strategies/line-height-from-json-handler.d.ts +17 -0
  403. package/dist/types/components/vega-rich-text-editor/extensions/line-height/line-height-extension.d.ts +19 -0
  404. package/dist/types/components/vega-rich-text-editor/extensions/line-height/line-height-toolbar-button-renderer.d.ts +44 -0
  405. package/dist/types/components/vega-rich-text-editor/extensions/special-characters/constants/arrow-characters.d.ts +2 -0
  406. package/dist/types/components/vega-rich-text-editor/extensions/special-characters/constants/currency-characters.d.ts +2 -0
  407. package/dist/types/components/vega-rich-text-editor/extensions/special-characters/constants/default-categories.d.ts +7 -0
  408. package/dist/types/components/vega-rich-text-editor/extensions/special-characters/constants/latin-characters.d.ts +2 -0
  409. package/dist/types/components/vega-rich-text-editor/extensions/special-characters/constants/mathematical-characters.d.ts +2 -0
  410. package/dist/types/components/vega-rich-text-editor/extensions/special-characters/constants/text-characters.d.ts +2 -0
  411. package/dist/types/components/vega-rich-text-editor/extensions/special-characters/special-characters-extension.d.ts +20 -0
  412. package/dist/types/components/vega-rich-text-editor/extensions/special-characters/special-characters-icon.d.ts +3 -0
  413. package/dist/types/components/vega-rich-text-editor/extensions/special-characters/special-characters-toolbar-button-renderer.d.ts +83 -0
  414. package/dist/types/components/vega-rich-text-editor/extensions/special-characters/types.d.ts +20 -0
  415. package/dist/types/components/vega-rich-text-editor/extensions/special-characters/vega-rich-text-special-characters-panel/constants.d.ts +11 -0
  416. package/dist/types/components/vega-rich-text-editor/extensions/special-characters/vega-rich-text-special-characters-panel/slimmers/controllers/special-characters-panel-keyboard-controller.d.ts +18 -0
  417. package/dist/types/components/vega-rich-text-editor/extensions/special-characters/vega-rich-text-special-characters-panel/slimmers/renderers/special-characters-panel-renderer.d.ts +66 -0
  418. package/dist/types/components/vega-rich-text-editor/extensions/special-characters/vega-rich-text-special-characters-panel/vega-rich-text-special-characters-panel.d.ts +58 -0
  419. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-block.d.ts +2 -0
  420. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-body-block.d.ts +2 -0
  421. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-caption-block.d.ts +2 -0
  422. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-cell-block.d.ts +2 -0
  423. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-head-block.d.ts +2 -0
  424. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-head-cell-block.d.ts +2 -0
  425. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-row-block.d.ts +2 -0
  426. package/dist/types/components/vega-rich-text-editor/extensions/tokens/token-extension.d.ts +3 -1
  427. package/dist/types/components/vega-rich-text-editor/extensions/tokens/token-node.d.ts +2 -0
  428. package/dist/types/components/vega-rich-text-editor/extensions/type.d.ts +14 -0
  429. package/dist/types/components/vega-rich-text-editor/helpers/extension-context-manager.d.ts +1 -1
  430. package/dist/types/components/vega-rich-text-editor/interface.d.ts +8 -0
  431. package/dist/types/components/vega-rich-text-editor/public-api.d.ts +5 -0
  432. package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/html-element-to-annotation-generator.d.ts +3 -1
  433. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/toolbar-renderer.d.ts +3 -0
  434. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/redo-toolbar-button-slimmer.d.ts +9 -0
  435. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/undo-toolbar-button-slimmer.d.ts +9 -0
  436. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/vega-rich-text-editor-renderer.d.ts +1 -0
  437. package/dist/types/components/vega-rich-text-editor/vega-rich-text-editor.d.ts +14 -0
  438. package/dist/types/components/vega-textarea/vega-textarea.d.ts +10 -0
  439. package/dist/types/components.d.ts +169 -5
  440. package/dist/types/constants/ui.d.ts +1 -1
  441. package/dist/types/helpers/event-manager/event-id/vega-event-id.d.ts +1 -0
  442. package/dist/types/helpers/slimmers/component-value-history-controller-slimmer.abstract.d.ts +13 -0
  443. package/dist/types/helpers/theme/controllers/action-color-accessibility-validator.d.ts +10 -0
  444. package/dist/types/helpers/theme/internal-theme-manager.d.ts +28 -1
  445. package/dist/types/helpers/theme/theme-manager.d.ts +24 -1
  446. package/dist/types/helpers/theme/theme.d.ts +8 -0
  447. package/dist/types/helpers/translation/interface.d.ts +10 -1
  448. package/dist/types/types/components.type.d.ts +11 -10
  449. package/dist/types/types/public-api.d.ts +1 -0
  450. package/dist/types/vega-color-token-contrast-checker/src/check/checker.d.ts +177 -0
  451. package/dist/types/vega-color-token-contrast-checker/src/check/color-math.d.ts +125 -0
  452. package/dist/types/vega-color-token-contrast-checker/src/check/contrast-check-strategy.d.ts +38 -0
  453. package/dist/types/vega-color-token-contrast-checker/src/check/search.d.ts +58 -0
  454. package/dist/types/vega-color-token-contrast-checker/src/check/token-checks.d.ts +122 -0
  455. package/dist/types/vega-color-token-contrast-checker/src/check/token-checks.generated.d.ts +2 -0
  456. package/dist/types/vega-color-token-contrast-checker/src/index.d.ts +2 -0
  457. package/dist/vega/index.esm.js +1 -1
  458. package/dist/vega/{p-636d890e.entry.js → p-01f617ee.entry.js} +1 -1
  459. package/dist/vega/{p-fdb97cb7.entry.js → p-03b32939.entry.js} +1 -1
  460. package/dist/vega/{p-2927b7a1.js → p-05dc6718.js} +1 -1
  461. package/dist/vega/{p-72e2a587.js → p-0b2ca33b.js} +1 -1
  462. package/dist/vega/p-0c460945.js +1 -0
  463. package/dist/vega/{p-d286da1d.entry.js → p-0d248322.entry.js} +1 -1
  464. package/dist/vega/{p-2b2fefc6.js → p-0d3830f1.js} +1 -1
  465. package/dist/vega/{p-c45acdc3.entry.js → p-0dafd071.entry.js} +1 -1
  466. package/dist/vega/{p-a67d52ce.entry.js → p-0edf9c6e.entry.js} +1 -1
  467. package/dist/vega/{p-a03341d8.entry.js → p-1385da31.entry.js} +1 -1
  468. package/dist/vega/{p-d1a6e126.entry.js → p-18d1d404.entry.js} +1 -1
  469. package/dist/vega/{p-aa8f4713.entry.js → p-1d752c37.entry.js} +1 -1
  470. package/dist/vega/p-1f563387.js +1 -0
  471. package/dist/vega/{p-e85497ec.entry.js → p-296c90bd.entry.js} +1 -1
  472. package/dist/vega/p-30f76962.js +3 -0
  473. package/dist/vega/p-3186995a.entry.js +1 -0
  474. package/dist/vega/p-3312e3dd.js +1 -0
  475. package/dist/vega/{p-a0dd08b1.js → p-36e46c4f.js} +1 -1
  476. package/dist/vega/p-36f3dd19.entry.js +1 -0
  477. package/dist/vega/{p-d5aad9f0.entry.js → p-3ab50c06.entry.js} +1 -1
  478. package/dist/vega/{p-31ebace1.js → p-3d6568cc.js} +1 -1
  479. package/dist/vega/{p-19df2831.entry.js → p-3e2e4b00.entry.js} +1 -1
  480. package/dist/vega/{p-ff5208f5.entry.js → p-416e89b0.entry.js} +1 -1
  481. package/dist/vega/{p-79bb216e.entry.js → p-4914a5f8.entry.js} +1 -1
  482. package/dist/vega/{p-ac26924d.entry.js → p-4f53b45d.entry.js} +1 -1
  483. package/dist/vega/p-50958342.js +1 -0
  484. package/dist/vega/{p-2d694684.js → p-518e0a24.js} +1 -1
  485. package/dist/vega/p-540bd78a.entry.js +1 -0
  486. package/dist/vega/p-5424e837.js +1 -0
  487. package/dist/vega/p-54ed506c.entry.js +1 -0
  488. package/dist/vega/{p-7e7e2f85.entry.js → p-5a960f83.entry.js} +1 -1
  489. package/dist/vega/{p-879d3cc9.entry.js → p-5c1a4fd7.entry.js} +1 -1
  490. package/dist/vega/{p-5b43a303.entry.js → p-5c8522eb.entry.js} +1 -1
  491. package/dist/vega/p-5f377954.js +1 -1
  492. package/dist/vega/{p-0b41b49a.entry.js → p-6205288e.entry.js} +1 -1
  493. package/dist/vega/{p-04a65b3f.js → p-6629a68b.js} +1 -1
  494. package/dist/vega/p-696d7b8f.js +1 -0
  495. package/dist/vega/{p-931dac8c.entry.js → p-6ab23e89.entry.js} +1 -1
  496. package/dist/vega/{p-154cc614.js → p-6bd37d32.js} +1 -1
  497. package/dist/vega/{p-ce034372.entry.js → p-6be01c6b.entry.js} +1 -1
  498. package/dist/vega/{p-294cff20.entry.js → p-70e0c3eb.entry.js} +1 -1
  499. package/dist/vega/{p-4a9c8ec0.entry.js → p-7168ef16.entry.js} +1 -1
  500. package/dist/vega/{p-ab04eff6.js → p-7292ac20.js} +1 -1
  501. package/dist/vega/p-7348a091.entry.js +1 -0
  502. package/dist/vega/{p-19adf714.js → p-788ada42.js} +1 -1
  503. package/dist/vega/p-7cd8d054.entry.js +1 -0
  504. package/dist/vega/{p-bee5dfb0.entry.js → p-7dcc0b23.entry.js} +1 -1
  505. package/dist/vega/{p-189d36ec.js → p-81d55efd.js} +1 -1
  506. package/dist/vega/{p-8077b117.js → p-8ee917b4.js} +1 -1
  507. package/dist/vega/{p-52645382.entry.js → p-92468c30.entry.js} +1 -1
  508. package/dist/vega/{p-3a3720c7.entry.js → p-92710213.entry.js} +1 -1
  509. package/dist/vega/{p-e8de9535.js → p-9c48e4e5.js} +1 -1
  510. package/dist/vega/{p-891815d6.js → p-9f03856e.js} +1 -1
  511. package/dist/vega/{p-7ffe8081.entry.js → p-a0dd5273.entry.js} +1 -1
  512. package/dist/vega/p-a0fa5ccc.entry.js +1 -0
  513. package/dist/vega/{p-4a954d9d.entry.js → p-a32ad1ac.entry.js} +1 -1
  514. package/dist/vega/{p-01a54c29.entry.js → p-a36d4199.entry.js} +1 -1
  515. package/dist/vega/{p-d97974be.entry.js → p-a53e1a60.entry.js} +1 -1
  516. package/dist/vega/{p-d4262f06.entry.js → p-a73d8915.entry.js} +1 -1
  517. package/dist/vega/{p-07225567.entry.js → p-a87bc75a.entry.js} +1 -1
  518. package/dist/vega/{p-09076646.js → p-abfe46ca.js} +1 -1
  519. package/dist/vega/p-ad815280.js +1 -0
  520. package/dist/vega/p-b0fb5099.entry.js +1 -0
  521. package/dist/vega/{p-d05915af.entry.js → p-b218141f.entry.js} +1 -1
  522. package/dist/vega/{p-e7c930d9.entry.js → p-b2a0d104.entry.js} +1 -1
  523. package/dist/vega/{p-3bf3c8bb.entry.js → p-b31802b3.entry.js} +1 -1
  524. package/dist/vega/{p-255a7387.entry.js → p-b3e97e2f.entry.js} +1 -1
  525. package/dist/vega/{p-15b4f1ce.entry.js → p-b519b9ab.entry.js} +1 -1
  526. package/dist/vega/{p-8aee6b74.js → p-b565a6a5.js} +1 -1
  527. package/dist/vega/{p-2e0bdc53.entry.js → p-b5a3de00.entry.js} +1 -1
  528. package/dist/vega/p-b5d00d38.entry.js +1 -0
  529. package/dist/vega/p-b72d7b57.entry.js +1 -0
  530. package/dist/vega/{p-f5ae99b4.entry.js → p-b7f30f68.entry.js} +1 -1
  531. package/dist/vega/p-b857a661.js +1 -0
  532. package/dist/vega/{p-d9d4bdbf.entry.js → p-ba4f23d8.entry.js} +1 -1
  533. package/dist/vega/{p-5df7ab03.entry.js → p-c0c13993.entry.js} +1 -1
  534. package/dist/vega/p-c4675cd2.entry.js +1 -0
  535. package/dist/vega/p-c51e3b9e.js +1 -0
  536. package/dist/vega/{p-bd47d8a7.entry.js → p-c6201e76.entry.js} +1 -1
  537. package/dist/vega/p-c84aa55a.js +1 -0
  538. package/dist/vega/{p-858ec529.js → p-c93dfe23.js} +1 -1
  539. package/dist/vega/p-cacec680.js +1 -0
  540. package/dist/vega/{p-186df871.entry.js → p-cd382652.entry.js} +1 -1
  541. package/dist/vega/{p-49341532.entry.js → p-cdd3af89.entry.js} +1 -1
  542. package/dist/vega/{p-ec663f00.entry.js → p-ce8a0aa6.entry.js} +1 -1
  543. package/dist/vega/{p-648be36d.entry.js → p-cf5c6172.entry.js} +1 -1
  544. package/dist/vega/{p-0a322971.entry.js → p-d1641644.entry.js} +1 -1
  545. package/dist/vega/p-d2237b95.entry.js +1 -0
  546. package/dist/vega/{p-76075a1c.entry.js → p-d24892d6.entry.js} +1 -1
  547. package/dist/vega/p-d25ca0c3.entry.js +1 -0
  548. package/dist/vega/{p-b69755c7.entry.js → p-d8591207.entry.js} +1 -1
  549. package/dist/vega/p-da42fde0.js +1 -0
  550. package/dist/vega/{p-aa4e9a4b.entry.js → p-dc0f7ef1.entry.js} +1 -1
  551. package/dist/vega/{p-70ae9157.entry.js → p-dcd3b421.entry.js} +1 -1
  552. package/dist/vega/{p-c19132c9.entry.js → p-df4f9264.entry.js} +1 -1
  553. package/dist/vega/p-e5726df7.entry.js +1 -0
  554. package/dist/vega/{p-4c91b13d.js → p-e7fb7eee.js} +1 -1
  555. package/dist/vega/{p-98dad153.entry.js → p-ea4b5520.entry.js} +1 -1
  556. package/dist/vega/p-ecbead18.entry.js +1 -0
  557. package/dist/vega/{p-b02b985d.js → p-f0d70de3.js} +1 -1
  558. package/dist/vega/{p-78ba7ca9.js → p-f7ad9349.js} +1 -1
  559. package/dist/vega/{p-a6565e02.js → p-fdf6f368.js} +1 -1
  560. package/dist/vega/{p-0a261b66.js → p-fea75b87.js} +1 -1
  561. package/dist/vega/{p-296c5e52.js → p-ffda64ac.js} +1 -1
  562. package/dist/vega/{p-74a1a82a.entry.js → p-ffe8a826.entry.js} +1 -1
  563. package/dist/vega/vega.esm.js +1 -1
  564. package/package.json +3 -2
  565. package/dist/vega/p-042933f1.js +0 -1
  566. package/dist/vega/p-0d97dcb9.js +0 -1
  567. package/dist/vega/p-1da42a63.entry.js +0 -1
  568. package/dist/vega/p-281fa1e0.js +0 -1
  569. package/dist/vega/p-32a0f887.js +0 -1
  570. package/dist/vega/p-4a6f241d.entry.js +0 -1
  571. package/dist/vega/p-4dd02704.js +0 -1
  572. package/dist/vega/p-50fb936f.entry.js +0 -1
  573. package/dist/vega/p-612808ce.entry.js +0 -1
  574. package/dist/vega/p-6399b5ed.js +0 -1
  575. package/dist/vega/p-686e0b6b.entry.js +0 -1
  576. package/dist/vega/p-6d4faebc.js +0 -1
  577. package/dist/vega/p-88e56a47.entry.js +0 -1
  578. package/dist/vega/p-8d36afcc.entry.js +0 -1
  579. package/dist/vega/p-979a5e91.entry.js +0 -1
  580. package/dist/vega/p-a2b8d49d.js +0 -1
  581. package/dist/vega/p-ab4c307b.js +0 -1
  582. package/dist/vega/p-ce2d9efe.entry.js +0 -1
  583. package/dist/vega/p-e46a23fc.entry.js +0 -1
  584. package/dist/vega/p-e8ea3b16.js +0 -3
  585. package/dist/vega/p-ea0e922f.entry.js +0 -1
  586. package/dist/vega/p-ec2333f7.entry.js +0 -1
  587. package/dist/vega/p-ed2b0e01.entry.js +0 -1
  588. package/dist/vega/p-ef13b346.js +0 -1
  589. package/dist/vega/p-fe220f3a.entry.js +0 -1
@@ -5,26 +5,27 @@ import { I as InjectVegaTelemetrySlimmer, c as createPublicAPIRuntimeMetricsSlim
5
5
  import { I as InternalVegaZIndexManager } from './internal-vega-z-index-manager-7d2b54c3.js';
6
6
  import { c as createDynamicSlimmer } from './dynamic-slimmer-90b8af32.js';
7
7
  import { P as PageResizeObserverSlimmer } from './page-resize-observer-slimmer-e24d36c5.js';
8
- import { i as internalVegaEventManager } from './internal-vega-event-manager-1ac5ee9a.js';
9
- import { V as VegaInternalTranslation } from './internal-translation-controller-d8217d93.js';
10
- import { R as RTEDTOActionStrategyManager, E as ElementToDTOClassStrategyManager, h as htmlElementToAnnotationGenerator, U as UpdateCursorPositionAction, V as VegaRTEContent, B as BlockToRTEBlockStrategyAbstract, a as ElementToDTOStrategy, I as InsertNewParagraphAction, b as RTEImageBlock, c as InsertChildrenBeforeStrategy, P as PasteContentStrategy, A as AnnotationGeneratorStrategyAbstract, d as RTEListItemBlock } from './content-state-6fccd284.js';
11
- import { s as stateEntityRenderingRegistry, A as ActionHandleStrategyRegistry, a as ActionHandlerInterceptorRegistry, R as RTEFilterStylesStrategyRegistry, b as RTEDTOClassManager, M as ModifyContentAction, c as RTETextNode, d as RTEBlock, e as RTETextBlock, f as RTEAnnotationStyle, g as ActionHandleStrategy, I as InsertChildrenAfterAction, h as AppendChildrenAction, i as RTENode, j as InsertChildrenBeforeAction, k as InternalAnnotationTypeEnum, l as ModifyContentActionType, B as BlockAnnotation, m as AnnotationAction, n as RemoveChildrenAction, C as CommonAnnotationTypeEnum, o as CustomAttributeAnnotation, p as RTEFilterStylesStrategy } from './code-block-ff52d912.js';
12
- import { i as isNonNullable } from './type-guard-ed1004cc.js';
8
+ import { i as internalVegaEventManager } from './internal-vega-event-manager-dc4c3a37.js';
9
+ import { V as VegaInternalTranslation } from './internal-translation-controller-0b9589d0.js';
10
+ import { R as RTEDTOActionStrategyManager, E as ElementToDTOClassStrategyManager, h as htmlElementToAnnotationGenerator, U as UpdateCursorPositionAction, V as VegaRTEContent, B as BlockToRTEBlockStrategyAbstract, a as ElementToDTOStrategy, I as InsertNewParagraphAction, b as RTEImageBlock, c as InsertChildrenBeforeStrategy, P as PasteContentStrategy, A as AnnotationGeneratorStrategyAbstract, d as RTEListItemBlock } from './content-state-9bf85e00.js';
11
+ import { s as stateEntityRenderingRegistry, A as ActionHandleStrategyRegistry, a as ActionHandlerInterceptorRegistry, R as RTEFilterStylesStrategyRegistry, b as RTEDTOClassManager, M as ModifyContentAction, c as RTETextNode, d as RTEBlock, e as RTETextBlock, f as RTEAnnotationStyle, g as ActionHandleStrategy, I as InsertChildrenAfterAction, h as AppendChildrenAction, i as RTENode, j as InsertChildrenBeforeAction, k as InternalAnnotationTypeEnum, l as ModifyContentActionType, B as BlockAnnotation, m as AnnotationAction, n as RemoveChildrenAction, C as CommonAnnotationTypeEnum, o as CustomAttributeAnnotation, p as RTEFilterStylesStrategy, U as UpdateTextAction, N as NodeAnnotationTypeEnum, q as RTECodeBlock, r as CustomStyleAnnotation } from './code-block-6261a99d.js';
12
+ import { i as isNonNullable } from './type-guard-b18807dc.js';
13
13
  import { R as RTEDTORendererManager } from './dto-renderer-manager-abc7eb5f.js';
14
14
  import { V as VegaRTEBaseRenderer } from './base-renderer-101f6d04.js';
15
15
  import { V as VegaInternalIconManager } from './internal-icon-manager-276f968f.js';
16
16
  import { v as vegaNonceManager } from './vega-nonce-manager-497e5eb5.js';
17
17
  import { D as DomNodeSubjectObserverFactory, d as domNodeSubjectFactory } from './dom-node-subject-observer-factory-3897e95b.js';
18
- import { V as VegaDropdownClick, a as VegaClick, b as VegaPopoverHide, c as VegaPopoverShow } from './vega-event-id-578c6c6d.js';
19
- import { R as RTETableExtensionAnnotationTypeEnum, a as RTE_TABLE_HEAD_DEFAULT_BACKGROUND_COLOR, S as SettingEventHandler, T as TableSettingType, b as RTETableAnnotation, c as RTETableCellAnnotation, d as RTETableHeadCellBlock, e as RowOperationEventHandler, C as ColumnOperationEventHandler, M as MergeCellsOperationEventHandler, f as SplitCellOperationEventHandler, g as RTETableColorManager, h as RTETableBlock, i as generateTableBody, j as RTETableCellBlock, k as RTETableHeadBlock, l as RTETableBodyBlock, m as getParentBlockByType, n as RTETableHeadCellAnnotation, o as TableColumnStrategy, p as getAllTableRows, q as buildTableGrid, s as setSpanAttributes, r as findCellBlockById, t as getDefaultCellBlockTemplate, I as InsertTableColumnDirection, u as buildCellStartColumnMap, v as getTableColumnCount, w as getFirstNode, x as getCellSpan, y as createNewCell, z as MergeCellsOperationType, A as RTETableRowBlock, B as getActualColumnPosition, D as InsertTableRowDirection, E as RTE_TABLE_DEFAULT_COLORS, F as INSERT_TABLE_ROW_INTO_DIFFERENT_SECTION, G as INSERT_TABLE_ROW_INTO_SAME_SECTION, H as DELETE_TABLE_ROW, J as TOGGLE_HEADER_ROW, K as INSERT_TABLE_COLUMN, L as DELETE_TABLE_COLUMN, N as TOGGLE_HEADER_TABLE_COLUMN, O as ToggleHeaderTableColumnStrategy, P as SPLIT_TABLE_CELL, Q as REPLACE_TABLE_CELL, U as SPLIT_CELL_HORIZONTALLY, W as SPLIT_CELL_VERTICALLY, X as SELECT_TABLE_COLUMN, Y as MERGE_CELLS } from './split-cell-operation-7652e813.js';
18
+ import { V as VegaDropdownClick, a as VegaClick, b as VegaPopoverHide, c as VegaPopoverShow } from './vega-event-id-20494454.js';
19
+ import { R as RTETableExtensionAnnotationTypeEnum, a as RTE_TABLE_HEAD_DEFAULT_BACKGROUND_COLOR, S as SettingEventHandler, T as TableSettingType, b as RTETableAnnotation, c as RTETableCellAnnotation, d as RTETableHeadCellBlock, e as RowOperationEventHandler, C as ColumnOperationEventHandler, M as MergeCellsOperationEventHandler, f as SplitCellOperationEventHandler, g as RTETableColorManager, h as RTETableBlock, i as generateTableBody, j as RTETableCellBlock, k as RTETableHeadBlock, l as RTETableBodyBlock, m as getParentBlockByType, n as RTETableHeadCellAnnotation, o as TableColumnStrategy, p as getAllTableRows, q as buildTableGrid, s as setSpanAttributes, r as findCellBlockById, t as getDefaultCellBlockTemplate, I as InsertTableColumnDirection, u as buildCellStartColumnMap, v as getTableColumnCount, w as getFirstNode, x as getCellSpan, y as createNewCell, z as MergeCellsOperationType, A as RTETableRowBlock, B as getActualColumnPosition, D as InsertTableRowDirection, E as RTE_TABLE_DEFAULT_COLORS, F as INSERT_TABLE_ROW_INTO_DIFFERENT_SECTION, G as INSERT_TABLE_ROW_INTO_SAME_SECTION, H as DELETE_TABLE_ROW, J as TOGGLE_HEADER_ROW, K as INSERT_TABLE_COLUMN, L as DELETE_TABLE_COLUMN, N as TOGGLE_HEADER_TABLE_COLUMN, O as ToggleHeaderTableColumnStrategy, P as SPLIT_TABLE_CELL, Q as REPLACE_TABLE_CELL, U as SPLIT_CELL_HORIZONTALLY, W as SPLIT_CELL_VERTICALLY, X as SELECT_TABLE_COLUMN, Y as MERGE_CELLS } from './split-cell-operation-1d114aa3.js';
20
20
  import { C as ChangeManager } from './change-manager-6a7eb88c.js';
21
21
  import { V as VegaInternalRTEExtensionTableCellsSelectionAnchor, a as VegaInternalPopoverUpdateTarget, b as VegaInternalRTEExtensionTableCellSelectionChange } from './vega-internal-event-id-913e8be6.js';
22
22
  import { r as remoteInvocationRegistry } from './remote-invocation-registry-d69245c2.js';
23
- import { V as VegaInternalThemeManager } from './dark-mode-style-controller-e9a6b097.js';
23
+ import { V as VegaInternalThemeManager } from './dark-mode-style-controller-fcda24ec.js';
24
24
  import { t as tryGetDocument } from './try-get-document-bef0f526.js';
25
25
  import { p as parseToPixelString } from './pixel-f32c07ce.js';
26
26
  import { c as cleanObject } from './object-0c277f57.js';
27
27
  import { d as debounce } from './timer-9321173b.js';
28
+ import { R as ReplaceSelectedTextAction } from './replace-selected-text-action-a45bee4b.js';
28
29
 
29
30
  const VegaLoaderRuntimeMetricsPayloadDefinition = [
30
31
  {
@@ -1061,9 +1062,15 @@ class RTEExtensionContextManager {
1061
1062
  *
1062
1063
  * @param {RTEExtensionContext} context - The extension context to store.
1063
1064
  */
1064
- setExtensionContext(context) {
1065
+ updateExtensionContext(context) {
1065
1066
  if (context && context.host) {
1066
- this.extensionContextMap.set(context.host, context);
1067
+ let newContext = context;
1068
+ const existingContext = this.extensionContextMap.get(context.host);
1069
+ // If there is already an existing context for the host, merge the new context with the existing one to avoid overwriting any properties that are not included in the new context.
1070
+ if (existingContext) {
1071
+ newContext = Object.assign(Object.assign({}, existingContext), context);
1072
+ }
1073
+ this.extensionContextMap.set(context.host, newContext);
1067
1074
  }
1068
1075
  }
1069
1076
  /**
@@ -1190,6 +1197,8 @@ class VegaRTEExtensionRenderer extends VegaRTEBaseRenderer {
1190
1197
  }
1191
1198
  VegaRTEExtensionRenderer.REGISTER_REF_FLAG = '__registeredRef__';
1192
1199
 
1200
+ const patchedBlockClasses = new WeakSet();
1201
+ const annotationHandlersByClass = new WeakMap();
1193
1202
  /**
1194
1203
  * Abstract class for Vega Rich Text Editor extensions.
1195
1204
  */
@@ -1230,6 +1239,53 @@ class VegaRTEExtension {
1230
1239
  static registerFilterStylesStrategy(blockOrNodeClassName, strategy) {
1231
1240
  RTEFilterStylesStrategyRegistry.register(blockOrNodeClassName, strategy);
1232
1241
  }
1242
+ /**
1243
+ * Attach a custom JSON annotation handler to a block DTO class's static `from` flow.
1244
+ *
1245
+ * This is a reusable extension point: any extension can register a handler for an
1246
+ * annotation key and transform the value into block annotations during JSON parsing.
1247
+ *
1248
+ * Safe to call multiple times per class/key/handler — duplicate registrations are no-ops.
1249
+ *
1250
+ * @param {BlockClassWithFrom} BlockClass - Block DTO class to patch.
1251
+ * @param {string} annotationKey - JSON annotation key to read from `block.annotations`.
1252
+ * @param {AnnotationFromJsonHandler} handler - Handler that applies annotation logic to the instance.
1253
+ */
1254
+ static attachAnnotationFromJson(BlockClass, annotationKey, handler) {
1255
+ var _a, _b;
1256
+ const handlerMap = (_a = annotationHandlersByClass.get(BlockClass)) !== null && _a !== void 0 ? _a : new Map();
1257
+ const handlers = (_b = handlerMap.get(annotationKey)) !== null && _b !== void 0 ? _b : new Set();
1258
+ handlers.add(handler);
1259
+ handlerMap.set(annotationKey, handlers);
1260
+ annotationHandlersByClass.set(BlockClass, handlerMap);
1261
+ if (patchedBlockClasses.has(BlockClass)) {
1262
+ return;
1263
+ }
1264
+ patchedBlockClasses.add(BlockClass);
1265
+ const originalFrom = BlockClass.from.bind(BlockClass);
1266
+ /**
1267
+ * Wrapped static `from` that preserves original behavior and then applies
1268
+ * all registered annotation-from-json handlers for this BlockClass.
1269
+ *
1270
+ * @param {VegaRTEBlockBase} block - Raw JSON block payload.
1271
+ * @param {VegaRTETransformOptions} [options] - Optional transform options.
1272
+ * @returns {RTEBlock} The transformed block instance.
1273
+ */
1274
+ BlockClass.from = function patchedFrom(block, options) {
1275
+ const instance = originalFrom(block, options);
1276
+ const annotations = block.annotations;
1277
+ const currentHandlerMap = annotationHandlersByClass.get(BlockClass);
1278
+ if (annotations && currentHandlerMap) {
1279
+ currentHandlerMap.forEach((registeredHandlers, key) => {
1280
+ const value = annotations[key];
1281
+ registeredHandlers.forEach((registeredHandler) => {
1282
+ registeredHandler(instance, value, block, options);
1283
+ });
1284
+ });
1285
+ }
1286
+ return instance;
1287
+ };
1288
+ }
1233
1289
  /**
1234
1290
  * Lifecycle hook called by the rich text editor before the first render
1235
1291
  * (during `componentWillLoad`). Override this method to perform per-host
@@ -1251,7 +1307,7 @@ class VegaRTEExtension {
1251
1307
  */
1252
1308
  initialExtensionAfterLoad(context) {
1253
1309
  this.extensionContext = context;
1254
- RTEExtensionContextManager$1.setExtensionContext(context);
1310
+ RTEExtensionContextManager$1.updateExtensionContext(context);
1255
1311
  }
1256
1312
  /**
1257
1313
  * Callback method invoked when the extension is destroyed.
@@ -1391,6 +1447,11 @@ class VegaRTEExtension {
1391
1447
  * Override the methods to customize the rendering and behavior of the button.
1392
1448
  */
1393
1449
  class VegaRTEToolbarButtonRenderer {
1450
+ constructor() {
1451
+ this.dropdownEl = null;
1452
+ this.itemsContainerEl = null;
1453
+ this.buttonEl = null;
1454
+ }
1394
1455
  /**
1395
1456
  * Checks if the button should be hidden.
1396
1457
  *
@@ -1423,6 +1484,7 @@ class VegaRTEToolbarButtonRenderer {
1423
1484
  return h('vega-dropdown', Object.assign({ trigger: 'click', searchable: false, maxWidth: '200', itemDisplayRule: 'ellipsis',
1424
1485
  // eslint-disable-next-line jsdoc/require-jsdoc
1425
1486
  ref: (el) => {
1487
+ this.dropdownEl = el;
1426
1488
  DomNodeSubjectObserverFactory.addUniqueObserverToNode(el, VegaDropdownClick, (input) => {
1427
1489
  const payload = input;
1428
1490
  this.handleDropdownClick(payload.detail, editorContext);
@@ -1440,6 +1502,12 @@ class VegaRTEToolbarButtonRenderer {
1440
1502
  return h('div', {
1441
1503
  slot: 'items',
1442
1504
  onMouseDown: this.preventDefault,
1505
+ // eslint-disable-next-line jsdoc/require-jsdoc
1506
+ onKeyDown: (e) => this.handleItemsKeyDown(e),
1507
+ // eslint-disable-next-line jsdoc/require-jsdoc
1508
+ ref: (el) => {
1509
+ this.itemsContainerEl = el;
1510
+ },
1443
1511
  class: 'rte-dropdown-list',
1444
1512
  }, [
1445
1513
  h('style', { nonce: vegaNonceManager.nonce }, '.rte-dropdown-list vega-dropdown-group vega-dropdown-group { padding-left: 4px }'),
@@ -1503,9 +1571,12 @@ class VegaRTEToolbarButtonRenderer {
1503
1571
  selected: this.isSelected(editorContext),
1504
1572
  // eslint-disable-next-line jsdoc/require-jsdoc
1505
1573
  ref: (el) => {
1574
+ this.buttonEl = el;
1506
1575
  DomNodeSubjectObserverFactory.addUniqueObserverToNode(el, VegaClick, () => this.handleButtonClick(editorContext));
1507
1576
  },
1508
1577
  onMouseDown: this.preventDefault,
1578
+ // eslint-disable-next-line jsdoc/require-jsdoc
1579
+ onKeyDown: (e) => this.handleButtonKeyDown(e),
1509
1580
  }, [
1510
1581
  this.renderButtonLabel(h, editorContext, label),
1511
1582
  showArrowIcon
@@ -1518,7 +1589,7 @@ class VegaRTEToolbarButtonRenderer {
1518
1589
  : null,
1519
1590
  ].filter(isNonNullable));
1520
1591
  if (tooltip === null || tooltip === void 0 ? void 0 : tooltip.text) {
1521
- return h('vega-tooltip', { text: tooltip.text, placement: ['bottom', 'top'] }, [button]);
1592
+ return h('vega-tooltip', { text: editorContext.translation.t(tooltip.text), placement: ['bottom', 'top'] }, [button]);
1522
1593
  }
1523
1594
  return button;
1524
1595
  }
@@ -1588,6 +1659,95 @@ class VegaRTEToolbarButtonRenderer {
1588
1659
  }
1589
1660
  return null;
1590
1661
  }
1662
+ /**
1663
+ * Handles keyboard events on the toolbar button to support dropdown keyboard accessibility.
1664
+ * - Enter / Space: Toggles the dropdown open/closed.
1665
+ * - ArrowDown / ArrowUp: Opens the dropdown and focuses the first/last item.
1666
+ *
1667
+ * @param {KeyboardEvent} e The keyboard event.
1668
+ */
1669
+ handleButtonKeyDown(e) {
1670
+ if (!this.dropdownEl) {
1671
+ return;
1672
+ }
1673
+ if (e.code === 'Enter' || e.code === 'Space') {
1674
+ e.preventDefault();
1675
+ e.stopPropagation();
1676
+ this.dropdownEl.dispatchEvent(new MouseEvent('click', { bubbles: true }));
1677
+ }
1678
+ else if (e.code === 'ArrowDown' || e.code === 'ArrowUp') {
1679
+ e.preventDefault();
1680
+ e.stopPropagation();
1681
+ void this.dropdownEl.show().then(() => {
1682
+ this.focusDropdownItem(e.code === 'ArrowDown' ? 'first' : 'last');
1683
+ });
1684
+ }
1685
+ }
1686
+ /**
1687
+ * Handles keyboard navigation within the dropdown items container.
1688
+ * - ArrowDown/ArrowUp: Moves focus to the next/previous non-disabled item.
1689
+ * - Escape: Closes the dropdown and returns focus to the toolbar button.
1690
+ *
1691
+ * @param {KeyboardEvent} e The keyboard event.
1692
+ */
1693
+ handleItemsKeyDown(e) {
1694
+ var _a, _b, _c;
1695
+ if (e.code === 'Escape') {
1696
+ e.preventDefault();
1697
+ e.stopPropagation();
1698
+ if (this.dropdownEl) {
1699
+ void this.dropdownEl.hide();
1700
+ }
1701
+ (_a = this.buttonEl) === null || _a === void 0 ? void 0 : _a.focus();
1702
+ return;
1703
+ }
1704
+ if (e.code !== 'ArrowDown' && e.code !== 'ArrowUp') {
1705
+ return;
1706
+ }
1707
+ e.preventDefault();
1708
+ e.stopPropagation();
1709
+ const items = this.getDropdownItems();
1710
+ if (items.length === 0) {
1711
+ return;
1712
+ }
1713
+ const currentIndex = items.findIndex((item) => { var _a, _b; return ((_a = item.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('li')) === ((_b = item.shadowRoot) === null || _b === void 0 ? void 0 : _b.activeElement); });
1714
+ const direction = e.code === 'ArrowDown' ? 1 : -1;
1715
+ const startIndex = currentIndex === -1 ? (e.code === 'ArrowDown' ? 0 : items.length - 1) : currentIndex + direction;
1716
+ for (let offset = 0; offset < items.length; offset++) {
1717
+ const index = (startIndex + offset * direction + items.length) % items.length;
1718
+ if (!items[index].disabled) {
1719
+ (_c = (_b = items[index].shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('li')) === null || _c === void 0 ? void 0 : _c.focus();
1720
+ return;
1721
+ }
1722
+ }
1723
+ }
1724
+ /**
1725
+ * Focuses the first or last non-disabled dropdown item.
1726
+ *
1727
+ * @param {'first' | 'last'} position Whether to focus the first or last item.
1728
+ */
1729
+ focusDropdownItem(position) {
1730
+ var _a, _b;
1731
+ const items = this.getDropdownItems();
1732
+ const orderedItems = position === 'first' ? items : [...items].reverse();
1733
+ for (const item of orderedItems) {
1734
+ if (!item.disabled) {
1735
+ (_b = (_a = item.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('li')) === null || _b === void 0 ? void 0 : _b.focus();
1736
+ return;
1737
+ }
1738
+ }
1739
+ }
1740
+ /**
1741
+ * Gets all dropdown items from the items container.
1742
+ *
1743
+ * @returns {HTMLVegaDropdownItemElement[]} Array of dropdown item elements.
1744
+ */
1745
+ getDropdownItems() {
1746
+ if (!this.itemsContainerEl) {
1747
+ return [];
1748
+ }
1749
+ return Array.from(this.itemsContainerEl.querySelectorAll('vega-dropdown-item'));
1750
+ }
1591
1751
  }
1592
1752
 
1593
1753
  /**
@@ -1696,6 +1856,7 @@ class RTETokenToolbarButtonRenderer extends VegaRTEToolbarButtonRenderer {
1696
1856
  class RTETokenNode extends RTETextNode {
1697
1857
  constructor(id, token, text, parentBlock, annotations) {
1698
1858
  super(id, text, parentBlock, annotations);
1859
+ this.dtoName = RTETokenNode.dtoName;
1699
1860
  this.type = 'token';
1700
1861
  this.token = token;
1701
1862
  this.text = text;
@@ -1745,6 +1906,7 @@ class RTETokenNode extends RTETextNode {
1745
1906
  return `<span class="token" contenteditable="false" template-token-key="${this.token}" token-key="${this.token}"${super.generateAttributeString()}>${this.text}</span>`;
1746
1907
  }
1747
1908
  }
1909
+ RTETokenNode.dtoName = 'RTETokenNode';
1748
1910
 
1749
1911
  /**
1750
1912
  * Token node renderer for the rich text editor.
@@ -2070,6 +2232,7 @@ class InsertFunctionBlockAction extends ModifyContentAction {
2070
2232
  class RTEFunctionBlock extends RTEBlock {
2071
2233
  constructor(id) {
2072
2234
  super(id);
2235
+ this.dtoName = RTEFunctionBlock.dtoName;
2073
2236
  this.type = 'function-block';
2074
2237
  this.children = [];
2075
2238
  }
@@ -2157,6 +2320,7 @@ class RTEFunctionBlock extends RTEBlock {
2157
2320
  return styles ? ` style="${styles}"` : '';
2158
2321
  }
2159
2322
  }
2323
+ RTEFunctionBlock.dtoName = 'RTEFunctionBlock';
2160
2324
 
2161
2325
  /**
2162
2326
  * Strategy to handle the insertion of a function block into the rich text editor.
@@ -2258,6 +2422,7 @@ class InsertFunctionBlockStrategy extends ActionHandleStrategy {
2258
2422
  class RTELogicControlNode extends RTENode {
2259
2423
  constructor(id, text, parent) {
2260
2424
  super(id);
2425
+ this.dtoName = RTELogicControlNode.dtoName;
2261
2426
  this.type = 'logic-control-node';
2262
2427
  this.text = '';
2263
2428
  this.text = text;
@@ -2319,6 +2484,7 @@ class RTELogicControlNode extends RTENode {
2319
2484
  return false;
2320
2485
  }
2321
2486
  }
2487
+ RTELogicControlNode.dtoName = 'RTELogicControlNode';
2322
2488
 
2323
2489
  /**
2324
2490
  * Class representing a logic control block in the rich text editor.
@@ -2326,6 +2492,7 @@ class RTELogicControlNode extends RTENode {
2326
2492
  class RTELogicControlBlock extends RTEBlock {
2327
2493
  constructor(id, statementText, parent) {
2328
2494
  super(id);
2495
+ this.dtoName = RTELogicControlBlock.dtoName;
2329
2496
  this.type = 'logic-control-block';
2330
2497
  this.children = [];
2331
2498
  this.statementText = '';
@@ -2391,6 +2558,7 @@ class RTELogicControlBlock extends RTEBlock {
2391
2558
  };
2392
2559
  }
2393
2560
  }
2561
+ RTELogicControlBlock.dtoName = 'RTELogicControlBlock';
2394
2562
 
2395
2563
  /**
2396
2564
  * Function toolbar button renderer class.
@@ -2821,7 +2989,6 @@ const convertFunctionBlockStrategy = new DivToFunctionBlockStrategy();
2821
2989
  class VegaRTEFunctionExtension extends VegaRTEExtension {
2822
2990
  constructor() {
2823
2991
  super();
2824
- this.toolbarButtonRenderer = new FunctionToolbarButtonRenderer();
2825
2992
  this.registerBlockBasicStrategies(RTELogicControlBlock.name);
2826
2993
  this.registerBlockBasicStrategies(RTEFunctionBlock.name);
2827
2994
  this.preventFunctionBlockDefaultInsertNewParagraph();
@@ -2829,11 +2996,14 @@ class VegaRTEFunctionExtension extends VegaRTEExtension {
2829
2996
  this.registerRenderer('logic-control-block', new RTELogicControlBlockRenderer());
2830
2997
  this.registerNode('function-block', RTEFunctionBlock);
2831
2998
  this.registerRenderer('function-block', new RTEFunctionBlockRenderer());
2832
- this.registerToolbarButtonRenderer('functions', this.toolbarButtonRenderer);
2833
2999
  this.registerElementToBlockDTOClassStrategy(convertLogicControlBlockStrategy);
2834
3000
  this.registerElementToBlockDTOClassStrategy(convertFunctionContentStrategy);
2835
3001
  this.registerElementToBlockDTOClassStrategy(convertFunctionBlockStrategy);
2836
3002
  }
3003
+ /** @inheritDoc */
3004
+ prepareBeforeLoad(host) {
3005
+ this.registerToolbarButtonRenderer('functions', new FunctionToolbarButtonRenderer(), host);
3006
+ }
2837
3007
  /**
2838
3008
  * Remove the appen children strategies to prevent default insert new paragraph logic in function block
2839
3009
  */
@@ -2954,6 +3124,7 @@ var __rest$3 = (undefined && undefined.__rest) || function (s, e) {
2954
3124
  class RTETableCaptionBlock extends RTEBlock {
2955
3125
  constructor(id, options) {
2956
3126
  super(id);
3127
+ this.dtoName = RTETableCaptionBlock.dtoName;
2957
3128
  this.type = 'table-caption';
2958
3129
  const { autoMatchFormat } = options || { autoMatchFormat: true };
2959
3130
  if (autoMatchFormat) {
@@ -3016,6 +3187,7 @@ class RTETableCaptionBlock extends RTEBlock {
3016
3187
  ActionHandleStrategyRegistry.register(ModifyContentActionType.INSERT_CHILDREN_BEFORE, RTETableCaptionBlock.name, new InsertChildrenBeforeStrategy());
3017
3188
  ActionHandleStrategyRegistry.register(ModifyContentActionType.PASTE_CONTENT, RTETableCaptionBlock.name, new PasteContentStrategy());
3018
3189
  })();
3190
+ RTETableCaptionBlock.dtoName = 'RTETableCaptionBlock';
3019
3191
 
3020
3192
  const TOGGLE_TABLE_CAPTION = 'TOGGLE_TABLE_CAPTION';
3021
3193
  /**
@@ -6690,7 +6862,7 @@ class TableAnnotationHandler extends TableAnnotationHandlerBase {
6690
6862
  * @inheritDoc
6691
6863
  */
6692
6864
  canHandle(targetDto) {
6693
- return targetDto.name === 'RTETableBlock';
6865
+ return targetDto.dtoName === 'RTETableBlock';
6694
6866
  }
6695
6867
  /**
6696
6868
  * Handle annotation extraction from table element.
@@ -6758,7 +6930,7 @@ class TableCellAnnotationHandler extends TableAnnotationHandlerBase {
6758
6930
  * @inheritDoc
6759
6931
  */
6760
6932
  canHandle(targetDto) {
6761
- return targetDto.name === 'RTETableCellBlock';
6933
+ return targetDto.dtoName === 'RTETableCellBlock';
6762
6934
  }
6763
6935
  /**
6764
6936
  * Handle annotation extraction from table cell element.
@@ -6867,7 +7039,7 @@ class TableHeadCellAnnotationHandler extends TableCellAnnotationHandler {
6867
7039
  * @inheritDoc
6868
7040
  */
6869
7041
  canHandle(targetDto) {
6870
- return targetDto.name === 'RTETableHeadCellBlock';
7042
+ return targetDto.dtoName === 'RTETableHeadCellBlock';
6871
7043
  }
6872
7044
  }
6873
7045
 
@@ -7347,7 +7519,7 @@ class TableBlockFilterStylesStrategy extends RTEFilterStylesStrategy {
7347
7519
  * @inheritDoc
7348
7520
  */
7349
7521
  canFilter(blockOrNodeInstance) {
7350
- return this.isTableBlock(blockOrNodeInstance.constructor.name);
7522
+ return this.isTableBlock(blockOrNodeInstance.dtoName);
7351
7523
  }
7352
7524
  /**
7353
7525
  * @inheritDoc
@@ -7385,7 +7557,7 @@ class TableCaptionFilterStylesStrategy extends RTEFilterStylesStrategy {
7385
7557
  * @inheritDoc
7386
7558
  */
7387
7559
  canFilter(blockOrNodeInstance) {
7388
- return this.isTableCaption(blockOrNodeInstance.constructor.name);
7560
+ return this.isTableCaption(blockOrNodeInstance.dtoName);
7389
7561
  }
7390
7562
  /**
7391
7563
  * @inheritDoc
@@ -7427,7 +7599,7 @@ class TableCellFilterStylesStrategy extends RTEFilterStylesStrategy {
7427
7599
  * @inheritDoc
7428
7600
  */
7429
7601
  canFilter(blockOrNodeInstance) {
7430
- return this.isTableCell(blockOrNodeInstance.constructor.name);
7602
+ return this.isTableCell(blockOrNodeInstance.dtoName);
7431
7603
  }
7432
7604
  /**
7433
7605
  * The table cell border color can be represented in different formats (e.g., hex, rgb), so we need to ensure that we can handle both cases.
@@ -7573,10 +7745,936 @@ class VegaRTETableExtension extends VegaRTEExtension {
7573
7745
  VegaRTEExtension.registerActionHandlerInterceptor(RTETableCellBlock.name, ModifyContentActionType.DELETE_CHILDREN, new PreventCellChildrenRemoveInterceptor());
7574
7746
  VegaRTEExtension.registerActionHandlerInterceptor(RTETableHeadCellBlock.name, ModifyContentActionType.DELETE_CHILDREN, new PreventCellChildrenRemoveInterceptor());
7575
7747
  VegaRTEExtension.registerActionHandlerInterceptor(RTETableBlock.name, ModifyContentActionType.INSERT_NEW_PARAGRAPH, new PreventTableInsertParagraphInterceptor());
7576
- VegaRTEExtension.registerFilterStylesStrategy(RTETableBlock.name, new TableBlockFilterStylesStrategy());
7577
- VegaRTEExtension.registerFilterStylesStrategy(RTETableCaptionBlock.name, new TableCaptionFilterStylesStrategy());
7578
- VegaRTEExtension.registerFilterStylesStrategy(RTETableCellBlock.name, new TableCellFilterStylesStrategy());
7579
- VegaRTEExtension.registerFilterStylesStrategy(RTETableHeadCellBlock.name, new TableCellFilterStylesStrategy('th'));
7748
+ VegaRTEExtension.registerFilterStylesStrategy(RTETableBlock.dtoName, new TableBlockFilterStylesStrategy());
7749
+ VegaRTEExtension.registerFilterStylesStrategy(RTETableCaptionBlock.dtoName, new TableCaptionFilterStylesStrategy());
7750
+ VegaRTEExtension.registerFilterStylesStrategy(RTETableCellBlock.dtoName, new TableCellFilterStylesStrategy());
7751
+ VegaRTEExtension.registerFilterStylesStrategy(RTETableHeadCellBlock.dtoName, new TableCellFilterStylesStrategy('th'));
7752
+ })();
7753
+
7754
+ const ARROW_CHARACTERS = [
7755
+ { character: '←', title: 'leftwards simple arrow' },
7756
+ { character: '→', title: 'rightwards simple arrow' },
7757
+ { character: '↑', title: 'upwards simple arrow' },
7758
+ { character: '↓', title: 'downwards simple arrow' },
7759
+ { character: '⇐', title: 'leftwards double arrow' },
7760
+ { character: '⇒', title: 'rightwards double arrow' },
7761
+ { character: '⇑', title: 'upwards double arrow' },
7762
+ { character: '⇓', title: 'downwards double arrow' },
7763
+ { character: '⇠', title: 'leftwards dashed arrow' },
7764
+ { character: '⇢', title: 'rightwards dashed arrow' },
7765
+ { character: '⇡', title: 'upwards dashed arrow' },
7766
+ { character: '⇣', title: 'downwards dashed arrow' },
7767
+ { character: '⇤', title: 'leftwards arrow to bar' },
7768
+ { character: '⇥', title: 'rightwards arrow to bar' },
7769
+ { character: '⤒', title: 'upwards arrow to bar' },
7770
+ { character: '⤓', title: 'downwards arrow to bar' },
7771
+ { character: '↨', title: 'up down arrow with base' },
7772
+ { character: '🔙', title: 'back with leftwards arrow above' },
7773
+ { character: '🔚', title: 'end with leftwards arrow above' },
7774
+ { character: '🔛', title: 'on with exclamation mark with left right arrow above' },
7775
+ { character: '🔜', title: 'soon with rightwards arrow above' },
7776
+ { character: '🔝', title: 'top with upwards arrow above' },
7777
+ ];
7778
+
7779
+ const CURRENCY_CHARACTERS = [
7780
+ { character: '$', title: 'Dollar sign' },
7781
+ { character: '€', title: 'Euro sign' },
7782
+ { character: '¥', title: 'Yen sign' },
7783
+ { character: '£', title: 'Pound sign' },
7784
+ { character: '¢', title: 'Cent sign' },
7785
+ { character: '₠', title: 'Euro-currency sign' },
7786
+ { character: '₡', title: 'Colon sign' },
7787
+ { character: '₢', title: 'Cruzeiro sign' },
7788
+ { character: '₣', title: 'French franc sign' },
7789
+ { character: '₤', title: 'Lira sign' },
7790
+ { character: '¤', title: 'Currency sign' },
7791
+ { character: '₿', title: 'Bitcoin sign' },
7792
+ { character: '₥', title: 'Mill sign' },
7793
+ { character: '₦', title: 'Naira sign' },
7794
+ { character: '₧', title: 'Peseta sign' },
7795
+ { character: '₨', title: 'Rupee sign' },
7796
+ { character: '₩', title: 'Won sign' },
7797
+ { character: '₪', title: 'New sheqel sign' },
7798
+ { character: '₫', title: 'Dong sign' },
7799
+ { character: '₭', title: 'Kip sign' },
7800
+ { character: '₮', title: 'Tugrik sign' },
7801
+ { character: '₯', title: 'Drachma sign' },
7802
+ { character: '₰', title: 'German penny sign' },
7803
+ { character: '₱', title: 'Peso sign' },
7804
+ { character: '₲', title: 'Guarani sign' },
7805
+ { character: '₳', title: 'Austral sign' },
7806
+ { character: '₴', title: 'Hryvnia sign' },
7807
+ { character: '₵', title: 'Cedi sign' },
7808
+ { character: '₶', title: 'Livre tournois sign' },
7809
+ { character: '₷', title: 'Spesmilo sign' },
7810
+ { character: '₸', title: 'Tenge sign' },
7811
+ { character: '₹', title: 'Indian rupee sign' },
7812
+ { character: '₺', title: 'Turkish lira sign' },
7813
+ { character: '₻', title: 'Nordic mark sign' },
7814
+ { character: '₼', title: 'Manat sign' },
7815
+ { character: '₽', title: 'Ruble sign' },
7816
+ ];
7817
+
7818
+ const LATIN_CHARACTERS = [
7819
+ { character: 'Ā', title: 'Latin capital letter a with macron' },
7820
+ { character: 'ā', title: 'Latin small letter a with macron' },
7821
+ { character: 'Ă', title: 'Latin capital letter a with breve' },
7822
+ { character: 'ă', title: 'Latin small letter a with breve' },
7823
+ { character: 'Ą', title: 'Latin capital letter a with ogonek' },
7824
+ { character: 'ą', title: 'Latin small letter a with ogonek' },
7825
+ { character: 'Ć', title: 'Latin capital letter c with acute' },
7826
+ { character: 'ć', title: 'Latin small letter c with acute' },
7827
+ { character: 'Ĉ', title: 'Latin capital letter c with circumflex' },
7828
+ { character: 'ĉ', title: 'Latin small letter c with circumflex' },
7829
+ { character: 'Ċ', title: 'Latin capital letter c with dot above' },
7830
+ { character: 'ċ', title: 'Latin small letter c with dot above' },
7831
+ { character: 'Č', title: 'Latin capital letter c with caron' },
7832
+ { character: 'č', title: 'Latin small letter c with caron' },
7833
+ { character: 'Ď', title: 'Latin capital letter d with caron' },
7834
+ { character: 'ď', title: 'Latin small letter d with caron' },
7835
+ { character: 'Đ', title: 'Latin capital letter d with stroke' },
7836
+ { character: 'đ', title: 'Latin small letter d with stroke' },
7837
+ { character: 'Ē', title: 'Latin capital letter e with macron' },
7838
+ { character: 'ē', title: 'Latin small letter e with macron' },
7839
+ { character: 'Ĕ', title: 'Latin capital letter e with breve' },
7840
+ { character: 'ĕ', title: 'Latin small letter e with breve' },
7841
+ { character: 'Ė', title: 'Latin capital letter e with dot above' },
7842
+ { character: 'ė', title: 'Latin small letter e with dot above' },
7843
+ { character: 'Ę', title: 'Latin capital letter e with ogonek' },
7844
+ { character: 'ę', title: 'Latin small letter e with ogonek' },
7845
+ { character: 'Ě', title: 'Latin capital letter e with caron' },
7846
+ { character: 'ě', title: 'Latin small letter e with caron' },
7847
+ { character: 'Ĝ', title: 'Latin capital letter g with circumflex' },
7848
+ { character: 'ĝ', title: 'Latin small letter g with circumflex' },
7849
+ { character: 'Ğ', title: 'Latin capital letter g with breve' },
7850
+ { character: 'ğ', title: 'Latin small letter g with breve' },
7851
+ { character: 'Ġ', title: 'Latin capital letter g with dot above' },
7852
+ { character: 'ġ', title: 'Latin small letter g with dot above' },
7853
+ { character: 'Ģ', title: 'Latin capital letter g with cedilla' },
7854
+ { character: 'ģ', title: 'Latin small letter g with cedilla' },
7855
+ { character: 'Ĥ', title: 'Latin capital letter h with circumflex' },
7856
+ { character: 'ĥ', title: 'Latin small letter h with circumflex' },
7857
+ { character: 'Ħ', title: 'Latin capital letter h with stroke' },
7858
+ { character: 'ħ', title: 'Latin small letter h with stroke' },
7859
+ { character: 'Ĩ', title: 'Latin capital letter i with tilde' },
7860
+ { character: 'ĩ', title: 'Latin small letter i with tilde' },
7861
+ { character: 'Ī', title: 'Latin capital letter i with macron' },
7862
+ { character: 'ī', title: 'Latin small letter i with macron' },
7863
+ { character: 'Ĭ', title: 'Latin capital letter i with breve' },
7864
+ { character: 'ĭ', title: 'Latin small letter i with breve' },
7865
+ { character: 'Į', title: 'Latin capital letter i with ogonek' },
7866
+ { character: 'į', title: 'Latin small letter i with ogonek' },
7867
+ { character: 'İ', title: 'Latin capital letter i with dot above' },
7868
+ { character: 'ı', title: 'Latin small letter dotless i' },
7869
+ { character: 'IJ', title: 'Latin capital ligature ij' },
7870
+ { character: 'ij', title: 'Latin small ligature ij' },
7871
+ { character: 'Ĵ', title: 'Latin capital letter j with circumflex' },
7872
+ { character: 'ĵ', title: 'Latin small letter j with circumflex' },
7873
+ { character: 'Ķ', title: 'Latin capital letter k with cedilla' },
7874
+ { character: 'ķ', title: 'Latin small letter k with cedilla' },
7875
+ { character: 'ĸ', title: 'Latin small letter kra' },
7876
+ { character: 'Ĺ', title: 'Latin capital letter l with acute' },
7877
+ { character: 'ĺ', title: 'Latin small letter l with acute' },
7878
+ { character: 'Ļ', title: 'Latin capital letter l with cedilla' },
7879
+ { character: 'ļ', title: 'Latin small letter l with cedilla' },
7880
+ { character: 'Ľ', title: 'Latin capital letter l with caron' },
7881
+ { character: 'ľ', title: 'Latin small letter l with caron' },
7882
+ { character: 'Ŀ', title: 'Latin capital letter l with middle dot' },
7883
+ { character: 'ŀ', title: 'Latin small letter l with middle dot' },
7884
+ { character: 'Ł', title: 'Latin capital letter l with stroke' },
7885
+ { character: 'ł', title: 'Latin small letter l with stroke' },
7886
+ { character: 'Ń', title: 'Latin capital letter n with acute' },
7887
+ { character: 'ń', title: 'Latin small letter n with acute' },
7888
+ { character: 'Ņ', title: 'Latin capital letter n with cedilla' },
7889
+ { character: 'ņ', title: 'Latin small letter n with cedilla' },
7890
+ { character: 'Ň', title: 'Latin capital letter n with caron' },
7891
+ { character: 'ň', title: 'Latin small letter n with caron' },
7892
+ { character: 'ʼn', title: 'Latin small letter n preceded by apostrophe' },
7893
+ { character: 'Ŋ', title: 'Latin capital letter eng' },
7894
+ { character: 'ŋ', title: 'Latin small letter eng' },
7895
+ { character: 'Ō', title: 'Latin capital letter o with macron' },
7896
+ { character: 'ō', title: 'Latin small letter o with macron' },
7897
+ { character: 'Ŏ', title: 'Latin capital letter o with breve' },
7898
+ { character: 'ŏ', title: 'Latin small letter o with breve' },
7899
+ { character: 'Ő', title: 'Latin capital letter o with double acute' },
7900
+ { character: 'ő', title: 'Latin small letter o with double acute' },
7901
+ { character: 'Œ', title: 'Latin capital ligature oe' },
7902
+ { character: 'œ', title: 'Latin small ligature oe' },
7903
+ { character: 'Ŕ', title: 'Latin capital letter r with acute' },
7904
+ { character: 'ŕ', title: 'Latin small letter r with acute' },
7905
+ { character: 'Ŗ', title: 'Latin capital letter r with cedilla' },
7906
+ { character: 'ŗ', title: 'Latin small letter r with cedilla' },
7907
+ { character: 'Ř', title: 'Latin capital letter r with caron' },
7908
+ { character: 'ř', title: 'Latin small letter r with caron' },
7909
+ { character: 'Ś', title: 'Latin capital letter s with acute' },
7910
+ { character: 'ś', title: 'Latin small letter s with acute' },
7911
+ { character: 'Ŝ', title: 'Latin capital letter s with circumflex' },
7912
+ { character: 'ŝ', title: 'Latin small letter s with circumflex' },
7913
+ { character: 'Ş', title: 'Latin capital letter s with cedilla' },
7914
+ { character: 'ş', title: 'Latin small letter s with cedilla' },
7915
+ { character: 'Š', title: 'Latin capital letter s with caron' },
7916
+ { character: 'š', title: 'Latin small letter s with caron' },
7917
+ { character: 'Ţ', title: 'Latin capital letter t with cedilla' },
7918
+ { character: 'ţ', title: 'Latin small letter t with cedilla' },
7919
+ { character: 'Ť', title: 'Latin capital letter t with caron' },
7920
+ { character: 'ť', title: 'Latin small letter t with caron' },
7921
+ { character: 'Ŧ', title: 'Latin capital letter t with stroke' },
7922
+ { character: 'ŧ', title: 'Latin small letter t with stroke' },
7923
+ { character: 'Ũ', title: 'Latin capital letter u with tilde' },
7924
+ { character: 'ũ', title: 'Latin small letter u with tilde' },
7925
+ { character: 'Ū', title: 'Latin capital letter u with macron' },
7926
+ { character: 'ū', title: 'Latin small letter u with macron' },
7927
+ { character: 'Ŭ', title: 'Latin capital letter u with breve' },
7928
+ { character: 'ŭ', title: 'Latin small letter u with breve' },
7929
+ { character: 'Ů', title: 'Latin capital letter u with ring above' },
7930
+ { character: 'ů', title: 'Latin small letter u with ring above' },
7931
+ { character: 'Ű', title: 'Latin capital letter u with double acute' },
7932
+ { character: 'ű', title: 'Latin small letter u with double acute' },
7933
+ { character: 'Ų', title: 'Latin capital letter u with ogonek' },
7934
+ { character: 'ų', title: 'Latin small letter u with ogonek' },
7935
+ { character: 'Ŵ', title: 'Latin capital letter w with circumflex' },
7936
+ { character: 'ŵ', title: 'Latin small letter w with circumflex' },
7937
+ { character: 'Ŷ', title: 'Latin capital letter y with circumflex' },
7938
+ { character: 'ŷ', title: 'Latin small letter y with circumflex' },
7939
+ { character: 'Ÿ', title: 'Latin capital letter y with diaeresis' },
7940
+ { character: 'Ź', title: 'Latin capital letter z with acute' },
7941
+ { character: 'ź', title: 'Latin small letter z with acute' },
7942
+ { character: 'Ż', title: 'Latin capital letter z with dot above' },
7943
+ { character: 'ż', title: 'Latin small letter z with dot above' },
7944
+ { character: 'Ž', title: 'Latin capital letter z with caron' },
7945
+ { character: 'ž', title: 'Latin small letter z with caron' },
7946
+ { character: 'ſ', title: 'Latin small letter long s' },
7947
+ ];
7948
+
7949
+ const MATHEMATICAL_CHARACTERS = [
7950
+ { character: '<', title: 'Less-than sign' },
7951
+ { character: '>', title: 'Greater-than sign' },
7952
+ { character: '≤', title: 'Less-than or equal to' },
7953
+ { character: '≥', title: 'Greater-than or equal to' },
7954
+ { character: '–', title: 'En dash' },
7955
+ { character: '—', title: 'Em dash' },
7956
+ { character: '¯', title: 'Macron' },
7957
+ { character: '‾', title: 'Overline' },
7958
+ { character: '°', title: 'Degree sign' },
7959
+ { character: '−', title: 'Minus sign' },
7960
+ { character: '±', title: 'Plus-minus sign' },
7961
+ { character: '÷', title: 'Division sign' },
7962
+ { character: '⁄', title: 'Fraction slash' },
7963
+ { character: '×', title: 'Multiplication sign' },
7964
+ { character: 'ƒ', title: 'Latin small letter f with hook' },
7965
+ { character: '∫', title: 'Integral' },
7966
+ { character: '∑', title: 'N-ary summation' },
7967
+ { character: '∞', title: 'Infinity' },
7968
+ { character: '√', title: 'Square root' },
7969
+ { character: '∼', title: 'Tilde operator' },
7970
+ { character: '≅', title: 'Approximately equal to' },
7971
+ { character: '≈', title: 'Almost equal to' },
7972
+ { character: '≠', title: 'Not equal to' },
7973
+ { character: '≡', title: 'Identical to' },
7974
+ { character: '∈', title: 'Element of' },
7975
+ { character: '∉', title: 'Not an element of' },
7976
+ { character: '∋', title: 'Contains as member' },
7977
+ { character: '∏', title: 'N-ary product' },
7978
+ { character: '∧', title: 'Logical and' },
7979
+ { character: '∨', title: 'Logical or' },
7980
+ { character: '¬', title: 'Not sign' },
7981
+ { character: '∩', title: 'Intersection' },
7982
+ { character: '∪', title: 'Union' },
7983
+ { character: '∂', title: 'Partial differential' },
7984
+ { character: '∀', title: 'For all' },
7985
+ { character: '∃', title: 'There exists' },
7986
+ { character: '∅', title: 'Empty set' },
7987
+ { character: '∇', title: 'Nabla' },
7988
+ { character: '∗', title: 'Asterisk operator' },
7989
+ { character: '∝', title: 'Proportional to' },
7990
+ { character: '∠', title: 'Angle' },
7991
+ { character: '¼', title: 'Vulgar fraction one quarter' },
7992
+ { character: '½', title: 'Vulgar fraction one half' },
7993
+ { character: '¾', title: 'Vulgar fraction three quarters' },
7994
+ ];
7995
+
7996
+ const TEXT_CHARACTERS = [
7997
+ { character: '‹', title: 'Single left-pointing angle quotation mark' },
7998
+ { character: '›', title: 'Single right-pointing angle quotation mark' },
7999
+ { character: '«', title: 'Left-pointing double angle quotation mark' },
8000
+ { character: '»', title: 'Right-pointing double angle quotation mark' },
8001
+ { character: '‘', title: 'Left single quotation mark' },
8002
+ { character: '’', title: 'Right single quotation mark' },
8003
+ { character: '“', title: 'Left double quotation mark' },
8004
+ { character: '”', title: 'Right double quotation mark' },
8005
+ { character: '‚', title: 'Single low-9 quotation mark' },
8006
+ { character: '„', title: 'Double low-9 quotation mark' },
8007
+ { character: '¡', title: 'Inverted exclamation mark' },
8008
+ { character: '¿', title: 'Inverted question mark' },
8009
+ { character: '‥', title: 'Two dot leader' },
8010
+ { character: '…', title: 'Horizontal ellipsis' },
8011
+ { character: '‡', title: 'Double dagger' },
8012
+ { character: '‰', title: 'Per mille sign' },
8013
+ { character: '‱', title: 'Per ten thousand sign' },
8014
+ { character: '‼', title: 'Double exclamation mark' },
8015
+ { character: '⁈', title: 'Question exclamation mark' },
8016
+ { character: '⁉', title: 'Exclamation question mark' },
8017
+ { character: '⁇', title: 'Double question mark' },
8018
+ { character: '©', title: 'Copyright sign' },
8019
+ { character: '®', title: 'Registered sign' },
8020
+ { character: '™', title: 'Trade mark sign' },
8021
+ { character: '§', title: 'Section sign' },
8022
+ { character: '¶', title: 'Paragraph sign' },
8023
+ { character: '⁋', title: 'Reversed paragraph sign' },
8024
+ ];
8025
+
8026
+ const VegaRTESpecialCharactersLatin = {
8027
+ key: 'latin',
8028
+ label: 'Latin',
8029
+ characters: LATIN_CHARACTERS,
8030
+ };
8031
+ const VegaRTESpecialCharactersMathematical = {
8032
+ key: 'mathematical',
8033
+ label: 'Mathematical',
8034
+ characters: MATHEMATICAL_CHARACTERS,
8035
+ };
8036
+ const VegaRTESpecialCharactersArrows = {
8037
+ key: 'arrows',
8038
+ label: 'Arrows',
8039
+ characters: ARROW_CHARACTERS,
8040
+ };
8041
+ const VegaRTESpecialCharactersCurrency = {
8042
+ key: 'currency',
8043
+ label: 'Currency',
8044
+ characters: CURRENCY_CHARACTERS,
8045
+ };
8046
+ const VegaRTESpecialCharactersText = {
8047
+ key: 'text',
8048
+ label: 'Text',
8049
+ characters: TEXT_CHARACTERS,
8050
+ };
8051
+ const VegaRTESpecialCharactersEssentials = [
8052
+ VegaRTESpecialCharactersCurrency,
8053
+ VegaRTESpecialCharactersText,
8054
+ VegaRTESpecialCharactersMathematical,
8055
+ VegaRTESpecialCharactersArrows,
8056
+ VegaRTESpecialCharactersLatin,
8057
+ ];
8058
+
8059
+ const specialCharactersIcon = {
8060
+ icon: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path fill="currentColor" d="M224 80C126.8 80 48 158.8 48 256c0 63.7 33.8 119.5 84.6 150.4c11.4 7 19.4 19.6 19.4 34.2c0 21.8-17.6 39.4-39.4 39.4H24c-13.3 0-24-10.7-24-24s10.7-24 24-24H85.4C33.4 391 0 327.4 0 256C0 132.3 100.3 32 224 32s224 100.3 224 224c0 71.4-33.4 135-85.4 176H424c13.3 0 24 10.7 24 24s-10.7 24-24 24H335.4c-21.8 0-39.4-17.6-39.4-39.4c0-14.6 8-27.2 19.4-34.2C366.2 375.5 400 319.7 400 256c0-97.2-78.8-176-176-176z"/></svg>`,
8061
+ };
8062
+
8063
+ /**
8064
+ * Toolbar button renderer for the Special Characters extension.
8065
+ * Renders a toolbar button with an Ω icon that opens a popover panel
8066
+ * with categorized character grids.
8067
+ */
8068
+ class RTESpecialCharactersToolbarButtonRenderer extends VegaRTEToolbarButtonRenderer {
8069
+ constructor(categories) {
8070
+ super();
8071
+ this.panelRef = null;
8072
+ this.categories = categories;
8073
+ }
8074
+ /**
8075
+ * Renders the special characters toolbar button wrapped in a popover.
8076
+ *
8077
+ * @param {VegaRTECreateElementFunction} h - Create element function.
8078
+ * @param {VegaRTEToolbarRenderContext} editorContext - The render context for the editor.
8079
+ * @returns {VegaRTERenderResult} - The toolbar button render result.
8080
+ */
8081
+ render(h, editorContext) {
8082
+ return h('vega-popover', {
8083
+ trigger: 'click',
8084
+ alignment: 'start',
8085
+ placement: 'bottom',
8086
+ showArrow: false,
8087
+ isScreenPosition: true,
8088
+ // eslint-disable-next-line jsdoc/require-jsdoc
8089
+ ref: (ref) => {
8090
+ if (ref) {
8091
+ DomNodeSubjectObserverFactory.addUniqueObserverToNode(ref, VegaPopoverShow, () => {
8092
+ this.handlePopoverShow();
8093
+ });
8094
+ }
8095
+ },
8096
+ }, [
8097
+ h('div', { slot: 'popover' }, [
8098
+ h('vega-rich-text-special-characters-panel', {
8099
+ categories: this.categories,
8100
+ // eslint-disable-next-line jsdoc/require-jsdoc
8101
+ ref: (ref) => {
8102
+ if (ref) {
8103
+ this.panelRef = ref;
8104
+ DomNodeSubjectObserverFactory.addUniqueObserverToNode(ref, VegaClick,
8105
+ // eslint-disable-next-line jsdoc/require-jsdoc
8106
+ (payload) => {
8107
+ this.insertCharacter(editorContext, payload.detail);
8108
+ });
8109
+ }
8110
+ },
8111
+ }),
8112
+ ]),
8113
+ h('div', { slot: 'popover-content' }, this.renderButton(h, editorContext, {
8114
+ icon: 'rte-special-characters',
8115
+ tooltip: { text: 'Special Characters' },
8116
+ })),
8117
+ ]);
8118
+ }
8119
+ /**
8120
+ * @inheritDoc
8121
+ */
8122
+ handleButtonClick() {
8123
+ // Popover handles open/close via trigger='click'
8124
+ }
8125
+ /* istanbul ignore next */
8126
+ /**
8127
+ * @inheritDoc
8128
+ */
8129
+ handleDropdownClick() {
8130
+ // No dropdown used
8131
+ }
8132
+ /**
8133
+ * Resets the panel and moves focus to the category select when the
8134
+ * popover opens.
8135
+ */
8136
+ handlePopoverShow() {
8137
+ if (this.panelRef) {
8138
+ void this.panelRef.resetPanel();
8139
+ }
8140
+ }
8141
+ /**
8142
+ * Inserts a special character at the current cursor position using ReplaceSelectedTextAction,
8143
+ * then restores the cursor position after flushing.
8144
+ *
8145
+ * @param {VegaRTEToolbarRenderContext} editorContext - The render context for the editor.
8146
+ * @param {string} char - The Unicode character to insert.
8147
+ */
8148
+ insertCharacter(editorContext, char) {
8149
+ const currentRange = editorContext.rteRange;
8150
+ const cursorNode = currentRange.startNode;
8151
+ if (!cursorNode)
8152
+ return;
8153
+ const target = this.isCaretOnLineBreak(cursorNode, currentRange)
8154
+ ? this.insertAtLineBreak(cursorNode, char, currentRange)
8155
+ : this.insertAtTextNode(cursorNode, char, currentRange);
8156
+ editorContext.host.value.apply(new UpdateCursorPositionAction(target.node, target.offset));
8157
+ }
8158
+ /**
8159
+ * Checks whether the caret is collapsed on a Shift+Enter line-break text node.
8160
+ *
8161
+ * @param {RTENode} cursorNode - The current cursor node.
8162
+ * @param {RTERange} range - The current selection range.
8163
+ * @returns {boolean} True if the caret is collapsed on a '\n' text node.
8164
+ */
8165
+ isCaretOnLineBreak(cursorNode, range) {
8166
+ return (cursorNode instanceof RTETextNode &&
8167
+ cursorNode.text === '\n' &&
8168
+ range.startOffset === range.endOffset);
8169
+ }
8170
+ /**
8171
+ * Default insert path: replace the selected range on a regular text node.
8172
+ *
8173
+ * @param {RTENode} cursorNode - The current cursor node.
8174
+ * @param {string} char - The Unicode character to insert.
8175
+ * @param {RTERange} range - The current selection range.
8176
+ * @returns {CaretTarget} The node and offset for the resulting caret position.
8177
+ */
8178
+ insertAtTextNode(cursorNode, char, range) {
8179
+ const action = new ReplaceSelectedTextAction(char, range);
8180
+ action.isFlushable = true;
8181
+ cursorNode.apply(action);
8182
+ // Clamp to node length: empty paragraphs contain a ZWS in the DOM (startOffset=1)
8183
+ // but the DTO text node is empty, so `startOffset + char.length` would overflow.
8184
+ return {
8185
+ node: cursorNode,
8186
+ offset: Math.min(range.startOffset + char.length, cursorNode.getRangeEndOffset()),
8187
+ };
8188
+ }
8189
+ /**
8190
+ * Line-break insert path: delegate to insertTextToLineBreakNode and place
8191
+ * the caret at the end of the inserted text.
8192
+ *
8193
+ * @param {RTETextNode} lineBreakNode - The '\n' text node at the caret.
8194
+ * @param {string} char - The Unicode character to insert.
8195
+ * @param {RTERange} range - The current selection range.
8196
+ * @returns {CaretTarget} Caret target.
8197
+ */
8198
+ insertAtLineBreak(lineBreakNode, char, range) {
8199
+ return {
8200
+ node: this.insertTextToLineBreakNode(lineBreakNode, char, range),
8201
+ offset: char.length,
8202
+ };
8203
+ }
8204
+ /**
8205
+ * Mirror of InsertTextHandler.insertTextToLineBreakNode for the toolbar
8206
+ * insert path: caret on a Shift+Enter line-break text node needs either a
8207
+ * new sibling text node inserted before the break, or the break's text
8208
+ * replaced. The default ReplaceSelectedTextAction + getRangeEndOffset()
8209
+ * path returns 0 for '\n' text nodes and drops the caret in front of the
8210
+ * inserted character.
8211
+ *
8212
+ * @param {RTETextNode} lineBreakNode - The '\n' text node at the caret.
8213
+ * @param {string} text - The text to insert.
8214
+ * @param {RTERange} currentRange - The current selection range.
8215
+ * @returns {RTETextNode} The node the caret should land in.
8216
+ */
8217
+ insertTextToLineBreakNode(lineBreakNode, text, currentRange) {
8218
+ // '\n' text nodes always live inside a text block in the RTE structure.
8219
+ const textBlock = lineBreakNode.parent;
8220
+ const index = textBlock.children.indexOf(lineBreakNode);
8221
+ if (currentRange.startOffset === 0 && textBlock.children[index + 1]) {
8222
+ const newTextNode = lineBreakNode.cloneWithText(text);
8223
+ const insertAction = new InsertChildrenBeforeAction(lineBreakNode, newTextNode);
8224
+ insertAction.isFlushable = true;
8225
+ textBlock.apply(insertAction);
8226
+ return newTextNode;
8227
+ }
8228
+ const updateAction = new UpdateTextAction(text);
8229
+ updateAction.isFlushable = true;
8230
+ lineBreakNode.apply(updateAction);
8231
+ return lineBreakNode;
8232
+ }
8233
+ }
8234
+ (() => {
8235
+ VegaInternalIconManager.register({ 'rte-special-characters': specialCharactersIcon });
8236
+ })();
8237
+
8238
+ /**
8239
+ * Vega Rich Text Editor Special Characters Extension.
8240
+ * Adds a toolbar button that opens a popover with categorized Unicode characters
8241
+ * for insertion into the editor content as plain text.
8242
+ */
8243
+ class VegaRTESpecialCharactersExtension extends VegaRTEExtension {
8244
+ constructor(config) {
8245
+ super();
8246
+ this.categories = this.buildCategories(config);
8247
+ }
8248
+ /** @inheritDoc */
8249
+ prepareBeforeLoad(host) {
8250
+ this.registerToolbarButtonRenderer('special-characters', new RTESpecialCharactersToolbarButtonRenderer(this.categories), host);
8251
+ }
8252
+ /**
8253
+ * Builds the final list of special character categories from the provided config.
8254
+ *
8255
+ * @param {VegaRTESpecialCharactersConfig} config - Optional configuration with custom categories.
8256
+ * @returns {VegaRTESpecialCharacterCategory[]} - The merged categories array.
8257
+ */
8258
+ buildCategories(config) {
8259
+ const includeDefaults = (config === null || config === void 0 ? void 0 : config.includeDefaults) !== false;
8260
+ const defaultCategories = includeDefaults
8261
+ ? VegaRTESpecialCharactersEssentials
8262
+ : [];
8263
+ if (!(config === null || config === void 0 ? void 0 : config.categories)) {
8264
+ return defaultCategories;
8265
+ }
8266
+ return [...defaultCategories, ...config.categories];
8267
+ }
8268
+ }
8269
+
8270
+ /**
8271
+ * Default line height options used by the line-height extension when no
8272
+ * custom options are provided.
8273
+ */
8274
+ const VegaRTEDefaultLineHeightOptions = [
8275
+ { title: '0.5', value: '0.5' },
8276
+ { title: '1', value: '1' },
8277
+ { title: '1.5', value: '1.5' },
8278
+ { title: '2', value: '2' },
8279
+ { title: '2.5', value: '2.5' },
8280
+ ];
8281
+
8282
+ var RTELineHeightExtensionAnnotationTypeEnum;
8283
+ (function (RTELineHeightExtensionAnnotationTypeEnum) {
8284
+ RTELineHeightExtensionAnnotationTypeEnum["LINE_HEIGHT"] = "LINE_HEIGHT";
8285
+ })(RTELineHeightExtensionAnnotationTypeEnum || (RTELineHeightExtensionAnnotationTypeEnum = {}));
8286
+ /**
8287
+ * Annotation to set block line height.
8288
+ */
8289
+ class LineHeightAnnotation extends BlockAnnotation {
8290
+ constructor(lineHeight) {
8291
+ super();
8292
+ this.type = RTELineHeightExtensionAnnotationTypeEnum.LINE_HEIGHT;
8293
+ this.lineHeight = lineHeight;
8294
+ }
8295
+ /**
8296
+ * Generate the map item for the annotation.
8297
+ *
8298
+ * @param {string} lineHeight - Line height value.
8299
+ * @returns {[RTELineHeightExtensionAnnotationTypeEnum.LINE_HEIGHT, LineHeightAnnotation]} Map item for the annotation.
8300
+ */
8301
+ static from(lineHeight) {
8302
+ return [RTELineHeightExtensionAnnotationTypeEnum.LINE_HEIGHT, new LineHeightAnnotation(lineHeight)];
8303
+ }
8304
+ /**
8305
+ * Get the default standalone styles for a given line height value.
8306
+ *
8307
+ * @param {string} lineHeight - The line height value.
8308
+ * @returns {AnnotationStyle} The default standalone styles.
8309
+ */
8310
+ static getDefaultStyles(lineHeight) {
8311
+ return { lineHeight };
8312
+ }
8313
+ /**
8314
+ * Generate the JSON item of the annotation.
8315
+ *
8316
+ * @returns {Record<string, unknown>} JSON representation of the annotation.
8317
+ */
8318
+ toJSON() {
8319
+ return {
8320
+ lineHeight: this.lineHeight,
8321
+ };
8322
+ }
8323
+ /**
8324
+ * @inheritDoc
8325
+ */
8326
+ renderClass() {
8327
+ return null;
8328
+ }
8329
+ /**
8330
+ * @inheritDoc
8331
+ */
8332
+ clone() {
8333
+ return new LineHeightAnnotation(this.lineHeight);
8334
+ }
8335
+ /**
8336
+ * @inheritDoc
8337
+ */
8338
+ renderStyle() {
8339
+ return LineHeightAnnotation.getDefaultStyles(this.lineHeight);
8340
+ }
8341
+ }
8342
+
8343
+ /**
8344
+ * Action to update block line height annotation.
8345
+ */
8346
+ class LineHeightAnnotationAction extends AnnotationAction {
8347
+ constructor(lineHeight) {
8348
+ super();
8349
+ this.isFlushable = true;
8350
+ this.lineHeight = lineHeight;
8351
+ }
8352
+ /**
8353
+ * Converts the action to an annotation.
8354
+ *
8355
+ * @returns {LineHeightAnnotation} The annotation.
8356
+ */
8357
+ toAnnotation() {
8358
+ return new LineHeightAnnotation(this.lineHeight);
8359
+ }
8360
+ }
8361
+
8362
+ /**
8363
+ * Update the block line height strategy.
8364
+ *
8365
+ * Registered for RTETextBlock and RTEListItemBlock, so the
8366
+ * target type is widened to the common RTEBlock base.
8367
+ */
8368
+ class BlockUpdateLineHeightStrategy extends ActionHandleStrategy {
8369
+ /**
8370
+ * Updating the line height of a block requires cascading updates to the custom style.
8371
+ *
8372
+ * @param {LineHeightAnnotationAction} _action - The line height annotation action.
8373
+ * @param {RTEBlock} target - The current block.
8374
+ */
8375
+ handleAction(_action, target) {
8376
+ this.updateCustomStyleAnnotation(target, ['lineHeight']);
8377
+ }
8378
+ }
8379
+
8380
+ const lineHeight = {
8381
+ icon: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path fill="currentColor" d="M113.8 39.9c-4.6-5.1-11-7.9-17.8-7.9s-13.3 2.9-17.8 7.9l-72 80c-8.9 9.9-8.1 25 1.8 33.9s25 8.1 33.9-1.8L72 118.5V393.5L41.8 359.9c-8.9-9.9-24-10.7-33.9-1.8s-10.7 24-1.8 33.9l72 80c4.6 5.1 11 7.9 17.8 7.9s13.3-2.9 17.8-7.9l72-80c8.9-9.9 8.1-25-1.8-33.9s-25-8.1-33.9 1.8L120 393.5V118.5l30.2 33.5c8.9 9.9 24 10.7 33.9 1.8s10.7-24 1.8-33.9l-72-80zM248 72c-13.3 0-24 10.7-24 24s10.7 24 24 24H552c13.3 0 24-10.7 24-24s-10.7-24-24-24H248zm0 160c-13.3 0-24 10.7-24 24s10.7 24 24 24H552c13.3 0 24-10.7 24-24s-10.7-24-24-24H248zM224 416c0 13.3 10.7 24 24 24H552c13.3 0 24-10.7 24-24s-10.7-24-24-24H248c-13.3 0-24 10.7-24 24z"/></svg>`,
8382
+ };
8383
+
8384
+ /**
8385
+ * Renderer for the line-height toolbar button in the Vega Rich Text Editor.
8386
+ */
8387
+ class RTELineHeightToolbarButtonRenderer extends VegaRTEToolbarButtonRenderer {
8388
+ constructor(options) {
8389
+ super();
8390
+ this.options = options;
8391
+ }
8392
+ /**
8393
+ * @inheritDoc
8394
+ */
8395
+ render(createElement, editorContext) {
8396
+ const dropdownItems = this.options.map((item) => {
8397
+ var _a;
8398
+ return ({
8399
+ key: item.value,
8400
+ label: (_a = item.title) !== null && _a !== void 0 ? _a : item.value,
8401
+ });
8402
+ });
8403
+ return this.renderDropdown(createElement, editorContext, {
8404
+ selectType: 'single',
8405
+ selectedSourceKey: this.getSelectedSourceValue(editorContext),
8406
+ }, [
8407
+ this.renderButton(createElement, editorContext, {
8408
+ icon: 'line-height',
8409
+ showArrowIcon: true,
8410
+ tooltip: { text: VegaInternalTranslation.t('Line Height') },
8411
+ }),
8412
+ this.renderDropdownListTemplate(createElement, dropdownItems),
8413
+ ]);
8414
+ }
8415
+ /**
8416
+ * @inheritDoc
8417
+ */
8418
+ isSelected() {
8419
+ return false;
8420
+ }
8421
+ /**
8422
+ * @inheritDoc
8423
+ */
8424
+ isDisabled(editorContext) {
8425
+ var _a;
8426
+ if (editorContext.host.disabled) {
8427
+ return true;
8428
+ }
8429
+ const extensionContext = this.getExtensionContext(editorContext.host);
8430
+ const selectedNodes = (_a = extensionContext === null || extensionContext === void 0 ? void 0 : extensionContext.getSelectedNodes()) !== null && _a !== void 0 ? _a : [];
8431
+ if (selectedNodes.some((node) => {
8432
+ var _a;
8433
+ return ((_a = node.getAnnotationByType(NodeAnnotationTypeEnum.CODE)) === null || _a === void 0 ? void 0 : _a.code) ||
8434
+ node.parent instanceof RTECodeBlock;
8435
+ })) {
8436
+ return true;
8437
+ }
8438
+ const selectedBlocks = this.getSelectedBlocks(editorContext);
8439
+ return selectedBlocks.some((block) => block instanceof RTECodeBlock ||
8440
+ block instanceof RTEImageBlock ||
8441
+ !ActionHandleStrategyRegistry.canHandle(LineHeightAnnotationAction.name, block));
8442
+ }
8443
+ /**
8444
+ * @inheritDoc
8445
+ */
8446
+ handleDropdownClick(itemValue, editorContext) {
8447
+ const selectedLineHeight = itemValue;
8448
+ const selectedBlocks = this.getSelectedBlocks(editorContext);
8449
+ selectedBlocks.forEach((block) => {
8450
+ block.apply(new LineHeightAnnotationAction(selectedLineHeight));
8451
+ });
8452
+ }
8453
+ /**
8454
+ * Handle direct toolbar button click.
8455
+ */
8456
+ handleButtonClick() {
8457
+ // No direct click action; selection happens in dropdown options.
8458
+ }
8459
+ /**
8460
+ * Get the selected line-height key for dropdown selection state.
8461
+ *
8462
+ * @param {VegaRTEToolbarRenderContext} editorContext - Current toolbar context.
8463
+ * @returns {string} Selected line-height key or empty string for mixed/none.
8464
+ */
8465
+ getSelectedSourceValue(editorContext) {
8466
+ const selectedBlocks = this.getSelectedBlocks(editorContext);
8467
+ if (selectedBlocks.length === 0) {
8468
+ return '';
8469
+ }
8470
+ const firstAnnotation = selectedBlocks[0].getAnnotationByType(RTELineHeightExtensionAnnotationTypeEnum.LINE_HEIGHT);
8471
+ const isSameLineHeight = selectedBlocks.every((block) => {
8472
+ const annotation = block.getAnnotationByType(RTELineHeightExtensionAnnotationTypeEnum.LINE_HEIGHT);
8473
+ return (annotation === null || annotation === void 0 ? void 0 : annotation.lineHeight) === (firstAnnotation === null || firstAnnotation === void 0 ? void 0 : firstAnnotation.lineHeight);
8474
+ });
8475
+ return isSameLineHeight && firstAnnotation ? firstAnnotation.lineHeight : '';
8476
+ }
8477
+ /**
8478
+ * Resolve selected blocks from selected nodes with range fallback.
8479
+ *
8480
+ * @param {VegaRTEToolbarRenderContext} editorContext - Current toolbar context.
8481
+ * @returns {RTEBlock[]} Selected blocks.
8482
+ */
8483
+ getSelectedBlocks(editorContext) {
8484
+ var _a, _b;
8485
+ const extensionContext = this.getExtensionContext(editorContext.host);
8486
+ const selectedNodes = (_a = extensionContext === null || extensionContext === void 0 ? void 0 : extensionContext.getSelectedNodes()) !== null && _a !== void 0 ? _a : [];
8487
+ const selectedBlocks = [];
8488
+ selectedNodes.forEach((node) => {
8489
+ if (node.parent instanceof RTEBlock && !selectedBlocks.includes(node.parent)) {
8490
+ selectedBlocks.push(node.parent);
8491
+ }
8492
+ });
8493
+ if (selectedBlocks.length === 0 && ((_b = editorContext.rteRange.startNode) === null || _b === void 0 ? void 0 : _b.parent) instanceof RTEBlock) {
8494
+ selectedBlocks.push(editorContext.rteRange.startNode.parent);
8495
+ }
8496
+ return selectedBlocks;
8497
+ }
8498
+ }
8499
+ (() => {
8500
+ VegaInternalIconManager.register({
8501
+ 'line-height': lineHeight,
8502
+ });
8503
+ })();
8504
+
8505
+ const LINE_HEIGHT_AWARE_BLOCK_NAMES = new Set([
8506
+ RTETextBlock.name,
8507
+ RTEListItemBlock.name,
8508
+ ]);
8509
+ /** Handle line height annotation. */
8510
+ class LineHeightAnnotationHandler extends AnnotationGeneratorStrategyAbstract {
8511
+ constructor(options = VegaRTEDefaultLineHeightOptions) {
8512
+ super();
8513
+ this.allowedLineHeights = new Set(options.map((option) => option.value));
8514
+ }
8515
+ /**
8516
+ * Can be handled.
8517
+ *
8518
+ * @param {RTEDtoClassPrototype} targetDto - Target DTO.
8519
+ * @returns {boolean} Whether the target DTO supports line-height annotations.
8520
+ */
8521
+ canHandle(targetDto) {
8522
+ return LINE_HEIGHT_AWARE_BLOCK_NAMES.has(targetDto.name);
8523
+ }
8524
+ /**
8525
+ * Extract inline `line-height` as a semantic `lineHeight` annotation.
8526
+ *
8527
+ * @param {HTMLElement} [element] - Current element.
8528
+ * @returns {VegaRTEBlockAnnotations} `{ lineHeight }` when present, otherwise `{}`.
8529
+ */
8530
+ handle(element) {
8531
+ var _a, _b;
8532
+ const lineHeight = (_b = (_a = element === null || element === void 0 ? void 0 : element.style.lineHeight) === null || _a === void 0 ? void 0 : _a.trim()) !== null && _b !== void 0 ? _b : '';
8533
+ if (!lineHeight) {
8534
+ return {};
8535
+ }
8536
+ if (!this.allowedLineHeights.has(lineHeight)) {
8537
+ return {};
8538
+ }
8539
+ return { lineHeight };
8540
+ }
8541
+ }
8542
+
8543
+ /**
8544
+ * Removes a redundant inline `customStyle.lineHeight` when it duplicates the
8545
+ * semantic `lineHeight` annotation during HTML-to-DTO conversion.
8546
+ *
8547
+ * Note: moving out-of-list line-height values from the semantic annotation to
8548
+ * `customStyle.lineHeight` is handled by the per-host interceptor in
8549
+ * `line-height-host-interceptor.ts`, not here.
8550
+ */
8551
+ class LineHeightFilterStylesStrategy extends RTEFilterStylesStrategy {
8552
+ constructor() {
8553
+ super(...arguments);
8554
+ this.stylesToBeFiltered = {};
8555
+ }
8556
+ /**
8557
+ * Always run this strategy, even when autoMatchFormat is disabled.
8558
+ *
8559
+ * @returns {boolean} Always true.
8560
+ */
8561
+ get alwaysFilter() {
8562
+ return true;
8563
+ }
8564
+ /**
8565
+ * Drop `customStyle.lineHeight` when it duplicates the semantic `lineHeight`.
8566
+ *
8567
+ * @param {VegaRTEAnnotations} annotations - The annotations to filter.
8568
+ * @returns {VegaRTEAnnotations} The same annotations reference.
8569
+ */
8570
+ filterAnnotations(annotations) {
8571
+ const blockAnnotations = annotations;
8572
+ const lineHeight = blockAnnotations.lineHeight;
8573
+ const customStyle = blockAnnotations.customStyle;
8574
+ if (lineHeight && customStyle && customStyle.lineHeight === lineHeight) {
8575
+ delete customStyle.lineHeight;
8576
+ }
8577
+ if (customStyle && Object.keys(customStyle).length === 0) {
8578
+ delete blockAnnotations.customStyle;
8579
+ }
8580
+ return annotations;
8581
+ }
8582
+ }
8583
+
8584
+ /**
8585
+ * Per-class set of allowed line-height values, updated as extension instances
8586
+ * are constructed with (possibly custom) options.
8587
+ */
8588
+ const allowedLineHeightsByClass = new WeakMap();
8589
+ /**
8590
+ * Tracks which block classes have had their JSON `lineHeight` annotation
8591
+ * handler installed, so we register it exactly once per class.
8592
+ */
8593
+ const handlerInstalledClasses = new WeakSet();
8594
+ /**
8595
+ * Move an out-of-range `lineHeight` annotation into `customStyle.lineHeight`.
8596
+ *
8597
+ * @param {RTEBlock} block - The block to inspect.
8598
+ * @param {ReadonlySet<string>} allowed - Allowed line-height values.
8599
+ */
8600
+ function normalizeLineHeightStyle(block, allowed) {
8601
+ const annotation = block.annotationMap.get(RTELineHeightExtensionAnnotationTypeEnum.LINE_HEIGHT);
8602
+ if (!annotation || allowed.has(annotation.lineHeight)) {
8603
+ return;
8604
+ }
8605
+ const value = annotation.lineHeight;
8606
+ block.annotationMap.delete(RTELineHeightExtensionAnnotationTypeEnum.LINE_HEIGHT);
8607
+ const existing = block.annotationMap.get(CommonAnnotationTypeEnum.CUSTOM_STYLE);
8608
+ if (existing) {
8609
+ existing.customStyle = Object.assign(Object.assign({}, existing.customStyle), { lineHeight: value });
8610
+ }
8611
+ else {
8612
+ block.annotationMap.set(...CustomStyleAnnotation.from({ lineHeight: value }));
8613
+ }
8614
+ }
8615
+ /**
8616
+ * Install the JSON `lineHeight` annotation handler for a block class.
8617
+ *
8618
+ * @param {LineHeightBlockClass} BlockClass - Target block class.
8619
+ */
8620
+ function attachLineHeightFromJson(BlockClass) {
8621
+ if (handlerInstalledClasses.has(BlockClass)) {
8622
+ return;
8623
+ }
8624
+ handlerInstalledClasses.add(BlockClass);
8625
+ VegaRTEExtension.attachAnnotationFromJson(BlockClass, 'lineHeight', (instance, value) => {
8626
+ if (typeof value !== 'string' || value === '') {
8627
+ return;
8628
+ }
8629
+ instance.annotationMap.set(...LineHeightAnnotation.from(value));
8630
+ const allowed = allowedLineHeightsByClass.get(BlockClass);
8631
+ if (allowed && allowed.size > 0) {
8632
+ normalizeLineHeightStyle(instance, allowed);
8633
+ }
8634
+ });
8635
+ }
8636
+ /**
8637
+ * Update the set of allowed line-height values for a block class.
8638
+ *
8639
+ * @param {LineHeightBlockClass} BlockClass - Target block class.
8640
+ * @param {VegaRTELineHeightOption[]} options - Allowed line-height options.
8641
+ */
8642
+ function setAllowedLineHeights(BlockClass, options) {
8643
+ allowedLineHeightsByClass.set(BlockClass, new Set(options.map((option) => option.value)));
8644
+ }
8645
+
8646
+ /**
8647
+ * Rich Text Editor extension that adds configurable line-height support
8648
+ * (toolbar control, annotations, content transforms, and JSON parsing).
8649
+ */
8650
+ class VegaRTELineHeightExtension extends VegaRTEExtension {
8651
+ constructor(options = VegaRTEDefaultLineHeightOptions) {
8652
+ super();
8653
+ this.options = options;
8654
+ this.toolbarButtonRenderer = null;
8655
+ this.registerAnnotationHandler(new LineHeightAnnotationHandler(this.options));
8656
+ [RTETextBlock, RTEListItemBlock].forEach((BlockClass) => {
8657
+ setAllowedLineHeights(BlockClass, this.options);
8658
+ });
8659
+ }
8660
+ /**
8661
+ * Register the per-host toolbar renderer so each editor on the page gets
8662
+ * its own isolated line-height renderer instance.
8663
+ *
8664
+ * @typedef HTMLVegaRichTextEditorElement - The type of the host rich text editor element.
8665
+ * @param {HTMLVegaRichTextEditorElement} host - The host element.
8666
+ */
8667
+ prepareBeforeLoad(host) {
8668
+ this.toolbarButtonRenderer = new RTELineHeightToolbarButtonRenderer(this.options);
8669
+ this.registerToolbarButtonRenderer('lineHeight', this.toolbarButtonRenderer, host);
8670
+ }
8671
+ }
8672
+ (() => {
8673
+ [RTETextBlock, RTEListItemBlock].forEach((BlockClass) => {
8674
+ VegaRTEExtension.registerActionHandleStrategy(BlockClass.name, LineHeightAnnotationAction.name, new BlockUpdateLineHeightStrategy());
8675
+ RTEFilterStylesStrategyRegistry.register(BlockClass.name, new LineHeightFilterStylesStrategy());
8676
+ attachLineHeightFromJson(BlockClass);
8677
+ });
7580
8678
  })();
7581
8679
 
7582
8680
  /**
@@ -7690,12 +8788,15 @@ class VegaRTETokenExtension extends VegaRTEExtension {
7690
8788
  constructor(tokenList = []) {
7691
8789
  super();
7692
8790
  this.tokenRenderer = new RTETokenNodeRenderer();
8791
+ this.tokenList = tokenList;
7693
8792
  this.registerNode('token', RTETokenNode);
7694
8793
  this.registerRenderer('token', this.tokenRenderer);
7695
- this.tokenToolbarButtonRenderer = new RTETokenToolbarButtonRenderer(tokenList);
7696
- this.registerToolbarButtonRenderer('token', this.tokenToolbarButtonRenderer);
7697
8794
  this.registerElementToNodeDTOClassStrategy(spanToTokenNodeStrategy);
7698
8795
  }
8796
+ /** @inheritDoc */
8797
+ prepareBeforeLoad(host) {
8798
+ this.registerToolbarButtonRenderer('token', new RTETokenToolbarButtonRenderer(this.tokenList), host);
8799
+ }
7699
8800
  }
7700
8801
  (() => {
7701
8802
  const insertTokenNodeStrategy = new InsertTokenNodeStrategy();
@@ -7703,4 +8804,4 @@ class VegaRTETokenExtension extends VegaRTEExtension {
7703
8804
  VegaRTEExtension.registerActionHandleStrategy(RTEListItemBlock.name, 'INSERT_TOKEN_NODE', insertTokenNodeStrategy);
7704
8805
  })();
7705
8806
 
7706
- export { ActionHandlerInterceptor as A, InsertNodeToNearestRootAction as I, RTETokenToolbarButtonRenderer as R, VegaLoader as V, VegaNotify as a, VegaEventManager$1 as b, VegaZIndexManager$1 as c, VegaSkeletonLoader as d, VegaTranslation as e, VegaRTETokenExtension as f, VegaRTELanguageExtension as g, VegaRTEFunctionExtension as h, VegaRTETableExtension as i, VegaRTEExtension as j, VegaRTEExtensionRenderer as k, VegaRTEToolbarButtonRenderer as l, RTETokenNode as m, RTETokenNodeRenderer as n, RTELanguageToolbarButtonRenderer as o, waitForVega as w };
8807
+ export { ActionHandlerInterceptor as A, InsertNodeToNearestRootAction as I, RTETokenToolbarButtonRenderer as R, VegaLoader as V, VegaNotify as a, VegaEventManager$1 as b, VegaZIndexManager$1 as c, VegaSkeletonLoader as d, VegaTranslation as e, VegaRTETokenExtension as f, VegaRTELanguageExtension as g, VegaRTEDefaultLineHeightOptions as h, VegaRTEFunctionExtension as i, VegaRTETableExtension as j, VegaRTESpecialCharactersExtension as k, VegaRTESpecialCharactersEssentials as l, VegaRTESpecialCharactersLatin as m, VegaRTESpecialCharactersMathematical as n, VegaRTESpecialCharactersArrows as o, VegaRTESpecialCharactersCurrency as p, VegaRTESpecialCharactersText as q, VegaRTELineHeightExtension as r, VegaRTEExtension as s, VegaRTEExtensionRenderer as t, VegaRTEToolbarButtonRenderer as u, RTETokenNode as v, waitForVega as w, RTETokenNodeRenderer as x, RTELanguageToolbarButtonRenderer as y };