@wix/ricos 11.22.0 → 11.23.1
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/css/all-plugins-viewer.css +179 -179
- package/css/plugin-audio-viewer.global.css +3 -3
- package/css/plugin-audio-viewer.global.inject.mjs +4 -4
- package/css/plugin-button-viewer.global.css +1 -1
- package/css/plugin-button-viewer.global.inject.mjs +2 -2
- package/css/plugin-card-viewer.global.css +1 -1
- package/css/plugin-card-viewer.global.inject.mjs +2 -2
- package/css/plugin-collapsible-list-viewer.global.css +1 -1
- package/css/plugin-collapsible-list-viewer.global.inject.mjs +2 -2
- package/css/plugin-divider-viewer.global.css +1 -1
- package/css/plugin-divider-viewer.global.inject.mjs +2 -2
- package/css/plugin-file-upload-viewer.global.css +1 -1
- package/css/plugin-file-upload-viewer.global.inject.mjs +2 -2
- package/css/plugin-gallery-viewer.global.css +1 -1
- package/css/plugin-gallery-viewer.global.inject.mjs +2 -2
- package/css/plugin-giphy-viewer.global.css +1 -1
- package/css/plugin-giphy-viewer.global.inject.mjs +2 -2
- package/css/plugin-hashtag-viewer.global.css +1 -1
- package/css/plugin-hashtag-viewer.global.inject.mjs +2 -2
- package/css/plugin-html-viewer.global.css +1 -1
- package/css/plugin-html-viewer.global.inject.mjs +2 -2
- package/css/plugin-image-viewer.global.css +1 -1
- package/css/plugin-image-viewer.global.inject.mjs +2 -2
- package/css/plugin-link-preview-viewer.global.css +2 -2
- package/css/plugin-link-preview-viewer.global.inject.mjs +3 -3
- package/css/plugin-link-viewer.global.css +1 -1
- package/css/plugin-link-viewer.global.inject.mjs +2 -2
- package/css/plugin-mentions-viewer.global.css +1 -1
- package/css/plugin-mentions-viewer.global.inject.mjs +2 -2
- package/css/plugin-paywall-viewer.global.css +1 -1
- package/css/plugin-paywall-viewer.global.inject.mjs +2 -2
- package/css/plugin-smart-block-viewer.global.css +1 -1
- package/css/plugin-smart-block-viewer.global.inject.mjs +2 -2
- package/css/plugin-social-polls-viewer.global.css +1 -1
- package/css/plugin-social-polls-viewer.global.inject.mjs +2 -2
- package/css/plugin-spoiler-viewer.global.css +1 -1
- package/css/plugin-spoiler-viewer.global.inject.mjs +2 -2
- package/css/plugin-table-viewer.global.css +3 -3
- package/css/plugin-table-viewer.global.inject.mjs +4 -4
- package/css/plugin-toc-viewer.global.css +1 -1
- package/css/plugin-toc-viewer.global.inject.mjs +2 -2
- package/css/plugin-vertical-embed-viewer.global.css +2 -2
- package/css/plugin-vertical-embed-viewer.global.inject.mjs +3 -3
- package/css/plugin-video-viewer.global.css +1 -1
- package/css/plugin-video-viewer.global.inject.mjs +2 -2
- package/css/ricos-viewer.global.css +1 -1
- package/css/ricos-viewer.global.inject.mjs +2 -2
- package/dist/cjs/_shared/dropdown-modal/dropdown-modal-scss.js +2 -2
- package/dist/cjs/_shared/dropdown-modal/dropdown-modal-scss.js.map +1 -1
- package/dist/cjs/_shared/editor-base-url/editor-base-url-context.js +14 -13
- package/dist/cjs/_shared/editor-base-url/editor-base-url-context.js.map +3 -3
- package/dist/cjs/_shared/figure/add-caption-button-scss.js +9 -9
- package/dist/cjs/_shared/figure/add-caption-button-scss.js.map +1 -1
- package/dist/cjs/_shared/figure/viewer-caption-scss.js +2 -2
- package/dist/cjs/_shared/figure/viewer-caption-scss.js.map +1 -1
- package/dist/cjs/_shared/figure/viewer-figure-scss.js +1 -1
- package/dist/cjs/_shared/figure/viewer-figure-scss.js.map +1 -1
- package/dist/cjs/_shared/font-weight.js +27 -0
- package/dist/cjs/_shared/font-weight.js.map +7 -0
- package/dist/cjs/_shared/get-common-marker-style.js +35 -0
- package/dist/cjs/_shared/get-common-marker-style.js.map +7 -0
- package/dist/cjs/_shared/get-decorations-marker-style.js +58 -0
- package/dist/cjs/_shared/get-decorations-marker-style.js.map +7 -0
- package/dist/cjs/_shared/get-list-marker-style.js +43 -0
- package/dist/cjs/_shared/get-list-marker-style.js.map +7 -0
- package/dist/cjs/_shared/link-modal/open-link-modal/site-pages/site-pages.js +2 -4
- package/dist/cjs/_shared/link-modal/open-link-modal/site-pages/site-pages.js.map +2 -2
- package/dist/cjs/_shared/list-item-divider/list-item-divider-scss.js +1 -1
- package/dist/cjs/_shared/list-item-divider/list-item-divider-scss.js.map +1 -1
- package/dist/cjs/_shared/list-item-select/list-item-select-scss.js +2 -2
- package/dist/cjs/_shared/list-item-select/list-item-select-scss.js.map +1 -1
- package/dist/cjs/_shared/list-item-toggle/list-item-toggle-scss.js +3 -3
- package/dist/cjs/_shared/list-item-toggle/list-item-toggle-scss.js.map +1 -1
- package/dist/cjs/_shared/{site-pages/serverless-types/serverless-types.js → list-marker-style-scss.js} +11 -3
- package/dist/cjs/_shared/list-marker-style-scss.js.map +7 -0
- package/dist/cjs/_shared/overlay-hoc/overlay-hoc-scss.js +1 -1
- package/dist/cjs/_shared/overlay-hoc/overlay-hoc-scss.js.map +1 -1
- package/dist/cjs/_shared/plugin-toolbar/create-settings-button.js +7 -1
- package/dist/cjs/_shared/plugin-toolbar/create-settings-button.js.map +2 -2
- package/dist/cjs/_shared/plugin-toolbar/separator/toolbar-button-separator-scss.js +2 -2
- package/dist/cjs/_shared/plugin-toolbar/separator/toolbar-button-separator-scss.js.map +1 -1
- package/dist/cjs/_shared/plugin-toolbar/url-link-button/url-link-button-scss.js +2 -2
- package/dist/cjs/_shared/plugin-toolbar/url-link-button/url-link-button-scss.js.map +1 -1
- package/dist/cjs/_shared/pm-node-types.js.map +2 -2
- package/dist/cjs/_shared/prompt-input-area/attachment-bar/attachment-bar-scss.js +7 -7
- package/dist/cjs/_shared/prompt-input-area/attachment-bar/attachment-bar-scss.js.map +1 -1
- package/dist/cjs/_shared/prompt-input-area/prompt-input-area-scss.js +13 -13
- package/dist/cjs/_shared/prompt-input-area/prompt-input-area-scss.js.map +1 -1
- package/dist/cjs/_shared/prompt-input-area/widget-prompt-input-area-scss.js +8 -8
- package/dist/cjs/_shared/prompt-input-area/widget-prompt-input-area-scss.js.map +1 -1
- package/dist/cjs/_shared/shape-select-modal/shape-select-modal-content-scss.js +7 -7
- package/dist/cjs/_shared/shape-select-modal/shape-select-modal-content-scss.js.map +1 -1
- package/dist/cjs/_shared/shape-view-renderer/shape-view-renderer-scss.js +2 -2
- package/dist/cjs/_shared/shape-view-renderer/shape-view-renderer-scss.js.map +1 -1
- package/dist/cjs/_shared/site-pages/site-pages-fetch-context/use-fetch-site-pages.js +93 -27
- package/dist/cjs/_shared/site-pages/site-pages-fetch-context/use-fetch-site-pages.js.map +3 -3
- package/dist/cjs/_shared/site-pages/site-pages-fetch-context.js +2 -6
- package/dist/cjs/_shared/site-pages/site-pages-fetch-context.js.map +2 -2
- package/dist/cjs/_shared/site-pages/types.js.map +2 -2
- package/dist/cjs/_shared/toolbar-button/toolbar-button-scss.js +3 -3
- package/dist/cjs/_shared/toolbar-button/toolbar-button-scss.js.map +1 -1
- package/dist/cjs/bundled-dependencies/ai-assistant-avatar.js +4 -4
- package/dist/cjs/bundled-dependencies/ai-assistant-avatar.js.map +1 -1
- package/dist/cjs/editor-common/statics/styles/general-scss.js +18 -18
- package/dist/cjs/editor-common/statics/styles/general-scss.js.map +1 -1
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/internal.js.map +2 -2
- package/dist/cjs/legacy.js.map +2 -2
- package/dist/cjs/plugin-ai/ai-content-modal/ai-content-modal-scss.js +8 -8
- package/dist/cjs/plugin-ai/ai-content-modal/ai-content-modal-scss.js.map +1 -1
- package/dist/cjs/plugin-ai/ai-content-modal/feed/feed-scss.js +2 -2
- package/dist/cjs/plugin-ai/ai-content-modal/feed/feed-scss.js.map +1 -1
- package/dist/cjs/plugin-ai/ai-content-modal/no-selection-message/no-selection-message-scss.js +1 -1
- package/dist/cjs/plugin-ai/ai-content-modal/no-selection-message/no-selection-message-scss.js.map +1 -1
- package/dist/cjs/plugin-ai/ai-content-modal/text-cursor/text-cursor-scss.js +2 -2
- package/dist/cjs/plugin-ai/ai-content-modal/text-cursor/text-cursor-scss.js.map +1 -1
- package/dist/cjs/plugin-ai/ai-content-modal/textual-prompt-input-area/textual-prompt-input-area-scss.js +5 -5
- package/dist/cjs/plugin-ai/ai-content-modal/textual-prompt-input-area/textual-prompt-input-area-scss.js.map +1 -1
- package/dist/cjs/plugin-ai/ai-image-modal/ai-image-modal-scss.js +6 -6
- package/dist/cjs/plugin-ai/ai-image-modal/ai-image-modal-scss.js.map +1 -1
- package/dist/cjs/plugin-ai/ai-plus-button/ai-plus-button-scss.js +1 -1
- package/dist/cjs/plugin-ai/ai-plus-button/ai-plus-button-scss.js.map +1 -1
- package/dist/cjs/plugin-ai/error-message/error-message-scss.js +1 -1
- package/dist/cjs/plugin-ai/error-message/error-message-scss.js.map +1 -1
- package/dist/cjs/plugin-ai/prompt-input-area/prompt-input-area-scss.js +4 -4
- package/dist/cjs/plugin-ai/prompt-input-area/prompt-input-area-scss.js.map +1 -1
- package/dist/cjs/plugin-ai/toolbar/toolbar-button-scss.js +2 -2
- package/dist/cjs/plugin-ai/toolbar/toolbar-button-scss.js.map +1 -1
- package/dist/cjs/plugin-animation/animation-panel-scss.js +9 -9
- package/dist/cjs/plugin-animation/animation-panel-scss.js.map +1 -1
- package/dist/cjs/plugin-audio/statics/styles/audio-embed-scss.js +1 -1
- package/dist/cjs/plugin-audio/statics/styles/audio-embed-scss.js.map +1 -1
- package/dist/cjs/plugin-audio/statics/styles/audio-scss.js +21 -21
- package/dist/cjs/plugin-audio/statics/styles/audio-scss.js.map +1 -1
- package/dist/cjs/plugin-audio/statics/styles/icon-button-scss.js +1 -1
- package/dist/cjs/plugin-audio/statics/styles/icon-button-scss.js.map +1 -1
- package/dist/cjs/plugin-audio/statics/styles/settings-modal-scss.js +1 -1
- package/dist/cjs/plugin-audio/statics/styles/settings-modal-scss.js.map +1 -1
- package/dist/cjs/plugin-audio/statics/styles/sound-control-scss.js +2 -2
- package/dist/cjs/plugin-audio/statics/styles/sound-control-scss.js.map +1 -1
- package/dist/cjs/plugin-block-drag-handle/box-select.js +1 -0
- package/dist/cjs/plugin-block-drag-handle/box-select.js.map +2 -2
- package/dist/cjs/plugin-block-drag-handle/dom.js +20 -8
- package/dist/cjs/plugin-block-drag-handle/dom.js.map +2 -2
- package/dist/cjs/plugin-block-drag-handle/plugin.js +35 -4
- package/dist/cjs/plugin-block-drag-handle/plugin.js.map +2 -2
- package/dist/cjs/plugin-block-drag-handle/styles-scss.js +8 -8
- package/dist/cjs/plugin-block-drag-handle/styles-scss.js.map +1 -1
- package/dist/cjs/plugin-button/statics/styles/button-input-modal-scss.js +2 -2
- package/dist/cjs/plugin-button/statics/styles/button-input-modal-scss.js.map +1 -1
- package/dist/cjs/plugin-button/statics/styles/button-text-field-scss.js +1 -1
- package/dist/cjs/plugin-button/statics/styles/button-text-field-scss.js.map +1 -1
- package/dist/cjs/plugin-button/statics/styles/default-styles-scss.js +5 -5
- package/dist/cjs/plugin-button/statics/styles/default-styles-scss.js.map +1 -1
- package/dist/cjs/plugin-card/card-node-view.js +39 -35
- package/dist/cjs/plugin-card/card-node-view.js.map +2 -2
- package/dist/cjs/plugin-card/card-scss.js +20 -19
- package/dist/cjs/plugin-card/card-scss.js.map +2 -2
- package/dist/cjs/plugin-card/card-viewer-scss.js +6 -6
- package/dist/cjs/plugin-card/card-viewer-scss.js.map +1 -1
- package/dist/cjs/plugin-card/extension.js +3 -1
- package/dist/cjs/plugin-card/extension.js.map +2 -2
- package/dist/cjs/plugin-card/index.js.map +1 -1
- package/dist/cjs/plugin-card/page-gap.js +3 -1
- package/dist/cjs/plugin-card/page-gap.js.map +2 -2
- package/dist/cjs/plugin-card/types-next.js.map +1 -1
- package/dist/cjs/plugin-card/types.js.map +1 -1
- package/dist/cjs/plugin-code-block/statics/styles/code-block-scss.js +6 -6
- package/dist/cjs/plugin-code-block/statics/styles/code-block-scss.js.map +1 -1
- package/dist/cjs/plugin-collapsible-list/statics/styles/collapsible-list-component-scss.js +6 -6
- package/dist/cjs/plugin-collapsible-list/statics/styles/collapsible-list-component-scss.js.map +1 -1
- package/dist/cjs/plugin-collapsible-list/statics/styles/collapsible-list-pair-scss.js +18 -18
- package/dist/cjs/plugin-collapsible-list/statics/styles/collapsible-list-pair-scss.js.map +1 -1
- package/dist/cjs/plugin-collapsible-list/statics/styles/collapsible-list-settings-scss.js +2 -2
- package/dist/cjs/plugin-collapsible-list/statics/styles/collapsible-list-settings-scss.js.map +1 -1
- package/dist/cjs/plugin-collapsible-list/statics/styles/new-pair-button-scss.js +3 -3
- package/dist/cjs/plugin-collapsible-list/statics/styles/new-pair-button-scss.js.map +1 -1
- package/dist/cjs/plugin-divider/statics/styles/divider-viewer-scss.js +13 -13
- package/dist/cjs/plugin-divider/statics/styles/divider-viewer-scss.js.map +1 -1
- package/dist/cjs/plugin-divider/toolbar/modals/divider-design-panel-scss.js +1 -1
- package/dist/cjs/plugin-divider/toolbar/modals/divider-design-panel-scss.js.map +1 -1
- package/dist/cjs/plugin-emoji/modals/emoji-suggestions-modal-scss.js +1 -1
- package/dist/cjs/plugin-emoji/modals/emoji-suggestions-modal-scss.js.map +1 -1
- package/dist/cjs/plugin-figure/tiptap/caption-scss.js +3 -3
- package/dist/cjs/plugin-figure/tiptap/caption-scss.js.map +1 -1
- package/dist/cjs/plugin-figure/tiptap/figure-scss.js +3 -3
- package/dist/cjs/plugin-figure/tiptap/figure-scss.js.map +1 -1
- package/dist/cjs/plugin-file-upload/statics/styles/file-upload-viewer-scss.js +15 -15
- package/dist/cjs/plugin-file-upload/statics/styles/file-upload-viewer-scss.js.map +1 -1
- package/dist/cjs/plugin-gallery/modals/settings/gallery-settings-modal-scss.js +3 -3
- package/dist/cjs/plugin-gallery/modals/settings/gallery-settings-modal-scss.js.map +1 -1
- package/dist/cjs/plugin-gallery/modals/settings/layout-settings/layout-controls-section/image-ratio-control-scss.js +6 -6
- package/dist/cjs/plugin-gallery/modals/settings/layout-settings/layout-controls-section/image-ratio-control-scss.js.map +1 -1
- package/dist/cjs/plugin-gallery/modals/settings/layout-settings/layout-controls-section/thumbnail-alignment-control-scss.js +5 -5
- package/dist/cjs/plugin-gallery/modals/settings/layout-settings/layout-controls-section/thumbnail-alignment-control-scss.js.map +1 -1
- package/dist/cjs/plugin-gallery/modals/settings/media-settings/media-list/sortable-item-scss.js +1 -1
- package/dist/cjs/plugin-gallery/modals/settings/media-settings/media-list/sortable-item-scss.js.map +1 -1
- package/dist/cjs/plugin-gallery/modals/settings/media-settings/media-list/sortable-list-scss.js +3 -3
- package/dist/cjs/plugin-gallery/modals/settings/media-settings/media-list/sortable-list-scss.js.map +1 -1
- package/dist/cjs/plugin-gallery/statics/styles/gallery-component-scss.js +1 -1
- package/dist/cjs/plugin-gallery/statics/styles/gallery-component-scss.js.map +1 -1
- package/dist/cjs/plugin-gallery/statics/styles/gallery-media-scss.js +21 -21
- package/dist/cjs/plugin-gallery/statics/styles/gallery-media-scss.js.map +1 -1
- package/dist/cjs/plugin-gallery/statics/styles/viewer-scss.js +1 -1
- package/dist/cjs/plugin-gallery/statics/styles/viewer-scss.js.map +1 -1
- package/dist/cjs/plugin-gallery/viewer/layout-collage-scss.js +5 -5
- package/dist/cjs/plugin-gallery/viewer/layout-collage-scss.js.map +1 -1
- package/dist/cjs/plugin-gallery/viewer/layout-column-scss.js +4 -4
- package/dist/cjs/plugin-gallery/viewer/layout-column-scss.js.map +1 -1
- package/dist/cjs/plugin-gallery/viewer/layout-fullsize-scss.js +4 -4
- package/dist/cjs/plugin-gallery/viewer/layout-fullsize-scss.js.map +1 -1
- package/dist/cjs/plugin-gallery/viewer/layout-grid-scss.js +2 -2
- package/dist/cjs/plugin-gallery/viewer/layout-grid-scss.js.map +1 -1
- package/dist/cjs/plugin-gallery/viewer/layout-masonry-scss.js +7 -7
- package/dist/cjs/plugin-gallery/viewer/layout-masonry-scss.js.map +1 -1
- package/dist/cjs/plugin-gallery/viewer/layout-panorama-scss.js +1 -1
- package/dist/cjs/plugin-gallery/viewer/layout-panorama-scss.js.map +1 -1
- package/dist/cjs/plugin-gallery/viewer/layout-slider-scss.js +6 -6
- package/dist/cjs/plugin-gallery/viewer/layout-slider-scss.js.map +1 -1
- package/dist/cjs/plugin-gallery/viewer/layout-thumbnail-scss.js +11 -11
- package/dist/cjs/plugin-gallery/viewer/layout-thumbnail-scss.js.map +1 -1
- package/dist/cjs/plugin-giphy/components/giphy-selector-scss.js +9 -9
- package/dist/cjs/plugin-giphy/components/giphy-selector-scss.js.map +1 -1
- package/dist/cjs/plugin-giphy/viewer/giphy-viewer-scss.js +4 -4
- package/dist/cjs/plugin-giphy/viewer/giphy-viewer-scss.js.map +1 -1
- package/dist/cjs/plugin-giphy/viewer/play-icon-scss.js +2 -2
- package/dist/cjs/plugin-giphy/viewer/play-icon-scss.js.map +1 -1
- package/dist/cjs/plugin-hashtag/statics/hashtag-scss.js +2 -2
- package/dist/cjs/plugin-hashtag/statics/hashtag-scss.js.map +1 -1
- package/dist/cjs/plugin-headings/dropdown/headings-dropdown-scss.js +5 -5
- package/dist/cjs/plugin-headings/dropdown/headings-dropdown-scss.js.map +1 -1
- package/dist/cjs/plugin-html/statics/styles/HtmlComponent-scss.js +2 -2
- package/dist/cjs/plugin-html/statics/styles/HtmlComponent-scss.js.map +1 -1
- package/dist/cjs/plugin-html/statics/styles/Iframe-scss.js +1 -1
- package/dist/cjs/plugin-html/statics/styles/Iframe-scss.js.map +1 -1
- package/dist/cjs/plugin-html/tiptap/ai-widget-scss.js +2 -2
- package/dist/cjs/plugin-html/tiptap/ai-widget-scss.js.map +1 -1
- package/dist/cjs/plugin-html/tiptap/loader-scss.js +9 -9
- package/dist/cjs/plugin-html/tiptap/loader-scss.js.map +1 -1
- package/dist/cjs/plugin-html/tiptap/preset-bar/preset-bar-scss.js +2 -2
- package/dist/cjs/plugin-html/tiptap/preset-bar/preset-bar-scss.js.map +1 -1
- package/dist/cjs/plugin-image/components/corner-radius-handles-scss.js +4 -4
- package/dist/cjs/plugin-image/components/corner-radius-handles-scss.js.map +1 -1
- package/dist/cjs/plugin-image/components/crop-edge-handles-scss.js +1 -1
- package/dist/cjs/plugin-image/components/crop-edge-handles-scss.js.map +1 -1
- package/dist/cjs/plugin-image/crop-overlay/crop-overlay-scss.js +14 -14
- package/dist/cjs/plugin-image/crop-overlay/crop-overlay-scss.js.map +1 -1
- package/dist/cjs/plugin-image/statics/styles/image-viewer-scss.js +20 -20
- package/dist/cjs/plugin-image/statics/styles/image-viewer-scss.js.map +1 -1
- package/dist/cjs/plugin-image/statics/styles/settings-modal-scss.js +1 -1
- package/dist/cjs/plugin-image/statics/styles/settings-modal-scss.js.map +1 -1
- package/dist/cjs/plugin-image/toolbar/shape-crop-modal-scss.js +4 -4
- package/dist/cjs/plugin-image/toolbar/shape-crop-modal-scss.js.map +1 -1
- package/dist/cjs/plugin-inline-ai/ai-selection-tooltip-scss.js +10 -10
- package/dist/cjs/plugin-inline-ai/ai-selection-tooltip-scss.js.map +1 -1
- package/dist/cjs/plugin-inline-ai/aria-avatar-row-scss.js +1 -1
- package/dist/cjs/plugin-inline-ai/aria-avatar-row-scss.js.map +1 -1
- package/dist/cjs/plugin-inline-ai/aria-surface-row-scss.js +4 -4
- package/dist/cjs/plugin-inline-ai/aria-surface-row-scss.js.map +1 -1
- package/dist/cjs/plugin-inline-ai/html-placeholder-scss.js +3 -3
- package/dist/cjs/plugin-inline-ai/html-placeholder-scss.js.map +1 -1
- package/dist/cjs/plugin-inline-ai/modal-scss.js +9 -9
- package/dist/cjs/plugin-inline-ai/modal-scss.js.map +1 -1
- package/dist/cjs/plugin-inline-ai/pending-widget-placeholder-scss.js +12 -12
- package/dist/cjs/plugin-inline-ai/pending-widget-placeholder-scss.js.map +1 -1
- package/dist/cjs/plugin-inline-ai/spinner-scss.js +2 -2
- package/dist/cjs/plugin-inline-ai/spinner-scss.js.map +1 -1
- package/dist/cjs/plugin-inline-ai/toolbar/toolbar-button-scss.js +2 -2
- package/dist/cjs/plugin-inline-ai/toolbar/toolbar-button-scss.js.map +1 -1
- package/dist/cjs/plugin-line-spacing/custom-spacing-editor-modal/custom-spacing-editor-modal-scss.js +1 -1
- package/dist/cjs/plugin-line-spacing/custom-spacing-editor-modal/custom-spacing-editor-modal-scss.js.map +1 -1
- package/dist/cjs/plugin-link/editor.js +2 -2
- package/dist/cjs/plugin-link/editor.js.map +2 -2
- package/dist/cjs/plugin-link/statics/link-viewer-scss.js +4 -4
- package/dist/cjs/plugin-link/statics/link-viewer-scss.js.map +1 -1
- package/dist/cjs/plugin-link/toolbar/anchor-link-button-scss.js +1 -1
- package/dist/cjs/plugin-link/toolbar/anchor-link-button-scss.js.map +1 -1
- package/dist/cjs/plugin-link-preview/statics/styles/insert-modal-scss.js +1 -1
- package/dist/cjs/plugin-link-preview/statics/styles/insert-modal-scss.js.map +1 -1
- package/dist/cjs/plugin-link-preview/statics/styles/link-preview-scss.js +18 -18
- package/dist/cjs/plugin-link-preview/statics/styles/link-preview-scss.js.map +1 -1
- package/dist/cjs/plugin-link-preview/statics/styles/settings-modal-scss.js +1 -1
- package/dist/cjs/plugin-link-preview/statics/styles/settings-modal-scss.js.map +1 -1
- package/dist/cjs/plugin-mentions/statics/mention-list-scss.js +3 -3
- package/dist/cjs/plugin-mentions/statics/mention-list-scss.js.map +1 -1
- package/dist/cjs/plugin-mentions/statics/mentions-scss.js +4 -4
- package/dist/cjs/plugin-mentions/statics/mentions-scss.js.map +1 -1
- package/dist/cjs/plugin-paywall/paywall-fallback-scss.js +1 -1
- package/dist/cjs/plugin-paywall/paywall-fallback-scss.js.map +1 -1
- package/dist/cjs/plugin-paywall/plugin-paywall.js.map +2 -2
- package/dist/cjs/plugin-smart-block/components/cell-accessory-scss.js +22 -22
- package/dist/cjs/plugin-smart-block/components/cell-accessory-scss.js.map +1 -1
- package/dist/cjs/plugin-smart-block/components/cell-quote-glyph-scss.js +3 -3
- package/dist/cjs/plugin-smart-block/components/cell-quote-glyph-scss.js.map +1 -1
- package/dist/cjs/plugin-smart-block/components/cell-star-rating-scss.js +4 -4
- package/dist/cjs/plugin-smart-block/components/cell-star-rating-scss.js.map +1 -1
- package/dist/cjs/plugin-smart-block/components/cell-stat-scss.js +20 -20
- package/dist/cjs/plugin-smart-block/components/cell-stat-scss.js.map +1 -1
- package/dist/cjs/plugin-smart-block/components/circle-donut-scss.js +7 -7
- package/dist/cjs/plugin-smart-block/components/circle-donut-scss.js.map +1 -1
- package/dist/cjs/plugin-smart-block/components/shape-overlay-scss.js +1 -1
- package/dist/cjs/plugin-smart-block/components/shape-overlay-scss.js.map +1 -1
- package/dist/cjs/plugin-smart-block/components/smart-block-view-scss.js +50 -50
- package/dist/cjs/plugin-smart-block/components/smart-block-view-scss.js.map +1 -1
- package/dist/cjs/plugin-smart-block/components/stars-scss.js +8 -8
- package/dist/cjs/plugin-smart-block/components/stars-scss.js.map +1 -1
- package/dist/cjs/plugin-smart-block/modals/variant-picker-scss.js +7 -7
- package/dist/cjs/plugin-smart-block/modals/variant-picker-scss.js.map +1 -1
- package/dist/cjs/plugin-smart-block/tiptap/smart-block-editor-scss.js +13 -13
- package/dist/cjs/plugin-smart-block/tiptap/smart-block-editor-scss.js.map +1 -1
- package/dist/cjs/plugin-social-polls/components/image-upload/image-upload-scss.js +9 -9
- package/dist/cjs/plugin-social-polls/components/image-upload/image-upload-scss.js.map +1 -1
- package/dist/cjs/plugin-social-polls/components/insert-modal/insert-modal-scss.js +1 -1
- package/dist/cjs/plugin-social-polls/components/insert-modal/insert-modal-scss.js.map +1 -1
- package/dist/cjs/plugin-social-polls/components/poll-header/poll-header-scss.js +3 -3
- package/dist/cjs/plugin-social-polls/components/poll-header/poll-header-scss.js.map +1 -1
- package/dist/cjs/plugin-social-polls/components/poll-option/option-scss.js +23 -23
- package/dist/cjs/plugin-social-polls/components/poll-option/option-scss.js.map +1 -1
- package/dist/cjs/plugin-social-polls/components/poll-option/webview/option-webview-scss.js +24 -24
- package/dist/cjs/plugin-social-polls/components/poll-option/webview/option-webview-scss.js.map +1 -1
- package/dist/cjs/plugin-social-polls/components/poll-scss.js +19 -19
- package/dist/cjs/plugin-social-polls/components/poll-scss.js.map +1 -1
- package/dist/cjs/plugin-social-polls/components/settings-modal/settings-modal-scss.js +2 -2
- package/dist/cjs/plugin-social-polls/components/settings-modal/settings-modal-scss.js.map +1 -1
- package/dist/cjs/plugin-social-polls/components/text-field/text-field-scss.js +12 -12
- package/dist/cjs/plugin-social-polls/components/text-field/text-field-scss.js.map +1 -1
- package/dist/cjs/plugin-social-polls/components/voted-users/voted-users-scss.js +20 -20
- package/dist/cjs/plugin-social-polls/components/voted-users/voted-users-scss.js.map +1 -1
- package/dist/cjs/plugin-spoiler/get-text-buttons.js +2 -2
- package/dist/cjs/plugin-spoiler/get-text-buttons.js.map +2 -2
- package/dist/cjs/plugin-spoiler/statics/styles/spoiler-scss.js +18 -18
- package/dist/cjs/plugin-spoiler/statics/styles/spoiler-scss.js.map +1 -1
- package/dist/cjs/plugin-table/modals/table-grid-selector-scss.js +5 -5
- package/dist/cjs/plugin-table/modals/table-grid-selector-scss.js.map +1 -1
- package/dist/cjs/plugin-table/statics/styles/cell-scss.js +15 -15
- package/dist/cjs/plugin-table/statics/styles/cell-scss.js.map +1 -1
- package/dist/cjs/plugin-table/statics/styles/resizer-scss.js +18 -18
- package/dist/cjs/plugin-table/statics/styles/resizer-scss.js.map +1 -1
- package/dist/cjs/plugin-table/statics/styles/table-settings-modal-scss.js +1 -1
- package/dist/cjs/plugin-table/statics/styles/table-settings-modal-scss.js.map +1 -1
- package/dist/cjs/plugin-table/statics/styles/table-viewer-scss.js +6 -6
- package/dist/cjs/plugin-table/statics/styles/table-viewer-scss.js.map +1 -1
- package/dist/cjs/plugin-table/tiptap/decorations/tableHandles-scss.js +9 -9
- package/dist/cjs/plugin-table/tiptap/decorations/tableHandles-scss.js.map +1 -1
- package/dist/cjs/plugin-table/tiptap/plugins/table-scss.js +33 -33
- package/dist/cjs/plugin-table/tiptap/plugins/table-scss.js.map +1 -1
- package/dist/cjs/plugin-table/toolbar/modals/border-scope-selector-scss.js +2 -2
- package/dist/cjs/plugin-table/toolbar/modals/border-scope-selector-scss.js.map +1 -1
- package/dist/cjs/plugin-text-color/sketch/text-highlight-button.js +2 -2
- package/dist/cjs/plugin-text-color/sketch/text-highlight-button.js.map +2 -2
- package/dist/cjs/plugin-text-color/text-button-color-scss.js +2 -2
- package/dist/cjs/plugin-text-color/text-button-color-scss.js.map +1 -1
- package/dist/cjs/plugin-toc/toc-view-scss.js +2 -2
- package/dist/cjs/plugin-toc/toc-view-scss.js.map +1 -1
- package/dist/cjs/plugin-vertical-embed/components/Ribbon-scss.js +3 -3
- package/dist/cjs/plugin-vertical-embed/components/Ribbon-scss.js.map +1 -1
- package/dist/cjs/plugin-vertical-embed/components/card-content-scss.js +23 -23
- package/dist/cjs/plugin-vertical-embed/components/card-content-scss.js.map +1 -1
- package/dist/cjs/plugin-vertical-embed/components/card-scss.js +19 -19
- package/dist/cjs/plugin-vertical-embed/components/card-scss.js.map +1 -1
- package/dist/cjs/plugin-vertical-embed/components/description-scss.js +2 -2
- package/dist/cjs/plugin-vertical-embed/components/description-scss.js.map +1 -1
- package/dist/cjs/plugin-vertical-embed/modals/settings-modal-scss.js +2 -2
- package/dist/cjs/plugin-vertical-embed/modals/settings-modal-scss.js.map +1 -1
- package/dist/cjs/plugin-vertical-embed/tiptap/component-scss.js +10 -10
- package/dist/cjs/plugin-vertical-embed/tiptap/component-scss.js.map +1 -1
- package/dist/cjs/plugin-vertical-embed/toolbar/items-list-scss.js +1 -1
- package/dist/cjs/plugin-vertical-embed/toolbar/items-list-scss.js.map +1 -1
- package/dist/cjs/plugin-vertical-embed/viewer/vertical-embed-viewer-scss.js +6 -6
- package/dist/cjs/plugin-vertical-embed/viewer/vertical-embed-viewer-scss.js.map +1 -1
- package/dist/cjs/plugin-video/statics/styles/default-video-styles-scss.js +8 -8
- package/dist/cjs/plugin-video/statics/styles/default-video-styles-scss.js.map +1 -1
- package/dist/cjs/plugin-video/statics/styles/video-viewer-scss.js +3 -3
- package/dist/cjs/plugin-video/statics/styles/video-viewer-scss.js.map +1 -1
- package/dist/cjs/plugin-video/toolbar/embed-video-scss.js +1 -1
- package/dist/cjs/plugin-video/toolbar/embed-video-scss.js.map +1 -1
- package/dist/cjs/plugin-video/viewer/video.js +30 -2
- package/dist/cjs/plugin-video/viewer/video.js.map +3 -3
- package/dist/cjs/ricos-common-plugins/bold/extension.js +4 -5
- package/dist/cjs/ricos-common-plugins/bold/extension.js.map +2 -2
- package/dist/cjs/ricos-common-plugins/decoration-plugins/list-item-sizing.js +13 -1
- package/dist/cjs/ricos-common-plugins/decoration-plugins/list-item-sizing.js.map +2 -2
- package/dist/cjs/ricos-common-plugins/font-size/block-font-size-plugin.js +2 -1
- package/dist/cjs/ricos-common-plugins/font-size/block-font-size-plugin.js.map +2 -2
- package/dist/cjs/ricos-common-plugins/font-size/dropdown/font-size-dropdown-scss.js +1 -1
- package/dist/cjs/ricos-common-plugins/font-size/dropdown/font-size-dropdown-scss.js.map +1 -1
- package/dist/cjs/ricos-common-plugins/gap-spacer/gap-spacer-component/gap-spacer-styles-scss.js +8 -8
- package/dist/cjs/ricos-common-plugins/gap-spacer/gap-spacer-component/gap-spacer-styles-scss.js.map +1 -1
- package/dist/cjs/ricos-common-plugins/layout/layouts-scss.js +33 -33
- package/dist/cjs/ricos-common-plugins/layout/layouts-scss.js.map +1 -1
- package/dist/cjs/ricos-common-plugins/layout/paywall-toolbar-button.js +100 -0
- package/dist/cjs/ricos-common-plugins/layout/paywall-toolbar-button.js.map +7 -0
- package/dist/cjs/ricos-common-plugins/layout/plugin-layout.js +178 -173
- package/dist/cjs/ricos-common-plugins/layout/plugin-layout.js.map +2 -2
- package/dist/cjs/ricos-common-plugins/layout/section-dividers/section-dividers-panel-scss.js +2 -2
- package/dist/cjs/ricos-common-plugins/layout/section-dividers/section-dividers-panel-scss.js.map +1 -1
- package/dist/cjs/ricos-common-plugins/layout/section-dividers/section-dividers-scss.js +4 -4
- package/dist/cjs/ricos-common-plugins/layout/section-dividers/section-dividers-scss.js.map +1 -1
- package/dist/cjs/ricos-common-plugins/list-item/extension.js +9 -0
- package/dist/cjs/ricos-common-plugins/list-item/extension.js.map +2 -2
- package/dist/cjs/ricos-common-plugins/list-item/list-converters.js +5 -3
- package/dist/cjs/ricos-common-plugins/list-item/list-converters.js.map +2 -2
- package/dist/cjs/ricos-common-plugins/list-item/list-marker-selection.js +291 -0
- package/dist/cjs/ricos-common-plugins/list-item/list-marker-selection.js.map +7 -0
- package/dist/cjs/ricos-common-plugins/quick-actions/modal/modal-scss.js +2 -2
- package/dist/cjs/ricos-common-plugins/quick-actions/modal/modal-scss.js.map +1 -1
- package/dist/cjs/ricos-common-plugins/statics/styles-scss.js +18 -18
- package/dist/cjs/ricos-common-plugins/statics/styles-scss.js.map +1 -1
- package/dist/cjs/ricos-common-plugins/strikethrough/strikethrough.js +2 -2
- package/dist/cjs/ricos-common-plugins/strikethrough/strikethrough.js.map +2 -2
- package/dist/cjs/ricos-common-plugins/strikethrough/strikethrough.testkit.js +1 -0
- package/dist/cjs/ricos-common-plugins/strikethrough/strikethrough.testkit.js.map +2 -2
- package/dist/cjs/ricos-common-plugins/title/headings-scss.js +8 -8
- package/dist/cjs/ricos-common-plugins/title/headings-scss.js.map +1 -1
- package/dist/cjs/ricos-common-plugins/underline/underline.js +2 -2
- package/dist/cjs/ricos-common-plugins/underline/underline.js.map +2 -2
- package/dist/cjs/ricos-editor/statics/styles/editor-styles-scss.js +9 -9
- package/dist/cjs/ricos-editor/statics/styles/editor-styles-scss.js.map +1 -1
- package/dist/cjs/ricos-modals/statics/styles/drawer-scss.js +9 -9
- package/dist/cjs/ricos-modals/statics/styles/drawer-scss.js.map +1 -1
- package/dist/cjs/ricos-modals/statics/styles/fullscreen-scss.js +1 -1
- package/dist/cjs/ricos-modals/statics/styles/fullscreen-scss.js.map +1 -1
- package/dist/cjs/ricos-modals/statics/styles/popper-scss.js +3 -3
- package/dist/cjs/ricos-modals/statics/styles/popper-scss.js.map +1 -1
- package/dist/cjs/ricos-schema/next-schema/version.js +1 -1
- package/dist/cjs/ricos-schema/next-schema/version.js.map +1 -1
- package/dist/cjs/ricos-styles/statics/styles/style-presets-scss.js +4 -4
- package/dist/cjs/ricos-styles/statics/styles/style-presets-scss.js.map +1 -1
- package/dist/cjs/ricos-types/next/ricos-types.js.map +1 -1
- package/dist/cjs/ricos-types/ricos-types.js.map +1 -1
- package/dist/cjs/ricos-viewer-next/ContentViewer/rericos/renderers/blockquote/blockquote-scss.js +3 -3
- package/dist/cjs/ricos-viewer-next/ContentViewer/rericos/renderers/blockquote/blockquote-scss.js.map +1 -1
- package/dist/cjs/ricos-viewer-next/ContentViewer/rericos/renderers/codeblock/codeblock-scss.js +3 -3
- package/dist/cjs/ricos-viewer-next/ContentViewer/rericos/renderers/codeblock/codeblock-scss.js.map +1 -1
- package/dist/cjs/ricos-viewer-next/ContentViewer/rericos/renderers/heading/heading-scss.js +9 -9
- package/dist/cjs/ricos-viewer-next/ContentViewer/rericos/renderers/heading/heading-scss.js.map +1 -1
- package/dist/cjs/ricos-viewer-next/ContentViewer/rericos/renderers/layout/layout-scss.js +10 -10
- package/dist/cjs/ricos-viewer-next/ContentViewer/rericos/renderers/layout/layout-scss.js.map +1 -1
- package/dist/cjs/ricos-viewer-next/ContentViewer/rericos/renderers/lists/list-item.js +10 -1
- package/dist/cjs/ricos-viewer-next/ContentViewer/rericos/renderers/lists/list-item.js.map +2 -2
- package/dist/cjs/ricos-viewer-next/ContentViewer/rericos/renderers/lists/lists-scss.js +6 -6
- package/dist/cjs/ricos-viewer-next/ContentViewer/rericos/renderers/lists/lists-scss.js.map +1 -1
- package/dist/cjs/ricos-viewer-next/ContentViewer/rericos/renderers/paragraph/paragraph-scss.js +4 -4
- package/dist/cjs/ricos-viewer-next/ContentViewer/rericos/renderers/paragraph/paragraph-scss.js.map +1 -1
- package/dist/cjs/ricos-viewer-next/ContentViewer/rericos/renderers/plugins/link-viewer-wrapper-scss.js +2 -2
- package/dist/cjs/ricos-viewer-next/ContentViewer/rericos/renderers/plugins/link-viewer-wrapper-scss.js.map +1 -1
- package/dist/cjs/ricos-viewer-next/ContentViewer/rericos/renderers/plugins/plugin-scss.js +15 -15
- package/dist/cjs/ricos-viewer-next/ContentViewer/rericos/renderers/plugins/plugin-scss.js.map +1 -1
- package/dist/cjs/ricos-viewer-next/modals/fullscreen/fullscreen-scss.js +12 -12
- package/dist/cjs/ricos-viewer-next/modals/fullscreen/fullscreen-scss.js.map +1 -1
- package/dist/cjs/ricos-viewer-next/statics/alignment-scss.js +16 -16
- package/dist/cjs/ricos-viewer-next/statics/alignment-scss.js.map +1 -1
- package/dist/cjs/ricos-viewer-next/statics/indentation-scss.js +7 -7
- package/dist/cjs/ricos-viewer-next/statics/indentation-scss.js.map +1 -1
- package/dist/cjs/ricos-viewer-next/statics/rich-content-viewer-scss.js +9 -9
- package/dist/cjs/ricos-viewer-next/statics/rich-content-viewer-scss.js.map +1 -1
- package/dist/cjs/ricos-viewer-next/statics/rtl-scss.js +2 -2
- package/dist/cjs/ricos-viewer-next/statics/rtl-scss.js.map +1 -1
- package/dist/cjs/text-selection-toolbar/statics/styles/viewer-inline-toolbar-scss.js +2 -2
- package/dist/cjs/text-selection-toolbar/statics/styles/viewer-inline-toolbar-scss.js.map +1 -1
- package/dist/cjs/tiptap/core/editor.js +5 -2
- package/dist/cjs/tiptap/core/editor.js.map +2 -2
- package/dist/cjs/tiptap-editor/statics/styles/tiptap-editor-styles-scss.js +13 -13
- package/dist/cjs/tiptap-editor/statics/styles/tiptap-editor-styles-scss.js.map +1 -1
- package/dist/cjs/tiptap-extensions/placeholder-scss.js +1 -1
- package/dist/cjs/tiptap-extensions/placeholder-scss.js.map +1 -1
- package/dist/cjs/tiptap-extensions/statics/styles-scss.js +4 -4
- package/dist/cjs/tiptap-extensions/statics/styles-scss.js.map +1 -1
- package/dist/cjs/toolbars-v3/components/InsertPluginToolbar/insert-plugin-toolbar-scss.js +1 -1
- package/dist/cjs/toolbars-v3/components/InsertPluginToolbar/insert-plugin-toolbar-scss.js.map +1 -1
- package/dist/cjs/toolbars-v3/components/MaxWidthCalculationWrapper/max-width-calculation-wrapper.js +2 -1
- package/dist/cjs/toolbars-v3/components/MaxWidthCalculationWrapper/max-width-calculation-wrapper.js.map +2 -2
- package/dist/cjs/toolbars-v3/components/Toolbar/RicosDesktopToolbar/OverflownButtons-scss.js +3 -3
- package/dist/cjs/toolbars-v3/components/Toolbar/RicosDesktopToolbar/OverflownButtons-scss.js.map +1 -1
- package/dist/cjs/toolbars-v3/components/Toolbar/RicosDesktopToolbar/RicosDesktopToolbar-scss.js +3 -3
- package/dist/cjs/toolbars-v3/components/Toolbar/RicosDesktopToolbar/RicosDesktopToolbar-scss.js.map +1 -1
- package/dist/cjs/toolbars-v3/components/Toolbar/RicosDesktopToolbar/RicosDesktopToolbarWrapper-scss.js +4 -4
- package/dist/cjs/toolbars-v3/components/Toolbar/RicosDesktopToolbar/RicosDesktopToolbarWrapper-scss.js.map +1 -1
- package/dist/cjs/toolbars-v3/components/Toolbar/RicosMobileToolbar/RicosMobileToolbar-scss.js +9 -9
- package/dist/cjs/toolbars-v3/components/Toolbar/RicosMobileToolbar/RicosMobileToolbar-scss.js.map +1 -1
- package/dist/cjs/toolbars-v3/components/Toolbar/RicosMobileToolbar/mobile-toolbar-overlay/mobile-toolbar-overlay-scss.js +1 -1
- package/dist/cjs/toolbars-v3/components/Toolbar/RicosMobileToolbar/mobile-toolbar-overlay/mobile-toolbar-overlay-scss.js.map +1 -1
- package/dist/cjs/toolbars-v3/components/buttons/AddPluginMenuButtons/AddPluginMenuMobileButton-scss.js +1 -1
- package/dist/cjs/toolbars-v3/components/buttons/AddPluginMenuButtons/AddPluginMenuMobileButton-scss.js.map +1 -1
- package/dist/cjs/toolbars-v3/components/buttons/FontSizeButton/FontSizeButton-scss.js +5 -5
- package/dist/cjs/toolbars-v3/components/buttons/FontSizeButton/FontSizeButton-scss.js.map +1 -1
- package/dist/cjs/toolbars-v3/modals/FloatingPluginMenu/styles/floating-add-plugin-menu-scss.js +6 -6
- package/dist/cjs/toolbars-v3/modals/FloatingPluginMenu/styles/floating-add-plugin-menu-scss.js.map +1 -1
- package/dist/cjs/toolbars-v3/ricos-toolbars/footer/FooterToolbar-scss.js +1 -1
- package/dist/cjs/toolbars-v3/ricos-toolbars/footer/FooterToolbar-scss.js.map +1 -1
- package/dist/cjs/toolbars-v3/ricos-toolbars/formatting/use-is-visible.js +4 -0
- package/dist/cjs/toolbars-v3/ricos-toolbars/formatting/use-is-visible.js.map +2 -2
- package/dist/cjs/ui-components/Components/Image-scss.js +1 -1
- package/dist/cjs/ui-components/Components/Image-scss.js.map +1 -1
- package/dist/cjs/ui-components/Components/double-loader-scss.js +4 -4
- package/dist/cjs/ui-components/Components/double-loader-scss.js.map +1 -1
- package/dist/cjs/ui-components/color-picker/button-color-swatches/button-color-swatches-scss.js +2 -2
- package/dist/cjs/ui-components/color-picker/button-color-swatches/button-color-swatches-scss.js.map +1 -1
- package/dist/cjs/ui-components/color-picker/new-color-picker/components/gradient-picker/gradient-picker-scss.js +13 -13
- package/dist/cjs/ui-components/color-picker/new-color-picker/components/gradient-picker/gradient-picker-scss.js.map +1 -1
- package/dist/cjs/ui-components/color-picker/new-color-picker/components/new-color-swatches/new-color-swatches-scss.js +1 -1
- package/dist/cjs/ui-components/color-picker/new-color-picker/components/new-color-swatches/new-color-swatches-scss.js.map +1 -1
- package/dist/cjs/ui-components/color-picker/new-color-picker/components/simple-color-picker/simple-color-picker-scss.js +2 -2
- package/dist/cjs/ui-components/color-picker/new-color-picker/components/simple-color-picker/simple-color-picker-scss.js.map +1 -1
- package/dist/cjs/ui-components/color-picker/new-color-picker/components/single-color-swatch/single-color-swatch-scss.js +2 -2
- package/dist/cjs/ui-components/color-picker/new-color-picker/components/single-color-swatch/single-color-swatch-scss.js.map +1 -1
- package/dist/cjs/ui-components/color-picker/new-color-picker/new-color-picker-scss.js +1 -1
- package/dist/cjs/ui-components/color-picker/new-color-picker/new-color-picker-scss.js.map +1 -1
- package/dist/cjs/ui-components/input-with-slider/input-with-slider-scss.js +1 -1
- package/dist/cjs/ui-components/input-with-slider/input-with-slider-scss.js.map +1 -1
- package/dist/cjs/ui-components/layout-background-loader/layout-background-loader-scss.js +3 -3
- package/dist/cjs/ui-components/layout-background-loader/layout-background-loader-scss.js.map +1 -1
- package/dist/cjs/ui-components/modal-layout/floating-layout/floating-desktop-layout-scss.js +1 -1
- package/dist/cjs/ui-components/modal-layout/floating-layout/floating-desktop-layout-scss.js.map +1 -1
- package/dist/cjs/ui-components/modal-layout/fullscreen-mobile-layout/fullscreen-mobile-layout-scss.js +4 -4
- package/dist/cjs/ui-components/modal-layout/fullscreen-mobile-layout/fullscreen-mobile-layout-scss.js.map +1 -1
- package/dist/cjs/ui-components/panel/panel-scss.js +2 -2
- package/dist/cjs/ui-components/panel/panel-scss.js.map +1 -1
- package/dist/cjs/ui-components/panel-header/panel-header-scss.js +1 -1
- package/dist/cjs/ui-components/panel-header/panel-header-scss.js.map +1 -1
- package/dist/cjs/ui-components/settings-panel-discard-modal/settings-panel-discard-modal-scss.js +1 -1
- package/dist/cjs/ui-components/settings-panel-discard-modal/settings-panel-discard-modal-scss.js.map +1 -1
- package/dist/cjs/ui-components/statics/styles/generic-error-scss.js +1 -1
- package/dist/cjs/ui-components/statics/styles/generic-error-scss.js.map +1 -1
- package/dist/cjs/ui-components/statics/styles/loaders-scss.js +8 -8
- package/dist/cjs/ui-components/statics/styles/loaders-scss.js.map +1 -1
- package/dist/cjs/ui-components/statics/styles/media-item-error-msg-scss.js +3 -3
- package/dist/cjs/ui-components/statics/styles/media-item-error-msg-scss.js.map +1 -1
- package/dist/cjs/ui-components/statics/styles/slider-scss.js +5 -5
- package/dist/cjs/ui-components/statics/styles/slider-scss.js.map +1 -1
- package/dist/cjs/ui-components/thumbnail-picker/thumbnail-picker-scss.js +1 -1
- package/dist/cjs/ui-components/thumbnail-picker/thumbnail-picker-scss.js.map +1 -1
- package/dist/cjs/ui-components/wixel-assistant/assistant-timeline-scss.js +16 -16
- package/dist/cjs/ui-components/wixel-assistant/assistant-timeline-scss.js.map +1 -1
- package/dist/cjs/wix-react-player/players/youtube.js +1 -0
- package/dist/cjs/wix-react-player/players/youtube.js.map +2 -2
- package/dist/cjs/wix-rich-content-common/statics/styles/fonts-scss.js +1 -1
- package/dist/cjs/wix-rich-content-common/statics/styles/fonts-scss.js.map +1 -1
- package/dist/cjs/wix-rich-content-common/statics/styles/general-scss.js +11 -11
- package/dist/cjs/wix-rich-content-common/statics/styles/general-scss.js.map +1 -1
- package/dist/docs/api-docs-reference.cjs +1 -1
- package/dist/docs/api-docs-reference.js +1 -1
- package/dist/docs/api-docs.md +2 -2
- package/dist/docs/sections/editor.md +2 -2
- package/dist/es/_shared/dropdown-modal/dropdown-modal-scss.js +5 -5
- package/dist/es/_shared/dropdown-modal/dropdown-modal-scss.js.map +1 -1
- package/dist/es/_shared/editor-base-url/editor-base-url-context.js +13 -12
- package/dist/es/_shared/editor-base-url/editor-base-url-context.js.map +2 -2
- package/dist/es/_shared/figure/add-caption-button-scss.js +11 -11
- package/dist/es/_shared/figure/add-caption-button-scss.js.map +1 -1
- package/dist/es/_shared/figure/viewer-caption-scss.js +2 -2
- package/dist/es/_shared/figure/viewer-caption-scss.js.map +1 -1
- package/dist/es/_shared/figure/viewer-figure-scss.js +1 -1
- package/dist/es/_shared/figure/viewer-figure-scss.js.map +1 -1
- package/dist/es/_shared/font-weight.js +7 -0
- package/dist/es/_shared/font-weight.js.map +7 -0
- package/dist/es/_shared/get-common-marker-style.js +15 -0
- package/dist/es/_shared/get-common-marker-style.js.map +7 -0
- package/dist/es/_shared/get-decorations-marker-style.js +41 -0
- package/dist/es/_shared/get-decorations-marker-style.js.map +7 -0
- package/dist/es/_shared/get-list-marker-style.js +23 -0
- package/dist/es/_shared/get-list-marker-style.js.map +7 -0
- package/dist/es/_shared/link-modal/open-link-modal/site-pages/site-pages.js +2 -4
- package/dist/es/_shared/link-modal/open-link-modal/site-pages/site-pages.js.map +2 -2
- package/dist/es/_shared/list-item-divider/list-item-divider-scss.js +3 -3
- package/dist/es/_shared/list-item-divider/list-item-divider-scss.js.map +1 -1
- package/dist/es/_shared/list-item-select/list-item-select-scss.js +4 -4
- package/dist/es/_shared/list-item-select/list-item-select-scss.js.map +1 -1
- package/dist/es/_shared/list-item-toggle/list-item-toggle-scss.js +5 -5
- package/dist/es/_shared/list-item-toggle/list-item-toggle-scss.js.map +1 -1
- package/dist/es/_shared/list-marker-style-scss.js +28 -0
- package/dist/es/_shared/list-marker-style-scss.js.map +7 -0
- package/dist/es/_shared/overlay-hoc/overlay-hoc-scss.js +3 -3
- package/dist/es/_shared/overlay-hoc/overlay-hoc-scss.js.map +1 -1
- package/dist/es/_shared/plugin-toolbar/create-settings-button.js +7 -1
- package/dist/es/_shared/plugin-toolbar/create-settings-button.js.map +2 -2
- package/dist/es/_shared/plugin-toolbar/separator/toolbar-button-separator-scss.js +4 -4
- package/dist/es/_shared/plugin-toolbar/separator/toolbar-button-separator-scss.js.map +1 -1
- package/dist/es/_shared/plugin-toolbar/url-link-button/url-link-button-scss.js +4 -4
- package/dist/es/_shared/plugin-toolbar/url-link-button/url-link-button-scss.js.map +1 -1
- package/dist/es/_shared/pm-node-types.js.map +2 -2
- package/dist/es/_shared/prompt-input-area/attachment-bar/attachment-bar-scss.js +9 -9
- package/dist/es/_shared/prompt-input-area/attachment-bar/attachment-bar-scss.js.map +1 -1
- package/dist/es/_shared/prompt-input-area/prompt-input-area-scss.js +15 -15
- package/dist/es/_shared/prompt-input-area/prompt-input-area-scss.js.map +1 -1
- package/dist/es/_shared/prompt-input-area/widget-prompt-input-area-scss.js +10 -10
- package/dist/es/_shared/prompt-input-area/widget-prompt-input-area-scss.js.map +1 -1
- package/dist/es/_shared/shape-select-modal/shape-select-modal-content-scss.js +9 -9
- package/dist/es/_shared/shape-select-modal/shape-select-modal-content-scss.js.map +1 -1
- package/dist/es/_shared/shape-view-renderer/shape-view-renderer-scss.js +4 -4
- package/dist/es/_shared/shape-view-renderer/shape-view-renderer-scss.js.map +1 -1
- package/dist/es/_shared/site-pages/site-pages-fetch-context/use-fetch-site-pages.js +82 -26
- package/dist/es/_shared/site-pages/site-pages-fetch-context/use-fetch-site-pages.js.map +3 -3
- package/dist/es/_shared/site-pages/site-pages-fetch-context.js +2 -6
- package/dist/es/_shared/site-pages/site-pages-fetch-context.js.map +2 -2
- package/dist/es/_shared/site-pages/types.js.map +2 -2
- package/dist/es/_shared/toolbar-button/toolbar-button-scss.js +5 -5
- package/dist/es/_shared/toolbar-button/toolbar-button-scss.js.map +1 -1
- package/dist/es/bundled-dependencies/ai-assistant-avatar.js +6 -6
- package/dist/es/bundled-dependencies/ai-assistant-avatar.js.map +1 -1
- package/dist/es/editor-common/statics/styles/general-scss.js +20 -20
- package/dist/es/editor-common/statics/styles/general-scss.js.map +1 -1
- package/dist/es/index.js.map +2 -2
- package/dist/es/internal.js.map +2 -2
- package/dist/es/legacy.js +3 -1
- package/dist/es/legacy.js.map +2 -2
- package/dist/es/plugin-ai/ai-content-modal/ai-content-modal-scss.js +10 -10
- package/dist/es/plugin-ai/ai-content-modal/ai-content-modal-scss.js.map +1 -1
- package/dist/es/plugin-ai/ai-content-modal/feed/feed-scss.js +4 -4
- package/dist/es/plugin-ai/ai-content-modal/feed/feed-scss.js.map +1 -1
- package/dist/es/plugin-ai/ai-content-modal/no-selection-message/no-selection-message-scss.js +3 -3
- package/dist/es/plugin-ai/ai-content-modal/no-selection-message/no-selection-message-scss.js.map +1 -1
- package/dist/es/plugin-ai/ai-content-modal/text-cursor/text-cursor-scss.js +4 -4
- package/dist/es/plugin-ai/ai-content-modal/text-cursor/text-cursor-scss.js.map +1 -1
- package/dist/es/plugin-ai/ai-content-modal/textual-prompt-input-area/textual-prompt-input-area-scss.js +7 -7
- package/dist/es/plugin-ai/ai-content-modal/textual-prompt-input-area/textual-prompt-input-area-scss.js.map +1 -1
- package/dist/es/plugin-ai/ai-image-modal/ai-image-modal-scss.js +8 -8
- package/dist/es/plugin-ai/ai-image-modal/ai-image-modal-scss.js.map +1 -1
- package/dist/es/plugin-ai/ai-plus-button/ai-plus-button-scss.js +3 -3
- package/dist/es/plugin-ai/ai-plus-button/ai-plus-button-scss.js.map +1 -1
- package/dist/es/plugin-ai/error-message/error-message-scss.js +3 -3
- package/dist/es/plugin-ai/error-message/error-message-scss.js.map +1 -1
- package/dist/es/plugin-ai/prompt-input-area/prompt-input-area-scss.js +6 -6
- package/dist/es/plugin-ai/prompt-input-area/prompt-input-area-scss.js.map +1 -1
- package/dist/es/plugin-ai/toolbar/toolbar-button-scss.js +4 -4
- package/dist/es/plugin-ai/toolbar/toolbar-button-scss.js.map +1 -1
- package/dist/es/plugin-animation/animation-panel-scss.js +11 -11
- package/dist/es/plugin-animation/animation-panel-scss.js.map +1 -1
- package/dist/es/plugin-audio/statics/styles/audio-embed-scss.js +3 -3
- package/dist/es/plugin-audio/statics/styles/audio-embed-scss.js.map +1 -1
- package/dist/es/plugin-audio/statics/styles/audio-scss.js +21 -21
- package/dist/es/plugin-audio/statics/styles/audio-scss.js.map +1 -1
- package/dist/es/plugin-audio/statics/styles/icon-button-scss.js +1 -1
- package/dist/es/plugin-audio/statics/styles/icon-button-scss.js.map +1 -1
- package/dist/es/plugin-audio/statics/styles/settings-modal-scss.js +3 -3
- package/dist/es/plugin-audio/statics/styles/settings-modal-scss.js.map +1 -1
- package/dist/es/plugin-audio/statics/styles/sound-control-scss.js +2 -2
- package/dist/es/plugin-audio/statics/styles/sound-control-scss.js.map +1 -1
- package/dist/es/plugin-audio/viewer-styles-inject.js +4 -4
- package/dist/es/plugin-block-drag-handle/box-select.js +1 -0
- package/dist/es/plugin-block-drag-handle/box-select.js.map +2 -2
- package/dist/es/plugin-block-drag-handle/dom.js +20 -8
- package/dist/es/plugin-block-drag-handle/dom.js.map +2 -2
- package/dist/es/plugin-block-drag-handle/plugin.js +37 -5
- package/dist/es/plugin-block-drag-handle/plugin.js.map +2 -2
- package/dist/es/plugin-block-drag-handle/styles-scss.js +10 -10
- package/dist/es/plugin-block-drag-handle/styles-scss.js.map +1 -1
- package/dist/es/plugin-button/statics/styles/button-input-modal-scss.js +4 -4
- package/dist/es/plugin-button/statics/styles/button-input-modal-scss.js.map +1 -1
- package/dist/es/plugin-button/statics/styles/button-text-field-scss.js +3 -3
- package/dist/es/plugin-button/statics/styles/button-text-field-scss.js.map +1 -1
- package/dist/es/plugin-button/statics/styles/default-styles-scss.js +5 -5
- package/dist/es/plugin-button/statics/styles/default-styles-scss.js.map +1 -1
- package/dist/es/plugin-button/viewer-styles-inject.js +2 -2
- package/dist/es/plugin-card/card-node-view.js +39 -35
- package/dist/es/plugin-card/card-node-view.js.map +2 -2
- package/dist/es/plugin-card/card-scss.js +20 -19
- package/dist/es/plugin-card/card-scss.js.map +2 -2
- package/dist/es/plugin-card/card-viewer-scss.js +6 -6
- package/dist/es/plugin-card/card-viewer-scss.js.map +1 -1
- package/dist/es/plugin-card/extension.js +3 -1
- package/dist/es/plugin-card/extension.js.map +2 -2
- package/dist/es/plugin-card/index.js.map +1 -1
- package/dist/es/plugin-card/page-gap.js +3 -1
- package/dist/es/plugin-card/page-gap.js.map +2 -2
- package/dist/es/plugin-card/viewer-styles-inject.js +2 -2
- package/dist/es/plugin-code-block/statics/styles/code-block-scss.js +8 -8
- package/dist/es/plugin-code-block/statics/styles/code-block-scss.js.map +1 -1
- package/dist/es/plugin-collapsible-list/statics/styles/collapsible-list-component-scss.js +6 -6
- package/dist/es/plugin-collapsible-list/statics/styles/collapsible-list-component-scss.js.map +1 -1
- package/dist/es/plugin-collapsible-list/statics/styles/collapsible-list-pair-scss.js +18 -18
- package/dist/es/plugin-collapsible-list/statics/styles/collapsible-list-pair-scss.js.map +1 -1
- package/dist/es/plugin-collapsible-list/statics/styles/collapsible-list-settings-scss.js +4 -4
- package/dist/es/plugin-collapsible-list/statics/styles/collapsible-list-settings-scss.js.map +1 -1
- package/dist/es/plugin-collapsible-list/statics/styles/new-pair-button-scss.js +5 -5
- package/dist/es/plugin-collapsible-list/statics/styles/new-pair-button-scss.js.map +1 -1
- package/dist/es/plugin-collapsible-list/viewer-styles-inject.js +2 -2
- package/dist/es/plugin-divider/statics/styles/divider-viewer-scss.js +13 -13
- package/dist/es/plugin-divider/statics/styles/divider-viewer-scss.js.map +1 -1
- package/dist/es/plugin-divider/toolbar/modals/divider-design-panel-scss.js +3 -3
- package/dist/es/plugin-divider/toolbar/modals/divider-design-panel-scss.js.map +1 -1
- package/dist/es/plugin-divider/viewer-styles-inject.js +2 -2
- package/dist/es/plugin-emoji/modals/emoji-suggestions-modal-scss.js +3 -3
- package/dist/es/plugin-emoji/modals/emoji-suggestions-modal-scss.js.map +1 -1
- package/dist/es/plugin-figure/tiptap/caption-scss.js +5 -5
- package/dist/es/plugin-figure/tiptap/caption-scss.js.map +1 -1
- package/dist/es/plugin-figure/tiptap/figure-scss.js +5 -5
- package/dist/es/plugin-figure/tiptap/figure-scss.js.map +1 -1
- package/dist/es/plugin-file-upload/statics/styles/file-upload-viewer-scss.js +15 -15
- package/dist/es/plugin-file-upload/statics/styles/file-upload-viewer-scss.js.map +1 -1
- package/dist/es/plugin-file-upload/viewer-styles-inject.js +2 -2
- package/dist/es/plugin-gallery/modals/settings/gallery-settings-modal-scss.js +5 -5
- package/dist/es/plugin-gallery/modals/settings/gallery-settings-modal-scss.js.map +1 -1
- package/dist/es/plugin-gallery/modals/settings/layout-settings/layout-controls-section/image-ratio-control-scss.js +8 -8
- package/dist/es/plugin-gallery/modals/settings/layout-settings/layout-controls-section/image-ratio-control-scss.js.map +1 -1
- package/dist/es/plugin-gallery/modals/settings/layout-settings/layout-controls-section/thumbnail-alignment-control-scss.js +7 -7
- package/dist/es/plugin-gallery/modals/settings/layout-settings/layout-controls-section/thumbnail-alignment-control-scss.js.map +1 -1
- package/dist/es/plugin-gallery/modals/settings/media-settings/media-list/sortable-item-scss.js +3 -3
- package/dist/es/plugin-gallery/modals/settings/media-settings/media-list/sortable-item-scss.js.map +1 -1
- package/dist/es/plugin-gallery/modals/settings/media-settings/media-list/sortable-list-scss.js +5 -5
- package/dist/es/plugin-gallery/modals/settings/media-settings/media-list/sortable-list-scss.js.map +1 -1
- package/dist/es/plugin-gallery/statics/styles/gallery-component-scss.js +3 -3
- package/dist/es/plugin-gallery/statics/styles/gallery-component-scss.js.map +1 -1
- package/dist/es/plugin-gallery/statics/styles/gallery-media-scss.js +21 -21
- package/dist/es/plugin-gallery/statics/styles/gallery-media-scss.js.map +1 -1
- package/dist/es/plugin-gallery/statics/styles/viewer-scss.js +1 -1
- package/dist/es/plugin-gallery/statics/styles/viewer-scss.js.map +1 -1
- package/dist/es/plugin-gallery/viewer/layout-collage-scss.js +5 -5
- package/dist/es/plugin-gallery/viewer/layout-collage-scss.js.map +1 -1
- package/dist/es/plugin-gallery/viewer/layout-column-scss.js +4 -4
- package/dist/es/plugin-gallery/viewer/layout-column-scss.js.map +1 -1
- package/dist/es/plugin-gallery/viewer/layout-fullsize-scss.js +4 -4
- package/dist/es/plugin-gallery/viewer/layout-fullsize-scss.js.map +1 -1
- package/dist/es/plugin-gallery/viewer/layout-grid-scss.js +2 -2
- package/dist/es/plugin-gallery/viewer/layout-grid-scss.js.map +1 -1
- package/dist/es/plugin-gallery/viewer/layout-masonry-scss.js +7 -7
- package/dist/es/plugin-gallery/viewer/layout-masonry-scss.js.map +1 -1
- package/dist/es/plugin-gallery/viewer/layout-panorama-scss.js +1 -1
- package/dist/es/plugin-gallery/viewer/layout-panorama-scss.js.map +1 -1
- package/dist/es/plugin-gallery/viewer/layout-slider-scss.js +6 -6
- package/dist/es/plugin-gallery/viewer/layout-slider-scss.js.map +1 -1
- package/dist/es/plugin-gallery/viewer/layout-thumbnail-scss.js +11 -11
- package/dist/es/plugin-gallery/viewer/layout-thumbnail-scss.js.map +1 -1
- package/dist/es/plugin-gallery/viewer-styles-inject.js +2 -2
- package/dist/es/plugin-giphy/components/giphy-selector-scss.js +11 -11
- package/dist/es/plugin-giphy/components/giphy-selector-scss.js.map +1 -1
- package/dist/es/plugin-giphy/viewer/giphy-viewer-scss.js +4 -4
- package/dist/es/plugin-giphy/viewer/giphy-viewer-scss.js.map +1 -1
- package/dist/es/plugin-giphy/viewer/play-icon-scss.js +2 -2
- package/dist/es/plugin-giphy/viewer/play-icon-scss.js.map +1 -1
- package/dist/es/plugin-giphy/viewer-styles-inject.js +2 -2
- package/dist/es/plugin-hashtag/statics/hashtag-scss.js +2 -2
- package/dist/es/plugin-hashtag/statics/hashtag-scss.js.map +1 -1
- package/dist/es/plugin-hashtag/viewer-styles-inject.js +2 -2
- package/dist/es/plugin-headings/dropdown/headings-dropdown-scss.js +9 -9
- package/dist/es/plugin-headings/dropdown/headings-dropdown-scss.js.map +1 -1
- package/dist/es/plugin-html/statics/styles/HtmlComponent-scss.js +2 -2
- package/dist/es/plugin-html/statics/styles/HtmlComponent-scss.js.map +1 -1
- package/dist/es/plugin-html/statics/styles/Iframe-scss.js +1 -1
- package/dist/es/plugin-html/statics/styles/Iframe-scss.js.map +1 -1
- package/dist/es/plugin-html/tiptap/ai-widget-scss.js +4 -4
- package/dist/es/plugin-html/tiptap/ai-widget-scss.js.map +1 -1
- package/dist/es/plugin-html/tiptap/loader-scss.js +11 -11
- package/dist/es/plugin-html/tiptap/loader-scss.js.map +1 -1
- package/dist/es/plugin-html/tiptap/preset-bar/preset-bar-scss.js +4 -4
- package/dist/es/plugin-html/tiptap/preset-bar/preset-bar-scss.js.map +1 -1
- package/dist/es/plugin-html/viewer-styles-inject.js +2 -2
- package/dist/es/plugin-image/components/corner-radius-handles-scss.js +6 -6
- package/dist/es/plugin-image/components/corner-radius-handles-scss.js.map +1 -1
- package/dist/es/plugin-image/components/crop-edge-handles-scss.js +3 -3
- package/dist/es/plugin-image/components/crop-edge-handles-scss.js.map +1 -1
- package/dist/es/plugin-image/crop-overlay/crop-overlay-scss.js +16 -16
- package/dist/es/plugin-image/crop-overlay/crop-overlay-scss.js.map +1 -1
- package/dist/es/plugin-image/statics/styles/image-viewer-scss.js +20 -20
- package/dist/es/plugin-image/statics/styles/image-viewer-scss.js.map +1 -1
- package/dist/es/plugin-image/statics/styles/settings-modal-scss.js +3 -3
- package/dist/es/plugin-image/statics/styles/settings-modal-scss.js.map +1 -1
- package/dist/es/plugin-image/toolbar/shape-crop-modal-scss.js +6 -6
- package/dist/es/plugin-image/toolbar/shape-crop-modal-scss.js.map +1 -1
- package/dist/es/plugin-image/viewer-styles-inject.js +2 -2
- package/dist/es/plugin-inline-ai/ai-selection-tooltip-scss.js +12 -12
- package/dist/es/plugin-inline-ai/ai-selection-tooltip-scss.js.map +1 -1
- package/dist/es/plugin-inline-ai/aria-avatar-row-scss.js +3 -3
- package/dist/es/plugin-inline-ai/aria-avatar-row-scss.js.map +1 -1
- package/dist/es/plugin-inline-ai/aria-surface-row-scss.js +6 -6
- package/dist/es/plugin-inline-ai/aria-surface-row-scss.js.map +1 -1
- package/dist/es/plugin-inline-ai/html-placeholder-scss.js +5 -5
- package/dist/es/plugin-inline-ai/html-placeholder-scss.js.map +1 -1
- package/dist/es/plugin-inline-ai/modal-scss.js +11 -11
- package/dist/es/plugin-inline-ai/modal-scss.js.map +1 -1
- package/dist/es/plugin-inline-ai/pending-widget-placeholder-scss.js +14 -14
- package/dist/es/plugin-inline-ai/pending-widget-placeholder-scss.js.map +1 -1
- package/dist/es/plugin-inline-ai/spinner-scss.js +4 -4
- package/dist/es/plugin-inline-ai/spinner-scss.js.map +1 -1
- package/dist/es/plugin-inline-ai/toolbar/toolbar-button-scss.js +4 -4
- package/dist/es/plugin-inline-ai/toolbar/toolbar-button-scss.js.map +1 -1
- package/dist/es/plugin-line-spacing/custom-spacing-editor-modal/custom-spacing-editor-modal-scss.js +3 -3
- package/dist/es/plugin-line-spacing/custom-spacing-editor-modal/custom-spacing-editor-modal-scss.js.map +1 -1
- package/dist/es/plugin-link/editor.js +2 -2
- package/dist/es/plugin-link/editor.js.map +2 -2
- package/dist/es/plugin-link/statics/link-viewer-scss.js +4 -4
- package/dist/es/plugin-link/statics/link-viewer-scss.js.map +1 -1
- package/dist/es/plugin-link/toolbar/anchor-link-button-scss.js +3 -3
- package/dist/es/plugin-link/toolbar/anchor-link-button-scss.js.map +1 -1
- package/dist/es/plugin-link/viewer-styles-inject.js +2 -2
- package/dist/es/plugin-link-preview/statics/styles/insert-modal-scss.js +3 -3
- package/dist/es/plugin-link-preview/statics/styles/insert-modal-scss.js.map +1 -1
- package/dist/es/plugin-link-preview/statics/styles/link-preview-scss.js +18 -18
- package/dist/es/plugin-link-preview/statics/styles/link-preview-scss.js.map +1 -1
- package/dist/es/plugin-link-preview/statics/styles/settings-modal-scss.js +3 -3
- package/dist/es/plugin-link-preview/statics/styles/settings-modal-scss.js.map +1 -1
- package/dist/es/plugin-link-preview/viewer-styles-inject.js +3 -3
- package/dist/es/plugin-mentions/statics/mention-list-scss.js +6 -6
- package/dist/es/plugin-mentions/statics/mention-list-scss.js.map +1 -1
- package/dist/es/plugin-mentions/statics/mentions-scss.js +4 -4
- package/dist/es/plugin-mentions/statics/mentions-scss.js.map +1 -1
- package/dist/es/plugin-mentions/viewer-styles-inject.js +2 -2
- package/dist/es/plugin-paywall/paywall-fallback-scss.js +1 -1
- package/dist/es/plugin-paywall/paywall-fallback-scss.js.map +1 -1
- package/dist/es/plugin-paywall/plugin-paywall.js.map +2 -2
- package/dist/es/plugin-smart-block/components/cell-accessory-scss.js +22 -22
- package/dist/es/plugin-smart-block/components/cell-accessory-scss.js.map +1 -1
- package/dist/es/plugin-smart-block/components/cell-quote-glyph-scss.js +3 -3
- package/dist/es/plugin-smart-block/components/cell-quote-glyph-scss.js.map +1 -1
- package/dist/es/plugin-smart-block/components/cell-star-rating-scss.js +4 -4
- package/dist/es/plugin-smart-block/components/cell-star-rating-scss.js.map +1 -1
- package/dist/es/plugin-smart-block/components/cell-stat-scss.js +20 -20
- package/dist/es/plugin-smart-block/components/cell-stat-scss.js.map +1 -1
- package/dist/es/plugin-smart-block/components/circle-donut-scss.js +7 -7
- package/dist/es/plugin-smart-block/components/circle-donut-scss.js.map +1 -1
- package/dist/es/plugin-smart-block/components/shape-overlay-scss.js +3 -3
- package/dist/es/plugin-smart-block/components/shape-overlay-scss.js.map +1 -1
- package/dist/es/plugin-smart-block/components/smart-block-view-scss.js +50 -50
- package/dist/es/plugin-smart-block/components/smart-block-view-scss.js.map +1 -1
- package/dist/es/plugin-smart-block/components/stars-scss.js +8 -8
- package/dist/es/plugin-smart-block/components/stars-scss.js.map +1 -1
- package/dist/es/plugin-smart-block/modals/variant-picker-scss.js +9 -9
- package/dist/es/plugin-smart-block/modals/variant-picker-scss.js.map +1 -1
- package/dist/es/plugin-smart-block/tiptap/smart-block-editor-scss.js +15 -15
- package/dist/es/plugin-smart-block/tiptap/smart-block-editor-scss.js.map +1 -1
- package/dist/es/plugin-smart-block/viewer-styles-inject.js +2 -2
- package/dist/es/plugin-social-polls/components/image-upload/image-upload-scss.js +9 -9
- package/dist/es/plugin-social-polls/components/image-upload/image-upload-scss.js.map +1 -1
- package/dist/es/plugin-social-polls/components/insert-modal/insert-modal-scss.js +3 -3
- package/dist/es/plugin-social-polls/components/insert-modal/insert-modal-scss.js.map +1 -1
- package/dist/es/plugin-social-polls/components/poll-header/poll-header-scss.js +3 -3
- package/dist/es/plugin-social-polls/components/poll-header/poll-header-scss.js.map +1 -1
- package/dist/es/plugin-social-polls/components/poll-option/option-scss.js +23 -23
- package/dist/es/plugin-social-polls/components/poll-option/option-scss.js.map +1 -1
- package/dist/es/plugin-social-polls/components/poll-option/webview/option-webview-scss.js +24 -24
- package/dist/es/plugin-social-polls/components/poll-option/webview/option-webview-scss.js.map +1 -1
- package/dist/es/plugin-social-polls/components/poll-scss.js +19 -19
- package/dist/es/plugin-social-polls/components/poll-scss.js.map +1 -1
- package/dist/es/plugin-social-polls/components/settings-modal/settings-modal-scss.js +4 -4
- package/dist/es/plugin-social-polls/components/settings-modal/settings-modal-scss.js.map +1 -1
- package/dist/es/plugin-social-polls/components/text-field/text-field-scss.js +12 -12
- package/dist/es/plugin-social-polls/components/text-field/text-field-scss.js.map +1 -1
- package/dist/es/plugin-social-polls/components/voted-users/voted-users-scss.js +20 -20
- package/dist/es/plugin-social-polls/components/voted-users/voted-users-scss.js.map +1 -1
- package/dist/es/plugin-social-polls/viewer-styles-inject.js +2 -2
- package/dist/es/plugin-spoiler/get-text-buttons.js +2 -2
- package/dist/es/plugin-spoiler/get-text-buttons.js.map +2 -2
- package/dist/es/plugin-spoiler/statics/styles/spoiler-scss.js +18 -18
- package/dist/es/plugin-spoiler/statics/styles/spoiler-scss.js.map +1 -1
- package/dist/es/plugin-spoiler/viewer-styles-inject.js +2 -2
- package/dist/es/plugin-table/modals/table-grid-selector-scss.js +7 -7
- package/dist/es/plugin-table/modals/table-grid-selector-scss.js.map +1 -1
- package/dist/es/plugin-table/statics/styles/cell-scss.js +15 -15
- package/dist/es/plugin-table/statics/styles/cell-scss.js.map +1 -1
- package/dist/es/plugin-table/statics/styles/resizer-scss.js +20 -20
- package/dist/es/plugin-table/statics/styles/resizer-scss.js.map +1 -1
- package/dist/es/plugin-table/statics/styles/table-settings-modal-scss.js +3 -3
- package/dist/es/plugin-table/statics/styles/table-settings-modal-scss.js.map +1 -1
- package/dist/es/plugin-table/statics/styles/table-viewer-scss.js +6 -6
- package/dist/es/plugin-table/statics/styles/table-viewer-scss.js.map +1 -1
- package/dist/es/plugin-table/tiptap/decorations/tableHandles-scss.js +11 -11
- package/dist/es/plugin-table/tiptap/decorations/tableHandles-scss.js.map +1 -1
- package/dist/es/plugin-table/tiptap/plugins/table-scss.js +35 -35
- package/dist/es/plugin-table/tiptap/plugins/table-scss.js.map +1 -1
- package/dist/es/plugin-table/toolbar/modals/border-scope-selector-scss.js +4 -4
- package/dist/es/plugin-table/toolbar/modals/border-scope-selector-scss.js.map +1 -1
- package/dist/es/plugin-table/viewer-styles-inject.js +4 -4
- package/dist/es/plugin-text-color/sketch/text-highlight-button.js +2 -2
- package/dist/es/plugin-text-color/sketch/text-highlight-button.js.map +2 -2
- package/dist/es/plugin-text-color/text-button-color-scss.js +4 -4
- package/dist/es/plugin-text-color/text-button-color-scss.js.map +1 -1
- package/dist/es/plugin-toc/toc-view-scss.js +2 -2
- package/dist/es/plugin-toc/toc-view-scss.js.map +1 -1
- package/dist/es/plugin-toc/viewer-styles-inject.js +2 -2
- package/dist/es/plugin-vertical-embed/components/Ribbon-scss.js +3 -3
- package/dist/es/plugin-vertical-embed/components/Ribbon-scss.js.map +1 -1
- package/dist/es/plugin-vertical-embed/components/card-content-scss.js +23 -23
- package/dist/es/plugin-vertical-embed/components/card-content-scss.js.map +1 -1
- package/dist/es/plugin-vertical-embed/components/card-scss.js +19 -19
- package/dist/es/plugin-vertical-embed/components/card-scss.js.map +1 -1
- package/dist/es/plugin-vertical-embed/components/description-scss.js +2 -2
- package/dist/es/plugin-vertical-embed/components/description-scss.js.map +1 -1
- package/dist/es/plugin-vertical-embed/modals/settings-modal-scss.js +4 -4
- package/dist/es/plugin-vertical-embed/modals/settings-modal-scss.js.map +1 -1
- package/dist/es/plugin-vertical-embed/tiptap/component-scss.js +12 -12
- package/dist/es/plugin-vertical-embed/tiptap/component-scss.js.map +1 -1
- package/dist/es/plugin-vertical-embed/toolbar/items-list-scss.js +3 -3
- package/dist/es/plugin-vertical-embed/toolbar/items-list-scss.js.map +1 -1
- package/dist/es/plugin-vertical-embed/viewer/vertical-embed-viewer-scss.js +6 -6
- package/dist/es/plugin-vertical-embed/viewer/vertical-embed-viewer-scss.js.map +1 -1
- package/dist/es/plugin-vertical-embed/viewer-styles-inject.js +3 -3
- package/dist/es/plugin-video/statics/styles/default-video-styles-scss.js +10 -10
- package/dist/es/plugin-video/statics/styles/default-video-styles-scss.js.map +1 -1
- package/dist/es/plugin-video/statics/styles/video-viewer-scss.js +3 -3
- package/dist/es/plugin-video/statics/styles/video-viewer-scss.js.map +1 -1
- package/dist/es/plugin-video/toolbar/embed-video-scss.js +3 -3
- package/dist/es/plugin-video/toolbar/embed-video-scss.js.map +1 -1
- package/dist/es/plugin-video/viewer/video.js +30 -2
- package/dist/es/plugin-video/viewer/video.js.map +2 -2
- package/dist/es/plugin-video/viewer-styles-inject.js +2 -2
- package/dist/es/ricos-common-plugins/bold/extension.js +1 -2
- package/dist/es/ricos-common-plugins/bold/extension.js.map +2 -2
- package/dist/es/ricos-common-plugins/decoration-plugins/list-item-sizing.js +13 -1
- package/dist/es/ricos-common-plugins/decoration-plugins/list-item-sizing.js.map +2 -2
- package/dist/es/ricos-common-plugins/font-size/block-font-size-plugin.js +2 -1
- package/dist/es/ricos-common-plugins/font-size/block-font-size-plugin.js.map +2 -2
- package/dist/es/ricos-common-plugins/font-size/dropdown/font-size-dropdown-scss.js +3 -3
- package/dist/es/ricos-common-plugins/font-size/dropdown/font-size-dropdown-scss.js.map +1 -1
- package/dist/es/ricos-common-plugins/gap-spacer/gap-spacer-component/gap-spacer-styles-scss.js +10 -10
- package/dist/es/ricos-common-plugins/gap-spacer/gap-spacer-component/gap-spacer-styles-scss.js.map +1 -1
- package/dist/es/ricos-common-plugins/layout/layouts-scss.js +35 -35
- package/dist/es/ricos-common-plugins/layout/layouts-scss.js.map +1 -1
- package/dist/es/ricos-common-plugins/layout/paywall-toolbar-button.js +74 -0
- package/dist/es/ricos-common-plugins/layout/paywall-toolbar-button.js.map +7 -0
- package/dist/es/ricos-common-plugins/layout/plugin-layout.js +178 -173
- package/dist/es/ricos-common-plugins/layout/plugin-layout.js.map +2 -2
- package/dist/es/ricos-common-plugins/layout/section-dividers/section-dividers-panel-scss.js +4 -4
- package/dist/es/ricos-common-plugins/layout/section-dividers/section-dividers-panel-scss.js.map +1 -1
- package/dist/es/ricos-common-plugins/layout/section-dividers/section-dividers-scss.js +6 -6
- package/dist/es/ricos-common-plugins/layout/section-dividers/section-dividers-scss.js.map +1 -1
- package/dist/es/ricos-common-plugins/list-item/extension.js +9 -0
- package/dist/es/ricos-common-plugins/list-item/extension.js.map +2 -2
- package/dist/es/ricos-common-plugins/list-item/list-converters.js +5 -3
- package/dist/es/ricos-common-plugins/list-item/list-converters.js.map +2 -2
- package/dist/es/ricos-common-plugins/list-item/list-marker-selection.js +274 -0
- package/dist/es/ricos-common-plugins/list-item/list-marker-selection.js.map +7 -0
- package/dist/es/ricos-common-plugins/quick-actions/modal/modal-scss.js +4 -4
- package/dist/es/ricos-common-plugins/quick-actions/modal/modal-scss.js.map +1 -1
- package/dist/es/ricos-common-plugins/statics/styles-scss.js +20 -20
- package/dist/es/ricos-common-plugins/statics/styles-scss.js.map +1 -1
- package/dist/es/ricos-common-plugins/strikethrough/strikethrough.js +2 -2
- package/dist/es/ricos-common-plugins/strikethrough/strikethrough.js.map +2 -2
- package/dist/es/ricos-common-plugins/strikethrough/strikethrough.testkit.js +1 -0
- package/dist/es/ricos-common-plugins/strikethrough/strikethrough.testkit.js.map +2 -2
- package/dist/es/ricos-common-plugins/title/headings-scss.js +10 -10
- package/dist/es/ricos-common-plugins/title/headings-scss.js.map +1 -1
- package/dist/es/ricos-common-plugins/underline/underline.js +2 -2
- package/dist/es/ricos-common-plugins/underline/underline.js.map +2 -2
- package/dist/es/ricos-editor/statics/styles/editor-styles-scss.js +11 -11
- package/dist/es/ricos-editor/statics/styles/editor-styles-scss.js.map +1 -1
- package/dist/es/ricos-modals/statics/styles/drawer-scss.js +11 -11
- package/dist/es/ricos-modals/statics/styles/drawer-scss.js.map +1 -1
- package/dist/es/ricos-modals/statics/styles/fullscreen-scss.js +3 -3
- package/dist/es/ricos-modals/statics/styles/fullscreen-scss.js.map +1 -1
- package/dist/es/ricos-modals/statics/styles/popper-scss.js +5 -5
- package/dist/es/ricos-modals/statics/styles/popper-scss.js.map +1 -1
- package/dist/es/ricos-schema/next-schema/version.js +1 -1
- package/dist/es/ricos-schema/next-schema/version.js.map +1 -1
- package/dist/es/ricos-styles/statics/styles/style-presets-scss.js +8 -8
- package/dist/es/ricos-styles/statics/styles/style-presets-scss.js.map +1 -1
- package/dist/es/ricos-viewer-next/ContentViewer/rericos/renderers/blockquote/blockquote-scss.js +3 -3
- package/dist/es/ricos-viewer-next/ContentViewer/rericos/renderers/blockquote/blockquote-scss.js.map +1 -1
- package/dist/es/ricos-viewer-next/ContentViewer/rericos/renderers/codeblock/codeblock-scss.js +3 -3
- package/dist/es/ricos-viewer-next/ContentViewer/rericos/renderers/codeblock/codeblock-scss.js.map +1 -1
- package/dist/es/ricos-viewer-next/ContentViewer/rericos/renderers/heading/heading-scss.js +9 -9
- package/dist/es/ricos-viewer-next/ContentViewer/rericos/renderers/heading/heading-scss.js.map +1 -1
- package/dist/es/ricos-viewer-next/ContentViewer/rericos/renderers/layout/layout-scss.js +10 -10
- package/dist/es/ricos-viewer-next/ContentViewer/rericos/renderers/layout/layout-scss.js.map +1 -1
- package/dist/es/ricos-viewer-next/ContentViewer/rericos/renderers/lists/list-item.js +10 -1
- package/dist/es/ricos-viewer-next/ContentViewer/rericos/renderers/lists/list-item.js.map +2 -2
- package/dist/es/ricos-viewer-next/ContentViewer/rericos/renderers/lists/lists-scss.js +6 -6
- package/dist/es/ricos-viewer-next/ContentViewer/rericos/renderers/lists/lists-scss.js.map +1 -1
- package/dist/es/ricos-viewer-next/ContentViewer/rericos/renderers/paragraph/paragraph-scss.js +4 -4
- package/dist/es/ricos-viewer-next/ContentViewer/rericos/renderers/paragraph/paragraph-scss.js.map +1 -1
- package/dist/es/ricos-viewer-next/ContentViewer/rericos/renderers/plugins/link-viewer-wrapper-scss.js +2 -2
- package/dist/es/ricos-viewer-next/ContentViewer/rericos/renderers/plugins/link-viewer-wrapper-scss.js.map +1 -1
- package/dist/es/ricos-viewer-next/ContentViewer/rericos/renderers/plugins/plugin-scss.js +15 -15
- package/dist/es/ricos-viewer-next/ContentViewer/rericos/renderers/plugins/plugin-scss.js.map +1 -1
- package/dist/es/ricos-viewer-next/modals/fullscreen/fullscreen-scss.js +14 -14
- package/dist/es/ricos-viewer-next/modals/fullscreen/fullscreen-scss.js.map +1 -1
- package/dist/es/ricos-viewer-next/statics/alignment-scss.js +16 -16
- package/dist/es/ricos-viewer-next/statics/alignment-scss.js.map +1 -1
- package/dist/es/ricos-viewer-next/statics/indentation-scss.js +7 -7
- package/dist/es/ricos-viewer-next/statics/indentation-scss.js.map +1 -1
- package/dist/es/ricos-viewer-next/statics/rich-content-viewer-scss.js +9 -9
- package/dist/es/ricos-viewer-next/statics/rich-content-viewer-scss.js.map +1 -1
- package/dist/es/ricos-viewer-next/statics/rtl-scss.js +2 -2
- package/dist/es/ricos-viewer-next/statics/rtl-scss.js.map +1 -1
- package/dist/es/text-selection-toolbar/statics/styles/viewer-inline-toolbar-scss.js +4 -4
- package/dist/es/text-selection-toolbar/statics/styles/viewer-inline-toolbar-scss.js.map +1 -1
- package/dist/es/tiptap/core/editor.js +5 -2
- package/dist/es/tiptap/core/editor.js.map +2 -2
- package/dist/es/tiptap-editor/statics/styles/tiptap-editor-styles-scss.js +15 -15
- package/dist/es/tiptap-editor/statics/styles/tiptap-editor-styles-scss.js.map +1 -1
- package/dist/es/tiptap-extensions/placeholder-scss.js +3 -3
- package/dist/es/tiptap-extensions/placeholder-scss.js.map +1 -1
- package/dist/es/tiptap-extensions/statics/styles-scss.js +6 -6
- package/dist/es/tiptap-extensions/statics/styles-scss.js.map +1 -1
- package/dist/es/toolbars-v3/components/InsertPluginToolbar/insert-plugin-toolbar-scss.js +3 -3
- package/dist/es/toolbars-v3/components/InsertPluginToolbar/insert-plugin-toolbar-scss.js.map +1 -1
- package/dist/es/toolbars-v3/components/MaxWidthCalculationWrapper/max-width-calculation-wrapper.js +2 -1
- package/dist/es/toolbars-v3/components/MaxWidthCalculationWrapper/max-width-calculation-wrapper.js.map +2 -2
- package/dist/es/toolbars-v3/components/Toolbar/RicosDesktopToolbar/OverflownButtons-scss.js +5 -5
- package/dist/es/toolbars-v3/components/Toolbar/RicosDesktopToolbar/OverflownButtons-scss.js.map +1 -1
- package/dist/es/toolbars-v3/components/Toolbar/RicosDesktopToolbar/RicosDesktopToolbar-scss.js +5 -5
- package/dist/es/toolbars-v3/components/Toolbar/RicosDesktopToolbar/RicosDesktopToolbar-scss.js.map +1 -1
- package/dist/es/toolbars-v3/components/Toolbar/RicosDesktopToolbar/RicosDesktopToolbarWrapper-scss.js +6 -6
- package/dist/es/toolbars-v3/components/Toolbar/RicosDesktopToolbar/RicosDesktopToolbarWrapper-scss.js.map +1 -1
- package/dist/es/toolbars-v3/components/Toolbar/RicosMobileToolbar/RicosMobileToolbar-scss.js +11 -11
- package/dist/es/toolbars-v3/components/Toolbar/RicosMobileToolbar/RicosMobileToolbar-scss.js.map +1 -1
- package/dist/es/toolbars-v3/components/Toolbar/RicosMobileToolbar/mobile-toolbar-overlay/mobile-toolbar-overlay-scss.js +3 -3
- package/dist/es/toolbars-v3/components/Toolbar/RicosMobileToolbar/mobile-toolbar-overlay/mobile-toolbar-overlay-scss.js.map +1 -1
- package/dist/es/toolbars-v3/components/buttons/AddPluginMenuButtons/AddPluginMenuMobileButton-scss.js +5 -5
- package/dist/es/toolbars-v3/components/buttons/AddPluginMenuButtons/AddPluginMenuMobileButton-scss.js.map +1 -1
- package/dist/es/toolbars-v3/components/buttons/FontSizeButton/FontSizeButton-scss.js +7 -7
- package/dist/es/toolbars-v3/components/buttons/FontSizeButton/FontSizeButton-scss.js.map +1 -1
- package/dist/es/toolbars-v3/modals/FloatingPluginMenu/styles/floating-add-plugin-menu-scss.js +8 -8
- package/dist/es/toolbars-v3/modals/FloatingPluginMenu/styles/floating-add-plugin-menu-scss.js.map +1 -1
- package/dist/es/toolbars-v3/ricos-toolbars/footer/FooterToolbar-scss.js +3 -3
- package/dist/es/toolbars-v3/ricos-toolbars/footer/FooterToolbar-scss.js.map +1 -1
- package/dist/es/toolbars-v3/ricos-toolbars/formatting/use-is-visible.js +4 -0
- package/dist/es/toolbars-v3/ricos-toolbars/formatting/use-is-visible.js.map +2 -2
- package/dist/es/ui-components/Components/Image-scss.js +3 -3
- package/dist/es/ui-components/Components/Image-scss.js.map +1 -1
- package/dist/es/ui-components/Components/double-loader-scss.js +6 -6
- package/dist/es/ui-components/Components/double-loader-scss.js.map +1 -1
- package/dist/es/ui-components/color-picker/button-color-swatches/button-color-swatches-scss.js +4 -4
- package/dist/es/ui-components/color-picker/button-color-swatches/button-color-swatches-scss.js.map +1 -1
- package/dist/es/ui-components/color-picker/new-color-picker/components/gradient-picker/gradient-picker-scss.js +15 -15
- package/dist/es/ui-components/color-picker/new-color-picker/components/gradient-picker/gradient-picker-scss.js.map +1 -1
- package/dist/es/ui-components/color-picker/new-color-picker/components/new-color-swatches/new-color-swatches-scss.js +3 -3
- package/dist/es/ui-components/color-picker/new-color-picker/components/new-color-swatches/new-color-swatches-scss.js.map +1 -1
- package/dist/es/ui-components/color-picker/new-color-picker/components/simple-color-picker/simple-color-picker-scss.js +4 -4
- package/dist/es/ui-components/color-picker/new-color-picker/components/simple-color-picker/simple-color-picker-scss.js.map +1 -1
- package/dist/es/ui-components/color-picker/new-color-picker/components/single-color-swatch/single-color-swatch-scss.js +4 -4
- package/dist/es/ui-components/color-picker/new-color-picker/components/single-color-swatch/single-color-swatch-scss.js.map +1 -1
- package/dist/es/ui-components/color-picker/new-color-picker/new-color-picker-scss.js +3 -3
- package/dist/es/ui-components/color-picker/new-color-picker/new-color-picker-scss.js.map +1 -1
- package/dist/es/ui-components/input-with-slider/input-with-slider-scss.js +3 -3
- package/dist/es/ui-components/input-with-slider/input-with-slider-scss.js.map +1 -1
- package/dist/es/ui-components/layout-background-loader/layout-background-loader-scss.js +5 -5
- package/dist/es/ui-components/layout-background-loader/layout-background-loader-scss.js.map +1 -1
- package/dist/es/ui-components/modal-layout/floating-layout/floating-desktop-layout-scss.js +3 -3
- package/dist/es/ui-components/modal-layout/floating-layout/floating-desktop-layout-scss.js.map +1 -1
- package/dist/es/ui-components/modal-layout/fullscreen-mobile-layout/fullscreen-mobile-layout-scss.js +6 -6
- package/dist/es/ui-components/modal-layout/fullscreen-mobile-layout/fullscreen-mobile-layout-scss.js.map +1 -1
- package/dist/es/ui-components/panel/panel-scss.js +4 -4
- package/dist/es/ui-components/panel/panel-scss.js.map +1 -1
- package/dist/es/ui-components/panel-header/panel-header-scss.js +3 -3
- package/dist/es/ui-components/panel-header/panel-header-scss.js.map +1 -1
- package/dist/es/ui-components/settings-panel-discard-modal/settings-panel-discard-modal-scss.js +3 -3
- package/dist/es/ui-components/settings-panel-discard-modal/settings-panel-discard-modal-scss.js.map +1 -1
- package/dist/es/ui-components/statics/styles/generic-error-scss.js +3 -3
- package/dist/es/ui-components/statics/styles/generic-error-scss.js.map +1 -1
- package/dist/es/ui-components/statics/styles/loaders-scss.js +10 -10
- package/dist/es/ui-components/statics/styles/loaders-scss.js.map +1 -1
- package/dist/es/ui-components/statics/styles/media-item-error-msg-scss.js +5 -5
- package/dist/es/ui-components/statics/styles/media-item-error-msg-scss.js.map +1 -1
- package/dist/es/ui-components/statics/styles/slider-scss.js +9 -9
- package/dist/es/ui-components/statics/styles/slider-scss.js.map +1 -1
- package/dist/es/ui-components/thumbnail-picker/thumbnail-picker-scss.js +3 -3
- package/dist/es/ui-components/thumbnail-picker/thumbnail-picker-scss.js.map +1 -1
- package/dist/es/ui-components/wixel-assistant/assistant-timeline-scss.js +18 -18
- package/dist/es/ui-components/wixel-assistant/assistant-timeline-scss.js.map +1 -1
- package/dist/es/wix-react-player/players/youtube.js +1 -0
- package/dist/es/wix-react-player/players/youtube.js.map +2 -2
- package/dist/es/wix-rich-content-common/statics/styles/fonts-scss.js +3 -3
- package/dist/es/wix-rich-content-common/statics/styles/fonts-scss.js.map +1 -1
- package/dist/es/wix-rich-content-common/statics/styles/general-scss.js +13 -13
- package/dist/es/wix-rich-content-common/statics/styles/general-scss.js.map +1 -1
- package/dist/src/_shared/editor-base-url/editor-base-url-context.d.ts.map +1 -1
- package/dist/src/_shared/font-weight.d.ts +3 -0
- package/dist/src/_shared/font-weight.d.ts.map +1 -0
- package/dist/src/_shared/get-all-plugin-testkits.d.ts +1 -0
- package/dist/src/_shared/get-all-plugin-testkits.d.ts.map +1 -1
- package/dist/src/_shared/get-common-marker-style.d.ts +3 -0
- package/dist/src/_shared/get-common-marker-style.d.ts.map +1 -0
- package/dist/src/_shared/get-common-marker-style.spec.d.ts +2 -0
- package/dist/src/_shared/get-common-marker-style.spec.d.ts.map +1 -0
- package/dist/src/_shared/get-decorations-marker-style.d.ts +4 -0
- package/dist/src/_shared/get-decorations-marker-style.d.ts.map +1 -0
- package/dist/src/_shared/get-decorations-marker-style.spec.d.ts +2 -0
- package/dist/src/_shared/get-decorations-marker-style.spec.d.ts.map +1 -0
- package/dist/src/_shared/get-list-marker-style.d.ts +3 -0
- package/dist/src/_shared/get-list-marker-style.d.ts.map +1 -0
- package/dist/src/_shared/get-list-marker-style.spec.d.ts +2 -0
- package/dist/src/_shared/get-list-marker-style.spec.d.ts.map +1 -0
- package/dist/src/_shared/plugin-toolbar/create-settings-button.d.ts +2 -2
- package/dist/src/_shared/plugin-toolbar/create-settings-button.d.ts.map +1 -1
- package/dist/src/_shared/pm-node-types.d.ts +2 -1
- package/dist/src/_shared/pm-node-types.d.ts.map +1 -1
- package/dist/src/_shared/site-pages/site-pages-fetch-context/use-fetch-site-pages.d.ts +2 -0
- package/dist/src/_shared/site-pages/site-pages-fetch-context/use-fetch-site-pages.d.ts.map +1 -1
- package/dist/src/_shared/site-pages/site-pages-fetch-context/use-fetch-site-pages.spec.d.ts +2 -0
- package/dist/src/_shared/site-pages/site-pages-fetch-context/use-fetch-site-pages.spec.d.ts.map +1 -0
- package/dist/src/_shared/site-pages/site-pages-fetch-context.d.ts.map +1 -1
- package/dist/src/_shared/site-pages/types.d.ts +24 -2
- package/dist/src/_shared/site-pages/types.d.ts.map +1 -1
- package/dist/src/index.d.ts +3 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/internal.d.ts +1 -1
- package/dist/src/internal.d.ts.map +1 -1
- package/dist/src/legacy.d.ts +1 -1
- package/dist/src/legacy.d.ts.map +1 -1
- package/dist/src/plugin-block-drag-handle/box-select.d.ts +1 -0
- package/dist/src/plugin-block-drag-handle/box-select.d.ts.map +1 -1
- package/dist/src/plugin-block-drag-handle/dom.d.ts +1 -0
- package/dist/src/plugin-block-drag-handle/dom.d.ts.map +1 -1
- package/dist/src/plugin-block-drag-handle/plugin.d.ts.map +1 -1
- package/dist/src/plugin-card/card-node-view.d.ts +3 -1
- package/dist/src/plugin-card/card-node-view.d.ts.map +1 -1
- package/dist/src/plugin-card/card-node-view.spec.d.ts +3 -0
- package/dist/src/plugin-card/card-node-view.spec.d.ts.map +1 -0
- package/dist/src/plugin-card/extension.d.ts.map +1 -1
- package/dist/src/plugin-card/index.d.ts +1 -1
- package/dist/src/plugin-card/index.d.ts.map +1 -1
- package/dist/src/plugin-card/page-gap.d.ts +3 -0
- package/dist/src/plugin-card/page-gap.d.ts.map +1 -1
- package/dist/src/plugin-card/types-next.d.ts +12 -0
- package/dist/src/plugin-card/types-next.d.ts.map +1 -1
- package/dist/src/plugin-card/types.d.ts +12 -0
- package/dist/src/plugin-card/types.d.ts.map +1 -1
- package/dist/src/plugin-link/editor.d.ts.map +1 -1
- package/dist/src/plugin-paywall/plugin-paywall.d.ts +27 -0
- package/dist/src/plugin-paywall/plugin-paywall.d.ts.map +1 -1
- package/dist/src/plugin-spoiler/get-text-buttons.d.ts.map +1 -1
- package/dist/src/plugin-text-color/sketch/text-highlight-button.d.ts.map +1 -1
- package/dist/src/plugin-video/viewer/video.d.ts.map +1 -1
- package/dist/src/ricos-common-plugins/bold/extension.d.ts.map +1 -1
- package/dist/src/ricos-common-plugins/decoration-plugins/list-item-sizing.d.ts +9 -7
- package/dist/src/ricos-common-plugins/decoration-plugins/list-item-sizing.d.ts.map +1 -1
- package/dist/src/ricos-common-plugins/font-size/block-font-size-plugin.d.ts.map +1 -1
- package/dist/src/ricos-common-plugins/layout/paywall-toolbar-button.d.ts +6 -0
- package/dist/src/ricos-common-plugins/layout/paywall-toolbar-button.d.ts.map +1 -0
- package/dist/src/ricos-common-plugins/layout/paywall-toolbar-button.spec.d.ts +2 -0
- package/dist/src/ricos-common-plugins/layout/paywall-toolbar-button.spec.d.ts.map +1 -0
- package/dist/src/ricos-common-plugins/layout/plugin-layout.d.ts.map +1 -1
- package/dist/src/ricos-common-plugins/list-item/extension.d.ts.map +1 -1
- package/dist/src/ricos-common-plugins/list-item/list-converters.d.ts.map +1 -1
- package/dist/src/ricos-common-plugins/list-item/list-marker-selection.d.ts +25 -0
- package/dist/src/ricos-common-plugins/list-item/list-marker-selection.d.ts.map +1 -0
- package/dist/src/ricos-common-plugins/list-item/list-marker-selection.spec.d.ts +2 -0
- package/dist/src/ricos-common-plugins/list-item/list-marker-selection.spec.d.ts.map +1 -0
- package/dist/src/ricos-common-plugins/strikethrough/strikethrough.testkit.d.ts +1 -0
- package/dist/src/ricos-common-plugins/strikethrough/strikethrough.testkit.d.ts.map +1 -1
- package/dist/src/ricos-common-plugins/testkit.d.ts +1 -0
- package/dist/src/ricos-common-plugins/testkit.d.ts.map +1 -1
- package/dist/src/ricos-schema/next-schema/version.d.ts +1 -1
- package/dist/src/ricos-styles/tests/test-cases.d.ts +3 -3
- package/dist/src/ricos-types/next/ricos-types.d.ts +1 -1
- package/dist/src/ricos-types/ricos-types.d.ts +1 -1
- package/dist/src/ricos-viewer-next/ContentViewer/rericos/renderers/lists/list-item.d.ts.map +1 -1
- package/dist/src/testkit.d.ts +2 -0
- package/dist/src/testkit.d.ts.map +1 -1
- package/dist/src/tiptap/core/editor.d.ts.map +1 -1
- package/dist/src/toolbars-v3/components/MaxWidthCalculationWrapper/max-width-calculation-wrapper.d.ts.map +1 -1
- package/dist/src/toolbars-v3/components/MaxWidthCalculationWrapper/max-width-calculation-wrapper.spec.d.ts +2 -0
- package/dist/src/toolbars-v3/components/MaxWidthCalculationWrapper/max-width-calculation-wrapper.spec.d.ts.map +1 -0
- package/dist/src/toolbars-v3/ricos-toolbars/formatting/use-is-visible.d.ts.map +1 -1
- package/dist/src/wix-react-player/players/youtube.d.ts +1 -0
- package/dist/src/wix-react-player/players/youtube.d.ts.map +1 -1
- package/generated/public.d.ts +54 -1
- package/package.json +6 -6
- package/dist/cjs/_shared/site-pages/serverless-types/serverless-types.js.map +0 -7
- package/dist/es/_shared/site-pages/serverless-types/serverless-types.js +0 -1
- package/dist/es/_shared/site-pages/serverless-types/serverless-types.js.map +0 -7
- package/dist/src/_shared/site-pages/serverless-types/serverless-types.d.ts +0 -27
- package/dist/src/_shared/site-pages/serverless-types/serverless-types.d.ts.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/plugin-block-drag-handle/dom.ts"],
|
|
4
|
-
"sourcesContent": ["import { TIPTAP_COLLAPSIBLE_LIST_TYPE } from './../ricos-content/index.js';\nimport type { TFunction } from './../ricos-types/index.js';\nimport { dragDropInsertPos } from './../_shared/drag-drop-insert-pos.js';\nimport { getSixDotHandleIcon } from './../_shared/drag-handle-icons.js';\nimport { getContentEdgeElement } from './../_shared/get-content-edge-element.js';\nimport { getElementScale } from './../_shared/get-element-scale.js';\nimport type { EditorView } from './../tiptap/pm/view.js';\n\nimport { getBlockDomRect } from './block-rect.js';\nimport {\n clearDraggingPositions,\n getDraggingPositions,\n setDraggingPositions,\n setHandleDragPreparing,\n} from './drag-state.js';\nimport { buildDragGhost } from './ghost.js';\nimport { getPluginState, setHoveredPos } from './plugin-key.js';\nimport {\n buildDragSliceForPositions,\n computeSelectedPositionsOnClick,\n computeSelectedPositionsOnDragGrab,\n selectBlocks,\n} from './selection.js';\nimport styles from './styles-scss.js';\n\nconst handleCleanups = new WeakMap<HTMLElement, () => void>();\nconst handleMeasures = new WeakMap<HTMLElement, () => void>();\n\nexport const destroyHandleElement = (node: Node): void => {\n if (!(node instanceof HTMLElement)) {\n return;\n }\n handleCleanups.get(node)?.();\n handleCleanups.delete(node);\n handleMeasures.delete(node);\n};\n\n/**\n * Re-measures every mounted grip.\n *\n * A widget's own ResizeObserver only fires when its block changes size, but a block can\n * just as easily be *moved* by something else resizing — expanding a collapsible item\n * pushes every item below it down without any of them resizing. The widget survives such\n * a transaction untouched (its decoration key is the unchanged position), so nothing else\n * would ever recompute its offset.\n */\nexport const remeasureHandleElements = (view: EditorView): void => {\n view.dom\n .querySelectorAll<HTMLElement>('[data-block-drag-handle]')\n .forEach(handle => handleMeasures.get(handle)?.());\n};\n\n// Mirrors prosemirror-view's dragCopies default (alt on Mac, ctrl elsewhere).\n// Uses UACH when available (Chromium); falls back to navigator.platform for Firefox/Safari.\nconst dragMoves = (event: DragEvent): boolean => {\n const uach = (navigator as Navigator & { userAgentData?: { platform: string } }).userAgentData;\n const platform = uach?.platform ?? navigator.platform;\n const mod = /Mac/i.test(platform) ? 'altKey' : 'ctrlKey';\n return !event[mod];\n};\n\n// Positions the handle relative to the nearest positioned ancestor, mirroring\n// DropCursorView's viewport-rect-to-offsetParent conversion, since the widget\n// decoration's DOM lands as a plain sibling of the hovered block, not inside it.\n//\n// Top-level blocks place the grip relative to their CONTENT edge (border box plus their\n// own inline-start padding), not the border box, so the gap to the text is the same\n// whether or not the block carries breakout padding. Measuring from the border box left\n// the grip 4px into the text on blocks without padding, where it looked attached to it.\nconst HANDLE_OFFSET = 4;\nexport const HANDLE_BUTTON_SIZE = 24;\n\n// The floating \"+\" that appears on empty blocks sits at `left: -26px` with a 19px box\n// (floating-add-plugin-menu.scss, `.ltr`), so its centre is 16.5px left of the content\n// edge. Derive the grip's gap so its centre lands there too — the two never show on the\n// same line, so what reads as \"aligned\" is a shared centre column, not a shared edge.\n// The grip is wider than the \"+\", so matching centres necessarily leaves a smaller gap to\n// the text than the \"+\" has; matching edges instead would visibly offset the centres.\nconst PLUS_BUTTON_INLINE_START = 26;\nconst PLUS_BUTTON_SIZE = 19;\n// Nudge toward the content, on top of the \"+\"-aligned position: the shared centre column\n// read as sitting too far out. Kept as an explicit offset from the derived value rather\n// than a flat number so the \"+\" relationship stays visible — the two centres now differ\n// by this much.\nconst HANDLE_CONTENT_NUDGE = 1;\nconst HANDLE_CONTENT_GAP =\n Math.round(PLUS_BUTTON_INLINE_START - PLUS_BUTTON_SIZE / 2 - HANDLE_BUTTON_SIZE / 2) -\n HANDLE_CONTENT_NUDGE;\n\n// Hover reach: how far past the block's box the grip can sit.\nexport const HANDLE_GUTTER = HANDLE_BUTTON_SIZE + HANDLE_CONTENT_GAP;\n\n/**\n * Ancestor CSS scale of the editor (Wixel zooms its canvas with `transform: scale()`).\n * Every constant above and every computed-style length is in CSS px; every\n * getBoundingClientRect / clientX value is in viewport px, already multiplied by this.\n * Mixing the two is invisible at scale 1 and off by the zoom factor otherwise, so a CSS\n * length entering viewport math is multiplied by the scale, and a viewport length written\n * into the (scaled) grip's inline style is divided by it.\n */\nexport type EditorScale = ReturnType<typeof getElementScale>;\nexport const UNIT_SCALE: EditorScale = { scaleX: 1, scaleY: 1 };\nexport const getViewScale = (view: EditorView): EditorScale => getElementScale(view.dom);\n\n/** Inline-start padding of an element, in physical terms (RTL-aware via computed style). */\nconst getInlineStartPadding = (el: HTMLElement, scaleX: number): number => {\n const style = getComputedStyle(el);\n const pad = style.direction === 'rtl' ? style.paddingRight : style.paddingLeft;\n return (parseFloat(pad) || 0) * scaleX;\n};\n\n/**\n * Distance from the block's border box to its content edge, on the inline-start side.\n *\n * For text blocks that is just their own padding. For a node that defers its content to a\n * nested breakout wrapper it also includes the offset to that wrapper — measuring only the\n * node's own padding put the grip a full breakout gutter to the left of the content, which\n * lands off-screen on a full-width layout.\n */\nconst getBlockContentInset = (blockDom: HTMLElement, isRtl: boolean, scaleX: number): number => {\n const contentEl = getContentEdgeElement(blockDom);\n const ownPadding = getInlineStartPadding(contentEl, scaleX);\n if (contentEl === blockDom) {\n return ownPadding;\n }\n const blockRect = getBlockDomRect(blockDom);\n const contentRect = contentEl.getBoundingClientRect();\n const offsetToContentEl = isRtl\n ? blockRect.right - contentRect.right\n : contentRect.left - blockRect.left;\n return offsetToContentEl + ownPadding;\n};\n\nexport const getScrollParent = (el: Element): Element | null => {\n let current: Element | null = el.parentElement;\n while (current && current !== document.documentElement) {\n const overflow = getComputedStyle(current).overflowY;\n if (overflow === 'auto' || overflow === 'scroll' || overflow === 'overlay') {\n return current;\n }\n current = current.parentElement;\n }\n return null;\n};\n\n// Elements that render a text line box even when empty (caret line height), so an empty\n// paragraph or an empty table's first cell still gives the grip a line to center on.\n// blockquote and pre are the rendered tags of the blockquote and code-block textblocks;\n// non-empty ones are found by the text-node walk above this fallback, but empty ones\n// need to be carriers themselves or the grip anchors to the block top.\nconst TEXT_LINE_CARRIER_SELECTOR = 'p, h1, h2, h3, h4, h5, h6, blockquote, pre';\n\n// A carrier with no real text still renders a caret line box, so it IS the block's\n// first line when it comes before any text in DOM order — an empty first paragraph, an\n// empty table cell, a collapsible item's blank title, a layout's blank first column.\nconst isEmptyCarrier = (el: Element): boolean =>\n el.matches(TEXT_LINE_CARRIER_SELECTOR) && !el.textContent?.trim();\n\n// A text node's line box comes from a Range (its first client rect is the first line\n// after wrapping); an empty carrier's from its own box, whose height is the caret line.\nconst getLineRect = (node: Node): DOMRect | null => {\n if (node instanceof Element) {\n const rect = node.getBoundingClientRect();\n return rect.height > 0 ? rect : null;\n }\n const range = document.createRange();\n range.selectNodeContents(node);\n const lineRect = range.getClientRects()[0];\n return lineRect && lineRect.height > 0 ? lineRect : null;\n};\n\n// Only blocks whose content IS lines of text get first-line anchoring: text blocks (by\n// their rendered tag), plus the compound blocks whose first row/item/column reads as a\n// first line. Any other node type — audio, video, image, embeds — anchors to its top\n// edge instead: the incidental text inside such a card (a track title, a caption) sits\n// mid-card and would drag the grip toward the middle.\nconst TEXT_BLOCK_SELECTOR = `${TEXT_LINE_CARRIER_SELECTOR}, ul, ol`;\n// The compound markers are the node views' own root identifiers: `data-table-container`\n// (table-view.tsx), `data-layout-wrapper` (layout-node-view.ts), and the react-renderer\n// wrapper class tiptap derives from the collapsible list's node type name.\nconst FIRST_LINE_BLOCK_SELECTOR = [\n TEXT_BLOCK_SELECTOR,\n '[data-table-container]',\n '[data-layout-wrapper]',\n `.node-${TIPTAP_COLLAPSIBLE_LIST_TYPE}`,\n].join(', ');\n\n// Lists, blockquote, and code block mount their tag inside a plain wrapper div\n// (withBreakoutContainer), so the node's own DOM is that div — the gate has to look\n// one level down for them. Direct children only: a media card's text sits deeper.\nconst isFirstLineBlock = (blockDom: HTMLElement): boolean =>\n blockDom.matches(FIRST_LINE_BLOCK_SELECTOR) ||\n blockDom.querySelector(`:scope > :is(${TEXT_BLOCK_SELECTOR})`) !== null;\n\n// A nested block-level plugin node (image, video, divider…) reached before any text\n// line means the block LEADS with media — the grip then anchors to the block top rather\n// than to text that happens to appear further down (a layout whose first column starts\n// with an image). Nested plugin nodes render as tiptap `div.react-renderer` node-view\n// wrappers; scoping to table/layout cells keeps this away from the collapsible list,\n// whose items are react-renderers but ARE its first-line sections, and requiring a div\n// keeps inline node views (mentions, emoji — spans) from tripping it mid-paragraph.\nconst isNestedMediaNode = (el: Element): boolean =>\n el.matches('div.react-renderer') && el.closest('td, th, [data-layout-cell]') !== null;\n\n/**\n * Rendered box of the block's first line, or null for blocks that don't get first-line\n * anchoring (image, divider, media cards).\n *\n * One walk in document order over both non-whitespace text nodes and empty text-carrier\n * elements: whichever renders a line box first IS the first line, so a blank first\n * paragraph, an empty table cell, a collapsible item's blank title, or a layout's blank\n * first column wins by position, not by having text — the grip stays on the first line\n * even when that line is empty space. Non-empty carriers are skipped (not rejected), so\n * the walk descends into them and lands on their text instead of their multi-line box.\n * Candidates that render no box (a collapsed item's hidden body — and in jsdom every\n * text node, since Range.getClientRects() is empty there) are passed over, so the walk\n * settles on the first candidate a reader can actually see.\n */\nconst getFirstTextLineRect = (blockDom: HTMLElement): DOMRect | null => {\n if (!isFirstLineBlock(blockDom)) {\n return null;\n }\n const contentEl = getContentEdgeElement(blockDom);\n const walker = document.createTreeWalker(\n contentEl,\n NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_TEXT,\n {\n acceptNode: node => {\n if (node instanceof Element) {\n return isEmptyCarrier(node) || isNestedMediaNode(node)\n ? NodeFilter.FILTER_ACCEPT\n : NodeFilter.FILTER_SKIP;\n }\n return node.nodeValue?.trim() ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;\n },\n }\n );\n for (let node = walker.nextNode(); node; node = walker.nextNode()) {\n if (node instanceof Element && isNestedMediaNode(node)) {\n // Rendered media before any line: the block leads with it — anchor to the top.\n // Hidden media (a collapsed section) doesn't count; keep walking.\n if (node.getBoundingClientRect().height > 0) {\n return null;\n }\n continue;\n }\n const lineRect = getLineRect(node);\n if (lineRect) {\n return lineRect;\n }\n }\n // The content edge element can itself be the carrier (an empty top-level paragraph\n // block) — the walk above only visits descendants of its root.\n const selfRect = isEmptyCarrier(contentEl) ? contentEl.getBoundingClientRect() : null;\n return selfRect && selfRect.height > 0 ? selfRect : null;\n};\n\n/**\n * Viewport-space top for the grip, clamped into the block's visible band.\n *\n * The grip centers on the block's first text line, so it visually pairs with the text it\n * grabs (a heading's tall first line, a table's first-row cell). Blocks outside the\n * first-line whitelist (images, dividers, media cards) anchor to the block's top edge\n * instead. A block taller than the\n * viewport — a layout, a full-width image — would otherwise lose its grip off the top of\n * the screen as soon as that edge scrolls away, so the block reads as having no handle at\n * all; hence the clamp into the visible band.\n */\nexport const getClampedHandleTop = (\n blockDom: HTMLElement,\n blockRect: DOMRect,\n // positionHandle measures the first line anyway (float-wrap anchoring) — accept it to\n // avoid a second TreeWalker pass per measure.\n firstLine: DOMRect | null = getFirstTextLineRect(blockDom),\n scaleY = 1\n): number => {\n const gripSize = HANDLE_BUTTON_SIZE * scaleY;\n // Centering the 24px grip on a much shorter line (tiny font sizes) reads as the button\n // swallowing the text rather than marking it — those blocks keep the plain top-edge\n // anchor instead. Normal text lines (~20px and up) stay centered; the block-top clamp\n // catches lines in between whose centered position would poke above the block.\n const centeringMakesSense = firstLine && firstLine.height >= gripSize / 2;\n const anchorTop = centeringMakesSense\n ? Math.max(blockRect.top, firstLine.top + (firstLine.height - gripSize) / 2)\n : blockRect.top;\n const scrollParent = getScrollParent(blockDom);\n // Intersect with the window: the scroll container itself may be partly off-screen.\n const visibleTop = Math.max(scrollParent?.getBoundingClientRect().top ?? 0, 0);\n // Never push the grip past the block's own bottom edge.\n const lowestTop = Math.max(anchorTop, blockRect.bottom - gripSize);\n return Math.min(Math.max(anchorTop, visibleTop), lowestTop);\n};\n\n// Plain object cast — new DOMRect() getters (left/right) are unreliable in jsdom.\nconst makeRect = (left: number, top: number, width: number, height: number): DOMRect =>\n ({\n left,\n top,\n right: left + width,\n bottom: top + height,\n width,\n height,\n x: left,\n y: top,\n toJSON: () => ({}),\n }) as DOMRect;\n\n// Include the handle's gutter in hover hit-testing so moving onto the grip\n// doesn't drop the widget before the pointer arrives. Every block needs this: the grip sits\n// in the gutter beside every block's content, so a rect stopping at the block's own box\n// would drop the widget as the pointer leaves the text.\n/**\n * Rendered box of the node's aligned content container, or null when the node has none.\n *\n * A right- or center-aligned node without text wrap (an image pushed sideways by auto\n * margins) keeps its node-view wrapper full-width while the visible content shrinks —\n * anchoring the grip to the wrapper's edge put it a full editor width away from the\n * image. The placement container stamps `data-plugin-alignment` (styles HOC), and its\n * rect is the grip's horizontal anchor instead. The lookup walks the first-child spine\n * only and stops at a nested node view, so a container block's grip doesn't anchor to\n * an aligned node inside its first cell.\n */\nexport const getAlignedContentRect = (blockDom: HTMLElement): DOMRect | null => {\n let el = blockDom.firstElementChild;\n while (el instanceof HTMLElement && !el.classList.contains('react-renderer')) {\n if (el.dataset.pluginAlignment) {\n const rect = el.getBoundingClientRect();\n return rect.width > 0 && rect.height > 0 ? rect : null;\n }\n el = el.firstElementChild;\n }\n return null;\n};\n\n// Ignoring list/blockquote text indents (well under this) but catching any real float\n// (image widths start around 100px).\nconst FLOAT_TEXT_INSET_MIN = 48;\n// A few px inside the content edge, clear of sub-pixel boundary jitter.\nconst FLOAT_PROBE_INSET = 8;\n\n/**\n * True when ANOTHER block's content renders at this block's content edge at its first\n * line's height — i.e. a float intrudes there and this block's text wraps beside it.\n *\n * A hit-test rather than a sibling walk on purpose: a tall float wraps SEVERAL\n * following blocks ([image][paragraph][list]…), so only the first of them has the float\n * as a direct neighbor — any sibling-order heuristic misses the rest. What actually\n * paints at the edge is order-independent. The probe can't distinguish a float from\n * this block's own box without the ancestry checks: an element of this block (its list\n * marker, its own wrapper) means the inset is an indent, not an intrusion.\n */\nconst isForeignBlockAtContentEdge = (\n blockDom: HTMLElement,\n contentEdge: number,\n firstLine: DOMRect,\n isRtl: boolean\n): boolean => {\n // jsdom has no elementsFromPoint; the feature is inert there (like first-line\n // centering, whose Range rects jsdom can't measure either).\n if (typeof document.elementsFromPoint !== 'function') {\n return false;\n }\n const x = isRtl ? contentEdge - FLOAT_PROBE_INSET : contentEdge + FLOAT_PROBE_INSET;\n const y = firstLine.top + firstLine.height / 2;\n for (const el of document.elementsFromPoint(x, y)) {\n if (!(el instanceof HTMLElement) || el.closest('[data-block-drag-handle]')) {\n continue;\n }\n if (el === blockDom || blockDom.contains(el)) {\n return false;\n }\n // An ancestor (the editor root, a card section) means the probe fell through to\n // background at this layer — keep looking below it.\n if (el.contains(blockDom)) {\n continue;\n }\n // First non-ancestor element that shares this block's editor: the intruding float.\n if (el.closest('.ProseMirror')?.contains(blockDom)) {\n return true;\n }\n }\n return false;\n};\n\n/**\n * Inline-start edge of the block's visible first text line when a float pushes it\n * inward, or null when the block starts at its own content edge.\n *\n * A wrap-text float ([image floats left][text wraps beside it]) leaves the block's\n * content edge a full image away from where the text actually begins. A grip anchored\n * to that far edge is unreachable: traveling to it crosses the float, whose hover takes\n * over and swaps the grip for the float's own. Anchoring to the first line's visible\n * start keeps the journey a few pixels, the same \"grip hugs the visible content\" rule\n * aligned nodes use.\n */\nconst getWrapFloatTextEdge = (\n blockDom: HTMLElement,\n firstLine: DOMRect | null,\n contentEdge: number,\n isRtl: boolean\n): number | null => {\n if (!firstLine) {\n return null;\n }\n const inset = isRtl ? contentEdge - firstLine.right : firstLine.left - contentEdge;\n if (inset < FLOAT_TEXT_INSET_MIN) {\n return null;\n }\n if (!isForeignBlockAtContentEdge(blockDom, contentEdge, firstLine, isRtl)) {\n return null;\n }\n return isRtl ? firstLine.right : firstLine.left;\n};\n\nexport const getBlockHoverRect = (\n blockDom: HTMLElement,\n isRtl: boolean,\n { scaleX }: EditorScale = UNIT_SCALE\n): DOMRect => {\n const rect = getBlockDomRect(blockDom);\n const gutter = HANDLE_GUTTER * scaleX;\n const left = isRtl ? rect.left : rect.left - gutter;\n return makeRect(left, rect.top, rect.width + gutter, rect.height);\n};\n\nexport const isPointerInBlockHoverRect = (\n blockDom: HTMLElement,\n clientX: number,\n clientY: number,\n isRtl: boolean,\n scale: EditorScale = UNIT_SCALE\n): boolean => containsPoint(getBlockHoverRect(blockDom, isRtl, scale), clientX, clientY);\n\n// Shared horizontal hit-test for both the per-block gutter zone (below) and the\n// editor-wide gutter strip (isPointerInEditorGutterStrip in plugin.ts).\n// Both compute the same shape of band — reaching HANDLE_BUTTON_SIZE + HANDLE_OFFSET from\n// a \"content edge\" on one side, and an already-resolved \"outer bound\" on the other —\n// but against different rects (a block's own vs. the editor's), so callers resolve\n// those two edges themselves rather than this helper unifying the rect sources.\nexport const isXInHandleZone = (\n clientX: number,\n isRtl: boolean,\n contentEdge: number,\n outerBound: number,\n scaleX = 1\n): boolean => {\n const innerBand = (HANDLE_BUTTON_SIZE + HANDLE_OFFSET) * scaleX;\n return isRtl\n ? clientX >= contentEdge - innerBand && clientX <= outerBound\n : clientX >= outerBound && clientX <= contentEdge + innerBand;\n};\n\n// Returns true when the pointer is within the horizontal band where the drag\n// handle is rendered — covers both the outside gutter (text in layout/table\n// cells or breakout blocks) and the inside-left zone for top-level blocks.\n// For top-level blocks (not inside a cell) the zone also extends left by\n// HANDLE_GUTTER so clicks in the editor's left margin beside a block (e.g.\n// beside an image that has no outside gutter) still start box-select.\n// Vertical slack on the gutter band: a pointer aiming at the grip and overshooting the\n// block's edge by a few pixels must not drop the hover — the grip would unmount right\n// under the incoming pointer.\nconst GUTTER_HOVER_SLACK_Y = 8;\n\nexport const isPointerInBlockHandleZone = (\n blockDom: HTMLElement,\n clientX: number,\n clientY: number,\n isRtl: boolean,\n scale: EditorScale = UNIT_SCALE\n): boolean => {\n const { scaleX, scaleY } = scale;\n const blockRect = getBlockDomRect(blockDom);\n const slackY = GUTTER_HOVER_SLACK_Y * scaleY;\n if (clientY < blockRect.top - slackY || clientY > blockRect.bottom + slackY) {\n return false;\n }\n const hoverRect = getBlockHoverRect(blockDom, isRtl, scale);\n // Expand past the hover rect to cover the editor margin, so clicks beside a block\n // (e.g. beside an image) still start box-select.\n // The grip is placed off the content edge, so the zone has to reach that far too —\n // otherwise a node whose content is inset from its box (layout) has its grip outside\n // the zone that starts box-select. For an aligned node the grip hugs the visible\n // content box, so the zone reaches that edge instead — the dead space beside the\n // content behaves like the editor margin.\n const alignedRect = getAlignedContentRect(blockDom);\n const contentInset = alignedRect ? 0 : getBlockContentInset(blockDom, isRtl, scaleX);\n const edgeRect = alignedRect ?? blockRect;\n const contentEdge = isRtl ? edgeRect.right - contentInset : edgeRect.left + contentInset;\n const gutter = HANDLE_GUTTER * scaleX;\n const outerBound = isRtl ? hoverRect.right + gutter : hoverRect.left - gutter;\n return isXInHandleZone(clientX, isRtl, contentEdge, outerBound, scaleX);\n};\n\n/** True when the pointer sits in the handle zone of any of the given blocks. */\nexport const isPointerInHandleGutter = (\n view: EditorView,\n clientX: number,\n clientY: number,\n positions: number[]\n): boolean => {\n const isRtl = getComputedStyle(view.dom).direction === 'rtl';\n const scale = getViewScale(view);\n return positions.some(pos => {\n const dom = view.nodeDOM(pos);\n return (\n dom instanceof HTMLElement && isPointerInBlockHandleZone(dom, clientX, clientY, isRtl, scale)\n );\n });\n};\n\nexport const getBlockPosFromHandleUnderPointer = (\n clientX: number,\n clientY: number\n): number | null => {\n const element = document.elementFromPoint(clientX, clientY);\n // `Element`, not `HTMLElement`: the hit is usually the grip's <svg>/<path> icon, which\n // is an SVGElement — an HTMLElement guard reads the pointer on the grip as \"no grip\".\n const handle = element instanceof Element ? element.closest('[data-block-drag-handle]') : null;\n if (!(handle instanceof HTMLElement)) {\n return null;\n }\n const pos = Number(handle.dataset.blockDragHandlePosition);\n return Number.isFinite(pos) ? pos : null;\n};\n\nexport type Rect = Pick<DOMRect, 'left' | 'right' | 'top' | 'bottom'>;\n\nexport const containsPoint = (rect: Rect, x: number, y: number): boolean =>\n x >= rect.left && x <= rect.right && y >= rect.top && y <= rect.bottom;\n\n// Collision mode for the grip and a table's row handle: the row handle straddles the\n// table's inline-start edge, the same spot the grip occupies — with the FIRST row\n// selected the two stack. Rather than hiding either, both shrink (styles.scss rules\n// keyed on this attribute) and the hovered one grows back to full size.\nconst HANDLE_COLLISION_ATTR = 'data-handle-collision';\n\n// The rendered rect of an already-shrunken element lies: the scale is visual only.\n// The row handle scales around its center (styles.scss), so the full-size box shares\n// the center — reconstruct it so the overlap decision is stable across the shrink\n// (no shrink → measure smaller → un-shrink flicker loop). The scale is read off the\n// computed matrix rather than assumed, since the shrunken state has two depths (0.7,\n// and the deeper hover-yield) and a hovered handle is back at 1. The grip never needs\n// this: its overlap box comes from the computed placement, not a DOM measurement.\nconst getUnscaledRect = (el: HTMLElement): DOMRect => {\n const rect = el.getBoundingClientRect();\n if (!el.hasAttribute(HANDLE_COLLISION_ATTR)) {\n return rect;\n }\n const { transform } = getComputedStyle(el);\n // matrix(a, b, c, d, e, f) — `a` IS the scale here (translate + uniform scale only).\n const scale = transform.startsWith('matrix(') ? parseFloat(transform.slice(7)) : 1;\n if (!Number.isFinite(scale) || scale <= 0 || scale === 1) {\n return rect;\n }\n const width = rect.width / scale;\n const height = rect.height / scale;\n return makeRect(\n rect.left - (width - rect.width) / 2,\n rect.top - (height - rect.height) / 2,\n width,\n height\n );\n};\n\n// The row handle the grip last collided with, so unmounting the grip (hover moved on)\n// releases the row handle from its shrunken state.\nconst collisionTargets = new WeakMap<HTMLElement, HTMLElement>();\nconst collisionRecheckRafs = new WeakMap<HTMLElement, number>();\n\nexport const releaseCollisionTarget = (handle: HTMLElement): void => {\n const rafId = collisionRecheckRafs.get(handle);\n if (rafId) {\n cancelAnimationFrame(rafId);\n collisionRecheckRafs.delete(handle);\n }\n collisionTargets.get(handle)?.removeAttribute(HANDLE_COLLISION_ATTR);\n collisionTargets.delete(handle);\n};\n\nconst applyRowHandleCollision = (\n handle: HTMLElement,\n blockDom: HTMLElement,\n gripLeft: number,\n gripTop: number,\n { scaleX, scaleY }: EditorScale\n): void => {\n const rowHandle = blockDom.querySelector<HTMLElement>('[data-hook=\"row-handle\"]');\n const rowRect = rowHandle ? getUnscaledRect(rowHandle) : null;\n // A hidden row handle (table not focused, whole table selected) measures 0x0.\n const overlaps =\n !!rowRect &&\n rowRect.width > 0 &&\n rowRect.height > 0 &&\n gripLeft < rowRect.right &&\n gripLeft + HANDLE_BUTTON_SIZE * scaleX > rowRect.left &&\n gripTop < rowRect.bottom &&\n gripTop + HANDLE_BUTTON_SIZE * scaleY > rowRect.top;\n handle.toggleAttribute(HANDLE_COLLISION_ATTR, overlaps);\n if (overlaps && rowHandle) {\n // A previous collision partner (the handle of a row selected earlier) must be\n // released before adopting the new one, or it stays shrunken forever.\n if (collisionTargets.get(handle) !== rowHandle) {\n collisionTargets.get(handle)?.removeAttribute(HANDLE_COLLISION_ATTR);\n }\n // Keep an existing value: a re-measure mid grip-hover must not reset 'yield'.\n if (!rowHandle.hasAttribute(HANDLE_COLLISION_ATTR)) {\n rowHandle.setAttribute(HANDLE_COLLISION_ATTR, '');\n }\n collisionTargets.set(handle, rowHandle);\n } else {\n collisionTargets.get(handle)?.removeAttribute(HANDLE_COLLISION_ATTR);\n collisionTargets.delete(handle);\n }\n};\n\n// A full-size grip and a 0.7 row handle still graze each other (the shrink only frees a\n// few px), so while the grip is hovered — expanded back to full size — its collision\n// partner yields deeper (styles.scss 'yield' rule: smaller still, staying centered).\n// The row handle's own hover needs no mirror: the shrunken grip hugs the far side of\n// the gap and the expanded row handle stays clear of it.\nexport const setCollisionYield = (handle: HTMLElement, yielding: boolean): void => {\n const partner = collisionTargets.get(handle);\n if (partner?.hasAttribute(HANDLE_COLLISION_ATTR)) {\n partner.setAttribute(HANDLE_COLLISION_ATTR, yielding ? 'yield' : '');\n }\n};\n\nexport const syncRowHandleCollision = (\n handle: HTMLElement,\n blockDom: HTMLElement,\n gripLeft: number,\n gripTop: number,\n scale: EditorScale = UNIT_SCALE\n): void => {\n applyRowHandleCollision(handle, blockDom, gripLeft, gripTop, scale);\n // The table repositions its row handle in its own selectionUpdate rAF, which can run\n // AFTER this measure — a selection moving off the first row would then leave both\n // parties stuck shrunken (nothing re-triggers a measure once the handle moves).\n // Re-check one frame later, when the row handle has settled.\n const prev = collisionRecheckRafs.get(handle);\n if (prev) {\n cancelAnimationFrame(prev);\n }\n collisionRecheckRafs.set(\n handle,\n requestAnimationFrame(() => {\n collisionRecheckRafs.delete(handle);\n if (handle.isConnected) {\n applyRowHandleCollision(handle, blockDom, gripLeft, gripTop, scale);\n }\n })\n );\n};\n\nconst positionHandle = (\n handle: HTMLElement,\n blockDom: HTMLElement,\n isRtl: boolean,\n scale: EditorScale\n) => {\n const { scaleX, scaleY } = scale;\n const gripWidth = HANDLE_BUTTON_SIZE * scaleX;\n // The handle's own offsetParent, not the block's: absolute left/top set below resolve\n // against the element's positioning base, and a display:contents block wrapper has NO\n // offsetParent of its own — the early return then left the grip unpositioned, sitting\n // in flow on top of the image. For normal blocks the widget is the block's sibling, so\n // both share the same offsetParent anyway.\n const parent = handle.offsetParent as HTMLElement | null;\n if (!parent) {\n return;\n }\n const blockRect = getBlockDomRect(blockDom);\n const parentRect = parent.getBoundingClientRect();\n\n // The grip hugs the inline-start edge of the content it grabs. Three anchor sources,\n // most specific first: an aligned node's visible content box (its edge IS the content\n // edge — no padding of its own); the first text line of a block whose text a float\n // pushes inward; otherwise the block's own content edge (border box plus inline-start\n // padding), so the grip clears the text by the same amount whether or not the block\n // carries breakout padding.\n const firstLine = getFirstTextLineRect(blockDom);\n const alignedRect = getAlignedContentRect(blockDom);\n const contentInset = getBlockContentInset(blockDom, isRtl, scaleX);\n const contentEdge = isRtl ? blockRect.right - contentInset : blockRect.left + contentInset;\n const anchorEdge = alignedRect\n ? isRtl\n ? alignedRect.right\n : alignedRect.left\n : (getWrapFloatTextEdge(blockDom, firstLine, contentEdge, isRtl) ?? contentEdge);\n\n const gap = HANDLE_CONTENT_GAP * scaleX;\n const desiredLeft = isRtl ? anchorEdge + gap : anchorEdge - gripWidth - gap;\n\n // Clamp into the horizontally visible band, mirroring getClampedHandleTop: a large\n // content width shrinks the gutter below the grip's reach, and the desired position\n // hangs past the window's (or scroll container's) inline-start edge — the grip then\n // shows with its outer half cut off. Sliding it inward eats the content gap first and\n // only then overlaps the content edge; the grip exists only on hover, so a brief\n // overlap beats a half-visible button.\n const scrollParentRect = getScrollParent(blockDom)?.getBoundingClientRect();\n const clampedLeft = isRtl\n ? Math.min(\n desiredLeft,\n Math.min(scrollParentRect?.right ?? Infinity, window.innerWidth) - gripWidth\n )\n : Math.max(desiredLeft, Math.max(scrollParentRect?.left ?? 0, 0));\n const top = getClampedHandleTop(blockDom, blockRect, firstLine, scaleY);\n\n // Viewport offsets → the grip's own CSS px: its inline style is applied inside the\n // scaled subtree, so the browser multiplies it back by the scale.\n handle.style.position = '';\n handle.style.top = `${(top - parentRect.top) / scaleY}px`;\n if (isRtl) {\n handle.style.left = 'auto';\n handle.style.right = `${(parentRect.right - (clampedLeft + gripWidth)) / scaleX}px`;\n } else {\n handle.style.right = 'auto';\n handle.style.left = `${(clampedLeft - parentRect.left) / scaleX}px`;\n }\n\n syncRowHandleCollision(handle, blockDom, clampedLeft, top, scale);\n};\n\ntype HandleDragLifecycle = {\n onDragStart: (positions: number[]) => void;\n onDragEnd: () => void;\n};\n\n// What the grip can't derive from the view itself: the plugin's i18n, the react-node types\n// that paint their own focus ring (drives NodeSelection vs. neutral caret on select), the\n// drag-visuals lifecycle owned by the plugin closure, and which of the two grips this is.\nexport type HandleElementOptions = {\n t: TFunction;\n typesWithOwnFocusRing: ReadonlySet<string>;\n isMultiHandle?: boolean;\n dragLifecycle?: HandleDragLifecycle;\n};\n\n/**\n * The blocks a drag grabbed at `pos` moves: the whole multi-selection when `pos` is part\n * of it, else just this block. Reads live selectedPositions — kept current through every\n * transaction by mapSelectedPositionsThroughTransaction.\n */\nconst getDragPositions = (view: EditorView, pos: number): number[] => {\n const selected = getPluginState(view).selectedPositions;\n return selected.length > 1 && selected.includes(pos) ? selected : [pos];\n};\n\nexport const createHandleElement = (\n view: EditorView,\n getPos: () => number | undefined,\n options: HandleElementOptions\n): HTMLElement => {\n const { t, typesWithOwnFocusRing, isMultiHandle = false, dragLifecycle } = options;\n const handle = document.createElement('div');\n handle.setAttribute('contenteditable', 'false');\n handle.dataset.blockDragHandle = '';\n handle.classList.add(styles.blockDragHandle);\n // The hover-bridge (::after, styles.scss) has to reach exactly as\n // far as the gutter the block's hover rect already accounts for, or the grip either\n // leaves a gap the pointer can fall through or overshoots into the text. Set once\n // here instead of a literal in SCSS silently duplicating this value.\n handle.style.setProperty('--ricos-block-drag-handle-gutter', `${HANDLE_GUTTER}px`);\n\n const button = document.createElement('button');\n button.setAttribute('type', 'button');\n button.setAttribute('draggable', 'true');\n button.setAttribute(\n 'aria-label',\n isMultiHandle\n ? t('BlockDragHandle_MultiButton_AriaLabel')\n : t('BlockDragHandle_Button_AriaLabel')\n );\n button.setAttribute('aria-roledescription', t('BlockDragHandle_Button_AriaRoleDescription'));\n button.setAttribute(\n 'title',\n isMultiHandle ? t('BlockDragHandle_MultiButton_Title') : t('BlockDragHandle_Button_Title')\n );\n button.classList.add(styles.blockDragHandleButton);\n button.innerHTML = getSixDotHandleIcon();\n handle.append(button);\n\n button.addEventListener('mouseenter', () => setCollisionYield(handle, true));\n button.addEventListener('mouseleave', () => setCollisionYield(handle, false));\n\n // A `react-node` target's visible content can be mounted by React\n // asynchronously, so re-measure a frame later in case this initial\n // measurement caught a not-yet-mounted placeholder.\n const measureAndPosition = () => {\n const pos = getPos();\n if (pos === undefined) {\n return;\n }\n let blockDom: Node | null = null;\n try {\n blockDom = view.nodeDOM(pos);\n } catch {\n return;\n }\n handle.dataset.blockDragHandlePosition = String(pos);\n if (blockDom instanceof HTMLElement) {\n const editorIsRtl = getComputedStyle(view.dom).direction === 'rtl';\n handle.dir = editorIsRtl ? 'rtl' : 'ltr';\n positionHandle(handle, blockDom, editorIsRtl, getViewScale(view));\n }\n };\n\n handleMeasures.set(handle, measureAndPosition);\n\n measureAndPosition();\n let rafId = requestAnimationFrame(() => {\n rafId = 0;\n measureAndPosition();\n handle.classList.add(styles.visible);\n });\n\n const pos = getPos();\n const blockDom = pos !== undefined ? view.nodeDOM(pos) : null;\n let resizeObserver: ResizeObserver | null = null;\n if (blockDom instanceof HTMLElement) {\n resizeObserver = new ResizeObserver(() => {\n measureAndPosition();\n });\n resizeObserver.observe(blockDom);\n }\n\n // The clamped top is viewport-relative, so it has to be recomputed as the block scrolls\n // past the visible edge — otherwise the grip only stays in view where it happened to be\n // when the pointer arrived. Capture phase: scroll does not bubble.\n let scrollRafId = 0;\n const onScroll = () => {\n if (scrollRafId) {\n return;\n }\n scrollRafId = requestAnimationFrame(() => {\n scrollRafId = 0;\n measureAndPosition();\n });\n };\n document.addEventListener('scroll', onScroll, {\n capture: true,\n passive: true,\n });\n\n let suppressClick = false;\n\n handleCleanups.set(handle, () => {\n if (rafId) {\n cancelAnimationFrame(rafId);\n }\n if (scrollRafId) {\n cancelAnimationFrame(scrollRafId);\n }\n document.removeEventListener('scroll', onScroll, { capture: true });\n resizeObserver?.disconnect();\n resizeObserver = null;\n releaseCollisionTarget(handle);\n });\n\n // The multi-handle sits on the selection, not the hover — pinning the hover to its\n // block would fight the geometric resolution, so only the single grip keeps hover.\n if (!isMultiHandle) {\n // The pointer is on this grip, so its block is the hovered one — no hit-test needed;\n // a stale position with no node stays dropped.\n const pinHover = () => {\n const pos = getPos();\n if (pos !== undefined) {\n setHoveredPos(view, view.state.doc.nodeAt(pos) ? pos : null);\n }\n };\n handle.addEventListener('mouseenter', pinHover);\n handle.addEventListener('mousemove', pinHover);\n }\n handle.addEventListener('mousedown', event => {\n event.stopPropagation();\n });\n\n button.addEventListener('mousedown', event => {\n // Never preventDefault here — it suppresses native drag on draggable=\"true\".\n event.stopPropagation();\n setHandleDragPreparing(view, true);\n // Grabbing a handle outside the current multi-select starts a drag of just this\n // block (see getDragPositions above), but a plain click never fires to update the\n // selection ring — the browser suppresses it once a drag occurs. Without this, the\n // old multi-select stays visibly selected underneath an unrelated drag. Mousedown\n // (unlike dragstart) can still safely dispatch a transaction here.\n //\n // NOT for modified mousedowns: shift/meta-click extends the current selection from\n // its anchor, and this grab fires before the click event — replacing the selection\n // here would destroy the very anchor the click is about to extend.\n const isSelectionExtendingClick = event.shiftKey || event.metaKey || event.ctrlKey;\n const pos = getPos();\n if (pos !== undefined && !isSelectionExtendingClick) {\n const next = computeSelectedPositionsOnDragGrab(getPluginState(view).selectedPositions, pos);\n if (next) {\n selectBlocks(view, next, typesWithOwnFocusRing);\n }\n }\n });\n\n button.addEventListener('mouseup', () => {\n window.setTimeout(() => {\n if (!view.dragging) {\n setHandleDragPreparing(view, false);\n clearDraggingPositions(view);\n }\n }, 0);\n });\n\n button.addEventListener('click', event => {\n if (suppressClick) {\n suppressClick = false;\n return;\n }\n const pos = getPos();\n if (pos === undefined) {\n return;\n }\n const next = computeSelectedPositionsOnClick(\n view.state.doc,\n getPluginState(view).selectedPositions,\n {\n pos,\n shiftKey: event.shiftKey,\n metaKey: event.metaKey || event.ctrlKey,\n }\n );\n selectBlocks(view, next, typesWithOwnFocusRing);\n });\n\n button.addEventListener('dragstart', event => {\n const pos = getPos();\n if (pos === undefined || !event.dataTransfer) {\n // Without a payload, don't let the browser fall back to a native drag of\n // whatever it finds (the button's own text) — it can land as a stray drop\n // elsewhere with no relation to this handle.\n event.preventDefault();\n return;\n }\n\n const dragPositions = getDragPositions(view, pos);\n const dragPayload = buildDragSliceForPositions(view, dragPositions);\n if (!dragPayload) {\n event.preventDefault();\n return;\n }\n\n const node = view.state.doc.nodeAt(pos);\n if (!node) {\n event.preventDefault();\n return;\n }\n\n const dom = view.nodeDOM(pos);\n\n const { slice, nodeSelection } = dragPayload;\n event.dataTransfer.effectAllowed = 'move';\n event.dataTransfer.setData('text/plain', ' ');\n event.stopPropagation();\n\n setDraggingPositions(view, dragPositions);\n setHandleDragPreparing(view, false);\n dragLifecycle?.onDragStart(dragPositions);\n\n // Do not dispatch here — a transaction rebuilds the handle widget and kills the drag.\n view.dragging = {\n slice,\n move: dragMoves(event),\n node: nodeSelection,\n } as EditorView['dragging'];\n\n suppressClick = true;\n\n if (dom instanceof HTMLElement) {\n buildDragGhost(dom, dragPositions, event.dataTransfer, event.clientX, event.clientY);\n }\n });\n\n button.addEventListener('dragend', () => {\n setHandleDragPreparing(view, false);\n dragLifecycle?.onDragEnd();\n // Drop the published drop-cursor position so an aborted drag (Escape, drop\n // outside the editor) can't leave a stale value for the next drag to read.\n dragDropInsertPos.clear(view);\n // Clear immediately so ProseMirror's own deferred dragend timer (50ms) sees null\n // and doesn't accidentally clear a new drag's view.dragging.\n view.dragging = null;\n // Snapshot the positions reference — if a new drag starts before this timeout fires\n // (new setDraggingPositions creates a different array), the deferred clear is a no-op.\n const posSnapshot = getDraggingPositions(view);\n window.setTimeout(() => {\n const current = getDraggingPositions(view);\n if (current === posSnapshot) {\n clearDraggingPositions(view);\n }\n }, 0);\n });\n\n return handle;\n};\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,2BAA6C;AAE7C,kCAAkC;AAClC,+BAAoC;AACp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Aa;AAC9B,uCAAe,KAAK,eAAe,MAAM,cAAc,MAAM,SAAS,MAAM,OAAO;AAAA,IACrF;AAAA,EACF,CAAC;AAED,SAAO,iBAAiB,WAAW,MAAM;AACvC,kDAAuB,MAAM,KAAK;AAClC,mBAAe,UAAU;AAGzB,kDAAkB,MAAM,IAAI;AAG5B,SAAK,WAAW;AAGhB,UAAM,kBAAc,wCAAqB,IAAI;AAC7C,WAAO,WAAW,MAAM;AACtB,YAAM,cAAU,wCAAqB,IAAI;AACzC,UAAI,YAAY,aAAa;AAC3B,sDAAuB,IAAI;AAAA,MAC7B;AAAA,IACF,GAAG,CAAC;AAAA,EACN,CAAC;AAED,SAAO;AACT;",
|
|
4
|
+
"sourcesContent": ["import { TIPTAP_COLLAPSIBLE_LIST_TYPE } from './../ricos-content/index.js';\nimport type { TFunction } from './../ricos-types/index.js';\nimport { dragDropInsertPos } from './../_shared/drag-drop-insert-pos.js';\nimport { getSixDotHandleIcon } from './../_shared/drag-handle-icons.js';\nimport { getContentEdgeElement } from './../_shared/get-content-edge-element.js';\nimport { getElementScale } from './../_shared/get-element-scale.js';\nimport type { EditorView } from './../tiptap/pm/view.js';\n\nimport { getBlockDomRect } from './block-rect.js';\nimport {\n clearDraggingPositions,\n getDraggingPositions,\n setDraggingPositions,\n setHandleDragPreparing,\n} from './drag-state.js';\nimport { buildDragGhost } from './ghost.js';\nimport { getPluginState, setHoveredPos } from './plugin-key.js';\nimport {\n buildDragSliceForPositions,\n computeSelectedPositionsOnClick,\n computeSelectedPositionsOnDragGrab,\n selectBlocks,\n} from './selection.js';\nimport styles from './styles-scss.js';\n\nconst handleCleanups = new WeakMap<HTMLElement, () => void>();\nconst handleMeasures = new WeakMap<HTMLElement, () => void>();\n\nexport const destroyHandleElement = (node: Node): void => {\n if (!(node instanceof HTMLElement)) {\n return;\n }\n handleCleanups.get(node)?.();\n handleCleanups.delete(node);\n handleMeasures.delete(node);\n};\n\n/**\n * Re-measures every mounted grip.\n *\n * A widget's own ResizeObserver only fires when its block changes size, but a block can\n * just as easily be *moved* by something else resizing — expanding a collapsible item\n * pushes every item below it down without any of them resizing. The widget survives such\n * a transaction untouched (its decoration key is the unchanged position), so nothing else\n * would ever recompute its offset.\n */\nexport const remeasureHandleElements = (view: EditorView): void => {\n view.dom\n .querySelectorAll<HTMLElement>('[data-block-drag-handle]')\n .forEach(handle => handleMeasures.get(handle)?.());\n};\n\n// Mirrors prosemirror-view's dragCopies default (alt on Mac, ctrl elsewhere).\n// Uses UACH when available (Chromium); falls back to navigator.platform for Firefox/Safari.\nconst dragMoves = (event: DragEvent): boolean => {\n const uach = (navigator as Navigator & { userAgentData?: { platform: string } }).userAgentData;\n const platform = uach?.platform ?? navigator.platform;\n const mod = /Mac/i.test(platform) ? 'altKey' : 'ctrlKey';\n return !event[mod];\n};\n\n// Positions the handle relative to the nearest positioned ancestor, mirroring\n// DropCursorView's viewport-rect-to-offsetParent conversion, since the widget\n// decoration's DOM lands as a plain sibling of the hovered block, not inside it.\n//\n// Top-level blocks place the grip relative to their CONTENT edge (border box plus their\n// own inline-start padding), not the border box, so the gap to the text is the same\n// whether or not the block carries breakout padding. Measuring from the border box left\n// the grip 4px into the text on blocks without padding, where it looked attached to it.\nconst HANDLE_OFFSET = 4;\nexport const HANDLE_BUTTON_SIZE = 24;\n\n// The floating \"+\" that appears on empty blocks sits at `left: -26px` with a 19px box\n// (floating-add-plugin-menu.scss, `.ltr`), so its centre is 16.5px left of the content\n// edge. Derive the grip's gap so its centre lands there too — the two never show on the\n// same line, so what reads as \"aligned\" is a shared centre column, not a shared edge.\n// The grip is wider than the \"+\", so matching centres necessarily leaves a smaller gap to\n// the text than the \"+\" has; matching edges instead would visibly offset the centres.\nconst PLUS_BUTTON_INLINE_START = 26;\nconst PLUS_BUTTON_SIZE = 19;\n// Nudge toward the content, on top of the \"+\"-aligned position: the shared centre column\n// read as sitting too far out. Kept as an explicit offset from the derived value rather\n// than a flat number so the \"+\" relationship stays visible — the two centres now differ\n// by this much.\nconst HANDLE_CONTENT_NUDGE = 1;\nconst HANDLE_CONTENT_GAP =\n Math.round(PLUS_BUTTON_INLINE_START - PLUS_BUTTON_SIZE / 2 - HANDLE_BUTTON_SIZE / 2) -\n HANDLE_CONTENT_NUDGE;\n\n// Hover reach: how far past the block's box the grip can sit.\nexport const HANDLE_GUTTER = HANDLE_BUTTON_SIZE + HANDLE_CONTENT_GAP;\n\n/**\n * Ancestor CSS scale of the editor (Wixel zooms its canvas with `transform: scale()`).\n * Every constant above and every computed-style length is in CSS px; every\n * getBoundingClientRect / clientX value is in viewport px, already multiplied by this.\n * Mixing the two is invisible at scale 1 and off by the zoom factor otherwise, so a CSS\n * length entering viewport math is multiplied by the scale, and a viewport length written\n * into the (scaled) grip's inline style is divided by it.\n */\nexport type EditorScale = ReturnType<typeof getElementScale>;\nexport const UNIT_SCALE: EditorScale = { scaleX: 1, scaleY: 1 };\nexport const getViewScale = (view: EditorView): EditorScale => getElementScale(view.dom);\n\n/** Inline-start padding of an element, in physical terms (RTL-aware via computed style). */\nconst getInlineStartPadding = (el: HTMLElement, scaleX: number): number => {\n const style = getComputedStyle(el);\n const pad = style.direction === 'rtl' ? style.paddingRight : style.paddingLeft;\n return (parseFloat(pad) || 0) * scaleX;\n};\n\n/**\n * Distance from the block's border box to its content edge, on the inline-start side.\n *\n * For text blocks that is just their own padding. For a node that defers its content to a\n * nested breakout wrapper it also includes the offset to that wrapper — measuring only the\n * node's own padding put the grip a full breakout gutter to the left of the content, which\n * lands off-screen on a full-width layout.\n */\nconst getBlockContentInset = (blockDom: HTMLElement, isRtl: boolean, scaleX: number): number => {\n const contentEl = getContentEdgeElement(blockDom);\n const ownPadding = getInlineStartPadding(contentEl, scaleX);\n if (contentEl === blockDom) {\n return ownPadding;\n }\n const blockRect = getBlockDomRect(blockDom);\n const contentRect = contentEl.getBoundingClientRect();\n const offsetToContentEl = isRtl\n ? blockRect.right - contentRect.right\n : contentRect.left - blockRect.left;\n return offsetToContentEl + ownPadding;\n};\n\nexport const getScrollParent = (el: Element): Element | null => {\n let current: Element | null = el.parentElement;\n while (current && current !== document.documentElement) {\n const overflow = getComputedStyle(current).overflowY;\n if (overflow === 'auto' || overflow === 'scroll' || overflow === 'overlay') {\n return current;\n }\n current = current.parentElement;\n }\n return null;\n};\n\n// Elements that render a text line box even when empty (caret line height), so an empty\n// paragraph or an empty table's first cell still gives the grip a line to center on.\n// blockquote and pre are the rendered tags of the blockquote and code-block textblocks;\n// non-empty ones are found by the text-node walk above this fallback, but empty ones\n// need to be carriers themselves or the grip anchors to the block top.\nconst TEXT_LINE_CARRIER_SELECTOR = 'p, h1, h2, h3, h4, h5, h6, blockquote, pre';\n\n// A carrier with no real text still renders a caret line box, so it IS the block's\n// first line when it comes before any text in DOM order — an empty first paragraph, an\n// empty table cell, a collapsible item's blank title, a layout's blank first column.\nconst isEmptyCarrier = (el: Element): boolean =>\n el.matches(TEXT_LINE_CARRIER_SELECTOR) && !el.textContent?.trim();\n\n// A text node's line box comes from a Range (its first client rect is the first line\n// after wrapping); an empty carrier's from its own box, whose height is the caret line.\nconst getLineRect = (node: Node): DOMRect | null => {\n if (node instanceof Element) {\n const rect = node.getBoundingClientRect();\n return rect.height > 0 ? rect : null;\n }\n const range = document.createRange();\n range.selectNodeContents(node);\n const lineRect = range.getClientRects()[0];\n return lineRect && lineRect.height > 0 ? lineRect : null;\n};\n\n// Only blocks whose content IS lines of text get first-line anchoring: text blocks (by\n// their rendered tag), plus the compound blocks whose first row/item/column reads as a\n// first line. Any other node type — audio, video, image, embeds — anchors to its top\n// edge instead: the incidental text inside such a card (a track title, a caption) sits\n// mid-card and would drag the grip toward the middle.\nconst TEXT_BLOCK_SELECTOR = `${TEXT_LINE_CARRIER_SELECTOR}, ul, ol`;\n// The compound markers are the node views' own root identifiers: `data-table-container`\n// (table-view.tsx), `data-layout-wrapper` (layout-node-view.ts), and the react-renderer\n// wrapper class tiptap derives from the collapsible list's node type name.\nconst FIRST_LINE_BLOCK_SELECTOR = [\n TEXT_BLOCK_SELECTOR,\n '[data-table-container]',\n '[data-layout-wrapper]',\n `.node-${TIPTAP_COLLAPSIBLE_LIST_TYPE}`,\n].join(', ');\n\n// Lists, blockquote, and code block mount their tag inside a plain wrapper div\n// (withBreakoutContainer), so the node's own DOM is that div — the gate has to look\n// one level down for them. Direct children only: a media card's text sits deeper.\nconst isFirstLineBlock = (blockDom: HTMLElement): boolean =>\n blockDom.matches(FIRST_LINE_BLOCK_SELECTOR) ||\n blockDom.querySelector(`:scope > :is(${TEXT_BLOCK_SELECTOR})`) !== null;\n\n// A nested block-level plugin node (image, video, divider…) reached before any text\n// line means the block LEADS with media — the grip then anchors to the block top rather\n// than to text that happens to appear further down (a layout whose first column starts\n// with an image). Nested plugin nodes render as tiptap `div.react-renderer` node-view\n// wrappers; scoping to table/layout cells keeps this away from the collapsible list,\n// whose items are react-renderers but ARE its first-line sections, and requiring a div\n// keeps inline node views (mentions, emoji — spans) from tripping it mid-paragraph.\nconst isNestedMediaNode = (el: Element): boolean =>\n el.matches('div.react-renderer') && el.closest('td, th, [data-layout-cell]') !== null;\n\n/**\n * Rendered box of the block's first line, or null for blocks that don't get first-line\n * anchoring (image, divider, media cards).\n *\n * One walk in document order over both non-whitespace text nodes and empty text-carrier\n * elements: whichever renders a line box first IS the first line, so a blank first\n * paragraph, an empty table cell, a collapsible item's blank title, or a layout's blank\n * first column wins by position, not by having text — the grip stays on the first line\n * even when that line is empty space. Non-empty carriers are skipped (not rejected), so\n * the walk descends into them and lands on their text instead of their multi-line box.\n * Candidates that render no box (a collapsed item's hidden body — and in jsdom every\n * text node, since Range.getClientRects() is empty there) are passed over, so the walk\n * settles on the first candidate a reader can actually see.\n */\nconst getFirstTextLineRect = (blockDom: HTMLElement): DOMRect | null => {\n if (!isFirstLineBlock(blockDom)) {\n return null;\n }\n const contentEl = getContentEdgeElement(blockDom);\n const walker = document.createTreeWalker(\n contentEl,\n NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_TEXT,\n {\n acceptNode: node => {\n if (node instanceof Element) {\n return isEmptyCarrier(node) || isNestedMediaNode(node)\n ? NodeFilter.FILTER_ACCEPT\n : NodeFilter.FILTER_SKIP;\n }\n return node.nodeValue?.trim() ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;\n },\n }\n );\n for (let node = walker.nextNode(); node; node = walker.nextNode()) {\n if (node instanceof Element && isNestedMediaNode(node)) {\n // Rendered media before any line: the block leads with it — anchor to the top.\n // Hidden media (a collapsed section) doesn't count; keep walking.\n if (node.getBoundingClientRect().height > 0) {\n return null;\n }\n continue;\n }\n const lineRect = getLineRect(node);\n if (lineRect) {\n return lineRect;\n }\n }\n // The content edge element can itself be the carrier (an empty top-level paragraph\n // block) — the walk above only visits descendants of its root.\n const selfRect = isEmptyCarrier(contentEl) ? contentEl.getBoundingClientRect() : null;\n return selfRect && selfRect.height > 0 ? selfRect : null;\n};\n\n/**\n * Viewport-space top for the grip, clamped into the block's visible band.\n *\n * The grip centers on the block's first text line, so it visually pairs with the text it\n * grabs (a heading's tall first line, a table's first-row cell). Blocks outside the\n * first-line whitelist (images, dividers, media cards) anchor to the block's top edge\n * instead. A block taller than the\n * viewport — a layout, a full-width image — would otherwise lose its grip off the top of\n * the screen as soon as that edge scrolls away, so the block reads as having no handle at\n * all; hence the clamp into the visible band.\n */\nexport const getClampedHandleTop = (\n blockDom: HTMLElement,\n blockRect: DOMRect,\n // positionHandle measures the first line anyway (float-wrap anchoring) — accept it to\n // avoid a second TreeWalker pass per measure.\n firstLine: DOMRect | null = getFirstTextLineRect(blockDom),\n scaleY = 1\n): number => {\n const gripSize = HANDLE_BUTTON_SIZE * scaleY;\n // Centering the 24px grip on a much shorter line (tiny font sizes) reads as the button\n // swallowing the text rather than marking it — those blocks keep the plain top-edge\n // anchor instead. Normal text lines (~20px and up) stay centered; the block-top clamp\n // catches lines in between whose centered position would poke above the block.\n const centeringMakesSense = firstLine && firstLine.height >= gripSize / 2;\n const anchorTop = centeringMakesSense\n ? Math.max(blockRect.top, firstLine.top + (firstLine.height - gripSize) / 2)\n : blockRect.top;\n const scrollParent = getScrollParent(blockDom);\n // Intersect with the window: the scroll container itself may be partly off-screen.\n const visibleTop = Math.max(scrollParent?.getBoundingClientRect().top ?? 0, 0);\n // Never push the grip past the block's own bottom edge.\n const lowestTop = Math.max(anchorTop, blockRect.bottom - gripSize);\n return Math.min(Math.max(anchorTop, visibleTop), lowestTop);\n};\n\n// Plain object cast — new DOMRect() getters (left/right) are unreliable in jsdom.\nconst makeRect = (left: number, top: number, width: number, height: number): DOMRect =>\n ({\n left,\n top,\n right: left + width,\n bottom: top + height,\n width,\n height,\n x: left,\n y: top,\n toJSON: () => ({}),\n }) as DOMRect;\n\n// Include the handle's gutter in hover hit-testing so moving onto the grip\n// doesn't drop the widget before the pointer arrives. Every block needs this: the grip sits\n// in the gutter beside every block's content, so a rect stopping at the block's own box\n// would drop the widget as the pointer leaves the text.\n/**\n * Rendered box of the node's aligned content container, or null when the node has none.\n *\n * A right- or center-aligned node without text wrap (an image pushed sideways by auto\n * margins) keeps its node-view wrapper full-width while the visible content shrinks —\n * anchoring the grip to the wrapper's edge put it a full editor width away from the\n * image. The placement container stamps `data-plugin-alignment` (styles HOC), and its\n * rect is the grip's horizontal anchor instead. The lookup walks the first-child spine\n * only and stops at a nested node view, so a container block's grip doesn't anchor to\n * an aligned node inside its first cell.\n */\nexport const getAlignedContentRect = (blockDom: HTMLElement): DOMRect | null => {\n let el = blockDom.firstElementChild;\n while (el instanceof HTMLElement && !el.classList.contains('react-renderer')) {\n if (el.dataset.pluginAlignment) {\n const rect = el.getBoundingClientRect();\n return rect.width > 0 && rect.height > 0 ? rect : null;\n }\n el = el.firstElementChild;\n }\n return null;\n};\n\n// Ignoring list/blockquote text indents (well under this) but catching any real float\n// (image widths start around 100px).\nconst FLOAT_TEXT_INSET_MIN = 48;\n// A few px inside the content edge, clear of sub-pixel boundary jitter.\nconst FLOAT_PROBE_INSET = 8;\n\n/**\n * True when ANOTHER block's content renders at this block's content edge at its first\n * line's height — i.e. a float intrudes there and this block's text wraps beside it.\n *\n * A hit-test rather than a sibling walk on purpose: a tall float wraps SEVERAL\n * following blocks ([image][paragraph][list]…), so only the first of them has the float\n * as a direct neighbor — any sibling-order heuristic misses the rest. What actually\n * paints at the edge is order-independent. The probe can't distinguish a float from\n * this block's own box without the ancestry checks: an element of this block (its list\n * marker, its own wrapper) means the inset is an indent, not an intrusion.\n */\nconst isForeignBlockAtContentEdge = (\n blockDom: HTMLElement,\n contentEdge: number,\n firstLine: DOMRect,\n isRtl: boolean\n): boolean => {\n // jsdom has no elementsFromPoint; the feature is inert there (like first-line\n // centering, whose Range rects jsdom can't measure either).\n if (typeof document.elementsFromPoint !== 'function') {\n return false;\n }\n const x = isRtl ? contentEdge - FLOAT_PROBE_INSET : contentEdge + FLOAT_PROBE_INSET;\n const y = firstLine.top + firstLine.height / 2;\n for (const el of document.elementsFromPoint(x, y)) {\n if (!(el instanceof HTMLElement) || el.closest('[data-block-drag-handle]')) {\n continue;\n }\n if (el === blockDom || blockDom.contains(el)) {\n return false;\n }\n // An ancestor (the editor root, a card section) means the probe fell through to\n // background at this layer — keep looking below it.\n if (el.contains(blockDom)) {\n continue;\n }\n // First non-ancestor element that shares this block's editor: the intruding float.\n if (el.closest('.ProseMirror')?.contains(blockDom)) {\n return true;\n }\n }\n return false;\n};\n\n/**\n * Inline-start edge of the block's visible first text line when a float pushes it\n * inward, or null when the block starts at its own content edge.\n *\n * A wrap-text float ([image floats left][text wraps beside it]) leaves the block's\n * content edge a full image away from where the text actually begins. A grip anchored\n * to that far edge is unreachable: traveling to it crosses the float, whose hover takes\n * over and swaps the grip for the float's own. Anchoring to the first line's visible\n * start keeps the journey a few pixels, the same \"grip hugs the visible content\" rule\n * aligned nodes use.\n */\nconst getWrapFloatTextEdge = (\n blockDom: HTMLElement,\n firstLine: DOMRect | null,\n contentEdge: number,\n isRtl: boolean\n): number | null => {\n if (!firstLine) {\n return null;\n }\n const inset = isRtl ? contentEdge - firstLine.right : firstLine.left - contentEdge;\n if (inset < FLOAT_TEXT_INSET_MIN) {\n return null;\n }\n if (!isForeignBlockAtContentEdge(blockDom, contentEdge, firstLine, isRtl)) {\n return null;\n }\n return isRtl ? firstLine.right : firstLine.left;\n};\n\nexport const getBlockHoverRect = (\n blockDom: HTMLElement,\n isRtl: boolean,\n { scaleX }: EditorScale = UNIT_SCALE\n): DOMRect => {\n const rect = getBlockDomRect(blockDom);\n const gutter = HANDLE_GUTTER * scaleX;\n const left = isRtl ? rect.left : rect.left - gutter;\n return makeRect(left, rect.top, rect.width + gutter, rect.height);\n};\n\nexport const isPointerInBlockHoverRect = (\n blockDom: HTMLElement,\n clientX: number,\n clientY: number,\n isRtl: boolean,\n scale: EditorScale = UNIT_SCALE\n): boolean => containsPoint(getBlockHoverRect(blockDom, isRtl, scale), clientX, clientY);\n\n// Shared horizontal hit-test for both the per-block gutter zone (below) and the\n// editor-wide gutter strip (isPointerInEditorGutterStrip in plugin.ts).\n// Both compute the same shape of band — reaching HANDLE_BUTTON_SIZE + HANDLE_OFFSET from\n// a \"content edge\" on one side, and an already-resolved \"outer bound\" on the other —\n// but against different rects (a block's own vs. the editor's), so callers resolve\n// those two edges themselves rather than this helper unifying the rect sources.\nexport const isXInHandleZone = (\n clientX: number,\n isRtl: boolean,\n contentEdge: number,\n outerBound: number,\n scaleX = 1\n): boolean => {\n const innerBand = (HANDLE_BUTTON_SIZE + HANDLE_OFFSET) * scaleX;\n return isRtl\n ? clientX >= contentEdge - innerBand && clientX <= outerBound\n : clientX >= outerBound && clientX <= contentEdge + innerBand;\n};\n\n// Returns true when the pointer is within the horizontal band where the drag\n// handle is rendered — covers both the outside gutter (text in layout/table\n// cells or breakout blocks) and the inside-left zone for top-level blocks.\n// For top-level blocks (not inside a cell) the zone also extends left by\n// HANDLE_GUTTER so clicks in the editor's left margin beside a block (e.g.\n// beside an image that has no outside gutter) still start box-select.\n// Vertical slack on the gutter band: a pointer aiming at the grip and overshooting the\n// block's edge by a few pixels must not drop the hover — the grip would unmount right\n// under the incoming pointer.\nconst GUTTER_HOVER_SLACK_Y = 8;\n\nexport const isPointerInBlockHandleZone = (\n blockDom: HTMLElement,\n clientX: number,\n clientY: number,\n isRtl: boolean,\n scale: EditorScale = UNIT_SCALE\n): boolean => {\n const { scaleX, scaleY } = scale;\n const blockRect = getBlockDomRect(blockDom);\n const slackY = GUTTER_HOVER_SLACK_Y * scaleY;\n if (clientY < blockRect.top - slackY || clientY > blockRect.bottom + slackY) {\n return false;\n }\n const hoverRect = getBlockHoverRect(blockDom, isRtl, scale);\n // Expand past the hover rect to cover the editor margin, so clicks beside a block\n // (e.g. beside an image) still start box-select.\n // The grip is placed off the content edge, so the zone has to reach that far too —\n // otherwise a node whose content is inset from its box (layout) has its grip outside\n // the zone that starts box-select. For an aligned node the grip hugs the visible\n // content box, so the zone reaches that edge instead — the dead space beside the\n // content behaves like the editor margin.\n const alignedRect = getAlignedContentRect(blockDom);\n const contentInset = alignedRect ? 0 : getBlockContentInset(blockDom, isRtl, scaleX);\n const edgeRect = alignedRect ?? blockRect;\n const contentEdge = isRtl ? edgeRect.right - contentInset : edgeRect.left + contentInset;\n const gutter = HANDLE_GUTTER * scaleX;\n const outerBound = isRtl ? hoverRect.right + gutter : hoverRect.left - gutter;\n return isXInHandleZone(clientX, isRtl, contentEdge, outerBound, scaleX);\n};\n\n// A layout with no outer gutter puts the grip in the block's own inline-start padding, so\n// that strip before the content edge is the gutter there.\nexport const isPointerInBlockInset = (\n blockDom: HTMLElement,\n clientX: number,\n { scaleX }: EditorScale = UNIT_SCALE\n): boolean => {\n // The block's own direction, which is the side getInlineStartPadding reads the padding from.\n const isRtl = getComputedStyle(blockDom).direction === 'rtl';\n const inset = getBlockContentInset(blockDom, isRtl, scaleX);\n const rect = getBlockDomRect(blockDom);\n return isRtl\n ? clientX > rect.right - inset && clientX <= rect.right\n : clientX >= rect.left && clientX < rect.left + inset;\n};\n\n/** True when the pointer sits in the handle zone of any of the given blocks. */\nexport const isPointerInHandleGutter = (\n view: EditorView,\n clientX: number,\n clientY: number,\n positions: number[]\n): boolean => {\n const isRtl = getComputedStyle(view.dom).direction === 'rtl';\n const scale = getViewScale(view);\n return positions.some(pos => {\n const dom = view.nodeDOM(pos);\n return (\n dom instanceof HTMLElement && isPointerInBlockHandleZone(dom, clientX, clientY, isRtl, scale)\n );\n });\n};\n\nexport const getBlockPosFromHandleUnderPointer = (\n clientX: number,\n clientY: number\n): number | null => {\n const element = document.elementFromPoint(clientX, clientY);\n // `Element`, not `HTMLElement`: the hit is usually the grip's <svg>/<path> icon, which\n // is an SVGElement — an HTMLElement guard reads the pointer on the grip as \"no grip\".\n const handle = element instanceof Element ? element.closest('[data-block-drag-handle]') : null;\n if (!(handle instanceof HTMLElement)) {\n return null;\n }\n const pos = Number(handle.dataset.blockDragHandlePosition);\n return Number.isFinite(pos) ? pos : null;\n};\n\nexport type Rect = Pick<DOMRect, 'left' | 'right' | 'top' | 'bottom'>;\n\nexport const containsPoint = (rect: Rect, x: number, y: number): boolean =>\n x >= rect.left && x <= rect.right && y >= rect.top && y <= rect.bottom;\n\n// Collision mode for the grip and a table's row handle: the row handle straddles the\n// table's inline-start edge, the same spot the grip occupies — with the FIRST row\n// selected the two stack. Rather than hiding either, both shrink (styles.scss rules\n// keyed on this attribute) and the hovered one grows back to full size.\nconst HANDLE_COLLISION_ATTR = 'data-handle-collision';\n\n// The rendered rect of an already-shrunken element lies: the scale is visual only.\n// The row handle scales around its center (styles.scss), so the full-size box shares\n// the center — reconstruct it so the overlap decision is stable across the shrink\n// (no shrink → measure smaller → un-shrink flicker loop). The scale is read off the\n// computed matrix rather than assumed, since the shrunken state has two depths (0.7,\n// and the deeper hover-yield) and a hovered handle is back at 1. The grip never needs\n// this: its overlap box comes from the computed placement, not a DOM measurement.\nconst getUnscaledRect = (el: HTMLElement): DOMRect => {\n const rect = el.getBoundingClientRect();\n if (!el.hasAttribute(HANDLE_COLLISION_ATTR)) {\n return rect;\n }\n const { transform } = getComputedStyle(el);\n // matrix(a, b, c, d, e, f) — `a` IS the scale here (translate + uniform scale only).\n const scale = transform.startsWith('matrix(') ? parseFloat(transform.slice(7)) : 1;\n if (!Number.isFinite(scale) || scale <= 0 || scale === 1) {\n return rect;\n }\n const width = rect.width / scale;\n const height = rect.height / scale;\n return makeRect(\n rect.left - (width - rect.width) / 2,\n rect.top - (height - rect.height) / 2,\n width,\n height\n );\n};\n\n// The row handle the grip last collided with, so unmounting the grip (hover moved on)\n// releases the row handle from its shrunken state.\nconst collisionTargets = new WeakMap<HTMLElement, HTMLElement>();\nconst collisionRecheckRafs = new WeakMap<HTMLElement, number>();\n\nexport const releaseCollisionTarget = (handle: HTMLElement): void => {\n const rafId = collisionRecheckRafs.get(handle);\n if (rafId) {\n cancelAnimationFrame(rafId);\n collisionRecheckRafs.delete(handle);\n }\n collisionTargets.get(handle)?.removeAttribute(HANDLE_COLLISION_ATTR);\n collisionTargets.delete(handle);\n};\n\nconst applyRowHandleCollision = (\n handle: HTMLElement,\n blockDom: HTMLElement,\n gripLeft: number,\n gripTop: number,\n { scaleX, scaleY }: EditorScale\n): void => {\n const rowHandle = blockDom.querySelector<HTMLElement>('[data-hook=\"row-handle\"]');\n const rowRect = rowHandle ? getUnscaledRect(rowHandle) : null;\n // A hidden row handle (table not focused, whole table selected) measures 0x0.\n const overlaps =\n !!rowRect &&\n rowRect.width > 0 &&\n rowRect.height > 0 &&\n gripLeft < rowRect.right &&\n gripLeft + HANDLE_BUTTON_SIZE * scaleX > rowRect.left &&\n gripTop < rowRect.bottom &&\n gripTop + HANDLE_BUTTON_SIZE * scaleY > rowRect.top;\n handle.toggleAttribute(HANDLE_COLLISION_ATTR, overlaps);\n if (overlaps && rowHandle) {\n // A previous collision partner (the handle of a row selected earlier) must be\n // released before adopting the new one, or it stays shrunken forever.\n if (collisionTargets.get(handle) !== rowHandle) {\n collisionTargets.get(handle)?.removeAttribute(HANDLE_COLLISION_ATTR);\n }\n // Keep an existing value: a re-measure mid grip-hover must not reset 'yield'.\n if (!rowHandle.hasAttribute(HANDLE_COLLISION_ATTR)) {\n rowHandle.setAttribute(HANDLE_COLLISION_ATTR, '');\n }\n collisionTargets.set(handle, rowHandle);\n } else {\n collisionTargets.get(handle)?.removeAttribute(HANDLE_COLLISION_ATTR);\n collisionTargets.delete(handle);\n }\n};\n\n// A full-size grip and a 0.7 row handle still graze each other (the shrink only frees a\n// few px), so while the grip is hovered — expanded back to full size — its collision\n// partner yields deeper (styles.scss 'yield' rule: smaller still, staying centered).\n// The row handle's own hover needs no mirror: the shrunken grip hugs the far side of\n// the gap and the expanded row handle stays clear of it.\nexport const setCollisionYield = (handle: HTMLElement, yielding: boolean): void => {\n const partner = collisionTargets.get(handle);\n if (partner?.hasAttribute(HANDLE_COLLISION_ATTR)) {\n partner.setAttribute(HANDLE_COLLISION_ATTR, yielding ? 'yield' : '');\n }\n};\n\nexport const syncRowHandleCollision = (\n handle: HTMLElement,\n blockDom: HTMLElement,\n gripLeft: number,\n gripTop: number,\n scale: EditorScale = UNIT_SCALE\n): void => {\n applyRowHandleCollision(handle, blockDom, gripLeft, gripTop, scale);\n // The table repositions its row handle in its own selectionUpdate rAF, which can run\n // AFTER this measure — a selection moving off the first row would then leave both\n // parties stuck shrunken (nothing re-triggers a measure once the handle moves).\n // Re-check one frame later, when the row handle has settled.\n const prev = collisionRecheckRafs.get(handle);\n if (prev) {\n cancelAnimationFrame(prev);\n }\n collisionRecheckRafs.set(\n handle,\n requestAnimationFrame(() => {\n collisionRecheckRafs.delete(handle);\n if (handle.isConnected) {\n applyRowHandleCollision(handle, blockDom, gripLeft, gripTop, scale);\n }\n })\n );\n};\n\nconst positionHandle = (\n handle: HTMLElement,\n blockDom: HTMLElement,\n isRtl: boolean,\n scale: EditorScale\n) => {\n const { scaleX, scaleY } = scale;\n const gripWidth = HANDLE_BUTTON_SIZE * scaleX;\n // The handle's own offsetParent, not the block's: absolute left/top set below resolve\n // against the element's positioning base, and a display:contents block wrapper has NO\n // offsetParent of its own — the early return then left the grip unpositioned, sitting\n // in flow on top of the image. For normal blocks the widget is the block's sibling, so\n // both share the same offsetParent anyway.\n const parent = handle.offsetParent as HTMLElement | null;\n if (!parent) {\n return;\n }\n const blockRect = getBlockDomRect(blockDom);\n const parentRect = parent.getBoundingClientRect();\n\n // The grip hugs the inline-start edge of the content it grabs. Three anchor sources,\n // most specific first: an aligned node's visible content box (its edge IS the content\n // edge — no padding of its own); the first text line of a block whose text a float\n // pushes inward; otherwise the block's own content edge (border box plus inline-start\n // padding), so the grip clears the text by the same amount whether or not the block\n // carries breakout padding.\n const firstLine = getFirstTextLineRect(blockDom);\n const alignedRect = getAlignedContentRect(blockDom);\n const contentInset = getBlockContentInset(blockDom, isRtl, scaleX);\n const contentEdge = isRtl ? blockRect.right - contentInset : blockRect.left + contentInset;\n const anchorEdge = alignedRect\n ? isRtl\n ? alignedRect.right\n : alignedRect.left\n : (getWrapFloatTextEdge(blockDom, firstLine, contentEdge, isRtl) ?? contentEdge);\n\n const gap = HANDLE_CONTENT_GAP * scaleX;\n const desiredLeft = isRtl ? anchorEdge + gap : anchorEdge - gripWidth - gap;\n\n // Clamp into the horizontally visible band, mirroring getClampedHandleTop: a large\n // content width shrinks the gutter below the grip's reach, and the desired position\n // hangs past the window's (or scroll container's) inline-start edge — the grip then\n // shows with its outer half cut off. Sliding it inward eats the content gap first and\n // only then overlaps the content edge; the grip exists only on hover, so a brief\n // overlap beats a half-visible button.\n const scrollParentRect = getScrollParent(blockDom)?.getBoundingClientRect();\n const clampedLeft = isRtl\n ? Math.min(\n desiredLeft,\n Math.min(scrollParentRect?.right ?? Infinity, window.innerWidth) - gripWidth\n )\n : Math.max(desiredLeft, Math.max(scrollParentRect?.left ?? 0, 0));\n const top = getClampedHandleTop(blockDom, blockRect, firstLine, scaleY);\n\n // Viewport offsets → the grip's own CSS px: its inline style is applied inside the\n // scaled subtree, so the browser multiplies it back by the scale.\n handle.style.position = '';\n handle.style.top = `${(top - parentRect.top) / scaleY}px`;\n if (isRtl) {\n handle.style.left = 'auto';\n handle.style.right = `${(parentRect.right - (clampedLeft + gripWidth)) / scaleX}px`;\n } else {\n handle.style.right = 'auto';\n handle.style.left = `${(clampedLeft - parentRect.left) / scaleX}px`;\n }\n\n syncRowHandleCollision(handle, blockDom, clampedLeft, top, scale);\n};\n\ntype HandleDragLifecycle = {\n onDragStart: (positions: number[]) => void;\n onDragEnd: () => void;\n};\n\n// What the grip can't derive from the view itself: the plugin's i18n, the react-node types\n// that paint their own focus ring (drives NodeSelection vs. neutral caret on select), the\n// drag-visuals lifecycle owned by the plugin closure, and which of the two grips this is.\nexport type HandleElementOptions = {\n t: TFunction;\n typesWithOwnFocusRing: ReadonlySet<string>;\n isMultiHandle?: boolean;\n dragLifecycle?: HandleDragLifecycle;\n};\n\n/**\n * The blocks a drag grabbed at `pos` moves: the whole multi-selection when `pos` is part\n * of it, else just this block. Reads live selectedPositions — kept current through every\n * transaction by mapSelectedPositionsThroughTransaction.\n */\nconst getDragPositions = (view: EditorView, pos: number): number[] => {\n const selected = getPluginState(view).selectedPositions;\n return selected.length > 1 && selected.includes(pos) ? selected : [pos];\n};\n\nexport const createHandleElement = (\n view: EditorView,\n getPos: () => number | undefined,\n options: HandleElementOptions\n): HTMLElement => {\n const { t, typesWithOwnFocusRing, isMultiHandle = false, dragLifecycle } = options;\n const handle = document.createElement('div');\n handle.setAttribute('contenteditable', 'false');\n handle.dataset.blockDragHandle = '';\n handle.classList.add(styles.blockDragHandle);\n // The hover-bridge (::after, styles.scss) has to reach exactly as\n // far as the gutter the block's hover rect already accounts for, or the grip either\n // leaves a gap the pointer can fall through or overshoots into the text. Set once\n // here instead of a literal in SCSS silently duplicating this value.\n handle.style.setProperty('--ricos-block-drag-handle-gutter', `${HANDLE_GUTTER}px`);\n\n const button = document.createElement('button');\n button.setAttribute('type', 'button');\n button.setAttribute('draggable', 'true');\n button.setAttribute(\n 'aria-label',\n isMultiHandle\n ? t('BlockDragHandle_MultiButton_AriaLabel')\n : t('BlockDragHandle_Button_AriaLabel')\n );\n button.setAttribute('aria-roledescription', t('BlockDragHandle_Button_AriaRoleDescription'));\n button.setAttribute(\n 'title',\n isMultiHandle ? t('BlockDragHandle_MultiButton_Title') : t('BlockDragHandle_Button_Title')\n );\n button.classList.add(styles.blockDragHandleButton);\n button.innerHTML = getSixDotHandleIcon();\n handle.append(button);\n\n button.addEventListener('mouseenter', () => setCollisionYield(handle, true));\n button.addEventListener('mouseleave', () => setCollisionYield(handle, false));\n\n // A `react-node` target's visible content can be mounted by React\n // asynchronously, so re-measure a frame later in case this initial\n // measurement caught a not-yet-mounted placeholder.\n const measureAndPosition = () => {\n const pos = getPos();\n if (pos === undefined) {\n return;\n }\n let blockDom: Node | null = null;\n try {\n blockDom = view.nodeDOM(pos);\n } catch {\n return;\n }\n handle.dataset.blockDragHandlePosition = String(pos);\n if (blockDom instanceof HTMLElement) {\n const editorIsRtl = getComputedStyle(view.dom).direction === 'rtl';\n handle.dir = editorIsRtl ? 'rtl' : 'ltr';\n positionHandle(handle, blockDom, editorIsRtl, getViewScale(view));\n }\n };\n\n handleMeasures.set(handle, measureAndPosition);\n\n measureAndPosition();\n let rafId = requestAnimationFrame(() => {\n rafId = 0;\n measureAndPosition();\n handle.classList.add(styles.visible);\n });\n\n const pos = getPos();\n const blockDom = pos !== undefined ? view.nodeDOM(pos) : null;\n let resizeObserver: ResizeObserver | null = null;\n if (blockDom instanceof HTMLElement) {\n resizeObserver = new ResizeObserver(() => {\n measureAndPosition();\n });\n resizeObserver.observe(blockDom);\n }\n\n // The clamped top is viewport-relative, so it has to be recomputed as the block scrolls\n // past the visible edge — otherwise the grip only stays in view where it happened to be\n // when the pointer arrived. Capture phase: scroll does not bubble.\n let scrollRafId = 0;\n const onScroll = () => {\n if (scrollRafId) {\n return;\n }\n scrollRafId = requestAnimationFrame(() => {\n scrollRafId = 0;\n measureAndPosition();\n });\n };\n document.addEventListener('scroll', onScroll, {\n capture: true,\n passive: true,\n });\n\n let suppressClick = false;\n\n handleCleanups.set(handle, () => {\n if (rafId) {\n cancelAnimationFrame(rafId);\n }\n if (scrollRafId) {\n cancelAnimationFrame(scrollRafId);\n }\n document.removeEventListener('scroll', onScroll, { capture: true });\n resizeObserver?.disconnect();\n resizeObserver = null;\n releaseCollisionTarget(handle);\n });\n\n // The multi-handle sits on the selection, not the hover — pinning the hover to its\n // block would fight the geometric resolution, so only the single grip keeps hover.\n if (!isMultiHandle) {\n // The pointer is on this grip, so its block is the hovered one — no hit-test needed;\n // a stale position with no node stays dropped.\n const pinHover = () => {\n const pos = getPos();\n if (pos !== undefined) {\n setHoveredPos(view, view.state.doc.nodeAt(pos) ? pos : null);\n }\n };\n handle.addEventListener('mouseenter', pinHover);\n handle.addEventListener('mousemove', pinHover);\n }\n handle.addEventListener('mousedown', event => {\n event.stopPropagation();\n });\n\n const onRelease = () => {\n window.setTimeout(() => {\n if (!view.dragging) {\n setHandleDragPreparing(view, false);\n clearDraggingPositions(view);\n }\n }, 0);\n };\n\n button.addEventListener('mousedown', event => {\n // Never preventDefault here — it suppresses native drag on draggable=\"true\".\n event.stopPropagation();\n // A right-click opens the context menu, which swallows the release.\n if (event.button !== 0) {\n return;\n }\n setHandleDragPreparing(view, true);\n // The release can land anywhere — off the grip, or after this grip was unmounted\n // mid-press — and a missed release strands the flag, which silences hover (and so\n // every grip) for good. Catch it on the window instead of the button.\n window.addEventListener('mouseup', onRelease, { capture: true, once: true });\n // Grabbing a handle outside the current multi-select starts a drag of just this\n // block (see getDragPositions above), but a plain click never fires to update the\n // selection ring — the browser suppresses it once a drag occurs. Without this, the\n // old multi-select stays visibly selected underneath an unrelated drag. Mousedown\n // (unlike dragstart) can still safely dispatch a transaction here.\n //\n // NOT for modified mousedowns: shift/meta-click extends the current selection from\n // its anchor, and this grab fires before the click event — replacing the selection\n // here would destroy the very anchor the click is about to extend.\n const isSelectionExtendingClick = event.shiftKey || event.metaKey || event.ctrlKey;\n const pos = getPos();\n if (pos !== undefined && !isSelectionExtendingClick) {\n const next = computeSelectedPositionsOnDragGrab(getPluginState(view).selectedPositions, pos);\n if (next) {\n selectBlocks(view, next, typesWithOwnFocusRing);\n }\n }\n });\n\n button.addEventListener('click', event => {\n if (suppressClick) {\n suppressClick = false;\n return;\n }\n const pos = getPos();\n if (pos === undefined) {\n return;\n }\n const next = computeSelectedPositionsOnClick(\n view.state.doc,\n getPluginState(view).selectedPositions,\n {\n pos,\n shiftKey: event.shiftKey,\n metaKey: event.metaKey || event.ctrlKey,\n }\n );\n selectBlocks(view, next, typesWithOwnFocusRing);\n });\n\n button.addEventListener('dragstart', event => {\n const pos = getPos();\n if (pos === undefined || !event.dataTransfer) {\n // Without a payload, don't let the browser fall back to a native drag of\n // whatever it finds (the button's own text) — it can land as a stray drop\n // elsewhere with no relation to this handle.\n event.preventDefault();\n return;\n }\n\n const dragPositions = getDragPositions(view, pos);\n const dragPayload = buildDragSliceForPositions(view, dragPositions);\n if (!dragPayload) {\n event.preventDefault();\n return;\n }\n\n const node = view.state.doc.nodeAt(pos);\n if (!node) {\n event.preventDefault();\n return;\n }\n\n const dom = view.nodeDOM(pos);\n\n const { slice, nodeSelection } = dragPayload;\n event.dataTransfer.effectAllowed = 'move';\n event.dataTransfer.setData('text/plain', ' ');\n event.stopPropagation();\n\n setDraggingPositions(view, dragPositions);\n setHandleDragPreparing(view, false);\n window.removeEventListener('mouseup', onRelease, { capture: true });\n dragLifecycle?.onDragStart(dragPositions);\n\n // Do not dispatch here — a transaction rebuilds the handle widget and kills the drag.\n view.dragging = {\n slice,\n move: dragMoves(event),\n node: nodeSelection,\n } as EditorView['dragging'];\n\n suppressClick = true;\n\n if (dom instanceof HTMLElement) {\n buildDragGhost(dom, dragPositions, event.dataTransfer, event.clientX, event.clientY);\n }\n });\n\n button.addEventListener('dragend', () => {\n setHandleDragPreparing(view, false);\n dragLifecycle?.onDragEnd();\n // Drop the published drop-cursor position so an aborted drag (Escape, drop\n // outside the editor) can't leave a stale value for the next drag to read.\n dragDropInsertPos.clear(view);\n // Clear immediately so ProseMirror's own deferred dragend timer (50ms) sees null\n // and doesn't accidentally clear a new drag's view.dragging.\n view.dragging = null;\n // Snapshot the positions reference — if a new drag starts before this timeout fires\n // (new setDraggingPositions creates a different array), the deferred clear is a no-op.\n const posSnapshot = getDraggingPositions(view);\n window.setTimeout(() => {\n const current = getDraggingPositions(view);\n if (current === posSnapshot) {\n clearDraggingPositions(view);\n }\n }, 0);\n });\n\n return handle;\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,2BAA6C;AAE7C,kCAAkC;AAClC,+BAAoC;AACpC,sCAAsC;AACtC,+BAAgC;AAGhC,wBAAgC;AAChC,wBAKO;AACP,mBAA+B;AAC/B,wBAA8C;AAC9C,uBAKO;AACP,yBAAmB;AAEnB,MAAM,iBAAiB,oBAAI,QAAiC;AAC5D,MAAM,iBAAiB,oBAAI,QAAiC;AAErD,MAAM,uBAAuB,CAAC,SAAqB;AACxD,MAAI,EAAE,gBAAgB,cAAc;AAClC;AAAA,EACF;AACA,iBAAe,IAAI,IAAI,IAAI;AAC3B,iBAAe,OAAO,IAAI;AAC1B,iBAAe,OAAO,IAAI;AAC5B;AAWO,MAAM,0BAA0B,CAAC,SAA2B;AACjE,OAAK,IACF,iBAA8B,0BAA0B,EACxD,QAAQ,YAAU,eAAe,IAAI,MAAM,IAAI,CAAC;AACrD;AAIA,MAAM,YAAY,CAAC,UAA8B;AAC/C,QAAM,OAAQ,UAAmE;AACjF,QAAM,WAAW,MAAM,YAAY,UAAU;AAC7C,QAAM,MAAM,OAAO,KAAK,QAAQ,IAAI,WAAW;AAC/C,SAAO,CAAC,MAAM,GAAG;AACnB;AAUA,M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W;AAGhB,UAAM,kBAAc,wCAAqB,IAAI;AAC7C,WAAO,WAAW,MAAM;AACtB,YAAM,cAAU,wCAAqB,IAAI;AACzC,UAAI,YAAY,aAAa;AAC3B,sDAAuB,IAAI;AAAA,MAC7B;AAAA,IACF,GAAG,CAAC;AAAA,EACN,CAAC;AAED,SAAO;AACT;",
|
|
6
6
|
"names": ["styles", "pos", "blockDom"]
|
|
7
7
|
}
|
|
@@ -202,6 +202,30 @@ const isPointerInActiveHandleZone = (view, clientX, clientY) => {
|
|
|
202
202
|
...selectedPositions
|
|
203
203
|
]);
|
|
204
204
|
};
|
|
205
|
+
const isPointerInTextBlockInset = (view, event) => {
|
|
206
|
+
if (!(event.target instanceof Node)) {
|
|
207
|
+
return false;
|
|
208
|
+
}
|
|
209
|
+
let $pos;
|
|
210
|
+
try {
|
|
211
|
+
$pos = view.state.doc.resolve(view.posAtDOM(event.target, 0));
|
|
212
|
+
} catch {
|
|
213
|
+
return false;
|
|
214
|
+
}
|
|
215
|
+
if (!$pos.parent.isTextblock || $pos.depth === 0) {
|
|
216
|
+
return false;
|
|
217
|
+
}
|
|
218
|
+
const dom = view.nodeDOM($pos.before());
|
|
219
|
+
return dom instanceof HTMLElement && (0, import_dom.isPointerInBlockInset)(dom, event.clientX, (0, import_dom.getViewScale)(view));
|
|
220
|
+
};
|
|
221
|
+
const placeCaretAtCoords = (view, clientX, clientY) => {
|
|
222
|
+
const coords = (0, import_drop.safePosAtCoords)(view, clientX, clientY);
|
|
223
|
+
if (!coords) {
|
|
224
|
+
return;
|
|
225
|
+
}
|
|
226
|
+
view.dispatch(view.state.tr.setSelection(import_state.TextSelection.near(view.state.doc.resolve(coords.pos))));
|
|
227
|
+
view.focus();
|
|
228
|
+
};
|
|
205
229
|
const clearHoveredPos = (view) => {
|
|
206
230
|
const current = (0, import_plugin_key.getPluginState)(view);
|
|
207
231
|
if (current.hoveredPos !== null) {
|
|
@@ -754,10 +778,17 @@ const createBlockDragHandlePlugin = (extensions, t) => {
|
|
|
754
778
|
}
|
|
755
779
|
if (isTextEditTarget(event.target)) {
|
|
756
780
|
if (!event.shiftKey) {
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
781
|
+
if (!isPointerInTextBlockInset(view, event)) {
|
|
782
|
+
clearSelectedBlocks(view);
|
|
783
|
+
return false;
|
|
784
|
+
}
|
|
785
|
+
const { clientX, clientY } = event;
|
|
786
|
+
(0, import_box_select.startBoxSelect)(view, event, {
|
|
787
|
+
...makeBoxSelectCallbacks(view, typesWithOwnFocusRing),
|
|
788
|
+
onPlainClick: () => placeCaretAtCoords(view, clientX, clientY)
|
|
789
|
+
});
|
|
790
|
+
return true;
|
|
791
|
+
} else if (event.target instanceof Element && getComputedStyle(event.target).display.startsWith("inline")) {
|
|
761
792
|
return false;
|
|
762
793
|
}
|
|
763
794
|
} else if (!event.shiftKey && !isPointerInActiveHandleZone(view, event.clientX, event.clientY)) {
|