@globalpayments/vega 2.102.0 → 2.103.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{app-globals-49c2a999.js → app-globals-85986306.js} +10 -10
- package/dist/cjs/{code-block-06e6591f.js → code-block-72de6c4d.js} +80 -1
- package/dist/cjs/{component-value-history-controller-slimmer.abstract-f29908f8.js → component-value-history-controller-slimmer.abstract-23d2b3d8.js} +3 -3
- package/dist/cjs/{content-state-8c862e5e.js → content-state-ff40bdc6.js} +38 -5
- package/dist/cjs/{date-required-rule-b672c432.js → date-required-rule-608e704b.js} +1 -1
- package/dist/cjs/{design-token-351ffd2c.js → design-token-a101a8d0.js} +3 -3
- package/dist/cjs/{element-appender-slimmer-f932b166.js → element-appender-slimmer-b93cc564.js} +2 -2
- package/dist/cjs/{form-field-controller-slimmer-5adb86ae.js → form-field-controller-slimmer-124d54ea.js} +1 -1
- package/dist/cjs/{image-annotation-action-25907d6b.js → image-annotation-action-1ee41bc7.js} +2 -2
- package/dist/cjs/{image-extension-1cf84f27.js → image-extension-6a92c524.js} +247 -5
- package/dist/cjs/index.cjs.js +17 -17
- package/dist/cjs/{inject-keyboard-manager-84d33920.js → inject-keyboard-manager-32d7dd0e.js} +1 -1
- package/dist/cjs/{internal-calendar-period-factory-3c5236be.js → internal-calendar-period-factory-c3198ea7.js} +1 -1
- package/dist/cjs/{internal-translation-controller-eae8a8de.js → internal-translation-controller-0d67ca4d.js} +1 -0
- package/dist/cjs/{keyboard-manager-baa83a61.js → keyboard-manager-332eec89.js} +1 -1
- package/dist/cjs/{keyboard-manager-slimmer-d1974b28.js → keyboard-manager-slimmer-a2872981.js} +1 -1
- package/dist/cjs/{link-extension-2a6133b7.js → link-extension-1b4ed437.js} +3 -3
- package/dist/cjs/loader.cjs.js +12 -12
- package/dist/cjs/{month-view-generator-a6827548.js → month-view-generator-b6a2b8be.js} +1 -1
- package/dist/cjs/{public-rules-7f26e0ae.js → public-rules-2066613c.js} +7 -7
- package/dist/cjs/{range-518b95a2.js → range-712fe703.js} +1 -1
- package/dist/cjs/{responsive-format-facade-95c54444.js → responsive-format-facade-44d33457.js} +1 -1
- package/dist/cjs/{rich-text-editor-required-rule-5d0c76ec.js → rich-text-editor-required-rule-1aa75d22.js} +1 -1
- package/dist/cjs/{split-cell-operation-28f6f8d9.js → split-cell-operation-afc82323.js} +3 -3
- package/dist/cjs/{state-border-formatter-6c284859.js → state-border-formatter-49984fd6.js} +1 -1
- package/dist/cjs/{string-format-strategy.abstract-f15b6196.js → string-format-strategy.abstract-bd563c01.js} +1 -1
- package/dist/cjs/{string-input-formatter-slimmer-5a3f1b55.js → string-input-formatter-slimmer-4faebac9.js} +1 -1
- package/dist/cjs/{string-mask-strategy-af6f3ba0.js → string-mask-strategy-624c4398.js} +2 -2
- package/dist/cjs/{style-formatter-324211fd.js → style-formatter-151d89a3.js} +2 -2
- package/dist/cjs/{time-required-rule-9e714442.js → time-required-rule-8cd8f9b9.js} +1 -1
- package/dist/cjs/{token-extension-86723cad.js → token-extension-72d0cb08.js} +1011 -767
- package/dist/cjs/{translation-slimmer-0227ee24.js → translation-slimmer-1771d01f.js} +1 -1
- package/dist/cjs/{type-guard-29e01bd4.js → type-guard-cce6fe1f.js} +1 -1
- package/dist/cjs/{valid-credit-card-number-rule-4ec364af.js → valid-credit-card-number-rule-b13c2fc4.js} +1 -1
- package/dist/cjs/vega-accordion.cjs.entry.js +6 -6
- package/dist/cjs/vega-app-header-button.cjs.entry.js +5 -5
- package/dist/cjs/vega-box.cjs.entry.js +6 -6
- package/dist/cjs/vega-button-circle.cjs.entry.js +5 -5
- package/dist/cjs/vega-button.cjs.entry.js +3 -3
- package/dist/cjs/vega-calendar_5.cjs.entry.js +7 -7
- package/dist/cjs/vega-card.cjs.entry.js +5 -5
- package/dist/cjs/vega-carousel.cjs.entry.js +3 -3
- package/dist/cjs/vega-checkbox_2.cjs.entry.js +2 -2
- package/dist/cjs/vega-chip.cjs.entry.js +5 -5
- package/dist/cjs/vega-code-block.cjs.entry.js +8 -8
- package/dist/cjs/vega-color-picker.cjs.entry.js +2 -2
- package/dist/cjs/vega-color-swatch-picker.cjs.entry.js +3 -3
- package/dist/cjs/vega-color-swatch.cjs.entry.js +2 -2
- package/dist/cjs/vega-combo-box.cjs.entry.js +8 -8
- package/dist/cjs/vega-date-picker_2.cjs.entry.js +13 -13
- package/dist/cjs/vega-dialog_2.cjs.entry.js +3 -3
- package/dist/cjs/vega-divider.cjs.entry.js +5 -5
- package/dist/cjs/vega-dropdown_5.cjs.entry.js +7 -7
- package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
- package/dist/cjs/vega-field-label.cjs.entry.js +2 -2
- package/dist/cjs/vega-file-uploader.cjs.entry.js +3 -3
- package/dist/cjs/vega-flag-icon.cjs.entry.js +5 -5
- package/dist/cjs/vega-flex.cjs.entry.js +6 -6
- package/dist/cjs/vega-font.cjs.entry.js +5 -5
- package/dist/cjs/vega-form.cjs.entry.js +2 -2
- package/dist/cjs/vega-grid.cjs.entry.js +5 -5
- package/dist/cjs/vega-icon.cjs.entry.js +5 -5
- package/dist/cjs/vega-image-uploader.cjs.entry.js +5 -5
- package/dist/cjs/vega-input-credit-card.cjs.entry.js +6 -6
- package/dist/cjs/vega-input-numeric.cjs.entry.js +12 -14
- package/dist/cjs/vega-input-passcode.cjs.entry.js +5 -5
- package/dist/cjs/vega-input-phone-number.cjs.entry.js +4 -4
- package/dist/cjs/vega-input-range.cjs.entry.js +3 -3
- package/dist/cjs/vega-input-select.cjs.entry.js +5 -5
- package/dist/cjs/vega-input.cjs.entry.js +31 -27
- package/dist/cjs/vega-left-nav_5.cjs.entry.js +7 -7
- package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +3 -3
- package/dist/cjs/vega-pagination-page-size-selector-mobile.cjs.entry.js +2 -2
- package/dist/cjs/vega-pagination.cjs.entry.js +4 -4
- package/dist/cjs/vega-popover_2.cjs.entry.js +8 -8
- package/dist/cjs/vega-progress-tracker_2.cjs.entry.js +3 -3
- package/dist/cjs/vega-radio_2.cjs.entry.js +5 -5
- package/dist/cjs/vega-rich-text-bookmark-editor.cjs.entry.js +2 -2
- package/dist/cjs/vega-rich-text-content.cjs.entry.js +6 -6
- package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +474 -207
- package/dist/cjs/vega-rich-text-find-replace-panel.cjs.entry.js +1 -1
- package/dist/cjs/vega-rich-text-special-characters-panel.cjs.entry.js +5 -5
- package/dist/cjs/vega-rich-text-table-properties_3.cjs.entry.js +8 -8
- package/dist/cjs/vega-selection-chip_2.cjs.entry.js +4 -4
- package/dist/cjs/vega-selection-tile_2.cjs.entry.js +2 -2
- package/dist/cjs/vega-sidenav_3.cjs.entry.js +3 -3
- package/dist/cjs/vega-signature-capture.cjs.entry.js +7 -7
- package/dist/cjs/vega-stepper.cjs.entry.js +2 -2
- package/dist/cjs/vega-tab-group_2.cjs.entry.js +6 -6
- package/dist/cjs/vega-table_11.cjs.entry.js +4 -4
- package/dist/cjs/vega-textarea.cjs.entry.js +2 -2
- package/dist/cjs/vega-time-picker_2.cjs.entry.js +9 -9
- package/dist/cjs/vega-toggle-switch.cjs.entry.js +2 -2
- package/dist/cjs/vega-tooltip_2.cjs.entry.js +6 -6
- package/dist/cjs/vega.cjs.js +12 -12
- package/dist/collection/components/vega-input/slimmers/controllers/vega-input-state-controller.js +0 -14
- package/dist/collection/components/vega-input/slimmers/renderers/vega-input-input-container-renderer.js +11 -2
- package/dist/collection/components/vega-input/slimmers/renderers/vega-input-input-renderer.js +11 -1
- package/dist/collection/components/vega-input/vega-input.js +52 -8
- package/dist/collection/components/vega-input-numeric/slimmers/renderers/vega-input-numeric-renderer.js +7 -1
- package/dist/collection/components/vega-input-numeric/vega-input-numeric.js +0 -8
- package/dist/collection/components/vega-rich-text-editor/constants/constant.js +4 -0
- package/dist/collection/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/sequential-composition-strategy.js +31 -0
- package/dist/collection/components/vega-rich-text-editor/dto/actions/modify-content-action.abstract.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/dto/actions/sequential-composition-action.js +14 -0
- package/dist/collection/components/vega-rich-text-editor/dto/content-state.js +4 -1
- package/dist/collection/components/vega-rich-text-editor/dto/flush-changes-payload.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/dto/nodes/image-node.js +3 -2
- package/dist/collection/components/vega-rich-text-editor/extensions/functions/dto/function-block.js +30 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/functions/element-to-dto-strategies/div-to-function-block-strategy.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/paste/controllers/chooser-positioner.js +107 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/paste/controllers/paste-chooser-controller.js +91 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/paste/controllers/paste-event-interceptor.js +47 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/paste/controllers/selection-snapshot-service.js +54 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/paste/parse-local-images-helper/image-extractor.js +17 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/paste/paste-chooser-ui.js +3 -1
- package/dist/collection/components/vega-rich-text-editor/extensions/paste/paste-extension.js +41 -354
- package/dist/collection/components/vega-rich-text-editor/extensions/paste/pipeline/data-transfer-builder.js +36 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/paste/pipeline/paste-dispatcher.js +23 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/paste/pipeline/paste-processing-pipeline.js +30 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/paste/strategies/paste-processing-strategy.abstract.js +34 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/paste/strategies/paste-strategy-selector.js +19 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/paste/strategies/plain-paste-strategy.js +74 -0
- package/dist/collection/components/vega-rich-text-editor/extensions/paste/type.js +1 -0
- package/dist/collection/components/vega-rich-text-editor/helpers/utils.js +67 -0
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/abstract-delete-content-handler.js +67 -11
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/backward-delete-content-handler.js +4 -17
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/base-handler.js +34 -1
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/forward-delete-content-handler.js +13 -32
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-line-break-handler.js +60 -25
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-paragraph-handler.js +55 -19
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-paste-handler.js +165 -59
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-text-handler.js +55 -21
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/user-input-controller.js +2 -16
- package/dist/collection/components/vega-rich-text-editor/slimmers/controllers/value-controller.js +11 -1
- package/dist/collection/components/vega-rich-text-editor/utils/html-to-plain-text-utils.js +240 -0
- package/dist/collection/helpers/translation/locales/en.js +1 -0
- package/dist/esm/{app-globals-da5c83c2.js → app-globals-8cdfc5c9.js} +10 -10
- package/dist/esm/{code-block-d8f83d85.js → code-block-9360c331.js} +74 -2
- package/dist/esm/{component-value-history-controller-slimmer.abstract-642e7147.js → component-value-history-controller-slimmer.abstract-9ea58806.js} +3 -3
- package/dist/esm/{content-state-486eae1d.js → content-state-67a12e74.js} +38 -5
- package/dist/esm/{date-required-rule-08695d25.js → date-required-rule-66b5bf02.js} +1 -1
- package/dist/esm/{design-token-df3331d9.js → design-token-acd1efeb.js} +3 -3
- package/dist/esm/{element-appender-slimmer-f02a227f.js → element-appender-slimmer-7e5bc1e9.js} +2 -2
- package/dist/esm/{form-field-controller-slimmer-a7c0a0f8.js → form-field-controller-slimmer-d653c494.js} +1 -1
- package/dist/esm/{image-annotation-action-df744ba5.js → image-annotation-action-9525be48.js} +2 -2
- package/dist/esm/{image-extension-20b39140.js → image-extension-aea75132.js} +246 -6
- package/dist/esm/index.js +17 -17
- package/dist/esm/{inject-keyboard-manager-399ed867.js → inject-keyboard-manager-f6522d2f.js} +1 -1
- package/dist/esm/{internal-calendar-period-factory-7b866c3b.js → internal-calendar-period-factory-261df2f2.js} +1 -1
- package/dist/esm/{internal-translation-controller-4a7ee4d5.js → internal-translation-controller-3637e47e.js} +1 -0
- package/dist/esm/{keyboard-manager-f5d13a34.js → keyboard-manager-53e8d8d0.js} +1 -1
- package/dist/esm/{keyboard-manager-slimmer-f40dcb54.js → keyboard-manager-slimmer-b3de042d.js} +1 -1
- package/dist/esm/{link-extension-3f93d70d.js → link-extension-57ba9520.js} +3 -3
- package/dist/esm/loader.js +12 -12
- package/dist/esm/{month-view-generator-0c665987.js → month-view-generator-15215a09.js} +1 -1
- package/dist/esm/{public-rules-470a1dac.js → public-rules-c77a1550.js} +7 -7
- package/dist/esm/{range-8e89fb54.js → range-3c74e1c8.js} +1 -1
- package/dist/esm/{responsive-format-facade-55131a33.js → responsive-format-facade-1b325d06.js} +1 -1
- package/dist/esm/{rich-text-editor-required-rule-06caf383.js → rich-text-editor-required-rule-cfd32ba2.js} +1 -1
- package/dist/esm/{split-cell-operation-e158366a.js → split-cell-operation-85a036f9.js} +3 -3
- package/dist/esm/{state-border-formatter-2b73fa08.js → state-border-formatter-ce3495b0.js} +1 -1
- package/dist/esm/{string-format-strategy.abstract-8c7937e3.js → string-format-strategy.abstract-8ce04558.js} +1 -1
- package/dist/esm/{string-input-formatter-slimmer-681c6b71.js → string-input-formatter-slimmer-0d60ba7d.js} +1 -1
- package/dist/esm/{string-mask-strategy-b8cceee6.js → string-mask-strategy-cabc1d50.js} +2 -2
- package/dist/esm/{style-formatter-fcd70869.js → style-formatter-00fe4f1c.js} +2 -2
- package/dist/esm/{time-required-rule-ce50859b.js → time-required-rule-57ceeae9.js} +1 -1
- package/dist/esm/{token-extension-2401e753.js → token-extension-645a9520.js} +1011 -767
- package/dist/esm/{translation-slimmer-b3f3cf65.js → translation-slimmer-b69057eb.js} +1 -1
- package/dist/esm/{type-guard-08c82e08.js → type-guard-204094c6.js} +1 -1
- package/dist/esm/{valid-credit-card-number-rule-66bad519.js → valid-credit-card-number-rule-0874e19f.js} +1 -1
- package/dist/esm/vega-accordion.entry.js +6 -6
- package/dist/esm/vega-app-header-button.entry.js +5 -5
- package/dist/esm/vega-box.entry.js +6 -6
- package/dist/esm/vega-button-circle.entry.js +5 -5
- package/dist/esm/vega-button.entry.js +3 -3
- package/dist/esm/vega-calendar_5.entry.js +7 -7
- package/dist/esm/vega-card.entry.js +5 -5
- package/dist/esm/vega-carousel.entry.js +3 -3
- package/dist/esm/vega-checkbox_2.entry.js +2 -2
- package/dist/esm/vega-chip.entry.js +5 -5
- package/dist/esm/vega-code-block.entry.js +8 -8
- package/dist/esm/vega-color-picker.entry.js +2 -2
- package/dist/esm/vega-color-swatch-picker.entry.js +3 -3
- package/dist/esm/vega-color-swatch.entry.js +2 -2
- package/dist/esm/vega-combo-box.entry.js +8 -8
- package/dist/esm/vega-date-picker_2.entry.js +13 -13
- package/dist/esm/vega-dialog_2.entry.js +3 -3
- package/dist/esm/vega-divider.entry.js +5 -5
- package/dist/esm/vega-dropdown_5.entry.js +7 -7
- package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
- package/dist/esm/vega-field-label.entry.js +2 -2
- package/dist/esm/vega-file-uploader.entry.js +3 -3
- package/dist/esm/vega-flag-icon.entry.js +5 -5
- package/dist/esm/vega-flex.entry.js +6 -6
- package/dist/esm/vega-font.entry.js +5 -5
- package/dist/esm/vega-form.entry.js +2 -2
- package/dist/esm/vega-grid.entry.js +5 -5
- package/dist/esm/vega-icon.entry.js +5 -5
- package/dist/esm/vega-image-uploader.entry.js +5 -5
- package/dist/esm/vega-input-credit-card.entry.js +6 -6
- package/dist/esm/vega-input-numeric.entry.js +12 -14
- package/dist/esm/vega-input-passcode.entry.js +5 -5
- package/dist/esm/vega-input-phone-number.entry.js +4 -4
- package/dist/esm/vega-input-range.entry.js +3 -3
- package/dist/esm/vega-input-select.entry.js +5 -5
- package/dist/esm/vega-input.entry.js +31 -27
- package/dist/esm/vega-left-nav_5.entry.js +7 -7
- package/dist/esm/vega-loader-wrapper_2.entry.js +3 -3
- package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +2 -2
- package/dist/esm/vega-pagination.entry.js +4 -4
- package/dist/esm/vega-popover_2.entry.js +8 -8
- package/dist/esm/vega-progress-tracker_2.entry.js +3 -3
- package/dist/esm/vega-radio_2.entry.js +5 -5
- package/dist/esm/vega-rich-text-bookmark-editor.entry.js +2 -2
- package/dist/esm/vega-rich-text-content.entry.js +6 -6
- package/dist/esm/vega-rich-text-editor_4.entry.js +474 -207
- package/dist/esm/vega-rich-text-find-replace-panel.entry.js +1 -1
- package/dist/esm/vega-rich-text-special-characters-panel.entry.js +5 -5
- package/dist/esm/vega-rich-text-table-properties_3.entry.js +8 -8
- package/dist/esm/vega-selection-chip_2.entry.js +4 -4
- package/dist/esm/vega-selection-tile_2.entry.js +2 -2
- package/dist/esm/vega-sidenav_3.entry.js +3 -3
- package/dist/esm/vega-signature-capture.entry.js +7 -7
- package/dist/esm/vega-stepper.entry.js +2 -2
- package/dist/esm/vega-tab-group_2.entry.js +6 -6
- package/dist/esm/vega-table_11.entry.js +4 -4
- package/dist/esm/vega-textarea.entry.js +2 -2
- package/dist/esm/vega-time-picker_2.entry.js +9 -9
- package/dist/esm/vega-toggle-switch.entry.js +2 -2
- package/dist/esm/vega-tooltip_2.entry.js +6 -6
- package/dist/esm/vega.js +12 -12
- package/dist/sri/vega-sri-manifest.json +321 -321
- package/dist/types/components/vega-input/slimmers/controllers/vega-input-state-controller.d.ts +0 -2
- package/dist/types/components/vega-input/slimmers/renderers/vega-input-input-container-renderer.d.ts +4 -0
- package/dist/types/components/vega-input/slimmers/renderers/vega-input-input-renderer.d.ts +2 -0
- package/dist/types/components/vega-input/vega-input.d.ts +15 -3
- package/dist/types/components/vega-input-numeric/slimmers/renderers/vega-input-numeric-renderer.d.ts +2 -0
- package/dist/types/components/vega-input-numeric/vega-input-numeric.d.ts +0 -2
- package/dist/types/components/vega-rich-text-editor/constants/constant.d.ts +4 -0
- package/dist/types/components/vega-rich-text-editor/dto/action-handle-strategies/modify-content-strategies/sequential-composition-strategy.d.ts +14 -0
- package/dist/types/components/vega-rich-text-editor/dto/actions/modify-content-action.abstract.d.ts +4 -1
- package/dist/types/components/vega-rich-text-editor/dto/actions/sequential-composition-action.d.ts +30 -0
- package/dist/types/components/vega-rich-text-editor/dto/flush-changes-payload.d.ts +16 -0
- package/dist/types/components/vega-rich-text-editor/extensions/functions/dto/function-block.d.ts +7 -0
- package/dist/types/components/vega-rich-text-editor/extensions/paste/controllers/chooser-positioner.d.ts +33 -0
- package/dist/types/components/vega-rich-text-editor/extensions/paste/controllers/paste-chooser-controller.d.ts +43 -0
- package/dist/types/components/vega-rich-text-editor/extensions/paste/controllers/paste-event-interceptor.d.ts +22 -0
- package/dist/types/components/vega-rich-text-editor/extensions/paste/controllers/selection-snapshot-service.d.ts +29 -0
- package/dist/types/components/vega-rich-text-editor/extensions/paste/parse-local-images-helper/image-extractor.d.ts +13 -0
- package/dist/types/components/vega-rich-text-editor/extensions/paste/parse-local-images-helper/paste-image-parser.d.ts +1 -1
- package/dist/types/components/vega-rich-text-editor/extensions/paste/parse-local-images-helper/pending-image-registry.d.ts +1 -1
- package/dist/types/components/vega-rich-text-editor/extensions/paste/paste-chooser-ui.d.ts +1 -0
- package/dist/types/components/vega-rich-text-editor/extensions/paste/paste-extension.d.ts +28 -93
- package/dist/types/components/vega-rich-text-editor/extensions/paste/pipeline/data-transfer-builder.d.ts +10 -0
- package/dist/types/components/vega-rich-text-editor/extensions/paste/pipeline/paste-dispatcher.d.ts +8 -0
- package/dist/types/components/vega-rich-text-editor/extensions/paste/pipeline/paste-processing-pipeline.d.ts +18 -0
- package/dist/types/components/vega-rich-text-editor/extensions/paste/strategies/paste-processing-strategy.abstract.d.ts +28 -6
- package/dist/types/components/vega-rich-text-editor/extensions/paste/strategies/paste-strategy-selector.d.ts +13 -0
- package/dist/types/components/vega-rich-text-editor/extensions/paste/strategies/plain-paste-strategy.d.ts +29 -0
- package/dist/types/components/vega-rich-text-editor/extensions/paste/type.d.ts +35 -0
- package/dist/types/components/vega-rich-text-editor/helpers/utils.d.ts +47 -0
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/abstract-delete-content-handler.d.ts +17 -6
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/backward-delete-content-handler.d.ts +5 -1
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/base-handler.d.ts +30 -1
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/forward-delete-content-handler.d.ts +5 -1
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-line-break-handler.d.ts +21 -4
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-paragraph-handler.d.ts +12 -4
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-paste-handler.d.ts +38 -5
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/helper/input-event-handler/insert-text-handler.d.ts +7 -2
- package/dist/types/components/vega-rich-text-editor/slimmers/controllers/user-input-controller.d.ts +2 -0
- package/dist/types/components/vega-rich-text-editor/utils/html-to-plain-text-utils.d.ts +31 -0
- package/dist/types/components.d.ts +24 -0
- package/dist/types/helpers/translation/interface.d.ts +1 -0
- package/dist/types/types/public-api.d.ts +2 -1
- package/dist/vega/index.esm.js +1 -1
- package/dist/vega/{p-8a4cc7c2.entry.js → p-0169f71c.entry.js} +1 -1
- package/dist/vega/p-018bb83b.entry.js +1 -0
- package/dist/vega/{p-25e51acb.js → p-08bf08d2.js} +1 -1
- package/dist/vega/{p-85a940c0.entry.js → p-0b33753f.entry.js} +1 -1
- package/dist/vega/{p-a5fa260b.js → p-1537b1e4.js} +1 -1
- package/dist/vega/{p-7dfb1481.entry.js → p-17f6dc94.entry.js} +1 -1
- package/dist/vega/{p-dd673eb4.entry.js → p-1a4d1991.entry.js} +1 -1
- package/dist/vega/{p-557b64bd.js → p-1b2e5898.js} +1 -1
- package/dist/vega/{p-2256eb09.entry.js → p-1f1f93bf.entry.js} +1 -1
- package/dist/vega/{p-d86e0b01.js → p-1fb953f8.js} +1 -1
- package/dist/vega/{p-03efc67a.entry.js → p-2171b571.entry.js} +1 -1
- package/dist/vega/p-255fe20b.js +1 -0
- package/dist/vega/{p-cf5c5515.js → p-261cf764.js} +1 -1
- package/dist/vega/{p-f0b49ae4.entry.js → p-27e77ea1.entry.js} +1 -1
- package/dist/vega/{p-109f0e33.entry.js → p-28acbe42.entry.js} +1 -1
- package/dist/vega/{p-27c9c2a5.entry.js → p-2acc600a.entry.js} +1 -1
- package/dist/vega/p-2fc2299f.js +1 -0
- package/dist/vega/{p-b48caf90.entry.js → p-2ff659a1.entry.js} +1 -1
- package/dist/vega/{p-527c3211.entry.js → p-322da1eb.entry.js} +1 -1
- package/dist/vega/{p-dffe47db.js → p-3283fa2f.js} +1 -1
- package/dist/vega/p-3567dc55.entry.js +1 -0
- package/dist/vega/{p-c6419eb3.entry.js → p-36b795c6.entry.js} +1 -1
- package/dist/vega/p-37714a3a.js +1 -0
- package/dist/vega/{p-d7e59f31.js → p-3b4e2ba0.js} +1 -1
- package/dist/vega/{p-3d060d2f.entry.js → p-3b911043.entry.js} +1 -1
- package/dist/vega/{p-5c6d36ef.entry.js → p-3e270b65.entry.js} +1 -1
- package/dist/vega/{p-b68f55e2.js → p-4043508a.js} +1 -1
- package/dist/vega/p-4151d4a8.js +1 -0
- package/dist/vega/{p-c6b6987e.js → p-45af801f.js} +1 -1
- package/dist/vega/p-48c2150b.entry.js +1 -0
- package/dist/vega/p-4b253f74.entry.js +1 -0
- package/dist/vega/{p-75c7f8ea.entry.js → p-4cdc064d.entry.js} +1 -1
- package/dist/vega/{p-1d8a8507.entry.js → p-4e4b50f3.entry.js} +1 -1
- package/dist/vega/{p-d8fa2f19.entry.js → p-564110ba.entry.js} +1 -1
- package/dist/vega/p-5f377954.js +1 -1
- package/dist/vega/{p-bec31ffc.entry.js → p-608d3559.entry.js} +1 -1
- package/dist/vega/{p-3ce7521e.entry.js → p-64eb05d3.entry.js} +1 -1
- package/dist/vega/{p-2f5c4b61.entry.js → p-66bf209b.entry.js} +1 -1
- package/dist/vega/{p-83f5ef3a.entry.js → p-69eadbd8.entry.js} +1 -1
- package/dist/vega/{p-c66c6fd2.entry.js → p-6c4edee8.entry.js} +1 -1
- package/dist/vega/p-6e16bb3a.js +1 -0
- package/dist/vega/{p-7d748545.entry.js → p-76f4fdba.entry.js} +1 -1
- package/dist/vega/{p-4c6989ae.entry.js → p-7874055b.entry.js} +1 -1
- package/dist/vega/{p-ca60a74b.entry.js → p-7d3d24f6.entry.js} +1 -1
- package/dist/vega/{p-3bfb53e3.js → p-7f9ad7bc.js} +1 -1
- package/dist/vega/{p-18ddc6a4.entry.js → p-8193f4ef.entry.js} +1 -1
- package/dist/vega/{p-816064f2.entry.js → p-8197d172.entry.js} +1 -1
- package/dist/vega/{p-634b138c.entry.js → p-8ac0b1b2.entry.js} +1 -1
- package/dist/vega/{p-553510d8.entry.js → p-8c61db9d.entry.js} +1 -1
- package/dist/vega/{p-061a76c3.entry.js → p-8de29082.entry.js} +1 -1
- package/dist/vega/{p-325b804d.entry.js → p-8e59606f.entry.js} +1 -1
- package/dist/vega/p-8ea41806.js +1 -0
- package/dist/vega/{p-ff9090af.entry.js → p-9153c2f5.entry.js} +1 -1
- package/dist/vega/{p-a0c87e88.entry.js → p-92411f56.entry.js} +1 -1
- package/dist/vega/{p-049e64b1.entry.js → p-94d65dcf.entry.js} +1 -1
- package/dist/vega/{p-a261a675.entry.js → p-9a96fb05.entry.js} +1 -1
- package/dist/vega/{p-7044bb48.js → p-9fcfd738.js} +1 -1
- package/dist/vega/{p-b1e1c7d0.js → p-a2c7a3bc.js} +1 -1
- package/dist/vega/p-a2dcde12.js +1 -0
- package/dist/vega/{p-be0eb72f.js → p-a60d75d9.js} +1 -1
- package/dist/vega/{p-5a347a15.js → p-a9fc4043.js} +1 -1
- package/dist/vega/{p-efef0dfe.entry.js → p-abe5f7f0.entry.js} +1 -1
- package/dist/vega/{p-197388a5.entry.js → p-ac98c189.entry.js} +1 -1
- package/dist/vega/{p-dd273d89.entry.js → p-ade903b3.entry.js} +1 -1
- package/dist/vega/{p-c0eb8c58.js → p-affb40e8.js} +1 -1
- package/dist/vega/{p-277aab9b.js → p-b3a1cd22.js} +1 -1
- package/dist/vega/p-b63a90b3.entry.js +1 -0
- package/dist/vega/{p-f9f96030.entry.js → p-ba050d63.entry.js} +1 -1
- package/dist/vega/{p-bf0b46c1.js → p-ba67eb96.js} +1 -1
- package/dist/vega/{p-f0c6e9c5.entry.js → p-c08ac33f.entry.js} +1 -1
- package/dist/vega/{p-46be74fc.entry.js → p-c7ec97d1.entry.js} +1 -1
- package/dist/vega/{p-effbfc50.entry.js → p-ca1fe571.entry.js} +1 -1
- package/dist/vega/{p-408c3ad4.entry.js → p-cc9fc36a.entry.js} +1 -1
- package/dist/vega/{p-741e064e.entry.js → p-d044d54f.entry.js} +1 -1
- package/dist/vega/{p-0e0e66c9.entry.js → p-d3a9355c.entry.js} +1 -1
- package/dist/vega/p-d5a75228.js +1 -0
- package/dist/vega/{p-76135e80.entry.js → p-dc83fa6b.entry.js} +1 -1
- package/dist/vega/{p-92efdbf0.entry.js → p-dcfce26e.entry.js} +1 -1
- package/dist/vega/p-df9585f6.js +3 -0
- package/dist/vega/{p-f5f26b44.entry.js → p-e2c8a470.entry.js} +1 -1
- package/dist/vega/{p-23781e76.js → p-e33a954f.js} +1 -1
- package/dist/vega/{p-e577dda8.entry.js → p-e5fc6583.entry.js} +1 -1
- package/dist/vega/p-e668cf11.js +1 -0
- package/dist/vega/{p-0338f621.entry.js → p-e6b0a292.entry.js} +1 -1
- package/dist/vega/{p-381d8781.js → p-e84c2589.js} +1 -1
- package/dist/vega/{p-1b97e751.entry.js → p-eb945d34.entry.js} +1 -1
- package/dist/vega/{p-d8a0e3e0.entry.js → p-ebe1dd2b.entry.js} +1 -1
- package/dist/vega/{p-6beaf1c8.entry.js → p-f818bb20.entry.js} +1 -1
- package/dist/vega/p-f981cf2c.js +1 -0
- package/dist/vega/p-f9d09b0c.js +1 -0
- package/dist/vega/{p-4d20a56f.js → p-fdbdf12f.js} +1 -1
- package/dist/vega/{p-48100d38.entry.js → p-fee080b9.entry.js} +1 -1
- package/dist/vega/vega.esm.js +1 -1
- package/package.json +1 -1
- package/dist/vega/p-040bd9ca.js +0 -1
- package/dist/vega/p-087240db.js +0 -1
- package/dist/vega/p-15052b2e.entry.js +0 -1
- package/dist/vega/p-28c16885.js +0 -1
- package/dist/vega/p-30cc31dd.entry.js +0 -1
- package/dist/vega/p-3ec4d710.js +0 -1
- package/dist/vega/p-43ea1e86.js +0 -1
- package/dist/vega/p-7228088b.entry.js +0 -1
- package/dist/vega/p-7f711049.js +0 -1
- package/dist/vega/p-7fd15dd1.js +0 -1
- package/dist/vega/p-85695819.js +0 -1
- package/dist/vega/p-8e1f30ec.entry.js +0 -1
- package/dist/vega/p-9680dfe6.js +0 -1
- package/dist/vega/p-ae12cc3f.js +0 -3
- package/dist/vega/p-c0823f32.js +0 -1
- package/dist/vega/p-c5af2ecc.entry.js +0 -1
- package/dist/vega/p-fa43272c.js +0 -1
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import type { PasteInput, PasteOutput } from '../type';
|
|
1
2
|
export declare enum RTEPasteMode {
|
|
2
3
|
RICH = "rich",
|
|
4
|
+
PLAIN = "plain",
|
|
3
5
|
WORD = "word"
|
|
4
6
|
}
|
|
5
7
|
/**
|
|
@@ -44,18 +46,38 @@ export declare abstract class AbstractPasteProcessingStrategy {
|
|
|
44
46
|
* @returns {boolean} `false` unless a strategy opts into image processing.
|
|
45
47
|
*/
|
|
46
48
|
get supportsImageProcessing(): boolean;
|
|
49
|
+
/** @returns {boolean} Whether this strategy consumes `text/plain` instead of `text/html` (default: false). */
|
|
50
|
+
get consumesPlainText(): boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Owns the complete content policy for this paste mode. Subclasses that
|
|
53
|
+
* only need a different source string should override {@link getSourceContent}
|
|
54
|
+
* instead of re-implementing this method.
|
|
55
|
+
*
|
|
56
|
+
* @param {PasteInput} input Complete clipboard payload.
|
|
57
|
+
* @returns {PasteOutput} Complete downstream paste contract.
|
|
58
|
+
*/
|
|
59
|
+
transform(input: PasteInput): PasteOutput;
|
|
60
|
+
/**
|
|
61
|
+
* Resolves the source string passed to {@link process}. Defaults to
|
|
62
|
+
* `input.text` when {@link consumesPlainText} is true, otherwise `input.html`.
|
|
63
|
+
*
|
|
64
|
+
* @param {PasteInput} input Complete clipboard payload.
|
|
65
|
+
* @returns {string} Content to feed into `process`.
|
|
66
|
+
*/
|
|
67
|
+
protected getSourceContent(input: PasteInput): string;
|
|
47
68
|
/**
|
|
48
69
|
* Detect whether this strategy should handle the given HTML content.
|
|
49
70
|
*
|
|
50
|
-
* @param html Raw clipboard HTML
|
|
51
|
-
* @returns
|
|
71
|
+
* @param {string} html Raw clipboard HTML.
|
|
72
|
+
* @returns {boolean} Whether this strategy should process the content.
|
|
52
73
|
*/
|
|
53
74
|
abstract canHandle(html: string): boolean;
|
|
54
75
|
/**
|
|
55
|
-
* Transform
|
|
76
|
+
* Transform clipboard content for the RTE pipeline.
|
|
77
|
+
* Receives `text/html` by default or `text/plain` if {@link consumesPlainText} is true.
|
|
56
78
|
*
|
|
57
|
-
* @param
|
|
58
|
-
* @returns Processed HTML
|
|
79
|
+
* @param {string} content Raw clipboard content (HTML or plain text).
|
|
80
|
+
* @returns {string} Processed HTML.
|
|
59
81
|
*/
|
|
60
|
-
abstract process(
|
|
82
|
+
abstract process(content: string): string;
|
|
61
83
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AbstractPasteProcessingStrategy } from './paste-processing-strategy.abstract';
|
|
2
2
|
import { RTEPasteMode } from './paste-processing-strategy.abstract';
|
|
3
|
+
import { PasteInput } from '../type';
|
|
3
4
|
/**
|
|
4
5
|
* Centralized selector for paste processing strategies.
|
|
5
6
|
*
|
|
@@ -11,6 +12,18 @@ import { RTEPasteMode } from './paste-processing-strategy.abstract';
|
|
|
11
12
|
export declare class PasteStrategySelector {
|
|
12
13
|
private readonly defaultStrategy;
|
|
13
14
|
private strategies;
|
|
15
|
+
/**
|
|
16
|
+
* Selects the strategy that will process this paste.
|
|
17
|
+
*
|
|
18
|
+
* When `explicitMode` is provided and not `rich`, the strategy registered for that mode
|
|
19
|
+
* is used. Otherwise the highest-priority strategy whose `canHandle` matches the HTML
|
|
20
|
+
* wins, falling back to the default pass-through strategy.
|
|
21
|
+
*
|
|
22
|
+
* @param {PasteInput} input Captured clipboard payload used for auto-detection.
|
|
23
|
+
* @param {RTEPasteMode} [explicitMode] Paste mode the user picked from the chooser.
|
|
24
|
+
* @returns {AbstractPasteProcessingStrategy} Strategy to run for this paste.
|
|
25
|
+
*/
|
|
26
|
+
select(input: PasteInput, explicitMode?: RTEPasteMode): AbstractPasteProcessingStrategy;
|
|
14
27
|
/**
|
|
15
28
|
* Select the appropriate strategy for the given HTML content.
|
|
16
29
|
* Returns the highest-priority strategy that can handle the content.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { AbstractPasteProcessingStrategy, RTEPasteMode } from './paste-processing-strategy.abstract';
|
|
2
|
+
import { PasteInput, PasteOutput } from '../type';
|
|
3
|
+
/** Converts plain-text clipboard to paragraph-per-line HTML. */
|
|
4
|
+
export declare class PlainPasteProcessingStrategy extends AbstractPasteProcessingStrategy {
|
|
5
|
+
/** @returns {RTEPasteMode} Plain-text paste mode. */
|
|
6
|
+
get type(): RTEPasteMode;
|
|
7
|
+
/** @returns {boolean} Always `true`; consumes `text/plain` instead of `text/html`. */
|
|
8
|
+
get consumesPlainText(): boolean;
|
|
9
|
+
/** @returns {boolean} Always `false`; never auto-selected. */
|
|
10
|
+
canHandle(): boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Converts plain text to paragraph HTML; every `\n` starts a new paragraph.
|
|
13
|
+
*
|
|
14
|
+
* @param {string} text - Clipboard `text/plain` payload.
|
|
15
|
+
* @param {boolean} decodeEncodedWhitespace - Decode markers emitted by HTML conversion.
|
|
16
|
+
* @returns {string} Paragraph HTML.
|
|
17
|
+
*/
|
|
18
|
+
process(text: string, decodeEncodedWhitespace?: boolean): string;
|
|
19
|
+
/**
|
|
20
|
+
* @param {PasteInput} input Complete clipboard payload.
|
|
21
|
+
* @returns {PasteOutput} Plain HTML, canonical text, and whitespace marker contract.
|
|
22
|
+
*/
|
|
23
|
+
transform(input: PasteInput): PasteOutput;
|
|
24
|
+
/**
|
|
25
|
+
* @param {PasteInput} input Clipboard content used to derive canonical plain text.
|
|
26
|
+
* @returns {PlainTextSource} Canonical text and whether it contains whitespace sentinels.
|
|
27
|
+
*/
|
|
28
|
+
private getPlainTextSource;
|
|
29
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { RTEExtensionContext } from '../../interface';
|
|
2
|
+
import type { RTEPasteMode } from './strategies/paste-processing-strategy.abstract';
|
|
3
|
+
export declare type SelectedNodes = ReturnType<RTEExtensionContext['getSelectedNodes']>;
|
|
4
|
+
export declare type PendingPastePayload = {
|
|
5
|
+
html: string;
|
|
6
|
+
text: string;
|
|
7
|
+
range: Range | null;
|
|
8
|
+
selectedNodes: SelectedNodes;
|
|
9
|
+
files: File[];
|
|
10
|
+
rtf: string;
|
|
11
|
+
};
|
|
12
|
+
export declare type ClipboardFileContent = {
|
|
13
|
+
files: File[];
|
|
14
|
+
rtf: string;
|
|
15
|
+
};
|
|
16
|
+
export declare type PasteInput = {
|
|
17
|
+
html: string;
|
|
18
|
+
text: string;
|
|
19
|
+
files: File[];
|
|
20
|
+
rtf: string;
|
|
21
|
+
};
|
|
22
|
+
export declare type PasteOutput = {
|
|
23
|
+
html: string;
|
|
24
|
+
text: string;
|
|
25
|
+
mode: RTEPasteMode;
|
|
26
|
+
markers: Record<string, string>;
|
|
27
|
+
extractImages: boolean;
|
|
28
|
+
imagesToExtract: File[];
|
|
29
|
+
};
|
|
30
|
+
export declare type VegaRTEPasteImage = {
|
|
31
|
+
/** Unique identifier used to fill in the uploaded URL later. */
|
|
32
|
+
id: string;
|
|
33
|
+
/** Pasted image file to upload. */
|
|
34
|
+
file: File;
|
|
35
|
+
};
|
|
@@ -39,3 +39,50 @@ export declare function escapeHtml(text: string): string;
|
|
|
39
39
|
* @returns {string} Escaped attribute-safe value.
|
|
40
40
|
*/
|
|
41
41
|
export declare function escapeHtmlAttribute(value: string): string;
|
|
42
|
+
/**
|
|
43
|
+
* Normalizes clipboard line endings and splits into lines. Low-level primitive behind
|
|
44
|
+
* `toPlainPasteLines`, which layers boundary-whitespace handling on top and is the single
|
|
45
|
+
* conversion source used by plain-mode paste.
|
|
46
|
+
*
|
|
47
|
+
* @param {string} text Raw clipboard plain text.
|
|
48
|
+
* @returns {string[]} Lines with `\r\n`/`\r` normalized to `\n` and split on `\n`.
|
|
49
|
+
*/
|
|
50
|
+
export declare function normalizePlainTextLines(text: string): string[];
|
|
51
|
+
/**
|
|
52
|
+
* Sentinels for whitespace that must survive plain-mode boundary collapsing (e.g. code-block
|
|
53
|
+
* indentation derived from HTML). `htmlToPlainText` can emit these in place of real spaces/tabs so
|
|
54
|
+
* that `toPlainPasteLines` leaves them untouched — they are not matched by `\s` — and decodes them
|
|
55
|
+
* back to real characters after collapsing the paste's insignificant leading/trailing whitespace.
|
|
56
|
+
*/
|
|
57
|
+
export declare const PRESERVED_SPACE: string;
|
|
58
|
+
export declare const PRESERVED_TAB: string;
|
|
59
|
+
/**
|
|
60
|
+
* Single source of truth for plain-mode paste conversion: turns raw clipboard text into
|
|
61
|
+
* the canonical list of lines used by both representations of the pasted content — the
|
|
62
|
+
* `text/html` payload emitted by `PlainPasteProcessingStrategy` and the RTE text/newline
|
|
63
|
+
* nodes built by `InsertPasteHandler`. Both must derive from this helper so whitespace and
|
|
64
|
+
* boundary handling cannot drift apart.
|
|
65
|
+
*
|
|
66
|
+
* Per-paragraph handling: lines carrying {@link PRESERVED_SPACE}/{@link PRESERVED_TAB}
|
|
67
|
+
* sentinels come from code-block sources (via the preservation branch of
|
|
68
|
+
* `extractBlockAwareText`) and are kept verbatim so significant indentation survives;
|
|
69
|
+
* all other lines get a normal `String.prototype.trim()` (including NBSP) so
|
|
70
|
+
* paragraph-boundary whitespace from non-code sources is treated as noise.
|
|
71
|
+
* When `decodeEncodedWhitespace` is enabled, sentinels are decoded back to real
|
|
72
|
+
* space/tab characters after the per-line pass.
|
|
73
|
+
*
|
|
74
|
+
* @param {string} text Raw clipboard plain text.
|
|
75
|
+
* @param {boolean} decodeEncodedWhitespace Whether HTML-derived sentinels should be decoded.
|
|
76
|
+
* @returns {string[]} Canonical plain-mode lines.
|
|
77
|
+
*/
|
|
78
|
+
export declare function toPlainPasteLines(text: string, decodeEncodedWhitespace?: boolean): string[];
|
|
79
|
+
/**
|
|
80
|
+
* Serializes canonical plain-mode lines into paragraph-per-line HTML.
|
|
81
|
+
*
|
|
82
|
+
* Built as a string rather than via DOM `outerHTML` serialization, which collapses
|
|
83
|
+
* consecutive spaces in non-`<pre>` text nodes and would lose intentional whitespace.
|
|
84
|
+
*
|
|
85
|
+
* @param {string[]} lines Canonical plain-mode lines from {@link toPlainPasteLines}.
|
|
86
|
+
* @returns {string} Paragraph HTML where each line is an individual paragraph.
|
|
87
|
+
*/
|
|
88
|
+
export declare function plainPasteLinesToHtml(lines: string[]): string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CompositionStep } from '../../../../dto/actions/sequential-composition-action';
|
|
1
2
|
import { RTEBlock } from '../../../../dto/blocks/block.abstract';
|
|
2
3
|
import { RTENode } from '../../../../dto/nodes/node.abstract';
|
|
3
4
|
import { Nullable } from '../../../../../../types/general';
|
|
@@ -15,8 +16,20 @@ export interface ForwardDeletePosition {
|
|
|
15
16
|
export declare abstract class AbstractDeleteContentHandler extends BaseHandler {
|
|
16
17
|
/**
|
|
17
18
|
* Delete the selected node(s) from the current state.
|
|
19
|
+
*
|
|
20
|
+
* @returns {CompositionStep[]} The content + caret steps applied atomically as one flushable composition.
|
|
21
|
+
*/
|
|
22
|
+
handleEvent(): CompositionStep[];
|
|
23
|
+
/**
|
|
24
|
+
* Builds the ordered steps for a single-block deletion: the delete runs first, then a caret step
|
|
25
|
+
* reads the delete action's post-apply `previousNode`/`nextNode` to decide where the caret lands.
|
|
26
|
+
*
|
|
27
|
+
* @param {RTENode} resolvedNode - The node the deletion is anchored on.
|
|
28
|
+
* @param {number} resolvedOffset - The caret offset within `resolvedNode` at deletion time.
|
|
29
|
+
* @param {Nullable<RTENode>} caretAnchor - A node the caret must stay on regardless of the delete result.
|
|
30
|
+
* @returns {CompositionStep[]} The delete step followed by the dependent caret step.
|
|
18
31
|
*/
|
|
19
|
-
|
|
32
|
+
protected buildDeleteSteps(resolvedNode: RTENode, resolvedOffset: number, caretAnchor: Nullable<RTENode>): CompositionStep[];
|
|
20
33
|
/**
|
|
21
34
|
* Computes the caret position one step to the right, used to translate a forward delete into a backspace.
|
|
22
35
|
*
|
|
@@ -49,12 +62,10 @@ export declare abstract class AbstractDeleteContentHandler extends BaseHandler {
|
|
|
49
62
|
* @param {RTEBlock} block - The first block instance
|
|
50
63
|
*/
|
|
51
64
|
protected convertFirstBlockToParagraph(block: RTEBlock): void;
|
|
52
|
-
/**
|
|
53
|
-
* Creates a new paragraph element with a text node and appends it to the current state.
|
|
54
|
-
*/
|
|
55
|
-
protected insertDefaultParagraph(): void;
|
|
56
65
|
/**
|
|
57
66
|
* Handles a single-block deletion of content within an RTE editor for the handler's direction.
|
|
67
|
+
*
|
|
68
|
+
* @returns {CompositionStep[]} The content + caret steps for the deletion, empty when nothing is deleted.
|
|
58
69
|
*/
|
|
59
|
-
protected abstract deleteContentWithSingleBlock():
|
|
70
|
+
protected abstract deleteContentWithSingleBlock(): CompositionStep[];
|
|
60
71
|
}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
import { Nullable } from '../../../../../../types/general';
|
|
2
|
+
import { CompositionStep } from '../../../../dto/actions/sequential-composition-action';
|
|
1
3
|
import { AbstractDeleteContentHandler } from './abstract-delete-content-handler';
|
|
2
4
|
/** Handles a backspace (leftward) deletion of content within a VegaRTE editor. User press backspace will trigger this method */
|
|
3
5
|
export declare class BackwardDeleteContentHandler extends AbstractDeleteContentHandler {
|
|
4
6
|
/**
|
|
5
7
|
* Handles a backspace (leftward) deletion of content within a single block in an RTE editor.
|
|
8
|
+
*
|
|
9
|
+
* @returns {Nullable<CompositionStep[]>} The delete + caret steps, empty when the deletion is delegated or a no-op.
|
|
6
10
|
*/
|
|
7
|
-
protected deleteContentWithSingleBlock():
|
|
11
|
+
protected deleteContentWithSingleBlock(): Nullable<CompositionStep[]>;
|
|
8
12
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { CompositionStep } from '../../../../dto/actions/sequential-composition-action';
|
|
1
2
|
import { RTETextBlock } from '../../../../dto/blocks/text-block';
|
|
2
3
|
import { VegaRTEContent } from '../../../../dto/content-state';
|
|
4
|
+
import { RTEFlushChangesPayload } from '../../../../dto/flush-changes-payload';
|
|
3
5
|
import { RTENode } from '../../../../dto/nodes/node.abstract';
|
|
4
6
|
import { SelectionController } from '../../selection-controller';
|
|
5
7
|
/** This code snippet is defining an abstract class named `BaseHandler` with an abstract method `execute`. */
|
|
@@ -7,15 +9,35 @@ export declare abstract class BaseHandler<TEvent extends Event = InputEvent> {
|
|
|
7
9
|
protected currentState: VegaRTEContent;
|
|
8
10
|
protected selectionController: SelectionController;
|
|
9
11
|
protected richTextEditorRef: HTMLVegaRichTextEditorElement;
|
|
12
|
+
/**
|
|
13
|
+
* Default flush payload emitted after `handleEvent` completes. This is the single source of
|
|
14
|
+
* truth for the defaults — the observer does not re-apply any fallback values. Subclasses may override
|
|
15
|
+
* this field to opt out of flushing (assign `undefined`) or to change the defaults. Each instance
|
|
16
|
+
* owns its own copy so mutations from within `handleEvent` (e.g. `InsertTextHandler` updating
|
|
17
|
+
* `updateSource`) never leak across handler instances.
|
|
18
|
+
*/
|
|
19
|
+
protected flushOptions: RTEFlushChangesPayload | undefined;
|
|
10
20
|
/**
|
|
11
21
|
* The function `execute` initializes the current state and selection, and then handles an event if provided.
|
|
12
22
|
*
|
|
23
|
+
* Contract: `handleEvent` MUST be synchronous. A handler that mutates the value returns the
|
|
24
|
+
* `CompositionStep[]` it applied through `applyComposition`; the flush is then routed through the
|
|
25
|
+
* shared action pipeline. Handlers that do not mutate the value return nothing
|
|
26
|
+
*
|
|
13
27
|
* @param {VegaRTEContent} currentState - The current state of the VegaRTE content.
|
|
14
28
|
* @param {SelectionController} selectionController - Manages the selection of items in the user interface.
|
|
15
29
|
* @param {HTMLElement} richTextEditor - The current rich text editor component
|
|
16
30
|
* @param {Event} [event] - It is used to pass an input event to the method for handling.
|
|
17
31
|
*/
|
|
18
32
|
execute(currentState: VegaRTEContent, selectionController: SelectionController, richTextEditor: HTMLVegaRichTextEditorElement, event?: TEvent): void;
|
|
33
|
+
/**
|
|
34
|
+
* Applies the collected leaf actions as a single flushable `SequentialCompositionAction`, so the value
|
|
35
|
+
* update and its flush run through the same action pipeline used by every other flushable operation.
|
|
36
|
+
* Handlers call this before enqueuing selection so caret math reads post-apply node state.
|
|
37
|
+
*
|
|
38
|
+
* @param {CompositionStep[]} steps - The ordered leaf actions to apply against their own targets.
|
|
39
|
+
*/
|
|
40
|
+
protected applyComposition(steps: CompositionStep[] | void): void;
|
|
19
41
|
/**
|
|
20
42
|
* The function `isRootContainer` checks if an HTML element is a root container with a class of 'rich-text-content'.
|
|
21
43
|
*
|
|
@@ -57,5 +79,12 @@ export declare abstract class BaseHandler<TEvent extends Event = InputEvent> {
|
|
|
57
79
|
* @param {HTMLElement} richTextEditor - The current rich text editor component
|
|
58
80
|
*/
|
|
59
81
|
private setCurrentRichTextEditor;
|
|
60
|
-
|
|
82
|
+
/**
|
|
83
|
+
* Handles an input event in the rich text editor.
|
|
84
|
+
* If an array or non-empty steps are returned, it means the content has been modified and subsequent processing steps are required to update the component value;
|
|
85
|
+
* otherwise, the content has not been modified and no further action is needed.
|
|
86
|
+
*
|
|
87
|
+
* @param {Event} event - The input event triggered in the rich text editor.
|
|
88
|
+
*/
|
|
89
|
+
abstract handleEvent(event?: TEvent): CompositionStep[] | void;
|
|
61
90
|
}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
import { Nullable } from '../../../../../../types/general';
|
|
2
|
+
import { CompositionStep } from '../../../../dto/actions/sequential-composition-action';
|
|
1
3
|
import { AbstractDeleteContentHandler } from './abstract-delete-content-handler';
|
|
2
4
|
/** Handles a delete (rightward) deletion of content within a VegaRTE editor. User press delete will trigger this method */
|
|
3
5
|
export declare class ForwardDeleteContentHandler extends AbstractDeleteContentHandler {
|
|
4
6
|
/**
|
|
5
7
|
* Handles a delete (rightward) deletion of content within a single block in an RTE editor.
|
|
8
|
+
*
|
|
9
|
+
* @returns {Nullable<CompositionStep[]>} The delete + caret steps, empty when the deletion is delegated or a no-op.
|
|
6
10
|
*/
|
|
7
|
-
protected deleteContentWithSingleBlock():
|
|
11
|
+
protected deleteContentWithSingleBlock(): Nullable<CompositionStep[]>;
|
|
8
12
|
}
|
|
@@ -1,16 +1,22 @@
|
|
|
1
1
|
import { BaseHandler } from './base-handler';
|
|
2
|
+
import { CompositionStep } from '../../../../dto/actions/sequential-composition-action';
|
|
3
|
+
import { Nullable } from '../../../../../../types/general';
|
|
2
4
|
/** User press shift + enter will tigger this callback */
|
|
3
5
|
export declare class InsertLineBreakHandler extends BaseHandler {
|
|
4
6
|
/**
|
|
5
7
|
* Create new line break node and add node to state value
|
|
8
|
+
*
|
|
9
|
+
* @returns {Nullable<CompositionStep[]>} The content + caret steps applied atomically as one flushable composition.
|
|
6
10
|
*/
|
|
7
|
-
handleEvent():
|
|
11
|
+
handleEvent(): Nullable<CompositionStep[]>;
|
|
8
12
|
/**
|
|
9
13
|
* Insert the \n in text element when root container is empty, should create text block and text node
|
|
10
14
|
* <p>
|
|
11
15
|
* <span></span>
|
|
12
16
|
* <span></span>
|
|
13
17
|
* </p>
|
|
18
|
+
*
|
|
19
|
+
* @returns {Nullable<CompositionStep[]>} The content + caret steps for the empty root break.
|
|
14
20
|
*/
|
|
15
21
|
private breakNewBlock;
|
|
16
22
|
/**
|
|
@@ -24,18 +30,29 @@ export declare class InsertLineBreakHandler extends BaseHandler {
|
|
|
24
30
|
* <br>
|
|
25
31
|
* <span>xt</span>
|
|
26
32
|
* </p>
|
|
33
|
+
*
|
|
34
|
+
* @returns {CompositionStep[]} The content + caret steps for the single-block break.
|
|
27
35
|
*/
|
|
28
36
|
private breakSingleBlock;
|
|
29
37
|
/**
|
|
30
38
|
* Handles breaking blocks in an RTE editor based on the current selection and position.
|
|
39
|
+
*
|
|
40
|
+
* @returns {CompositionStep[]} The content + caret steps for the multi-block break.
|
|
31
41
|
*/
|
|
32
42
|
private breakMultipleBlocks;
|
|
33
43
|
/**
|
|
34
|
-
*
|
|
44
|
+
* Builds the caret step that reads the applied single-block line break to place the caret after it.
|
|
45
|
+
*
|
|
46
|
+
* @returns {CompositionStep} The dependent caret step.
|
|
47
|
+
*/
|
|
48
|
+
private caretToSingleBlockNextNode;
|
|
49
|
+
/**
|
|
50
|
+
* Builds the caret operation that moves onto the node following the inserted line break.
|
|
35
51
|
*
|
|
36
|
-
* @param {RTENode} lineBreakNode -
|
|
52
|
+
* @param {RTENode} lineBreakNode - The inserted line break node.
|
|
53
|
+
* @returns {CompositionOperation} The caret operation.
|
|
37
54
|
*/
|
|
38
|
-
private
|
|
55
|
+
private caretOperationToNextNode;
|
|
39
56
|
/**
|
|
40
57
|
* Returns the next sibling node of a given block element in a rich text editor.
|
|
41
58
|
*
|
|
@@ -1,22 +1,30 @@
|
|
|
1
1
|
import { BaseHandler } from './base-handler';
|
|
2
|
+
import { CompositionStep } from '../../../../dto/actions/sequential-composition-action';
|
|
2
3
|
/** Insert a paragraph in a rich text editor based on the current selection and event. User type enter will trigger this callback */
|
|
3
4
|
export declare class InsertParagraphHandler extends BaseHandler {
|
|
4
5
|
/**
|
|
5
6
|
* Create new paragraph node and add node to state value
|
|
7
|
+
*
|
|
8
|
+
* @returns {CompositionStep[] | void} The content + caret steps applied atomically as one flushable composition.
|
|
6
9
|
*/
|
|
7
|
-
handleEvent(): void;
|
|
10
|
+
handleEvent(): CompositionStep[] | void;
|
|
8
11
|
/**
|
|
9
12
|
* Handles breaking blocks in an RTE editor based on the current selection and position.
|
|
13
|
+
*
|
|
14
|
+
* @returns {CompositionStep[]} The content + caret steps for the multi-block break.
|
|
10
15
|
*/
|
|
11
16
|
private breakMultipleBlocks;
|
|
12
17
|
/**
|
|
13
18
|
* Handles breaking a single block in an RTE editor based on the current selection and position.
|
|
19
|
+
*
|
|
20
|
+
* @returns {CompositionStep[]} The content + caret steps for the single-block break.
|
|
14
21
|
*/
|
|
15
22
|
private breakSingleBlock;
|
|
16
23
|
/**
|
|
17
|
-
*
|
|
24
|
+
* Builds the caret operation that moves onto the first child of the newly created block.
|
|
18
25
|
*
|
|
19
|
-
* @param {RTEBlock} newBlock -
|
|
26
|
+
* @param {Nullable<RTEBlock>} newBlock - The block created by the break, or null when none was created.
|
|
27
|
+
* @returns {CompositionOperation | void} The caret operation, or nothing when there is no target block.
|
|
20
28
|
*/
|
|
21
|
-
private
|
|
29
|
+
private caretToNextElement;
|
|
22
30
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BaseHandler } from './base-handler';
|
|
2
|
+
import { CompositionStep } from '../../../../dto/actions/sequential-composition-action';
|
|
2
3
|
/**
|
|
3
4
|
* Handle user paste
|
|
4
5
|
*/
|
|
@@ -7,14 +8,15 @@ export declare class InsertPasteHandler extends BaseHandler {
|
|
|
7
8
|
* Update the state value when user paste html elements.
|
|
8
9
|
*
|
|
9
10
|
* @param {InputEvent} event - Paste event.
|
|
11
|
+
* @returns {CompositionStep[]} The content + caret steps applied atomically as one flushable composition.
|
|
10
12
|
*/
|
|
11
|
-
handleEvent(event: InputEvent):
|
|
13
|
+
handleEvent(event: InputEvent): CompositionStep[];
|
|
12
14
|
/**
|
|
13
15
|
* Inserts plain-text paste content into the current text node at caret position.
|
|
14
16
|
*
|
|
15
17
|
* @param {RTEPastePayload} payload - Clipboard payload.
|
|
16
18
|
* @param {RTERange} currentRange - Current selection range.
|
|
17
|
-
* @returns {
|
|
19
|
+
* @returns {CompositionStep[] | undefined} The content + caret steps when inline insertion applies, otherwise undefined.
|
|
18
20
|
*/
|
|
19
21
|
private insertPlainTextInline;
|
|
20
22
|
/**
|
|
@@ -38,6 +40,7 @@ export declare class InsertPasteHandler extends BaseHandler {
|
|
|
38
40
|
* Insert the blocks to root
|
|
39
41
|
*
|
|
40
42
|
* @param { RTEContentBlock[]} blocks - blocks
|
|
43
|
+
* @returns {CompositionStep[]} The append step for the root.
|
|
41
44
|
*/
|
|
42
45
|
private insertBlocksToRoot;
|
|
43
46
|
/**
|
|
@@ -45,6 +48,7 @@ export declare class InsertPasteHandler extends BaseHandler {
|
|
|
45
48
|
*
|
|
46
49
|
* @param { RTEContentBlock[]} blocks - blocks
|
|
47
50
|
* @param { RTERange } rteRange - rteRange
|
|
51
|
+
* @returns {CompositionStep[]} The content + caret steps for the content branch.
|
|
48
52
|
*/
|
|
49
53
|
private insertBlocksToContent;
|
|
50
54
|
/**
|
|
@@ -52,19 +56,24 @@ export declare class InsertPasteHandler extends BaseHandler {
|
|
|
52
56
|
*
|
|
53
57
|
* @param { RTEContentBlock[]} blocks - blocks
|
|
54
58
|
* @param { RTERange } rteRange - rteRange
|
|
59
|
+
* @returns {CompositionStep[]} The content + caret steps for the empty-paragraph branch.
|
|
55
60
|
*/
|
|
56
61
|
private insertBlocksBeforeEmptyBlock;
|
|
57
62
|
/**
|
|
58
63
|
* Format and parse elements from user paste with simple style preservation.
|
|
59
64
|
*
|
|
60
65
|
* @param {InputEvent} event - Paste event.
|
|
66
|
+
* @param {RTERange} [currentRange] - Optional range used to resolve the paste location.
|
|
61
67
|
* @returns {RTEContentBlock[]} - RTEContentBlock.
|
|
62
68
|
*/
|
|
63
69
|
private parsePastedElements;
|
|
64
70
|
/**
|
|
65
|
-
* Extracts
|
|
71
|
+
* Extracts plain text from HTML when clipboard lacks `text/plain`.
|
|
66
72
|
*
|
|
67
73
|
* @param {string} html - Clipboard text/html payload.
|
|
74
|
+
* @param {boolean} keepPreservedWhitespaceMarkers - Keep code-block indentation as sentinels so
|
|
75
|
+
* the plain-mode boundary collapse in `toPlainPasteLines` does not strip it (that helper decodes
|
|
76
|
+
* the sentinels). Must stay `false` for the rich path, which feeds `parsePlainText` directly.
|
|
68
77
|
* @returns {string} - Plain text extracted from HTML.
|
|
69
78
|
*/
|
|
70
79
|
private extractPlainTextFromHtml;
|
|
@@ -76,12 +85,36 @@ export declare class InsertPasteHandler extends BaseHandler {
|
|
|
76
85
|
*/
|
|
77
86
|
private buildPlainTextFallbackBlocks;
|
|
78
87
|
/**
|
|
79
|
-
*
|
|
88
|
+
* Builds plain-text paragraphs by splitting on `\n`.
|
|
89
|
+
*
|
|
90
|
+
* Shares `toPlainPasteLines` with `PlainPasteProcessingStrategy` so both
|
|
91
|
+
* representations of plain-mode content (HTML and RTE nodes) agree on line
|
|
92
|
+
* boundaries and boundary whitespace.
|
|
93
|
+
*
|
|
94
|
+
* @param {string} text - Plain text clipboard content.
|
|
95
|
+
* @param {RTETextNode} [styleSource] - Optional style to preserve in all nodes.
|
|
96
|
+
* @param {boolean} decodeEncodedWhitespace - Decode HTML-derived whitespace markers.
|
|
97
|
+
* @returns {RTEContentBlock[]} Paragraph-per-line blocks.
|
|
98
|
+
*/
|
|
99
|
+
private buildPlainTextParagraph;
|
|
100
|
+
/**
|
|
101
|
+
* Creates a text node for plain paste; optionally inherits style from source node.
|
|
102
|
+
*
|
|
103
|
+
* @param {RTETextBlock} paragraph - Parent paragraph.
|
|
104
|
+
* @param {number} index - Character index for node ID generation.
|
|
105
|
+
* @param {string} text - Text content.
|
|
106
|
+
* @param {RTETextNode} [styleSource] - Optional style to inherit.
|
|
107
|
+
* @returns {RTETextNode} Created text node.
|
|
108
|
+
*/
|
|
109
|
+
private createPlainTextNode;
|
|
110
|
+
/**
|
|
111
|
+
* Builds the caret operation that moves onto a block element in a rich text editor after paste.
|
|
80
112
|
*
|
|
81
113
|
* @param {RTEBlock} newBlock - Block element to move the caret to.
|
|
82
114
|
* @param {boolean} atEnd - When true, places the caret after the last character of the block's last node; otherwise at offset 0 of the first node.
|
|
115
|
+
* @returns {CompositionOperation | void} The caret operation, or nothing when the block has no children.
|
|
83
116
|
*/
|
|
84
|
-
private
|
|
117
|
+
private caretToBlockOperation;
|
|
85
118
|
/**
|
|
86
119
|
* Parses the content of a plain text and formats it into HTML.
|
|
87
120
|
*
|
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
import { BaseHandler } from './base-handler';
|
|
2
|
+
import { Nullable } from '../../../../../../types/general';
|
|
3
|
+
import { CompositionStep } from '../../../../dto/actions/sequential-composition-action';
|
|
2
4
|
/** Handles inserting text into a VegaRTEContent based on the current selection and input event. User input character will trigger this callback */
|
|
3
5
|
export declare class InsertTextHandler extends BaseHandler {
|
|
4
6
|
/**
|
|
5
7
|
* Update the state value when user type character
|
|
6
8
|
*
|
|
7
9
|
* @param {InputEvent} event - The input event object
|
|
10
|
+
* @returns {Nullable<CompositionStep[]>} The content actions the base handler applies as one flushable unit.
|
|
8
11
|
*/
|
|
9
|
-
handleEvent(event: InputEvent):
|
|
12
|
+
handleEvent(event: InputEvent): Nullable<CompositionStep[]>;
|
|
10
13
|
/**
|
|
11
14
|
* Insert the text in root element when root container is empty, should create text block and text node
|
|
12
15
|
*
|
|
13
16
|
* @param {string} text The insert text
|
|
14
|
-
* @
|
|
17
|
+
* @param {CompositionStep[]} steps The composition steps collector to append the update action to
|
|
18
|
+
* @returns {Nullable<RTETextNode>} The new create text node
|
|
15
19
|
*/
|
|
16
20
|
private insertTextToRoot;
|
|
17
21
|
/**
|
|
@@ -19,6 +23,7 @@ export declare class InsertTextHandler extends BaseHandler {
|
|
|
19
23
|
*
|
|
20
24
|
* @param {RTETextNode} lineBreakNode The current line break node, the text value is \n
|
|
21
25
|
* @param {string} text The text need to insert
|
|
26
|
+
* @param {CompositionStep[]} steps The composition steps collector to append the resulting action to
|
|
22
27
|
* @returns {Nullable<RTETextNode>} The new text node or the current line break node
|
|
23
28
|
*/
|
|
24
29
|
private insertTextToLineBreakNode;
|
package/dist/types/components/vega-rich-text-editor/slimmers/controllers/user-input-controller.d.ts
CHANGED
|
@@ -32,6 +32,8 @@ export declare class UserInputController extends VegaSlimmer {
|
|
|
32
32
|
private handleKeyboardAction;
|
|
33
33
|
/**
|
|
34
34
|
* When a user performs an input action within the editable element, this function is triggered.
|
|
35
|
+
* Each handler owns its own `flushOptions` on `BaseHandler`, so the value update flows through
|
|
36
|
+
* the shared flush-changes action pipeline without this method having to construct or forward it.
|
|
35
37
|
*
|
|
36
38
|
* @param {InputEvent} e the before input event object
|
|
37
39
|
*/
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
declare type HtmlToPlainTextOptions = {
|
|
2
|
+
preserveBoundaryBlankLines?: boolean;
|
|
3
|
+
/**
|
|
4
|
+
* Keep significant whitespace encoded as {@link PRESERVED_SPACE}/{@link PRESERVED_TAB} sentinels
|
|
5
|
+
* instead of decoding it to real spaces/tabs. Plain-mode paste sets this so the downstream
|
|
6
|
+
* `toPlainPasteLines` boundary collapse does not strip code-block indentation; it decodes the
|
|
7
|
+
* sentinels itself afterwards.
|
|
8
|
+
*/
|
|
9
|
+
keepPreservedWhitespaceMarkers?: boolean;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Converts HTML to plain text, preserving line breaks introduced by block-level elements and `<br>`.
|
|
13
|
+
* Used as a fallback when clipboard data lacks a `text/plain` payload, so structural breaks
|
|
14
|
+
* (e.g. `<h1>Heading</h1><p>Body</p>`) survive as `Heading\nBody` instead of being flattened.
|
|
15
|
+
*
|
|
16
|
+
* @param {string} html HTML content to convert.
|
|
17
|
+
* @param {HtmlToPlainTextOptions} options Plain-text conversion options.
|
|
18
|
+
* @returns {string} Block-aware plain text with normalized `\n` line endings.
|
|
19
|
+
*/
|
|
20
|
+
export declare function htmlToPlainText(html: string, options?: HtmlToPlainTextOptions): string;
|
|
21
|
+
/**
|
|
22
|
+
* Detects whether the clipboard HTML contains a table anywhere. Plain paste uses this together
|
|
23
|
+
* with a tab check on `text/plain`: a tab-separated `text/plain` only reflects a table's row/
|
|
24
|
+
* column layout when the clipboard actually has a table, so that combination is pasted from
|
|
25
|
+
* `text/plain` verbatim (its line breaks are trusted as-is), regardless of any surrounding content.
|
|
26
|
+
*
|
|
27
|
+
* @param {string} html HTML content to inspect.
|
|
28
|
+
* @returns {boolean} Whether the HTML contains a table.
|
|
29
|
+
*/
|
|
30
|
+
export declare function htmlContainsTable(html: string): boolean;
|
|
31
|
+
export {};
|
|
@@ -2521,6 +2521,12 @@ export namespace Components {
|
|
|
2521
2521
|
* @vegaVersion 1.0.5
|
|
2522
2522
|
*/
|
|
2523
2523
|
"prefixIcon": string;
|
|
2524
|
+
/**
|
|
2525
|
+
* Text displayed before (to the left of) the input value inside the input field.
|
|
2526
|
+
* @default undefined
|
|
2527
|
+
* @vegaVersion 2.103.0
|
|
2528
|
+
*/
|
|
2529
|
+
"prefixText": string;
|
|
2524
2530
|
/**
|
|
2525
2531
|
* Sets the input field as read-only, preventing direct keyboard input. When set to `true`, prevents manual keyboard text entry in the input field on all platforms. On touch devices, this typically suppresses the virtual keyboard.
|
|
2526
2532
|
* @default false
|
|
@@ -2552,6 +2558,12 @@ export namespace Components {
|
|
|
2552
2558
|
* @vegaVersion 1.3.0
|
|
2553
2559
|
*/
|
|
2554
2560
|
"size": 'default' | 'small';
|
|
2561
|
+
/**
|
|
2562
|
+
* Text displayed after (to the right of) the input value inside the input field.
|
|
2563
|
+
* @default undefined
|
|
2564
|
+
* @vegaVersion 2.103.0
|
|
2565
|
+
*/
|
|
2566
|
+
"suffixText": string;
|
|
2555
2567
|
/**
|
|
2556
2568
|
* Provides the data source for the input's autocomplete suggestion dropdown. Pass an array of `VegaDropdownSourceItem` objects to enable the suggestions feature. The dropdown appears as the user types, filtering items that match the current input value. When the user selects a suggestion, the `vegaSuggestionItemClick` event is emitted. **Important:** You must set this property to at least an empty array (`[]`) to enable the suggestion dropdown. If left `undefined`, the feature is disabled.
|
|
2557
2569
|
* @vegaVersion 2.75.0
|
|
@@ -9650,6 +9662,12 @@ declare namespace LocalJSX {
|
|
|
9650
9662
|
* @vegaVersion 1.0.5
|
|
9651
9663
|
*/
|
|
9652
9664
|
"prefixIcon"?: string;
|
|
9665
|
+
/**
|
|
9666
|
+
* Text displayed before (to the left of) the input value inside the input field.
|
|
9667
|
+
* @default undefined
|
|
9668
|
+
* @vegaVersion 2.103.0
|
|
9669
|
+
*/
|
|
9670
|
+
"prefixText"?: string;
|
|
9653
9671
|
/**
|
|
9654
9672
|
* Sets the input field as read-only, preventing direct keyboard input. When set to `true`, prevents manual keyboard text entry in the input field on all platforms. On touch devices, this typically suppresses the virtual keyboard.
|
|
9655
9673
|
* @default false
|
|
@@ -9674,6 +9692,12 @@ declare namespace LocalJSX {
|
|
|
9674
9692
|
* @vegaVersion 1.3.0
|
|
9675
9693
|
*/
|
|
9676
9694
|
"size"?: 'default' | 'small';
|
|
9695
|
+
/**
|
|
9696
|
+
* Text displayed after (to the right of) the input value inside the input field.
|
|
9697
|
+
* @default undefined
|
|
9698
|
+
* @vegaVersion 2.103.0
|
|
9699
|
+
*/
|
|
9700
|
+
"suffixText"?: string;
|
|
9677
9701
|
/**
|
|
9678
9702
|
* Provides the data source for the input's autocomplete suggestion dropdown. Pass an array of `VegaDropdownSourceItem` objects to enable the suggestions feature. The dropdown appears as the user types, filtering items that match the current input value. When the user selects a suggestion, the `vegaSuggestionItemClick` event is emitted. **Important:** You must set this property to at least an empty array (`[]`) to enable the suggestion dropdown. If left `undefined`, the feature is disabled.
|
|
9679
9703
|
* @vegaVersion 2.75.0
|