@globalpayments/vega 2.87.0 → 2.89.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 (739) hide show
  1. package/dist/cjs/action-color-accessibility-validator-24498816.js +1817 -0
  2. package/dist/cjs/{app-globals-885090b1.js → app-globals-4872f4e6.js} +18 -8
  3. package/dist/cjs/{aria-dialog-focusable-trap-slimmer-c2ca46db.js → aria-dialog-focusable-trap-slimmer-a0ff1263.js} +2 -2
  4. package/dist/cjs/{brand-switch-state-controller-slimmer-3d41b2a4.js → brand-switch-state-controller-slimmer-97882447.js} +1 -1
  5. package/dist/cjs/{child-nodes-event-prevent-slimmer-b7498e5a.js → child-nodes-event-prevent-slimmer-85a7fdb0.js} +1 -1
  6. package/dist/cjs/{child-nodes-notify-observer-slimmer-34a606b3.js → child-nodes-notify-observer-slimmer-7ae2a78f.js} +1 -1
  7. package/dist/cjs/{code-block-15411c14.js → code-block-7c49d175.js} +33 -15
  8. package/dist/cjs/{component-value-history-controller-slimmer.abstract-5218e4b3.js → component-value-history-controller-slimmer.abstract-aae22ddf.js} +27 -7
  9. package/dist/cjs/{content-state-a69d99b4.js → content-state-76b81780.js} +96 -59
  10. package/dist/cjs/{dark-mode-state-controller-slimmer-8a87ec08.js → dark-mode-state-controller-slimmer-b454645a.js} +1 -1
  11. package/dist/cjs/{dark-mode-style-controller-bd765afb.js → dark-mode-style-controller-32d4054a.js} +42 -3
  12. package/dist/cjs/{date-required-rule-d65727c5.js → date-required-rule-71f71b32.js} +1 -1
  13. package/dist/cjs/{design-token-3bc36220.js → design-token-c80d3f32.js} +3 -3
  14. package/dist/cjs/{dom-node-subject-observer-factory-ba6a95f3.js → dom-node-subject-observer-factory-c82df135.js} +1 -1
  15. package/dist/cjs/{element-appender-slimmer-f86e6811.js → element-appender-slimmer-e95427b5.js} +5 -5
  16. package/dist/cjs/{event-emit-slimmer-73c42d7e.js → event-emit-slimmer-146316b2.js} +2 -2
  17. package/dist/cjs/{form-field-controller-slimmer-44091874.js → form-field-controller-slimmer-430b4f02.js} +5 -5
  18. package/dist/cjs/{image-annotation-action-aad07357.js → image-annotation-action-7959fd77.js} +5 -5
  19. package/dist/cjs/index-58ea899e.js +4 -0
  20. package/dist/cjs/index.cjs.js +31 -20
  21. package/dist/cjs/{inject-keyboard-manager-d06b337e.js → inject-keyboard-manager-3ccf1cb6.js} +1 -1
  22. package/dist/cjs/{internal-translation-controller-f0da24b2.js → internal-translation-controller-5582d789.js} +12 -1
  23. package/dist/cjs/{internal-vega-event-manager-063c17cb.js → internal-vega-event-manager-6e49d1ca.js} +4 -4
  24. package/dist/cjs/{keyboard-manager-1e045791.js → keyboard-manager-5babfda8.js} +2 -2
  25. package/dist/cjs/{keyboard-manager-slimmer-861d991f.js → keyboard-manager-slimmer-a73354ca.js} +1 -1
  26. package/dist/cjs/loader.cjs.js +16 -15
  27. package/dist/cjs/{month-view-generator-8ed9818e.js → month-view-generator-43e75062.js} +1 -1
  28. package/dist/cjs/{public-rules-c7726702.js → public-rules-b23ab52d.js} +11 -11
  29. package/dist/cjs/{range-d6fb50a4.js → range-abe1b989.js} +2 -2
  30. package/dist/cjs/replace-selected-text-action-ef079fed.js +20 -0
  31. package/dist/cjs/{responsive-format-facade-9647775d.js → responsive-format-facade-cc368403.js} +1 -1
  32. package/dist/cjs/{rich-text-editor-required-rule-a1a070ce.js → rich-text-editor-required-rule-bbd727a2.js} +1 -1
  33. package/dist/cjs/{split-cell-operation-39b19943.js → split-cell-operation-b1fe91b5.js} +80 -17
  34. package/dist/cjs/{state-border-formatter-1a483a9b.js → state-border-formatter-398134c1.js} +1 -1
  35. package/dist/cjs/{static-subject-title-5829a298.js → static-subject-title-70c73b16.js} +2 -0
  36. package/dist/cjs/{string-format-strategy.abstract-2aec209d.js → string-format-strategy.abstract-67421e2b.js} +1 -1
  37. package/dist/cjs/{string-input-formatter-slimmer-e061bd10.js → string-input-formatter-slimmer-e84530b9.js} +3 -3
  38. package/dist/cjs/{string-mask-strategy-4bc07c00.js → string-mask-strategy-f9806f9b.js} +2 -2
  39. package/dist/cjs/{style-formatter-263d5eb6.js → style-formatter-da3a556b.js} +2 -2
  40. package/dist/cjs/{sub-state-notify-slimmer-757e3a76.js → sub-state-notify-slimmer-450277b6.js} +1 -1
  41. package/dist/cjs/{sub-state-observer-slimmer-aa93ab4f.js → sub-state-observer-slimmer-5bfe8e97.js} +2 -2
  42. package/dist/cjs/{time-required-rule-f9a7e897.js → time-required-rule-618109fa.js} +1 -1
  43. package/dist/cjs/{token-extension-927062b9.js → token-extension-dfee303a.js} +1728 -105
  44. package/dist/cjs/{translation-slimmer-a4a7f0eb.js → translation-slimmer-1a7a2b6d.js} +1 -1
  45. package/dist/cjs/{type-guard-c1195e50.js → type-guard-474dec0d.js} +1 -1
  46. package/dist/cjs/{ui-3727d685.js → ui-c91c37a7.js} +1 -31
  47. package/dist/cjs/{valid-credit-card-number-rule-22f3e6cf.js → valid-credit-card-number-rule-00c18527.js} +1 -1
  48. package/dist/cjs/vega-accordion.cjs.entry.js +25 -18
  49. package/dist/cjs/vega-app-footer.cjs.entry.js +3 -3
  50. package/dist/cjs/vega-app-header-button.cjs.entry.js +15 -15
  51. package/dist/cjs/vega-backdrop.cjs.entry.js +1 -1
  52. package/dist/cjs/vega-banner.cjs.entry.js +5 -5
  53. package/dist/cjs/vega-box.cjs.entry.js +8 -8
  54. package/dist/cjs/vega-brand-logo.cjs.entry.js +3 -3
  55. package/dist/cjs/vega-breadcrumb.cjs.entry.js +7 -7
  56. package/dist/cjs/vega-button-circle.cjs.entry.js +12 -12
  57. package/dist/cjs/vega-button-group_2.cjs.entry.js +8 -8
  58. package/dist/cjs/vega-button-link.cjs.entry.js +8 -8
  59. package/dist/cjs/vega-button.cjs.entry.js +10 -10
  60. package/dist/cjs/vega-calendar_4.cjs.entry.js +15 -15
  61. package/dist/cjs/vega-card.cjs.entry.js +7 -7
  62. package/dist/cjs/vega-carousel.cjs.entry.js +9 -9
  63. package/dist/cjs/vega-checkbox_2.cjs.entry.js +147 -18
  64. package/dist/cjs/vega-chip.cjs.entry.js +14 -14
  65. package/dist/cjs/vega-code-block.cjs.entry.js +19 -18
  66. package/dist/cjs/vega-color-picker.cjs.entry.js +21 -11
  67. package/dist/cjs/vega-color-swatch-picker.cjs.entry.js +11 -11
  68. package/dist/cjs/vega-color-swatch.cjs.entry.js +8 -8
  69. package/dist/cjs/vega-combo-box.cjs.entry.js +56 -21
  70. package/dist/cjs/vega-date-picker_2.cjs.entry.js +347 -274
  71. package/dist/cjs/vega-dialog_2.cjs.entry.js +11 -11
  72. package/dist/cjs/vega-divider.cjs.entry.js +6 -6
  73. package/dist/cjs/vega-dropdown_5.cjs.entry.js +18 -18
  74. package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
  75. package/dist/cjs/{vega-event-id-f95480b7.js → vega-event-id-37c1716f.js} +4 -0
  76. package/dist/cjs/vega-field-error.cjs.entry.js +1 -1
  77. package/dist/cjs/vega-field-label.cjs.entry.js +100 -11
  78. package/dist/cjs/vega-file-uploader.cjs.entry.js +24 -11
  79. package/dist/cjs/vega-flag-icon.cjs.entry.js +6 -6
  80. package/dist/cjs/vega-flex.cjs.entry.js +8 -8
  81. package/dist/cjs/vega-font.cjs.entry.js +7 -7
  82. package/dist/cjs/vega-form.cjs.entry.js +13 -13
  83. package/dist/cjs/vega-grid.cjs.entry.js +7 -7
  84. package/dist/cjs/vega-icon.cjs.entry.js +7 -7
  85. package/dist/cjs/vega-image-uploader.cjs.entry.js +29 -16
  86. package/dist/cjs/vega-input-credit-card.cjs.entry.js +14 -14
  87. package/dist/cjs/vega-input-numeric.cjs.entry.js +28 -15
  88. package/dist/cjs/vega-input-passcode.cjs.entry.js +27 -14
  89. package/dist/cjs/vega-input-phone-number.cjs.entry.js +26 -13
  90. package/dist/cjs/vega-input-range.cjs.entry.js +25 -12
  91. package/dist/cjs/vega-input-select.cjs.entry.js +34 -21
  92. package/dist/cjs/vega-input.cjs.entry.js +28 -15
  93. package/dist/cjs/vega-item-toggle.cjs.entry.js +5 -5
  94. package/dist/cjs/vega-left-nav_5.cjs.entry.js +17 -17
  95. package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +5 -5
  96. package/dist/cjs/vega-page-notification_2.cjs.entry.js +3 -3
  97. package/dist/cjs/vega-pagination-page-selector-mobile.cjs.entry.js +5 -5
  98. package/dist/cjs/vega-pagination-page-size-selector-mobile.cjs.entry.js +6 -6
  99. package/dist/cjs/vega-pagination.cjs.entry.js +11 -11
  100. package/dist/cjs/vega-popover_2.cjs.entry.js +15 -15
  101. package/dist/cjs/vega-progress-tracker_2.cjs.entry.js +11 -11
  102. package/dist/cjs/vega-radio_2.cjs.entry.js +14 -14
  103. package/dist/cjs/vega-rich-text-content.cjs.entry.js +13 -13
  104. package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +297 -201
  105. package/dist/cjs/vega-rich-text-special-characters-panel.cjs.entry.js +400 -0
  106. package/dist/cjs/vega-rich-text-table-properties_3.cjs.entry.js +16 -16
  107. package/dist/cjs/vega-section-title.cjs.entry.js +3 -2
  108. package/dist/cjs/vega-segment-control.cjs.entry.js +6 -6
  109. package/dist/cjs/vega-selection-chip_2.cjs.entry.js +13 -13
  110. package/dist/cjs/vega-selection-tile_2.cjs.entry.js +32 -34
  111. package/dist/cjs/vega-sidenav_3.cjs.entry.js +11 -11
  112. package/dist/cjs/vega-signature-capture.cjs.entry.js +28 -15
  113. package/dist/cjs/vega-stepper.cjs.entry.js +10 -10
  114. package/dist/cjs/vega-tab-group_2.cjs.entry.js +7 -7
  115. package/dist/cjs/vega-table_11.cjs.entry.js +13 -13
  116. package/dist/cjs/vega-text.cjs.entry.js +177 -63
  117. package/dist/cjs/vega-textarea.cjs.entry.js +22 -12
  118. package/dist/cjs/vega-time-picker_2.cjs.entry.js +31 -18
  119. package/dist/cjs/vega-toggle-switch.cjs.entry.js +20 -10
  120. package/dist/cjs/vega-tooltip_2.cjs.entry.js +9 -9
  121. package/dist/cjs/vega.cjs.js +16 -15
  122. package/dist/cjs/{wait-for-component-did-render-a13f7eb9.js → wait-for-component-did-render-762084fc.js} +1 -1
  123. package/dist/collection/collection-manifest.json +6 -0
  124. package/dist/collection/components/vega-accordion/slimmers/vega-accordion-renderer.js +12 -5
  125. package/dist/collection/components/vega-accordion/vega-accordion.css +23 -0
  126. package/dist/collection/components/vega-accordion/vega-accordion.js +28 -0
  127. package/dist/collection/components/vega-app-header-button/vega-app-header-button.css +1 -0
  128. package/dist/collection/components/vega-app-header-button/vega-app-header-button.js +2 -2
  129. package/dist/collection/components/vega-box/vega-box.js +3 -3
  130. package/dist/collection/components/vega-breadcrumb/slimmers/renderers/vega-breadcrumb-collapsed-item-renderer.js +1 -1
  131. package/dist/collection/components/vega-button-link/vega-button-link.css +3 -0
  132. package/dist/collection/components/vega-button-link/vega-button-link.js +1 -1
  133. package/dist/collection/components/vega-checkbox/vega-checkbox-group/vega-checkbox-group.js +96 -4
  134. package/dist/collection/components/vega-checkbox/vega-checkbox.js +148 -6
  135. package/dist/collection/components/vega-chip/vega-chip.css +1 -0
  136. package/dist/collection/components/vega-chip/vega-chip.js +1 -1
  137. package/dist/collection/components/vega-code-block/slimmers/renderers/vega-code-block-copy-button-renderer.js +2 -2
  138. package/dist/collection/components/vega-code-block/vega-code-block.js +4 -0
  139. package/dist/collection/components/vega-color-picker/vega-color-picker.js +36 -2
  140. package/dist/collection/components/vega-combo-box/slimmers/renderers/vega-combo-box-dropdown-renderer.js +14 -2
  141. package/dist/collection/components/vega-combo-box/slimmers/renderers/vega-combo-box-renderer.js +4 -1
  142. package/dist/collection/components/vega-combo-box/vega-combo-box.css +12 -0
  143. package/dist/collection/components/vega-combo-box/vega-combo-box.js +78 -1
  144. package/dist/collection/components/vega-date-picker/slimmers/renderers/vega-date-picker-renderer.js +4 -1
  145. package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/slimmers/controllers/vega-date-picker-calendar-size-controller.js +46 -0
  146. package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-calendar-header-render.js +8 -4
  147. package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-calendar-year-month-switcher-renderer.js +3 -3
  148. package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-month-item-renderer.js +0 -3
  149. package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/vega-date-picker-calendar.js +67 -6
  150. package/dist/collection/components/vega-date-picker/vega-date-picker.js +34 -0
  151. package/dist/collection/components/vega-field-label/slimmers/renderers/vega-field-label-label-announcement-renderer.js +69 -0
  152. package/dist/collection/components/vega-field-label/vega-field-label.css +49 -0
  153. package/dist/collection/components/vega-field-label/vega-field-label.js +50 -1
  154. package/dist/collection/components/vega-file-uploader/slimmers/renderers/vega-file-uploader-renderer.js +4 -1
  155. package/dist/collection/components/vega-file-uploader/vega-file-uploader.js +34 -0
  156. package/dist/collection/components/vega-image-uploader/slimmers/renderers/vega-image-uploader-renderer.js +4 -1
  157. package/dist/collection/components/vega-image-uploader/vega-image-uploader.js +34 -0
  158. package/dist/collection/components/vega-input/slimmers/renderers/vega-input-renderer.js +4 -1
  159. package/dist/collection/components/vega-input/vega-input.js +34 -0
  160. package/dist/collection/components/vega-input-numeric/slimmers/renderers/vega-input-numeric-renderer.js +4 -1
  161. package/dist/collection/components/vega-input-numeric/vega-input-numeric.js +34 -0
  162. package/dist/collection/components/vega-input-passcode/slimmers/renderers/vega-input-passcode-renderer.js +4 -1
  163. package/dist/collection/components/vega-input-passcode/vega-input-passcode.js +34 -0
  164. package/dist/collection/components/vega-input-phone-number/slimmers/renderers/vega-input-phone-number-renderer.js +4 -1
  165. package/dist/collection/components/vega-input-phone-number/vega-input-phone-number.js +34 -0
  166. package/dist/collection/components/vega-input-range/slimmers/renderers/vega-input-range-renderer.js +4 -1
  167. package/dist/collection/components/vega-input-range/vega-input-range.js +34 -0
  168. package/dist/collection/components/vega-input-select/slimmers/renderers/vega-input-select-dropdown-renderer.js +6 -6
  169. package/dist/collection/components/vega-input-select/slimmers/renderers/vega-input-select-renderer.js +4 -1
  170. package/dist/collection/components/vega-input-select/vega-input-select.css +1 -0
  171. package/dist/collection/components/vega-input-select/vega-input-select.js +34 -0
  172. package/dist/collection/components/vega-rich-text-editor/assets/redo.js +3 -0
  173. package/dist/collection/components/vega-rich-text-editor/assets/undo.js +3 -0
  174. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/action-handle-strategy.abstract.js +1 -1
  175. package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/block-delete-node-content-strategy.js +1 -1
  176. package/dist/collection/components/vega-rich-text-editor/dto/annotations/annotation-style.js +2 -2
  177. package/dist/collection/components/vega-rich-text-editor/dto/blocks/block.abstract.js +5 -0
  178. package/dist/collection/components/vega-rich-text-editor/dto/blocks/code-block.js +2 -0
  179. package/dist/collection/components/vega-rich-text-editor/dto/blocks/html-block.js +2 -0
  180. package/dist/collection/components/vega-rich-text-editor/dto/blocks/image-block.js +2 -0
  181. package/dist/collection/components/vega-rich-text-editor/dto/blocks/list-block.js +2 -0
  182. package/dist/collection/components/vega-rich-text-editor/dto/blocks/list-item-block.js +2 -0
  183. package/dist/collection/components/vega-rich-text-editor/dto/blocks/text-block.js +2 -0
  184. package/dist/collection/components/vega-rich-text-editor/dto/content-state.js +3 -0
  185. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/code-block/code-block-filter-styles-strategy.js +1 -1
  186. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/filter-styles-strategy-registry.js +1 -1
  187. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/list-block/list-block-filter-styles-strategy.js +1 -1
  188. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/list-block/list-heading-item-block-filter-styles-strategy.js +1 -1
  189. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/list-block/list-item-block-filter-styles-strategy.js +1 -1
  190. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/list-block/list-title-item-block-filter-styles-strategy.js +1 -1
  191. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/predicate.js +4 -4
  192. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/text-block/paragraph-filter-styles-strategy.js +1 -2
  193. package/dist/collection/components/vega-rich-text-editor/dto/filter-styles-strategies/text-node/title-heading-node-filter-styles-strategy.js +1 -1
  194. package/dist/collection/components/vega-rich-text-editor/dto/nodes/code-block-node.js +2 -0
  195. package/dist/collection/components/vega-rich-text-editor/dto/nodes/image-node.js +2 -0
  196. package/dist/collection/components/vega-rich-text-editor/dto/nodes/node.abstract.js +5 -0
  197. package/dist/collection/components/vega-rich-text-editor/dto/nodes/text-node.js +2 -0
  198. package/dist/collection/components/vega-rich-text-editor/dto/setup.js +29 -29
  199. package/dist/collection/components/vega-rich-text-editor/extensions/base-toolbar-button-renderer.js +105 -1
  200. package/dist/collection/components/vega-rich-text-editor/extensions/extension.abstract.js +50 -1
  201. package/dist/collection/components/vega-rich-text-editor/extensions/functions/dto/function-block.js +2 -0
  202. package/dist/collection/components/vega-rich-text-editor/extensions/functions/dto/logic-control-block.js +2 -0
  203. package/dist/collection/components/vega-rich-text-editor/extensions/functions/dto/logic-control-node.js +2 -0
  204. package/dist/collection/components/vega-rich-text-editor/extensions/functions/function-extension.js +4 -2
  205. package/dist/collection/components/vega-rich-text-editor/extensions/horizontal-line/action-handler-strategies/horizontal-line-block-insert-strategy.js +79 -0
  206. package/dist/collection/components/vega-rich-text-editor/extensions/horizontal-line/action-handler-strategies/hr-to-horizontal-line-block-strategy.js +45 -0
  207. package/dist/collection/components/vega-rich-text-editor/extensions/horizontal-line/actions/insert-horizontal-line-block-action.js +14 -0
  208. package/dist/collection/components/vega-rich-text-editor/extensions/horizontal-line/assets/horizontal-line.js +3 -0
  209. package/dist/collection/components/vega-rich-text-editor/extensions/horizontal-line/dto/horizontal-line-annotation.js +63 -0
  210. package/dist/collection/components/vega-rich-text-editor/extensions/horizontal-line/dto/horizontal-line-block.js +89 -0
  211. package/dist/collection/components/vega-rich-text-editor/extensions/horizontal-line/dto/horizontal-line-node.js +32 -0
  212. package/dist/collection/components/vega-rich-text-editor/extensions/horizontal-line/filter-styles-strategies/horizontal-line-block/horizontal-line-filter-styles-strategy.js +45 -0
  213. package/dist/collection/components/vega-rich-text-editor/extensions/horizontal-line/filter-styles-strategies/horizontal-line-block/predicate.js +14 -0
  214. package/dist/collection/components/vega-rich-text-editor/extensions/horizontal-line/horizontal-line-extension.js +41 -0
  215. package/dist/collection/components/vega-rich-text-editor/extensions/horizontal-line/renderers/horizontal-line-block-renderer.js +37 -0
  216. package/dist/collection/components/vega-rich-text-editor/extensions/horizontal-line/renderers/horizontal-line-toolbar-button-renderer.js +77 -0
  217. package/dist/collection/components/vega-rich-text-editor/extensions/line-height/action-handler-strategies/block-update-line-height-strategy.js +18 -0
  218. package/dist/collection/components/vega-rich-text-editor/extensions/line-height/actions/line-height-annotation-action.js +20 -0
  219. package/dist/collection/components/vega-rich-text-editor/extensions/line-height/annotations/line-height-annotation.js +61 -0
  220. package/dist/collection/components/vega-rich-text-editor/extensions/line-height/assets/line-height.js +3 -0
  221. package/dist/collection/components/vega-rich-text-editor/extensions/line-height/constants.js +11 -0
  222. package/dist/collection/components/vega-rich-text-editor/extensions/line-height/element-to-dto-strategies/line-height-annotation-handler.js +41 -0
  223. package/dist/collection/components/vega-rich-text-editor/extensions/line-height/element-to-dto-strategies/line-height-filter-styles-strategy.js +41 -0
  224. package/dist/collection/components/vega-rich-text-editor/extensions/line-height/element-to-dto-strategies/line-height-from-json-handler.js +65 -0
  225. package/dist/collection/components/vega-rich-text-editor/extensions/line-height/line-height-extension.js +44 -0
  226. package/dist/collection/components/vega-rich-text-editor/extensions/line-height/line-height-toolbar-button-renderer.js +131 -0
  227. package/dist/collection/components/vega-rich-text-editor/extensions/special-characters/constants/arrow-characters.js +24 -0
  228. package/dist/collection/components/vega-rich-text-editor/extensions/special-characters/constants/currency-characters.js +38 -0
  229. package/dist/collection/components/vega-rich-text-editor/extensions/special-characters/constants/default-categories.js +37 -0
  230. package/dist/collection/components/vega-rich-text-editor/extensions/special-characters/constants/latin-characters.js +130 -0
  231. package/dist/collection/components/vega-rich-text-editor/extensions/special-characters/constants/mathematical-characters.js +46 -0
  232. package/dist/collection/components/vega-rich-text-editor/extensions/special-characters/constants/text-characters.js +29 -0
  233. package/dist/collection/components/vega-rich-text-editor/extensions/special-characters/special-characters-extension.js +34 -0
  234. package/dist/collection/components/vega-rich-text-editor/extensions/special-characters/special-characters-icon.js +3 -0
  235. package/dist/collection/components/vega-rich-text-editor/extensions/special-characters/special-characters-toolbar-button-renderer.js +184 -0
  236. package/dist/collection/components/vega-rich-text-editor/extensions/special-characters/types.js +1 -0
  237. package/dist/collection/components/vega-rich-text-editor/extensions/special-characters/vega-rich-text-special-characters-panel/constants.js +11 -0
  238. 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
  239. 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
  240. 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
  241. 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
  242. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotation-handler/table-annotation-handler.js +1 -1
  243. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotation-handler/table-cell-annotation-handler.js +1 -1
  244. package/dist/collection/components/vega-rich-text-editor/extensions/table/annotation-handler/table-head-cell-annotation-handler.js +1 -1
  245. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-block.js +2 -0
  246. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-body-block.js +2 -0
  247. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-caption-block.js +2 -0
  248. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-cell-block.js +2 -0
  249. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-head-block.js +2 -0
  250. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-head-cell-block.js +2 -0
  251. package/dist/collection/components/vega-rich-text-editor/extensions/table/dto/table-row-block.js +2 -0
  252. package/dist/collection/components/vega-rich-text-editor/extensions/table/filter-styles-strategies/table-block/table-block-filter-styles-strategy.js +1 -1
  253. package/dist/collection/components/vega-rich-text-editor/extensions/table/filter-styles-strategies/table-caption/table-caption-filter-styles-strategy.js +1 -1
  254. package/dist/collection/components/vega-rich-text-editor/extensions/table/filter-styles-strategies/table-cell/table-cell-filter-styles-strategy.js +1 -1
  255. package/dist/collection/components/vega-rich-text-editor/extensions/table/table-extension.js +4 -4
  256. package/dist/collection/components/vega-rich-text-editor/extensions/tokens/token-extension.js +5 -2
  257. package/dist/collection/components/vega-rich-text-editor/extensions/tokens/token-node.js +2 -0
  258. package/dist/collection/components/vega-rich-text-editor/extensions/type.js +1 -0
  259. package/dist/collection/components/vega-rich-text-editor/helpers/extension-context-manager.js +8 -2
  260. package/dist/collection/components/vega-rich-text-editor/public-api.js +5 -0
  261. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/bold-annotaion-handler.js +1 -1
  262. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/code-annotation-handler.js +1 -1
  263. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/color-annotation-handler.js +1 -1
  264. 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
  265. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/image-alt-annotation-handler.js +1 -1
  266. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/image-size-annotation-handler.js +1 -1
  267. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/indent-annotation-handler.js +1 -1
  268. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/inline-html-annotation-handler.js +1 -1
  269. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/italic-annotation-handler.js +1 -1
  270. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/link-annotation-handler.js +1 -1
  271. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/strike-through-annotation-handler.js +1 -1
  272. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/text-align-annotation-handler.js +1 -1
  273. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/text-style-annotation-handler.js +1 -1
  274. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/annotation-handler/underline-annotation-handler.js +1 -1
  275. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/html-block-strategy.js +8 -0
  276. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/element-to-dto-strategy/inline-element-to-text-node-strategy.js +18 -1
  277. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/history-controller.js +1 -0
  278. package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/state-entity-rendering-registry.js +1 -1
  279. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/toolbar-renderer.js +14 -0
  280. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/redo-toolbar-button-slimmer.js +36 -0
  281. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/tools/undo-toolbar-button-slimmer.js +36 -0
  282. package/dist/collection/components/vega-rich-text-editor/slimmers/renderers/vega-rich-text-editor-renderer.js +5 -2
  283. package/dist/collection/components/vega-rich-text-editor/vega-rich-text-editor.js +44 -0
  284. package/dist/collection/components/vega-section-title/slimmers/renderers/vega-section-title-renderer.js +1 -1
  285. package/dist/collection/components/vega-section-title/vega-section-title.js +2 -1
  286. package/dist/collection/components/vega-segment-control/slimmers/renderers/vega-segment-renderer.js +1 -1
  287. package/dist/collection/components/vega-selection-tile/vega-selection-tile-group/slimmers/renderers/vega-selection-tile-group-renderer.js +9 -21
  288. package/dist/collection/components/vega-selection-tile/vega-selection-tile-group/vega-selection-tile-group.css +1 -38
  289. package/dist/collection/components/vega-selection-tile/vega-selection-tile-group/vega-selection-tile-group.js +34 -0
  290. package/dist/collection/components/vega-signature-capture/slimmers/written-mode/renderers/written-mode-renderer.js +4 -1
  291. package/dist/collection/components/vega-signature-capture/vega-signature-capture.js +34 -0
  292. package/dist/collection/components/vega-text/slimmers/renderers/vega-text-tooltip-renderer.js +153 -61
  293. package/dist/collection/components/vega-text/vega-text.css +37 -0
  294. package/dist/collection/components/vega-text/vega-text.js +48 -0
  295. package/dist/collection/components/vega-textarea/vega-textarea.js +36 -2
  296. package/dist/collection/components/vega-time-picker/slimmers/renderers/vega-time-picker-label-renderer.js +4 -1
  297. package/dist/collection/components/vega-time-picker/vega-time-picker.js +34 -0
  298. package/dist/collection/components/vega-toggle-switch/vega-toggle-switch.js +35 -1
  299. package/dist/collection/constants/runtime-metrics-payload-definition/public-api/ThemeManager/runtime-metrics-payload-definition.js +30 -10
  300. package/dist/collection/constants/ui.js +2 -0
  301. package/dist/collection/global/scripts/before-vega-load.js +15 -0
  302. package/dist/collection/helpers/change-manager/subject/static-subject/static-subject-title.js +1 -0
  303. package/dist/collection/helpers/event-manager/event-id/component-event-id-map.js +4 -4
  304. package/dist/collection/helpers/event-manager/event-id/vega-event-id.js +2 -0
  305. package/dist/collection/helpers/slimmers/component-value-history-controller-slimmer.abstract.js +22 -2
  306. package/dist/collection/helpers/theme/controllers/action-color-accessibility-validator.js +34 -0
  307. package/dist/collection/helpers/theme/internal-theme-manager.js +39 -2
  308. package/dist/collection/helpers/theme/theme-manager.js +33 -2
  309. package/dist/collection/helpers/translation/locales/en.js +11 -0
  310. package/dist/esm/action-color-accessibility-validator-ce55cb07.js +1815 -0
  311. package/dist/esm/{app-globals-be458779.js → app-globals-081bbfd9.js} +18 -8
  312. package/dist/esm/{aria-dialog-focusable-trap-slimmer-7d9a9f5a.js → aria-dialog-focusable-trap-slimmer-7db3d5a7.js} +2 -2
  313. package/dist/esm/{brand-switch-state-controller-slimmer-60249013.js → brand-switch-state-controller-slimmer-9ca03c81.js} +1 -1
  314. package/dist/esm/{child-nodes-event-prevent-slimmer-0a406a71.js → child-nodes-event-prevent-slimmer-1e3ac106.js} +1 -1
  315. package/dist/esm/{child-nodes-notify-observer-slimmer-8822d0d0.js → child-nodes-notify-observer-slimmer-499a3aa7.js} +1 -1
  316. package/dist/esm/{code-block-ff52d912.js → code-block-17f596fc.js} +34 -16
  317. package/dist/esm/{component-value-history-controller-slimmer.abstract-ad5f29cd.js → component-value-history-controller-slimmer.abstract-21e9126a.js} +27 -7
  318. package/dist/esm/{content-state-6fccd284.js → content-state-96741bb0.js} +96 -59
  319. package/dist/esm/{dark-mode-state-controller-slimmer-f2b4f8ed.js → dark-mode-state-controller-slimmer-778dd929.js} +1 -1
  320. package/dist/esm/{dark-mode-style-controller-e9a6b097.js → dark-mode-style-controller-ca5afd2d.js} +41 -4
  321. package/dist/esm/{date-required-rule-70324452.js → date-required-rule-d6ce832c.js} +1 -1
  322. package/dist/esm/{design-token-0e6fb2c4.js → design-token-0a575bf2.js} +3 -3
  323. package/dist/esm/{dom-node-subject-observer-factory-3897e95b.js → dom-node-subject-observer-factory-ddff8662.js} +1 -1
  324. package/dist/esm/{element-appender-slimmer-afe5a638.js → element-appender-slimmer-44bbb5c6.js} +5 -5
  325. package/dist/esm/{event-emit-slimmer-697ad0b7.js → event-emit-slimmer-3eb4d8ad.js} +2 -2
  326. package/dist/esm/{form-field-controller-slimmer-9e70a18d.js → form-field-controller-slimmer-03894a51.js} +5 -5
  327. package/dist/esm/{image-annotation-action-245eaa54.js → image-annotation-action-e8ab7b64.js} +5 -5
  328. package/dist/esm/index-090d31ca.js +4 -0
  329. package/dist/esm/index.js +21 -20
  330. package/dist/esm/{inject-keyboard-manager-05d5db90.js → inject-keyboard-manager-e5874185.js} +1 -1
  331. package/dist/esm/{internal-translation-controller-d8217d93.js → internal-translation-controller-84958bc9.js} +12 -1
  332. package/dist/esm/{internal-vega-event-manager-1ac5ee9a.js → internal-vega-event-manager-a9758b6e.js} +4 -4
  333. package/dist/esm/{keyboard-manager-26e2fc32.js → keyboard-manager-404b9c17.js} +2 -2
  334. package/dist/esm/{keyboard-manager-slimmer-012a9a9b.js → keyboard-manager-slimmer-c8fcfe60.js} +1 -1
  335. package/dist/esm/loader.js +16 -15
  336. package/dist/esm/{month-view-generator-918f1f88.js → month-view-generator-d341fa5a.js} +1 -1
  337. package/dist/esm/{public-rules-22320bdf.js → public-rules-09387dcf.js} +11 -11
  338. package/dist/esm/{range-76f8e7dd.js → range-47d9f95e.js} +2 -2
  339. package/dist/esm/replace-selected-text-action-a217dc89.js +18 -0
  340. package/dist/esm/{responsive-format-facade-2a1d6398.js → responsive-format-facade-51c0c2e1.js} +1 -1
  341. package/dist/esm/{rich-text-editor-required-rule-6eb90840.js → rich-text-editor-required-rule-cca16fd0.js} +1 -1
  342. package/dist/esm/{split-cell-operation-7652e813.js → split-cell-operation-ddde4106.js} +80 -17
  343. package/dist/esm/{state-border-formatter-a243f3fc.js → state-border-formatter-50394e9c.js} +1 -1
  344. package/dist/esm/{static-subject-title-52f93124.js → static-subject-title-1c86e974.js} +2 -1
  345. package/dist/esm/{string-format-strategy.abstract-f6625ed7.js → string-format-strategy.abstract-de17b899.js} +1 -1
  346. package/dist/esm/{string-input-formatter-slimmer-e801bd7e.js → string-input-formatter-slimmer-c3d483ef.js} +3 -3
  347. package/dist/esm/{string-mask-strategy-53cb9b33.js → string-mask-strategy-87efdb9e.js} +2 -2
  348. package/dist/esm/{style-formatter-a622a045.js → style-formatter-c20c1988.js} +2 -2
  349. package/dist/esm/{sub-state-notify-slimmer-80ac7dee.js → sub-state-notify-slimmer-d5a21bb3.js} +1 -1
  350. package/dist/esm/{sub-state-observer-slimmer-81538a8c.js → sub-state-observer-slimmer-d924288a.js} +2 -2
  351. package/dist/esm/{time-required-rule-2fd8df50.js → time-required-rule-026c17a1.js} +1 -1
  352. package/dist/esm/{token-extension-5838c71b.js → token-extension-76323d76.js} +1719 -106
  353. package/dist/esm/{translation-slimmer-32353a1c.js → translation-slimmer-7f195ba8.js} +1 -1
  354. package/dist/esm/{type-guard-ed1004cc.js → type-guard-30eec79c.js} +1 -1
  355. package/dist/esm/{ui-64815a12.js → ui-d73f756a.js} +2 -30
  356. package/dist/esm/{valid-credit-card-number-rule-7c9d6808.js → valid-credit-card-number-rule-1ac471e8.js} +1 -1
  357. package/dist/esm/vega-accordion.entry.js +25 -18
  358. package/dist/esm/vega-app-footer.entry.js +3 -3
  359. package/dist/esm/vega-app-header-button.entry.js +15 -15
  360. package/dist/esm/vega-backdrop.entry.js +1 -1
  361. package/dist/esm/vega-banner.entry.js +5 -5
  362. package/dist/esm/vega-box.entry.js +8 -8
  363. package/dist/esm/vega-brand-logo.entry.js +3 -3
  364. package/dist/esm/vega-breadcrumb.entry.js +7 -7
  365. package/dist/esm/vega-button-circle.entry.js +12 -12
  366. package/dist/esm/vega-button-group_2.entry.js +8 -8
  367. package/dist/esm/vega-button-link.entry.js +8 -8
  368. package/dist/esm/vega-button.entry.js +10 -10
  369. package/dist/esm/vega-calendar_4.entry.js +15 -15
  370. package/dist/esm/vega-card.entry.js +7 -7
  371. package/dist/esm/vega-carousel.entry.js +9 -9
  372. package/dist/esm/vega-checkbox_2.entry.js +147 -18
  373. package/dist/esm/vega-chip.entry.js +14 -14
  374. package/dist/esm/vega-code-block.entry.js +19 -18
  375. package/dist/esm/vega-color-picker.entry.js +21 -11
  376. package/dist/esm/vega-color-swatch-picker.entry.js +11 -11
  377. package/dist/esm/vega-color-swatch.entry.js +8 -8
  378. package/dist/esm/vega-combo-box.entry.js +56 -21
  379. package/dist/esm/vega-date-picker_2.entry.js +347 -274
  380. package/dist/esm/vega-dialog_2.entry.js +11 -11
  381. package/dist/esm/vega-divider.entry.js +6 -6
  382. package/dist/esm/vega-dropdown_5.entry.js +18 -18
  383. package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
  384. package/dist/esm/{vega-event-id-578c6c6d.js → vega-event-id-92848bf5.js} +3 -1
  385. package/dist/esm/vega-field-error.entry.js +1 -1
  386. package/dist/esm/vega-field-label.entry.js +100 -11
  387. package/dist/esm/vega-file-uploader.entry.js +24 -11
  388. package/dist/esm/vega-flag-icon.entry.js +6 -6
  389. package/dist/esm/vega-flex.entry.js +8 -8
  390. package/dist/esm/vega-font.entry.js +7 -7
  391. package/dist/esm/vega-form.entry.js +13 -13
  392. package/dist/esm/vega-grid.entry.js +7 -7
  393. package/dist/esm/vega-icon.entry.js +7 -7
  394. package/dist/esm/vega-image-uploader.entry.js +29 -16
  395. package/dist/esm/vega-input-credit-card.entry.js +14 -14
  396. package/dist/esm/vega-input-numeric.entry.js +28 -15
  397. package/dist/esm/vega-input-passcode.entry.js +27 -14
  398. package/dist/esm/vega-input-phone-number.entry.js +26 -13
  399. package/dist/esm/vega-input-range.entry.js +25 -12
  400. package/dist/esm/vega-input-select.entry.js +34 -21
  401. package/dist/esm/vega-input.entry.js +28 -15
  402. package/dist/esm/vega-item-toggle.entry.js +5 -5
  403. package/dist/esm/vega-left-nav_5.entry.js +17 -17
  404. package/dist/esm/vega-loader-wrapper_2.entry.js +5 -5
  405. package/dist/esm/vega-page-notification_2.entry.js +3 -3
  406. package/dist/esm/vega-pagination-page-selector-mobile.entry.js +5 -5
  407. package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +6 -6
  408. package/dist/esm/vega-pagination.entry.js +11 -11
  409. package/dist/esm/vega-popover_2.entry.js +15 -15
  410. package/dist/esm/vega-progress-tracker_2.entry.js +11 -11
  411. package/dist/esm/vega-radio_2.entry.js +14 -14
  412. package/dist/esm/vega-rich-text-content.entry.js +13 -13
  413. package/dist/esm/vega-rich-text-editor_4.entry.js +293 -197
  414. package/dist/esm/vega-rich-text-special-characters-panel.entry.js +396 -0
  415. package/dist/esm/vega-rich-text-table-properties_3.entry.js +16 -16
  416. package/dist/esm/vega-section-title.entry.js +3 -2
  417. package/dist/esm/vega-segment-control.entry.js +6 -6
  418. package/dist/esm/vega-selection-chip_2.entry.js +13 -13
  419. package/dist/esm/vega-selection-tile_2.entry.js +32 -34
  420. package/dist/esm/vega-sidenav_3.entry.js +11 -11
  421. package/dist/esm/vega-signature-capture.entry.js +28 -15
  422. package/dist/esm/vega-stepper.entry.js +10 -10
  423. package/dist/esm/vega-tab-group_2.entry.js +7 -7
  424. package/dist/esm/vega-table_11.entry.js +13 -13
  425. package/dist/esm/vega-text.entry.js +177 -63
  426. package/dist/esm/vega-textarea.entry.js +22 -12
  427. package/dist/esm/vega-time-picker_2.entry.js +31 -18
  428. package/dist/esm/vega-toggle-switch.entry.js +20 -10
  429. package/dist/esm/vega-tooltip_2.entry.js +9 -9
  430. package/dist/esm/vega.js +16 -15
  431. package/dist/esm/{wait-for-component-did-render-4069cbea.js → wait-for-component-did-render-b378bf16.js} +1 -1
  432. package/dist/sri/vega-sri-manifest.json +400 -388
  433. package/dist/types/components/vega-accordion/slimmers/vega-accordion-renderer.d.ts +1 -0
  434. package/dist/types/components/vega-accordion/vega-accordion.d.ts +14 -0
  435. package/dist/types/components/vega-checkbox/vega-checkbox-group/vega-checkbox-group.d.ts +41 -1
  436. package/dist/types/components/vega-checkbox/vega-checkbox.d.ts +60 -0
  437. package/dist/types/components/vega-code-block/vega-code-block.d.ts +1 -0
  438. package/dist/types/components/vega-color-picker/vega-color-picker.d.ts +10 -0
  439. package/dist/types/components/vega-combo-box/slimmers/renderers/vega-combo-box-dropdown-renderer.d.ts +1 -0
  440. package/dist/types/components/vega-combo-box/slimmers/renderers/vega-combo-box-renderer.d.ts +1 -0
  441. package/dist/types/components/vega-combo-box/vega-combo-box.d.ts +31 -0
  442. package/dist/types/components/vega-date-picker/slimmers/renderers/vega-date-picker-renderer.d.ts +1 -0
  443. package/dist/types/components/vega-date-picker/vega-date-picker-calendar/slimmers/controllers/vega-date-picker-calendar-size-controller.d.ts +20 -0
  444. package/dist/types/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-calendar-header-render.d.ts +2 -1
  445. 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
  446. package/dist/types/components/vega-date-picker/vega-date-picker-calendar/slimmers/renderers/vega-date-picker-month-item-renderer.d.ts +0 -1
  447. package/dist/types/components/vega-date-picker/vega-date-picker-calendar/vega-date-picker-calendar.d.ts +22 -2
  448. package/dist/types/components/vega-date-picker/vega-date-picker.d.ts +10 -0
  449. package/dist/types/components/vega-field-label/slimmers/renderers/vega-field-label-label-announcement-renderer.d.ts +21 -0
  450. package/dist/types/components/vega-field-label/vega-field-label.d.ts +14 -0
  451. package/dist/types/components/vega-file-uploader/slimmers/renderers/vega-file-uploader-renderer.d.ts +1 -0
  452. package/dist/types/components/vega-file-uploader/vega-file-uploader.d.ts +10 -0
  453. package/dist/types/components/vega-image-uploader/slimmers/renderers/vega-image-uploader-renderer.d.ts +1 -0
  454. package/dist/types/components/vega-image-uploader/vega-image-uploader.d.ts +10 -0
  455. package/dist/types/components/vega-input/slimmers/renderers/vega-input-renderer.d.ts +1 -0
  456. package/dist/types/components/vega-input/vega-input.d.ts +10 -0
  457. package/dist/types/components/vega-input-numeric/slimmers/renderers/vega-input-numeric-renderer.d.ts +1 -0
  458. package/dist/types/components/vega-input-numeric/vega-input-numeric.d.ts +10 -0
  459. package/dist/types/components/vega-input-passcode/slimmers/renderers/vega-input-passcode-renderer.d.ts +1 -0
  460. package/dist/types/components/vega-input-passcode/vega-input-passcode.d.ts +10 -0
  461. package/dist/types/components/vega-input-phone-number/slimmers/renderers/vega-input-phone-number-renderer.d.ts +1 -0
  462. package/dist/types/components/vega-input-phone-number/vega-input-phone-number.d.ts +10 -0
  463. package/dist/types/components/vega-input-range/slimmers/renderers/vega-input-range-renderer.d.ts +1 -0
  464. package/dist/types/components/vega-input-range/vega-input-range.d.ts +10 -0
  465. package/dist/types/components/vega-input-select/slimmers/renderers/vega-input-select-renderer.d.ts +1 -0
  466. package/dist/types/components/vega-input-select/vega-input-select.d.ts +10 -0
  467. package/dist/types/components/vega-rich-text-editor/assets/redo.d.ts +3 -0
  468. package/dist/types/components/vega-rich-text-editor/assets/undo.d.ts +3 -0
  469. package/dist/types/components/vega-rich-text-editor/dto/annotations/annotation-style.d.ts +1 -1
  470. package/dist/types/components/vega-rich-text-editor/dto/blocks/block.abstract.d.ts +5 -0
  471. package/dist/types/components/vega-rich-text-editor/dto/blocks/code-block.d.ts +2 -0
  472. package/dist/types/components/vega-rich-text-editor/dto/blocks/html-block.d.ts +2 -0
  473. package/dist/types/components/vega-rich-text-editor/dto/blocks/image-block.d.ts +2 -0
  474. package/dist/types/components/vega-rich-text-editor/dto/blocks/list-block.d.ts +2 -0
  475. package/dist/types/components/vega-rich-text-editor/dto/blocks/list-item-block.d.ts +2 -0
  476. package/dist/types/components/vega-rich-text-editor/dto/blocks/text-block.d.ts +2 -0
  477. package/dist/types/components/vega-rich-text-editor/dto/content-state.d.ts +3 -0
  478. package/dist/types/components/vega-rich-text-editor/dto/nodes/code-block-node.d.ts +2 -0
  479. package/dist/types/components/vega-rich-text-editor/dto/nodes/image-node.d.ts +2 -0
  480. package/dist/types/components/vega-rich-text-editor/dto/nodes/node.abstract.d.ts +5 -0
  481. package/dist/types/components/vega-rich-text-editor/dto/nodes/text-node.d.ts +2 -0
  482. package/dist/types/components/vega-rich-text-editor/extensions/base-toolbar-button-renderer.d.ts +31 -0
  483. package/dist/types/components/vega-rich-text-editor/extensions/extension.abstract.d.ts +19 -0
  484. package/dist/types/components/vega-rich-text-editor/extensions/functions/dto/function-block.d.ts +2 -0
  485. package/dist/types/components/vega-rich-text-editor/extensions/functions/dto/logic-control-block.d.ts +2 -0
  486. package/dist/types/components/vega-rich-text-editor/extensions/functions/dto/logic-control-node.d.ts +2 -0
  487. package/dist/types/components/vega-rich-text-editor/extensions/functions/function-extension.d.ts +2 -1
  488. package/dist/types/components/vega-rich-text-editor/extensions/horizontal-line/action-handler-strategies/horizontal-line-block-insert-strategy.d.ts +29 -0
  489. package/dist/types/components/vega-rich-text-editor/extensions/horizontal-line/action-handler-strategies/hr-to-horizontal-line-block-strategy.d.ts +35 -0
  490. package/dist/types/components/vega-rich-text-editor/extensions/horizontal-line/actions/insert-horizontal-line-block-action.d.ts +15 -0
  491. package/dist/types/components/vega-rich-text-editor/extensions/horizontal-line/assets/horizontal-line.d.ts +3 -0
  492. package/dist/types/components/vega-rich-text-editor/extensions/horizontal-line/dto/horizontal-line-annotation.d.ts +43 -0
  493. package/dist/types/components/vega-rich-text-editor/extensions/horizontal-line/dto/horizontal-line-block.d.ts +53 -0
  494. package/dist/types/components/vega-rich-text-editor/extensions/horizontal-line/dto/horizontal-line-node.d.ts +26 -0
  495. package/dist/types/components/vega-rich-text-editor/extensions/horizontal-line/filter-styles-strategies/horizontal-line-block/horizontal-line-filter-styles-strategy.d.ts +31 -0
  496. package/dist/types/components/vega-rich-text-editor/extensions/horizontal-line/filter-styles-strategies/horizontal-line-block/predicate.d.ts +12 -0
  497. package/dist/types/components/vega-rich-text-editor/extensions/horizontal-line/horizontal-line-extension.d.ts +9 -0
  498. package/dist/types/components/vega-rich-text-editor/extensions/horizontal-line/renderers/horizontal-line-block-renderer.d.ts +16 -0
  499. package/dist/types/components/vega-rich-text-editor/extensions/horizontal-line/renderers/horizontal-line-toolbar-button-renderer.d.ts +27 -0
  500. package/dist/types/components/vega-rich-text-editor/extensions/line-height/action-handler-strategies/block-update-line-height-strategy.d.ts +18 -0
  501. package/dist/types/components/vega-rich-text-editor/extensions/line-height/actions/line-height-annotation-action.d.ts +16 -0
  502. package/dist/types/components/vega-rich-text-editor/extensions/line-height/annotations/line-height-annotation.d.ts +46 -0
  503. package/dist/types/components/vega-rich-text-editor/extensions/line-height/assets/line-height.d.ts +3 -0
  504. package/dist/types/components/vega-rich-text-editor/extensions/line-height/constants.d.ts +6 -0
  505. package/dist/types/components/vega-rich-text-editor/extensions/line-height/element-to-dto-strategies/line-height-annotation-handler.d.ts +23 -0
  506. package/dist/types/components/vega-rich-text-editor/extensions/line-height/element-to-dto-strategies/line-height-filter-styles-strategy.d.ts +26 -0
  507. package/dist/types/components/vega-rich-text-editor/extensions/line-height/element-to-dto-strategies/line-height-from-json-handler.d.ts +17 -0
  508. package/dist/types/components/vega-rich-text-editor/extensions/line-height/line-height-extension.d.ts +19 -0
  509. package/dist/types/components/vega-rich-text-editor/extensions/line-height/line-height-toolbar-button-renderer.d.ts +44 -0
  510. package/dist/types/components/vega-rich-text-editor/extensions/special-characters/constants/arrow-characters.d.ts +2 -0
  511. package/dist/types/components/vega-rich-text-editor/extensions/special-characters/constants/currency-characters.d.ts +2 -0
  512. package/dist/types/components/vega-rich-text-editor/extensions/special-characters/constants/default-categories.d.ts +7 -0
  513. package/dist/types/components/vega-rich-text-editor/extensions/special-characters/constants/latin-characters.d.ts +2 -0
  514. package/dist/types/components/vega-rich-text-editor/extensions/special-characters/constants/mathematical-characters.d.ts +2 -0
  515. package/dist/types/components/vega-rich-text-editor/extensions/special-characters/constants/text-characters.d.ts +2 -0
  516. package/dist/types/components/vega-rich-text-editor/extensions/special-characters/special-characters-extension.d.ts +20 -0
  517. package/dist/types/components/vega-rich-text-editor/extensions/special-characters/special-characters-icon.d.ts +3 -0
  518. package/dist/types/components/vega-rich-text-editor/extensions/special-characters/special-characters-toolbar-button-renderer.d.ts +83 -0
  519. package/dist/types/components/vega-rich-text-editor/extensions/special-characters/types.d.ts +20 -0
  520. package/dist/types/components/vega-rich-text-editor/extensions/special-characters/vega-rich-text-special-characters-panel/constants.d.ts +11 -0
  521. 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
  522. 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
  523. 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
  524. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-block.d.ts +2 -0
  525. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-body-block.d.ts +2 -0
  526. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-caption-block.d.ts +2 -0
  527. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-cell-block.d.ts +2 -0
  528. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-head-block.d.ts +2 -0
  529. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-head-cell-block.d.ts +2 -0
  530. package/dist/types/components/vega-rich-text-editor/extensions/table/dto/table-row-block.d.ts +2 -0
  531. package/dist/types/components/vega-rich-text-editor/extensions/tokens/token-extension.d.ts +3 -1
  532. package/dist/types/components/vega-rich-text-editor/extensions/tokens/token-node.d.ts +2 -0
  533. package/dist/types/components/vega-rich-text-editor/extensions/type.d.ts +14 -0
  534. package/dist/types/components/vega-rich-text-editor/helpers/extension-context-manager.d.ts +1 -1
  535. package/dist/types/components/vega-rich-text-editor/interface.d.ts +8 -0
  536. package/dist/types/components/vega-rich-text-editor/public-api.d.ts +6 -0
  537. 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
  538. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/toolbar-renderer.d.ts +3 -0
  539. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/redo-toolbar-button-slimmer.d.ts +9 -0
  540. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/tools/undo-toolbar-button-slimmer.d.ts +9 -0
  541. package/dist/types/components/vega-rich-text-editor/slimmers/renderers/vega-rich-text-editor-renderer.d.ts +1 -0
  542. package/dist/types/components/vega-rich-text-editor/vega-rich-text-editor.d.ts +14 -0
  543. package/dist/types/components/vega-selection-tile/vega-selection-tile-group/slimmers/renderers/vega-selection-tile-group-renderer.d.ts +2 -1
  544. package/dist/types/components/vega-selection-tile/vega-selection-tile-group/vega-selection-tile-group.d.ts +10 -0
  545. package/dist/types/components/vega-signature-capture/slimmers/written-mode/renderers/written-mode-renderer.d.ts +1 -0
  546. package/dist/types/components/vega-signature-capture/vega-signature-capture.d.ts +10 -0
  547. package/dist/types/components/vega-text/slimmers/renderers/vega-text-tooltip-renderer.d.ts +34 -12
  548. package/dist/types/components/vega-text/vega-text.d.ts +19 -0
  549. package/dist/types/components/vega-textarea/vega-textarea.d.ts +10 -0
  550. package/dist/types/components/vega-time-picker/slimmers/renderers/vega-time-picker-label-renderer.d.ts +1 -0
  551. package/dist/types/components/vega-time-picker/vega-time-picker.d.ts +10 -0
  552. package/dist/types/components/vega-toggle-switch/vega-toggle-switch.d.ts +10 -0
  553. package/dist/types/components.d.ts +341 -5
  554. package/dist/types/constants/ui.d.ts +1 -1
  555. package/dist/types/helpers/change-manager/subject/static-subject/static-subject-title.d.ts +2 -1
  556. package/dist/types/helpers/event-manager/event-id/vega-event-id.d.ts +2 -0
  557. package/dist/types/helpers/slimmers/component-value-history-controller-slimmer.abstract.d.ts +13 -0
  558. package/dist/types/helpers/theme/controllers/action-color-accessibility-validator.d.ts +10 -0
  559. package/dist/types/helpers/theme/internal-theme-manager.d.ts +28 -1
  560. package/dist/types/helpers/theme/theme-manager.d.ts +24 -1
  561. package/dist/types/helpers/theme/theme.d.ts +8 -0
  562. package/dist/types/helpers/translation/interface.d.ts +13 -1
  563. package/dist/types/types/components.type.d.ts +11 -10
  564. package/dist/types/types/public-api.d.ts +1 -0
  565. package/dist/types/vega-color-token-contrast-checker/src/check/checker.d.ts +177 -0
  566. package/dist/types/vega-color-token-contrast-checker/src/check/color-math.d.ts +125 -0
  567. package/dist/types/vega-color-token-contrast-checker/src/check/contrast-check-strategy.d.ts +38 -0
  568. package/dist/types/vega-color-token-contrast-checker/src/check/search.d.ts +58 -0
  569. package/dist/types/vega-color-token-contrast-checker/src/check/token-checks.d.ts +122 -0
  570. package/dist/types/vega-color-token-contrast-checker/src/check/token-checks.generated.d.ts +2 -0
  571. package/dist/types/vega-color-token-contrast-checker/src/index.d.ts +2 -0
  572. package/dist/vega/index.esm.js +1 -1
  573. package/dist/vega/{p-76075a1c.entry.js → p-00d2a013.entry.js} +1 -1
  574. package/dist/vega/{p-77fb5d5c.js → p-014cd411.js} +1 -1
  575. package/dist/vega/{p-e7c930d9.entry.js → p-059ba5f5.entry.js} +1 -1
  576. package/dist/vega/p-091fbc35.js +1 -0
  577. package/dist/vega/p-09deb867.entry.js +1 -0
  578. package/dist/vega/{p-9e0f8b46.entry.js → p-0e298ee8.entry.js} +1 -1
  579. package/dist/vega/p-157a2459.entry.js +1 -0
  580. package/dist/vega/p-1827a459.entry.js +1 -0
  581. package/dist/vega/{p-a0dd08b1.js → p-1ab4c08d.js} +1 -1
  582. package/dist/vega/{p-79bb216e.entry.js → p-1d16a7fa.entry.js} +1 -1
  583. package/dist/vega/p-1e68e217.entry.js +1 -0
  584. package/dist/vega/{p-ff5208f5.entry.js → p-2649051e.entry.js} +1 -1
  585. package/dist/vega/{p-07225567.entry.js → p-26a54a73.entry.js} +1 -1
  586. package/dist/vega/{p-d9d4bdbf.entry.js → p-285b161c.entry.js} +1 -1
  587. package/dist/vega/{p-858ec529.js → p-2abdca42.js} +1 -1
  588. package/dist/vega/{p-5df7ab03.entry.js → p-2c5352fe.entry.js} +1 -1
  589. package/dist/vega/p-2e86aee5.js +1 -0
  590. package/dist/vega/p-2f2201d6.entry.js +1 -0
  591. package/dist/vega/p-306720b8.entry.js +1 -0
  592. package/dist/vega/{p-ab04eff6.js → p-328dbe8e.js} +1 -1
  593. package/dist/vega/p-337440ce.entry.js +1 -0
  594. package/dist/vega/{p-281fa1e0.js → p-3390bb20.js} +1 -1
  595. package/dist/vega/{p-4c91b13d.js → p-35e800ac.js} +1 -1
  596. package/dist/vega/{p-e8de9535.js → p-363e453b.js} +1 -1
  597. package/dist/vega/{p-2d694684.js → p-3a49089e.js} +1 -1
  598. package/dist/vega/{p-296c5e52.js → p-3a5737fa.js} +1 -1
  599. package/dist/vega/{p-8aee6b74.js → p-3e09aeed.js} +1 -1
  600. package/dist/vega/{p-ce034372.entry.js → p-3ef9c69d.entry.js} +1 -1
  601. package/dist/vega/{p-d1a6e126.entry.js → p-43af604c.entry.js} +1 -1
  602. package/dist/vega/{p-bd47d8a7.entry.js → p-44d2f9e7.entry.js} +1 -1
  603. package/dist/vega/{p-d97974be.entry.js → p-4694fe27.entry.js} +1 -1
  604. package/dist/vega/p-46cab60a.js +1 -0
  605. package/dist/vega/{p-341d5e4e.js → p-46e0c6ca.js} +1 -1
  606. package/dist/vega/{p-bee5dfb0.entry.js → p-48ea74b5.entry.js} +1 -1
  607. package/dist/vega/p-4b34df4c.entry.js +1 -0
  608. package/dist/vega/p-4c6baf92.entry.js +1 -0
  609. package/dist/vega/p-4edd7f8c.js +1 -0
  610. package/dist/vega/p-50e7020c.js +1 -0
  611. package/dist/vega/{p-11e2dcf5.js → p-526e3634.js} +1 -1
  612. package/dist/vega/p-528748fa.js +1 -0
  613. package/dist/vega/{p-aa8f4713.entry.js → p-57b34bf9.entry.js} +1 -1
  614. package/dist/vega/{p-ac26924d.entry.js → p-5a6e2c08.entry.js} +1 -1
  615. package/dist/vega/p-5f09aba8.js +1 -0
  616. package/dist/vega/p-5f377954.js +1 -1
  617. package/dist/vega/{p-b69755c7.entry.js → p-5fd29f29.entry.js} +1 -1
  618. package/dist/vega/p-600f0316.entry.js +1 -0
  619. package/dist/vega/{p-3a3720c7.entry.js → p-61536fcf.entry.js} +1 -1
  620. package/dist/vega/{p-154cc614.js → p-630cd479.js} +1 -1
  621. package/dist/vega/{p-7ffe8081.entry.js → p-66b2a285.entry.js} +1 -1
  622. package/dist/vega/p-6a3ea3f0.entry.js +1 -0
  623. package/dist/vega/p-6c484462.entry.js +1 -0
  624. package/dist/vega/p-73508c24.js +1 -0
  625. package/dist/vega/{p-31ebace1.js → p-76454c9a.js} +1 -1
  626. package/dist/vega/{p-f5ae99b4.entry.js → p-78a6e741.entry.js} +1 -1
  627. package/dist/vega/p-7fbd11b0.js +1 -0
  628. package/dist/vega/{p-d4262f06.entry.js → p-8258dc37.entry.js} +1 -1
  629. package/dist/vega/p-8457b6b7.entry.js +1 -0
  630. package/dist/vega/{p-52645382.entry.js → p-8666f206.entry.js} +1 -1
  631. package/dist/vega/p-8865613a.entry.js +1 -0
  632. package/dist/vega/p-894fb9c9.entry.js +1 -0
  633. package/dist/vega/p-89947a43.js +1 -0
  634. package/dist/vega/{p-01a54c29.entry.js → p-89d55444.entry.js} +1 -1
  635. package/dist/vega/{p-ea48decc.js → p-8a34c08a.js} +1 -1
  636. package/dist/vega/p-8a3d12e6.js +1 -0
  637. package/dist/vega/p-8ce92f5f.entry.js +1 -0
  638. package/dist/vega/p-92e493ea.entry.js +1 -0
  639. package/dist/vega/{p-d286da1d.entry.js → p-93cbc231.entry.js} +1 -1
  640. package/dist/vega/{p-b02b985d.js → p-94a064a3.js} +1 -1
  641. package/dist/vega/{p-fdb97cb7.entry.js → p-976536c7.entry.js} +1 -1
  642. package/dist/vega/{p-7e7e2f85.entry.js → p-9a35a34f.entry.js} +1 -1
  643. package/dist/vega/p-9a562813.entry.js +1 -0
  644. package/dist/vega/p-9cb92fa3.entry.js +1 -0
  645. package/dist/vega/{p-3967fa98.entry.js → p-a05a2f1e.entry.js} +1 -1
  646. package/dist/vega/p-a0705cd0.entry.js +1 -0
  647. package/dist/vega/p-a18d280f.js +3 -0
  648. package/dist/vega/{p-10fa27d2.js → p-a58cacca.js} +1 -1
  649. package/dist/vega/{p-6399b5ed.js → p-a9b6ce74.js} +1 -1
  650. package/dist/vega/{p-19adf714.js → p-ad89f499.js} +1 -1
  651. package/dist/vega/{p-78ba7ca9.js → p-b2488adb.js} +1 -1
  652. package/dist/vega/{p-7cd2b93b.js → p-b3420fcf.js} +1 -1
  653. package/dist/vega/{p-0a322971.entry.js → p-b3b22e36.entry.js} +1 -1
  654. package/dist/vega/{p-2b2fefc6.js → p-b66d46ce.js} +1 -1
  655. package/dist/vega/p-b9bd85d6.entry.js +1 -0
  656. package/dist/vega/{p-636d890e.entry.js → p-baef217a.entry.js} +1 -1
  657. package/dist/vega/p-bd5566e3.entry.js +1 -0
  658. package/dist/vega/{p-189d36ec.js → p-be6c1415.js} +1 -1
  659. package/dist/vega/p-c016b230.entry.js +1 -0
  660. package/dist/vega/{p-ec663f00.entry.js → p-c3be0c29.entry.js} +1 -1
  661. package/dist/vega/{p-2e0bdc53.entry.js → p-c4bd6cf8.entry.js} +1 -1
  662. package/dist/vega/{p-09076646.js → p-c91e0a43.js} +1 -1
  663. package/dist/vega/{p-c45acdc3.entry.js → p-ca4773c3.entry.js} +1 -1
  664. package/dist/vega/p-cb378636.js +1 -0
  665. package/dist/vega/p-cdde6e64.entry.js +1 -0
  666. package/dist/vega/p-d1cc3544.entry.js +1 -0
  667. package/dist/vega/p-d25ca0c3.entry.js +1 -0
  668. package/dist/vega/{p-919de162.js → p-d2916121.js} +1 -1
  669. package/dist/vega/p-d319ebb5.js +1 -0
  670. package/dist/vega/{p-04a65b3f.js → p-d7790113.js} +1 -1
  671. package/dist/vega/{p-255a7387.entry.js → p-d93574dd.entry.js} +1 -1
  672. package/dist/vega/{p-c19132c9.entry.js → p-dbb02b32.entry.js} +1 -1
  673. package/dist/vega/p-dd529875.js +1 -0
  674. package/dist/vega/{p-879d3cc9.entry.js → p-df3a649c.entry.js} +1 -1
  675. package/dist/vega/p-df71c830.entry.js +1 -0
  676. package/dist/vega/p-e80e7cd9.entry.js +1 -0
  677. package/dist/vega/{p-a03341d8.entry.js → p-ed0cc518.entry.js} +1 -1
  678. package/dist/vega/{p-e85497ec.entry.js → p-efe48ed5.entry.js} +1 -1
  679. package/dist/vega/p-efe6e4e6.entry.js +1 -0
  680. package/dist/vega/{p-15b4f1ce.entry.js → p-f597b65e.entry.js} +1 -1
  681. package/dist/vega/p-f764b62e.entry.js +1 -0
  682. package/dist/vega/p-f7c6af07.js +1 -0
  683. package/dist/vega/{p-49341532.entry.js → p-f7cab150.entry.js} +1 -1
  684. package/dist/vega/{p-72e2a587.js → p-f7e8081e.js} +1 -1
  685. package/dist/vega/p-fa398acc.entry.js +1 -0
  686. package/dist/vega/p-fae4d64e.js +1 -0
  687. package/dist/vega/{p-891815d6.js → p-fbde6153.js} +1 -1
  688. package/dist/vega/{p-3bf3c8bb.entry.js → p-fc0ce3b5.entry.js} +1 -1
  689. package/dist/vega/p-fcefb62c.js +1 -0
  690. package/dist/vega/p-ff24b342.entry.js +1 -0
  691. package/dist/vega/vega.esm.js +1 -1
  692. package/package.json +3 -2
  693. package/dist/vega/p-042933f1.js +0 -1
  694. package/dist/vega/p-0a261b66.js +0 -1
  695. package/dist/vega/p-0b41b49a.entry.js +0 -1
  696. package/dist/vega/p-0d97dcb9.js +0 -1
  697. package/dist/vega/p-186df871.entry.js +0 -1
  698. package/dist/vega/p-19df2831.entry.js +0 -1
  699. package/dist/vega/p-1da42a63.entry.js +0 -1
  700. package/dist/vega/p-2927b7a1.js +0 -1
  701. package/dist/vega/p-294cff20.entry.js +0 -1
  702. package/dist/vega/p-32a0f887.js +0 -1
  703. package/dist/vega/p-4a6f241d.entry.js +0 -1
  704. package/dist/vega/p-4a954d9d.entry.js +0 -1
  705. package/dist/vega/p-4a9c8ec0.entry.js +0 -1
  706. package/dist/vega/p-4dd02704.js +0 -1
  707. package/dist/vega/p-50fb936f.entry.js +0 -1
  708. package/dist/vega/p-5b43a303.entry.js +0 -1
  709. package/dist/vega/p-612808ce.entry.js +0 -1
  710. package/dist/vega/p-648be36d.entry.js +0 -1
  711. package/dist/vega/p-686e0b6b.entry.js +0 -1
  712. package/dist/vega/p-6d4faebc.js +0 -1
  713. package/dist/vega/p-70ae9157.entry.js +0 -1
  714. package/dist/vega/p-74a1a82a.entry.js +0 -1
  715. package/dist/vega/p-8077b117.js +0 -1
  716. package/dist/vega/p-88e56a47.entry.js +0 -1
  717. package/dist/vega/p-8d36afcc.entry.js +0 -1
  718. package/dist/vega/p-931dac8c.entry.js +0 -1
  719. package/dist/vega/p-979a5e91.entry.js +0 -1
  720. package/dist/vega/p-98dad153.entry.js +0 -1
  721. package/dist/vega/p-a2b8d49d.js +0 -1
  722. package/dist/vega/p-a528714c.js +0 -1
  723. package/dist/vega/p-a5713178.js +0 -1
  724. package/dist/vega/p-a6565e02.js +0 -1
  725. package/dist/vega/p-a67d52ce.entry.js +0 -1
  726. package/dist/vega/p-aa4e9a4b.entry.js +0 -1
  727. package/dist/vega/p-ab4c307b.js +0 -1
  728. package/dist/vega/p-ce2d9efe.entry.js +0 -1
  729. package/dist/vega/p-d05915af.entry.js +0 -1
  730. package/dist/vega/p-d5aad9f0.entry.js +0 -1
  731. package/dist/vega/p-e46a23fc.entry.js +0 -1
  732. package/dist/vega/p-e8ea3b16.js +0 -3
  733. package/dist/vega/p-ea0e922f.entry.js +0 -1
  734. package/dist/vega/p-eb78a2f2.entry.js +0 -1
  735. package/dist/vega/p-ec2333f7.entry.js +0 -1
  736. package/dist/vega/p-ec2a1d4c.js +0 -1
  737. package/dist/vega/p-ed2b0e01.entry.js +0 -1
  738. package/dist/vega/p-ef13b346.js +0 -1
  739. package/dist/vega/p-fe220f3a.entry.js +0 -1
