@ckeditor/ckeditor5-ai 0.0.0-nightly-20231004.0 → 40.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -1
- package/build/ai.js +2 -2
- package/build/translations/af.js +1 -1
- package/build/translations/ar.js +1 -1
- package/build/translations/bg.js +1 -1
- package/build/translations/bn.js +1 -1
- package/build/translations/bs.js +1 -1
- package/build/translations/ca.js +1 -1
- package/build/translations/cs.js +1 -1
- package/build/translations/da.js +1 -1
- package/build/translations/de-ch.js +1 -1
- package/build/translations/de.js +1 -1
- package/build/translations/el.js +1 -1
- package/build/translations/en-au.js +1 -1
- package/build/translations/es-co.js +1 -1
- package/build/translations/es.js +1 -1
- package/build/translations/et.js +1 -1
- package/build/translations/fa.js +1 -1
- package/build/translations/fi.js +1 -1
- package/build/translations/fr.js +1 -1
- package/build/translations/gl.js +1 -1
- package/build/translations/he.js +1 -1
- package/build/translations/hi.js +1 -1
- package/build/translations/hr.js +1 -1
- package/build/translations/hu.js +1 -1
- package/build/translations/id.js +1 -1
- package/build/translations/it.js +1 -1
- package/build/translations/ja.js +1 -1
- package/build/translations/jv.js +1 -1
- package/build/translations/ko.js +1 -1
- package/build/translations/lt.js +1 -1
- package/build/translations/lv.js +1 -1
- package/build/translations/ms.js +1 -1
- package/build/translations/nl.js +1 -1
- package/build/translations/no.js +1 -1
- package/build/translations/pl.js +1 -1
- package/build/translations/pt-br.js +1 -1
- package/build/translations/pt.js +1 -1
- package/build/translations/ro.js +1 -1
- package/build/translations/ru.js +1 -1
- package/build/translations/sk.js +1 -1
- package/build/translations/sr-latn.js +1 -1
- package/build/translations/sr.js +1 -1
- package/build/translations/sv.js +1 -1
- package/build/translations/th.js +1 -1
- package/build/translations/tk.js +1 -1
- package/build/translations/tr.js +1 -1
- package/build/translations/ug.js +1 -1
- package/build/translations/uk.js +1 -1
- package/build/translations/ur.js +1 -1
- package/build/translations/vi.js +1 -1
- package/build/translations/zh-cn.js +1 -1
- package/build/translations/zh.js +1 -1
- package/lang/contexts.json +15 -5
- package/lang/translations/ar.po +39 -39
- package/lang/translations/bg.po +39 -39
- package/lang/translations/bn.po +39 -39
- package/lang/translations/ca.po +39 -39
- package/lang/translations/cs.po +39 -39
- package/lang/translations/da.po +39 -39
- package/lang/translations/de.po +39 -39
- package/lang/translations/el.po +39 -39
- package/lang/translations/es.po +39 -39
- package/lang/translations/et.po +39 -39
- package/lang/translations/fi.po +39 -39
- package/lang/translations/fr.po +39 -39
- package/lang/translations/he.po +39 -39
- package/lang/translations/hi.po +39 -39
- package/lang/translations/hu.po +39 -39
- package/lang/translations/id.po +39 -39
- package/lang/translations/it.po +39 -39
- package/lang/translations/ja.po +39 -39
- package/lang/translations/ko.po +39 -39
- package/lang/translations/lt.po +39 -39
- package/lang/translations/lv.po +39 -39
- package/lang/translations/ms.po +39 -39
- package/lang/translations/nl.po +40 -40
- package/lang/translations/no.po +39 -39
- package/lang/translations/pl.po +39 -39
- package/lang/translations/pt-br.po +39 -39
- package/lang/translations/pt.po +39 -39
- package/lang/translations/ro.po +39 -39
- package/lang/translations/ru.po +39 -39
- package/lang/translations/sk.po +39 -39
- package/lang/translations/sr.po +39 -39
- package/lang/translations/sv.po +39 -39
- package/lang/translations/th.po +39 -39
- package/lang/translations/tr.po +39 -39
- package/lang/translations/uk.po +39 -39
- package/lang/translations/vi.po +39 -39
- package/lang/translations/zh-cn.po +39 -39
- package/lang/translations/zh.po +39 -39
- package/package.json +5 -3
- package/src/aiassistant.d.ts +419 -128
- package/src/aiassistant.js +1 -1
- package/src/aiassistantediting.d.ts +45 -44
- package/src/aiassistantediting.js +1 -1
- package/src/aiassistantui.d.ts +46 -41
- package/src/aiassistantui.js +1 -1
- package/src/aiconnector.d.ts +44 -40
- package/src/aiconnector.js +1 -1
- package/src/augmentation.d.ts +26 -26
- package/src/index.d.ts +9 -9
- package/src/ui/aiassistantcontroller.d.ts +59 -59
- package/src/ui/aiassistantcontroller.js +1 -1
- package/src/ui/dropdown/aicommandslistview.d.ts +22 -22
- package/src/ui/dropdown/aicommandslistview.js +1 -1
- package/src/ui/dropdown/buttonlabelwithhighlightview.d.ts +29 -29
- package/src/ui/dropdown/buttonlabelwithhighlightview.js +1 -1
- package/src/ui/form/aiformcontentarea.d.ts +48 -70
- package/src/ui/form/aiformcontentarea.js +1 -1
- package/src/ui/form/aiformerrorview.d.ts +26 -26
- package/src/ui/form/aiformerrorview.js +1 -1
- package/src/ui/form/aiformpromptview.d.ts +46 -46
- package/src/ui/form/aiformpromptview.js +1 -1
- package/src/ui/form/aiformtoolbarview.d.ts +41 -41
- package/src/ui/form/aiformtoolbarview.js +1 -1
- package/src/ui/form/aiformview.d.ts +131 -125
- package/src/ui/form/aiformview.js +1 -1
- package/src/ui/form/aihistorylistitemview.d.ts +18 -18
- package/src/ui/form/aihistorylistitemview.js +1 -1
- package/src/ui/form/aihistorylistview.d.ts +35 -35
- package/src/ui/form/aihistorylistview.js +1 -1
- package/src/ui/form/prompthistory.d.ts +20 -20
- package/src/ui/form/prompthistory.js +1 -1
- package/src/ui/showaiassistantcommand.d.ts +26 -26
- package/src/ui/showaiassistantcommand.js +1 -1
- package/src/utils/common-translations.d.ts +9 -0
- package/src/utils/common-translations.js +23 -0
- package/theme/ai-dropdown.css +4 -4
- package/theme/ai-form.css +2 -0
- package/theme/ai.css +15 -13
- package/theme/icons/error.svg +1 -3
- package/theme/icons/magic-wand.svg +1 -7
- package/theme/icons/robot-pencil.svg +1 -9
- package/theme/icons/submit.svg +1 -3
- package/src/ui/form/aiformtextareaview.d.ts +0 -31
- package/src/ui/form/aiformtextareaview.js +0 -23
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{FocusTracker as
|
|
23
|
+
const _0x66e6=['listenTo','_focusCycler','AI\x20Assistant','isError','_createToolbar','isVisible','tab','startProcessing','clear','execute','_createHistoryView','queryView','finishProcessing','forwardCycle','focus','clearHistory','render','isProcessing','AI_ERROR_FAILED','submitPrompt','items','_focusables','prompt','_promptHistory','tryAgainEvent','trim','bindTo','setTemplate','div','stopButton','ck-ai-form-content','focusFirst','_createPromptView','set','Ask\x20AI\x20to\x20improve\x20generated\x20text','Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.','element','add','insertButton','submit','promptView','locale','contentArea','shift\x20+\x20tab','tryAgainButton','toolbar','replaceButton','bindTemplate','value','copyButtonView','stop','isEnabled','errorView','handleError','bind','replaceContent','Empty\x20history','createCollection','ck-ai-form','keystrokes','stopProcessing','focusTracker','fire','text','backwardCycle','focusCycler','Ask\x20AI\x20to\x20edit\x20or\x20generate','focusPrevious'];(function(_0x4a2397,_0x66e670){const _0x2c3adb=function(_0x3d59e0){while(--_0x3d59e0){_0x4a2397['push'](_0x4a2397['shift']());}};_0x2c3adb(++_0x66e670);}(_0x66e6,0x19b));const _0x2c3a=function(_0x4a2397,_0x66e670){_0x4a2397=_0x4a2397-0x0;let _0x2c3adb=_0x66e6[_0x4a2397];return _0x2c3adb;};import{FocusTracker as _0x50263a,KeystrokeHandler as _0x36c307}from'ckeditor5/src/utils';import{View as _0x727a95,FocusCycler as _0x739176,createLabeledTextarea as _0x55129a,FormHeaderView as _0x5a1a65}from'ckeditor5/src/ui';import _0x36e6aa from'./aiformtoolbarview';import _0xbfd655 from'./aiformcontentarea';import _0x3f3334 from'./aiformerrorview';import _0x2d54b8 from'./aiformpromptview';import _0x60b8c3 from'./aihistorylistview';import _0x21a2e6 from'./aihistorylistitemview';import _0x247d7d from'./prompthistory';import{getTranslation as _0xc386e8}from'../../utils/common-translations';import _0x1ef5f4 from'../../../theme/icons/robot-pencil.svg';export default class y extends _0x727a95{constructor(_0x127562,_0x2871dc,_0x3daeef,_0x305b59=''){super(_0x127562),this[_0x2c3a('0x1e')](_0x2c3a('0x30'),!0x0),this[_0x2c3a('0x1e')](_0x2c3a('0xe'),!0x1),this[_0x2c3a('0x1e')](_0x2c3a('0x13'),_0x2871dc),this['set'](_0x2c3a('0x2d'),''),this[_0x2c3a('0x1e')](_0x2c3a('0x0'),!0x1),this[_0x2c3a('0x14')]=new _0x247d7d(),this[_0x2c3a('0x31')]=new _0x3f3334(_0x127562),this['header']=new _0x5a1a65(_0x127562,{'label':_0xc386e8(_0x127562,_0x2c3a('0x43')),'icon':_0x1ef5f4}),this[_0x2c3a('0x27')]=new _0xbfd655(_0x127562,_0x305b59),this['contentArea'][_0x2c3a('0x33')]('isProcessing')['to'](this),this[_0x2c3a('0x27')][_0x2c3a('0x33')](_0x2c3a('0x2d'))['to'](this),this['toolbar']=this['_createToolbar'](),this['promptView']=this[_0x2c3a('0x1d')](),this[_0x2c3a('0x3a')]=new _0x50263a(),this['keystrokes']=new _0x36c307(),this[_0x2c3a('0x12')]=this[_0x2c3a('0x36')]([this[_0x2c3a('0x27')],this[_0x2c3a('0x27')]['copyButtonView'],this[_0x2c3a('0x2a')],this['promptView']]),this[_0x2c3a('0x42')]=new _0x739176({'focusables':this[_0x2c3a('0x12')],'focusTracker':this['focusTracker'],'keystrokeHandler':this[_0x2c3a('0x38')],'actions':{'focusPrevious':_0x2c3a('0x28'),'focusNext':_0x2c3a('0x3')}}),this[_0x2c3a('0x25')][_0x2c3a('0x3e')]['on'](_0x2c3a('0xa'),_0x16bdb3=>{this[_0x2c3a('0x42')]['focusNext'](),_0x16bdb3[_0x2c3a('0x2f')]();}),this[_0x2c3a('0x25')]['focusCycler']['on'](_0x2c3a('0x3d'),_0x16e24b=>{this[_0x2c3a('0x42')][_0x2c3a('0x40')](),_0x16e24b[_0x2c3a('0x2f')]();});const _0x499261=this[_0x2c3a('0x2c')];this[_0x2c3a('0x18')]({'tag':_0x2c3a('0x19'),'attributes':{'class':['ck',_0x2c3a('0x37'),_0x3daeef],'tabindex':'-1'},'children':[this['header'],{'tag':'div','attributes':{'class':['ck',_0x2c3a('0x1b')]},'children':[{'tag':_0x2c3a('0x19'),'attributes':{'class':[_0x499261['if'](_0x2c3a('0x0'),'ck-hidden',_0x8f99e4=>!_0x8f99e4)]},'children':[this[_0x2c3a('0x31')]]},this[_0x2c3a('0x27')],this[_0x2c3a('0x2a')],this[_0x2c3a('0x25')]]}]});}[_0x2c3a('0xd')](){super['render'](),this[_0x2c3a('0x3a')][_0x2c3a('0x22')](this[_0x2c3a('0x27')][_0x2c3a('0x21')]),this[_0x2c3a('0x3a')]['add'](this[_0x2c3a('0x27')][_0x2c3a('0x2e')][_0x2c3a('0x21')]),this[_0x2c3a('0x3a')][_0x2c3a('0x22')](this[_0x2c3a('0x2a')][_0x2c3a('0x21')]),this[_0x2c3a('0x3a')][_0x2c3a('0x22')](this[_0x2c3a('0x25')]['element']),this['keystrokes']['listenTo'](this['element']);}[_0x2c3a('0xb')](){this[_0x2c3a('0x42')][_0x2c3a('0x1c')]();}[_0x2c3a('0x1d')](){const _0x5d990d=this[_0x2c3a('0x26')],_0xba9f39=new _0x2d54b8(_0x5d990d,{'queryView':{'label':_0xc386e8(_0x5d990d,_0x2c3a('0x3f')),'creator':_0x55129a,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':_0xc386e8(_0x5d990d,_0x2c3a('0x35')),'secondary':_0xc386e8(_0x5d990d,_0x2c3a('0x20'))}}},'filteredView':this['_createHistoryView'](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0xba9f39['bind'](_0x2c3a('0x30'))['to'](this,'isEnabled',this,_0x2c3a('0xe'),(_0x239622,_0x5a97bb)=>_0x239622&&!_0x5a97bb),this[_0x2c3a('0x41')](_0xba9f39,_0x2c3a('0x24'),(_0x4b4ee2,_0x4ad695)=>{this[_0x2c3a('0x13')]=_0x4ad695,this[_0x2c3a('0x3b')](_0x2c3a('0x10'),this[_0x2c3a('0x13')]),_0x4ad695[_0x2c3a('0x16')]()&&this['_promptHistory'][_0x2c3a('0x22')]({'prompt':_0x4ad695['trim']()},0x0);},{'priority':'high'}),_0xba9f39;}[_0x2c3a('0x7')](){const _0x433a84=new _0x60b8c3(this[_0x2c3a('0x26')]);return _0x433a84['historyGroupView'][_0x2c3a('0x11')][_0x2c3a('0x17')](this[_0x2c3a('0x14')])['as'](_0x21a2e6),_0x433a84['on'](_0x2c3a('0xc'),()=>{this[_0x2c3a('0x14')][_0x2c3a('0x5')](),this[_0x2c3a('0x25')]['search'](''),this['promptView'][_0x2c3a('0xb')]();}),_0x433a84;}[_0x2c3a('0x1')](){const _0x13bf63=new _0x36e6aa(this[_0x2c3a('0x26')]);return _0x13bf63[_0x2c3a('0x2b')][_0x2c3a('0x33')](_0x2c3a('0x30'))['to'](this,_0x2c3a('0x30'),this,_0x2c3a('0xe'),this,_0x2c3a('0x2d'),(_0x531e90,_0x52ff92,_0x5ad3e8)=>_0x531e90&&!_0x52ff92&&!!_0x5ad3e8),_0x13bf63[_0x2c3a('0x2b')]['on'](_0x2c3a('0x6'),()=>{this[_0x2c3a('0x3b')](_0x2c3a('0x34'),this['value']);}),_0x13bf63[_0x2c3a('0x23')][_0x2c3a('0x33')](_0x2c3a('0x30'))['to'](this,_0x2c3a('0x30'),this,_0x2c3a('0xe'),this,_0x2c3a('0x2d'),(_0x1ee47e,_0x215607,_0x437184)=>_0x1ee47e&&!_0x215607&&!!_0x437184),_0x13bf63[_0x2c3a('0x23')]['on'](_0x2c3a('0x6'),()=>{this['fire']('insertContentBelow',this['value']);}),_0x13bf63[_0x2c3a('0x29')][_0x2c3a('0x33')](_0x2c3a('0x30'))['to'](this,_0x2c3a('0x30'),this,_0x2c3a('0xe'),(_0x569f0c,_0x1ec4f0)=>_0x569f0c&&!_0x1ec4f0),_0x13bf63[_0x2c3a('0x29')]['on'](_0x2c3a('0x6'),()=>{this[_0x2c3a('0x3b')](_0x2c3a('0x15'));}),_0x13bf63[_0x2c3a('0x1a')][_0x2c3a('0x33')](_0x2c3a('0x30'))['to'](this,'isProcessing'),_0x13bf63[_0x2c3a('0x1a')]['on']('execute',()=>{this[_0x2c3a('0x3b')](_0x2c3a('0x39'));}),_0x13bf63;}[_0x2c3a('0x4')](){this['value']='',this[_0x2c3a('0x0')]=!0x1,this[_0x2c3a('0xe')]=!0x0,this[_0x2c3a('0x27')][_0x2c3a('0x2')]=!0x0,this[_0x2c3a('0x2a')][_0x2c3a('0x2')]=!0x0,this[_0x2c3a('0x27')][_0x2c3a('0xb')]();}['finishProcessing'](){const _0x30e579=this['locale'];this[_0x2c3a('0xe')]=!0x1,this[_0x2c3a('0x13')]='',this['promptView']['reset'](),this[_0x2c3a('0x2d')]&&(this[_0x2c3a('0x25')][_0x2c3a('0x8')]['label']=_0xc386e8(_0x30e579,_0x2c3a('0x1f')));}[_0x2c3a('0x32')](_0x36306f){const _0x1cd1e6=this[_0x2c3a('0x26')];this[_0x2c3a('0x9')](),this[_0x2c3a('0x0')]=!0x0,this['errorView'][_0x2c3a('0x3c')]=_0x36306f||_0xc386e8(_0x1cd1e6,_0x2c3a('0xf')),this[_0x2c3a('0x2d')]||(this['contentArea'][_0x2c3a('0x2')]=!0x1);}}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @module ai/ui/aihistorylistitemview
|
|
7
|
-
*/
|
|
8
|
-
import { ListItemView } from 'ckeditor5/src/ui';
|
|
9
|
-
import type { PromptHistoryEntry } from './prompthistory';
|
|
10
|
-
/**
|
|
11
|
-
* A list item view that displays a historical prompt
|
|
12
|
-
*/
|
|
13
|
-
export default class AIHistoryListItemView extends ListItemView {
|
|
14
|
-
/**
|
|
15
|
-
* @inheritDoc
|
|
16
|
-
*/
|
|
17
|
-
constructor(promptHistoryEntry: PromptHistoryEntry);
|
|
18
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module ai/ui/aihistorylistitemview
|
|
7
|
+
*/
|
|
8
|
+
import { ListItemView } from 'ckeditor5/src/ui';
|
|
9
|
+
import type { PromptHistoryEntry } from './prompthistory';
|
|
10
|
+
/**
|
|
11
|
+
* A list item view that displays a historical prompt
|
|
12
|
+
*/
|
|
13
|
+
export default class AIHistoryListItemView extends ListItemView {
|
|
14
|
+
/**
|
|
15
|
+
* @inheritDoc
|
|
16
|
+
*/
|
|
17
|
+
constructor(promptHistoryEntry: PromptHistoryEntry);
|
|
18
|
+
}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x2709=['add','execute','prompt','locale','set','children'];(function(_0x50495a,_0x270962){const _0x1982eb=function(_0x17f496){while(--_0x17f496){_0x50495a['push'](_0x50495a['shift']());}};_0x1982eb(++_0x270962);}(_0x2709,0x1b5));const _0x1982=function(_0x50495a,_0x270962){_0x50495a=_0x50495a-0x0;let _0x1982eb=_0x2709[_0x50495a];return _0x1982eb;};import{ListItemView as _0x35e25a,ButtonView as _0x8bc712}from'ckeditor5/src/ui';import _0x567cdb from'../dropdown/buttonlabelwithhighlightview';import{unescape as _0x502257}from'lodash-es';export default class et extends _0x35e25a{constructor(_0x21d01f){super();const _0x344282=new _0x567cdb(),_0x40844b=new _0x8bc712(this[_0x1982('0x4')],_0x344282);this[_0x1982('0x0')][_0x1982('0x1')](_0x40844b),_0x40844b[_0x1982('0x5')]({'label':_0x21d01f[_0x1982('0x3')],'withText':!0x0}),_0x40844b['on'](_0x1982('0x2'),()=>{this['fire'](_0x1982('0x2'),{'value':_0x502257(_0x21d01f['prompt'])});});}}
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @module ai/ui/aihistorylistview
|
|
7
|
-
*/
|
|
8
|
-
import { ListView, ListItemGroupView, ButtonView, type FilteredView } from 'ckeditor5/src/ui';
|
|
9
|
-
import type { Locale } from 'ckeditor5/src/utils';
|
|
10
|
-
/**
|
|
11
|
-
* A list view that displays a list of AI prompts with filter pass-through.
|
|
12
|
-
*
|
|
13
|
-
* @private
|
|
14
|
-
*/
|
|
15
|
-
export default class AIHistoryListView extends ListView implements FilteredView {
|
|
16
|
-
historyGroupView: ListItemGroupView;
|
|
17
|
-
clearHistoryButton: ButtonView;
|
|
18
|
-
constructor(locale: Locale);
|
|
19
|
-
/**
|
|
20
|
-
* @inheritDoc
|
|
21
|
-
*/
|
|
22
|
-
filter(): {
|
|
23
|
-
resultsCount: number;
|
|
24
|
-
totalItemsCount: number;
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Fired when the clear history button was executed by the user.
|
|
29
|
-
*
|
|
30
|
-
* @eventName ~AIHistoryListView#clearHistory
|
|
31
|
-
*/
|
|
32
|
-
export type AIHistoryListViewClearHistoryEvent = {
|
|
33
|
-
name: 'clearHistory';
|
|
34
|
-
args: [];
|
|
35
|
-
};
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module ai/ui/aihistorylistview
|
|
7
|
+
*/
|
|
8
|
+
import { ListView, ListItemGroupView, ButtonView, type FilteredView } from 'ckeditor5/src/ui';
|
|
9
|
+
import type { Locale } from 'ckeditor5/src/utils';
|
|
10
|
+
/**
|
|
11
|
+
* A list view that displays a list of AI prompts with filter pass-through.
|
|
12
|
+
*
|
|
13
|
+
* @private
|
|
14
|
+
*/
|
|
15
|
+
export default class AIHistoryListView extends ListView implements FilteredView {
|
|
16
|
+
historyGroupView: ListItemGroupView;
|
|
17
|
+
clearHistoryButton: ButtonView;
|
|
18
|
+
constructor(locale: Locale);
|
|
19
|
+
/**
|
|
20
|
+
* @inheritDoc
|
|
21
|
+
*/
|
|
22
|
+
filter(): {
|
|
23
|
+
resultsCount: number;
|
|
24
|
+
totalItemsCount: number;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Fired when the clear history button was executed by the user.
|
|
29
|
+
*
|
|
30
|
+
* @eventName ~AIHistoryListView#clearHistory
|
|
31
|
+
*/
|
|
32
|
+
export type AIHistoryListViewClearHistoryEvent = {
|
|
33
|
+
name: 'clearHistory';
|
|
34
|
+
args: [];
|
|
35
|
+
};
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{ListView as
|
|
23
|
+
const _0x1f85=['filter','locale','label','items','delegate','children','execute','fire','Clear','set','_createClearHistoryButton','historyGroupView','clearHistoryButton','Prompt\x20history','add','length','clearHistory'];(function(_0x15144d,_0x1f8511){const _0x4dcf81=function(_0x1effcf){while(--_0x1effcf){_0x15144d['push'](_0x15144d['shift']());}};_0x4dcf81(++_0x1f8511);}(_0x1f85,0xbc));const _0x4dcf=function(_0x15144d,_0x1f8511){_0x15144d=_0x15144d-0x0;let _0x4dcf81=_0x1f85[_0x15144d];return _0x4dcf81;};import{ListView as _0x3279da,ListItemGroupView as _0x6dc875,ButtonView as _0x58d7b3}from'ckeditor5/src/ui';import{getTranslation as _0x57f81d}from'../../utils/common-translations';export default class st extends _0x3279da{constructor(_0x4a65e3){super(_0x4a65e3),this[_0x4dcf('0xb')]=this[_0x4dcf('0x9')](),this[_0x4dcf('0xa')]=new _0x6dc875(),this[_0x4dcf('0xa')][_0x4dcf('0x4')][_0x4dcf('0xd')](this[_0x4dcf('0xb')],0x1),this[_0x4dcf('0xa')][_0x4dcf('0x1')]=_0x57f81d(_0x4a65e3,_0x4dcf('0xc')),this[_0x4dcf('0xa')]['items'][_0x4dcf('0x3')](_0x4dcf('0x5'))['to'](this),this[_0x4dcf('0x2')]['add'](this[_0x4dcf('0xa')]);}[_0x4dcf('0x10')](){let _0x305117=0x0;for(const _0x24cd1e of this[_0x4dcf('0x2')])_0x305117+=_0x24cd1e[_0x4dcf('0x2')][_0x4dcf('0xe')];return{'resultsCount':_0x305117,'totalItemsCount':_0x305117};}['_createClearHistoryButton'](){const _0x1aaf52=this[_0x4dcf('0x0')],_0x379f8c=new _0x58d7b3(this[_0x4dcf('0x0')]);return _0x379f8c[_0x4dcf('0x8')]({'label':'('+_0x57f81d(_0x1aaf52,_0x4dcf('0x7'))+')','withText':!0x0}),_0x379f8c['on'](_0x4dcf('0x5'),()=>this[_0x4dcf('0x6')](_0x4dcf('0xf'))),_0x379f8c;}}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
import { Collection } from 'ckeditor5/src/utils';
|
|
6
|
-
/**
|
|
7
|
-
* A collection that stores the prompt history in the session storage as a side effect.
|
|
8
|
-
*/
|
|
9
|
-
export default class PromptHistory extends Collection<PromptHistoryEntry> {
|
|
10
|
-
/**
|
|
11
|
-
* @inheritDoc
|
|
12
|
-
*/
|
|
13
|
-
constructor();
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* An object that represents a historical prompt.
|
|
17
|
-
*/
|
|
18
|
-
export type PromptHistoryEntry = {
|
|
19
|
-
prompt: string;
|
|
20
|
-
};
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
import { Collection } from 'ckeditor5/src/utils';
|
|
6
|
+
/**
|
|
7
|
+
* A collection that stores the prompt history in the session storage as a side effect.
|
|
8
|
+
*/
|
|
9
|
+
export default class PromptHistory extends Collection<PromptHistoryEntry> {
|
|
10
|
+
/**
|
|
11
|
+
* @inheritDoc
|
|
12
|
+
*/
|
|
13
|
+
constructor();
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* An object that represents a historical prompt.
|
|
17
|
+
*/
|
|
18
|
+
export type PromptHistoryEntry = {
|
|
19
|
+
prompt: string;
|
|
20
|
+
};
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x20eb=['CKEditor/AIFormView/PromptHistory','trim','prompt','getItem','setItem','parse','remove','last','addMany','_saveToSessionStorage','map','add','_loadFromSessionStorage'];(function(_0x515ea8,_0x20eb5c){const _0x575c3d=function(_0x324e74){while(--_0x324e74){_0x515ea8['push'](_0x515ea8['shift']());}};_0x575c3d(++_0x20eb5c);}(_0x20eb,0x1ba));const _0x575c=function(_0x515ea8,_0x20eb5c){_0x515ea8=_0x515ea8-0x0;let _0x575c3d=_0x20eb[_0x515ea8];return _0x575c3d;};import{Collection as _0x4e31d3}from'ckeditor5/src/utils';const ts=_0x575c('0x0');export default class rt extends _0x4e31d3{constructor(){super(),this[_0x575c('0xc')](),this['on'](_0x575c('0xb'),(_0x35ac10,_0x44a3ff)=>{const _0x839757=os(_0x44a3ff[_0x575c('0x2')]);for(const _0x216331 of this)if(_0x216331!=_0x44a3ff&&os(_0x216331[_0x575c('0x2')])===_0x839757){this['remove'](_0x216331);break;}this['length']>0x14&&this[_0x575c('0x6')](this[_0x575c('0x7')]),this[_0x575c('0x9')]();}),this['on']('remove',()=>{this[_0x575c('0x9')]();});}[_0x575c('0xc')](){const _0x4d4bcf=sessionStorage[_0x575c('0x3')](ts)||'[]';this[_0x575c('0x8')](JSON[_0x575c('0x5')](_0x4d4bcf));}['_saveToSessionStorage'](){sessionStorage[_0x575c('0x4')](ts,JSON['stringify'](this[_0x575c('0xa')](_0x5eb5c9=>_0x5eb5c9)));}}function os(_0x322da0){return _0x322da0['toLowerCase']()[_0x575c('0x1')]();}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @module ai/ui/showaiassistantcommand
|
|
7
|
-
* @publicApi
|
|
8
|
-
*/
|
|
9
|
-
import { Command } from 'ckeditor5/src/core';
|
|
10
|
-
/**
|
|
11
|
-
*
|
|
12
|
-
*/
|
|
13
|
-
export default class ShowAIAssistantCommand extends Command {
|
|
14
|
-
/**
|
|
15
|
-
* @inheritDoc
|
|
16
|
-
*/
|
|
17
|
-
refresh(): void;
|
|
18
|
-
/**
|
|
19
|
-
* Opens AI
|
|
20
|
-
*
|
|
21
|
-
* @
|
|
22
|
-
* @
|
|
23
|
-
* @fires execute
|
|
24
|
-
*/
|
|
25
|
-
execute(prompt?: string, label?: string): void;
|
|
26
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module ai/ui/showaiassistantcommand
|
|
7
|
+
* @publicApi
|
|
8
|
+
*/
|
|
9
|
+
import { Command } from 'ckeditor5/src/core';
|
|
10
|
+
/**
|
|
11
|
+
* Command that shows the AI Assistant user interface.
|
|
12
|
+
*/
|
|
13
|
+
export default class ShowAIAssistantCommand extends Command {
|
|
14
|
+
/**
|
|
15
|
+
* @inheritDoc
|
|
16
|
+
*/
|
|
17
|
+
refresh(): void;
|
|
18
|
+
/**
|
|
19
|
+
* Opens AI Assistant user interface for the current document selection.
|
|
20
|
+
*
|
|
21
|
+
* @param prompt The initial prompt. If set, the AI assistant will automatically submit given prompt to the AI service.
|
|
22
|
+
* @param label Label to be displayed in the AI assistant query input field while the AI assistant processes the initial prompt.
|
|
23
|
+
* @fires execute
|
|
24
|
+
*/
|
|
25
|
+
execute(prompt?: string, label?: string): void;
|
|
26
|
+
}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x5be9=['selection','execute','isEnabled','getRanges','plugins','editor','get','getItems','name','model','includes','showUI','element','refresh'];(function(_0x3b8c6f,_0x5be972){const _0x4ae474=function(_0x1c8ab8){while(--_0x1c8ab8){_0x3b8c6f['push'](_0x3b8c6f['shift']());}};_0x4ae474(++_0x5be972);}(_0x5be9,0x15e));const _0x4ae4=function(_0x3b8c6f,_0x5be972){_0x3b8c6f=_0x3b8c6f-0x0;let _0x4ae474=_0x5be9[_0x3b8c6f];return _0x4ae474;};import{Command as _0x5696cd}from'ckeditor5/src/core';import _0x4baeb8 from'../aiassistantui';export default class A extends _0x5696cd{[_0x4ae4('0xd')](){const _0x3f2962=this['editor'][_0x4ae4('0x9')]['document'][_0x4ae4('0x0')],_0x19b897=this['editor']['config'][_0x4ae4('0x6')]('aiAssistant.disabledElements');for(const _0x1a2185 of _0x3f2962[_0x4ae4('0x3')]())for(const _0x409131 of _0x1a2185[_0x4ae4('0x7')]())if(_0x409131['is'](_0x4ae4('0xc'))&&_0x19b897[_0x4ae4('0xa')](_0x409131[_0x4ae4('0x8')]))return void(this[_0x4ae4('0x2')]=!0x1);this[_0x4ae4('0x2')]=!0x0;}[_0x4ae4('0x1')](_0x219880='',_0x2e174e=''){this[_0x4ae4('0x5')][_0x4ae4('0x4')][_0x4ae4('0x6')](_0x4baeb8)[_0x4ae4('0xb')](_0x219880,_0x2e174e,this['editor'][_0x4ae4('0x9')]['document']['selection']);}}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module ai/utils/common-translations
|
|
7
|
+
*/
|
|
8
|
+
import type { Locale } from 'ckeditor5/src/utils';
|
|
9
|
+
export declare function getTranslation(locale: Locale, id: string, values?: string | Array<string> | number): string;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2023, 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
|
+
export function getTranslation(_0x3d8e36,_0x3cb3a2,_0x5fe0cd){const t=_0x3d8e36['t'];switch(_0x3cb3a2){case'Edit\x20or\x20review':return t('Edit\x20or\x20review');case'Improve\x20writing':return t('Improve\x20writing');case'Make\x20shorter':return t('Make\x20shorter');case'Make\x20longer':return t('Make\x20longer');case'Simplify\x20language':return t('Simplify\x20language');case'Generate\x20from\x20selection':return t('Generate\x20from\x20selection');case'Summarize':return t('Summarize');case'Continue':return t('Continue');case'Change\x20tone':return t('Change\x20tone');case'Professional':return t('Professional');case'Casual':return t('Casual');case'Direct':return t('Direct');case'Confident':return t('Confident');case'Friendly':return t('Friendly');case'Change\x20style':return t('Change\x20style');case'Business':return t('Business');case'Legal':return t('Legal');case'Journalism':return t('Journalism');case'Poetic':return t('Poetic');case'Translate':return t('Translate');case'Translate\x20to\x20%0':return t('Translate\x20to\x20%0',_0x5fe0cd);case'English':return t('English');case'Spanish':return t('Spanish');case'German':return t('German');case'Portuguese':return t('Portuguese');case'French':return t('French');case'Simplified\x20Chinese':return t('Simplified\x20Chinese');case'Hindi':return t('Hindi');case'Arabic':return t('Arabic');case'AI\x20Assistant':return t('AI\x20Assistant');case'AI\x20Commands':return t('AI\x20Commands');case'Ask\x20AI\x20to\x20edit\x20or\x20generate':return t('Ask\x20AI\x20to\x20edit\x20or\x20generate');case'Ask\x20AI\x20to\x20improve\x20generated\x20text':return t('Ask\x20AI\x20to\x20improve\x20generated\x20text');case'Copy':return t('Copy');case'Submit':return t('Submit');case'Insert\x20below':return t('Insert\x20below');case'Try\x20again':return t('Try\x20again');case'Stop':return t('Stop');case'AI\x20is\x20writing...':return t('AI\x20is\x20writing...');case'History':return t('History');case'Empty\x20history':return t('Empty\x20history');case'Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.':return t('Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.');case'Prompt\x20history':return t('Prompt\x20history');case'Search\x20AI\x20command':return t('Search\x20AI\x20command');case'No\x20commands\x20found':return t('No\x20commands\x20found');case'No\x20commands\x20available':return t('No\x20commands\x20available');case'Clear':return t('Clear');case'AI_REPLACE_CONTENT':return t({'id':'AI_REPLACE_CONTENT','string':'Replace'});case'AI_ERROR_AUTH_REQUEST':return t({'id':'AI_ERROR_AUTH_REQUEST','string':'Authorization\x20request\x20failed'});case'AI_ERROR_CONTEXT_LENGTH':return t({'id':'AI_ERROR_CONTEXT_LENGTH','string':'Selected\x20content\x20is\x20too\x20long'});case'AI_ERROR_MODERATION':return t({'id':'AI_ERROR_MODERATION','string':'Requested\x20query\x20does\x20not\x20pass\x20moderation\x20rules'});case'AI_ERROR_FAILED':return t({'id':'AI_ERROR_FAILED','string':'Failed\x20to\x20communicate\x20with\x20the\x20AI\x20service'});default:return'';}}
|
package/theme/ai-dropdown.css
CHANGED
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
|
|
29
29
|
& > .ck-search__results {
|
|
30
30
|
border-top: 1px solid var(--ck-color-base-border);
|
|
31
|
-
}
|
|
32
31
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
& > .ck-list {
|
|
33
|
+
max-height: var(--ck-ai-dropdown-view-list-max-height);
|
|
34
|
+
overflow: auto;
|
|
35
|
+
}
|
|
36
36
|
}
|
|
37
37
|
}
|
package/theme/ai-form.css
CHANGED
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
--ck-ai-form-error-background: hsl(0, 100%, 90%);
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
/* Note: This class name is mentioned in the guide and acts like a public API. */
|
|
23
24
|
.ck .ck-ai-form {
|
|
24
25
|
width: var(--ck-ai-form-view-width);
|
|
25
26
|
|
|
@@ -58,6 +59,7 @@
|
|
|
58
59
|
background-color: var(--ck-color-input-disabled-background);
|
|
59
60
|
}
|
|
60
61
|
|
|
62
|
+
/* Note: This class name is mentioned in the guide and acts like a public API */
|
|
61
63
|
& .ck-ai-form__content-field {
|
|
62
64
|
width: 100%;
|
|
63
65
|
white-space: normal;
|
package/theme/ai.css
CHANGED
|
@@ -8,12 +8,9 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/*
|
|
11
|
-
* These definitions bring violet accents across the AI UI.
|
|
12
|
-
* You can get rid of them by removing the .ck-ai-theme_violet from UI components in DOM.
|
|
11
|
+
* These definitions bring violet accents (tint) across the AI UI.
|
|
13
12
|
*/
|
|
14
|
-
.ck-ai-
|
|
15
|
-
.ck-ai-commands-dropdown.ck-ai-theme_violet,
|
|
16
|
-
.ck-ai-assistant-button.ck-ai-theme_violet {
|
|
13
|
+
.ck-ai-assistant-ui {
|
|
17
14
|
--ck-color-button-default-hover-background: hsl(262.1,100%,96.3%);
|
|
18
15
|
--ck-color-button-default-active-background: hsl(262.1,100%,96.3%);
|
|
19
16
|
|
|
@@ -33,25 +30,28 @@
|
|
|
33
30
|
--ck-ai-form-content-background: hsl(0,0%,97.6%);
|
|
34
31
|
|
|
35
32
|
& .ck-ai-form__submit {
|
|
36
|
-
border-color:
|
|
37
|
-
color:
|
|
33
|
+
border-color: var(--ck-color-button-action-background);
|
|
34
|
+
color: var(--ck-color-button-action-background);
|
|
38
35
|
|
|
39
36
|
&.ck-disabled {
|
|
40
|
-
border-color:
|
|
37
|
+
border-color: var(--ck-color-button-action-disabled-background);
|
|
41
38
|
}
|
|
42
39
|
}
|
|
43
|
-
}
|
|
44
40
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
41
|
+
&.ck-ai-commands-dropdown > .ck-button:hover,
|
|
42
|
+
&.ck-ai-assistant-button:hover {
|
|
43
|
+
color: var(--ck-color-button-on-color);
|
|
44
|
+
}
|
|
48
45
|
}
|
|
49
46
|
|
|
47
|
+
|
|
50
48
|
/*
|
|
51
49
|
* Classes used by the "fake visual selection" displayed in the content when an input
|
|
52
50
|
* in the AI UI has focus (the browser does not render the native selection in this state).
|
|
51
|
+
*
|
|
52
|
+
* Narrow down to <span> to prevent changing background for widgets and nested editables.
|
|
53
53
|
*/
|
|
54
|
-
.ck .ck-fake-ai-selection {
|
|
54
|
+
.ck span.ck-fake-ai-selection {
|
|
55
55
|
background: var(--ck-color-link-fake-selection);
|
|
56
56
|
}
|
|
57
57
|
|
|
@@ -66,6 +66,8 @@
|
|
|
66
66
|
/*
|
|
67
67
|
* Styles of the AI response field. The margins, font sizes and line-heights have been reduced
|
|
68
68
|
* to save space.
|
|
69
|
+
*
|
|
70
|
+
* Note: This class name is mentioned in the guide and acts like a public API.
|
|
69
71
|
*/
|
|
70
72
|
.ck.ck-content.ck-ai-form__content-field {
|
|
71
73
|
& h2 {
|
package/theme/icons/error.svg
CHANGED
|
@@ -1,3 +1 @@
|
|
|
1
|
-
<svg
|
|
2
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.4607 4.82501C9.92258 4.02501 11.0773 4.02501 11.5392 4.82501L16.8219 13.975C17.2838 14.775 16.7064 15.775 15.7827 15.775H5.21717C4.29341 15.775 3.71606 14.775 4.17794 13.975L9.4607 4.82501ZM9.76538 8.02501C9.76538 7.85932 9.8997 7.72501 10.0654 7.72501H10.9654C11.1311 7.72501 11.2654 7.85932 11.2654 8.02501V11.425C11.2654 11.5907 11.1311 11.725 10.9654 11.725H10.0654C9.8997 11.725 9.76538 11.5907 9.76538 11.425V8.02501ZM10.0654 12.725C9.8997 12.725 9.76538 12.8593 9.76538 13.025V13.925C9.76538 14.0907 9.8997 14.225 10.0654 14.225H10.9654C11.1311 14.225 11.2654 14.0907 11.2654 13.925V13.025C11.2654 12.8593 11.1311 12.725 10.9654 12.725H10.0654Z" />
|
|
3
|
-
</svg>
|
|
1
|
+
<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M9.9 4.385a1.2 1.2 0 0 0-.44.44h.002l-5.284 9.15a1.2 1.2 0 0 0 1.04 1.8h10.564a1.2 1.2 0 0 0 1.04-1.8l-5.282-9.15a1.2 1.2 0 0 0-1.64-.44Zm.05 8.363a.301.301 0 0 1 .115-.023h.9a.301.301 0 0 1 .3.3v.9a.3.3 0 0 1-.3.3h-.9a.3.3 0 0 1-.3-.3v-.9a.3.3 0 0 1 .185-.277Zm-.185-4.723a.3.3 0 0 1 .3-.3h.9a.3.3 0 0 1 .3.3v3.4a.3.3 0 0 1-.3.3h-.9a.301.301 0 0 1-.3-.3v-3.4Z"/></svg>
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
<svg
|
|
2
|
-
<path d="M15.3459 9.42231C15.3946 9.29064 15.5809 9.29064 15.6296 9.42231L16.1785 10.9056C16.1938 10.947 16.2264 10.9797 16.2678 10.995L17.7512 11.5439C17.8828 11.5926 17.8828 11.7788 17.7512 11.8276L16.2678 12.3764C16.2264 12.3918 16.1938 12.4244 16.1785 12.4658L15.6296 13.9491C15.5809 14.0808 15.3946 14.0808 15.3459 13.9491L14.797 12.4658C14.7817 12.4244 14.7491 12.3918 14.7077 12.3764L13.2243 11.8276C13.0927 11.7788 13.0927 11.5926 13.2243 11.5439L14.7077 10.995C14.7491 10.9797 14.7817 10.947 14.797 10.9056L15.3459 9.42231Z" />
|
|
3
|
-
<path d="M16.306 1.74168C16.3547 1.61001 16.541 1.61001 16.5897 1.74168L17.1386 3.22501C17.1539 3.26641 17.1865 3.29905 17.2279 3.31436L18.7112 3.86325C18.8429 3.91197 18.8429 4.09821 18.7112 4.14693L17.2279 4.69581C17.1865 4.71113 17.1539 4.74377 17.1386 4.78517L16.5897 6.26849C16.541 6.40017 16.3547 6.40017 16.306 6.26849L15.7571 4.78517C15.7418 4.74377 15.7092 4.71113 15.6678 4.69581L14.1844 4.14693C14.0528 4.09821 14.0528 3.91197 14.1844 3.86325L15.6678 3.31436C15.7092 3.29905 15.7418 3.26641 15.7571 3.22501L16.306 1.74168Z" />
|
|
4
|
-
<path d="M7.66528 1.74168C7.714 1.61001 7.90024 1.61001 7.94896 1.74168L8.49784 3.22501C8.51316 3.26641 8.5458 3.29905 8.5872 3.31436L10.0705 3.86325C10.2022 3.91197 10.2022 4.09821 10.0705 4.14693L8.5872 4.69581C8.5458 4.71113 8.51316 4.74377 8.49784 4.78517L7.94896 6.26849C7.90024 6.40017 7.714 6.40017 7.66528 6.26849L7.1164 4.78517C7.10108 4.74377 7.06844 4.71113 7.02704 4.69581L5.54371 4.14693C5.41204 4.09821 5.41204 3.91197 5.54371 3.86325L7.02704 3.31436C7.06844 3.29905 7.10108 3.26641 7.1164 3.22501L7.66528 1.74168Z" />
|
|
5
|
-
<path d="M14.7196 7.94607C14.7981 7.86827 14.8606 7.77595 14.9036 7.67442C14.9466 7.5729 14.9691 7.46418 14.97 7.35455C14.9709 7.24493 14.95 7.13656 14.9087 7.0357C14.8673 6.93484 14.8062 6.8435 14.729 6.76694L12.786 4.82855C12.7095 4.7513 12.6181 4.69023 12.5173 4.64886C12.4164 4.60749 12.308 4.58663 12.1984 4.5875C12.0888 4.58837 11.9801 4.61095 11.8785 4.65392C11.777 4.6969 11.6847 4.75943 11.6069 4.8379L10.0621 6.37704L13.1771 9.49197L14.7185 7.94607L14.7196 7.94607Z" />
|
|
6
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M1.4712 14.9565C1.09626 15.3314 1.09626 15.9393 1.4712 16.3142L3.23481 18.0778C3.60975 18.4528 4.21764 18.4528 4.59257 18.0778L12.4269 10.2435L9.30551 7.12216L1.4712 14.9565ZM10.4099 10.2455L9.28888 9.12449L2.80995 15.6034L3.93096 16.7244L10.4099 10.2455Z" />
|
|
7
|
-
</svg>
|
|
1
|
+
<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M15.346 9.422a.151.151 0 0 1 .284 0l.548 1.484a.152.152 0 0 0 .09.089l1.483.549a.151.151 0 0 1 0 .284l-1.483.548a.151.151 0 0 0-.09.09l-.548 1.483a.152.152 0 0 1-.142.1.151.151 0 0 1-.142-.1l-.549-1.483a.15.15 0 0 0-.09-.09l-1.483-.548a.15.15 0 0 1 0-.284l1.484-.549a.152.152 0 0 0 .089-.09l.549-1.483Z"/><path d="M16.306 1.742a.151.151 0 0 1 .284 0l.549 1.483a.15.15 0 0 0 .089.09l1.483.548a.151.151 0 0 1 .072.229.151.151 0 0 1-.072.055l-1.483.549a.15.15 0 0 0-.09.09l-.548 1.482a.151.151 0 0 1-.284 0l-.549-1.483a.15.15 0 0 0-.09-.09l-1.483-.548a.151.151 0 0 1 0-.284l1.484-.549a.152.152 0 0 0 .09-.089l.548-1.483Z"/><path d="M7.665 1.742a.151.151 0 0 1 .284 0l.549 1.483a.151.151 0 0 0 .09.09l1.482.548a.151.151 0 0 1 .072.229.151.151 0 0 1-.072.055l-1.483.549a.151.151 0 0 0-.09.09L7.95 6.267a.151.151 0 0 1-.284 0l-.549-1.483a.151.151 0 0 0-.089-.09l-1.483-.548a.151.151 0 0 1 0-.284l1.483-.549a.151.151 0 0 0 .09-.089l.548-1.483-.001.001Z"/><path d="M14.72 7.946a.848.848 0 0 0 .25-.591.824.824 0 0 0-.241-.588l-1.943-1.938a.812.812 0 0 0-.588-.241.838.838 0 0 0-.591.25l-1.545 1.539 3.115 3.115 1.542-1.546h.001Z"/><path clip-rule="evenodd" d="M1.19 15.636a.96.96 0 0 1 .281-.679l7.835-7.834 3.121 3.12-7.834 7.835a.959.959 0 0 1-1.358 0l-1.764-1.764a.96.96 0 0 1-.28-.678Zm9.22-5.391-1.121-1.12-6.479 6.478 1.121 1.121 6.479-6.479Z"/></svg>
|
|
@@ -1,9 +1 @@
|
|
|
1
|
-
<svg
|
|
2
|
-
<path d="M9.60909 2.65998C10.0294 2.41684 10.3122 1.9624 10.3122 1.44191C10.3122 0.665287 9.68256 0.0357056 8.90598 0.0357056C8.12941 0.0357056 7.49977 0.665287 7.49977 1.44191C7.49977 1.9624 7.78255 2.41684 8.20288 2.65998V3.55123H3.28115C2.11618 3.55123 1.17184 4.4956 1.17184 5.66054V15.9727C1.17184 17.1377 2.11618 18.082 3.28115 18.082H8.96467L8.91065 16.9254L9.09039 16.6758H3.28115C2.89287 16.6758 2.57805 16.361 2.57805 15.9727V5.66054C2.57805 5.27222 2.89287 4.95743 3.28115 4.95743H14.5308C14.9191 4.95743 15.2339 5.27222 15.2339 5.66054V8.14542L15.5918 7.64846C15.8698 7.26252 16.2359 6.97909 16.6401 6.80711V5.66054C16.6401 4.4956 15.6958 3.55123 14.5308 3.55123H9.60909V2.65998Z" />
|
|
3
|
-
<path d="M5.62483 10.8166C6.14255 10.8166 6.5623 10.1871 6.5623 9.41043C6.5623 8.6338 6.14255 8.00422 5.62483 8.00422C5.10712 8.00422 4.68736 8.6338 4.68736 9.41043C4.68736 10.1871 5.10712 10.8166 5.62483 10.8166Z" />
|
|
4
|
-
<path d="M13.1246 9.41043C13.1246 10.1871 12.7048 10.8166 12.1871 10.8166C11.6694 10.8166 11.2497 10.1871 11.2497 9.41043C11.2497 8.6338 11.6694 8.00422 12.1871 8.00422C12.7048 8.00422 13.1246 8.6338 13.1246 9.41043Z" />
|
|
5
|
-
<path d="M0.937472 8.00422C0.419757 8.00422 0 8.42394 0 8.94169V10.8166C0 11.3344 0.419757 11.7541 0.937472 11.7541V8.00422Z" />
|
|
6
|
-
<path d="M6.1283 12.5093C6.48784 12.2696 6.97361 12.3668 7.2133 12.7263C7.48481 13.1336 8.11961 13.4326 8.90598 13.4326C9.69235 13.4326 10.3272 13.1336 10.5987 12.7263C10.8384 12.3668 11.3241 12.2696 11.6837 12.5093C12.0432 12.749 12.1403 13.2348 11.9007 13.5943C11.2347 14.5933 9.99456 14.9974 8.90598 14.9974C7.8174 14.9974 6.57727 14.5933 5.9113 13.5943C5.67161 13.2348 5.76876 12.749 6.1283 12.5093Z" />
|
|
7
|
-
<path d="M16.9868 8.91014L16.3646 9.77394L19.2439 11.8479L19.8661 10.9841C20.0952 10.666 20.0231 10.2225 19.705 9.99342L17.9774 8.74907C17.6594 8.51998 17.2159 8.5921 16.9868 8.91014Z" />
|
|
8
|
-
<path d="M11.6347 19.9512C11.4211 20.0106 11.2059 19.8618 11.1861 19.641L10.9724 17.2602L15.9498 10.3498L18.8291 12.4237L13.8517 19.3341L11.6347 19.9512Z" />
|
|
9
|
-
</svg>
|
|
1
|
+
<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M9.61 2.66a1.406 1.406 0 1 0-1.407 0v.891H3.28a2.11 2.11 0 0 0-2.11 2.11v10.312a2.11 2.11 0 0 0 2.11 2.109h5.684l-.054-1.157.18-.25H3.28a.703.703 0 0 1-.703-.702V5.66c0-.389.315-.704.703-.704h11.25c.388 0 .703.315.703.704v2.484l.358-.497a2.492 2.492 0 0 1 1.048-.84V5.66a2.11 2.11 0 0 0-2.11-2.11H9.61v-.89Z"/><path d="M5.625 10.817c.518 0 .937-.63.937-1.407 0-.776-.42-1.406-.937-1.406-.518 0-.938.63-.938 1.406 0 .777.42 1.407.938 1.407Z"/><path d="M13.125 9.41c0 .777-.42 1.407-.938 1.407s-.937-.63-.937-1.407c0-.776.42-1.406.937-1.406.518 0 .938.63.938 1.406Z"/><path d="M.937 8.004A.937.937 0 0 0 0 8.942v1.875c0 .517.42.937.937.937v-3.75Z"/><path d="M6.128 12.51a.782.782 0 0 1 1.085.216c.272.408.907.707 1.693.707s1.421-.3 1.693-.707a.782.782 0 0 1 1.302.868c-.666 1-1.906 1.403-2.995 1.403-1.089 0-2.329-.404-2.995-1.403a.782.782 0 0 1 .217-1.085Z"/><path d="m16.987 8.91-.622.864 2.879 2.074.622-.864a.71.71 0 0 0-.161-.99l-1.728-1.245a.71.71 0 0 0-.99.161Z"/><path d="M11.635 19.951a.355.355 0 0 1-.449-.31l-.214-2.38 4.978-6.911 2.88 2.074-4.978 6.91-2.217.617Z"/></svg>
|
package/theme/icons/submit.svg
CHANGED
|
@@ -1,3 +1 @@
|
|
|
1
|
-
<svg
|
|
2
|
-
<path d="M15.875 4.41895C15.875 4.00473 15.5392 3.66895 15.125 3.66895C14.7108 3.66895 14.375 4.00473 14.375 4.41895V11.6689L6.81789 11.6682L9.14889 9.71422C9.30139 9.58638 9.39686 9.4032 9.41431 9.20498C9.43175 9.00675 9.36973 8.80972 9.24189 8.65722C9.11406 8.50472 8.93088 8.40925 8.73266 8.39181C8.53443 8.37436 8.33739 8.43638 8.18489 8.56422L4.39289 11.7462C4.25851 11.859 4.16791 12.0153 4.13685 12.1879C4.10579 12.3606 4.13624 12.5387 4.22289 12.6912C4.26918 12.8013 4.3412 12.8987 4.43289 12.9752L8.22089 16.1552C8.37326 16.2832 8.57022 16.3454 8.76845 16.3281C8.96667 16.3109 9.14993 16.2156 9.27789 16.0632C9.40586 15.9109 9.46806 15.7139 9.45081 15.5157C9.43355 15.3174 9.33826 15.1342 9.18589 15.0062L6.99689 13.1692L14.625 13.1689C15.3154 13.1689 15.875 12.6093 15.875 11.9189V4.41895Z"/>
|
|
3
|
-
</svg>
|
|
1
|
+
<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M15.875 4.419a.75.75 0 0 0-1.5 0v7.25H6.818l2.33-1.955a.75.75 0 0 0-.963-1.15l-3.792 3.182a.75.75 0 0 0-.17.945c.046.11.118.208.21.284l3.788 3.18a.75.75 0 1 0 .965-1.149l-2.19-1.837h7.629c.69 0 1.25-.56 1.25-1.25v-7.5Z"/></svg>
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @module ai/ui/aiformtextareaview
|
|
7
|
-
*/
|
|
8
|
-
import type { Locale } from 'ckeditor5/src/utils';
|
|
9
|
-
import { LabeledFieldView, ButtonView, type TextareaView } from 'ckeditor5/src/ui';
|
|
10
|
-
/**
|
|
11
|
-
* A textarea field allowing to ask AI.
|
|
12
|
-
*
|
|
13
|
-
* @private
|
|
14
|
-
*/
|
|
15
|
-
export default class AIFormTextareaView extends LabeledFieldView<TextareaView> {
|
|
16
|
-
/**
|
|
17
|
-
* The submit button view.
|
|
18
|
-
*/
|
|
19
|
-
submitButtonView: ButtonView;
|
|
20
|
-
/**
|
|
21
|
-
* Creates `AIFormTextareaView`.
|
|
22
|
-
*
|
|
23
|
-
* @param locale The localization services instance.
|
|
24
|
-
* @param value Initial textarea state.
|
|
25
|
-
*/
|
|
26
|
-
constructor(locale: Locale, value: string);
|
|
27
|
-
/**
|
|
28
|
-
* Resets the textarea value.
|
|
29
|
-
*/
|
|
30
|
-
reset(): void;
|
|
31
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2003-2023, 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{LabeledFieldView as _0x4c7768,createLabeledTextarea as _0x145b9d,ButtonView as _0x95010d}from'ckeditor5/src/ui';import _0x449e78 from'../../../theme/icons/submit.svg';export default class Q extends _0x4c7768{constructor(_0x4452ce,_0x34b3fa){super(_0x4452ce,_0x145b9d);const {t:t}=_0x4452ce;this['label']=t('Ask\x20AI'),this['fieldView']['value']=_0x34b3fa,this['submitButtonView']=this['_createSubmitButton'](),this['fieldWrapperChildren']['add'](this['submitButtonView']);}['reset'](){this['fieldView']['reset']();}['_createSubmitButton'](){const _0x4eee33=new _0x95010d(this['locale']),t=this['locale']['t'];return _0x4eee33['set']({'icon':_0x449e78,'label':t('Submit'),'isVisible':!0x0,'tooltip':!0x0}),_0x4eee33['on']('execute',()=>{this['fire']('submit',this['fieldView']['element']['value']);}),_0x4eee33['bind']('isEnabled')['to'](this['fieldView'],'isEmpty',this,'isEnabled',(_0x57480b,_0x32fb33)=>!_0x57480b&&_0x32fb33),_0x4eee33;}}
|