@ckeditor/ckeditor5-uploadcare 0.0.0-nightly-20250129.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/CHANGELOG.md +6 -0
- package/LICENSE.md +17 -0
- package/README.md +36 -0
- package/build/uploadcare.js +4 -0
- package/ckeditor5-metadata.json +47 -0
- package/dist/index-content.css +5 -0
- package/dist/index-editor.css +265 -0
- package/dist/index.css +315 -0
- package/dist/index.js +25 -0
- package/lang/contexts.json +27 -0
- package/package.json +80 -0
- package/src/augmentation.d.ts +30 -0
- package/src/augmentation.js +23 -0
- package/src/index.d.ts +16 -0
- package/src/index.js +23 -0
- package/src/ui/uploadcarecontroller.d.ts +30 -0
- package/src/ui/uploadcarecontroller.js +24 -0
- package/src/ui/uploadcareformview.d.ts +23 -0
- package/src/ui/uploadcareformview.js +23 -0
- package/src/uploadcare.d.ts +48 -0
- package/src/uploadcare.js +23 -0
- package/src/uploadcarecommand.d.ts +38 -0
- package/src/uploadcarecommand.js +23 -0
- package/src/uploadcareconfig.d.ts +227 -0
- package/src/uploadcareconfig.js +23 -0
- package/src/uploadcareediting.d.ts +49 -0
- package/src/uploadcareediting.js +23 -0
- package/src/uploadcareimageedit/ui/uploadcareimageeditcontroller.d.ts +78 -0
- package/src/uploadcareimageedit/ui/uploadcareimageeditcontroller.js +24 -0
- package/src/uploadcareimageedit/ui/uploadcareimageeditformeditingview.d.ts +25 -0
- package/src/uploadcareimageedit/ui/uploadcareimageeditformeditingview.js +23 -0
- package/src/uploadcareimageedit/ui/uploadcareimageeditformerrorview.d.ts +27 -0
- package/src/uploadcareimageedit/ui/uploadcareimageeditformerrorview.js +23 -0
- package/src/uploadcareimageedit/ui/uploadcareimageeditformloadingview.d.ts +24 -0
- package/src/uploadcareimageedit/ui/uploadcareimageeditformloadingview.js +23 -0
- package/src/uploadcareimageedit/ui/uploadcareimageeditformview.d.ts +32 -0
- package/src/uploadcareimageedit/ui/uploadcareimageeditformview.js +23 -0
- package/src/uploadcareimageedit/uploadcareimageeditcommand.d.ts +49 -0
- package/src/uploadcareimageedit/uploadcareimageeditcommand.js +23 -0
- package/src/uploadcareimageedit/uploadcareimageeditediting.d.ts +38 -0
- package/src/uploadcareimageedit/uploadcareimageeditediting.js +23 -0
- package/src/uploadcareimageedit/uploadcareimageeditui.d.ts +48 -0
- package/src/uploadcareimageedit/uploadcareimageeditui.js +23 -0
- package/src/uploadcareimageedit/uploadcareimagereplacecommand.d.ts +23 -0
- package/src/uploadcareimageedit/uploadcareimagereplacecommand.js +23 -0
- package/src/uploadcareimageedit.d.ts +32 -0
- package/src/uploadcareimageedit.js +23 -0
- package/src/uploadcareui.d.ts +41 -0
- package/src/uploadcareui.js +23 -0
- package/src/uploadcareuploadadapter.d.ts +39 -0
- package/src/uploadcareuploadadapter.js +23 -0
- package/src/utils/common-translations.d.ts +5 -0
- package/src/utils/common-translations.js +23 -0
- package/src/utils/dialogfocusmanagerview.d.ts +29 -0
- package/src/utils/dialogfocusmanagerview.js +23 -0
- package/src/utils/editingutils.d.ts +5 -0
- package/src/utils/editingutils.js +23 -0
- package/src/utils/isancestor.d.ts +8 -0
- package/src/utils/isancestor.js +23 -0
- package/src/utils/uploadutils.d.ts +5 -0
- package/src/utils/uploadutils.js +23 -0
- package/theme/icons/dropbox.svg +11 -0
- package/theme/icons/error.svg +1 -0
- package/theme/icons/facebook.svg +11 -0
- package/theme/icons/google-drive.svg +11 -0
- package/theme/icons/google-photos.svg +11 -0
- package/theme/icons/image-upload.svg +11 -0
- package/theme/icons/instagram.svg +11 -0
- package/theme/icons/link.svg +11 -0
- package/theme/icons/local.svg +11 -0
- package/theme/icons/onedrive.svg +11 -0
- package/theme/icons/uploadcare-image-edit.svg +11 -0
- package/theme/uploadcare-form.css +198 -0
- package/theme/uploadcare-theme.css +20 -0
- package/theme/uploadcareimageedit.css +64 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module uploadcare/uploadcareimageedit/ui/uploadcareimageeditformerrorview
|
|
7
|
+
*/
|
|
8
|
+
import { type Locale } from 'ckeditor5/src/utils.js';
|
|
9
|
+
import { View } from 'ckeditor5/src/ui.js';
|
|
10
|
+
import type UploadcareImageEditController from './uploadcareimageeditcontroller.js';
|
|
11
|
+
/**
|
|
12
|
+
* A class representing the form error view of the Uploadcare image edit feature.
|
|
13
|
+
*/
|
|
14
|
+
export default class UploadcareImageEditFormErrorView extends View {
|
|
15
|
+
/**
|
|
16
|
+
* The image upload error details.
|
|
17
|
+
*
|
|
18
|
+
* @observable
|
|
19
|
+
*/
|
|
20
|
+
errorType: UploadcareImageEditController['imageErrorType'];
|
|
21
|
+
/**
|
|
22
|
+
* Creates an instance of the UploadcareImageEditFormErrorView view.
|
|
23
|
+
*
|
|
24
|
+
* @fires retry
|
|
25
|
+
*/
|
|
26
|
+
constructor(locale: Locale);
|
|
27
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
import{ButtonView as _0x4741a7,IconView as et,View as _0xa6ccb4}from'ckeditor5/src/ui.js';import at from'../../../theme/icons/error.svg';export default class rt extends _0xa6ccb4{constructor(_0x800603){super(_0x800603);const t=_0x800603['t'];this['set']('errorType',null);const _0x10f8d8=new _0x4741a7(_0x800603);_0x10f8d8['label']=t({'id':'Try\x20again\x20(Uploadcare)','string':'Try\x20again'}),_0x10f8d8['withText']=!0x0,_0x10f8d8['class']='ck-button-action',_0x10f8d8['on']('execute',()=>{this['fire']('retry');}),_0x10f8d8['bind']('isVisible')['to'](this,'errorType',_0x577e00=>'NotFound'!==_0x577e00);const _0x58813c=new et();_0x58813c['content']=at,_0x58813c['extendTemplate']({'attributes':{'style':{'width':'50px','height':'50px'}}});const _0x3a6dce=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-uploadcare-form__error'],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck-uploadcare-form__error-contents']},'children':[_0x58813c,{'tag':'h3','attributes':{'style':{'fontWeight':'bold'}},'children':[{'text':t('Unable\x20to\x20load')}]},{'text':_0x3a6dce['to']('errorType',_0xdc8eda=>t('NotFound'!==_0xdc8eda?'We\x20were\x20unable\x20to\x20load\x20the\x20image\x20due\x20to\x20network\x20connection\x20issues.':'The\x20image\x20was\x20not\x20found.\x20Its\x20source\x20may\x20have\x20been\x20removed.'))},_0x10f8d8]},{'tag':'div','attributes':{'class':['ck-uploadcare-form__skeleton']},'children':[{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'}]},{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'}]}]}]});}}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module uploadcare/uploadcareimageedit/ui/uploadcareimageeditformloadingview
|
|
7
|
+
*/
|
|
8
|
+
import { type Locale } from 'ckeditor5/src/utils.js';
|
|
9
|
+
import { View } from 'ckeditor5/src/ui.js';
|
|
10
|
+
/**
|
|
11
|
+
* A class representing the form loading view of the Uploadcare image edit feature.
|
|
12
|
+
*/
|
|
13
|
+
export default class UploadcareImageEditFormLoadingView extends View {
|
|
14
|
+
/**
|
|
15
|
+
* The image upload progress.
|
|
16
|
+
*
|
|
17
|
+
* @observable
|
|
18
|
+
*/
|
|
19
|
+
imageUploadProgress: number | null;
|
|
20
|
+
/**
|
|
21
|
+
* @inheritDoc
|
|
22
|
+
*/
|
|
23
|
+
constructor(locale: Locale);
|
|
24
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
import{SpinnerView as _0x41d656,View as _0x553b29}from'ckeditor5/src/ui.js';export default class ta extends _0x553b29{constructor(_0x22c732){super(_0x22c732);const t=_0x22c732['t'],_0x144c21=this['bindTemplate'],_0x1d83a5=new _0x41d656();_0x1d83a5['isVisible']=!0x0,this['setTemplate']({'tag':'div','attributes':{'class':['ck-uploadcare-form__loading'],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck-uploadcare-form__loading-spinner']},'children':[_0x1d83a5,{'text':_0x144c21['to']('imageUploadProgress',_0x2cdf21=>t('Loading\x20image...')+'\x20('+(_0x2cdf21||0x0)+'%)')}]},{'tag':'div','attributes':{'class':['ck-uploadcare-form__skeleton']},'children':[{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'}]},{'tag':'div','children':[{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'},{'tag':'span'}]}]}]});}}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module uploadcare/uploadcareimageedit/ui/uploadcareimageeditformview
|
|
7
|
+
*/
|
|
8
|
+
import { type Locale } from 'ckeditor5/src/utils.js';
|
|
9
|
+
import type UploadcareImageEditController from './uploadcareimageeditcontroller.js';
|
|
10
|
+
import DialogFocusManagerView from '../../utils/dialogfocusmanagerview.js';
|
|
11
|
+
import type { UploadcareEditorConfig } from '../../uploadcareconfig.js';
|
|
12
|
+
import '../../../theme/uploadcare-form.css';
|
|
13
|
+
/**
|
|
14
|
+
* A class representing the form view of the Uploadcare image edit feature.
|
|
15
|
+
*/
|
|
16
|
+
export default class UploadcareImageEditFormView extends DialogFocusManagerView {
|
|
17
|
+
/**
|
|
18
|
+
* Status of the image passed to the view;
|
|
19
|
+
*
|
|
20
|
+
* @observable
|
|
21
|
+
* @readonly
|
|
22
|
+
*/
|
|
23
|
+
status: ThisType<UploadcareImageEditController['imageStatus']>;
|
|
24
|
+
/**
|
|
25
|
+
* @inheritDoc
|
|
26
|
+
*/
|
|
27
|
+
constructor(locale: Locale, imageStatus: string, attributes: UploadcareEditorConfig);
|
|
28
|
+
/**
|
|
29
|
+
* @inheritDoc
|
|
30
|
+
*/
|
|
31
|
+
focus(): void;
|
|
32
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
const _0xa9d4f=_0x568d;(function(_0xc6874,_0x5d6a87){const _0x86272a=_0x568d,_0x41998d=_0xc6874();while(!![]){try{const _0x45df38=-parseInt(_0x86272a(0x1ce))/0x1*(parseInt(_0x86272a(0x1cc))/0x2)+parseInt(_0x86272a(0x1a1))/0x3+-parseInt(_0x86272a(0x1a5))/0x4+-parseInt(_0x86272a(0x1b0))/0x5*(-parseInt(_0x86272a(0x1a0))/0x6)+parseInt(_0x86272a(0x1c9))/0x7*(parseInt(_0x86272a(0x1b7))/0x8)+parseInt(_0x86272a(0x1bb))/0x9*(parseInt(_0x86272a(0x1a2))/0xa)+-parseInt(_0x86272a(0x1d5))/0xb;if(_0x45df38===_0x5d6a87)break;else _0x41998d['push'](_0x41998d['shift']());}catch(_0x44c849){_0x41998d['push'](_0x41998d['shift']());}}}(_0x2ee0,0xdce4f));import{View as _0x4e06d1}from'ckeditor5/src/ui.js';import _0x2517f0 from'./uploadcareimageeditformloadingview.js';import _0x364d28 from'./uploadcareimageeditformerrorview.js';import _0x47dc28 from'./uploadcareimageeditformeditingview.js';import _0x1672aa from'../../utils/dialogfocusmanagerview.js';function _0x2ee0(){const _0x27556f=['_waitForImageEditorComponent','render','_setView','cdnUrl','450EYzmCJ','div','addEventListener','detail','target','uc-cloud-image-editor','add','1784clsimn','_items','clear','once','9RHUFFH','observe','addedNodes','setTemplate','element','nodeName','_loadingView','uploading','length','toLowerCase','getFocusableElement','filter','retry','apply','35063FzotFx','focus','error','1205258aUhvtK','ck-reset_all-excluded','1PyCXXV','_editingView','change:status','_addErrorViewListeners','status','cancel','ck-uploadcare-form','36399638wWnuxD','createCollection','_addUploadcareImageEditorListeners','63324xvQbUP','5092941GVWkjI','17638340suxgpd','querySelector','_focusableView','2847512RcCGYi','_errorView','fire','ready','disconnect','addMany','set'];_0x2ee0=function(){return _0x27556f;};return _0x2ee0();}function _0x568d(_0x207226,_0x54505b){const _0x2ee0bf=_0x2ee0();return _0x568d=function(_0x568d65,_0x789bcb){_0x568d65=_0x568d65-0x19e;let _0x18d839=_0x2ee0bf[_0x568d65];return _0x18d839;},_0x568d(_0x207226,_0x54505b);}import'../../../theme/uploadcare-form.css';export default class ii extends _0x1672aa{constructor(_0x47166e,_0x1a9456,_0x457482){const _0x26a0cc=_0x568d;super(_0x47166e),this[_0x26a0cc(0x1b8)]=this[_0x26a0cc(0x19e)](),this[_0x26a0cc(0x1c1)]=new _0x2517f0(_0x47166e),this[_0x26a0cc(0x1a6)]=new _0x364d28(_0x47166e),this[_0x26a0cc(0x1cf)]=new _0x47dc28(_0x47166e,_0x457482),this[_0x26a0cc(0x1a4)]=new _0x4e06d1(_0x47166e),this[_0x26a0cc(0x1a4)][_0x26a0cc(0x1be)](this[_0x26a0cc(0x1c5)]()),this[_0x26a0cc(0x1ab)](_0x26a0cc(0x1d2),_0x1a9456),this[_0x26a0cc(0x1be)]({'tag':_0x26a0cc(0x1b1),'attributes':{'class':['ck',_0x26a0cc(0x1cd),_0x26a0cc(0x1d4)],'tabindex':'-1'},'children':this[_0x26a0cc(0x1b8)]}),this[_0x26a0cc(0x1ae)](),this[_0x26a0cc(0x1ba)](_0x26a0cc(0x1ad),()=>{const _0x30240b=_0x26a0cc;this[_0x30240b(0x1ac)](this[_0x30240b(0x1bf)],_0x356034=>{const _0x2e6aa6=_0x30240b;this[_0x2e6aa6(0x19f)](_0x356034);});}),this['on'](_0x26a0cc(0x1d0),()=>{const _0x150535=_0x26a0cc;this[_0x150535(0x1ae)]();}),this[_0x26a0cc(0x1d1)]();}[_0xa9d4f(0x1ca)](){const _0x1d4b4a=_0xa9d4f;this[_0x1d4b4a(0x1bf)][_0x1d4b4a(0x1ca)]();}[_0xa9d4f(0x1ae)](){const _0x21ac6e=_0xa9d4f;switch(this[_0x21ac6e(0x1b8)][_0x21ac6e(0x1b9)](),this[_0x21ac6e(0x1d2)]){case _0x21ac6e(0x1c2):this[_0x21ac6e(0x1b8)][_0x21ac6e(0x1b6)](this[_0x21ac6e(0x1c1)]);break;case _0x21ac6e(0x1cb):this[_0x21ac6e(0x1b8)][_0x21ac6e(0x1b6)](this[_0x21ac6e(0x1a6)]);break;case _0x21ac6e(0x1a8):this[_0x21ac6e(0x1b8)][_0x21ac6e(0x1aa)]([this[_0x21ac6e(0x1cf)],this[_0x21ac6e(0x1a4)]]);}}[_0xa9d4f(0x1ac)](_0x2ad590,_0x44cf7c){const _0x1aaa1b=_0xa9d4f,_0x237640=_0x1aaa1b(0x1b5),_0x5a4748=_0x2ad590[_0x1aaa1b(0x1a3)](_0x237640);if(_0x5a4748)return _0x44cf7c(_0x5a4748);const _0x647fb=new MutationObserver(_0x191188=>{const _0x320cd6=_0x1aaa1b,_0x24c989=_0x191188[_0x320cd6(0x1c6)](_0x47f96f=>_0x47f96f[_0x320cd6(0x1b4)]===_0x2ad590&&_0x47f96f[_0x320cd6(0x1bd)][_0x320cd6(0x1c3)]>0x0&&_0x47f96f[_0x320cd6(0x1bd)][0x0][_0x320cd6(0x1c0)][_0x320cd6(0x1c4)]()===_0x237640);_0x24c989[_0x320cd6(0x1c3)]&&(_0x647fb[_0x320cd6(0x1a9)](),_0x44cf7c(_0x24c989[0x0][_0x320cd6(0x1bd)][0x0]));});_0x647fb[_0x1aaa1b(0x1bc)](_0x2ad590,{'childList':!0x0,'subtree':!0x0});}[_0xa9d4f(0x19f)](_0x3c990a){const _0x2963b3=_0xa9d4f;_0x3c990a[_0x2963b3(0x1b2)](_0x2963b3(0x1c8),_0x37a3c3=>{const _0xb4ec82=_0x2963b3;this[_0xb4ec82(0x1a7)](_0xb4ec82(0x1c8),{'imageSrc':_0x37a3c3[_0xb4ec82(0x1b3)][_0xb4ec82(0x1af)]});}),_0x3c990a[_0x2963b3(0x1b2)](_0x2963b3(0x1d3),()=>{const _0x2b1ad6=_0x2963b3;this[_0x2b1ad6(0x1a7)](_0x2b1ad6(0x1d3));});}[_0xa9d4f(0x1d1)](){const _0x275334=_0xa9d4f;this[_0x275334(0x1a6)]['on'](_0x275334(0x1c7),()=>{const _0x4f4b78=_0x275334;this[_0x4f4b78(0x1a7)](_0x4f4b78(0x1c7));});}}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module uploadcare/uploadcareimageedit/uploadcareimageeditcommand
|
|
7
|
+
* @publicApi
|
|
8
|
+
*/
|
|
9
|
+
import { Command, type Editor } from 'ckeditor5/src/core.js';
|
|
10
|
+
import { Dialog } from 'ckeditor5/src/ui.js';
|
|
11
|
+
import UploadcareImageEditController from './ui/uploadcareimageeditcontroller.js';
|
|
12
|
+
/**
|
|
13
|
+
* The Uploadcare edit image command.
|
|
14
|
+
*
|
|
15
|
+
* It opens the Uploadcare dialog for editing the image.
|
|
16
|
+
*
|
|
17
|
+
* ```ts
|
|
18
|
+
* editor.execute( 'uploadcareImageEdit' );
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export default class UploadcareImageEditCommand extends Command {
|
|
22
|
+
/**
|
|
23
|
+
* Whenever the controller is active and dialog UI visible.
|
|
24
|
+
*
|
|
25
|
+
* @observable
|
|
26
|
+
* @readonly
|
|
27
|
+
*/
|
|
28
|
+
isActive: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* The Uploadcare image edit controller instance.
|
|
31
|
+
*/
|
|
32
|
+
imageEditController: UploadcareImageEditController | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* @inheritDoc
|
|
35
|
+
*/
|
|
36
|
+
static get requires(): readonly [typeof Dialog];
|
|
37
|
+
/**
|
|
38
|
+
* @inheritDoc
|
|
39
|
+
*/
|
|
40
|
+
constructor(editor: Editor);
|
|
41
|
+
/**
|
|
42
|
+
* @inheritDoc
|
|
43
|
+
*/
|
|
44
|
+
refresh(): void;
|
|
45
|
+
/**
|
|
46
|
+
* @inheritDoc
|
|
47
|
+
*/
|
|
48
|
+
execute(): void;
|
|
49
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
const _0x572796=_0x59ef;(function(_0x5d03b1,_0x28286e){const _0x5e3d29=_0x59ef,_0x40ac1a=_0x5d03b1();while(!![]){try{const _0x14a36c=-parseInt(_0x5e3d29(0x16c))/0x1*(-parseInt(_0x5e3d29(0x169))/0x2)+-parseInt(_0x5e3d29(0x172))/0x3+parseInt(_0x5e3d29(0x170))/0x4*(-parseInt(_0x5e3d29(0x16a))/0x5)+-parseInt(_0x5e3d29(0x156))/0x6+-parseInt(_0x5e3d29(0x15a))/0x7+-parseInt(_0x5e3d29(0x162))/0x8+parseInt(_0x5e3d29(0x15f))/0x9*(parseInt(_0x5e3d29(0x16e))/0xa);if(_0x14a36c===_0x28286e)break;else _0x40ac1a['push'](_0x40ac1a['shift']());}catch(_0x459e01){_0x40ac1a['push'](_0x40ac1a['shift']());}}}(_0x3d4e,0xee8e4));import{Command as _0x24b58a}from'ckeditor5/src/core.js';import{Dialog as _0x3568e4}from'ckeditor5/src/ui.js';import _0x556ed0 from'./ui/uploadcareimageeditcontroller.js';function _0x59ef(_0x1df0ba,_0xd69370){const _0x3d4e2b=_0x3d4e();return _0x59ef=function(_0x59ef08,_0x4ccd05){_0x59ef08=_0x59ef08-0x155;let _0x3d5d84=_0x3d4e2b[_0x59ef08];return _0x3d5d84;},_0x59ef(_0x1df0ba,_0xd69370);}function _0x3d4e(){const _0x38c069=['_isEditable','execute','document','9CcTpNP','getSelectedElement','selection','2034928cbWRBz','refresh','imageEditController','requires','element','bind','imageBlock','2568290hdeTEc','5BGiakZ','isEnabled','1XZwqaH','editor','26266510LnwNXR','uploadcare.allowExternalImagesEditing','6343556yQVuYQ','set','446658NStHxb','config','unbind','isActive','1447674LkAinu','model','get','plugins','4922764yofRVK','imageInline'];_0x3d4e=function(){return _0x38c069;};return _0x3d4e();}import{createEditabilityChecker as _0x4728f7}from'../utils/editingutils.js';export default class W extends _0x24b58a{static get[_0x572796(0x165)](){return[_0x3568e4];}constructor(_0x559380){const _0x7f356c=_0x572796;super(_0x559380),this[_0x7f356c(0x164)]=void 0x0,this[_0x7f356c(0x15c)]=_0x4728f7(_0x559380[_0x7f356c(0x173)][_0x7f356c(0x158)](_0x7f356c(0x16f))||[]),this[_0x7f356c(0x171)]({'isActive':!0x1});}[_0x572796(0x163)](){const _0x5461cd=_0x572796,_0x23c986=this[_0x5461cd(0x16d)][_0x5461cd(0x157)][_0x5461cd(0x15e)][_0x5461cd(0x161)][_0x5461cd(0x160)]();this[_0x5461cd(0x16b)]=this[_0x5461cd(0x15c)](_0x23c986);}[_0x572796(0x15d)](){const _0x12b2fb=_0x572796;this[_0x12b2fb(0x164)]&&(this[_0x12b2fb(0x174)](_0x12b2fb(0x155)),this[_0x12b2fb(0x164)]=void 0x0);const _0x1dcbbd=this[_0x12b2fb(0x16d)][_0x12b2fb(0x157)][_0x12b2fb(0x15e)][_0x12b2fb(0x161)][_0x12b2fb(0x160)]();_0x1dcbbd&&(_0x1dcbbd['is'](_0x12b2fb(0x166),_0x12b2fb(0x168))||_0x1dcbbd['is'](_0x12b2fb(0x166),_0x12b2fb(0x15b)))&&(this[_0x12b2fb(0x164)]=new _0x556ed0(this[_0x12b2fb(0x16d)],this[_0x12b2fb(0x16d)][_0x12b2fb(0x159)][_0x12b2fb(0x158)](_0x3568e4),_0x1dcbbd),this[_0x12b2fb(0x167)](_0x12b2fb(0x155))['to'](this[_0x12b2fb(0x164)],_0x12b2fb(0x155)));}}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module uploadcare/uploadcareimageedit/uploadcareimageeditediting
|
|
7
|
+
* @publicApi
|
|
8
|
+
*/
|
|
9
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
10
|
+
import { Notification } from 'ckeditor5/src/ui.js';
|
|
11
|
+
import UploadcareEditing from '../uploadcareediting.js';
|
|
12
|
+
/**
|
|
13
|
+
* The Uploadcare image editing plugin.
|
|
14
|
+
*
|
|
15
|
+
* It complements the {@link module:uploadcare/uploadcare~Uploadcare Uploadcare feature} by adding editing capabilities for uploaded images.
|
|
16
|
+
*/
|
|
17
|
+
export default class UploadcareImageEditEditing extends Plugin {
|
|
18
|
+
/**
|
|
19
|
+
* @inheritDoc
|
|
20
|
+
*/
|
|
21
|
+
static get pluginName(): "UploadcareImageEditEditing";
|
|
22
|
+
/**
|
|
23
|
+
* @inheritDoc
|
|
24
|
+
*/
|
|
25
|
+
static get requires(): readonly [typeof UploadcareEditing, typeof Notification, "ImageUtils", "ImageEditing"];
|
|
26
|
+
/**
|
|
27
|
+
* @inheritDoc
|
|
28
|
+
*/
|
|
29
|
+
static get isOfficialPlugin(): true;
|
|
30
|
+
/**
|
|
31
|
+
* @inheritDoc
|
|
32
|
+
*/
|
|
33
|
+
static get isPremiumPlugin(): true;
|
|
34
|
+
/**
|
|
35
|
+
* @inheritDoc
|
|
36
|
+
*/
|
|
37
|
+
init(): void;
|
|
38
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
const _0xd97643=_0x57e3;(function(_0x567219,_0x3f2112){const _0x415f2c=_0x57e3,_0x1b4ac6=_0x567219();while(!![]){try{const _0xeb5158=-parseInt(_0x415f2c(0x1e9))/0x1+-parseInt(_0x415f2c(0x1e0))/0x2*(parseInt(_0x415f2c(0x1da))/0x3)+-parseInt(_0x415f2c(0x1e4))/0x4+parseInt(_0x415f2c(0x1ed))/0x5*(-parseInt(_0x415f2c(0x1ee))/0x6)+parseInt(_0x415f2c(0x1dc))/0x7+parseInt(_0x415f2c(0x1e6))/0x8*(-parseInt(_0x415f2c(0x1dd))/0x9)+parseInt(_0x415f2c(0x1db))/0xa;if(_0xeb5158===_0x3f2112)break;else _0x1b4ac6['push'](_0x1b4ac6['shift']());}catch(_0x45ef87){_0x1b4ac6['push'](_0x1b4ac6['shift']());}}}(_0x5e60,0x28381));import{Plugin as _0x25503c}from'ckeditor5/src/core.js';import{Notification as _0x16aacb}from'ckeditor5/src/ui.js';import _0x1c02b8 from'./uploadcareimageeditcommand.js';function _0x57e3(_0x49b906,_0x4509d5){const _0x5e603f=_0x5e60();return _0x57e3=function(_0x57e391,_0x286b9e){_0x57e391=_0x57e391-0x1d9;let _0x1f06d7=_0x5e603f[_0x57e391];return _0x1f06d7;},_0x57e3(_0x49b906,_0x4509d5);}import _0x36f50f from'./uploadcareimagereplacecommand.js';import _0x3264ac from'../uploadcareediting.js';function _0x5e60(){const _0x516f59=['ImageUtils','254nRUabx','UploadcareImageEditEditing','isPremiumPlugin','ImageEditing','617196WvuoKp','uploadcareImageEdit','512WdSPiS','requires','commands','241624zSwfKr','pluginName','isOfficialPlugin','init','85865QMsInb','84MbIZeT','uploadcareImageReplace','4449HBvurM','11983760uDjPjh','289457JAYeTs','35199lJPHqv','add'];_0x5e60=function(){return _0x516f59;};return _0x5e60();}export default class m extends _0x25503c{static get[_0xd97643(0x1ea)](){const _0x8b4e7e=_0xd97643;return _0x8b4e7e(0x1e1);}static get[_0xd97643(0x1e7)](){const _0x211498=_0xd97643;return[_0x3264ac,_0x16aacb,_0x211498(0x1df),_0x211498(0x1e3)];}static get[_0xd97643(0x1eb)](){return!0x0;}static get[_0xd97643(0x1e2)](){return!0x0;}[_0xd97643(0x1ec)](){const _0x31d8c7=_0xd97643,{editor:_0x24d4af}=this;_0x24d4af[_0x31d8c7(0x1e8)][_0x31d8c7(0x1de)](_0x31d8c7(0x1e5),new _0x1c02b8(_0x24d4af)),_0x24d4af[_0x31d8c7(0x1e8)][_0x31d8c7(0x1de)](_0x31d8c7(0x1d9),new _0x36f50f(_0x24d4af));}}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module uploadcare/uploadcareimageedit/uploadcareimageeditui
|
|
7
|
+
* @publicApi
|
|
8
|
+
*/
|
|
9
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
10
|
+
import '@uploadcare/file-uploader/web/uc-cloud-image-editor.min.css';
|
|
11
|
+
import '../../theme/uploadcare-theme.css';
|
|
12
|
+
/**
|
|
13
|
+
* The UI plugin of the Uploadcare image edit feature.
|
|
14
|
+
*
|
|
15
|
+
* It registers the `'uploadcareImageEdit'` UI button in the editor's {@link module:ui/componentfactory~ComponentFactory component factory}
|
|
16
|
+
* that allows you to open the Uploadcare dialog and edit the image.
|
|
17
|
+
*/
|
|
18
|
+
export default class UploadcareImageEditUI extends Plugin {
|
|
19
|
+
/**
|
|
20
|
+
* @inheritDoc
|
|
21
|
+
*/
|
|
22
|
+
static get pluginName(): "UploadcareImageEditUI";
|
|
23
|
+
/**
|
|
24
|
+
* @inheritDoc
|
|
25
|
+
*/
|
|
26
|
+
static get isOfficialPlugin(): true;
|
|
27
|
+
/**
|
|
28
|
+
* @inheritDoc
|
|
29
|
+
*/
|
|
30
|
+
static get isPremiumPlugin(): true;
|
|
31
|
+
/**
|
|
32
|
+
* The cache of image URLs that had been uploaded to Uploadcare.
|
|
33
|
+
*/
|
|
34
|
+
get imageCache(): ImageCache;
|
|
35
|
+
/**
|
|
36
|
+
* @inheritDoc
|
|
37
|
+
*/
|
|
38
|
+
init(): void;
|
|
39
|
+
}
|
|
40
|
+
type ImageCache = Map<string, {
|
|
41
|
+
id: string;
|
|
42
|
+
url: string;
|
|
43
|
+
dimension: {
|
|
44
|
+
width: number;
|
|
45
|
+
height: number;
|
|
46
|
+
};
|
|
47
|
+
}>;
|
|
48
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
import{Plugin as _0x3e75b9}from'ckeditor5/src/core.js';import{ButtonView as _0x3628b5}from'ckeditor5/src/ui.js';import{createElement as _0x5719b6}from'ckeditor5/src/utils.js';import _0x107249 from'../../theme/icons/uploadcare-image-edit.svg';import'@uploadcare/file-uploader/web/uc-cloud-image-editor.min.css';import'../../theme/uploadcare-theme.css';export default class g extends _0x3e75b9{constructor(){super(...arguments),this['_imageCache']=new Map();}static get['pluginName'](){return'UploadcareImageEditUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['imageCache'](){return this['_imageCache'];}['init'](){const _0x5f255d=this['editor'];_0x5f255d['ui']['componentFactory']['add']('uploadcareImageEdit',_0x15e7d2=>{const _0x9a6830=_0x5f255d['commands']['get']('uploadcareImageEdit'),_0x1b06e3=new _0x3628b5(_0x15e7d2),t=_0x15e7d2['t'];return _0x1b06e3['set']({'icon':_0x107249,'tooltip':!0x0,'label':t({'id':'Edit\x20Image\x20(Uploadcare)','string':'Edit\x20image'})}),_0x1b06e3['bind']('isEnabled')['to'](_0x9a6830),_0x1b06e3['bind']('isOn')['to'](_0x9a6830,'isActive'),this['listenTo'](_0x1b06e3,'execute',()=>{_0x5f255d['execute']('uploadcareImageEdit'),_0x5f255d['editing']['view']['focus']();}),_0x1b06e3;}),this['_initConfig']();}['_initConfig'](){const _0x5f1ce0=_0x5719b6(document,'uc-config',{'ctx-name':'image-edit','removeCopyright':'true','localeName':this['editor']['locale']['contentLanguage']});document['body']['appendChild'](_0x5f1ce0),this['listenTo'](this['editor'],'destroy',()=>{_0x5f1ce0['remove']();});}}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module uploadcare/uploadcareimageedit/uploadcareimagereplacecommand
|
|
7
|
+
*/
|
|
8
|
+
import { Command } from 'ckeditor5/src/core.js';
|
|
9
|
+
/**
|
|
10
|
+
* The Uploadcare replace image command.
|
|
11
|
+
*
|
|
12
|
+
* It replaces given image element attributes.
|
|
13
|
+
*/
|
|
14
|
+
export default class UploadcareImageReplaceCommand extends Command {
|
|
15
|
+
/**
|
|
16
|
+
* @inheritDoc
|
|
17
|
+
*/
|
|
18
|
+
refresh(): void;
|
|
19
|
+
/**
|
|
20
|
+
* @inheritDoc
|
|
21
|
+
*/
|
|
22
|
+
execute(attributes: Record<string, string | number | any>): void;
|
|
23
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
const _0x1fdc46=_0x568e;(function(_0x445c78,_0x1a9773){const _0x2c4dcb=_0x568e,_0x2b5141=_0x445c78();while(!![]){try{const _0xfdc080=parseInt(_0x2c4dcb(0x114))/0x1+-parseInt(_0x2c4dcb(0x11c))/0x2*(parseInt(_0x2c4dcb(0x127))/0x3)+parseInt(_0x2c4dcb(0x125))/0x4*(parseInt(_0x2c4dcb(0x117))/0x5)+parseInt(_0x2c4dcb(0x121))/0x6+-parseInt(_0x2c4dcb(0x11a))/0x7*(parseInt(_0x2c4dcb(0x11d))/0x8)+-parseInt(_0x2c4dcb(0x123))/0x9*(parseInt(_0x2c4dcb(0x12b))/0xa)+parseInt(_0x2c4dcb(0x11e))/0xb;if(_0xfdc080===_0x1a9773)break;else _0x2b5141['push'](_0x2b5141['shift']());}catch(_0x1a5828){_0x2b5141['push'](_0x2b5141['shift']());}}}(_0x12f0,0xb4927));function _0x568e(_0x2cef93,_0x25ff36){const _0x12f0b6=_0x12f0();return _0x568e=function(_0x568ed8,_0xebe327){_0x568ed8=_0x568ed8-0x111;let _0xc4692d=_0x12f0b6[_0x568ed8];return _0xc4692d;},_0x568e(_0x2cef93,_0x25ff36);}import{Command as _0x308ea0}from'ckeditor5/src/core.js';function _0x12f0(){const _0x39f10f=['isEnabled','54mXIlKU','removeAttribute','423148IikikE','setAttributes','93XxHKwN','model','imageBlock','getSelectedElement','103810dtDAyX','imageInline','document','sizes','918963oOXbqh','change','execute','20lbOXgD','editor','selection','7wITdnk','element','76094btnHqE','1762736ugZKgG','1826550XJdjgZ','srcset','refresh','4161282bUdRXP'];_0x12f0=function(){return _0x39f10f;};return _0x12f0();}export default class Y extends _0x308ea0{[_0x1fdc46(0x120)](){const _0x41d61e=_0x1fdc46,_0x160feb=this[_0x41d61e(0x118)][_0x41d61e(0x128)][_0x41d61e(0x112)][_0x41d61e(0x119)][_0x41d61e(0x12a)]();this[_0x41d61e(0x122)]=Boolean(_0x160feb&&(_0x160feb['is'](_0x41d61e(0x11b),_0x41d61e(0x129))||_0x160feb['is'](_0x41d61e(0x11b),_0x41d61e(0x111))));}[_0x1fdc46(0x116)](_0x4a707e){const _0x45eb64=_0x1fdc46,_0x14ee07=this[_0x45eb64(0x118)][_0x45eb64(0x128)][_0x45eb64(0x112)][_0x45eb64(0x119)][_0x45eb64(0x12a)]();this[_0x45eb64(0x118)][_0x45eb64(0x128)][_0x45eb64(0x115)](_0x123a76=>{const _0xc3087c=_0x45eb64;_0x123a76[_0xc3087c(0x126)](_0x4a707e,_0x14ee07),_0x123a76[_0xc3087c(0x124)](_0xc3087c(0x11f),_0x14ee07),_0x123a76[_0xc3087c(0x124)](_0xc3087c(0x113),_0x14ee07);});}}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module uploadcare/uploadcareimageedit
|
|
7
|
+
* @publicApi
|
|
8
|
+
*/
|
|
9
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
10
|
+
import UploadcareImageEditEditing from './uploadcareimageedit/uploadcareimageeditediting.js';
|
|
11
|
+
import UploadcareImageEditUI from './uploadcareimageedit/uploadcareimageeditui.js';
|
|
12
|
+
/**
|
|
13
|
+
* The Uploadcare image edit feature.
|
|
14
|
+
*/
|
|
15
|
+
export default class UploadcareImageEdit extends Plugin {
|
|
16
|
+
/**
|
|
17
|
+
* @inheritDoc
|
|
18
|
+
*/
|
|
19
|
+
static get pluginName(): "UploadcareImageEdit";
|
|
20
|
+
/**
|
|
21
|
+
* @inheritDoc
|
|
22
|
+
*/
|
|
23
|
+
static get requires(): readonly [typeof UploadcareImageEditEditing, typeof UploadcareImageEditUI];
|
|
24
|
+
/**
|
|
25
|
+
* @inheritDoc
|
|
26
|
+
*/
|
|
27
|
+
static get isOfficialPlugin(): true;
|
|
28
|
+
/**
|
|
29
|
+
* @inheritDoc
|
|
30
|
+
*/
|
|
31
|
+
static get isPremiumPlugin(): true;
|
|
32
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
function _0xa25b(_0x21a447,_0x3c01b2){var _0xa8293c=_0xa829();return _0xa25b=function(_0xa25b66,_0x27b476){_0xa25b66=_0xa25b66-0xc3;var _0x4c317d=_0xa8293c[_0xa25b66];return _0x4c317d;},_0xa25b(_0x21a447,_0x3c01b2);}var _0x16a2b5=_0xa25b;(function(_0x3d4350,_0x1c6d25){var _0x425e43=_0xa25b,_0x3178b6=_0x3d4350();while(!![]){try{var _0x121377=parseInt(_0x425e43(0xc3))/0x1+parseInt(_0x425e43(0xcd))/0x2+-parseInt(_0x425e43(0xca))/0x3+-parseInt(_0x425e43(0xc7))/0x4+-parseInt(_0x425e43(0xc8))/0x5*(-parseInt(_0x425e43(0xc4))/0x6)+-parseInt(_0x425e43(0xc9))/0x7+-parseInt(_0x425e43(0xcb))/0x8;if(_0x121377===_0x1c6d25)break;else _0x3178b6['push'](_0x3178b6['shift']());}catch(_0x41ca14){_0x3178b6['push'](_0x3178b6['shift']());}}}(_0xa829,0x46d0d));import{Plugin as _0x34d2ca}from'ckeditor5/src/core.js';function _0xa829(){var _0x26bd7d=['1763536PggrQX','15tQtYvg','985208BpKCGA','232521tzkqlz','2682544RjsGfm','requires','905620hmGFXi','isOfficialPlugin','UploadcareImageEdit','528149NFdFQN','607110LGlkrG','pluginName','isPremiumPlugin'];_0xa829=function(){return _0x26bd7d;};return _0xa829();}import _0x1ce2ac from'./uploadcareimageedit/uploadcareimageeditediting.js';import _0x4bd0e0 from'./uploadcareimageedit/uploadcareimageeditui.js';export default class j extends _0x34d2ca{static get[_0x16a2b5(0xc5)](){var _0x26d398=_0x16a2b5;return _0x26d398(0xcf);}static get[_0x16a2b5(0xcc)](){return[_0x1ce2ac,_0x4bd0e0];}static get[_0x16a2b5(0xce)](){return!0x0;}static get[_0x16a2b5(0xc6)](){return!0x0;}}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module uploadcare/uploadcareui
|
|
7
|
+
* @publicApi
|
|
8
|
+
*/
|
|
9
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
10
|
+
import '@uploadcare/file-uploader/web/uc-file-uploader-inline.min.css';
|
|
11
|
+
import '../theme/uploadcare-theme.css';
|
|
12
|
+
import '../theme/uploadcareimageedit.css';
|
|
13
|
+
/**
|
|
14
|
+
* The UI plugin of the AI assistant.
|
|
15
|
+
*/
|
|
16
|
+
export default class UploadcareUI extends Plugin {
|
|
17
|
+
/**
|
|
18
|
+
* @inheritDoc
|
|
19
|
+
*/
|
|
20
|
+
static get pluginName(): "UploadcareUI";
|
|
21
|
+
/**
|
|
22
|
+
* @inheritDoc
|
|
23
|
+
*/
|
|
24
|
+
static get isOfficialPlugin(): true;
|
|
25
|
+
/**
|
|
26
|
+
* @inheritDoc
|
|
27
|
+
*/
|
|
28
|
+
static get isPremiumPlugin(): true;
|
|
29
|
+
/**
|
|
30
|
+
* @inheritDoc
|
|
31
|
+
*/
|
|
32
|
+
init(): void;
|
|
33
|
+
/**
|
|
34
|
+
* @inheritDoc
|
|
35
|
+
*/
|
|
36
|
+
afterInit(): void;
|
|
37
|
+
/**
|
|
38
|
+
* @inheritDoc
|
|
39
|
+
*/
|
|
40
|
+
destroy(): void;
|
|
41
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
function _0x21f6(_0x88b34,_0x2aa86d){const _0x3a5430=_0x3a54();return _0x21f6=function(_0x21f660,_0x42d811){_0x21f660=_0x21f660-0x133;let _0x563c17=_0x3a5430[_0x21f660];return _0x563c17;},_0x21f6(_0x88b34,_0x2aa86d);}const _0x4f0934=_0x21f6;(function(_0x57e75a,_0x1e14e7){const _0x46e8bf=_0x21f6,_0x5b056f=_0x57e75a();while(!![]){try{const _0xda9631=-parseInt(_0x46e8bf(0x15a))/0x1*(-parseInt(_0x46e8bf(0x14a))/0x2)+parseInt(_0x46e8bf(0x174))/0x3+-parseInt(_0x46e8bf(0x152))/0x4+-parseInt(_0x46e8bf(0x13d))/0x5+parseInt(_0x46e8bf(0x15c))/0x6+-parseInt(_0x46e8bf(0x154))/0x7*(parseInt(_0x46e8bf(0x182))/0x8)+parseInt(_0x46e8bf(0x156))/0x9;if(_0xda9631===_0x1e14e7)break;else _0x5b056f['push'](_0x5b056f['shift']());}catch(_0x41f5b5){_0x5b056f['push'](_0x5b056f['shift']());}}}(_0x3a54,0xeaf02));import{Plugin as _0x21ed00,icons as _0x8084b0}from'ckeditor5/src/core.js';import{ButtonView as _0x2980d5,MenuBarMenuListItemButtonView as _0x3a2613}from'ckeditor5/src/ui.js';import _0x195bef from'../theme/icons/dropbox.svg';import _0xeb8ee6 from'../theme/icons/facebook.svg';import _0x3e6deb from'../theme/icons/google-drive.svg';import _0x518616 from'../theme/icons/google-photos.svg';import _0xdb414 from'../theme/icons/instagram.svg';import _0x8ac728 from'../theme/icons/link.svg';function _0x3a54(){const _0x1f3f8b=['licenseKey','reduce','OneDrive','Uploadcare','upload','locale','Dropbox','_licenseKeyCheckInterval','init','isImageSelected','plugins','328544rjxcLE','editor','ImageInsertUI','has','uploadcareLicenseKeyDomainLimit','_createToolbarButton','afterInit','Replace','4740288mxUhUM','UploadcareUI','2723CFckUe','uploadcareLicenseKeyValid','23659983AYeHoE','usageLimit','_createMenuBarButtons','config','3CzttUE','uploadcareLicenseKeyExpired','4675296ecjCSv','Insert','uploadcare','bind','_normalizeConfigSourceList','uploadcareLicenseKeyTrialLimit','pluginName','uploadcareLicenseKeyEvaluationLimit','_createButton','Instagram','uploadcareLicenseKeyInvalid','_getIntegrationKey','featureNotAllowed','Facebook','registerIntegration','_showLicenseError','map','commands','text','isPremiumPlugin','invalid','URL','forEach','withText','470391KiILNj','domainLimit','GPhotos','execute','Local','push','label','uploadcareLicenseKeyNotAllowed','expired','imageUpload','type','isOfficialPlugin','destroy','tooltip','6736wmScVd','uploadcare.uploader.sourceList','GDrive','isEnabled','trialLimit','uploadcareLicenseKeyUsageLimit','entries','icon','assetManager','evaluationLimit','shortText','get','url','7914000sHCSGX','_createDropdownButtons'];_0x3a54=function(){return _0x1f3f8b;};return _0x3a54();}import _0x14f85d from'../theme/icons/onedrive.svg';import{UploadcareSource as _0x1c0d7a}from'./uploadcareconfig.js';import{getTranslation as _0x117f17}from'./utils/common-translations.js';import'@uploadcare/file-uploader/web/uc-file-uploader-inline.min.css';import'../theme/uploadcare-theme.css';import'../theme/uploadcareimageedit.css';export default class e extends _0x21ed00{static get[_0x4f0934(0x162)](){const _0x322b69=_0x4f0934;return _0x322b69(0x153);}static get[_0x4f0934(0x17f)](){return!0x0;}static get[_0x4f0934(0x16f)](){return!0x0;}[_0x4f0934(0x147)](){const _0x55f6b5=_0x4f0934;this[_0x55f6b5(0x13f)]=this[_0x55f6b5(0x14b)][_0x55f6b5(0x159)][_0x55f6b5(0x13b)](_0x55f6b5(0x13f));const _0x4dddfa=this[_0x55f6b5(0x14b)];this[_0x55f6b5(0x146)]=setInterval(()=>{const _0x5b2469=_0x55f6b5;let _0x11beab;for(const _0x1f1f04 in _0x4dddfa){const _0x482618=_0x1f1f04,_0x59c538=_0x4dddfa[_0x482618];if(_0x5b2469(0x155)==_0x59c538||_0x5b2469(0x166)==_0x59c538||_0x5b2469(0x15b)==_0x59c538||_0x5b2469(0x14e)==_0x59c538||_0x5b2469(0x17b)==_0x59c538||_0x5b2469(0x163)==_0x59c538||_0x5b2469(0x161)==_0x59c538||_0x5b2469(0x135)==_0x59c538){delete _0x4dddfa[_0x482618],_0x11beab=_0x59c538,clearInterval(this[_0x5b2469(0x146)]),this[_0x5b2469(0x146)]=void 0x0;break;}}_0x5b2469(0x166)==_0x11beab&&_0x4dddfa[_0x5b2469(0x16b)](_0x5b2469(0x170)),_0x5b2469(0x15b)==_0x11beab&&_0x4dddfa[_0x5b2469(0x16b)](_0x5b2469(0x17c)),_0x5b2469(0x14e)==_0x11beab&&_0x4dddfa[_0x5b2469(0x16b)](_0x5b2469(0x175)),_0x5b2469(0x17b)==_0x11beab&&_0x4dddfa[_0x5b2469(0x16b)](_0x5b2469(0x168),_0x5b2469(0x142)),_0x5b2469(0x163)==_0x11beab&&_0x4dddfa[_0x5b2469(0x16b)](_0x5b2469(0x139)),_0x5b2469(0x161)==_0x11beab&&_0x4dddfa[_0x5b2469(0x16b)](_0x5b2469(0x134)),_0x5b2469(0x135)==_0x11beab&&_0x4dddfa[_0x5b2469(0x16b)](_0x5b2469(0x157));},0x3e8);}[_0x4f0934(0x150)](){const _0x5c8ed9=_0x4f0934,{editor:_0x3ea0c7}=this,_0x14363b=_0x3ea0c7[_0x5c8ed9(0x16d)][_0x5c8ed9(0x13b)](_0x5c8ed9(0x15e));if(!_0x14363b)return;const _0x337868=this[_0x5c8ed9(0x160)](_0x3ea0c7[_0x5c8ed9(0x159)][_0x5c8ed9(0x13b)](_0x5c8ed9(0x183)))[_0x5c8ed9(0x140)]((_0x2e0a70,_0x522b29)=>{const _0x5c7ef9=_0x5c8ed9,_0x2c9ab7=this[_0x5c7ef9(0x167)](_0x522b29[_0x5c7ef9(0x17e)]);return _0x2e0a70[_0x2c9ab7]||(_0x2e0a70[_0x2c9ab7]=[]),_0x2e0a70[_0x2c9ab7][_0x5c7ef9(0x179)](_0x522b29),_0x2e0a70;},{});_0x3ea0c7[_0x5c8ed9(0x149)][_0x5c8ed9(0x14d)](_0x5c8ed9(0x14c))&&_0x3ea0c7[_0x5c8ed9(0x16d)][_0x5c8ed9(0x13b)](_0x5c8ed9(0x15e))&&Object[_0x5c8ed9(0x136)](_0x337868)[_0x5c8ed9(0x172)](([_0x4634f8,_0xe78a6b])=>{const _0x4ce95a=_0x5c8ed9;_0x3ea0c7[_0x4ce95a(0x149)][_0x4ce95a(0x13b)](_0x4ce95a(0x14c))[_0x4ce95a(0x16a)]({'name':_0x4634f8,'observable':()=>_0x14363b,'buttonViewCreator':()=>this[_0x4ce95a(0x14f)](_0xe78a6b),'formViewCreator':()=>this[_0x4ce95a(0x13e)](_0xe78a6b),'menuBarButtonViewCreator':()=>this[_0x4ce95a(0x158)](_0xe78a6b),'override':_0x4ce95a(0x138)!==_0x4634f8});});}[_0x4f0934(0x180)](){const _0x44f4df=_0x4f0934;super[_0x44f4df(0x180)](),this[_0x44f4df(0x146)]&&clearInterval(this[_0x44f4df(0x146)]);}[_0x4f0934(0x160)](_0x488419){const _0x1a1b64=_0x4f0934,{locale:_0x35bd73}=this[_0x1a1b64(0x14b)];return _0x488419[_0x1a1b64(0x16c)](_0x360c80=>{const _0x303d24=_0x1a1b64,_0x4a7890=_0x117f17(_0x35bd73,_0x360c80,_0x303d24(0x15d));switch(_0x360c80){case _0x1c0d7a[_0x303d24(0x178)]:return{'icon':_0x8084b0[_0x303d24(0x17d)],'type':_0x1c0d7a[_0x303d24(0x178)],..._0x4a7890};case _0x1c0d7a[_0x303d24(0x171)]:return{'icon':_0x8ac728,'type':_0x1c0d7a[_0x303d24(0x171)],..._0x4a7890};case _0x1c0d7a[_0x303d24(0x145)]:return{'icon':_0x195bef,'type':_0x1c0d7a[_0x303d24(0x145)],..._0x4a7890};case _0x1c0d7a[_0x303d24(0x169)]:return{'icon':_0xeb8ee6,'type':_0x1c0d7a[_0x303d24(0x169)],..._0x4a7890};case _0x1c0d7a[_0x303d24(0x184)]:return{'icon':_0x3e6deb,'type':_0x1c0d7a[_0x303d24(0x184)],..._0x4a7890};case _0x1c0d7a[_0x303d24(0x176)]:return{'icon':_0x518616,'type':_0x1c0d7a[_0x303d24(0x176)],..._0x4a7890};case _0x1c0d7a[_0x303d24(0x165)]:return{'icon':_0xdb414,'type':_0x1c0d7a[_0x303d24(0x165)],..._0x4a7890};case _0x1c0d7a[_0x303d24(0x141)]:return{'icon':_0x14f85d,'type':_0x1c0d7a[_0x303d24(0x141)],..._0x4a7890};}});}[_0x4f0934(0x167)](_0x4a4150){const _0xcc45a8=_0x4f0934;switch(_0x4a4150){case _0x1c0d7a[_0xcc45a8(0x178)]:return _0xcc45a8(0x143);case _0x1c0d7a[_0xcc45a8(0x171)]:return _0xcc45a8(0x13c);default:return _0xcc45a8(0x138);}}[_0x4f0934(0x164)](_0x296d79,_0x516acc){const _0x754459=_0x4f0934,_0x4ece29=this[_0x754459(0x14b)],_0x5c3621=new _0x296d79(_0x4ece29[_0x754459(0x144)]),_0x3df174=_0x4ece29[_0x754459(0x16d)][_0x754459(0x13b)](_0x754459(0x15e));return _0x5c3621[_0x754459(0x15f)](_0x754459(0x133))['to'](_0x3df174),_0x5c3621['on'](_0x754459(0x177),()=>{const _0x283e93=_0x754459;_0x3df174[_0x283e93(0x177)](_0x516acc);}),_0x5c3621;}[_0x4f0934(0x14f)](_0x4a9eb0){const _0x3a14ce=_0x4f0934,{locale:_0x14fbd8}=this[_0x3a14ce(0x14b)],_0x42c822=this[_0x3a14ce(0x14b)][_0x3a14ce(0x149)][_0x3a14ce(0x13b)](_0x3a14ce(0x14c)),_0x127069=_0x4a9eb0[0x0],_0x58479e=this[_0x3a14ce(0x164)](_0x2980d5,_0x127069[_0x3a14ce(0x17e)]);return _0x58479e[_0x3a14ce(0x137)]=_0x127069[_0x3a14ce(0x137)],_0x58479e[_0x3a14ce(0x15f)](_0x3a14ce(0x17a))['to'](_0x42c822,_0x3a14ce(0x148),_0x330859=>_0x117f17(_0x14fbd8,_0x127069[_0x3a14ce(0x17e)],_0x330859?_0x3a14ce(0x151):_0x3a14ce(0x15d))[_0x3a14ce(0x16e)]),_0x58479e[_0x3a14ce(0x181)]=!0x0,_0x58479e;}[_0x4f0934(0x13e)](_0x3ba147){const _0x11176e=_0x4f0934,{locale:_0x5c57d5}=this[_0x11176e(0x14b)],_0x5dd7bb=this[_0x11176e(0x14b)][_0x11176e(0x149)][_0x11176e(0x13b)](_0x11176e(0x14c));return _0x3ba147[_0x11176e(0x16c)](_0x22f7a8=>{const _0x160839=_0x11176e,_0x3bb690=this[_0x160839(0x164)](_0x2980d5,_0x22f7a8[_0x160839(0x17e)]);return _0x3bb690[_0x160839(0x173)]=!0x0,_0x3bb690[_0x160839(0x137)]=_0x22f7a8[_0x160839(0x137)],_0x3bb690[_0x160839(0x15f)](_0x160839(0x17a))['to'](_0x5dd7bb,_0x160839(0x148),_0x2f0659=>_0x117f17(_0x5c57d5,_0x22f7a8[_0x160839(0x17e)],_0x2f0659?_0x160839(0x151):_0x160839(0x15d))[_0x160839(0x16e)]),_0x3bb690;});}[_0x4f0934(0x158)](_0x52448b){const _0xda3dc6=_0x4f0934;return _0x52448b[_0xda3dc6(0x16c)](_0x180add=>{const _0x364e6b=_0xda3dc6,_0x4ab6de=this[_0x364e6b(0x164)](_0x3a2613,_0x180add[_0x364e6b(0x17e)]);return _0x4ab6de[_0x364e6b(0x137)]=_0x180add[_0x364e6b(0x137)],_0x4ab6de[_0x364e6b(0x17a)]=_0x180add[_0x364e6b(0x13a)],_0x4ab6de;});}}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module uploadcare/uploadcareuploadadapter
|
|
7
|
+
* @publicApi
|
|
8
|
+
*/
|
|
9
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
10
|
+
import { FileRepository } from 'ckeditor5/src/upload.js';
|
|
11
|
+
import UploadcareEditing from './uploadcareediting.js';
|
|
12
|
+
/**
|
|
13
|
+
* A plugin that enables file uploads in CKEditor 5 using the Uploadcare server–side connector.
|
|
14
|
+
*
|
|
15
|
+
* Check out the {@glink features/images/image-upload/image-upload Image upload overview} guide to learn about
|
|
16
|
+
* other ways to upload images into CKEditor 5.
|
|
17
|
+
*/
|
|
18
|
+
export default class UploadcareUploadAdapter extends Plugin {
|
|
19
|
+
/**
|
|
20
|
+
* @inheritDoc
|
|
21
|
+
*/
|
|
22
|
+
static get requires(): readonly ["ImageUploadEditing", "ImageUploadProgress", typeof FileRepository, typeof UploadcareEditing];
|
|
23
|
+
/**
|
|
24
|
+
* @inheritDoc
|
|
25
|
+
*/
|
|
26
|
+
static get pluginName(): "UploadcareUploadAdapter";
|
|
27
|
+
/**
|
|
28
|
+
* @inheritDoc
|
|
29
|
+
*/
|
|
30
|
+
static get isOfficialPlugin(): true;
|
|
31
|
+
/**
|
|
32
|
+
* @inheritDoc
|
|
33
|
+
*/
|
|
34
|
+
static get isPremiumPlugin(): true;
|
|
35
|
+
/**
|
|
36
|
+
* @inheritDoc
|
|
37
|
+
*/
|
|
38
|
+
afterInit(): Promise<void>;
|
|
39
|
+
}
|