@@ -1,30 +1,31 @@
1
1
  import { g as generateUUID } from './misc-9fdbcfbb.js';
2
- import { a as arrayToClassString, g as getDeviceType, D as DeviceType, f as findParent, r as rgbToHex } from './ui-64815a12.js';
2
+ import { a as arrayToClassString, g as getDeviceType, D as DeviceType, f as findParent, r as rgbToHex } from './ui-d73f756a.js';
3
3
  import { L as LogUtility, I as InjectVegaSlimmer } from './global-slimmer-registry-17c4efd4.js';
4
4
  import { I as InjectVegaTelemetrySlimmer, c as createPublicAPIRuntimeMetricsSlimmer } from './create-public-api-runtime-metrics-slimmer-da6615bf.js';
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-a9758b6e.js';
9
+ import { V as VegaInternalTranslation } from './internal-translation-controller-84958bc9.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-96741bb0.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, q as RTEDecoratorNode, S as SplitBlockWithNodeAction, U as UpdateTextAction, N as NodeAnnotationTypeEnum, r as RTECodeBlock, t as CustomStyleAnnotation } from './code-block-17f596fc.js';
12
+ import { i as isNonNullable } from './type-guard-30eec79c.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
- 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';
17
+ import { D as DomNodeSubjectObserverFactory, d as domNodeSubjectFactory } from './dom-node-subject-observer-factory-ddff8662.js';
18
+ import { V as VegaDropdownClick, a as VegaClick, b as VegaPopoverHide, c as VegaPopoverShow } from './vega-event-id-92848bf5.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-ddde4106.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-ca5afd2d.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-a217dc89.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
  */
