jodit-pro 4.12.40 → 4.13.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/config.js +1 -0
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.css +1 -1
- package/es2015/jodit.fat.min.js +30 -30
- package/es2015/jodit.js +25 -7
- package/es2015/jodit.min.js +5 -5
- package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
- package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es2015/plugins/autocomplete/autocomplete.css +1 -1
- package/es2015/plugins/autocomplete/autocomplete.js +1 -1
- package/es2015/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2015/plugins/backup/backup.css +1 -1
- package/es2015/plugins/backup/backup.js +1 -1
- package/es2015/plugins/backup/backup.min.js +1 -1
- package/es2015/plugins/button-generator/button-generator.css +1 -1
- package/es2015/plugins/button-generator/button-generator.js +1 -1
- package/es2015/plugins/button-generator/button-generator.min.js +1 -1
- package/es2015/plugins/change-case/change-case.js +1 -1
- package/es2015/plugins/change-case/change-case.min.js +1 -1
- package/es2015/plugins/color-picker/color-picker.css +1 -1
- package/es2015/plugins/color-picker/color-picker.js +1 -1
- package/es2015/plugins/color-picker/color-picker.min.js +1 -1
- package/es2015/plugins/emoji/emoji.css +1 -1
- package/es2015/plugins/emoji/emoji.js +1 -1
- package/es2015/plugins/emoji/emoji.min.js +1 -1
- package/es2015/plugins/export-docs/export-docs.js +1 -1
- package/es2015/plugins/export-docs/export-docs.min.js +1 -1
- package/es2015/plugins/finder/finder.css +47 -4
- package/es2015/plugins/finder/finder.js +48 -3
- package/es2015/plugins/finder/finder.min.css +1 -1
- package/es2015/plugins/finder/finder.min.js +4 -4
- package/es2015/plugins/google-maps/google-maps.css +1 -1
- package/es2015/plugins/google-maps/google-maps.js +1 -1
- package/es2015/plugins/google-maps/google-maps.min.js +1 -1
- package/es2015/plugins/google-search/google-search.js +1 -1
- package/es2015/plugins/google-search/google-search.min.js +1 -1
- package/es2015/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es2015/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2015/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es2015/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es2015/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2015/plugins/image-editor-pro/image-editor-pro.css +52 -0
- package/es2015/plugins/image-editor-pro/image-editor-pro.js +3969 -0
- package/es2015/plugins/image-editor-pro/image-editor-pro.min.css +1 -0
- package/es2015/plugins/image-editor-pro/image-editor-pro.min.js +8 -0
- package/es2015/plugins/keyboard/keyboard.css +1 -1
- package/es2015/plugins/keyboard/keyboard.js +1 -1
- package/es2015/plugins/keyboard/keyboard.min.js +1 -1
- package/es2015/plugins/mobile-view/mobile-view.js +1 -1
- package/es2015/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2015/plugins/page-break/page-break.js +1 -1
- package/es2015/plugins/page-break/page-break.min.js +1 -1
- package/es2015/plugins/paste-code/paste-code.css +1 -1
- package/es2015/plugins/paste-code/paste-code.js +1 -1
- package/es2015/plugins/paste-code/paste-code.min.js +1 -1
- package/es2015/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es2015/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2015/plugins/show-blocks/show-blocks.js +1 -1
- package/es2015/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2015/plugins/style/style.css +1 -1
- package/es2015/plugins/style/style.js +1 -1
- package/es2015/plugins/style/style.min.js +1 -1
- package/es2015/plugins/templates/templates.css +1 -1
- package/es2015/plugins/templates/templates.js +1 -1
- package/es2015/plugins/templates/templates.min.js +1 -1
- package/es2015/plugins/todo-list/todo-list.css +1 -1
- package/es2015/plugins/todo-list/todo-list.js +1 -1
- package/es2015/plugins/todo-list/todo-list.min.js +1 -1
- package/es2015/plugins/translate/translate.css +1 -1
- package/es2015/plugins/translate/translate.js +1 -1
- package/es2015/plugins/translate/translate.min.js +1 -1
- package/es2015/plugins/tune-block/tune-block.css +1 -1
- package/es2015/plugins/tune-block/tune-block.js +1 -1
- package/es2015/plugins/tune-block/tune-block.min.js +1 -1
- package/es2018/jodit.fat.min.css +1 -1
- package/es2018/jodit.fat.min.js +31 -31
- package/es2018/jodit.min.js +5 -5
- package/es2018/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es2018/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2018/plugins/backup/backup.min.js +1 -1
- package/es2018/plugins/button-generator/button-generator.min.js +1 -1
- package/es2018/plugins/change-case/change-case.min.js +1 -1
- package/es2018/plugins/color-picker/color-picker.min.js +1 -1
- package/es2018/plugins/emoji/emoji.min.js +1 -1
- package/es2018/plugins/export-docs/export-docs.min.js +1 -1
- package/es2018/plugins/finder/finder.min.css +1 -1
- package/es2018/plugins/finder/finder.min.js +4 -4
- package/es2018/plugins/google-maps/google-maps.min.js +1 -1
- package/es2018/plugins/google-search/google-search.min.js +1 -1
- package/es2018/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2018/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2018/plugins/image-editor-pro/image-editor-pro.min.css +1 -0
- package/es2018/plugins/image-editor-pro/image-editor-pro.min.js +8 -0
- package/es2018/plugins/keyboard/keyboard.min.js +1 -1
- package/es2018/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2018/plugins/page-break/page-break.min.js +1 -1
- package/es2018/plugins/paste-code/paste-code.min.js +1 -1
- package/es2018/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2018/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2018/plugins/style/style.min.js +1 -1
- package/es2018/plugins/templates/templates.min.js +1 -1
- package/es2018/plugins/todo-list/todo-list.min.js +1 -1
- package/es2018/plugins/translate/translate.min.js +1 -1
- package/es2018/plugins/tune-block/tune-block.min.js +1 -1
- package/es2021/jodit.css +1 -1
- package/es2021/jodit.fat.min.css +1 -1
- package/es2021/jodit.fat.min.js +823 -39
- package/es2021/jodit.js +25 -7
- package/es2021/jodit.min.js +6 -6
- package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
- package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es2021/plugins/autocomplete/autocomplete.css +1 -1
- package/es2021/plugins/autocomplete/autocomplete.js +1 -1
- package/es2021/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2021/plugins/backup/backup.css +1 -1
- package/es2021/plugins/backup/backup.js +1 -1
- package/es2021/plugins/backup/backup.min.js +1 -1
- package/es2021/plugins/button-generator/button-generator.css +1 -1
- package/es2021/plugins/button-generator/button-generator.js +1 -1
- package/es2021/plugins/button-generator/button-generator.min.js +1 -1
- package/es2021/plugins/change-case/change-case.js +1 -1
- package/es2021/plugins/change-case/change-case.min.js +1 -1
- package/es2021/plugins/color-picker/color-picker.css +1 -1
- package/es2021/plugins/color-picker/color-picker.js +1 -1
- package/es2021/plugins/color-picker/color-picker.min.js +1 -1
- package/es2021/plugins/emoji/emoji.css +1 -1
- package/es2021/plugins/emoji/emoji.js +1 -1
- package/es2021/plugins/emoji/emoji.min.js +1 -1
- package/es2021/plugins/export-docs/export-docs.js +1 -1
- package/es2021/plugins/export-docs/export-docs.min.js +1 -1
- package/es2021/plugins/finder/finder.css +47 -4
- package/es2021/plugins/finder/finder.js +48 -3
- package/es2021/plugins/finder/finder.min.css +1 -1
- package/es2021/plugins/finder/finder.min.js +12 -12
- package/es2021/plugins/google-maps/google-maps.css +1 -1
- package/es2021/plugins/google-maps/google-maps.js +1 -1
- package/es2021/plugins/google-maps/google-maps.min.js +1 -1
- package/es2021/plugins/google-search/google-search.js +1 -1
- package/es2021/plugins/google-search/google-search.min.js +1 -1
- package/es2021/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es2021/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2021/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es2021/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es2021/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2021/plugins/image-editor-pro/image-editor-pro.css +52 -0
- package/es2021/plugins/image-editor-pro/image-editor-pro.js +3870 -0
- package/es2021/plugins/image-editor-pro/image-editor-pro.min.css +1 -0
- package/es2021/plugins/image-editor-pro/image-editor-pro.min.js +792 -0
- package/es2021/plugins/keyboard/keyboard.css +1 -1
- package/es2021/plugins/keyboard/keyboard.js +1 -1
- package/es2021/plugins/keyboard/keyboard.min.js +1 -1
- package/es2021/plugins/mobile-view/mobile-view.js +1 -1
- package/es2021/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2021/plugins/page-break/page-break.js +1 -1
- package/es2021/plugins/page-break/page-break.min.js +1 -1
- package/es2021/plugins/paste-code/paste-code.css +1 -1
- package/es2021/plugins/paste-code/paste-code.js +1 -1
- package/es2021/plugins/paste-code/paste-code.min.js +1 -1
- package/es2021/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es2021/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2021/plugins/show-blocks/show-blocks.js +1 -1
- package/es2021/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2021/plugins/style/style.css +1 -1
- package/es2021/plugins/style/style.js +1 -1
- package/es2021/plugins/style/style.min.js +1 -1
- package/es2021/plugins/templates/templates.css +1 -1
- package/es2021/plugins/templates/templates.js +1 -1
- package/es2021/plugins/templates/templates.min.js +1 -1
- package/es2021/plugins/todo-list/todo-list.css +1 -1
- package/es2021/plugins/todo-list/todo-list.js +1 -1
- package/es2021/plugins/todo-list/todo-list.min.js +1 -1
- package/es2021/plugins/translate/translate.css +1 -1
- package/es2021/plugins/translate/translate.js +1 -1
- package/es2021/plugins/translate/translate.min.js +1 -1
- package/es2021/plugins/tune-block/tune-block.css +1 -1
- package/es2021/plugins/tune-block/tune-block.js +1 -1
- package/es2021/plugins/tune-block/tune-block.min.js +1 -1
- package/es2021.en/jodit.css +1 -1
- package/es2021.en/jodit.fat.min.css +1 -1
- package/es2021.en/jodit.fat.min.js +865 -81
- package/es2021.en/jodit.js +25 -7
- package/es2021.en/jodit.min.js +6 -6
- package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
- package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es2021.en/plugins/autocomplete/autocomplete.css +1 -1
- package/es2021.en/plugins/autocomplete/autocomplete.js +1 -1
- package/es2021.en/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2021.en/plugins/backup/backup.css +1 -1
- package/es2021.en/plugins/backup/backup.js +1 -1
- package/es2021.en/plugins/backup/backup.min.js +1 -1
- package/es2021.en/plugins/button-generator/button-generator.css +1 -1
- package/es2021.en/plugins/button-generator/button-generator.js +1 -1
- package/es2021.en/plugins/button-generator/button-generator.min.js +1 -1
- package/es2021.en/plugins/change-case/change-case.js +1 -1
- package/es2021.en/plugins/change-case/change-case.min.js +1 -1
- package/es2021.en/plugins/color-picker/color-picker.css +1 -1
- package/es2021.en/plugins/color-picker/color-picker.js +1 -1
- package/es2021.en/plugins/color-picker/color-picker.min.js +1 -1
- package/es2021.en/plugins/emoji/emoji.css +1 -1
- package/es2021.en/plugins/emoji/emoji.js +1 -1
- package/es2021.en/plugins/emoji/emoji.min.js +1 -1
- package/es2021.en/plugins/export-docs/export-docs.js +1 -1
- package/es2021.en/plugins/export-docs/export-docs.min.js +1 -1
- package/es2021.en/plugins/finder/finder.css +47 -4
- package/es2021.en/plugins/finder/finder.js +48 -3
- package/es2021.en/plugins/finder/finder.min.css +1 -1
- package/es2021.en/plugins/finder/finder.min.js +4 -4
- package/es2021.en/plugins/google-maps/google-maps.css +1 -1
- package/es2021.en/plugins/google-maps/google-maps.js +1 -1
- package/es2021.en/plugins/google-maps/google-maps.min.js +1 -1
- package/es2021.en/plugins/google-search/google-search.js +1 -1
- package/es2021.en/plugins/google-search/google-search.min.js +1 -1
- package/es2021.en/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es2021.en/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2021.en/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es2021.en/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es2021.en/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2021.en/plugins/image-editor-pro/image-editor-pro.css +52 -0
- package/es2021.en/plugins/image-editor-pro/image-editor-pro.js +3870 -0
- package/es2021.en/plugins/image-editor-pro/image-editor-pro.min.css +1 -0
- package/es2021.en/plugins/image-editor-pro/image-editor-pro.min.js +792 -0
- package/es2021.en/plugins/keyboard/keyboard.css +1 -1
- package/es2021.en/plugins/keyboard/keyboard.js +1 -1
- package/es2021.en/plugins/keyboard/keyboard.min.js +1 -1
- package/es2021.en/plugins/mobile-view/mobile-view.js +1 -1
- package/es2021.en/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2021.en/plugins/page-break/page-break.js +1 -1
- package/es2021.en/plugins/page-break/page-break.min.js +1 -1
- package/es2021.en/plugins/paste-code/paste-code.css +1 -1
- package/es2021.en/plugins/paste-code/paste-code.js +1 -1
- package/es2021.en/plugins/paste-code/paste-code.min.js +1 -1
- package/es2021.en/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es2021.en/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2021.en/plugins/show-blocks/show-blocks.js +1 -1
- package/es2021.en/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2021.en/plugins/style/style.css +1 -1
- package/es2021.en/plugins/style/style.js +1 -1
- package/es2021.en/plugins/style/style.min.js +1 -1
- package/es2021.en/plugins/templates/templates.css +1 -1
- package/es2021.en/plugins/templates/templates.js +1 -1
- package/es2021.en/plugins/templates/templates.min.js +1 -1
- package/es2021.en/plugins/todo-list/todo-list.css +1 -1
- package/es2021.en/plugins/todo-list/todo-list.js +1 -1
- package/es2021.en/plugins/todo-list/todo-list.min.js +1 -1
- package/es2021.en/plugins/translate/translate.css +1 -1
- package/es2021.en/plugins/translate/translate.js +1 -1
- package/es2021.en/plugins/translate/translate.min.js +1 -1
- package/es2021.en/plugins/tune-block/tune-block.css +1 -1
- package/es2021.en/plugins/tune-block/tune-block.js +1 -1
- package/es2021.en/plugins/tune-block/tune-block.min.js +1 -1
- package/es5/jodit.css +2 -2
- package/es5/jodit.fat.min.css +1 -1
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +22 -6
- package/es5/jodit.min.css +2 -2
- package/es5/jodit.min.js +2 -2
- package/es5/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es5/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
- package/es5/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es5/plugins/autocomplete/autocomplete.css +1 -1
- package/es5/plugins/autocomplete/autocomplete.js +1 -1
- package/es5/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es5/plugins/backup/backup.css +1 -1
- package/es5/plugins/backup/backup.js +1 -1
- package/es5/plugins/backup/backup.min.js +1 -1
- package/es5/plugins/button-generator/button-generator.css +1 -1
- package/es5/plugins/button-generator/button-generator.js +1 -1
- package/es5/plugins/button-generator/button-generator.min.js +1 -1
- package/es5/plugins/change-case/change-case.js +1 -1
- package/es5/plugins/change-case/change-case.min.js +1 -1
- package/es5/plugins/color-picker/color-picker.css +1 -1
- package/es5/plugins/color-picker/color-picker.js +1 -1
- package/es5/plugins/color-picker/color-picker.min.js +1 -1
- package/es5/plugins/emoji/emoji.css +1 -1
- package/es5/plugins/emoji/emoji.js +1 -1
- package/es5/plugins/emoji/emoji.min.js +1 -1
- package/es5/plugins/export-docs/export-docs.js +1 -1
- package/es5/plugins/export-docs/export-docs.min.js +1 -1
- package/es5/plugins/finder/finder.css +47 -4
- package/es5/plugins/finder/finder.js +93 -28
- package/es5/plugins/finder/finder.min.css +1 -1
- package/es5/plugins/finder/finder.min.js +2 -2
- package/es5/plugins/google-maps/google-maps.css +1 -1
- package/es5/plugins/google-maps/google-maps.js +1 -1
- package/es5/plugins/google-maps/google-maps.min.js +1 -1
- package/es5/plugins/google-search/google-search.js +1 -1
- package/es5/plugins/google-search/google-search.min.js +1 -1
- package/es5/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es5/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es5/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es5/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es5/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es5/plugins/image-editor-pro/image-editor-pro.css +52 -0
- package/es5/plugins/image-editor-pro/image-editor-pro.js +5469 -0
- package/es5/plugins/image-editor-pro/image-editor-pro.min.css +1 -0
- package/es5/plugins/image-editor-pro/image-editor-pro.min.js +8 -0
- package/es5/plugins/keyboard/keyboard.css +1 -1
- package/es5/plugins/keyboard/keyboard.js +1 -1
- package/es5/plugins/keyboard/keyboard.min.js +1 -1
- package/es5/plugins/mobile-view/mobile-view.js +1 -1
- package/es5/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es5/plugins/page-break/page-break.js +1 -1
- package/es5/plugins/page-break/page-break.min.js +1 -1
- package/es5/plugins/paste-code/paste-code.css +1 -1
- package/es5/plugins/paste-code/paste-code.js +1 -1
- package/es5/plugins/paste-code/paste-code.min.js +1 -1
- package/es5/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es5/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es5/plugins/show-blocks/show-blocks.js +1 -1
- package/es5/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es5/plugins/style/style.css +1 -1
- package/es5/plugins/style/style.js +1 -1
- package/es5/plugins/style/style.min.js +1 -1
- package/es5/plugins/templates/templates.css +1 -1
- package/es5/plugins/templates/templates.js +1 -1
- package/es5/plugins/templates/templates.min.js +1 -1
- package/es5/plugins/todo-list/todo-list.css +1 -1
- package/es5/plugins/todo-list/todo-list.js +1 -1
- package/es5/plugins/todo-list/todo-list.min.js +1 -1
- package/es5/plugins/translate/translate.css +1 -1
- package/es5/plugins/translate/translate.js +1 -1
- package/es5/plugins/translate/translate.min.js +1 -1
- package/es5/plugins/tune-block/tune-block.css +1 -1
- package/es5/plugins/tune-block/tune-block.js +1 -1
- package/es5/plugins/tune-block/tune-block.min.js +1 -1
- package/es5/polyfills.fat.min.js +1 -1
- package/es5/polyfills.js +1 -1
- package/es5/polyfills.min.js +1 -1
- package/esm/config.d.ts +9 -0
- package/esm/plugins/all.js +1 -1
- package/esm/plugins/finder/ui/lightboox/lightbox.js +2 -2
- package/esm/plugins/finder/ui/virtual-scroll/virtual-scroll.d.ts +11 -1
- package/esm/plugins/finder/ui/virtual-scroll/virtual-scroll.js +2 -2
- package/esm/plugins/image-editor-pro/adapter.d.ts +98 -0
- package/esm/plugins/image-editor-pro/adapter.js +1 -0
- package/esm/plugins/image-editor-pro/config.d.ts +17 -0
- package/esm/plugins/image-editor-pro/config.js +1 -0
- package/esm/plugins/image-editor-pro/image-editor-pro.d.ts +26 -0
- package/esm/plugins/image-editor-pro/image-editor-pro.js +1 -0
- package/package.json +2 -1
- package/types/config.d.ts +9 -0
- package/types/plugins/finder/ui/virtual-scroll/virtual-scroll.d.ts +11 -1
- package/types/plugins/image-editor-pro/adapter.d.ts +98 -0
- package/types/plugins/image-editor-pro/config.d.ts +17 -0
- package/types/plugins/image-editor-pro/image-editor-pro.d.ts +26 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var p=Object.defineProperty;var d=(l,e)=>p(l,"name",{value:e,configurable:!0});var r,a=function(l,e,t,i){var s=arguments.length,n=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(l,e,t,i);else for(var c=l.length-1;c>=0;c--)(h=l[c])&&(n=(s<3?h(n):s>3?h(e,t,n):h(e,t))||n);return s>3&&n&&Object.defineProperty(e,t,n),n},m;import{KEY_LEFT as f,KEY_RIGHT as v,KEY_SPACE as w}from"jodit/esm/core/constants.js";import{autobind as x,component as
|
|
1
|
+
var p=Object.defineProperty;var d=(l,e)=>p(l,"name",{value:e,configurable:!0});var r,a=function(l,e,t,i){var s=arguments.length,n=s<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(l,e,t,i);else for(var c=l.length-1;c>=0;c--)(h=l[c])&&(n=(s<3?h(n):s>3?h(e,t,n):h(e,t))||n);return s>3&&n&&Object.defineProperty(e,t,n),n},m;import{KEY_LEFT as f,KEY_RIGHT as v,KEY_SPACE as w}from"jodit/esm/core/constants.js";import{autobind as x,component as y,watch as u}from"jodit/esm/core/decorators/index.js";import{css as g,loadImage as C}from"jodit/esm/core/helpers/index.js";import{assert as k}from"jodit/esm/core/helpers/utils/assert.js";import{Dialog as I,Dom as _,UIElement as b}from"jodit/esm/modules/index.js";let o=m=(r=class extends b{className(){return"UILightBox"}render(){return`<div>
|
|
2
2
|
<div class='&__previous'>*angle-left*</div>
|
|
3
3
|
<div class='&__preview'></div>
|
|
4
4
|
<div class='&__loader'></div>
|
|
5
5
|
<div class='&__next'>*angle-right*</div>
|
|
6
|
-
</div>`}constructor(e,t,i){super(e),this.current=t,this.elements=i,this.dialog=new I;const{dialog:s}=this;s.setMod("theme",e.state.theme).toolbar.setMod("mode","header"),s.open(this),this.elements=this.elements.filter(n=>n.isImage),s.e.on(s,"afterClose",()=>{this.destruct()}),this.addGlobalListeners(),this.onChangeCurrent(),s.toolbar.build([{icon:"check",exec:d(()=>{e.stateManager.addActive(this.current,!1),e.e.fire("select.filebrowser"),s.close()},"exec")},"dialog.close"])}async onChangeCurrent(){const{current:e}=this;this.setMod("loading",!0);const t=this.getElm("preview");if(
|
|
6
|
+
</div>`}constructor(e,t,i){super(e),this.current=t,this.elements=i,this.dialog=new I;const{dialog:s}=this;s.setMod("theme",e.state.theme).toolbar.setMod("mode","header"),s.open(this),this.elements=this.elements.filter(n=>n.isImage),s.e.on(s,"afterClose",()=>{this.j.async.setTimeout(()=>this.destruct(),1)}),this.addGlobalListeners(),this.onChangeCurrent(),s.toolbar.build([{icon:"check",exec:d(()=>{e.stateManager.addActive(this.current,!1),e.e.fire("select.filebrowser"),s.close()},"exec")},"dialog.close"])}async onChangeCurrent(){const{current:e}=this;this.setMod("loading",!0);const t=this.getElm("preview");if(k(t!=null,"preview element does not exist"),_.detach(t),g(t,{backgroundImage:null}),e.isImage){const i=await C(e.fileURL,this.j);this.dialog.setPosition(),g(t,{width:Math.min(this.jodit.ow.innerWidth,i.naturalWidth),height:Math.min(this.jodit.ow.innerHeight-100,i.naturalHeight),backgroundImage:`url(${i.src})`})}else{const i=await this.makeIframe(e.fileURL);t.appendChild(i)}this.dialog.setSize(),this.dialog.setPosition(),this.setMod("loading",!1)}makeIframe(e){const t=this.j.c.element("iframe");return t.classList.add(this.getFullElName("office-iframe")),t.src=/\.pdf/.test(e)?e:this.j.o.previewOfficeURL+encodeURIComponent(e),t}onPreviousClick(){const{current:e}=this;let t=this.j.stateManager.getIndex(e,this.elements);t<=0?t=this.elements.length-1:t-=1,this.current=this.elements[t]}onNextClick(){const{current:e}=this;let t=this.j.stateManager.getIndex(e,this.elements);t>=this.elements.length-1?t=0:t+=1,this.current=this.elements[t]}static open(e,t,i){return new m(e,t,i)}addGlobalListeners(){this.j.e.on(this.j.od,"keydown",this.onKeyPress)}onKeyPress(e){if(e.key===f||e.key===v||e.key===w)return e.key===f?this.onPreviousClick():this.onNextClick(),!1}removeGlobalListeners(){this.j.e.off(this.j.od,"keydown",this.onKeyPress)}destruct(){return this.removeGlobalListeners(),this.dialog.destruct(),super.destruct()}},d(r,"UILightBox"),r);a([u("current")],o.prototype,"onChangeCurrent",null),a([u("previous:click")],o.prototype,"onPreviousClick",null),a([u("next:click")],o.prototype,"onNextClick",null),a([x],o.prototype,"onKeyPress",null),o=m=a([y],o);export{o as UILightBox};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* See LICENSE.md in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
5
5
|
*/
|
|
6
|
-
import type { IBound } from "jodit/esm/types/index";
|
|
6
|
+
import type { IBound, ModType } from "jodit/esm/types/index";
|
|
7
7
|
import type { IFileBrowserItemElement } from "jodit/esm/types/file-browser";
|
|
8
8
|
import { UIGroup } from "jodit/esm/core/ui/group/group";
|
|
9
9
|
import type { StateManager } from "../../helpers/state-manager";
|
|
@@ -21,6 +21,16 @@ export declare class UIVirtualScroll extends UIGroup<IFileBrowserPro> implements
|
|
|
21
21
|
protected render(): string;
|
|
22
22
|
constructor(jodit: UIVirtualScroll['jodit'], stateManager: StateManager);
|
|
23
23
|
private reconcile;
|
|
24
|
+
private skeletons;
|
|
25
|
+
/**
|
|
26
|
+
* Skeleton placeholders are driven purely by the `loading` mod (set on the
|
|
27
|
+
* panel and synced down to this group) — no imperative show/hide from
|
|
28
|
+
* outside. They reuse the real item class and carry the current `view`/`size`
|
|
29
|
+
* mods, so they adapt to the active tile mode.
|
|
30
|
+
*/
|
|
31
|
+
afterSetMod(name: string, value: ModType): void;
|
|
32
|
+
private buildSkeletons;
|
|
33
|
+
private clearSkeletons;
|
|
24
34
|
build(items: IFileBrowserItemElement[]): void;
|
|
25
35
|
protected onScrollLoadChunk(): void;
|
|
26
36
|
protected onDragOver(e: DragEvent): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var m=Object.defineProperty;var
|
|
1
|
+
var m=Object.defineProperty;var u=(l,e)=>m(l,"name",{value:e,configurable:!0});var n,h=function(l,e,t,s){var i=arguments.length,o=i<3?e:s===null?s=Object.getOwnPropertyDescriptor(e,t):s,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(l,e,t,s);else for(var d=l.length-1;d>=0;d--)(c=l[d])&&(o=(i<3?c(o):i>3?c(e,t,o):c(e,t))||o);return i>3&&o&&Object.defineProperty(e,t,o),o},f;import{component as p,throttle as v,watch as a}from"jodit/esm/core/decorators/index.js";import{position as g}from"jodit/esm/core/helpers/size/position.js";import{UIGroup as _}from"jodit/esm/core/ui/group/group.js";import{FileBrowserItem as I}from"jodit/esm/modules/file-browser/builders/item.js";import{UIBrowserItem as S}from"../item/item.js";import{UISelectItems as w}from"../../../../traits/select-items/select-items.js";let r=f=(n=class extends _{className(){return"UIVirtualScroll"}render(){return`<div>
|
|
2
2
|
<div class="&__empty-message">~There are no files~</div>
|
|
3
3
|
<div class='&__loader'></div>
|
|
4
4
|
<div class='&__drag-area'>~Drop image~</div>
|
|
5
|
-
</div>`}constructor(e,t){super(e),this.stateManager=t,this.syncMod=!0,this.addItemsSelector()}reconcile(e){const t=this.elements.findIndex((
|
|
5
|
+
</div>`}constructor(e,t){super(e),this.stateManager=t,this.syncMod=!0,this.skeletons=[],this.addItemsSelector()}reconcile(e){const t=this.elements.findIndex((s,i)=>!e[i]||s.item.uniqueHashKey!==I.create(e[i]).uniqueHashKey);if(t>-1){for(let s=t;s<this.elements.length;s+=1)this.elements[s].destruct();this.elements.length=t}return t}afterSetMod(e,t){super.afterSetMod(e,t),e==="loading"&&(t?this.buildSkeletons():this.clearSkeletons())}buildSkeletons(e=24){if(!this.skeletons.length)for(let t=0;t<e;t+=1){const s=this.j.create.fromHTML('<div class="jodit-ui-browser-item jodit-ui-browser-item_skeleton_true"><div class="jodit-ui-browser-item__image"></div><div class="jodit-ui-browser-item__info"></div></div>');["view","size"].forEach(i=>{const o=this.mods[i];o&&s.classList.add(`jodit-ui-browser-item_${i}_${o}`)}),this.container.appendChild(s),this.skeletons.push(s)}}clearSkeletons(){this.skeletons.forEach(e=>e.remove()),this.skeletons.length=0}build(e){const t=this.reconcile(e);e.slice(t>-1?t:this.elements.length).forEach(s=>{const i=new S(this.jodit,s);Object.keys(this.mods).forEach(o=>{i.setMod(o,this.mods[o])}),this.append(i)}),this.setMod("empty",!this.elements.length)}onScrollLoadChunk(){!this.stateManager.isFavoriteItems&&this.container.scrollHeight-(this.container.scrollTop+this.container.offsetHeight)<this.j.o.pixelOffsetLoadNewChunk&&this.j.loadingManager.loadItemsChunk()}onDragOver(e){e.preventDefault(),this.setMod("dragover",!0)}onDragLeave(e){e.preventDefault(),this.setMod("dragover",!1)}addItemsSelector(){w.install(this)}static intersectRect(e,t){return!(t.left>e.left+e.width||t.left+t.width<e.left||t.top>e.top+e.height||t.top+t.height<e.top)}onSelectItems(e){const t=[];this.elements.forEach(s=>{const i=g(s.container);f.intersectRect(i,e)&&t.push(s.item)}),this.stateManager.state.activeElements=t}},u(n,"UIVirtualScroll"),n);h([a(":afterResize"),a(":resize"),a("container:scroll"),v()],r.prototype,"onScrollLoadChunk",null),h([a("container:dragover")],r.prototype,"onDragOver",null),h([a(["container:dragleave","container:drop"])],r.prototype,"onDragLeave",null),r=f=h([p],r);export{r as UIVirtualScroll};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
3
|
+
* See LICENSE.md in the project root for license information.
|
|
4
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
5
|
+
*/
|
|
6
|
+
import type { IFileBrowser } from "jodit/esm/types/index";
|
|
7
|
+
import { ViewComponent } from "jodit/esm/core/component/index";
|
|
8
|
+
/**
|
|
9
|
+
* The `save` callback the core `openImageEditor` passes to `open()`. It routes
|
|
10
|
+
* `(newname, box)` to the connector's resize/crop, then fires `success()` and
|
|
11
|
+
* (for in-content edits) an `onSuccess(newUrl)` that swaps the `<img>`.
|
|
12
|
+
*
|
|
13
|
+
* `action: 'saved'` (jodit ≥ 4.12.34) tells the core the file was already
|
|
14
|
+
* persisted by this editor: it skips the server resize/crop and only runs the
|
|
15
|
+
* success wiring with `newPath`.
|
|
16
|
+
*/
|
|
17
|
+
interface ImageEditorSave {
|
|
18
|
+
(newname: string | void, box: {
|
|
19
|
+
action: 'resize' | 'crop' | 'saved';
|
|
20
|
+
box: {
|
|
21
|
+
w: number;
|
|
22
|
+
h: number;
|
|
23
|
+
};
|
|
24
|
+
newPath?: string;
|
|
25
|
+
}, success: () => void, failed: (error: Error) => void): void;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* The view that instantiates the editor: a file browser (finder pencil / Image
|
|
29
|
+
* properties → Edit). `IFileBrowser` already combines `IViewWithToolbar`,
|
|
30
|
+
* `IDlgs` and `dataProvider`; using the named interface (not an ad-hoc `&`
|
|
31
|
+
* intersection) keeps `tsc` from over-instantiating the deep view types.
|
|
32
|
+
*/
|
|
33
|
+
type HostView = IFileBrowser;
|
|
34
|
+
/**
|
|
35
|
+
* PRO replacement for Jodit's core image editor, backed by the standalone
|
|
36
|
+
* `@jodit/image-editor` package (crop, resize, rotate, flip, filters, finetune,
|
|
37
|
+
* text annotations).
|
|
38
|
+
*
|
|
39
|
+
* It is registered as `Jodit.modules.ImageEditor`, so **every** path that opens
|
|
40
|
+
* the image editor — the finder pencil, Image properties → Edit, a direct
|
|
41
|
+
* `getInstance('ImageEditor')` — instantiates it via `getInstance`'s module
|
|
42
|
+
* fallback (the event fires on the *file browser's* emitter, which is why an
|
|
43
|
+
* `jodit.e` listener never worked).
|
|
44
|
+
*
|
|
45
|
+
* `@jodit/image-editor` is bundled as a dependency (it is part of the PRO
|
|
46
|
+
* editor), so the class is imported directly.
|
|
47
|
+
*
|
|
48
|
+
* The core editor speaks a server "resize/crop the original file" language; this
|
|
49
|
+
* one produces a fully edited `Blob`. So on save it uploads the blob through the
|
|
50
|
+
* connector's `imageSave` action (overwriting the source file), then reports
|
|
51
|
+
* `action: 'saved'` to the core's save callback — which skips the server
|
|
52
|
+
* resize/crop and runs only the `success`/`onSuccess` machinery, reusing
|
|
53
|
+
* finder's refresh and image-properties' `<img>` swap without reimplementing
|
|
54
|
+
* either.
|
|
55
|
+
*/
|
|
56
|
+
export declare class ProImageEditor extends ViewComponent<HostView> {
|
|
57
|
+
/** Marker for callers/tests. */
|
|
58
|
+
readonly isProImageEditor = true;
|
|
59
|
+
className(): string;
|
|
60
|
+
open(url: string, save: ImageEditorSave): Promise<void>;
|
|
61
|
+
/**
|
|
62
|
+
* Rebuilds the editor's top bar as a native Jodit toolbar in the dialog
|
|
63
|
+
* header — Save / Save as, dimensions, zoom, reset / undo / redo — driven by
|
|
64
|
+
* the `@jodit/image-editor` public API (`save()`, `saveAs()`, `update(...)`)
|
|
65
|
+
* and kept in sync by subscribing to the editor store. Returns a disposer.
|
|
66
|
+
*/
|
|
67
|
+
private mountToolbar;
|
|
68
|
+
/**
|
|
69
|
+
* "Save as" — prompt for a new file name, then persist the edited blob under
|
|
70
|
+
* it (mirrors the core editor's Save-as UX and its `onSave(name, …)` call).
|
|
71
|
+
*/
|
|
72
|
+
private saveAs;
|
|
73
|
+
/**
|
|
74
|
+
* Persists the edited blob. With `newName` it writes a new file ("Save as");
|
|
75
|
+
* without it, it overwrites the source ("Save"). Either way it then reuses
|
|
76
|
+
* the core's `save()` success/onSuccess wiring (finder refresh, in-content
|
|
77
|
+
* `<img>` swap) with a no-op resize of the resulting file.
|
|
78
|
+
*/
|
|
79
|
+
private persist;
|
|
80
|
+
/**
|
|
81
|
+
* Uploads the edited blob through the connector's `imageSave` action and
|
|
82
|
+
* returns the saved file's new path (`''` for older connectors that don't
|
|
83
|
+
* report it).
|
|
84
|
+
*/
|
|
85
|
+
private uploadEdited;
|
|
86
|
+
/**
|
|
87
|
+
* `ImageEditorActionBox.action: 'saved'` appeared in jodit 4.12.34 — an
|
|
88
|
+
* older core routes unknown actions into a server crop, which fails the
|
|
89
|
+
* save. Detected from the host view's version.
|
|
90
|
+
*/
|
|
91
|
+
private coreSupportsSaved;
|
|
92
|
+
private connectorUrl;
|
|
93
|
+
private loadImage;
|
|
94
|
+
private loadViaConnector;
|
|
95
|
+
private blobSize;
|
|
96
|
+
private error;
|
|
97
|
+
}
|
|
98
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var T=Object.defineProperty;var h=(P,n)=>T(P,"name",{value:n,configurable:!0});import{ICONS as $,ImageEditor as F,selectors as b}from"@jodit/image-editor";import{Config as O}from"jodit/esm/config.js";import{ViewComponent as B}from"jodit/esm/core/component/index.js";import{Button as v}from"jodit/esm/core/ui/button/button/button.js";import{Dialog as D}from"jodit/esm/modules/dialog/dialog.js";const j=class j extends B{constructor(){super(...arguments),this.isProImageEditor=!0}className(){return"ImageEditorPro"}async open(n,o){const t=this.j,s=O.defaultOptions.imageEditorPro,i=t.c.div("jodit-image-editor-pro");i.style.width="100%",i.style.height="100%";const r=new D({language:t.o.language});r.setSize(s.dialog.width,s.dialog.height),r.setContent(i),r.open();let e=null,c=null;const d=h(()=>{c?.(),c=null,e?.destroy(),e=null,r.close()},"cleanup");r.e.on("beforeClose",()=>{c?.(),c=null,e?.destroy(),e=null}),e=new F({container:i,state:{showToolbar:!1,status:"loading"},onSave:h(a=>{this.persist(e,n,void 0,a,o,d)},"onSave"),onSaveAs:h(a=>{this.saveAs(e,n,a,o,d)},"onSaveAs")}),c=this.mountToolbar(r,e);try{const a=await this.loadImage(n);await e.fromBlob(a)}catch(a){e?.update({status:"error",error:a instanceof Error?a.message:String(a)}),this.error(a)}}mountToolbar(n,o){const t=this.j,s=v(t,{icon:{name:"save"},text:t.i18n("Save")},"primary"),i=v(t,{icon:{name:"save"},name:"save-as",text:t.i18n("Save as")}),r=t.c.span("jodit-image-editor-pro__size"),e=v(t,$.minus),c=t.c.span("jodit-image-editor-pro__zoom"),d=v(t,$.plus),a=v(t,"update",t.i18n("Reset")),p=v(t,"undo",t.i18n("Undo")),f=v(t,"redo",t.i18n("Redo"));e.setState({tooltip:"Zoom out"}),d.setState({tooltip:"Zoom in"});let w=null;s.onAction(()=>{w=s,o.save()}),i.onAction(()=>{w=i,o.saveAs()}),e.onAction(()=>o.update({zoom:o.state.zoom/1.2})),d.onAction(()=>o.update({zoom:o.state.zoom*1.2})),a.onAction(()=>o.reset()),p.onAction(()=>o.update({history:{step:-1}})),f.onAction(()=>o.update({history:{step:1}}));const g=h((...l)=>{const u=t.c.div("jodit-image-editor-pro__group");return u.style.display="flex",u.style.alignItems="center",u.style.gap="4px",l.forEach(y=>u.appendChild(y)),u},"group"),m=t.c.div("jodit-image-editor-pro__toolbar");m.style.display="flex",m.style.alignItems="center",m.style.gap="12px",m.style.width="100%",r.style.opacity="0.75",c.style.minWidth="3.5em",c.style.textAlign="center",m.appendChild(g(s.container,i.container)),m.appendChild(g(r,e.container,c,d.container));const x=g(a.container,p.container,f.container);x.style.marginLeft="auto",m.appendChild(x),n.setHeader(m);const z="jodit-image-editor-pro__button_busy",_=h(l=>{const u=b.selectOutputSize(l),y=l.status==="exporting",C=y||l.status==="loading",S=l.busyVisible,A=y&&(S??!0);y||(w=null),s.setState({disabled:!l.source||C}),i.setState({disabled:!l.source||C}),s.container.classList.toggle(z,A&&w!==i),i.container.classList.toggle(z,A&&w===i),a.setState({disabled:!b.selectIsDirty(l)}),p.setState({disabled:!b.selectCanUndo(l)}),f.setState({disabled:!b.selectCanRedo(l)}),r.textContent=u?`${u.width} \xD7 ${u.height}`:"";const E=b.selectViewportFit(l),V=Math.round(E?E.scale*100:l.zoom*100);c.textContent=`${V}%`},"sync");_(o.state);const U=o.store.subscribe(_);return()=>{U(),[s,i,e,d,a,p,f].forEach(l=>l.destruct())}}saveAs(n,o,t,s,i){this.j.prompt("Enter new name","Save in new file",r=>{const e=(r||"").trim();if(!e)return this.j.alert("The name should not be empty"),!1;this.persist(n,o,e,t,s,i)})}async persist(n,o,t,s,i,r){n?.update({status:"exporting"});try{const{w:e,h:c}=await this.blobSize(s),d=await this.uploadEdited(o,s,t),a=h(()=>{r(),this.j.e.fire("update.filebrowser")},"done");i(t,this.coreSupportsSaved()?{action:"saved",box:{w:e,h:c},newPath:d||void 0}:{action:"resize",box:{w:e,h:c}},a,p=>{r(),this.error(p)})}catch(e){r(),this.error(e)}}async uploadEdited(n,o,t){var s,i;const{source:r,path:e,name:c}=await this.j.dataProvider.getPathByUrl(n),d=this.connectorUrl();if(!d)throw new Error("No connector configured for imageSave");const a=String(t||c||"image.png"),p=new FormData;p.append("action","imageSave"),p.append("source",String(r??"")),p.append("path",String(e??"")),p.append("name",a),p.append("files[0]",o,a);const f=d.includes("?")?"&":"?",g=await(await fetch(`${d}${f}action=imageSave`,{method:"POST",body:p,credentials:"include"})).json();if(!g.success)throw new Error(g.message||"Failed to save the edited image");return(i=(s=g.data)===null||s===void 0?void 0:s.newPath)!==null&&i!==void 0?i:""}coreSupportsSaved(){const n=this.j.getVersion?this.j.getVersion():"",[o=0,t=0,s=0]=n.split(".").map(i=>parseInt(i,10)||0);return o>4||o===4&&(t>12||t===12&&s>=34)}connectorUrl(){var n,o;const t=(n=this.j.o.ajax)===null||n===void 0?void 0:n.url,s=(o=this.j.o.uploader)===null||o===void 0?void 0:o.url;return typeof t=="string"&&t?t:typeof s=="string"&&s?s:""}async loadImage(n){const o=this.connectorUrl();if(o)try{return await this.loadViaConnector(o,n)}catch{}const t=n.includes("?")?"&":"?",s=await fetch(`${n}${t}_tst=${Date.now()}`,{credentials:"include"});if(!s.ok)throw new Error(`Failed to load image (${s.status})`);return s.blob()}async loadViaConnector(n,o){var t;const{source:s,path:i,name:r}=await this.j.dataProvider.getPathByUrl(o),e=new FormData;e.append("action","imageLoad"),e.append("source",String(s??"")),e.append("path",String(i??"")),e.append("name",String(r??""));const c=n.includes("?")?"&":"?",a=await(await fetch(`${n}${c}action=imageLoad`,{method:"POST",body:e,credentials:"include"})).json();if(!a.success||!(!((t=a.data)===null||t===void 0)&&t.content))throw new Error(a.message||"Failed to load the image");return(await fetch(a.data.content)).blob()}async blobSize(n){const o=await createImageBitmap(n),t={w:o.width,h:o.height};return o.close(),t}error(n){this.j.e.fire("errorMessage",n.message)}};h(j,"ProImageEditor");let I=j;export{I as ProImageEditor};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
3
|
+
* See LICENSE.md in the project root for license information.
|
|
4
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
5
|
+
*/
|
|
6
|
+
declare module 'jodit/esm/config' {
|
|
7
|
+
interface Config {
|
|
8
|
+
imageEditorPro: {
|
|
9
|
+
/** Editor dialog size. */
|
|
10
|
+
dialog: {
|
|
11
|
+
width: number | string;
|
|
12
|
+
height: number | string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Config as o}from"jodit/esm/config.js";o.prototype.imageEditorPro={dialog:{width:"90%",height:"90%"}};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
3
|
+
* See LICENSE.md in the project root for license information.
|
|
4
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
5
|
+
*/
|
|
6
|
+
import type { IJodit } from "jodit/esm/types/index";
|
|
7
|
+
import "./config";
|
|
8
|
+
import { Plugin } from "jodit/esm/core/plugin/index";
|
|
9
|
+
/**
|
|
10
|
+
* Replaces Jodit's core image editor with the standalone `@jodit/image-editor`
|
|
11
|
+
* (crop, resize, rotate, flip, filters, finetune, text annotations).
|
|
12
|
+
*
|
|
13
|
+
* The replacement is done at the module registry level — `Jodit.modules.ImageEditor`
|
|
14
|
+
* — because the editor is instantiated via `getInstance('ImageEditor')` on the
|
|
15
|
+
* **file browser's** own event emitter (the finder pencil, Image properties →
|
|
16
|
+
* Edit), not on `jodit.e`. Overriding the module makes every entry point resolve
|
|
17
|
+
* to {@link ProImageEditor} through `getInstance`'s fallback.
|
|
18
|
+
*/
|
|
19
|
+
export declare class imageEditorPro extends Plugin {
|
|
20
|
+
/** @override */
|
|
21
|
+
static requires: string[];
|
|
22
|
+
/** @override */
|
|
23
|
+
protected afterInit(_jodit: IJodit): void;
|
|
24
|
+
/** @override */
|
|
25
|
+
protected beforeDestruct(_jodit: IJodit): void;
|
|
26
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var m=Object.defineProperty;var e=(d,r)=>m(d,"name",{value:r,configurable:!0});import"./config.js";import{ProImageEditor as s}from"./adapter.js";import{Plugin as p}from"jodit/esm/core/plugin/index.js";import{JoditPro as i}from"../../jodit-pro.js";const t=class t extends p{afterInit(r){i.modules.ImageEditor=s}beforeDestruct(r){}};e(t,"imageEditorPro");let o=t;o.requires=["license"],i.plugins.add("imageEditorPro",o);export{o as imageEditorPro};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jodit-pro",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.13.1",
|
|
4
4
|
"author": "Chupurnov Valerii <chupurnov@gmail.com>",
|
|
5
5
|
"homepage": "https://xdsoft.net/jodit/pro/",
|
|
6
6
|
"bugs": {
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
"url": "git+https://github.com/jodit/jodit-pro.git"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
+
"@jodit/image-editor": "^0.2.1",
|
|
18
19
|
"a-color-picker": "^1.2.1",
|
|
19
20
|
"marked": "^17.0.4",
|
|
20
21
|
"jodit": "^4.0.1"
|
package/types/config.d.ts
CHANGED
|
@@ -150,6 +150,15 @@ interface Config {
|
|
|
150
150
|
schema: IDictionary<(jodit: IJodit, matches: RegExpMatchArray) => HTMLElement>;
|
|
151
151
|
};
|
|
152
152
|
}
|
|
153
|
+
interface Config {
|
|
154
|
+
imageEditorPro: {
|
|
155
|
+
/** Editor dialog size. */
|
|
156
|
+
dialog: {
|
|
157
|
+
width: number | string;
|
|
158
|
+
height: number | string;
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
}
|
|
153
162
|
interface Config {
|
|
154
163
|
keyboard: {
|
|
155
164
|
keySize: number;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* See LICENSE.md in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
5
5
|
*/
|
|
6
|
-
import type { IBound } from "jodit/esm/types/index";
|
|
6
|
+
import type { IBound, ModType } from "jodit/esm/types/index";
|
|
7
7
|
import type { IFileBrowserItemElement } from "jodit/esm/types/file-browser";
|
|
8
8
|
import { UIGroup } from "jodit/esm/core/ui/group/group";
|
|
9
9
|
import type { StateManager } from "../../helpers/state-manager";
|
|
@@ -21,6 +21,16 @@ export declare class UIVirtualScroll extends UIGroup<IFileBrowserPro> implements
|
|
|
21
21
|
protected render(): string;
|
|
22
22
|
constructor(jodit: UIVirtualScroll['jodit'], stateManager: StateManager);
|
|
23
23
|
private reconcile;
|
|
24
|
+
private skeletons;
|
|
25
|
+
/**
|
|
26
|
+
* Skeleton placeholders are driven purely by the `loading` mod (set on the
|
|
27
|
+
* panel and synced down to this group) — no imperative show/hide from
|
|
28
|
+
* outside. They reuse the real item class and carry the current `view`/`size`
|
|
29
|
+
* mods, so they adapt to the active tile mode.
|
|
30
|
+
*/
|
|
31
|
+
afterSetMod(name: string, value: ModType): void;
|
|
32
|
+
private buildSkeletons;
|
|
33
|
+
private clearSkeletons;
|
|
24
34
|
build(items: IFileBrowserItemElement[]): void;
|
|
25
35
|
protected onScrollLoadChunk(): void;
|
|
26
36
|
protected onDragOver(e: DragEvent): void;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
3
|
+
* See LICENSE.md in the project root for license information.
|
|
4
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
5
|
+
*/
|
|
6
|
+
import type { IFileBrowser } from "jodit/esm/types/index";
|
|
7
|
+
import { ViewComponent } from "jodit/esm/core/component/index";
|
|
8
|
+
/**
|
|
9
|
+
* The `save` callback the core `openImageEditor` passes to `open()`. It routes
|
|
10
|
+
* `(newname, box)` to the connector's resize/crop, then fires `success()` and
|
|
11
|
+
* (for in-content edits) an `onSuccess(newUrl)` that swaps the `<img>`.
|
|
12
|
+
*
|
|
13
|
+
* `action: 'saved'` (jodit ≥ 4.12.34) tells the core the file was already
|
|
14
|
+
* persisted by this editor: it skips the server resize/crop and only runs the
|
|
15
|
+
* success wiring with `newPath`.
|
|
16
|
+
*/
|
|
17
|
+
interface ImageEditorSave {
|
|
18
|
+
(newname: string | void, box: {
|
|
19
|
+
action: 'resize' | 'crop' | 'saved';
|
|
20
|
+
box: {
|
|
21
|
+
w: number;
|
|
22
|
+
h: number;
|
|
23
|
+
};
|
|
24
|
+
newPath?: string;
|
|
25
|
+
}, success: () => void, failed: (error: Error) => void): void;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* The view that instantiates the editor: a file browser (finder pencil / Image
|
|
29
|
+
* properties → Edit). `IFileBrowser` already combines `IViewWithToolbar`,
|
|
30
|
+
* `IDlgs` and `dataProvider`; using the named interface (not an ad-hoc `&`
|
|
31
|
+
* intersection) keeps `tsc` from over-instantiating the deep view types.
|
|
32
|
+
*/
|
|
33
|
+
type HostView = IFileBrowser;
|
|
34
|
+
/**
|
|
35
|
+
* PRO replacement for Jodit's core image editor, backed by the standalone
|
|
36
|
+
* `@jodit/image-editor` package (crop, resize, rotate, flip, filters, finetune,
|
|
37
|
+
* text annotations).
|
|
38
|
+
*
|
|
39
|
+
* It is registered as `Jodit.modules.ImageEditor`, so **every** path that opens
|
|
40
|
+
* the image editor — the finder pencil, Image properties → Edit, a direct
|
|
41
|
+
* `getInstance('ImageEditor')` — instantiates it via `getInstance`'s module
|
|
42
|
+
* fallback (the event fires on the *file browser's* emitter, which is why an
|
|
43
|
+
* `jodit.e` listener never worked).
|
|
44
|
+
*
|
|
45
|
+
* `@jodit/image-editor` is bundled as a dependency (it is part of the PRO
|
|
46
|
+
* editor), so the class is imported directly.
|
|
47
|
+
*
|
|
48
|
+
* The core editor speaks a server "resize/crop the original file" language; this
|
|
49
|
+
* one produces a fully edited `Blob`. So on save it uploads the blob through the
|
|
50
|
+
* connector's `imageSave` action (overwriting the source file), then reports
|
|
51
|
+
* `action: 'saved'` to the core's save callback — which skips the server
|
|
52
|
+
* resize/crop and runs only the `success`/`onSuccess` machinery, reusing
|
|
53
|
+
* finder's refresh and image-properties' `<img>` swap without reimplementing
|
|
54
|
+
* either.
|
|
55
|
+
*/
|
|
56
|
+
export declare class ProImageEditor extends ViewComponent<HostView> {
|
|
57
|
+
/** Marker for callers/tests. */
|
|
58
|
+
readonly isProImageEditor = true;
|
|
59
|
+
className(): string;
|
|
60
|
+
open(url: string, save: ImageEditorSave): Promise<void>;
|
|
61
|
+
/**
|
|
62
|
+
* Rebuilds the editor's top bar as a native Jodit toolbar in the dialog
|
|
63
|
+
* header — Save / Save as, dimensions, zoom, reset / undo / redo — driven by
|
|
64
|
+
* the `@jodit/image-editor` public API (`save()`, `saveAs()`, `update(...)`)
|
|
65
|
+
* and kept in sync by subscribing to the editor store. Returns a disposer.
|
|
66
|
+
*/
|
|
67
|
+
private mountToolbar;
|
|
68
|
+
/**
|
|
69
|
+
* "Save as" — prompt for a new file name, then persist the edited blob under
|
|
70
|
+
* it (mirrors the core editor's Save-as UX and its `onSave(name, …)` call).
|
|
71
|
+
*/
|
|
72
|
+
private saveAs;
|
|
73
|
+
/**
|
|
74
|
+
* Persists the edited blob. With `newName` it writes a new file ("Save as");
|
|
75
|
+
* without it, it overwrites the source ("Save"). Either way it then reuses
|
|
76
|
+
* the core's `save()` success/onSuccess wiring (finder refresh, in-content
|
|
77
|
+
* `<img>` swap) with a no-op resize of the resulting file.
|
|
78
|
+
*/
|
|
79
|
+
private persist;
|
|
80
|
+
/**
|
|
81
|
+
* Uploads the edited blob through the connector's `imageSave` action and
|
|
82
|
+
* returns the saved file's new path (`''` for older connectors that don't
|
|
83
|
+
* report it).
|
|
84
|
+
*/
|
|
85
|
+
private uploadEdited;
|
|
86
|
+
/**
|
|
87
|
+
* `ImageEditorActionBox.action: 'saved'` appeared in jodit 4.12.34 — an
|
|
88
|
+
* older core routes unknown actions into a server crop, which fails the
|
|
89
|
+
* save. Detected from the host view's version.
|
|
90
|
+
*/
|
|
91
|
+
private coreSupportsSaved;
|
|
92
|
+
private connectorUrl;
|
|
93
|
+
private loadImage;
|
|
94
|
+
private loadViaConnector;
|
|
95
|
+
private blobSize;
|
|
96
|
+
private error;
|
|
97
|
+
}
|
|
98
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
3
|
+
* See LICENSE.md in the project root for license information.
|
|
4
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
5
|
+
*/
|
|
6
|
+
declare module 'jodit/esm/config' {
|
|
7
|
+
interface Config {
|
|
8
|
+
imageEditorPro: {
|
|
9
|
+
/** Editor dialog size. */
|
|
10
|
+
dialog: {
|
|
11
|
+
width: number | string;
|
|
12
|
+
height: number | string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
3
|
+
* See LICENSE.md in the project root for license information.
|
|
4
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
5
|
+
*/
|
|
6
|
+
import type { IJodit } from "jodit/esm/types/index";
|
|
7
|
+
import "./config";
|
|
8
|
+
import { Plugin } from "jodit/esm/core/plugin/index";
|
|
9
|
+
/**
|
|
10
|
+
* Replaces Jodit's core image editor with the standalone `@jodit/image-editor`
|
|
11
|
+
* (crop, resize, rotate, flip, filters, finetune, text annotations).
|
|
12
|
+
*
|
|
13
|
+
* The replacement is done at the module registry level — `Jodit.modules.ImageEditor`
|
|
14
|
+
* — because the editor is instantiated via `getInstance('ImageEditor')` on the
|
|
15
|
+
* **file browser's** own event emitter (the finder pencil, Image properties →
|
|
16
|
+
* Edit), not on `jodit.e`. Overriding the module makes every entry point resolve
|
|
17
|
+
* to {@link ProImageEditor} through `getInstance`'s fallback.
|
|
18
|
+
*/
|
|
19
|
+
export declare class imageEditorPro extends Plugin {
|
|
20
|
+
/** @override */
|
|
21
|
+
static requires: string[];
|
|
22
|
+
/** @override */
|
|
23
|
+
protected afterInit(_jodit: IJodit): void;
|
|
24
|
+
/** @override */
|
|
25
|
+
protected beforeDestruct(_jodit: IJodit): void;
|
|
26
|
+
}
|