@opentiny/fluent-editor 4.0.0-alpha.1 → 4.0.0-alpha.3
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/README.md +7 -24
- package/es/config/editor.utils.es.js +0 -2
- package/es/config/editor.utils.es.js.map +1 -1
- package/es/config/index.es.js +2 -2
- package/es/config/index.es.js.map +1 -1
- package/es/config/types/index.es.js +0 -20
- package/es/config/types/index.es.js.map +1 -1
- package/es/core/fluent-editor.es.js +4 -1
- package/es/core/fluent-editor.es.js.map +1 -1
- package/es/fluent-editor.es.js +26 -19
- package/es/fluent-editor.es.js.map +1 -1
- package/es/formats/emoji.es.js +14 -0
- package/es/formats/emoji.es.js.map +1 -0
- package/es/formats/index.es.js +11 -0
- package/es/formats/index.es.js.map +1 -0
- package/es/formats/soft-break.es.js +12 -5
- package/es/formats/soft-break.es.js.map +1 -1
- package/es/formats/strike.es.js +8 -5
- package/es/formats/strike.es.js.map +1 -1
- package/es/formats/video.es.js +14 -10
- package/es/formats/video.es.js.map +1 -1
- package/es/index.es.js +90 -31
- package/es/index.es.js.map +1 -1
- package/es/modules/ai/index.es.js +238 -0
- package/es/modules/ai/index.es.js.map +1 -0
- package/es/modules/counter.es.js +8 -3
- package/es/modules/counter.es.js.map +1 -1
- package/es/modules/custom-clipboard.es.js +20 -22
- package/es/modules/custom-clipboard.es.js.map +1 -1
- package/es/modules/custom-image/actions/action.es.js +19 -0
- package/es/modules/custom-image/actions/action.es.js.map +1 -0
- package/es/modules/custom-image/actions/{CustomResizeAction.es.js → custom-resize-action.es.js} +24 -11
- package/es/modules/custom-image/actions/{CustomResizeAction.es.js.map → custom-resize-action.es.js.map} +1 -1
- package/es/modules/custom-image/actions/{DeleteAction.es.js → delete-action.es.js} +8 -5
- package/es/modules/custom-image/actions/delete-action.es.js.map +1 -0
- package/es/modules/custom-image/actions/image-toolbar-buttons.es.js +137 -0
- package/es/modules/custom-image/actions/image-toolbar-buttons.es.js.map +1 -0
- package/es/modules/custom-image/actions/index.es.js +18 -0
- package/es/modules/custom-image/actions/index.es.js.map +1 -0
- package/es/modules/custom-image/actions/toolbar-action.es.js +33 -0
- package/es/modules/custom-image/actions/toolbar-action.es.js.map +1 -0
- package/es/modules/custom-image/actions/toolbar.es.js +110 -0
- package/es/modules/custom-image/actions/toolbar.es.js.map +1 -0
- package/es/modules/custom-image/{BlotFormatter.es.js → blot-formatter.es.js} +23 -49
- package/es/modules/custom-image/blot-formatter.es.js.map +1 -0
- package/es/modules/custom-image/image.es.js +31 -6
- package/es/modules/custom-image/image.es.js.map +1 -1
- package/es/modules/custom-image/index.es.js +9 -0
- package/es/modules/custom-image/index.es.js.map +1 -0
- package/es/modules/custom-image/options.es.js +85 -0
- package/es/modules/custom-image/options.es.js.map +1 -0
- package/es/modules/custom-image/specs/blot-spec.es.js +33 -0
- package/es/modules/custom-image/specs/blot-spec.es.js.map +1 -0
- package/es/modules/custom-image/specs/{CustomImageSpec.es.js → custom-image-spec.es.js} +13 -14
- package/es/modules/custom-image/specs/custom-image-spec.es.js.map +1 -0
- package/es/modules/custom-image/specs/image-spec.es.js +32 -0
- package/es/modules/custom-image/specs/image-spec.es.js.map +1 -0
- package/es/modules/custom-image/specs/index.es.js +9 -0
- package/es/modules/custom-image/specs/index.es.js.map +1 -0
- package/es/modules/custom-uploader.es.js +6 -4
- package/es/modules/custom-uploader.es.js.map +1 -1
- package/es/modules/divider.es.js +8 -7
- package/es/modules/divider.es.js.map +1 -1
- package/es/modules/emoji.es.js +175 -0
- package/es/modules/emoji.es.js.map +1 -0
- package/es/modules/file/formats/file.es.js +10 -8
- package/es/modules/file/formats/file.es.js.map +1 -1
- package/es/modules/file/index.es.js +6 -28
- package/es/modules/file/index.es.js.map +1 -1
- package/es/modules/file/modules/file-bar.es.js +11 -3
- package/es/modules/file/modules/file-bar.es.js.map +1 -1
- package/es/modules/file/modules/file-module.es.js +35 -0
- package/es/modules/file/modules/file-module.es.js.map +1 -0
- package/es/modules/i18n.es.js +6 -3
- package/es/modules/i18n.es.js.map +1 -1
- package/es/modules/index.es.js +26 -0
- package/es/modules/index.es.js.map +1 -0
- package/es/modules/link/formats/link.es.js +14 -10
- package/es/modules/link/formats/link.es.js.map +1 -1
- package/es/modules/link/index.es.js +4 -12
- package/es/modules/link/index.es.js.map +1 -1
- package/es/modules/link/modules/tooltip.es.js +28 -19
- package/es/modules/link/modules/tooltip.es.js.map +1 -1
- package/es/modules/mathlive/formats.es.js +10 -7
- package/es/modules/mathlive/formats.es.js.map +1 -1
- package/es/modules/mathlive/index.es.js +6 -30
- package/es/modules/mathlive/index.es.js.map +1 -1
- package/es/modules/mathlive/module.es.js +40 -0
- package/es/modules/mathlive/module.es.js.map +1 -0
- package/es/modules/mathlive/tooltip.es.js +9 -5
- package/es/modules/mathlive/tooltip.es.js.map +1 -1
- package/es/modules/mention/index.es.js +7 -0
- package/es/modules/{emoji/emoji-list → mention}/index.es.js.map +1 -1
- package/es/modules/mention/{MentionLink.es.js → mention-link.es.js} +14 -6
- package/es/modules/mention/mention-link.es.js.map +1 -0
- package/es/modules/mention/{Mention.es.js → mention.es.js} +28 -20
- package/es/modules/mention/mention.es.js.map +1 -0
- package/es/modules/shortcut-key/index.es.js.map +1 -1
- package/es/modules/syntax.es.js +4 -0
- package/es/modules/syntax.es.js.map +1 -1
- package/es/modules/table-up/index.es.js +4 -0
- package/es/modules/table-up/index.es.js.map +1 -1
- package/es/modules/toolbar/better-picker.es.js +5 -0
- package/es/modules/toolbar/better-picker.es.js.map +1 -1
- package/es/modules/toolbar/better-toolbar.es.js +138 -0
- package/es/modules/toolbar/better-toolbar.es.js.map +1 -0
- package/es/modules/toolbar/index.es.js +5 -135
- package/es/modules/toolbar/index.es.js.map +1 -1
- package/es/node_modules/.pnpm/@emoji-mart_data@1.2.1/node_modules/@emoji-mart/data/sets/15/native.json.es.js +40145 -0
- package/es/node_modules/.pnpm/@emoji-mart_data@1.2.1/node_modules/@emoji-mart/data/sets/15/native.json.es.js.map +1 -0
- package/es/node_modules/.pnpm/@floating-ui_core@1.7.2/node_modules/@floating-ui/core/dist/floating-ui.core.es.js +938 -0
- package/es/node_modules/.pnpm/@floating-ui_core@1.7.2/node_modules/@floating-ui/core/dist/floating-ui.core.es.js.map +1 -0
- package/es/node_modules/.pnpm/@floating-ui_dom@1.7.2/node_modules/@floating-ui/dom/dist/floating-ui.dom.es.js +624 -0
- package/es/node_modules/.pnpm/@floating-ui_dom@1.7.2/node_modules/@floating-ui/dom/dist/floating-ui.dom.es.js.map +1 -0
- package/es/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.es.js +174 -0
- package/es/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.es.js.map +1 -0
- package/es/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.es.js +159 -0
- package/es/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.es.js.map +1 -0
- package/es/node_modules/.pnpm/emoji-mart@5.6.0/node_modules/emoji-mart/dist/module.es.js +2849 -0
- package/es/node_modules/.pnpm/emoji-mart@5.6.0/node_modules/emoji-mart/dist/module.es.js.map +1 -0
- package/es/themes/snow.es.js +6 -10
- package/es/themes/snow.es.js.map +1 -1
- package/es/tools/fullscreen.es.js.map +1 -1
- package/es/ui/icons.config.es.js +23 -0
- package/es/ui/icons.config.es.js.map +1 -1
- package/es/ui/icons.es.js +2 -1
- package/es/ui/icons.es.js.map +1 -1
- package/es/utils/is.es.js.map +1 -1
- package/lib/config/editor.utils.cjs.js +0 -2
- package/lib/config/editor.utils.cjs.js.map +1 -1
- package/lib/config/index.cjs.js +1 -1
- package/lib/config/index.cjs.js.map +1 -1
- package/lib/config/types/index.cjs.js +0 -20
- package/lib/config/types/index.cjs.js.map +1 -1
- package/lib/core/fluent-editor.cjs.js +4 -1
- package/lib/core/fluent-editor.cjs.js.map +1 -1
- package/lib/fluent-editor.cjs.js +35 -28
- package/lib/fluent-editor.cjs.js.map +1 -1
- package/lib/formats/emoji.cjs.js +14 -0
- package/lib/formats/emoji.cjs.js.map +1 -0
- package/lib/formats/index.cjs.js +11 -0
- package/lib/formats/index.cjs.js.map +1 -0
- package/lib/formats/soft-break.cjs.js +13 -6
- package/lib/formats/soft-break.cjs.js.map +1 -1
- package/lib/formats/strike.cjs.js +9 -6
- package/lib/formats/strike.cjs.js.map +1 -1
- package/lib/formats/video.cjs.js +15 -11
- package/lib/formats/video.cjs.js.map +1 -1
- package/lib/index.cjs.js +111 -34
- package/lib/index.cjs.js.map +1 -1
- package/lib/modules/ai/index.cjs.js +238 -0
- package/lib/modules/ai/index.cjs.js.map +1 -0
- package/lib/modules/counter.cjs.js +8 -3
- package/lib/modules/counter.cjs.js.map +1 -1
- package/lib/modules/custom-clipboard.cjs.js +21 -23
- package/lib/modules/custom-clipboard.cjs.js.map +1 -1
- package/lib/modules/custom-image/actions/action.cjs.js +19 -0
- package/lib/modules/custom-image/actions/action.cjs.js.map +1 -0
- package/lib/modules/custom-image/actions/{CustomResizeAction.cjs.js → custom-resize-action.cjs.js} +26 -13
- package/lib/modules/custom-image/actions/{CustomResizeAction.cjs.js.map → custom-resize-action.cjs.js.map} +1 -1
- package/lib/modules/custom-image/actions/{DeleteAction.cjs.js → delete-action.cjs.js} +10 -7
- package/lib/modules/custom-image/actions/delete-action.cjs.js.map +1 -0
- package/lib/modules/custom-image/actions/image-toolbar-buttons.cjs.js +137 -0
- package/lib/modules/custom-image/actions/image-toolbar-buttons.cjs.js.map +1 -0
- package/lib/modules/custom-image/actions/index.cjs.js +18 -0
- package/lib/modules/custom-image/actions/index.cjs.js.map +1 -0
- package/lib/modules/custom-image/actions/toolbar-action.cjs.js +33 -0
- package/lib/modules/custom-image/actions/toolbar-action.cjs.js.map +1 -0
- package/lib/modules/custom-image/actions/toolbar.cjs.js +110 -0
- package/lib/modules/custom-image/actions/toolbar.cjs.js.map +1 -0
- package/lib/modules/custom-image/{BlotFormatter.cjs.js → blot-formatter.cjs.js} +24 -50
- package/lib/modules/custom-image/blot-formatter.cjs.js.map +1 -0
- package/lib/modules/custom-image/image.cjs.js +32 -7
- package/lib/modules/custom-image/image.cjs.js.map +1 -1
- package/lib/modules/custom-image/index.cjs.js +9 -0
- package/lib/modules/custom-image/index.cjs.js.map +1 -0
- package/lib/modules/custom-image/options.cjs.js +85 -0
- package/lib/modules/custom-image/options.cjs.js.map +1 -0
- package/lib/modules/custom-image/specs/blot-spec.cjs.js +33 -0
- package/lib/modules/custom-image/specs/blot-spec.cjs.js.map +1 -0
- package/lib/modules/custom-image/specs/{CustomImageSpec.cjs.js → custom-image-spec.cjs.js} +14 -15
- package/lib/modules/custom-image/specs/custom-image-spec.cjs.js.map +1 -0
- package/lib/modules/custom-image/specs/image-spec.cjs.js +32 -0
- package/lib/modules/custom-image/specs/image-spec.cjs.js.map +1 -0
- package/lib/modules/custom-image/specs/index.cjs.js +9 -0
- package/lib/modules/custom-image/specs/index.cjs.js.map +1 -0
- package/lib/modules/custom-uploader.cjs.js +6 -4
- package/lib/modules/custom-uploader.cjs.js.map +1 -1
- package/lib/modules/divider.cjs.js +9 -8
- package/lib/modules/divider.cjs.js.map +1 -1
- package/lib/modules/emoji.cjs.js +175 -0
- package/lib/modules/emoji.cjs.js.map +1 -0
- package/lib/modules/file/formats/file.cjs.js +11 -9
- package/lib/modules/file/formats/file.cjs.js.map +1 -1
- package/lib/modules/file/index.cjs.js +5 -27
- package/lib/modules/file/index.cjs.js.map +1 -1
- package/lib/modules/file/modules/file-bar.cjs.js +12 -4
- package/lib/modules/file/modules/file-bar.cjs.js.map +1 -1
- package/lib/modules/file/modules/file-module.cjs.js +35 -0
- package/lib/modules/file/modules/file-module.cjs.js.map +1 -0
- package/lib/modules/i18n.cjs.js +6 -3
- package/lib/modules/i18n.cjs.js.map +1 -1
- package/lib/modules/index.cjs.js +26 -0
- package/lib/modules/index.cjs.js.map +1 -0
- package/lib/modules/link/formats/link.cjs.js +15 -11
- package/lib/modules/link/formats/link.cjs.js.map +1 -1
- package/lib/modules/link/index.cjs.js +4 -12
- package/lib/modules/link/index.cjs.js.map +1 -1
- package/lib/modules/link/modules/tooltip.cjs.js +28 -19
- package/lib/modules/link/modules/tooltip.cjs.js.map +1 -1
- package/lib/modules/mathlive/formats.cjs.js +11 -8
- package/lib/modules/mathlive/formats.cjs.js.map +1 -1
- package/lib/modules/mathlive/index.cjs.js +5 -29
- package/lib/modules/mathlive/index.cjs.js.map +1 -1
- package/lib/modules/mathlive/module.cjs.js +40 -0
- package/lib/modules/mathlive/module.cjs.js.map +1 -0
- package/lib/modules/mathlive/tooltip.cjs.js +10 -6
- package/lib/modules/mathlive/tooltip.cjs.js.map +1 -1
- package/lib/modules/mention/index.cjs.js +7 -0
- package/lib/modules/{emoji/emoji-list → mention}/index.cjs.js.map +1 -1
- package/lib/modules/mention/{MentionLink.cjs.js → mention-link.cjs.js} +15 -7
- package/lib/modules/mention/mention-link.cjs.js.map +1 -0
- package/lib/modules/mention/{Mention.cjs.js → mention.cjs.js} +30 -22
- package/lib/modules/mention/mention.cjs.js.map +1 -0
- package/lib/modules/shortcut-key/index.cjs.js.map +1 -1
- package/lib/modules/syntax.cjs.js +4 -0
- package/lib/modules/syntax.cjs.js.map +1 -1
- package/lib/modules/table-up/index.cjs.js +4 -0
- package/lib/modules/table-up/index.cjs.js.map +1 -1
- package/lib/modules/toolbar/better-picker.cjs.js +5 -0
- package/lib/modules/toolbar/better-picker.cjs.js.map +1 -1
- package/lib/modules/toolbar/better-toolbar.cjs.js +138 -0
- package/lib/modules/toolbar/better-toolbar.cjs.js.map +1 -0
- package/lib/modules/toolbar/index.cjs.js +6 -136
- package/lib/modules/toolbar/index.cjs.js.map +1 -1
- package/lib/node_modules/.pnpm/@emoji-mart_data@1.2.1/node_modules/@emoji-mart/data/sets/15/native.json.cjs.js +40145 -0
- package/lib/node_modules/.pnpm/@emoji-mart_data@1.2.1/node_modules/@emoji-mart/data/sets/15/native.json.cjs.js.map +1 -0
- package/lib/node_modules/.pnpm/@floating-ui_core@1.7.2/node_modules/@floating-ui/core/dist/floating-ui.core.cjs.js +938 -0
- package/lib/node_modules/.pnpm/@floating-ui_core@1.7.2/node_modules/@floating-ui/core/dist/floating-ui.core.cjs.js.map +1 -0
- package/lib/node_modules/.pnpm/@floating-ui_dom@1.7.2/node_modules/@floating-ui/dom/dist/floating-ui.dom.cjs.js +624 -0
- package/lib/node_modules/.pnpm/@floating-ui_dom@1.7.2/node_modules/@floating-ui/dom/dist/floating-ui.dom.cjs.js.map +1 -0
- package/lib/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.cjs.js +159 -0
- package/lib/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.cjs.js.map +1 -0
- package/lib/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.cjs.js +174 -0
- package/lib/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.cjs.js.map +1 -0
- package/lib/node_modules/.pnpm/emoji-mart@5.6.0/node_modules/emoji-mart/dist/module.cjs.js +2847 -0
- package/lib/node_modules/.pnpm/emoji-mart@5.6.0/node_modules/emoji-mart/dist/module.cjs.js.map +1 -0
- package/lib/themes/snow.cjs.js +7 -11
- package/lib/themes/snow.cjs.js.map +1 -1
- package/lib/tools/fullscreen.cjs.js.map +1 -1
- package/lib/ui/icons.cjs.js +1 -0
- package/lib/ui/icons.cjs.js.map +1 -1
- package/lib/ui/icons.config.cjs.js +23 -0
- package/lib/ui/icons.config.cjs.js.map +1 -1
- package/lib/utils/is.cjs.js.map +1 -1
- package/package.json +8 -7
- package/style.css +92 -933
- package/types/config/editor.utils.d.ts +0 -1
- package/types/config/index.d.ts +1 -0
- package/types/config/types/editor-config.interface.d.ts +0 -7
- package/types/config/types/editor-modules.interface.d.ts +21 -12
- package/types/config/types/index.d.ts +0 -20
- package/types/config/types/type.d.ts +0 -4
- package/types/core/fluent-editor.d.ts +0 -1
- package/types/formats/emoji.d.ts +9 -0
- package/types/formats/index.d.ts +4 -0
- package/types/formats/soft-break.d.ts +6 -7
- package/types/formats/strike.d.ts +6 -4
- package/types/formats/video.d.ts +4 -6
- package/types/index.d.ts +6 -5
- package/types/modules/ai/index.d.ts +39 -0
- package/types/modules/counter.d.ts +8 -1
- package/types/modules/custom-clipboard.d.ts +3 -6
- package/types/modules/custom-image/Options.d.ts +34 -23
- package/types/modules/custom-image/actions/Action.d.ts +5 -3
- package/types/modules/custom-image/actions/custom-resize-action.d.ts +24 -0
- package/types/modules/custom-image/actions/delete-action.d.ts +7 -0
- package/types/modules/custom-image/actions/image-toolbar-buttons.d.ts +17 -0
- package/types/modules/custom-image/actions/index.d.ts +6 -0
- package/types/modules/custom-image/actions/toolbar-action.d.ts +12 -0
- package/types/modules/custom-image/actions/toolbar.d.ts +20 -0
- package/types/modules/custom-image/blot-formatter.d.ts +24 -0
- package/types/modules/custom-image/image-bar.d.ts +9 -7
- package/types/modules/custom-image/image.d.ts +15 -13
- package/types/modules/custom-image/index.d.ts +4 -0
- package/types/modules/custom-image/specs/blot-spec.d.ts +13 -0
- package/types/modules/custom-image/specs/custom-image-spec.d.ts +18 -0
- package/types/modules/custom-image/specs/image-spec.d.ts +9 -0
- package/types/modules/custom-image/specs/index.d.ts +3 -0
- package/types/modules/custom-uploader.d.ts +41 -0
- package/types/modules/divider.d.ts +6 -4
- package/types/modules/emoji/formats/emoji-blot.d.ts +9 -7
- package/types/modules/emoji/index.d.ts +3 -10
- package/types/modules/emoji/modules/emoji.d.ts +6 -6
- package/types/modules/emoji/modules/toolbar-emoji.d.ts +7 -6
- package/types/modules/emoji.d.ts +35 -0
- package/types/modules/file/formats/file.d.ts +2 -2
- package/types/modules/file/index.d.ts +3 -11
- package/types/modules/file/modules/file-bar.d.ts +1 -1
- package/types/modules/file/modules/file-module.d.ts +10 -0
- package/types/modules/i18n.d.ts +1 -2
- package/types/modules/index.d.ts +15 -0
- package/types/modules/link/formats/link.d.ts +5 -5
- package/types/modules/link/index.d.ts +2 -6
- package/types/modules/link/modules/tooltip.d.ts +5 -10
- package/types/modules/mathlive/formats.d.ts +2 -2
- package/types/modules/mathlive/index.d.ts +3 -9
- package/types/modules/mathlive/module.d.ts +10 -0
- package/types/modules/mathlive/tooltip.d.ts +1 -1
- package/types/modules/mention/Mention.d.ts +3 -4
- package/types/modules/mention/index.d.ts +2 -0
- package/types/modules/mention/mention-link.d.ts +17 -0
- package/types/modules/shortcut-key/index.d.ts +12 -8
- package/types/modules/table-up/index.d.ts +3 -3
- package/types/modules/toolbar/better-toolbar.d.ts +8 -0
- package/types/modules/toolbar/index.d.ts +2 -8
- package/types/tools/fullscreen.d.ts +5 -1
- package/types/ui/icons.config.d.ts +2 -0
- package/types/utils/is.d.ts +1 -1
- package/es/config/types/additional-toolbar-item.interface.es.js +0 -2
- package/es/config/types/additional-toolbar-item.interface.es.js.map +0 -1
- package/es/config/types/content-change.interface.es.js +0 -2
- package/es/config/types/content-change.interface.es.js.map +0 -1
- package/es/config/types/content-save.interface.es.js +0 -2
- package/es/config/types/content-save.interface.es.js.map +0 -1
- package/es/config/types/counter-option.interface.es.js +0 -2
- package/es/config/types/counter-option.interface.es.js.map +0 -1
- package/es/config/types/editor-toolbar.interface.es.js +0 -2
- package/es/config/types/editor-toolbar.interface.es.js.map +0 -1
- package/es/config/types/file-operation.interface.es.js +0 -2
- package/es/config/types/file-operation.interface.es.js.map +0 -1
- package/es/config/types/focus-change.interface.es.js +0 -2
- package/es/config/types/focus-change.interface.es.js.map +0 -1
- package/es/config/types/fullscreen-module.interface.es.js +0 -2
- package/es/config/types/fullscreen-module.interface.es.js.map +0 -1
- package/es/config/types/help-panel-item.interface.es.js +0 -2
- package/es/config/types/help-panel-item.interface.es.js.map +0 -1
- package/es/config/types/help-panel-option.interface.es.js +0 -2
- package/es/config/types/help-panel-option.interface.es.js.map +0 -1
- package/es/config/types/image-module.interface.es.js +0 -2
- package/es/config/types/image-module.interface.es.js.map +0 -1
- package/es/config/types/image-upload.interface.es.js +0 -2
- package/es/config/types/image-upload.interface.es.js.map +0 -1
- package/es/config/types/load-on-demand-module.interface.es.js +0 -2
- package/es/config/types/load-on-demand-module.interface.es.js.map +0 -1
- package/es/config/types/mention-module.interface.es.js +0 -2
- package/es/config/types/mention-module.interface.es.js.map +0 -1
- package/es/config/types/paste-change.interface.es.js +0 -2
- package/es/config/types/paste-change.interface.es.js.map +0 -1
- package/es/config/types/quick-menu-module.interface.es.js +0 -2
- package/es/config/types/quick-menu-module.interface.es.js.map +0 -1
- package/es/config/types/range.interface.es.js +0 -2
- package/es/config/types/range.interface.es.js.map +0 -1
- package/es/config/types/registry-options.interface.es.js +0 -2
- package/es/config/types/registry-options.interface.es.js.map +0 -1
- package/es/config/types/selection-change.interface.es.js +0 -2
- package/es/config/types/selection-change.interface.es.js.map +0 -1
- package/es/config/types/toolbar-item.interface.es.js +0 -2
- package/es/config/types/toolbar-item.interface.es.js.map +0 -1
- package/es/config/types/validate-error.interface.es.js +0 -2
- package/es/config/types/validate-error.interface.es.js.map +0 -1
- package/es/modules/custom-image/BlotFormatter.es.js.map +0 -1
- package/es/modules/custom-image/Options.es.js +0 -95
- package/es/modules/custom-image/Options.es.js.map +0 -1
- package/es/modules/custom-image/actions/Action.es.js +0 -15
- package/es/modules/custom-image/actions/Action.es.js.map +0 -1
- package/es/modules/custom-image/actions/DeleteAction.es.js.map +0 -1
- package/es/modules/custom-image/image-bar.es.js +0 -127
- package/es/modules/custom-image/image-bar.es.js.map +0 -1
- package/es/modules/custom-image/specs/BlotSpec.es.js +0 -27
- package/es/modules/custom-image/specs/BlotSpec.es.js.map +0 -1
- package/es/modules/custom-image/specs/CustomImageSpec.es.js.map +0 -1
- package/es/modules/custom-image/specs/ImageSpec.es.js +0 -29
- package/es/modules/custom-image/specs/ImageSpec.es.js.map +0 -1
- package/es/modules/emoji/emoji-list/index.es.js +0 -5
- package/es/modules/emoji/emoji-list/people.es.js +0 -114
- package/es/modules/emoji/emoji-list/people.es.js.map +0 -1
- package/es/modules/emoji/emoji-list.es.js +0 -9
- package/es/modules/emoji/emoji-list.es.js.map +0 -1
- package/es/modules/emoji/emoji-map.es.js +0 -9
- package/es/modules/emoji/emoji-map.es.js.map +0 -1
- package/es/modules/emoji/emoji-sprite.es.js +0 -5
- package/es/modules/emoji/emoji-sprite.es.js.map +0 -1
- package/es/modules/emoji/formats/emoji-blot.es.js +0 -41
- package/es/modules/emoji/formats/emoji-blot.es.js.map +0 -1
- package/es/modules/emoji/index.es.js +0 -8
- package/es/modules/emoji/index.es.js.map +0 -1
- package/es/modules/emoji/modules/emoji.es.js +0 -248
- package/es/modules/emoji/modules/emoji.es.js.map +0 -1
- package/es/modules/emoji/modules/toolbar-emoji.es.js +0 -153
- package/es/modules/emoji/modules/toolbar-emoji.es.js.map +0 -1
- package/es/modules/emoji/utils.es.js +0 -19
- package/es/modules/emoji/utils.es.js.map +0 -1
- package/es/modules/mention/Mention.es.js.map +0 -1
- package/es/modules/mention/MentionLink.es.js.map +0 -1
- package/lib/config/types/additional-toolbar-item.interface.cjs.js +0 -2
- package/lib/config/types/additional-toolbar-item.interface.cjs.js.map +0 -1
- package/lib/config/types/content-change.interface.cjs.js +0 -2
- package/lib/config/types/content-change.interface.cjs.js.map +0 -1
- package/lib/config/types/content-save.interface.cjs.js +0 -2
- package/lib/config/types/content-save.interface.cjs.js.map +0 -1
- package/lib/config/types/counter-option.interface.cjs.js +0 -2
- package/lib/config/types/counter-option.interface.cjs.js.map +0 -1
- package/lib/config/types/editor-toolbar.interface.cjs.js +0 -2
- package/lib/config/types/editor-toolbar.interface.cjs.js.map +0 -1
- package/lib/config/types/file-operation.interface.cjs.js +0 -2
- package/lib/config/types/file-operation.interface.cjs.js.map +0 -1
- package/lib/config/types/focus-change.interface.cjs.js +0 -2
- package/lib/config/types/focus-change.interface.cjs.js.map +0 -1
- package/lib/config/types/fullscreen-module.interface.cjs.js +0 -2
- package/lib/config/types/fullscreen-module.interface.cjs.js.map +0 -1
- package/lib/config/types/help-panel-item.interface.cjs.js +0 -2
- package/lib/config/types/help-panel-item.interface.cjs.js.map +0 -1
- package/lib/config/types/help-panel-option.interface.cjs.js +0 -2
- package/lib/config/types/help-panel-option.interface.cjs.js.map +0 -1
- package/lib/config/types/image-module.interface.cjs.js +0 -2
- package/lib/config/types/image-module.interface.cjs.js.map +0 -1
- package/lib/config/types/image-upload.interface.cjs.js +0 -2
- package/lib/config/types/image-upload.interface.cjs.js.map +0 -1
- package/lib/config/types/load-on-demand-module.interface.cjs.js +0 -2
- package/lib/config/types/load-on-demand-module.interface.cjs.js.map +0 -1
- package/lib/config/types/mention-module.interface.cjs.js +0 -2
- package/lib/config/types/mention-module.interface.cjs.js.map +0 -1
- package/lib/config/types/paste-change.interface.cjs.js +0 -2
- package/lib/config/types/paste-change.interface.cjs.js.map +0 -1
- package/lib/config/types/quick-menu-module.interface.cjs.js +0 -2
- package/lib/config/types/quick-menu-module.interface.cjs.js.map +0 -1
- package/lib/config/types/range.interface.cjs.js +0 -2
- package/lib/config/types/range.interface.cjs.js.map +0 -1
- package/lib/config/types/registry-options.interface.cjs.js +0 -2
- package/lib/config/types/registry-options.interface.cjs.js.map +0 -1
- package/lib/config/types/selection-change.interface.cjs.js +0 -2
- package/lib/config/types/selection-change.interface.cjs.js.map +0 -1
- package/lib/config/types/toolbar-item.interface.cjs.js +0 -2
- package/lib/config/types/toolbar-item.interface.cjs.js.map +0 -1
- package/lib/config/types/validate-error.interface.cjs.js +0 -2
- package/lib/config/types/validate-error.interface.cjs.js.map +0 -1
- package/lib/modules/custom-image/BlotFormatter.cjs.js.map +0 -1
- package/lib/modules/custom-image/Options.cjs.js +0 -95
- package/lib/modules/custom-image/Options.cjs.js.map +0 -1
- package/lib/modules/custom-image/actions/Action.cjs.js +0 -15
- package/lib/modules/custom-image/actions/Action.cjs.js.map +0 -1
- package/lib/modules/custom-image/actions/DeleteAction.cjs.js.map +0 -1
- package/lib/modules/custom-image/image-bar.cjs.js +0 -127
- package/lib/modules/custom-image/image-bar.cjs.js.map +0 -1
- package/lib/modules/custom-image/specs/BlotSpec.cjs.js +0 -27
- package/lib/modules/custom-image/specs/BlotSpec.cjs.js.map +0 -1
- package/lib/modules/custom-image/specs/CustomImageSpec.cjs.js.map +0 -1
- package/lib/modules/custom-image/specs/ImageSpec.cjs.js +0 -29
- package/lib/modules/custom-image/specs/ImageSpec.cjs.js.map +0 -1
- package/lib/modules/emoji/emoji-list/index.cjs.js +0 -5
- package/lib/modules/emoji/emoji-list/people.cjs.js +0 -114
- package/lib/modules/emoji/emoji-list/people.cjs.js.map +0 -1
- package/lib/modules/emoji/emoji-list.cjs.js +0 -9
- package/lib/modules/emoji/emoji-list.cjs.js.map +0 -1
- package/lib/modules/emoji/emoji-map.cjs.js +0 -9
- package/lib/modules/emoji/emoji-map.cjs.js.map +0 -1
- package/lib/modules/emoji/emoji-sprite.cjs.js +0 -5
- package/lib/modules/emoji/emoji-sprite.cjs.js.map +0 -1
- package/lib/modules/emoji/formats/emoji-blot.cjs.js +0 -41
- package/lib/modules/emoji/formats/emoji-blot.cjs.js.map +0 -1
- package/lib/modules/emoji/index.cjs.js +0 -8
- package/lib/modules/emoji/index.cjs.js.map +0 -1
- package/lib/modules/emoji/modules/emoji.cjs.js +0 -248
- package/lib/modules/emoji/modules/emoji.cjs.js.map +0 -1
- package/lib/modules/emoji/modules/toolbar-emoji.cjs.js +0 -153
- package/lib/modules/emoji/modules/toolbar-emoji.cjs.js.map +0 -1
- package/lib/modules/emoji/utils.cjs.js +0 -19
- package/lib/modules/emoji/utils.cjs.js.map +0 -1
- package/lib/modules/mention/Mention.cjs.js.map +0 -1
- package/lib/modules/mention/MentionLink.cjs.js.map +0 -1
|
@@ -0,0 +1,624 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const floatingUi_core = require("../../../../../@floating-ui_core@1.7.2/node_modules/@floating-ui/core/dist/floating-ui.core.cjs.js");
|
|
4
|
+
const floatingUi_utils = require("../../../../../@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.cjs.js");
|
|
5
|
+
const floatingUi_utils_dom = require("../../../../../@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.cjs.js");
|
|
6
|
+
function getCssDimensions(element) {
|
|
7
|
+
const css = floatingUi_utils_dom.getComputedStyle(element);
|
|
8
|
+
let width = parseFloat(css.width) || 0;
|
|
9
|
+
let height = parseFloat(css.height) || 0;
|
|
10
|
+
const hasOffset = floatingUi_utils_dom.isHTMLElement(element);
|
|
11
|
+
const offsetWidth = hasOffset ? element.offsetWidth : width;
|
|
12
|
+
const offsetHeight = hasOffset ? element.offsetHeight : height;
|
|
13
|
+
const shouldFallback = floatingUi_utils.round(width) !== offsetWidth || floatingUi_utils.round(height) !== offsetHeight;
|
|
14
|
+
if (shouldFallback) {
|
|
15
|
+
width = offsetWidth;
|
|
16
|
+
height = offsetHeight;
|
|
17
|
+
}
|
|
18
|
+
return {
|
|
19
|
+
width,
|
|
20
|
+
height,
|
|
21
|
+
$: shouldFallback
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
function unwrapElement(element) {
|
|
25
|
+
return !floatingUi_utils_dom.isElement(element) ? element.contextElement : element;
|
|
26
|
+
}
|
|
27
|
+
function getScale(element) {
|
|
28
|
+
const domElement = unwrapElement(element);
|
|
29
|
+
if (!floatingUi_utils_dom.isHTMLElement(domElement)) {
|
|
30
|
+
return floatingUi_utils.createCoords(1);
|
|
31
|
+
}
|
|
32
|
+
const rect = domElement.getBoundingClientRect();
|
|
33
|
+
const {
|
|
34
|
+
width,
|
|
35
|
+
height,
|
|
36
|
+
$
|
|
37
|
+
} = getCssDimensions(domElement);
|
|
38
|
+
let x = ($ ? floatingUi_utils.round(rect.width) : rect.width) / width;
|
|
39
|
+
let y = ($ ? floatingUi_utils.round(rect.height) : rect.height) / height;
|
|
40
|
+
if (!x || !Number.isFinite(x)) {
|
|
41
|
+
x = 1;
|
|
42
|
+
}
|
|
43
|
+
if (!y || !Number.isFinite(y)) {
|
|
44
|
+
y = 1;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
x,
|
|
48
|
+
y
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
const noOffsets = /* @__PURE__ */ floatingUi_utils.createCoords(0);
|
|
52
|
+
function getVisualOffsets(element) {
|
|
53
|
+
const win = floatingUi_utils_dom.getWindow(element);
|
|
54
|
+
if (!floatingUi_utils_dom.isWebKit() || !win.visualViewport) {
|
|
55
|
+
return noOffsets;
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
x: win.visualViewport.offsetLeft,
|
|
59
|
+
y: win.visualViewport.offsetTop
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
|
|
63
|
+
if (isFixed === void 0) {
|
|
64
|
+
isFixed = false;
|
|
65
|
+
}
|
|
66
|
+
if (!floatingOffsetParent || isFixed && floatingOffsetParent !== floatingUi_utils_dom.getWindow(element)) {
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
69
|
+
return isFixed;
|
|
70
|
+
}
|
|
71
|
+
function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
|
|
72
|
+
if (includeScale === void 0) {
|
|
73
|
+
includeScale = false;
|
|
74
|
+
}
|
|
75
|
+
if (isFixedStrategy === void 0) {
|
|
76
|
+
isFixedStrategy = false;
|
|
77
|
+
}
|
|
78
|
+
const clientRect = element.getBoundingClientRect();
|
|
79
|
+
const domElement = unwrapElement(element);
|
|
80
|
+
let scale = floatingUi_utils.createCoords(1);
|
|
81
|
+
if (includeScale) {
|
|
82
|
+
if (offsetParent) {
|
|
83
|
+
if (floatingUi_utils_dom.isElement(offsetParent)) {
|
|
84
|
+
scale = getScale(offsetParent);
|
|
85
|
+
}
|
|
86
|
+
} else {
|
|
87
|
+
scale = getScale(element);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : floatingUi_utils.createCoords(0);
|
|
91
|
+
let x = (clientRect.left + visualOffsets.x) / scale.x;
|
|
92
|
+
let y = (clientRect.top + visualOffsets.y) / scale.y;
|
|
93
|
+
let width = clientRect.width / scale.x;
|
|
94
|
+
let height = clientRect.height / scale.y;
|
|
95
|
+
if (domElement) {
|
|
96
|
+
const win = floatingUi_utils_dom.getWindow(domElement);
|
|
97
|
+
const offsetWin = offsetParent && floatingUi_utils_dom.isElement(offsetParent) ? floatingUi_utils_dom.getWindow(offsetParent) : offsetParent;
|
|
98
|
+
let currentWin = win;
|
|
99
|
+
let currentIFrame = floatingUi_utils_dom.getFrameElement(currentWin);
|
|
100
|
+
while (currentIFrame && offsetParent && offsetWin !== currentWin) {
|
|
101
|
+
const iframeScale = getScale(currentIFrame);
|
|
102
|
+
const iframeRect = currentIFrame.getBoundingClientRect();
|
|
103
|
+
const css = floatingUi_utils_dom.getComputedStyle(currentIFrame);
|
|
104
|
+
const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
|
|
105
|
+
const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
|
|
106
|
+
x *= iframeScale.x;
|
|
107
|
+
y *= iframeScale.y;
|
|
108
|
+
width *= iframeScale.x;
|
|
109
|
+
height *= iframeScale.y;
|
|
110
|
+
x += left;
|
|
111
|
+
y += top;
|
|
112
|
+
currentWin = floatingUi_utils_dom.getWindow(currentIFrame);
|
|
113
|
+
currentIFrame = floatingUi_utils_dom.getFrameElement(currentWin);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
return floatingUi_utils.rectToClientRect({
|
|
117
|
+
width,
|
|
118
|
+
height,
|
|
119
|
+
x,
|
|
120
|
+
y
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
function getWindowScrollBarX(element, rect) {
|
|
124
|
+
const leftScroll = floatingUi_utils_dom.getNodeScroll(element).scrollLeft;
|
|
125
|
+
if (!rect) {
|
|
126
|
+
return getBoundingClientRect(floatingUi_utils_dom.getDocumentElement(element)).left + leftScroll;
|
|
127
|
+
}
|
|
128
|
+
return rect.left + leftScroll;
|
|
129
|
+
}
|
|
130
|
+
function getHTMLOffset(documentElement, scroll, ignoreScrollbarX) {
|
|
131
|
+
if (ignoreScrollbarX === void 0) {
|
|
132
|
+
ignoreScrollbarX = false;
|
|
133
|
+
}
|
|
134
|
+
const htmlRect = documentElement.getBoundingClientRect();
|
|
135
|
+
const x = htmlRect.left + scroll.scrollLeft - (ignoreScrollbarX ? 0 : (
|
|
136
|
+
// RTL <body> scrollbar.
|
|
137
|
+
getWindowScrollBarX(documentElement, htmlRect)
|
|
138
|
+
));
|
|
139
|
+
const y = htmlRect.top + scroll.scrollTop;
|
|
140
|
+
return {
|
|
141
|
+
x,
|
|
142
|
+
y
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
146
|
+
let {
|
|
147
|
+
elements,
|
|
148
|
+
rect,
|
|
149
|
+
offsetParent,
|
|
150
|
+
strategy
|
|
151
|
+
} = _ref;
|
|
152
|
+
const isFixed = strategy === "fixed";
|
|
153
|
+
const documentElement = floatingUi_utils_dom.getDocumentElement(offsetParent);
|
|
154
|
+
const topLayer = elements ? floatingUi_utils_dom.isTopLayer(elements.floating) : false;
|
|
155
|
+
if (offsetParent === documentElement || topLayer && isFixed) {
|
|
156
|
+
return rect;
|
|
157
|
+
}
|
|
158
|
+
let scroll = {
|
|
159
|
+
scrollLeft: 0,
|
|
160
|
+
scrollTop: 0
|
|
161
|
+
};
|
|
162
|
+
let scale = floatingUi_utils.createCoords(1);
|
|
163
|
+
const offsets = floatingUi_utils.createCoords(0);
|
|
164
|
+
const isOffsetParentAnElement = floatingUi_utils_dom.isHTMLElement(offsetParent);
|
|
165
|
+
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
|
|
166
|
+
if (floatingUi_utils_dom.getNodeName(offsetParent) !== "body" || floatingUi_utils_dom.isOverflowElement(documentElement)) {
|
|
167
|
+
scroll = floatingUi_utils_dom.getNodeScroll(offsetParent);
|
|
168
|
+
}
|
|
169
|
+
if (floatingUi_utils_dom.isHTMLElement(offsetParent)) {
|
|
170
|
+
const offsetRect = getBoundingClientRect(offsetParent);
|
|
171
|
+
scale = getScale(offsetParent);
|
|
172
|
+
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
173
|
+
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll, true) : floatingUi_utils.createCoords(0);
|
|
177
|
+
return {
|
|
178
|
+
width: rect.width * scale.x,
|
|
179
|
+
height: rect.height * scale.y,
|
|
180
|
+
x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,
|
|
181
|
+
y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
function getClientRects(element) {
|
|
185
|
+
return Array.from(element.getClientRects());
|
|
186
|
+
}
|
|
187
|
+
function getDocumentRect(element) {
|
|
188
|
+
const html = floatingUi_utils_dom.getDocumentElement(element);
|
|
189
|
+
const scroll = floatingUi_utils_dom.getNodeScroll(element);
|
|
190
|
+
const body = element.ownerDocument.body;
|
|
191
|
+
const width = floatingUi_utils.max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
|
|
192
|
+
const height = floatingUi_utils.max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
|
|
193
|
+
let x = -scroll.scrollLeft + getWindowScrollBarX(element);
|
|
194
|
+
const y = -scroll.scrollTop;
|
|
195
|
+
if (floatingUi_utils_dom.getComputedStyle(body).direction === "rtl") {
|
|
196
|
+
x += floatingUi_utils.max(html.clientWidth, body.clientWidth) - width;
|
|
197
|
+
}
|
|
198
|
+
return {
|
|
199
|
+
width,
|
|
200
|
+
height,
|
|
201
|
+
x,
|
|
202
|
+
y
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
function getViewportRect(element, strategy) {
|
|
206
|
+
const win = floatingUi_utils_dom.getWindow(element);
|
|
207
|
+
const html = floatingUi_utils_dom.getDocumentElement(element);
|
|
208
|
+
const visualViewport = win.visualViewport;
|
|
209
|
+
let width = html.clientWidth;
|
|
210
|
+
let height = html.clientHeight;
|
|
211
|
+
let x = 0;
|
|
212
|
+
let y = 0;
|
|
213
|
+
if (visualViewport) {
|
|
214
|
+
width = visualViewport.width;
|
|
215
|
+
height = visualViewport.height;
|
|
216
|
+
const visualViewportBased = floatingUi_utils_dom.isWebKit();
|
|
217
|
+
if (!visualViewportBased || visualViewportBased && strategy === "fixed") {
|
|
218
|
+
x = visualViewport.offsetLeft;
|
|
219
|
+
y = visualViewport.offsetTop;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
return {
|
|
223
|
+
width,
|
|
224
|
+
height,
|
|
225
|
+
x,
|
|
226
|
+
y
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
const absoluteOrFixed = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
230
|
+
function getInnerBoundingClientRect(element, strategy) {
|
|
231
|
+
const clientRect = getBoundingClientRect(element, true, strategy === "fixed");
|
|
232
|
+
const top = clientRect.top + element.clientTop;
|
|
233
|
+
const left = clientRect.left + element.clientLeft;
|
|
234
|
+
const scale = floatingUi_utils_dom.isHTMLElement(element) ? getScale(element) : floatingUi_utils.createCoords(1);
|
|
235
|
+
const width = element.clientWidth * scale.x;
|
|
236
|
+
const height = element.clientHeight * scale.y;
|
|
237
|
+
const x = left * scale.x;
|
|
238
|
+
const y = top * scale.y;
|
|
239
|
+
return {
|
|
240
|
+
width,
|
|
241
|
+
height,
|
|
242
|
+
x,
|
|
243
|
+
y
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
|
|
247
|
+
let rect;
|
|
248
|
+
if (clippingAncestor === "viewport") {
|
|
249
|
+
rect = getViewportRect(element, strategy);
|
|
250
|
+
} else if (clippingAncestor === "document") {
|
|
251
|
+
rect = getDocumentRect(floatingUi_utils_dom.getDocumentElement(element));
|
|
252
|
+
} else if (floatingUi_utils_dom.isElement(clippingAncestor)) {
|
|
253
|
+
rect = getInnerBoundingClientRect(clippingAncestor, strategy);
|
|
254
|
+
} else {
|
|
255
|
+
const visualOffsets = getVisualOffsets(element);
|
|
256
|
+
rect = {
|
|
257
|
+
x: clippingAncestor.x - visualOffsets.x,
|
|
258
|
+
y: clippingAncestor.y - visualOffsets.y,
|
|
259
|
+
width: clippingAncestor.width,
|
|
260
|
+
height: clippingAncestor.height
|
|
261
|
+
};
|
|
262
|
+
}
|
|
263
|
+
return floatingUi_utils.rectToClientRect(rect);
|
|
264
|
+
}
|
|
265
|
+
function hasFixedPositionAncestor(element, stopNode) {
|
|
266
|
+
const parentNode = floatingUi_utils_dom.getParentNode(element);
|
|
267
|
+
if (parentNode === stopNode || !floatingUi_utils_dom.isElement(parentNode) || floatingUi_utils_dom.isLastTraversableNode(parentNode)) {
|
|
268
|
+
return false;
|
|
269
|
+
}
|
|
270
|
+
return floatingUi_utils_dom.getComputedStyle(parentNode).position === "fixed" || hasFixedPositionAncestor(parentNode, stopNode);
|
|
271
|
+
}
|
|
272
|
+
function getClippingElementAncestors(element, cache) {
|
|
273
|
+
const cachedResult = cache.get(element);
|
|
274
|
+
if (cachedResult) {
|
|
275
|
+
return cachedResult;
|
|
276
|
+
}
|
|
277
|
+
let result = floatingUi_utils_dom.getOverflowAncestors(element, [], false).filter((el) => floatingUi_utils_dom.isElement(el) && floatingUi_utils_dom.getNodeName(el) !== "body");
|
|
278
|
+
let currentContainingBlockComputedStyle = null;
|
|
279
|
+
const elementIsFixed = floatingUi_utils_dom.getComputedStyle(element).position === "fixed";
|
|
280
|
+
let currentNode = elementIsFixed ? floatingUi_utils_dom.getParentNode(element) : element;
|
|
281
|
+
while (floatingUi_utils_dom.isElement(currentNode) && !floatingUi_utils_dom.isLastTraversableNode(currentNode)) {
|
|
282
|
+
const computedStyle = floatingUi_utils_dom.getComputedStyle(currentNode);
|
|
283
|
+
const currentNodeIsContaining = floatingUi_utils_dom.isContainingBlock(currentNode);
|
|
284
|
+
if (!currentNodeIsContaining && computedStyle.position === "fixed") {
|
|
285
|
+
currentContainingBlockComputedStyle = null;
|
|
286
|
+
}
|
|
287
|
+
const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === "static" && !!currentContainingBlockComputedStyle && absoluteOrFixed.has(currentContainingBlockComputedStyle.position) || floatingUi_utils_dom.isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
|
|
288
|
+
if (shouldDropCurrentNode) {
|
|
289
|
+
result = result.filter((ancestor) => ancestor !== currentNode);
|
|
290
|
+
} else {
|
|
291
|
+
currentContainingBlockComputedStyle = computedStyle;
|
|
292
|
+
}
|
|
293
|
+
currentNode = floatingUi_utils_dom.getParentNode(currentNode);
|
|
294
|
+
}
|
|
295
|
+
cache.set(element, result);
|
|
296
|
+
return result;
|
|
297
|
+
}
|
|
298
|
+
function getClippingRect(_ref) {
|
|
299
|
+
let {
|
|
300
|
+
element,
|
|
301
|
+
boundary,
|
|
302
|
+
rootBoundary,
|
|
303
|
+
strategy
|
|
304
|
+
} = _ref;
|
|
305
|
+
const elementClippingAncestors = boundary === "clippingAncestors" ? floatingUi_utils_dom.isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);
|
|
306
|
+
const clippingAncestors = [...elementClippingAncestors, rootBoundary];
|
|
307
|
+
const firstClippingAncestor = clippingAncestors[0];
|
|
308
|
+
const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
|
|
309
|
+
const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
|
|
310
|
+
accRect.top = floatingUi_utils.max(rect.top, accRect.top);
|
|
311
|
+
accRect.right = floatingUi_utils.min(rect.right, accRect.right);
|
|
312
|
+
accRect.bottom = floatingUi_utils.min(rect.bottom, accRect.bottom);
|
|
313
|
+
accRect.left = floatingUi_utils.max(rect.left, accRect.left);
|
|
314
|
+
return accRect;
|
|
315
|
+
}, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
|
|
316
|
+
return {
|
|
317
|
+
width: clippingRect.right - clippingRect.left,
|
|
318
|
+
height: clippingRect.bottom - clippingRect.top,
|
|
319
|
+
x: clippingRect.left,
|
|
320
|
+
y: clippingRect.top
|
|
321
|
+
};
|
|
322
|
+
}
|
|
323
|
+
function getDimensions(element) {
|
|
324
|
+
const {
|
|
325
|
+
width,
|
|
326
|
+
height
|
|
327
|
+
} = getCssDimensions(element);
|
|
328
|
+
return {
|
|
329
|
+
width,
|
|
330
|
+
height
|
|
331
|
+
};
|
|
332
|
+
}
|
|
333
|
+
function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
334
|
+
const isOffsetParentAnElement = floatingUi_utils_dom.isHTMLElement(offsetParent);
|
|
335
|
+
const documentElement = floatingUi_utils_dom.getDocumentElement(offsetParent);
|
|
336
|
+
const isFixed = strategy === "fixed";
|
|
337
|
+
const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
|
|
338
|
+
let scroll = {
|
|
339
|
+
scrollLeft: 0,
|
|
340
|
+
scrollTop: 0
|
|
341
|
+
};
|
|
342
|
+
const offsets = floatingUi_utils.createCoords(0);
|
|
343
|
+
function setLeftRTLScrollbarOffset() {
|
|
344
|
+
offsets.x = getWindowScrollBarX(documentElement);
|
|
345
|
+
}
|
|
346
|
+
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
|
|
347
|
+
if (floatingUi_utils_dom.getNodeName(offsetParent) !== "body" || floatingUi_utils_dom.isOverflowElement(documentElement)) {
|
|
348
|
+
scroll = floatingUi_utils_dom.getNodeScroll(offsetParent);
|
|
349
|
+
}
|
|
350
|
+
if (isOffsetParentAnElement) {
|
|
351
|
+
const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
|
|
352
|
+
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
353
|
+
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
354
|
+
} else if (documentElement) {
|
|
355
|
+
setLeftRTLScrollbarOffset();
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
if (isFixed && !isOffsetParentAnElement && documentElement) {
|
|
359
|
+
setLeftRTLScrollbarOffset();
|
|
360
|
+
}
|
|
361
|
+
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : floatingUi_utils.createCoords(0);
|
|
362
|
+
const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
|
|
363
|
+
const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
|
|
364
|
+
return {
|
|
365
|
+
x,
|
|
366
|
+
y,
|
|
367
|
+
width: rect.width,
|
|
368
|
+
height: rect.height
|
|
369
|
+
};
|
|
370
|
+
}
|
|
371
|
+
function isStaticPositioned(element) {
|
|
372
|
+
return floatingUi_utils_dom.getComputedStyle(element).position === "static";
|
|
373
|
+
}
|
|
374
|
+
function getTrueOffsetParent(element, polyfill) {
|
|
375
|
+
if (!floatingUi_utils_dom.isHTMLElement(element) || floatingUi_utils_dom.getComputedStyle(element).position === "fixed") {
|
|
376
|
+
return null;
|
|
377
|
+
}
|
|
378
|
+
if (polyfill) {
|
|
379
|
+
return polyfill(element);
|
|
380
|
+
}
|
|
381
|
+
let rawOffsetParent = element.offsetParent;
|
|
382
|
+
if (floatingUi_utils_dom.getDocumentElement(element) === rawOffsetParent) {
|
|
383
|
+
rawOffsetParent = rawOffsetParent.ownerDocument.body;
|
|
384
|
+
}
|
|
385
|
+
return rawOffsetParent;
|
|
386
|
+
}
|
|
387
|
+
function getOffsetParent(element, polyfill) {
|
|
388
|
+
const win = floatingUi_utils_dom.getWindow(element);
|
|
389
|
+
if (floatingUi_utils_dom.isTopLayer(element)) {
|
|
390
|
+
return win;
|
|
391
|
+
}
|
|
392
|
+
if (!floatingUi_utils_dom.isHTMLElement(element)) {
|
|
393
|
+
let svgOffsetParent = floatingUi_utils_dom.getParentNode(element);
|
|
394
|
+
while (svgOffsetParent && !floatingUi_utils_dom.isLastTraversableNode(svgOffsetParent)) {
|
|
395
|
+
if (floatingUi_utils_dom.isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {
|
|
396
|
+
return svgOffsetParent;
|
|
397
|
+
}
|
|
398
|
+
svgOffsetParent = floatingUi_utils_dom.getParentNode(svgOffsetParent);
|
|
399
|
+
}
|
|
400
|
+
return win;
|
|
401
|
+
}
|
|
402
|
+
let offsetParent = getTrueOffsetParent(element, polyfill);
|
|
403
|
+
while (offsetParent && floatingUi_utils_dom.isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {
|
|
404
|
+
offsetParent = getTrueOffsetParent(offsetParent, polyfill);
|
|
405
|
+
}
|
|
406
|
+
if (offsetParent && floatingUi_utils_dom.isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !floatingUi_utils_dom.isContainingBlock(offsetParent)) {
|
|
407
|
+
return win;
|
|
408
|
+
}
|
|
409
|
+
return offsetParent || floatingUi_utils_dom.getContainingBlock(element) || win;
|
|
410
|
+
}
|
|
411
|
+
const getElementRects = async function(data) {
|
|
412
|
+
const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
|
|
413
|
+
const getDimensionsFn = this.getDimensions;
|
|
414
|
+
const floatingDimensions = await getDimensionsFn(data.floating);
|
|
415
|
+
return {
|
|
416
|
+
reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),
|
|
417
|
+
floating: {
|
|
418
|
+
x: 0,
|
|
419
|
+
y: 0,
|
|
420
|
+
width: floatingDimensions.width,
|
|
421
|
+
height: floatingDimensions.height
|
|
422
|
+
}
|
|
423
|
+
};
|
|
424
|
+
};
|
|
425
|
+
function isRTL(element) {
|
|
426
|
+
return floatingUi_utils_dom.getComputedStyle(element).direction === "rtl";
|
|
427
|
+
}
|
|
428
|
+
const platform = {
|
|
429
|
+
convertOffsetParentRelativeRectToViewportRelativeRect,
|
|
430
|
+
getDocumentElement: floatingUi_utils_dom.getDocumentElement,
|
|
431
|
+
getClippingRect,
|
|
432
|
+
getOffsetParent,
|
|
433
|
+
getElementRects,
|
|
434
|
+
getClientRects,
|
|
435
|
+
getDimensions,
|
|
436
|
+
getScale,
|
|
437
|
+
isElement: floatingUi_utils_dom.isElement,
|
|
438
|
+
isRTL
|
|
439
|
+
};
|
|
440
|
+
function rectsAreEqual(a, b) {
|
|
441
|
+
return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;
|
|
442
|
+
}
|
|
443
|
+
function observeMove(element, onMove) {
|
|
444
|
+
let io = null;
|
|
445
|
+
let timeoutId;
|
|
446
|
+
const root = floatingUi_utils_dom.getDocumentElement(element);
|
|
447
|
+
function cleanup() {
|
|
448
|
+
var _io;
|
|
449
|
+
clearTimeout(timeoutId);
|
|
450
|
+
(_io = io) == null || _io.disconnect();
|
|
451
|
+
io = null;
|
|
452
|
+
}
|
|
453
|
+
function refresh(skip, threshold) {
|
|
454
|
+
if (skip === void 0) {
|
|
455
|
+
skip = false;
|
|
456
|
+
}
|
|
457
|
+
if (threshold === void 0) {
|
|
458
|
+
threshold = 1;
|
|
459
|
+
}
|
|
460
|
+
cleanup();
|
|
461
|
+
const elementRectForRootMargin = element.getBoundingClientRect();
|
|
462
|
+
const {
|
|
463
|
+
left,
|
|
464
|
+
top,
|
|
465
|
+
width,
|
|
466
|
+
height
|
|
467
|
+
} = elementRectForRootMargin;
|
|
468
|
+
if (!skip) {
|
|
469
|
+
onMove();
|
|
470
|
+
}
|
|
471
|
+
if (!width || !height) {
|
|
472
|
+
return;
|
|
473
|
+
}
|
|
474
|
+
const insetTop = floatingUi_utils.floor(top);
|
|
475
|
+
const insetRight = floatingUi_utils.floor(root.clientWidth - (left + width));
|
|
476
|
+
const insetBottom = floatingUi_utils.floor(root.clientHeight - (top + height));
|
|
477
|
+
const insetLeft = floatingUi_utils.floor(left);
|
|
478
|
+
const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px";
|
|
479
|
+
const options = {
|
|
480
|
+
rootMargin,
|
|
481
|
+
threshold: floatingUi_utils.max(0, floatingUi_utils.min(1, threshold)) || 1
|
|
482
|
+
};
|
|
483
|
+
let isFirstUpdate = true;
|
|
484
|
+
function handleObserve(entries) {
|
|
485
|
+
const ratio = entries[0].intersectionRatio;
|
|
486
|
+
if (ratio !== threshold) {
|
|
487
|
+
if (!isFirstUpdate) {
|
|
488
|
+
return refresh();
|
|
489
|
+
}
|
|
490
|
+
if (!ratio) {
|
|
491
|
+
timeoutId = setTimeout(() => {
|
|
492
|
+
refresh(false, 1e-7);
|
|
493
|
+
}, 1e3);
|
|
494
|
+
} else {
|
|
495
|
+
refresh(false, ratio);
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
if (ratio === 1 && !rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {
|
|
499
|
+
refresh();
|
|
500
|
+
}
|
|
501
|
+
isFirstUpdate = false;
|
|
502
|
+
}
|
|
503
|
+
try {
|
|
504
|
+
io = new IntersectionObserver(handleObserve, {
|
|
505
|
+
...options,
|
|
506
|
+
// Handle <iframe>s
|
|
507
|
+
root: root.ownerDocument
|
|
508
|
+
});
|
|
509
|
+
} catch (_e) {
|
|
510
|
+
io = new IntersectionObserver(handleObserve, options);
|
|
511
|
+
}
|
|
512
|
+
io.observe(element);
|
|
513
|
+
}
|
|
514
|
+
refresh(true);
|
|
515
|
+
return cleanup;
|
|
516
|
+
}
|
|
517
|
+
function autoUpdate(reference, floating, update, options) {
|
|
518
|
+
if (options === void 0) {
|
|
519
|
+
options = {};
|
|
520
|
+
}
|
|
521
|
+
const {
|
|
522
|
+
ancestorScroll = true,
|
|
523
|
+
ancestorResize = true,
|
|
524
|
+
elementResize = typeof ResizeObserver === "function",
|
|
525
|
+
layoutShift = typeof IntersectionObserver === "function",
|
|
526
|
+
animationFrame = false
|
|
527
|
+
} = options;
|
|
528
|
+
const referenceEl = unwrapElement(reference);
|
|
529
|
+
const ancestors = ancestorScroll || ancestorResize ? [...referenceEl ? floatingUi_utils_dom.getOverflowAncestors(referenceEl) : [], ...floatingUi_utils_dom.getOverflowAncestors(floating)] : [];
|
|
530
|
+
ancestors.forEach((ancestor) => {
|
|
531
|
+
ancestorScroll && ancestor.addEventListener("scroll", update, {
|
|
532
|
+
passive: true
|
|
533
|
+
});
|
|
534
|
+
ancestorResize && ancestor.addEventListener("resize", update);
|
|
535
|
+
});
|
|
536
|
+
const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;
|
|
537
|
+
let reobserveFrame = -1;
|
|
538
|
+
let resizeObserver = null;
|
|
539
|
+
if (elementResize) {
|
|
540
|
+
resizeObserver = new ResizeObserver((_ref) => {
|
|
541
|
+
let [firstEntry] = _ref;
|
|
542
|
+
if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {
|
|
543
|
+
resizeObserver.unobserve(floating);
|
|
544
|
+
cancelAnimationFrame(reobserveFrame);
|
|
545
|
+
reobserveFrame = requestAnimationFrame(() => {
|
|
546
|
+
var _resizeObserver;
|
|
547
|
+
(_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);
|
|
548
|
+
});
|
|
549
|
+
}
|
|
550
|
+
update();
|
|
551
|
+
});
|
|
552
|
+
if (referenceEl && !animationFrame) {
|
|
553
|
+
resizeObserver.observe(referenceEl);
|
|
554
|
+
}
|
|
555
|
+
resizeObserver.observe(floating);
|
|
556
|
+
}
|
|
557
|
+
let frameId;
|
|
558
|
+
let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
|
|
559
|
+
if (animationFrame) {
|
|
560
|
+
frameLoop();
|
|
561
|
+
}
|
|
562
|
+
function frameLoop() {
|
|
563
|
+
const nextRefRect = getBoundingClientRect(reference);
|
|
564
|
+
if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) {
|
|
565
|
+
update();
|
|
566
|
+
}
|
|
567
|
+
prevRefRect = nextRefRect;
|
|
568
|
+
frameId = requestAnimationFrame(frameLoop);
|
|
569
|
+
}
|
|
570
|
+
update();
|
|
571
|
+
return () => {
|
|
572
|
+
var _resizeObserver2;
|
|
573
|
+
ancestors.forEach((ancestor) => {
|
|
574
|
+
ancestorScroll && ancestor.removeEventListener("scroll", update);
|
|
575
|
+
ancestorResize && ancestor.removeEventListener("resize", update);
|
|
576
|
+
});
|
|
577
|
+
cleanupIo == null || cleanupIo();
|
|
578
|
+
(_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();
|
|
579
|
+
resizeObserver = null;
|
|
580
|
+
if (animationFrame) {
|
|
581
|
+
cancelAnimationFrame(frameId);
|
|
582
|
+
}
|
|
583
|
+
};
|
|
584
|
+
}
|
|
585
|
+
const detectOverflow = floatingUi_core.detectOverflow;
|
|
586
|
+
const offset = floatingUi_core.offset;
|
|
587
|
+
const autoPlacement = floatingUi_core.autoPlacement;
|
|
588
|
+
const shift = floatingUi_core.shift;
|
|
589
|
+
const flip = floatingUi_core.flip;
|
|
590
|
+
const size = floatingUi_core.size;
|
|
591
|
+
const hide = floatingUi_core.hide;
|
|
592
|
+
const arrow = floatingUi_core.arrow;
|
|
593
|
+
const inline = floatingUi_core.inline;
|
|
594
|
+
const limitShift = floatingUi_core.limitShift;
|
|
595
|
+
const computePosition = (reference, floating, options) => {
|
|
596
|
+
const cache = /* @__PURE__ */ new Map();
|
|
597
|
+
const mergedOptions = {
|
|
598
|
+
platform,
|
|
599
|
+
...options
|
|
600
|
+
};
|
|
601
|
+
const platformWithCache = {
|
|
602
|
+
...mergedOptions.platform,
|
|
603
|
+
_c: cache
|
|
604
|
+
};
|
|
605
|
+
return floatingUi_core.computePosition(reference, floating, {
|
|
606
|
+
...mergedOptions,
|
|
607
|
+
platform: platformWithCache
|
|
608
|
+
});
|
|
609
|
+
};
|
|
610
|
+
exports.getOverflowAncestors = floatingUi_utils_dom.getOverflowAncestors;
|
|
611
|
+
exports.arrow = arrow;
|
|
612
|
+
exports.autoPlacement = autoPlacement;
|
|
613
|
+
exports.autoUpdate = autoUpdate;
|
|
614
|
+
exports.computePosition = computePosition;
|
|
615
|
+
exports.detectOverflow = detectOverflow;
|
|
616
|
+
exports.flip = flip;
|
|
617
|
+
exports.hide = hide;
|
|
618
|
+
exports.inline = inline;
|
|
619
|
+
exports.limitShift = limitShift;
|
|
620
|
+
exports.offset = offset;
|
|
621
|
+
exports.platform = platform;
|
|
622
|
+
exports.shift = shift;
|
|
623
|
+
exports.size = size;
|
|
624
|
+
//# sourceMappingURL=floating-ui.dom.cjs.js.map
|