@@ -2857,7 +3027,7 @@ class VegaRTEFunctionExtension extends VegaRTEExtension {
2857
3027
  VegaRTEExtension.registerActionHandlerInterceptor(RTETextBlock.name, ModifyContentActionType.PASTE_CONTENT, new PreventPasteContentInterceptor());
2858
3028
  })();
2859
3029
 
2860
- const tableBlockStylesCss = ".v-rte--extension-table-container{display:table}table.v-rte--extension-table{border-collapse:collapse}table.v-rte--extension-table th,table.v-rte--extension-table td{border:1px solid #ddd;padding:12px;text-align:left;vertical-align:middle;min-width:55px;box-sizing:border-box;position:relative}table.v-rte--extension-table th{background-color:#f2f2f2}.rte-table-setting-popover,.rte-table-dynamic-popover{display:block}table.v-rte--extension-table .v-rte-table-cell-focused::after,table.v-rte--extension-table .v-rte-table-cell-selected::after{content:'';position:absolute;top:0;left:0;right:0;bottom:0;pointer-events:none;background-color:rgba(158, 207, 250, 0.3)}table.v-rte--extension-table:has(.v-rte-table-cell-selected){caret-color:transparent}table.v-rte--extension-table:has(.v-rte-table-cell-selected) ::selection{background-color:transparent}table.v-rte--extension-table:has(.v-rte-table-cell-selected) ::-moz-selection{background-color:transparent}.v-rte--extension-table-caption{padding:8px;border:1px solid #ddd;border-bottom:none;background-color:rgba(var(--v-bg-table-header, 24, 24, 48));position:relative;display:table-caption;caption-side:top;min-height:22px;text-align:center;word-break:break-word;overflow-wrap:break-word}.v-rte--extension-table-caption.showPlaceholder::before{position:absolute;left:0;right:0;content:attr(data-placeholder);font-family:'Inter', sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0;color:rgba(var(--v-text-input-placeholder, 176, 180, 181, 1));text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}";
3030
+ const tableBlockStylesCss = ".v-rte--extension-table-container{display:table}table.v-rte--extension-table{border-collapse:collapse}table.v-rte--extension-table th,table.v-rte--extension-table td{border:1px solid #ddd;padding:12px;text-align:left;vertical-align:middle;min-width:55px;box-sizing:border-box;position:relative}table.v-rte--extension-table th{background-color:#f2f2f2}.rte-table-setting-popover,.rte-table-dynamic-popover{display:block}table.v-rte--extension-table .v-rte-table-cell-focused::after,table.v-rte--extension-table .v-rte-table-cell-selected::after{content:'';position:absolute;top:0;left:0;right:0;bottom:0;pointer-events:none;background-color:rgba(158, 207, 250, 0.3)}table.v-rte--extension-table:has(.v-rte-table-cell-selected){caret-color:transparent}table.v-rte--extension-table:has(.v-rte-table-cell-selected) ::selection{background-color:transparent}table.v-rte--extension-table:has(.v-rte-table-cell-selected) ::-moz-selection{background-color:transparent}.v-rte--extension-table-caption{padding:8px;border:1px solid #ddd;border-bottom:none;background-color:rgba(var(--v-bg-table-header, 240, 243, 247, 1));position:relative;display:table-caption;caption-side:top;min-height:22px;text-align:center;word-break:break-word;overflow-wrap:break-word}.v-rte--extension-table-caption.showPlaceholder::before{position:absolute;left:0;right:0;content:attr(data-placeholder);font-family:'Inter', sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0;color:rgba(var(--v-text-input-placeholder, 176, 180, 181, 1));text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}";
2861
3031
 
2862
3032
  const DELETE_TABLE_BLOCK = 'DELETE_TABLE_BLOCK';
2863
3033
  /**
@@ -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,128 +7745,1569 @@ 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'));
7580
7752
  })();
7581
7753
 
7582
7754
  /**
7583
- * Insert a new children to the nearest position of the parent container
7584
- *
7585
- * @example parent.apply(new InsertNodeToNearestRoot(rteRange, nodeToBeInserted))
7755
+ * Horizontal line node a decorator node representing `<hr>` in the editor.
7586
7756
  */
7587
- class InsertNodeToNearestRootAction extends ModifyContentAction {
7588
- constructor(rteRange, nodeToBeInserted) {
7589
- super();
7590
- this.type = ModifyContentActionType.INSERT_NODE_TO_NEAREST_ROOT;
7591
- this.rteRange = rteRange;
7592
- this.nodeToBeInserted = nodeToBeInserted;
7757
+ class RTEHorizontalLineNode extends RTEDecoratorNode {
7758
+ constructor(id, parentBlock, annotationMap) {
7759
+ super(id, annotationMap);
7760
+ this.type = 'horizontal-line';
7761
+ this.parent = parentBlock;
7762
+ }
7763
+ /**
7764
+ * @inheritDoc
7765
+ */
7766
+ toJSON() {
7767
+ return {
7768
+ id: this.id,
7769
+ type: 'horizontal-line',
7770
+ };
7771
+ }
7772
+ /**
7773
+ * @inheritDoc
7774
+ */
7775
+ clone(parent) {
7776
+ return new RTEHorizontalLineNode(this.id, parent, super.cloneAnnotations());
7777
+ }
7778
+ /**
7779
+ * @inheritDoc
7780
+ */
7781
+ toHtml() {
7782
+ return '<hr>';
7593
7783
  }
7594
7784
  }
7595
7785
 
7596
7786
  /**
7597
- * Strategy to handle the insertion of a token node into the nearest root block.
7787
+ * Predicate class provides static methods to check specific conditions on HTML elements or dto instances.
7598
7788
  */
7599
- class InsertTokenNodeStrategy extends ActionHandleStrategy {
7789
+ class Predicate {
7600
7790
  /**
7601
- * @inheritDoc
7791
+ * Checks if the given class name corresponds to a horizontal line block.
7792
+ *
7793
+ * @param {string} className The class name to check.
7794
+ * @returns {boolean} True if the class name corresponds to a horizontal line block, false otherwise.
7602
7795
  */
7603
- handleAction(action, block) {
7604
- const { rteRange, token } = action;
7605
- if (rteRange && rteRange.startNode) {
7606
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
7607
- const { key, label, customAttrs = { wrapped: 'true' } } = token;
7608
- const tokenNode = new RTETokenNode(generateUUID(), key, label, block);
7609
- tokenNode.annotationMap.set('CUSTOM_ATTRIBUTE', new CustomAttributeAnnotation(customAttrs));
7610
- block.apply(new InsertNodeToNearestRootAction(rteRange, tokenNode));
7611
- action.actionHandleResult = true;
7612
- }
7796
+ static isHorizontalLineBlock(className) {
7797
+ return className === 'RTEHorizontalLineBlock';
7613
7798
  }
7614
7799
  }
7615
7800
 
7616
- var __rest = (undefined && undefined.__rest) || function (s, e) {
7617
- var t = {};
7618
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
7619
- t[p] = s[p];
7620
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
7621
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7622
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
7623
- t[p[i]] = s[p[i]];
7624
- }
7625
- return t;
7801
+ /**
7802
+ * Default visual styles for the `<hr>` element in the RTE.
7803
+ * These styles match the CSS applied in `horizontal-line-block-styles.css`.
7804
+ *
7805
+ * @see {@link file://extensions/horizontal-line/renderers/horizontal-line-block-styles.css} must stay in sync.
7806
+ */
7807
+ const HR_DEFAULT_STYLES = {
7808
+ display: 'inline-block',
7809
+ width: '100%',
7810
+ height: '4px',
7811
+ backgroundColor: 'rgb(222, 222, 222)',
7812
+ borderWidth: '0px',
7626
7813
  };
7627
7814
  /**
7628
- * Strategy to convert <span class="token" token-key="...">...</span> to a token node
7815
+ * Filter styles strategy for horizontal line blocks.
7816
+ * Strips default HR visual styles during output and refills them during input,
7817
+ * ensuring source edit round-trips do not lose information.
7629
7818
  */
7630
- class SpanToTokenNodeStrategy extends ElementToDTOStrategy {
7819
+ class HorizontalLineFilterStylesStrategy extends RTEFilterStylesStrategy {
7820
+ constructor() {
7821
+ super(...arguments);
7822
+ this.stylesToBeFiltered = HR_DEFAULT_STYLES;
7823
+ this.elementTagName = 'hr';
7824
+ }
7631
7825
  /**
7632
7826
  * @inheritDoc
7633
7827
  */
7634
- canHandle(elementsArray, currentIndex) {
7635
- const element = elementsArray[currentIndex];
7636
- if (element.nodeName === 'SPAN' &&
7637
- element.classList.contains('token') &&
7638
- element.hasAttribute('token-key')) {
7639
- return 1;
7640
- }
7641
- return 0;
7828
+ canFilter(blockOrNodeInstance) {
7829
+ return Predicate.isHorizontalLineBlock(blockOrNodeInstance.dtoName);
7642
7830
  }
7643
7831
  /**
7644
7832
  * @inheritDoc
7645
7833
  */
7646
- handle(elementsArray) {
7647
- const element = elementsArray[0];
7648
- const tokenKey = element.getAttribute('token-key');
7649
- const text = element.textContent;
7650
- const annotations = htmlElementToAnnotationGenerator.generate(RTETextNode, element);
7651
- // Exclude customAttribute and customClass from annotations
7652
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
7653
- const { customAttribute, customClass } = annotations, restAnnotations = __rest(annotations, ["customAttribute", "customClass"]);
7654
- return {
7655
- id: generateUUID(),
7656
- type: 'token',
7657
- token: tokenKey,
7658
- text,
7659
- annotations: Object.assign(Object.assign({}, restAnnotations), { customAttribute: this.createCustomAttrs(customAttribute) }),
7660
- };
7834
+ canRefill(_blockOrNodeClassName, element) {
7835
+ return element.tagName.toLowerCase() === this.elementTagName;
7661
7836
  }
7662
7837
  /**
7663
7838
  * @inheritDoc
7664
7839
  */
7665
- // eslint-disable-next-line @typescript-eslint/no-empty-function
7666
- appendChildBlocks() { }
7840
+ toCssText() {
7841
+ return this.buildCssTextForStyles(this.elementTagName, this.classNameToBeAdded);
7842
+ }
7843
+ }
7844
+
7845
+ var RTEHorizontalLineExtensionAnnotationTypeEnum;
7846
+ (function (RTEHorizontalLineExtensionAnnotationTypeEnum) {
7847
+ RTEHorizontalLineExtensionAnnotationTypeEnum["HORIZONTAL_LINE"] = "HORIZONTAL_LINE";
7848
+ })(RTEHorizontalLineExtensionAnnotationTypeEnum || (RTEHorizontalLineExtensionAnnotationTypeEnum = {}));
7849
+ /**
7850
+ * Horizontal line annotation.
7851
+ * Mirrors {@link TextStyleAnnotation}: emits the HR default visual styles in
7852
+ * standalone mode (source edit) and the corresponding class in normal mode.
7853
+ * Only added to the block when `autoMatchFormat` is enabled.
7854
+ */
7855
+ class HorizontalLineAnnotation extends BlockAnnotation {
7856
+ constructor() {
7857
+ super(...arguments);
7858
+ this.type = RTEHorizontalLineExtensionAnnotationTypeEnum.HORIZONTAL_LINE;
7859
+ }
7860
+ /**
7861
+ * Generate the map item for the annotation.
7862
+ *
7863
+ * @returns {[RTEHorizontalLineExtensionAnnotationTypeEnum.HORIZONTAL_LINE, HorizontalLineAnnotation]} Map item.
7864
+ */
7865
+ static from() {
7866
+ return [RTEHorizontalLineExtensionAnnotationTypeEnum.HORIZONTAL_LINE, new HorizontalLineAnnotation()];
7867
+ }
7868
+ /**
7869
+ * Get the default styles for the horizontal line element.
7870
+ *
7871
+ * @returns {AnnotationStyle} The default styles.
7872
+ */
7873
+ static getDefaultStyles() {
7874
+ return HR_DEFAULT_STYLES;
7875
+ }
7667
7876
  /**
7668
7877
  * @inheritDoc
7669
7878
  */
7670
- shouldProceedToElementChildren() {
7671
- return false;
7879
+ toJSON() {
7880
+ // HR identity is captured by the block type; nothing to serialize.
7881
+ return null;
7672
7882
  }
7673
7883
  /**
7674
- * Creates custom attributes record from the given custom attribute object, clean some fixed attributes.
7884
+ * @inheritDoc
7885
+ */
7886
+ clone() {
7887
+ return new HorizontalLineAnnotation();
7888
+ }
7889
+ /**
7890
+ * @inheritDoc
7891
+ */
7892
+ renderClass(options) {
7893
+ if (options === null || options === void 0 ? void 0 : options.standalone)
7894
+ return null;
7895
+ return 'v-rte-horizontal-line-hr';
7896
+ }
7897
+ /**
7898
+ * @inheritDoc
7899
+ */
7900
+ renderStyle(options) {
7901
+ if (!(options === null || options === void 0 ? void 0 : options.standalone))
7902
+ return null;
7903
+ return HorizontalLineAnnotation.getDefaultStyles();
7904
+ }
7905
+ }
7906
+
7907
+ /**
7908
+ * Horizontal line block — a block containing a single `<hr>` decorator node.
7909
+ */
7910
+ class RTEHorizontalLineBlock extends RTEBlock {
7911
+ constructor(id, options) {
7912
+ super(id);
7913
+ this.dtoName = RTEHorizontalLineBlock.dtoName;
7914
+ this.type = 'horizontal-line';
7915
+ this.children = [];
7916
+ const { autoMatchFormat = true } = options !== null && options !== void 0 ? options : {};
7917
+ if (autoMatchFormat) {
7918
+ this.annotationMap = new Map([HorizontalLineAnnotation.from()]);
7919
+ }
7920
+ }
7921
+ /**
7922
+ * Creates an RTEHorizontalLineBlock from a JSON representation.
7675
7923
  *
7676
- * @param {Record<string, string>} customAttribute - The custom attribute object
7677
- * @returns {Record<string, string>} The processed custom attributes
7924
+ * @param {VegaRTECustomBlock} block - The block JSON to convert.
7925
+ * @param {VegaRTETransformOptions} [options] - Transformation options.
7926
+ * @returns {RTEHorizontalLineBlock} The created block instance.
7678
7927
  */
7679
- createCustomAttrs(customAttribute) {
7680
- const result = Object.assign(Object.assign({}, customAttribute), { 'contenteditable': null, 'template-token-key': null, 'token-key': null, 'wrapped': customAttribute.wrapped === 'false' ? 'false' : 'true' });
7681
- return cleanObject(result);
7928
+ static from(block, options = { autoMatchFormat: true }) {
7929
+ var _a, _b;
7930
+ const hrBlock = new RTEHorizontalLineBlock(block.id, options);
7931
+ const nodeId = ((_b = (_a = block.children) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.id) || generateUUID();
7932
+ const node = new RTEHorizontalLineNode(nodeId, hrBlock);
7933
+ hrBlock.children = [node];
7934
+ if (block.annotations) {
7935
+ RTEBlock.convertAnnotationsToMap(hrBlock.annotationMap, block.annotations);
7936
+ }
7937
+ return hrBlock;
7938
+ }
7939
+ /**
7940
+ * Creates a new RTEHorizontalLineBlock with a child node.
7941
+ *
7942
+ * @param {VegaRTEBlockAnnotations} [annotations] - Optional annotations (e.g. customStyle overrides).
7943
+ * @param {VegaRTETransformOptions} [options] - Transformation options.
7944
+ * @returns {RTEHorizontalLineBlock} A new block instance.
7945
+ */
7946
+ static create(annotations, options = { autoMatchFormat: true }) {
7947
+ const hrBlock = new RTEHorizontalLineBlock(generateUUID(), options);
7948
+ const node = new RTEHorizontalLineNode(generateUUID(), hrBlock);
7949
+ hrBlock.children = [node];
7950
+ if (annotations) {
7951
+ RTEBlock.convertAnnotationsToMap(hrBlock.annotationMap, annotations);
7952
+ }
7953
+ return hrBlock;
7954
+ }
7955
+ /**
7956
+ * @inheritDoc
7957
+ */
7958
+ toJSON() {
7959
+ return Object.assign(Object.assign({}, super.toJSON()), { type: 'horizontal-line', children: this.children.map((node) => node.toJSON()) });
7960
+ }
7961
+ /**
7962
+ * @inheritDoc
7963
+ */
7964
+ toHtml(options) {
7965
+ const attrStr = super.generateAttributeString(options);
7966
+ return `<hr${attrStr}>`;
7967
+ }
7968
+ /**
7969
+ * @inheritDoc
7970
+ */
7971
+ isNotEmpty() {
7972
+ return this.children.length > 0;
7973
+ }
7974
+ /**
7975
+ * @inheritDoc
7976
+ */
7977
+ getLastNode() {
7978
+ return this.children[this.children.length - 1];
7979
+ }
7980
+ /**
7981
+ * @inheritDoc
7982
+ */
7983
+ clone(parent) {
7984
+ const clonedBlock = new RTEHorizontalLineBlock(this.id);
7985
+ clonedBlock.children = this.children.map((node) => node.clone(clonedBlock));
7986
+ clonedBlock.annotationMap = super.cloneAnnotations();
7987
+ clonedBlock.parent = parent;
7988
+ return clonedBlock;
7682
7989
  }
7683
7990
  }
7991
+ RTEHorizontalLineBlock.dtoName = 'RTEHorizontalLineBlock';
7992
+
7993
+ const horizontalLineBlockStylesCss = ".v-rte-horizontal-line{padding:8px 0;overflow:hidden}.v-rte-horizontal-line .v-rte-horizontal-line-hr{display:inline-block;width:100%;height:4px;border-width:0px;background-color:rgb(222, 222, 222)}";
7684
7994
 
7685
- const spanToTokenNodeStrategy = new SpanToTokenNodeStrategy();
7686
7995
  /**
7687
- * Vega Rich Text Editor Token Extension
7996
+ * Renderer for horizontal line blocks in the rich text editor.
7688
7997
  */
7689
- class VegaRTETokenExtension extends VegaRTEExtension {
7690
- constructor(tokenList = []) {
7691
- super();
7692
- this.tokenRenderer = new RTETokenNodeRenderer();
7693
- this.registerNode('token', RTETokenNode);
7694
- this.registerRenderer('token', this.tokenRenderer);
7695
- this.tokenToolbarButtonRenderer = new RTETokenToolbarButtonRenderer(tokenList);
7696
- this.registerToolbarButtonRenderer('token', this.tokenToolbarButtonRenderer);
7697
- this.registerElementToNodeDTOClassStrategy(spanToTokenNodeStrategy);
7998
+ class RTEHorizontalLineBlockRenderer extends VegaRTEExtensionRenderer {
7999
+ /**
8000
+ * @inheritDoc
8001
+ */
8002
+ doRender(createElement, block, rteContext) {
8003
+ const node = block.children[0];
8004
+ const customStyles = block.getStyles(rteContext);
8005
+ const annotationClasses = block.getClasses(rteContext);
8006
+ const hrClass = [RTEDecoratorNode.DECORATOR_NODE_CLASS, annotationClasses]
8007
+ .filter(Boolean)
8008
+ .join(' ');
8009
+ return createElement('div', {
8010
+ key: block.id,
8011
+ class: `v-rte-horizontal-line ${RTEDecoratorNode.DECORATOR_CONTAINER_CLASS}`,
8012
+ ref: this.useRef(block),
8013
+ }, [
8014
+ createElement('hr', {
8015
+ key: (node === null || node === void 0 ? void 0 : node.id) || block.id + '-hr',
8016
+ class: hrClass,
8017
+ style: Object.keys(customStyles).length > 0 ? customStyles : undefined,
8018
+ ref: node ? this.useRef(node) : undefined,
8019
+ }),
8020
+ ]);
8021
+ }
8022
+ /**
8023
+ * @inheritDoc
8024
+ */
8025
+ injectRTEScopeStyles() {
8026
+ return horizontalLineBlockStylesCss;
8027
+ }
8028
+ }
8029
+
8030
+ const HorizontalLine = {
8031
+ icon: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 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="M0 224H32 608h32v64H608 32 0V224z"/></svg>`,
8032
+ };
8033
+
8034
+ const INSERT_HORIZONTAL_LINE_BLOCK = 'INSERT_HORIZONTAL_LINE_BLOCK';
8035
+ /**
8036
+ * Action to insert a horizontal line block into the rich text editor.
8037
+ * Carries cursor position info to support split-paragraph insertion (same pattern as InsertImageToBlockAction).
8038
+ */
8039
+ class InsertHorizontalLineBlockAction extends ModifyContentAction {
8040
+ constructor(splitPointNode, startOffsetOfNode = 0) {
8041
+ super();
8042
+ this.type = INSERT_HORIZONTAL_LINE_BLOCK;
8043
+ this.splitPointNode = splitPointNode;
8044
+ this.startOffsetOfNode = startOffsetOfNode;
8045
+ }
8046
+ }
8047
+
8048
+ /**
8049
+ * Toolbar button renderer for horizontal line insertion.
8050
+ */
8051
+ class RTEHorizontalLineToolbarButtonRenderer extends VegaRTEToolbarButtonRenderer {
8052
+ /**
8053
+ * Renders the horizontal line toolbar button.
8054
+ *
8055
+ * @param {VegaRTECreateElementFunction} createElement - The function to create elements.
8056
+ * @param {VegaRTEToolbarRenderContext} editorContext - The render context.
8057
+ * @returns {VegaRTERenderResult} The rendered toolbar button.
8058
+ */
8059
+ render(createElement, editorContext) {
8060
+ return this.renderButton(createElement, editorContext, {
8061
+ icon: 'horizontal-line',
8062
+ tooltip: { text: VegaInternalTranslation.t('Horizontal line') },
8063
+ });
8064
+ }
8065
+ /**
8066
+ * @inheritDoc
8067
+ */
8068
+ isDisabled(editorContext) {
8069
+ const context = this.getExtensionContext(editorContext.host);
8070
+ if (context) {
8071
+ const { host, getSelectedNodes } = context;
8072
+ const [startNode] = getSelectedNodes();
8073
+ return startNode
8074
+ ? host.disabled ||
8075
+ !ActionHandleStrategyRegistry.canHandle(INSERT_HORIZONTAL_LINE_BLOCK, startNode.parent)
8076
+ : host.disabled;
8077
+ }
8078
+ return false;
8079
+ }
8080
+ /**
8081
+ * @inheritDoc
8082
+ */
8083
+ handleButtonClick(editorContext) {
8084
+ if (this.isDisabled(editorContext)) {
8085
+ return;
8086
+ }
8087
+ const context = this.getExtensionContext(editorContext.host);
8088
+ if (context) {
8089
+ const { host, getSelectedNodes, flushValue } = context;
8090
+ const selectedNodes = getSelectedNodes();
8091
+ const focusNode = selectedNodes[0];
8092
+ const startOffset = editorContext.rteRange.startOffset;
8093
+ const action = new InsertHorizontalLineBlockAction(focusNode, startOffset);
8094
+ if (!focusNode) {
8095
+ host.value.apply(action);
8096
+ }
8097
+ else if (focusNode.parent) {
8098
+ focusNode.parent.apply(action);
8099
+ }
8100
+ if (action.nextFocusNode) {
8101
+ host.value.apply(new UpdateCursorPositionAction(action.nextFocusNode, 0));
8102
+ }
8103
+ flushValue(host.value);
8104
+ }
8105
+ }
8106
+ /**
8107
+ * @inheritDoc
8108
+ */
8109
+ handleDropdownClick() {
8110
+ // No dropdown for horizontal line
8111
+ }
8112
+ }
8113
+ (() => {
8114
+ VegaInternalIconManager.register({
8115
+ 'horizontal-line': HorizontalLine,
8116
+ });
8117
+ })();
8118
+
8119
+ /**
8120
+ * Strategy to convert `<hr>` HTML elements into RTEHorizontalLineBlock instances.
8121
+ */
8122
+ class HrToHorizontalLineBlockStrategy extends ElementToDTOStrategy {
8123
+ /**
8124
+ * Determines if this strategy can handle the current element.
8125
+ *
8126
+ * @param {HTMLElement[]} elementsArray - Array of elements to process.
8127
+ * @param {number} currentIndex - The current index in the array.
8128
+ * @returns {number} The number of elements this strategy can handle (1 for `<hr>`, 0 otherwise).
8129
+ */
8130
+ canHandle(elementsArray, currentIndex) {
8131
+ return elementsArray[currentIndex].tagName === 'HR' ? 1 : 0;
8132
+ }
8133
+ /**
8134
+ * Converts the `<hr>` element to an RTEHorizontalLineBlock.
8135
+ * Uses `htmlElementToAnnotationGenerator` to extract annotations (handles refill + filter).
8136
+ *
8137
+ * @param {HTMLElement[]} elementsArray - Array of elements.
8138
+ * @param {VegaRTETransformOptions} [options] - Transformation options.
8139
+ * @returns {Nullable<RTEContentBlock>} The created horizontal line block.
8140
+ */
8141
+ handle(elementsArray, options) {
8142
+ const element = elementsArray[0];
8143
+ const annotations = htmlElementToAnnotationGenerator.generate(RTEHorizontalLineBlock, element, options);
8144
+ return RTEHorizontalLineBlock.create(annotations, options);
8145
+ }
8146
+ /**
8147
+ * @inheritDoc
8148
+ */
8149
+ appendChildBlocks() {
8150
+ // `<hr>` is a void element — no children to append.
8151
+ }
8152
+ /**
8153
+ * `<hr>` is a void element — no children to process.
8154
+ *
8155
+ * @returns {boolean} Always false.
8156
+ */
8157
+ shouldProceedToElementChildren() {
8158
+ return false;
8159
+ }
8160
+ }
8161
+
8162
+ /**
8163
+ * Strategy to handle the insertion of a horizontal line block into the rich text editor.
8164
+ * Follows the same pattern as BlockInsertImageIntoTextStrategy (before/after/split).
8165
+ */
8166
+ class InsertHorizontalLineBlockStrategy extends ActionHandleStrategy {
8167
+ /**
8168
+ * @inheritDoc
8169
+ */
8170
+ handleAction(action, target) {
8171
+ const hrBlock = RTEHorizontalLineBlock.create();
8172
+ if (action.splitPointNode instanceof RTETextNode) {
8173
+ const splitNode = action.splitPointNode;
8174
+ const startOffsetOfNode = action.startOffsetOfNode;
8175
+ if (this.isCaretPositionAtBlockEnd(target, splitNode, startOffsetOfNode)) {
8176
+ this.insertAfterWithFocus(action, target, hrBlock);
8177
+ }
8178
+ else if (this.isCaretPositionAtBlockStart(target, splitNode, startOffsetOfNode)) {
8179
+ target.parent.apply(new InsertChildrenBeforeAction(target, hrBlock));
8180
+ action.nextFocusNode = target.getFirstNode();
8181
+ }
8182
+ else {
8183
+ const splitBlockAction = new SplitBlockWithNodeAction(splitNode, startOffsetOfNode);
8184
+ target.apply(splitBlockAction);
8185
+ const nextBlock = this.getNextSiblingBlock(target);
8186
+ target.parent.apply(new InsertChildrenAfterAction(target, hrBlock));
8187
+ action.nextFocusNode = nextBlock.getFirstNode();
8188
+ }
8189
+ }
8190
+ else if (action.splitPointNode) {
8191
+ // Decorator node selected (image, HR, etc.) — insert after current block
8192
+ this.insertAfterWithFocus(action, target, hrBlock);
8193
+ }
8194
+ else {
8195
+ const emptyParagraph = super.createNewParagraph('');
8196
+ target.apply(new AppendChildrenAction([hrBlock, emptyParagraph]));
8197
+ action.nextFocusNode = emptyParagraph.children[0];
8198
+ }
8199
+ }
8200
+ /**
8201
+ * Insert HR after target. If next sibling is focusable (has a text node), move cursor there;
8202
+ * otherwise create an empty paragraph after HR.
8203
+ *
8204
+ * @param {InsertHorizontalLineBlockAction} action - The insert action whose `nextFocusNode` is updated.
8205
+ * @param {RTEBlock} target - The block after which the HR is inserted.
8206
+ * @param {RTEHorizontalLineBlock} hrBlock - The HR block to insert.
8207
+ */
8208
+ insertAfterWithFocus(action, target, hrBlock) {
8209
+ const nextBlock = this.getNextSiblingBlock(target);
8210
+ const nextFirstNode = nextBlock === null || nextBlock === void 0 ? void 0 : nextBlock.getFirstNode();
8211
+ if (nextFirstNode instanceof RTETextNode) {
8212
+ target.parent.apply(new InsertChildrenAfterAction(target, hrBlock));
8213
+ action.nextFocusNode = nextFirstNode;
8214
+ }
8215
+ else {
8216
+ const emptyParagraph = super.createNewParagraph('');
8217
+ target.parent.apply(new InsertChildrenAfterAction(target, hrBlock, emptyParagraph));
8218
+ action.nextFocusNode = emptyParagraph.children[0];
8219
+ }
8220
+ }
8221
+ /**
8222
+ * Get the next sibling block of the given block.
8223
+ *
8224
+ * @param {RTEBlock} block - The current block.
8225
+ * @returns {RTEBlock | undefined} The next sibling block, or undefined if none.
8226
+ */
8227
+ getNextSiblingBlock(block) {
8228
+ const parent = block.parent;
8229
+ const siblings = parent.children;
8230
+ const index = siblings.indexOf(block);
8231
+ return siblings[index + 1];
8232
+ }
8233
+ }
8234
+
8235
+ /**
8236
+ * Extension that adds horizontal line (`<hr>`) support to the Vega Rich Text Editor.
8237
+ */
8238
+ class VegaRTEHorizontalLineExtension extends VegaRTEExtension {
8239
+ constructor() {
8240
+ super();
8241
+ this.blockRenderer = new RTEHorizontalLineBlockRenderer();
8242
+ this.toolbarButtonRenderer = new RTEHorizontalLineToolbarButtonRenderer();
8243
+ // Register basic block strategies (delete, append, paste, etc.)
8244
+ this.registerBlockBasicStrategies(RTEHorizontalLineBlock.name);
8245
+ // Register the block DTO class
8246
+ this.registerNode('horizontal-line', RTEHorizontalLineBlock);
8247
+ // Register the renderer
8248
+ this.registerRenderer('horizontal-line', this.blockRenderer);
8249
+ // Register the toolbar button
8250
+ this.registerToolbarButtonRenderer('horizontalLine', this.toolbarButtonRenderer);
8251
+ // Register HTML → DTO conversion strategy
8252
+ this.registerElementToBlockDTOClassStrategy(new HrToHorizontalLineBlockStrategy());
8253
+ // Register filter styles strategy for source edit round-trip
8254
+ VegaRTEExtension.registerFilterStylesStrategy(RTEHorizontalLineBlock.dtoName, new HorizontalLineFilterStylesStrategy());
8255
+ }
8256
+ }
8257
+ (() => {
8258
+ const insertStrategy = new InsertHorizontalLineBlockStrategy();
8259
+ // Register insert strategy for all block types that can be a target
8260
+ VegaRTEExtension.registerActionHandleStrategy(VegaRTEContent.name, INSERT_HORIZONTAL_LINE_BLOCK, insertStrategy);
8261
+ VegaRTEExtension.registerActionHandleStrategy(RTETextBlock.name, INSERT_HORIZONTAL_LINE_BLOCK, insertStrategy);
8262
+ VegaRTEExtension.registerActionHandleStrategy(RTEImageBlock.name, INSERT_HORIZONTAL_LINE_BLOCK, insertStrategy);
8263
+ VegaRTEExtension.registerActionHandleStrategy(RTEHorizontalLineBlock.name, INSERT_HORIZONTAL_LINE_BLOCK, insertStrategy);
8264
+ })();
8265
+
8266
+ const ARROW_CHARACTERS = [
8267
+ { character: '←', title: 'leftwards simple arrow' },
8268
+ { character: '→', title: 'rightwards simple arrow' },
8269
+ { character: '↑', title: 'upwards simple arrow' },
8270
+ { character: '↓', title: 'downwards simple arrow' },
8271
+ { character: '⇐', title: 'leftwards double arrow' },
8272
+ { character: '⇒', title: 'rightwards double arrow' },
8273
+ { character: '⇑', title: 'upwards double arrow' },
8274
+ { character: '⇓', title: 'downwards double arrow' },
8275
+ { character: '⇠', title: 'leftwards dashed arrow' },
8276
+ { character: '⇢', title: 'rightwards dashed arrow' },
8277
+ { character: '⇡', title: 'upwards dashed arrow' },
8278
+ { character: '⇣', title: 'downwards dashed arrow' },
8279
+ { character: '⇤', title: 'leftwards arrow to bar' },
8280
+ { character: '⇥', title: 'rightwards arrow to bar' },
8281
+ { character: '⤒', title: 'upwards arrow to bar' },
8282
+ { character: '⤓', title: 'downwards arrow to bar' },
8283
+ { character: '↨', title: 'up down arrow with base' },
8284
+ { character: '🔙', title: 'back with leftwards arrow above' },
8285
+ { character: '🔚', title: 'end with leftwards arrow above' },
8286
+ { character: '🔛', title: 'on with exclamation mark with left right arrow above' },
8287
+ { character: '🔜', title: 'soon with rightwards arrow above' },
8288
+ { character: '🔝', title: 'top with upwards arrow above' },
8289
+ ];
8290
+
8291
+ const CURRENCY_CHARACTERS = [
8292
+ { character: '$', title: 'Dollar sign' },
8293
+ { character: '€', title: 'Euro sign' },
8294
+ { character: '¥', title: 'Yen sign' },
8295
+ { character: '£', title: 'Pound sign' },
8296
+ { character: '¢', title: 'Cent sign' },
8297
+ { character: '₠', title: 'Euro-currency sign' },
8298
+ { character: '₡', title: 'Colon sign' },
8299
+ { character: '₢', title: 'Cruzeiro sign' },
8300
+ { character: '₣', title: 'French franc sign' },
8301
+ { character: '₤', title: 'Lira sign' },
8302
+ { character: '¤', title: 'Currency sign' },
8303
+ { character: '₿', title: 'Bitcoin sign' },
8304
+ { character: '₥', title: 'Mill sign' },
8305
+ { character: '₦', title: 'Naira sign' },
8306
+ { character: '₧', title: 'Peseta sign' },
8307
+ { character: '₨', title: 'Rupee sign' },
8308
+ { character: '₩', title: 'Won sign' },
8309
+ { character: '₪', title: 'New sheqel sign' },
8310
+ { character: '₫', title: 'Dong sign' },
8311
+ { character: '₭', title: 'Kip sign' },
8312
+ { character: '₮', title: 'Tugrik sign' },
8313
+ { character: '₯', title: 'Drachma sign' },
8314
+ { character: '₰', title: 'German penny sign' },
8315
+ { character: '₱', title: 'Peso sign' },
8316
+ { character: '₲', title: 'Guarani sign' },
8317
+ { character: '₳', title: 'Austral sign' },
8318
+ { character: '₴', title: 'Hryvnia sign' },
8319
+ { character: '₵', title: 'Cedi sign' },
8320
+ { character: '₶', title: 'Livre tournois sign' },
8321
+ { character: '₷', title: 'Spesmilo sign' },
8322
+ { character: '₸', title: 'Tenge sign' },
8323
+ { character: '₹', title: 'Indian rupee sign' },
8324
+ { character: '₺', title: 'Turkish lira sign' },
8325
+ { character: '₻', title: 'Nordic mark sign' },
8326
+ { character: '₼', title: 'Manat sign' },
8327
+ { character: '₽', title: 'Ruble sign' },
8328
+ ];
8329
+
8330
+ const LATIN_CHARACTERS = [
8331
+ { character: 'Ā', title: 'Latin capital letter a with macron' },
8332
+ { character: 'ā', title: 'Latin small letter a with macron' },
8333
+ { character: 'Ă', title: 'Latin capital letter a with breve' },
8334
+ { character: 'ă', title: 'Latin small letter a with breve' },
8335
+ { character: 'Ą', title: 'Latin capital letter a with ogonek' },
8336
+ { character: 'ą', title: 'Latin small letter a with ogonek' },
8337
+ { character: 'Ć', title: 'Latin capital letter c with acute' },
8338
+ { character: 'ć', title: 'Latin small letter c with acute' },
8339
+ { character: 'Ĉ', title: 'Latin capital letter c with circumflex' },
8340
+ { character: 'ĉ', title: 'Latin small letter c with circumflex' },
8341
+ { character: 'Ċ', title: 'Latin capital letter c with dot above' },
8342
+ { character: 'ċ', title: 'Latin small letter c with dot above' },
8343
+ { character: 'Č', title: 'Latin capital letter c with caron' },
8344
+ { character: 'č', title: 'Latin small letter c with caron' },
8345
+ { character: 'Ď', title: 'Latin capital letter d with caron' },
8346
+ { character: 'ď', title: 'Latin small letter d with caron' },
8347
+ { character: 'Đ', title: 'Latin capital letter d with stroke' },
8348
+ { character: 'đ', title: 'Latin small letter d with stroke' },
8349
+ { character: 'Ē', title: 'Latin capital letter e with macron' },
8350
+ { character: 'ē', title: 'Latin small letter e with macron' },
8351
+ { character: 'Ĕ', title: 'Latin capital letter e with breve' },
8352
+ { character: 'ĕ', title: 'Latin small letter e with breve' },
8353
+ { character: 'Ė', title: 'Latin capital letter e with dot above' },
8354
+ { character: 'ė', title: 'Latin small letter e with dot above' },
8355
+ { character: 'Ę', title: 'Latin capital letter e with ogonek' },
8356
+ { character: 'ę', title: 'Latin small letter e with ogonek' },
8357
+ { character: 'Ě', title: 'Latin capital letter e with caron' },
8358
+ { character: 'ě', title: 'Latin small letter e with caron' },
8359
+ { character: 'Ĝ', title: 'Latin capital letter g with circumflex' },
8360
+ { character: 'ĝ', title: 'Latin small letter g with circumflex' },
8361
+ { character: 'Ğ', title: 'Latin capital letter g with breve' },
8362
+ { character: 'ğ', title: 'Latin small letter g with breve' },
8363
+ { character: 'Ġ', title: 'Latin capital letter g with dot above' },
8364
+ { character: 'ġ', title: 'Latin small letter g with dot above' },
8365
+ { character: 'Ģ', title: 'Latin capital letter g with cedilla' },
8366
+ { character: 'ģ', title: 'Latin small letter g with cedilla' },
8367
+ { character: 'Ĥ', title: 'Latin capital letter h with circumflex' },
8368
+ { character: 'ĥ', title: 'Latin small letter h with circumflex' },
8369
+ { character: 'Ħ', title: 'Latin capital letter h with stroke' },
8370
+ { character: 'ħ', title: 'Latin small letter h with stroke' },
8371
+ { character: 'Ĩ', title: 'Latin capital letter i with tilde' },
8372
+ { character: 'ĩ', title: 'Latin small letter i with tilde' },
8373
+ { character: 'Ī', title: 'Latin capital letter i with macron' },
8374
+ { character: 'ī', title: 'Latin small letter i with macron' },
8375
+ { character: 'Ĭ', title: 'Latin capital letter i with breve' },
8376
+ { character: 'ĭ', title: 'Latin small letter i with breve' },
8377
+ { character: 'Į', title: 'Latin capital letter i with ogonek' },
8378
+ { character: 'į', title: 'Latin small letter i with ogonek' },
8379
+ { character: 'İ', title: 'Latin capital letter i with dot above' },
8380
+ { character: 'ı', title: 'Latin small letter dotless i' },
8381
+ { character: 'IJ', title: 'Latin capital ligature ij' },
8382
+ { character: 'ij', title: 'Latin small ligature ij' },
8383
+ { character: 'Ĵ', title: 'Latin capital letter j with circumflex' },
8384
+ { character: 'ĵ', title: 'Latin small letter j with circumflex' },
8385
+ { character: 'Ķ', title: 'Latin capital letter k with cedilla' },
8386
+ { character: 'ķ', title: 'Latin small letter k with cedilla' },
8387
+ { character: 'ĸ', title: 'Latin small letter kra' },
8388
+ { character: 'Ĺ', title: 'Latin capital letter l with acute' },
8389
+ { character: 'ĺ', title: 'Latin small letter l with acute' },
8390
+ { character: 'Ļ', title: 'Latin capital letter l with cedilla' },
8391
+ { character: 'ļ', title: 'Latin small letter l with cedilla' },
8392
+ { character: 'Ľ', title: 'Latin capital letter l with caron' },
8393
+ { character: 'ľ', title: 'Latin small letter l with caron' },
8394
+ { character: 'Ŀ', title: 'Latin capital letter l with middle dot' },
8395
+ { character: 'ŀ', title: 'Latin small letter l with middle dot' },
8396
+ { character: 'Ł', title: 'Latin capital letter l with stroke' },
8397
+ { character: 'ł', title: 'Latin small letter l with stroke' },
8398
+ { character: 'Ń', title: 'Latin capital letter n with acute' },
8399
+ { character: 'ń', title: 'Latin small letter n with acute' },
8400
+ { character: 'Ņ', title: 'Latin capital letter n with cedilla' },
8401
+ { character: 'ņ', title: 'Latin small letter n with cedilla' },
8402
+ { character: 'Ň', title: 'Latin capital letter n with caron' },
8403
+ { character: 'ň', title: 'Latin small letter n with caron' },
8404
+ { character: 'ʼn', title: 'Latin small letter n preceded by apostrophe' },
8405
+ { character: 'Ŋ', title: 'Latin capital letter eng' },
8406
+ { character: 'ŋ', title: 'Latin small letter eng' },
8407
+ { character: 'Ō', title: 'Latin capital letter o with macron' },
8408
+ { character: 'ō', title: 'Latin small letter o with macron' },
8409
+ { character: 'Ŏ', title: 'Latin capital letter o with breve' },
8410
+ { character: 'ŏ', title: 'Latin small letter o with breve' },
8411
+ { character: 'Ő', title: 'Latin capital letter o with double acute' },
8412
+ { character: 'ő', title: 'Latin small letter o with double acute' },
8413
+ { character: 'Œ', title: 'Latin capital ligature oe' },
8414
+ { character: 'œ', title: 'Latin small ligature oe' },
8415
+ { character: 'Ŕ', title: 'Latin capital letter r with acute' },
8416
+ { character: 'ŕ', title: 'Latin small letter r with acute' },
8417
+ { character: 'Ŗ', title: 'Latin capital letter r with cedilla' },
8418
+ { character: 'ŗ', title: 'Latin small letter r with cedilla' },
8419
+ { character: 'Ř', title: 'Latin capital letter r with caron' },
8420
+ { character: 'ř', title: 'Latin small letter r with caron' },
8421
+ { character: 'Ś', title: 'Latin capital letter s with acute' },
8422
+ { character: 'ś', title: 'Latin small letter s with acute' },
8423
+ { character: 'Ŝ', title: 'Latin capital letter s with circumflex' },
8424
+ { character: 'ŝ', title: 'Latin small letter s with circumflex' },
8425
+ { character: 'Ş', title: 'Latin capital letter s with cedilla' },
8426
+ { character: 'ş', title: 'Latin small letter s with cedilla' },
8427
+ { character: 'Š', title: 'Latin capital letter s with caron' },
8428
+ { character: 'š', title: 'Latin small letter s with caron' },
8429
+ { character: 'Ţ', title: 'Latin capital letter t with cedilla' },
8430
+ { character: 'ţ', title: 'Latin small letter t with cedilla' },
8431
+ { character: 'Ť', title: 'Latin capital letter t with caron' },
8432
+ { character: 'ť', title: 'Latin small letter t with caron' },
8433
+ { character: 'Ŧ', title: 'Latin capital letter t with stroke' },
8434
+ { character: 'ŧ', title: 'Latin small letter t with stroke' },
8435
+ { character: 'Ũ', title: 'Latin capital letter u with tilde' },
8436
+ { character: 'ũ', title: 'Latin small letter u with tilde' },
8437
+ { character: 'Ū', title: 'Latin capital letter u with macron' },
8438
+ { character: 'ū', title: 'Latin small letter u with macron' },
8439
+ { character: 'Ŭ', title: 'Latin capital letter u with breve' },
8440
+ { character: 'ŭ', title: 'Latin small letter u with breve' },
8441
+ { character: 'Ů', title: 'Latin capital letter u with ring above' },
8442
+ { character: 'ů', title: 'Latin small letter u with ring above' },
8443
+ { character: 'Ű', title: 'Latin capital letter u with double acute' },
8444
+ { character: 'ű', title: 'Latin small letter u with double acute' },
8445
+ { character: 'Ų', title: 'Latin capital letter u with ogonek' },
8446
+ { character: 'ų', title: 'Latin small letter u with ogonek' },
8447
+ { character: 'Ŵ', title: 'Latin capital letter w with circumflex' },
8448
+ { character: 'ŵ', title: 'Latin small letter w with circumflex' },
8449
+ { character: 'Ŷ', title: 'Latin capital letter y with circumflex' },
8450
+ { character: 'ŷ', title: 'Latin small letter y with circumflex' },
8451
+ { character: 'Ÿ', title: 'Latin capital letter y with diaeresis' },
8452
+ { character: 'Ź', title: 'Latin capital letter z with acute' },
8453
+ { character: 'ź', title: 'Latin small letter z with acute' },
8454
+ { character: 'Ż', title: 'Latin capital letter z with dot above' },
8455
+ { character: 'ż', title: 'Latin small letter z with dot above' },
8456
+ { character: 'Ž', title: 'Latin capital letter z with caron' },
8457
+ { character: 'ž', title: 'Latin small letter z with caron' },
8458
+ { character: 'ſ', title: 'Latin small letter long s' },
8459
+ ];
8460
+
8461
+ const MATHEMATICAL_CHARACTERS = [
8462
+ { character: '<', title: 'Less-than sign' },
8463
+ { character: '>', title: 'Greater-than sign' },
8464
+ { character: '≤', title: 'Less-than or equal to' },
8465
+ { character: '≥', title: 'Greater-than or equal to' },
8466
+ { character: '–', title: 'En dash' },
8467
+ { character: '—', title: 'Em dash' },
8468
+ { character: '¯', title: 'Macron' },
8469
+ { character: '‾', title: 'Overline' },
8470
+ { character: '°', title: 'Degree sign' },
8471
+ { character: '−', title: 'Minus sign' },
8472
+ { character: '±', title: 'Plus-minus sign' },
8473
+ { character: '÷', title: 'Division sign' },
8474
+ { character: '⁄', title: 'Fraction slash' },
8475
+ { character: '×', title: 'Multiplication sign' },
8476
+ { character: 'ƒ', title: 'Latin small letter f with hook' },
8477
+ { character: '∫', title: 'Integral' },
8478
+ { character: '∑', title: 'N-ary summation' },
8479
+ { character: '∞', title: 'Infinity' },
8480
+ { character: '√', title: 'Square root' },
8481
+ { character: '∼', title: 'Tilde operator' },
8482
+ { character: '≅', title: 'Approximately equal to' },
8483
+ { character: '≈', title: 'Almost equal to' },
8484
+ { character: '≠', title: 'Not equal to' },
8485
+ { character: '≡', title: 'Identical to' },
8486
+ { character: '∈', title: 'Element of' },
8487
+ { character: '∉', title: 'Not an element of' },
8488
+ { character: '∋', title: 'Contains as member' },
8489
+ { character: '∏', title: 'N-ary product' },
8490
+ { character: '∧', title: 'Logical and' },
8491
+ { character: '∨', title: 'Logical or' },
8492
+ { character: '¬', title: 'Not sign' },
8493
+ { character: '∩', title: 'Intersection' },
8494
+ { character: '∪', title: 'Union' },
8495
+ { character: '∂', title: 'Partial differential' },
8496
+ { character: '∀', title: 'For all' },
8497
+ { character: '∃', title: 'There exists' },
8498
+ { character: '∅', title: 'Empty set' },
8499
+ { character: '∇', title: 'Nabla' },
8500
+ { character: '∗', title: 'Asterisk operator' },
8501
+ { character: '∝', title: 'Proportional to' },
8502
+ { character: '∠', title: 'Angle' },
8503
+ { character: '¼', title: 'Vulgar fraction one quarter' },
8504
+ { character: '½', title: 'Vulgar fraction one half' },
8505
+ { character: '¾', title: 'Vulgar fraction three quarters' },
8506
+ ];
8507
+
8508
+ const TEXT_CHARACTERS = [
8509
+ { character: '‹', title: 'Single left-pointing angle quotation mark' },
8510
+ { character: '›', title: 'Single right-pointing angle quotation mark' },
8511
+ { character: '«', title: 'Left-pointing double angle quotation mark' },
8512
+ { character: '»', title: 'Right-pointing double angle quotation mark' },
8513
+ { character: '‘', title: 'Left single quotation mark' },
8514
+ { character: '’', title: 'Right single quotation mark' },
8515
+ { character: '“', title: 'Left double quotation mark' },
8516
+ { character: '”', title: 'Right double quotation mark' },
8517
+ { character: '‚', title: 'Single low-9 quotation mark' },
8518
+ { character: '„', title: 'Double low-9 quotation mark' },
8519
+ { character: '¡', title: 'Inverted exclamation mark' },
8520
+ { character: '¿', title: 'Inverted question mark' },
8521
+ { character: '‥', title: 'Two dot leader' },
8522
+ { character: '…', title: 'Horizontal ellipsis' },
8523
+ { character: '‡', title: 'Double dagger' },
8524
+ { character: '‰', title: 'Per mille sign' },
8525
+ { character: '‱', title: 'Per ten thousand sign' },
8526
+ { character: '‼', title: 'Double exclamation mark' },
8527
+ { character: '⁈', title: 'Question exclamation mark' },
8528
+ { character: '⁉', title: 'Exclamation question mark' },
8529
+ { character: '⁇', title: 'Double question mark' },
8530
+ { character: '©', title: 'Copyright sign' },
8531
+ { character: '®', title: 'Registered sign' },
8532
+ { character: '™', title: 'Trade mark sign' },
8533
+ { character: '§', title: 'Section sign' },
8534
+ { character: '¶', title: 'Paragraph sign' },
8535
+ { character: '⁋', title: 'Reversed paragraph sign' },
8536
+ ];
8537
+
8538
+ const VegaRTESpecialCharactersLatin = {
8539
+ key: 'latin',
8540
+ label: 'Latin',
8541
+ characters: LATIN_CHARACTERS,
8542
+ };
8543
+ const VegaRTESpecialCharactersMathematical = {
8544
+ key: 'mathematical',
8545
+ label: 'Mathematical',
8546
+ characters: MATHEMATICAL_CHARACTERS,
8547
+ };
8548
+ const VegaRTESpecialCharactersArrows = {
8549
+ key: 'arrows',
8550
+ label: 'Arrows',
8551
+ characters: ARROW_CHARACTERS,
8552
+ };
8553
+ const VegaRTESpecialCharactersCurrency = {
8554
+ key: 'currency',
8555
+ label: 'Currency',
8556
+ characters: CURRENCY_CHARACTERS,
8557
+ };
8558
+ const VegaRTESpecialCharactersText = {
8559
+ key: 'text',
8560
+ label: 'Text',
8561
+ characters: TEXT_CHARACTERS,
8562
+ };
8563
+ const VegaRTESpecialCharactersEssentials = [
8564
+ VegaRTESpecialCharactersCurrency,
8565
+ VegaRTESpecialCharactersText,
8566
+ VegaRTESpecialCharactersMathematical,
8567
+ VegaRTESpecialCharactersArrows,
8568
+ VegaRTESpecialCharactersLatin,
8569
+ ];
8570
+
8571
+ const specialCharactersIcon = {
8572
+ 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>`,
8573
+ };
8574
+
8575
+ /**
8576
+ * Toolbar button renderer for the Special Characters extension.
8577
+ * Renders a toolbar button with an Ω icon that opens a popover panel
8578
+ * with categorized character grids.
8579
+ */
8580
+ class RTESpecialCharactersToolbarButtonRenderer extends VegaRTEToolbarButtonRenderer {
8581
+ constructor(categories) {
8582
+ super();
8583
+ this.panelRef = null;
8584
+ this.categories = categories;
8585
+ }
8586
+ /**
8587
+ * Renders the special characters toolbar button wrapped in a popover.
8588
+ *
8589
+ * @param {VegaRTECreateElementFunction} h - Create element function.
8590
+ * @param {VegaRTEToolbarRenderContext} editorContext - The render context for the editor.
8591
+ * @returns {VegaRTERenderResult} - The toolbar button render result.
8592
+ */
8593
+ render(h, editorContext) {
8594
+ return h('vega-popover', {
8595
+ trigger: 'click',
8596
+ alignment: 'start',
8597
+ placement: 'bottom',
8598
+ showArrow: false,
8599
+ isScreenPosition: true,
8600
+ // eslint-disable-next-line jsdoc/require-jsdoc
8601
+ ref: (ref) => {
8602
+ if (ref) {
8603
+ DomNodeSubjectObserverFactory.addUniqueObserverToNode(ref, VegaPopoverShow, () => {
8604
+ this.handlePopoverShow();
8605
+ });
8606
+ }
8607
+ },
8608
+ }, [
8609
+ h('div', { slot: 'popover' }, [
8610
+ h('vega-rich-text-special-characters-panel', {
8611
+ categories: this.categories,
8612
+ // eslint-disable-next-line jsdoc/require-jsdoc
8613
+ ref: (ref) => {
8614
+ if (ref) {
8615
+ this.panelRef = ref;
8616
+ DomNodeSubjectObserverFactory.addUniqueObserverToNode(ref, VegaClick,
8617
+ // eslint-disable-next-line jsdoc/require-jsdoc
8618
+ (payload) => {
8619
+ this.insertCharacter(editorContext, payload.detail);
8620
+ });
8621
+ }
8622
+ },
8623
+ }),
8624
+ ]),
8625
+ h('div', { slot: 'popover-content' }, this.renderButton(h, editorContext, {
8626
+ icon: 'rte-special-characters',
8627
+ tooltip: { text: 'Special Characters' },
8628
+ })),
8629
+ ]);
8630
+ }
8631
+ /**
8632
+ * @inheritDoc
8633
+ */
8634
+ handleButtonClick() {
8635
+ // Popover handles open/close via trigger='click'
8636
+ }
8637
+ /* istanbul ignore next */
8638
+ /**
8639
+ * @inheritDoc
8640
+ */
8641
+ handleDropdownClick() {
8642
+ // No dropdown used
8643
+ }
8644
+ /**
8645
+ * Resets the panel and moves focus to the category select when the
8646
+ * popover opens.
8647
+ */
8648
+ handlePopoverShow() {
8649
+ if (this.panelRef) {
8650
+ void this.panelRef.resetPanel();
8651
+ }
8652
+ }
8653
+ /**
8654
+ * Inserts a special character at the current cursor position using ReplaceSelectedTextAction,
8655
+ * then restores the cursor position after flushing.
8656
+ *
8657
+ * @param {VegaRTEToolbarRenderContext} editorContext - The render context for the editor.
8658
+ * @param {string} char - The Unicode character to insert.
8659
+ */
8660
+ insertCharacter(editorContext, char) {
8661
+ const currentRange = editorContext.rteRange;
8662
+ const cursorNode = currentRange.startNode;
8663
+ if (!cursorNode)
8664
+ return;
8665
+ const target = this.isCaretOnLineBreak(cursorNode, currentRange)
8666
+ ? this.insertAtLineBreak(cursorNode, char, currentRange)
8667
+ : this.insertAtTextNode(cursorNode, char, currentRange);
8668
+ editorContext.host.value.apply(new UpdateCursorPositionAction(target.node, target.offset));
8669
+ }
8670
+ /**
8671
+ * Checks whether the caret is collapsed on a Shift+Enter line-break text node.
8672
+ *
8673
+ * @param {RTENode} cursorNode - The current cursor node.
8674
+ * @param {RTERange} range - The current selection range.
8675
+ * @returns {boolean} True if the caret is collapsed on a '\n' text node.
8676
+ */
8677
+ isCaretOnLineBreak(cursorNode, range) {
8678
+ return (cursorNode instanceof RTETextNode &&
8679
+ cursorNode.text === '\n' &&
8680
+ range.startOffset === range.endOffset);
8681
+ }
8682
+ /**
8683
+ * Default insert path: replace the selected range on a regular text node.
8684
+ *
8685
+ * @param {RTENode} cursorNode - The current cursor node.
8686
+ * @param {string} char - The Unicode character to insert.
8687
+ * @param {RTERange} range - The current selection range.
8688
+ * @returns {CaretTarget} The node and offset for the resulting caret position.
8689
+ */
8690
+ insertAtTextNode(cursorNode, char, range) {
8691
+ const action = new ReplaceSelectedTextAction(char, range);
8692
+ action.isFlushable = true;
8693
+ cursorNode.apply(action);
8694
+ // Clamp to node length: empty paragraphs contain a ZWS in the DOM (startOffset=1)
8695
+ // but the DTO text node is empty, so `startOffset + char.length` would overflow.
8696
+ return {
8697
+ node: cursorNode,
8698
+ offset: Math.min(range.startOffset + char.length, cursorNode.getRangeEndOffset()),
8699
+ };
8700
+ }
8701
+ /**
8702
+ * Line-break insert path: delegate to insertTextToLineBreakNode and place
8703
+ * the caret at the end of the inserted text.
8704
+ *
8705
+ * @param {RTETextNode} lineBreakNode - The '\n' text node at the caret.
8706
+ * @param {string} char - The Unicode character to insert.
8707
+ * @param {RTERange} range - The current selection range.
8708
+ * @returns {CaretTarget} Caret target.
8709
+ */
8710
+ insertAtLineBreak(lineBreakNode, char, range) {
8711
+ return {
8712
+ node: this.insertTextToLineBreakNode(lineBreakNode, char, range),
8713
+ offset: char.length,
8714
+ };
8715
+ }
8716
+ /**
8717
+ * Mirror of InsertTextHandler.insertTextToLineBreakNode for the toolbar
8718
+ * insert path: caret on a Shift+Enter line-break text node needs either a
8719
+ * new sibling text node inserted before the break, or the break's text
8720
+ * replaced. The default ReplaceSelectedTextAction + getRangeEndOffset()
8721
+ * path returns 0 for '\n' text nodes and drops the caret in front of the
8722
+ * inserted character.
8723
+ *
8724
+ * @param {RTETextNode} lineBreakNode - The '\n' text node at the caret.
8725
+ * @param {string} text - The text to insert.
8726
+ * @param {RTERange} currentRange - The current selection range.
8727
+ * @returns {RTETextNode} The node the caret should land in.
8728
+ */
8729
+ insertTextToLineBreakNode(lineBreakNode, text, currentRange) {
8730
+ // '\n' text nodes always live inside a text block in the RTE structure.
8731
+ const textBlock = lineBreakNode.parent;
8732
+ const index = textBlock.children.indexOf(lineBreakNode);
8733
+ if (currentRange.startOffset === 0 && textBlock.children[index + 1]) {
8734
+ const newTextNode = lineBreakNode.cloneWithText(text);
8735
+ const insertAction = new InsertChildrenBeforeAction(lineBreakNode, newTextNode);
8736
+ insertAction.isFlushable = true;
8737
+ textBlock.apply(insertAction);
8738
+ return newTextNode;
8739
+ }
8740
+ const updateAction = new UpdateTextAction(text);
8741
+ updateAction.isFlushable = true;
8742
+ lineBreakNode.apply(updateAction);
8743
+ return lineBreakNode;
8744
+ }
8745
+ }
8746
+ (() => {
8747
+ VegaInternalIconManager.register({ 'rte-special-characters': specialCharactersIcon });
8748
+ })();
8749
+
8750
+ /**
8751
+ * Vega Rich Text Editor Special Characters Extension.
8752
+ * Adds a toolbar button that opens a popover with categorized Unicode characters
8753
+ * for insertion into the editor content as plain text.
8754
+ */
8755
+ class VegaRTESpecialCharactersExtension extends VegaRTEExtension {
8756
+ constructor(config) {
8757
+ super();
8758
+ this.categories = this.buildCategories(config);
8759
+ }
8760
+ /** @inheritDoc */
8761
+ prepareBeforeLoad(host) {
8762
+ this.registerToolbarButtonRenderer('special-characters', new RTESpecialCharactersToolbarButtonRenderer(this.categories), host);
8763
+ }
8764
+ /**
8765
+ * Builds the final list of special character categories from the provided config.
8766
+ *
8767
+ * @param {VegaRTESpecialCharactersConfig} config - Optional configuration with custom categories.
8768
+ * @returns {VegaRTESpecialCharacterCategory[]} - The merged categories array.
8769
+ */
8770
+ buildCategories(config) {
8771
+ const includeDefaults = (config === null || config === void 0 ? void 0 : config.includeDefaults) !== false;
8772
+ const defaultCategories = includeDefaults
8773
+ ? VegaRTESpecialCharactersEssentials
8774
+ : [];
8775
+ if (!(config === null || config === void 0 ? void 0 : config.categories)) {
8776
+ return defaultCategories;
8777
+ }
8778
+ return [...defaultCategories, ...config.categories];
8779
+ }
8780
+ }
8781
+
8782
+ /**
8783
+ * Default line height options used by the line-height extension when no
8784
+ * custom options are provided.
8785
+ */
8786
+ const VegaRTEDefaultLineHeightOptions = [
8787
+ { title: '0.5', value: '0.5' },
8788
+ { title: '1', value: '1' },
8789
+ { title: '1.5', value: '1.5' },
8790
+ { title: '2', value: '2' },
8791
+ { title: '2.5', value: '2.5' },
8792
+ ];
8793
+
8794
+ var RTELineHeightExtensionAnnotationTypeEnum;
8795
+ (function (RTELineHeightExtensionAnnotationTypeEnum) {
8796
+ RTELineHeightExtensionAnnotationTypeEnum["LINE_HEIGHT"] = "LINE_HEIGHT";
8797
+ })(RTELineHeightExtensionAnnotationTypeEnum || (RTELineHeightExtensionAnnotationTypeEnum = {}));
8798
+ /**
8799
+ * Annotation to set block line height.
8800
+ */
8801
+ class LineHeightAnnotation extends BlockAnnotation {
8802
+ constructor(lineHeight) {
8803
+ super();
8804
+ this.type = RTELineHeightExtensionAnnotationTypeEnum.LINE_HEIGHT;
8805
+ this.lineHeight = lineHeight;
8806
+ }
8807
+ /**
8808
+ * Generate the map item for the annotation.
8809
+ *
8810
+ * @param {string} lineHeight - Line height value.
8811
+ * @returns {[RTELineHeightExtensionAnnotationTypeEnum.LINE_HEIGHT, LineHeightAnnotation]} Map item for the annotation.
8812
+ */
8813
+ static from(lineHeight) {
8814
+ return [RTELineHeightExtensionAnnotationTypeEnum.LINE_HEIGHT, new LineHeightAnnotation(lineHeight)];
8815
+ }
8816
+ /**
8817
+ * Get the default standalone styles for a given line height value.
8818
+ *
8819
+ * @param {string} lineHeight - The line height value.
8820
+ * @returns {AnnotationStyle} The default standalone styles.
8821
+ */
8822
+ static getDefaultStyles(lineHeight) {
8823
+ return { lineHeight };
8824
+ }
8825
+ /**
8826
+ * Generate the JSON item of the annotation.
8827
+ *
8828
+ * @returns {Record<string, unknown>} JSON representation of the annotation.
8829
+ */
8830
+ toJSON() {
8831
+ return {
8832
+ lineHeight: this.lineHeight,
8833
+ };
8834
+ }
8835
+ /**
8836
+ * @inheritDoc
8837
+ */
8838
+ renderClass() {
8839
+ return null;
8840
+ }
8841
+ /**
8842
+ * @inheritDoc
8843
+ */
8844
+ clone() {
8845
+ return new LineHeightAnnotation(this.lineHeight);
8846
+ }
8847
+ /**
8848
+ * @inheritDoc
8849
+ */
8850
+ renderStyle() {
8851
+ return LineHeightAnnotation.getDefaultStyles(this.lineHeight);
8852
+ }
8853
+ }
8854
+
8855
+ /**
8856
+ * Action to update block line height annotation.
8857
+ */
8858
+ class LineHeightAnnotationAction extends AnnotationAction {
8859
+ constructor(lineHeight) {
8860
+ super();
8861
+ this.isFlushable = true;
8862
+ this.lineHeight = lineHeight;
8863
+ }
8864
+ /**
8865
+ * Converts the action to an annotation.
8866
+ *
8867
+ * @returns {LineHeightAnnotation} The annotation.
8868
+ */
8869
+ toAnnotation() {
8870
+ return new LineHeightAnnotation(this.lineHeight);
8871
+ }
8872
+ }
8873
+
8874
+ /**
8875
+ * Update the block line height strategy.
8876
+ *
8877
+ * Registered for RTETextBlock and RTEListItemBlock, so the
8878
+ * target type is widened to the common RTEBlock base.
8879
+ */
8880
+ class BlockUpdateLineHeightStrategy extends ActionHandleStrategy {
8881
+ /**
8882
+ * Updating the line height of a block requires cascading updates to the custom style.
8883
+ *
8884
+ * @param {LineHeightAnnotationAction} _action - The line height annotation action.
8885
+ * @param {RTEBlock} target - The current block.
8886
+ */
8887
+ handleAction(_action, target) {
8888
+ this.updateCustomStyleAnnotation(target, ['lineHeight']);
8889
+ }
8890
+ }
8891
+
8892
+ const lineHeight = {
8893
+ 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>`,
8894
+ };
8895
+
8896
+ /**
8897
+ * Renderer for the line-height toolbar button in the Vega Rich Text Editor.
8898
+ */
8899
+ class RTELineHeightToolbarButtonRenderer extends VegaRTEToolbarButtonRenderer {
8900
+ constructor(options) {
8901
+ super();
8902
+ this.options = options;
8903
+ }
8904
+ /**
8905
+ * @inheritDoc
8906
+ */
8907
+ render(createElement, editorContext) {
8908
+ const dropdownItems = this.options.map((item) => {
8909
+ var _a;
8910
+ return ({
8911
+ key: item.value,
8912
+ label: (_a = item.title) !== null && _a !== void 0 ? _a : item.value,
8913
+ });
8914
+ });
8915
+ return this.renderDropdown(createElement, editorContext, {
8916
+ selectType: 'single',
8917
+ selectedSourceKey: this.getSelectedSourceValue(editorContext),
8918
+ }, [
8919
+ this.renderButton(createElement, editorContext, {
8920
+ icon: 'line-height',
8921
+ showArrowIcon: true,
8922
+ tooltip: { text: VegaInternalTranslation.t('Line Height') },
8923
+ }),
8924
+ this.renderDropdownListTemplate(createElement, dropdownItems),
8925
+ ]);
8926
+ }
8927
+ /**
8928
+ * @inheritDoc
8929
+ */
8930
+ isSelected() {
8931
+ return false;
8932
+ }
8933
+ /**
8934
+ * @inheritDoc
8935
+ */
8936
+ isDisabled(editorContext) {
8937
+ var _a;
8938
+ if (editorContext.host.disabled) {
8939
+ return true;
8940
+ }
8941
+ const extensionContext = this.getExtensionContext(editorContext.host);
8942
+ const selectedNodes = (_a = extensionContext === null || extensionContext === void 0 ? void 0 : extensionContext.getSelectedNodes()) !== null && _a !== void 0 ? _a : [];
8943
+ if (selectedNodes.some((node) => {
8944
+ var _a;
8945
+ return ((_a = node.getAnnotationByType(NodeAnnotationTypeEnum.CODE)) === null || _a === void 0 ? void 0 : _a.code) ||
8946
+ node.parent instanceof RTECodeBlock;
8947
+ })) {
8948
+ return true;
8949
+ }
8950
+ const selectedBlocks = this.getSelectedBlocks(editorContext);
8951
+ return selectedBlocks.some((block) => block instanceof RTECodeBlock ||
8952
+ block instanceof RTEImageBlock ||
8953
+ !ActionHandleStrategyRegistry.canHandle(LineHeightAnnotationAction.name, block));
8954
+ }
8955
+ /**
8956
+ * @inheritDoc
8957
+ */
8958
+ handleDropdownClick(itemValue, editorContext) {
8959
+ const selectedLineHeight = itemValue;
8960
+ const selectedBlocks = this.getSelectedBlocks(editorContext);
8961
+ selectedBlocks.forEach((block) => {
8962
+ block.apply(new LineHeightAnnotationAction(selectedLineHeight));
8963
+ });
8964
+ }
8965
+ /**
8966
+ * Handle direct toolbar button click.
8967
+ */
8968
+ handleButtonClick() {
8969
+ // No direct click action; selection happens in dropdown options.
8970
+ }
8971
+ /**
8972
+ * Get the selected line-height key for dropdown selection state.
8973
+ *
8974
+ * @param {VegaRTEToolbarRenderContext} editorContext - Current toolbar context.
8975
+ * @returns {string} Selected line-height key or empty string for mixed/none.
8976
+ */
8977
+ getSelectedSourceValue(editorContext) {
8978
+ const selectedBlocks = this.getSelectedBlocks(editorContext);
8979
+ if (selectedBlocks.length === 0) {
8980
+ return '';
8981
+ }
8982
+ const firstAnnotation = selectedBlocks[0].getAnnotationByType(RTELineHeightExtensionAnnotationTypeEnum.LINE_HEIGHT);
8983
+ const isSameLineHeight = selectedBlocks.every((block) => {
8984
+ const annotation = block.getAnnotationByType(RTELineHeightExtensionAnnotationTypeEnum.LINE_HEIGHT);
8985
+ return (annotation === null || annotation === void 0 ? void 0 : annotation.lineHeight) === (firstAnnotation === null || firstAnnotation === void 0 ? void 0 : firstAnnotation.lineHeight);
8986
+ });
8987
+ return isSameLineHeight && firstAnnotation ? firstAnnotation.lineHeight : '';
8988
+ }
8989
+ /**
8990
+ * Resolve selected blocks from selected nodes with range fallback.
8991
+ *
8992
+ * @param {VegaRTEToolbarRenderContext} editorContext - Current toolbar context.
8993
+ * @returns {RTEBlock[]} Selected blocks.
8994
+ */
8995
+ getSelectedBlocks(editorContext) {
8996
+ var _a, _b;
8997
+ const extensionContext = this.getExtensionContext(editorContext.host);
8998
+ const selectedNodes = (_a = extensionContext === null || extensionContext === void 0 ? void 0 : extensionContext.getSelectedNodes()) !== null && _a !== void 0 ? _a : [];
8999
+ const selectedBlocks = [];
9000
+ selectedNodes.forEach((node) => {
9001
+ if (node.parent instanceof RTEBlock && !selectedBlocks.includes(node.parent)) {
9002
+ selectedBlocks.push(node.parent);
9003
+ }
9004
+ });
9005
+ if (selectedBlocks.length === 0 && ((_b = editorContext.rteRange.startNode) === null || _b === void 0 ? void 0 : _b.parent) instanceof RTEBlock) {
9006
+ selectedBlocks.push(editorContext.rteRange.startNode.parent);
9007
+ }
9008
+ return selectedBlocks;
9009
+ }
9010
+ }
9011
+ (() => {
9012
+ VegaInternalIconManager.register({
9013
+ 'line-height': lineHeight,
9014
+ });
9015
+ })();
9016
+
9017
+ const LINE_HEIGHT_AWARE_BLOCK_NAMES = new Set([
9018
+ RTETextBlock.name,
9019
+ RTEListItemBlock.name,
9020
+ ]);
9021
+ /** Handle line height annotation. */
9022
+ class LineHeightAnnotationHandler extends AnnotationGeneratorStrategyAbstract {
9023
+ constructor(options = VegaRTEDefaultLineHeightOptions) {
9024
+ super();
9025
+ this.allowedLineHeights = new Set(options.map((option) => option.value));
9026
+ }
9027
+ /**
9028
+ * Can be handled.
9029
+ *
9030
+ * @param {RTEDtoClassPrototype} targetDto - Target DTO.
9031
+ * @returns {boolean} Whether the target DTO supports line-height annotations.
9032
+ */
9033
+ canHandle(targetDto) {
9034
+ return LINE_HEIGHT_AWARE_BLOCK_NAMES.has(targetDto.name);
9035
+ }
9036
+ /**
9037
+ * Extract inline `line-height` as a semantic `lineHeight` annotation.
9038
+ *
9039
+ * @param {HTMLElement} [element] - Current element.
9040
+ * @returns {VegaRTEBlockAnnotations} `{ lineHeight }` when present, otherwise `{}`.
9041
+ */
9042
+ handle(element) {
9043
+ var _a, _b;
9044
+ 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 : '';
9045
+ if (!lineHeight) {
9046
+ return {};
9047
+ }
9048
+ if (!this.allowedLineHeights.has(lineHeight)) {
9049
+ return {};
9050
+ }
9051
+ return { lineHeight };
9052
+ }
9053
+ }
9054
+
9055
+ /**
9056
+ * Removes a redundant inline `customStyle.lineHeight` when it duplicates the
9057
+ * semantic `lineHeight` annotation during HTML-to-DTO conversion.
9058
+ *
9059
+ * Note: moving out-of-list line-height values from the semantic annotation to
9060
+ * `customStyle.lineHeight` is handled by the per-host interceptor in
9061
+ * `line-height-host-interceptor.ts`, not here.
9062
+ */
9063
+ class LineHeightFilterStylesStrategy extends RTEFilterStylesStrategy {
9064
+ constructor() {
9065
+ super(...arguments);
9066
+ this.stylesToBeFiltered = {};
9067
+ }
9068
+ /**
9069
+ * Always run this strategy, even when autoMatchFormat is disabled.
9070
+ *
9071
+ * @returns {boolean} Always true.
9072
+ */
9073
+ get alwaysFilter() {
9074
+ return true;
9075
+ }
9076
+ /**
9077
+ * Drop `customStyle.lineHeight` when it duplicates the semantic `lineHeight`.
9078
+ *
9079
+ * @param {VegaRTEAnnotations} annotations - The annotations to filter.
9080
+ * @returns {VegaRTEAnnotations} The same annotations reference.
9081
+ */
9082
+ filterAnnotations(annotations) {
9083
+ const blockAnnotations = annotations;
9084
+ const lineHeight = blockAnnotations.lineHeight;
9085
+ const customStyle = blockAnnotations.customStyle;
9086
+ if (lineHeight && customStyle && customStyle.lineHeight === lineHeight) {
9087
+ delete customStyle.lineHeight;
9088
+ }
9089
+ if (customStyle && Object.keys(customStyle).length === 0) {
9090
+ delete blockAnnotations.customStyle;
9091
+ }
9092
+ return annotations;
9093
+ }
9094
+ }
9095
+
9096
+ /**
9097
+ * Per-class set of allowed line-height values, updated as extension instances
9098
+ * are constructed with (possibly custom) options.
9099
+ */
9100
+ const allowedLineHeightsByClass = new WeakMap();
9101
+ /**
9102
+ * Tracks which block classes have had their JSON `lineHeight` annotation
9103
+ * handler installed, so we register it exactly once per class.
9104
+ */
9105
+ const handlerInstalledClasses = new WeakSet();
9106
+ /**
9107
+ * Move an out-of-range `lineHeight` annotation into `customStyle.lineHeight`.
9108
+ *
9109
+ * @param {RTEBlock} block - The block to inspect.
9110
+ * @param {ReadonlySet<string>} allowed - Allowed line-height values.
9111
+ */
9112
+ function normalizeLineHeightStyle(block, allowed) {
9113
+ const annotation = block.annotationMap.get(RTELineHeightExtensionAnnotationTypeEnum.LINE_HEIGHT);
9114
+ if (!annotation || allowed.has(annotation.lineHeight)) {
9115
+ return;
9116
+ }
9117
+ const value = annotation.lineHeight;
9118
+ block.annotationMap.delete(RTELineHeightExtensionAnnotationTypeEnum.LINE_HEIGHT);
9119
+ const existing = block.annotationMap.get(CommonAnnotationTypeEnum.CUSTOM_STYLE);
9120
+ if (existing) {
9121
+ existing.customStyle = Object.assign(Object.assign({}, existing.customStyle), { lineHeight: value });
9122
+ }
9123
+ else {
9124
+ block.annotationMap.set(...CustomStyleAnnotation.from({ lineHeight: value }));
9125
+ }
9126
+ }
9127
+ /**
9128
+ * Install the JSON `lineHeight` annotation handler for a block class.
9129
+ *
9130
+ * @param {LineHeightBlockClass} BlockClass - Target block class.
9131
+ */
9132
+ function attachLineHeightFromJson(BlockClass) {
9133
+ if (handlerInstalledClasses.has(BlockClass)) {
9134
+ return;
9135
+ }
9136
+ handlerInstalledClasses.add(BlockClass);
9137
+ VegaRTEExtension.attachAnnotationFromJson(BlockClass, 'lineHeight', (instance, value) => {
9138
+ if (typeof value !== 'string' || value === '') {
9139
+ return;
9140
+ }
9141
+ instance.annotationMap.set(...LineHeightAnnotation.from(value));
9142
+ const allowed = allowedLineHeightsByClass.get(BlockClass);
9143
+ if (allowed && allowed.size > 0) {
9144
+ normalizeLineHeightStyle(instance, allowed);
9145
+ }
9146
+ });
9147
+ }
9148
+ /**
9149
+ * Update the set of allowed line-height values for a block class.
9150
+ *
9151
+ * @param {LineHeightBlockClass} BlockClass - Target block class.
9152
+ * @param {VegaRTELineHeightOption[]} options - Allowed line-height options.
9153
+ */
9154
+ function setAllowedLineHeights(BlockClass, options) {
9155
+ allowedLineHeightsByClass.set(BlockClass, new Set(options.map((option) => option.value)));
9156
+ }
9157
+
9158
+ /**
9159
+ * Rich Text Editor extension that adds configurable line-height support
9160
+ * (toolbar control, annotations, content transforms, and JSON parsing).
9161
+ */
9162
+ class VegaRTELineHeightExtension extends VegaRTEExtension {
9163
+ constructor(options = VegaRTEDefaultLineHeightOptions) {
9164
+ super();
9165
+ this.options = options;
9166
+ this.toolbarButtonRenderer = null;
9167
+ this.registerAnnotationHandler(new LineHeightAnnotationHandler(this.options));
9168
+ [RTETextBlock, RTEListItemBlock].forEach((BlockClass) => {
9169
+ setAllowedLineHeights(BlockClass, this.options);
9170
+ });
9171
+ }
9172
+ /**
9173
+ * Register the per-host toolbar renderer so each editor on the page gets
9174
+ * its own isolated line-height renderer instance.
9175
+ *
9176
+ * @typedef HTMLVegaRichTextEditorElement - The type of the host rich text editor element.
9177
+ * @param {HTMLVegaRichTextEditorElement} host - The host element.
9178
+ */
9179
+ prepareBeforeLoad(host) {
9180
+ this.toolbarButtonRenderer = new RTELineHeightToolbarButtonRenderer(this.options);
9181
+ this.registerToolbarButtonRenderer('lineHeight', this.toolbarButtonRenderer, host);
9182
+ }
9183
+ }
9184
+ (() => {
9185
+ [RTETextBlock, RTEListItemBlock].forEach((BlockClass) => {
9186
+ VegaRTEExtension.registerActionHandleStrategy(BlockClass.name, LineHeightAnnotationAction.name, new BlockUpdateLineHeightStrategy());
9187
+ RTEFilterStylesStrategyRegistry.register(BlockClass.name, new LineHeightFilterStylesStrategy());
9188
+ attachLineHeightFromJson(BlockClass);
9189
+ });
9190
+ })();
9191
+
9192
+ /**
9193
+ * Insert a new children to the nearest position of the parent container
9194
+ *
9195
+ * @example parent.apply(new InsertNodeToNearestRoot(rteRange, nodeToBeInserted))
9196
+ */
9197
+ class InsertNodeToNearestRootAction extends ModifyContentAction {
9198
+ constructor(rteRange, nodeToBeInserted) {
9199
+ super();
9200
+ this.type = ModifyContentActionType.INSERT_NODE_TO_NEAREST_ROOT;
9201
+ this.rteRange = rteRange;
9202
+ this.nodeToBeInserted = nodeToBeInserted;
9203
+ }
9204
+ }
9205
+
9206
+ /**
9207
+ * Strategy to handle the insertion of a token node into the nearest root block.
9208
+ */
9209
+ class InsertTokenNodeStrategy extends ActionHandleStrategy {
9210
+ /**
9211
+ * @inheritDoc
9212
+ */
9213
+ handleAction(action, block) {
9214
+ const { rteRange, token } = action;
9215
+ if (rteRange && rteRange.startNode) {
9216
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
9217
+ const { key, label, customAttrs = { wrapped: 'true' } } = token;
9218
+ const tokenNode = new RTETokenNode(generateUUID(), key, label, block);
9219
+ tokenNode.annotationMap.set('CUSTOM_ATTRIBUTE', new CustomAttributeAnnotation(customAttrs));
9220
+ block.apply(new InsertNodeToNearestRootAction(rteRange, tokenNode));
9221
+ action.actionHandleResult = true;
9222
+ }
9223
+ }
9224
+ }
9225
+
9226
+ var __rest = (undefined && undefined.__rest) || function (s, e) {
9227
+ var t = {};
9228
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
9229
+ t[p] = s[p];
9230
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
9231
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
9232
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9233
+ t[p[i]] = s[p[i]];
9234
+ }
9235
+ return t;
9236
+ };
9237
+ /**
9238
+ * Strategy to convert <span class="token" token-key="...">...</span> to a token node
9239
+ */
9240
+ class SpanToTokenNodeStrategy extends ElementToDTOStrategy {
9241
+ /**
9242
+ * @inheritDoc
9243
+ */
9244
+ canHandle(elementsArray, currentIndex) {
9245
+ const element = elementsArray[currentIndex];
9246
+ if (element.nodeName === 'SPAN' &&
9247
+ element.classList.contains('token') &&
9248
+ element.hasAttribute('token-key')) {
9249
+ return 1;
9250
+ }
9251
+ return 0;
9252
+ }
9253
+ /**
9254
+ * @inheritDoc
9255
+ */
9256
+ handle(elementsArray) {
9257
+ const element = elementsArray[0];
9258
+ const tokenKey = element.getAttribute('token-key');
9259
+ const text = element.textContent;
9260
+ const annotations = htmlElementToAnnotationGenerator.generate(RTETextNode, element);
9261
+ // Exclude customAttribute and customClass from annotations
9262
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
9263
+ const { customAttribute, customClass } = annotations, restAnnotations = __rest(annotations, ["customAttribute", "customClass"]);
9264
+ return {
9265
+ id: generateUUID(),
9266
+ type: 'token',
9267
+ token: tokenKey,
9268
+ text,
9269
+ annotations: Object.assign(Object.assign({}, restAnnotations), { customAttribute: this.createCustomAttrs(customAttribute) }),
9270
+ };
9271
+ }
9272
+ /**
9273
+ * @inheritDoc
9274
+ */
9275
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
9276
+ appendChildBlocks() { }
9277
+ /**
9278
+ * @inheritDoc
9279
+ */
9280
+ shouldProceedToElementChildren() {
9281
+ return false;
9282
+ }
9283
+ /**
9284
+ * Creates custom attributes record from the given custom attribute object, clean some fixed attributes.
9285
+ *
9286
+ * @param {Record<string, string>} customAttribute - The custom attribute object
9287
+ * @returns {Record<string, string>} The processed custom attributes
9288
+ */
9289
+ createCustomAttrs(customAttribute) {
9290
+ const result = Object.assign(Object.assign({}, customAttribute), { 'contenteditable': null, 'template-token-key': null, 'token-key': null, 'wrapped': customAttribute.wrapped === 'false' ? 'false' : 'true' });
9291
+ return cleanObject(result);
9292
+ }
9293
+ }
9294
+
9295
+ const spanToTokenNodeStrategy = new SpanToTokenNodeStrategy();
9296
+ /**
9297
+ * Vega Rich Text Editor Token Extension
9298
+ */
9299
+ class VegaRTETokenExtension extends VegaRTEExtension {
9300
+ constructor(tokenList = []) {
9301
+ super();
9302
+ this.tokenRenderer = new RTETokenNodeRenderer();
9303
+ this.tokenList = tokenList;
9304
+ this.registerNode('token', RTETokenNode);
9305
+ this.registerRenderer('token', this.tokenRenderer);
9306
+ this.registerElementToNodeDTOClassStrategy(spanToTokenNodeStrategy);
9307
+ }
9308
+ /** @inheritDoc */
9309
+ prepareBeforeLoad(host) {
9310
+ this.registerToolbarButtonRenderer('token', new RTETokenToolbarButtonRenderer(this.tokenList), host);
7698
9311
  }
7699
9312
  }
7700
9313
  (() => {
@@ -7703,4 +9316,4 @@ class VegaRTETokenExtension extends VegaRTEExtension {
7703
9316
  VegaRTEExtension.registerActionHandleStrategy(RTEListItemBlock.name, 'INSERT_TOKEN_NODE', insertTokenNodeStrategy);
7704
9317
  })();
7705
9318
 
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 };
9319
+ 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, VegaRTEHorizontalLineExtension as k, VegaRTESpecialCharactersExtension as l, VegaRTESpecialCharactersEssentials as m, VegaRTESpecialCharactersLatin as n, VegaRTESpecialCharactersMathematical as o, VegaRTESpecialCharactersArrows as p, VegaRTESpecialCharactersCurrency as q, VegaRTESpecialCharactersText as r, VegaRTELineHeightExtension as s, VegaRTEExtension as t, VegaRTEExtensionRenderer as u, VegaRTEToolbarButtonRenderer as v, waitForVega as w, RTETokenNode as x, RTETokenNodeRenderer as y, RTELanguageToolbarButtonRenderer as z };