@ckeditor/ckeditor5-ai 0.0.0-internal-20241017.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/CHANGELOG.md +4 -0
- package/LICENSE.md +26 -0
- package/README.md +38 -0
- package/build/ai.js +5 -0
- package/build/translations/af.js +1 -0
- package/build/translations/ar.js +1 -0
- package/build/translations/bg.js +1 -0
- package/build/translations/bn.js +1 -0
- package/build/translations/bs.js +1 -0
- package/build/translations/ca.js +1 -0
- package/build/translations/cs.js +1 -0
- package/build/translations/da.js +1 -0
- package/build/translations/de-ch.js +1 -0
- package/build/translations/de.js +1 -0
- package/build/translations/el.js +1 -0
- package/build/translations/en-au.js +1 -0
- package/build/translations/es-co.js +1 -0
- package/build/translations/es.js +1 -0
- package/build/translations/et.js +1 -0
- package/build/translations/fa.js +1 -0
- package/build/translations/fi.js +1 -0
- package/build/translations/fr.js +1 -0
- package/build/translations/gl.js +1 -0
- package/build/translations/he.js +1 -0
- package/build/translations/hi.js +1 -0
- package/build/translations/hr.js +1 -0
- package/build/translations/hu.js +1 -0
- package/build/translations/id.js +1 -0
- package/build/translations/it.js +1 -0
- package/build/translations/ja.js +1 -0
- package/build/translations/jv.js +1 -0
- package/build/translations/ko.js +1 -0
- package/build/translations/lt.js +1 -0
- package/build/translations/lv.js +1 -0
- package/build/translations/ms.js +1 -0
- package/build/translations/nl.js +1 -0
- package/build/translations/no.js +1 -0
- package/build/translations/pl.js +1 -0
- package/build/translations/pt-br.js +1 -0
- package/build/translations/pt.js +1 -0
- package/build/translations/ro.js +1 -0
- package/build/translations/ru.js +1 -0
- package/build/translations/sk.js +1 -0
- package/build/translations/sr-latn.js +1 -0
- package/build/translations/sr.js +1 -0
- package/build/translations/sv.js +1 -0
- package/build/translations/th.js +1 -0
- package/build/translations/ti.js +1 -0
- package/build/translations/tk.js +1 -0
- package/build/translations/tr.js +1 -0
- package/build/translations/tt.js +1 -0
- package/build/translations/ug.js +1 -0
- package/build/translations/uk.js +1 -0
- package/build/translations/ur.js +1 -0
- package/build/translations/uz.js +1 -0
- package/build/translations/vi.js +1 -0
- package/build/translations/zh-cn.js +1 -0
- package/build/translations/zh.js +1 -0
- package/ckeditor5-metadata.json +23 -0
- package/dist/adapters/aiadapter.d.ts +60 -0
- package/dist/adapters/aitextadapter.d.ts +150 -0
- package/dist/adapters/awstextadapter.d.ts +183 -0
- package/dist/adapters/openaitextadapter.d.ts +187 -0
- package/dist/aiassistant.d.ts +393 -0
- package/dist/aiassistantediting.d.ts +59 -0
- package/dist/aiassistantui.d.ts +62 -0
- package/dist/aiconfig.d.ts +73 -0
- package/dist/augmentation.d.ts +31 -0
- package/dist/index-content.css +6 -0
- package/dist/index-editor.css +297 -0
- package/dist/index.css +392 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.js +24 -0
- package/dist/legacyerrors.d.ts +24 -0
- package/dist/translations/af.d.ts +8 -0
- package/dist/translations/af.js +23 -0
- package/dist/translations/af.umd.js +23 -0
- package/dist/translations/ar.d.ts +8 -0
- package/dist/translations/ar.js +23 -0
- package/dist/translations/ar.umd.js +23 -0
- package/dist/translations/bg.d.ts +8 -0
- package/dist/translations/bg.js +23 -0
- package/dist/translations/bg.umd.js +23 -0
- package/dist/translations/bn.d.ts +8 -0
- package/dist/translations/bn.js +23 -0
- package/dist/translations/bn.umd.js +23 -0
- package/dist/translations/bs.d.ts +8 -0
- package/dist/translations/bs.js +23 -0
- package/dist/translations/bs.umd.js +23 -0
- package/dist/translations/ca.d.ts +8 -0
- package/dist/translations/ca.js +23 -0
- package/dist/translations/ca.umd.js +23 -0
- package/dist/translations/cs.d.ts +8 -0
- package/dist/translations/cs.js +23 -0
- package/dist/translations/cs.umd.js +23 -0
- package/dist/translations/da.d.ts +8 -0
- package/dist/translations/da.js +23 -0
- package/dist/translations/da.umd.js +23 -0
- package/dist/translations/de-ch.d.ts +8 -0
- package/dist/translations/de-ch.js +23 -0
- package/dist/translations/de-ch.umd.js +23 -0
- package/dist/translations/de.d.ts +8 -0
- package/dist/translations/de.js +23 -0
- package/dist/translations/de.umd.js +23 -0
- package/dist/translations/el.d.ts +8 -0
- package/dist/translations/el.js +23 -0
- package/dist/translations/el.umd.js +23 -0
- package/dist/translations/en-au.d.ts +8 -0
- package/dist/translations/en-au.js +23 -0
- package/dist/translations/en-au.umd.js +23 -0
- package/dist/translations/en.d.ts +8 -0
- package/dist/translations/en.js +23 -0
- package/dist/translations/en.umd.js +23 -0
- package/dist/translations/es-co.d.ts +8 -0
- package/dist/translations/es-co.js +23 -0
- package/dist/translations/es-co.umd.js +23 -0
- package/dist/translations/es.d.ts +8 -0
- package/dist/translations/es.js +23 -0
- package/dist/translations/es.umd.js +23 -0
- package/dist/translations/et.d.ts +8 -0
- package/dist/translations/et.js +23 -0
- package/dist/translations/et.umd.js +23 -0
- package/dist/translations/fa.d.ts +8 -0
- package/dist/translations/fa.js +23 -0
- package/dist/translations/fa.umd.js +23 -0
- package/dist/translations/fi.d.ts +8 -0
- package/dist/translations/fi.js +23 -0
- package/dist/translations/fi.umd.js +23 -0
- package/dist/translations/fr.d.ts +8 -0
- package/dist/translations/fr.js +23 -0
- package/dist/translations/fr.umd.js +23 -0
- package/dist/translations/gl.d.ts +8 -0
- package/dist/translations/gl.js +23 -0
- package/dist/translations/gl.umd.js +23 -0
- package/dist/translations/he.d.ts +8 -0
- package/dist/translations/he.js +23 -0
- package/dist/translations/he.umd.js +23 -0
- package/dist/translations/hi.d.ts +8 -0
- package/dist/translations/hi.js +23 -0
- package/dist/translations/hi.umd.js +23 -0
- package/dist/translations/hr.d.ts +8 -0
- package/dist/translations/hr.js +23 -0
- package/dist/translations/hr.umd.js +23 -0
- package/dist/translations/hu.d.ts +8 -0
- package/dist/translations/hu.js +23 -0
- package/dist/translations/hu.umd.js +23 -0
- package/dist/translations/id.d.ts +8 -0
- package/dist/translations/id.js +23 -0
- package/dist/translations/id.umd.js +23 -0
- package/dist/translations/it.d.ts +8 -0
- package/dist/translations/it.js +23 -0
- package/dist/translations/it.umd.js +23 -0
- package/dist/translations/ja.d.ts +8 -0
- package/dist/translations/ja.js +23 -0
- package/dist/translations/ja.umd.js +23 -0
- package/dist/translations/jv.d.ts +8 -0
- package/dist/translations/jv.js +23 -0
- package/dist/translations/jv.umd.js +23 -0
- package/dist/translations/ko.d.ts +8 -0
- package/dist/translations/ko.js +23 -0
- package/dist/translations/ko.umd.js +23 -0
- package/dist/translations/lt.d.ts +8 -0
- package/dist/translations/lt.js +23 -0
- package/dist/translations/lt.umd.js +23 -0
- package/dist/translations/lv.d.ts +8 -0
- package/dist/translations/lv.js +23 -0
- package/dist/translations/lv.umd.js +23 -0
- package/dist/translations/ms.d.ts +8 -0
- package/dist/translations/ms.js +23 -0
- package/dist/translations/ms.umd.js +23 -0
- package/dist/translations/nl.d.ts +8 -0
- package/dist/translations/nl.js +23 -0
- package/dist/translations/nl.umd.js +23 -0
- package/dist/translations/no.d.ts +8 -0
- package/dist/translations/no.js +23 -0
- package/dist/translations/no.umd.js +23 -0
- package/dist/translations/pl.d.ts +8 -0
- package/dist/translations/pl.js +23 -0
- package/dist/translations/pl.umd.js +23 -0
- package/dist/translations/pt-br.d.ts +8 -0
- package/dist/translations/pt-br.js +23 -0
- package/dist/translations/pt-br.umd.js +23 -0
- package/dist/translations/pt.d.ts +8 -0
- package/dist/translations/pt.js +23 -0
- package/dist/translations/pt.umd.js +23 -0
- package/dist/translations/ro.d.ts +8 -0
- package/dist/translations/ro.js +23 -0
- package/dist/translations/ro.umd.js +23 -0
- package/dist/translations/ru.d.ts +8 -0
- package/dist/translations/ru.js +23 -0
- package/dist/translations/ru.umd.js +23 -0
- package/dist/translations/sk.d.ts +8 -0
- package/dist/translations/sk.js +23 -0
- package/dist/translations/sk.umd.js +23 -0
- package/dist/translations/sr-latn.d.ts +8 -0
- package/dist/translations/sr-latn.js +23 -0
- package/dist/translations/sr-latn.umd.js +23 -0
- package/dist/translations/sr.d.ts +8 -0
- package/dist/translations/sr.js +23 -0
- package/dist/translations/sr.umd.js +23 -0
- package/dist/translations/sv.d.ts +8 -0
- package/dist/translations/sv.js +23 -0
- package/dist/translations/sv.umd.js +23 -0
- package/dist/translations/th.d.ts +8 -0
- package/dist/translations/th.js +23 -0
- package/dist/translations/th.umd.js +23 -0
- package/dist/translations/ti.d.ts +8 -0
- package/dist/translations/ti.js +23 -0
- package/dist/translations/ti.umd.js +23 -0
- package/dist/translations/tk.d.ts +8 -0
- package/dist/translations/tk.js +23 -0
- package/dist/translations/tk.umd.js +23 -0
- package/dist/translations/tr.d.ts +8 -0
- package/dist/translations/tr.js +23 -0
- package/dist/translations/tr.umd.js +23 -0
- package/dist/translations/tt.d.ts +8 -0
- package/dist/translations/tt.js +23 -0
- package/dist/translations/tt.umd.js +23 -0
- package/dist/translations/ug.d.ts +8 -0
- package/dist/translations/ug.js +23 -0
- package/dist/translations/ug.umd.js +23 -0
- package/dist/translations/uk.d.ts +8 -0
- package/dist/translations/uk.js +23 -0
- package/dist/translations/uk.umd.js +23 -0
- package/dist/translations/ur.d.ts +8 -0
- package/dist/translations/ur.js +23 -0
- package/dist/translations/ur.umd.js +23 -0
- package/dist/translations/uz.d.ts +8 -0
- package/dist/translations/uz.js +23 -0
- package/dist/translations/uz.umd.js +23 -0
- package/dist/translations/vi.d.ts +8 -0
- package/dist/translations/vi.js +23 -0
- package/dist/translations/vi.umd.js +23 -0
- package/dist/translations/zh-cn.d.ts +8 -0
- package/dist/translations/zh-cn.js +23 -0
- package/dist/translations/zh-cn.umd.js +23 -0
- package/dist/translations/zh.d.ts +8 -0
- package/dist/translations/zh.js +23 -0
- package/dist/translations/zh.umd.js +23 -0
- package/dist/ui/aiassistantcontroller.d.ts +113 -0
- package/dist/ui/form/aiformcontentarea.d.ts +52 -0
- package/dist/ui/form/aiformerrorview.d.ts +30 -0
- package/dist/ui/form/aiformpromptview.d.ts +50 -0
- package/dist/ui/form/aiformtoolbarview.d.ts +62 -0
- package/dist/ui/form/aiformview.d.ts +145 -0
- package/dist/ui/form/aihistorylistitemview.d.ts +22 -0
- package/dist/ui/form/aihistorylistview.d.ts +39 -0
- package/dist/ui/form/prompthistory.d.ts +24 -0
- package/dist/ui/showaiassistantcommand.d.ts +44 -0
- package/dist/utils/common-translations.d.ts +13 -0
- package/dist/utils/normalizecommandsconfig.d.ts +18 -0
- package/lang/contexts.json +56 -0
- package/lang/translations/af.po +230 -0
- package/lang/translations/ar.po +230 -0
- package/lang/translations/bg.po +230 -0
- package/lang/translations/bn.po +230 -0
- package/lang/translations/bs.po +230 -0
- package/lang/translations/ca.po +230 -0
- package/lang/translations/cs.po +230 -0
- package/lang/translations/da.po +230 -0
- package/lang/translations/de-ch.po +230 -0
- package/lang/translations/de.po +230 -0
- package/lang/translations/el.po +230 -0
- package/lang/translations/en-au.po +230 -0
- package/lang/translations/en.po +230 -0
- package/lang/translations/es-co.po +230 -0
- package/lang/translations/es.po +230 -0
- package/lang/translations/et.po +230 -0
- package/lang/translations/fa.po +230 -0
- package/lang/translations/fi.po +230 -0
- package/lang/translations/fr.po +230 -0
- package/lang/translations/gl.po +230 -0
- package/lang/translations/he.po +230 -0
- package/lang/translations/hi.po +230 -0
- package/lang/translations/hr.po +230 -0
- package/lang/translations/hu.po +230 -0
- package/lang/translations/id.po +230 -0
- package/lang/translations/it.po +230 -0
- package/lang/translations/ja.po +230 -0
- package/lang/translations/jv.po +230 -0
- package/lang/translations/ko.po +230 -0
- package/lang/translations/lt.po +230 -0
- package/lang/translations/lv.po +230 -0
- package/lang/translations/ms.po +230 -0
- package/lang/translations/nl.po +230 -0
- package/lang/translations/no.po +230 -0
- package/lang/translations/pl.po +230 -0
- package/lang/translations/pt-br.po +230 -0
- package/lang/translations/pt.po +230 -0
- package/lang/translations/ro.po +230 -0
- package/lang/translations/ru.po +230 -0
- package/lang/translations/sk.po +230 -0
- package/lang/translations/sr-latn.po +230 -0
- package/lang/translations/sr.po +230 -0
- package/lang/translations/sv.po +230 -0
- package/lang/translations/th.po +230 -0
- package/lang/translations/ti.po +230 -0
- package/lang/translations/tk.po +230 -0
- package/lang/translations/tr.po +230 -0
- package/lang/translations/tt.po +230 -0
- package/lang/translations/ug.po +230 -0
- package/lang/translations/uk.po +230 -0
- package/lang/translations/ur.po +230 -0
- package/lang/translations/uz.po +230 -0
- package/lang/translations/vi.po +230 -0
- package/lang/translations/zh-cn.po +230 -0
- package/lang/translations/zh.po +230 -0
- package/package.json +53 -0
- package/src/adapters/aiadapter.d.ts +56 -0
- package/src/adapters/aiadapter.js +23 -0
- package/src/adapters/aitextadapter.d.ts +146 -0
- package/src/adapters/aitextadapter.js +23 -0
- package/src/adapters/awstextadapter.d.ts +179 -0
- package/src/adapters/awstextadapter.js +23 -0
- package/src/adapters/openaitextadapter.d.ts +183 -0
- package/src/adapters/openaitextadapter.js +23 -0
- package/src/aiassistant.d.ts +389 -0
- package/src/aiassistant.js +23 -0
- package/src/aiassistantediting.d.ts +55 -0
- package/src/aiassistantediting.js +23 -0
- package/src/aiassistantui.d.ts +58 -0
- package/src/aiassistantui.js +23 -0
- package/src/aiconfig.d.ts +69 -0
- package/src/aiconfig.js +23 -0
- package/src/augmentation.d.ts +27 -0
- package/src/augmentation.js +23 -0
- package/src/index.d.ts +13 -0
- package/src/index.js +23 -0
- package/src/legacyerrors.d.ts +20 -0
- package/src/legacyerrors.js +23 -0
- package/src/ui/aiassistantcontroller.d.ts +109 -0
- package/src/ui/aiassistantcontroller.js +24 -0
- package/src/ui/form/aiformcontentarea.d.ts +48 -0
- package/src/ui/form/aiformcontentarea.js +23 -0
- package/src/ui/form/aiformerrorview.d.ts +26 -0
- package/src/ui/form/aiformerrorview.js +23 -0
- package/src/ui/form/aiformpromptview.d.ts +46 -0
- package/src/ui/form/aiformpromptview.js +23 -0
- package/src/ui/form/aiformtoolbarview.d.ts +58 -0
- package/src/ui/form/aiformtoolbarview.js +23 -0
- package/src/ui/form/aiformview.d.ts +141 -0
- package/src/ui/form/aiformview.js +23 -0
- package/src/ui/form/aihistorylistitemview.d.ts +18 -0
- package/src/ui/form/aihistorylistitemview.js +23 -0
- package/src/ui/form/aihistorylistview.d.ts +35 -0
- package/src/ui/form/aihistorylistview.js +23 -0
- package/src/ui/form/prompthistory.d.ts +20 -0
- package/src/ui/form/prompthistory.js +23 -0
- package/src/ui/showaiassistantcommand.d.ts +40 -0
- package/src/ui/showaiassistantcommand.js +23 -0
- package/src/utils/common-translations.d.ts +9 -0
- package/src/utils/common-translations.js +23 -0
- package/src/utils/normalizecommandsconfig.d.ts +14 -0
- package/src/utils/normalizecommandsconfig.js +23 -0
- package/theme/ai-dropdown.css +37 -0
- package/theme/ai-form.css +262 -0
- package/theme/ai.css +120 -0
- package/theme/icons/copy.svg +1 -0
- package/theme/icons/error.svg +1 -0
- package/theme/icons/magic-wand.svg +1 -0
- package/theme/icons/submit.svg +1 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2024, 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 _0x4ccecf=_0x5808;(function(_0x5d5d99,_0x4130a2){const _0x2747f8=_0x5808,_0x598fb8=_0x5d5d99();while(!![]){try{const _0x50811b=-parseInt(_0x2747f8(0xc3))/0x1+parseInt(_0x2747f8(0xd0))/0x2+-parseInt(_0x2747f8(0xda))/0x3*(-parseInt(_0x2747f8(0xdb))/0x4)+-parseInt(_0x2747f8(0xd2))/0x5+-parseInt(_0x2747f8(0xc4))/0x6+parseInt(_0x2747f8(0xc2))/0x7*(-parseInt(_0x2747f8(0xcc))/0x8)+parseInt(_0x2747f8(0xc5))/0x9*(parseInt(_0x2747f8(0xd9))/0xa);if(_0x50811b===_0x4130a2)break;else _0x598fb8['push'](_0x598fb8['shift']());}catch(_0x27d575){_0x598fb8['push'](_0x598fb8['shift']());}}}(_0x3508,0xb2d6e));function _0x3508(){const _0xd889f9=['execute','7610HviUYF','8544tfDaHa','312RVZdRO','Prompt\x20history','348285mTbRyF','583646AcLeOj','8336466iIEgqS','32211fBxUvB','historyGroupView','fire','set','clearHistoryButton','Clear','_createClearHistoryButton','144YoEMVf','filter','clearHistory','items','2333336MZPvyC','delegate','2556290KkgBGG','length','label','add','locale','children'];_0x3508=function(){return _0xd889f9;};return _0x3508();}function _0x5808(_0x27afa7,_0x5219ae){const _0x3508b5=_0x3508();return _0x5808=function(_0x58082f,_0x1b2e85){_0x58082f=_0x58082f-0xc2;let _0xd799bd=_0x3508b5[_0x58082f];return _0xd799bd;},_0x5808(_0x27afa7,_0x5219ae);}import{ListView as _0x15e214,ListItemGroupView as _0x15fb75,ButtonView as _0x2af217}from'ckeditor5/src/ui.js';import{getTranslation as _0x3ce66d}from'../../utils/common-translations.js';export default class rs extends _0x15e214{constructor(_0xc7bb24){const _0xb4f732=_0x5808;super(_0xc7bb24),this[_0xb4f732(0xc9)]=this[_0xb4f732(0xcb)](),this[_0xb4f732(0xc6)]=new _0x15fb75(),this[_0xb4f732(0xc6)][_0xb4f732(0xd7)][_0xb4f732(0xd5)](this[_0xb4f732(0xc9)],0x1),this[_0xb4f732(0xc6)][_0xb4f732(0xd4)]=_0x3ce66d(_0xc7bb24,_0xb4f732(0xdc)),this[_0xb4f732(0xc6)][_0xb4f732(0xcf)][_0xb4f732(0xd1)](_0xb4f732(0xd8))['to'](this),this[_0xb4f732(0xcf)][_0xb4f732(0xd5)](this[_0xb4f732(0xc6)]);}[_0x4ccecf(0xcd)](){const _0x42f954=_0x4ccecf;let _0x3edb26=0x0;for(const _0x4113c7 of this[_0x42f954(0xcf)])_0x3edb26+=_0x4113c7[_0x42f954(0xcf)][_0x42f954(0xd3)];return{'resultsCount':_0x3edb26,'totalItemsCount':_0x3edb26};}[_0x4ccecf(0xcb)](){const _0x5711a6=_0x4ccecf,_0x27757a=this[_0x5711a6(0xd6)],_0x463cbe=new _0x2af217(this[_0x5711a6(0xd6)]);return _0x463cbe[_0x5711a6(0xc8)]({'label':'('+_0x3ce66d(_0x27757a,_0x5711a6(0xca))+')','withText':!0x0}),_0x463cbe['on'](_0x5711a6(0xd8),()=>this[_0x5711a6(0xc7)](_0x5711a6(0xce))),_0x463cbe;}}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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.js';
|
|
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
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2024, 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 _0x53d16c=_0x5302;(function(_0x82ab15,_0x33dbce){const _0x54d8fe=_0x5302,_0x56899b=_0x82ab15();while(!![]){try{const _0x194c23=parseInt(_0x54d8fe(0x18d))/0x1*(-parseInt(_0x54d8fe(0x191))/0x2)+-parseInt(_0x54d8fe(0x186))/0x3+-parseInt(_0x54d8fe(0x193))/0x4*(-parseInt(_0x54d8fe(0x181))/0x5)+-parseInt(_0x54d8fe(0x18c))/0x6+-parseInt(_0x54d8fe(0x18a))/0x7*(-parseInt(_0x54d8fe(0x18b))/0x8)+parseInt(_0x54d8fe(0x188))/0x9*(-parseInt(_0x54d8fe(0x19a))/0xa)+parseInt(_0x54d8fe(0x187))/0xb*(parseInt(_0x54d8fe(0x185))/0xc);if(_0x194c23===_0x33dbce)break;else _0x56899b['push'](_0x56899b['shift']());}catch(_0x59ad55){_0x56899b['push'](_0x56899b['shift']());}}}(_0x5aae,0x2d350));import{Collection as _0x2b9379}from'ckeditor5/src/utils.js';const cs=_0x53d16c(0x195);export default class os extends _0x2b9379{constructor(){const _0x7c0a0e=_0x53d16c;super(),this[_0x7c0a0e(0x189)](),this['on'](_0x7c0a0e(0x198),(_0x56d3b5,_0x7f2567)=>{const _0x4f94f7=_0x7c0a0e,_0xfd9afe=Ss(_0x7f2567[_0x4f94f7(0x197)]);for(const _0x39b25f of this)if(_0x39b25f!=_0x7f2567&&Ss(_0x39b25f[_0x4f94f7(0x197)])===_0xfd9afe){this[_0x4f94f7(0x19b)](_0x39b25f);break;}this[_0x4f94f7(0x18e)]>0x14&&this[_0x4f94f7(0x19b)](this[_0x4f94f7(0x192)]),this[_0x4f94f7(0x182)]();}),this['on'](_0x7c0a0e(0x19b),()=>{const _0x4e73f3=_0x7c0a0e;this[_0x4e73f3(0x182)]();});}[_0x53d16c(0x189)](){const _0x161a84=_0x53d16c,_0x243960=sessionStorage[_0x161a84(0x199)](cs)||'[]';this[_0x161a84(0x18f)](JSON[_0x161a84(0x19c)](_0x243960));}[_0x53d16c(0x182)](){const _0xa06bbf=_0x53d16c;sessionStorage[_0xa06bbf(0x196)](cs,JSON[_0xa06bbf(0x194)](this[_0xa06bbf(0x184)](_0x216369=>_0x216369)));}}function Ss(_0x4988c8){const _0x1bfc92=_0x53d16c;return _0x4988c8[_0x1bfc92(0x190)]()[_0x1bfc92(0x183)]();}function _0x5302(_0x31e8f1,_0x52ef7e){const _0x5aaec7=_0x5aae();return _0x5302=function(_0x5302aa,_0x14b0df){_0x5302aa=_0x5302aa-0x181;let _0x1fc7c8=_0x5aaec7[_0x5302aa];return _0x1fc7c8;},_0x5302(_0x31e8f1,_0x52ef7e);}function _0x5aae(){const _0xdb7e5f=['8BCBUbU','2095770LtMkgj','87CUnAiC','length','addMany','toLowerCase','4132KJcIEL','last','16eQEdpp','stringify','CKEditor/AIFormView/PromptHistory','setItem','prompt','add','getItem','1610600YzzmXg','remove','parse','142660GDAups','_saveToSessionStorage','trim','map','996wCRBlh','931479YdYDMF','119603MpdmMs','18ejZfQV','_loadFromSessionStorage','2311617tcQerW'];_0x5aae=function(){return _0xdb7e5f;};return _0x5aae();}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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, type Editor } from 'ckeditor5/src/core.js';
|
|
10
|
+
import type { CommandDefinition } from '../aiassistant.js';
|
|
11
|
+
/**
|
|
12
|
+
* Command that shows the AI Assistant user interface.
|
|
13
|
+
*/
|
|
14
|
+
export default class ShowAIAssistantCommand extends Command {
|
|
15
|
+
/**
|
|
16
|
+
* An array with ids of the AI commands enabled for the current selection.
|
|
17
|
+
*
|
|
18
|
+
* @observable
|
|
19
|
+
*/
|
|
20
|
+
enabledCommandsIds: Array<string>;
|
|
21
|
+
/**
|
|
22
|
+
* Creates an instance of the command.
|
|
23
|
+
*/
|
|
24
|
+
constructor(editor: Editor, commandDefinitions: Array<CommandDefinition>);
|
|
25
|
+
/**
|
|
26
|
+
* @inheritDoc
|
|
27
|
+
*/
|
|
28
|
+
refresh(): void;
|
|
29
|
+
/**
|
|
30
|
+
* Opens AI Assistant user interface for the current document selection.
|
|
31
|
+
*
|
|
32
|
+
* @param query The initial query. If set, the AI assistant will automatically submit given query to the AI service.
|
|
33
|
+
* @param label Label to be displayed in the AI assistant query input field while the AI assistant processes the initial query.
|
|
34
|
+
* @param actionId The id of the executed action. It can be used in extended and custom adapters to customize the request. It
|
|
35
|
+
* will be prefixed with `aiAssistant:`. See also
|
|
36
|
+
* {@link module:ai/adapters/aitextadapter~AITextAdapterRequestData#actionId `AITextAdapterRequestData#actionId`}.
|
|
37
|
+
* @fires execute
|
|
38
|
+
*/
|
|
39
|
+
execute(query?: string, label?: string, actionId?: string): void;
|
|
40
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2024, 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 _0x1f44(_0x4b5511,_0x261982){const _0x3a2f67=_0x3a2f();return _0x1f44=function(_0x1f444a,_0x5425e0){_0x1f444a=_0x1f444a-0x158;let _0x23ae36=_0x3a2f67[_0x1f444a];return _0x23ae36;},_0x1f44(_0x4b5511,_0x261982);}const _0x559040=_0x1f44;(function(_0x410610,_0x5f01bd){const _0xe73190=_0x1f44,_0x59044f=_0x410610();while(!![]){try{const _0x3177ee=parseInt(_0xe73190(0x17a))/0x1+-parseInt(_0xe73190(0x172))/0x2*(-parseInt(_0xe73190(0x170))/0x3)+-parseInt(_0xe73190(0x15b))/0x4*(parseInt(_0xe73190(0x171))/0x5)+-parseInt(_0xe73190(0x16d))/0x6+parseInt(_0xe73190(0x16b))/0x7+-parseInt(_0xe73190(0x15c))/0x8*(-parseInt(_0xe73190(0x16a))/0x9)+-parseInt(_0xe73190(0x162))/0xa*(-parseInt(_0xe73190(0x17c))/0xb);if(_0x3177ee===_0x5f01bd)break;else _0x59044f['push'](_0x59044f['shift']());}catch(_0x536451){_0x59044f['push'](_0x59044f['shift']());}}}(_0x3a2f,0x6e6fb));function _0x3a2f(){const _0x2a3301=['123645KiNfUk','2UADgSQ','name','showUI','change:_hasContext','getFirstRange','includes','execute','plugins','706851sTZIxS','_hasContext','11qkWIWB','set','model','from','get','add','document','ai.aiAssistant.disabledElements','selection','requiresContent','element','isCollapsed','96FxuCUp','304JivrDh','getSelectedBlocks','enabledCommandsIds','change:isEnabled','_commandDefinitions','getItems','4570550pUlnzl','custom','values','getRanges','editor','isEmpty','refresh','isEnabled','73368HoiWDM','613039MRStIA','config','3565476aPZrZh','length','hasContent','236490boXaxn'];_0x3a2f=function(){return _0x2a3301;};return _0x3a2f();}import{Command as _0x70ed55}from'ckeditor5/src/core.js';import _0x4b793a from'../aiassistantui.js';export default class y extends _0x70ed55{constructor(_0x31329d,_0x483df5){const _0x436e67=_0x1f44;super(_0x31329d),this[_0x436e67(0x160)]=_0x483df5,this[_0x436e67(0x17d)](_0x436e67(0x15e),[]),this['on'](_0x436e67(0x175),(_0x545a7e,_0x58c289,_0x47b11a)=>{const _0x130ecc=_0x436e67;this[_0x130ecc(0x169)]&&(this[_0x130ecc(0x15e)]=G(this[_0x130ecc(0x160)],_0x47b11a));}),this[_0x436e67(0x17d)](_0x436e67(0x17b),!0x1),this['on'](_0x436e67(0x15f),(_0x108691,_0x2e9767,_0x685e70)=>{const _0x3487cb=_0x436e67;this[_0x3487cb(0x15e)]=_0x685e70?G(this[_0x3487cb(0x160)],this[_0x3487cb(0x17b)]):[];});}[_0x559040(0x168)](){const _0x59a493=_0x559040,_0x17a85d=this[_0x59a493(0x166)][_0x59a493(0x17e)];this[_0x59a493(0x17b)]=function(_0x59f69a){const _0x5dfb3f=_0x59a493,_0x64724a=_0x59f69a[_0x5dfb3f(0x182)][_0x5dfb3f(0x184)];return _0x64724a[_0x5dfb3f(0x15a)]?0x0!==[..._0x64724a[_0x5dfb3f(0x15d)]()][_0x5dfb3f(0x16e)]&&![..._0x64724a[_0x5dfb3f(0x15d)]()][0x0][_0x5dfb3f(0x167)]:!!_0x59f69a[_0x5dfb3f(0x16f)](_0x64724a[_0x5dfb3f(0x176)]());}(_0x17a85d);const _0x21c086=_0x17a85d[_0x59a493(0x182)][_0x59a493(0x184)],_0x34ca07=this[_0x59a493(0x166)][_0x59a493(0x16c)][_0x59a493(0x180)](_0x59a493(0x183));for(const _0x6ab770 of _0x21c086[_0x59a493(0x165)]())for(const _0xa8a9a9 of _0x6ab770[_0x59a493(0x161)]())if(_0xa8a9a9['is'](_0x59a493(0x159))&&_0x34ca07[_0x59a493(0x177)](_0xa8a9a9[_0x59a493(0x173)]))return void(this[_0x59a493(0x169)]=!0x1);this[_0x59a493(0x169)]=!0x0;}[_0x559040(0x178)](_0x44b40c='',_0x3d6e67='',_0x417366=_0x559040(0x163)){const _0x416db4=_0x559040;this[_0x416db4(0x166)][_0x416db4(0x179)][_0x416db4(0x180)](_0x4b793a)[_0x416db4(0x174)](_0x44b40c,_0x3d6e67,_0x417366);}}function G(_0x42178d,_0x34d2bf){const _0xbf80af=_0x559040,_0x10fa60=new Set();for(const _0x26f27c of _0x42178d[_0xbf80af(0x164)]())(_0x34d2bf||!0x1===_0x26f27c[_0xbf80af(0x158)])&&_0x10fa60[_0xbf80af(0x181)](_0x26f27c['id']);return Array[_0xbf80af(0x17f)](_0x10fa60);}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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.js';
|
|
9
|
+
export declare function getTranslation(locale: Locale, id: string, values?: string | Array<string> | number): string;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2024, 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(_0x2a40ba,_0x82e8a9,_0xb7b847){const t=_0x2a40ba['t'];switch(_0x82e8a9){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'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'AI\x20is\x20writing':return t('AI\x20is\x20writing');case'Generated\x20content:\x20%0':return t('Generated\x20content:\x20%0',_0xb7b847);case'Error\x20during\x20AI\x20content\x20generation:\x20%0':return t('Error\x20during\x20AI\x20content\x20generation:\x20%0',_0xb7b847);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'Clear':return t('Clear');case'AI_REPLACE_CONTENT':return t({'id':'AI_REPLACE_CONTENT','string':'Replace'});case'AI_INSERT_CONTENT':return t({'id':'AI_INSERT_CONTENT','string':'Insert'});case'AI_ERROR_GET_HEADERS':return t({'id':'AI_ERROR_GET_HEADERS','string':'Preparing\x20request\x20headers\x20failed'});case'AI_ERROR_GET_PARAMETERS':return t({'id':'AI_ERROR_GET_PARAMETERS','string':'Preparing\x20request\x20parameters\x20failed'});case'AI_ERROR_UNSUPPORTED_MODEL':return t({'id':'AI_ERROR_UNSUPPORTED_MODEL','string':'The\x20requested\x20AI\x20model\x20(\x22%0\x22)\x20is\x20not\x20supported'},_0xb7b847);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 _0x82e8a9;}}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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/normalizecommandsconfig
|
|
7
|
+
*/
|
|
8
|
+
import type { Locale } from 'ckeditor5/src/utils.js';
|
|
9
|
+
import type { GroupDefinition, CommandDefinition } from '../aiassistant.js';
|
|
10
|
+
export declare const UNGROUPED_COMMANDS_GROUP_ID = "_ungrouppedCommands";
|
|
11
|
+
/**
|
|
12
|
+
* Normalizes the `config.ai.aiAssistant.commands` configuration taking into account different possible config formats (or lack thereof).
|
|
13
|
+
*/
|
|
14
|
+
export declare function normalizeCommandsConfig(config: Array<GroupDefinition | CommandDefinition>, locale: Locale): Array<GroupDefinition>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2024, 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 const UNGROUPED_COMMANDS_GROUP_ID='_ungrouppedCommands';export function normalizeCommandsConfig(_0x2e24ce,_0xe071ab){const _0x28f45c=(0x0,_0xe071ab['t'])('Other');return _0x2e24ce['length']?'groupId'in _0x2e24ce[0x0]?_0x2e24ce:[{'groupId':'_ungrouppedCommands','groupLabel':_0x28f45c,'order':0x1/0x0,'commands':_0x2e24ce}]:[{'groupId':'_ungrouppedCommands','groupLabel':_0x28f45c,'order':0x1/0x0,'commands':[]}];}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* What you're currently looking at is the source code of a legally protected, proprietary software.
|
|
3
|
+
* CKEditor 5 Collaboration is licensed under a commercial license and protected by copyright law. Where not otherwise indicated,
|
|
4
|
+
* all CKEditor 5 Collaboration content is authored by CKSource engineers and consists of CKSource-owned intellectual property.
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";
|
|
11
|
+
@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";
|
|
12
|
+
|
|
13
|
+
:root {
|
|
14
|
+
--ck-ai-dropdown-view-width: 250px;
|
|
15
|
+
--ck-ai-dropdown-view-list-max-height: 250px;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.ck.ck-ai-commands-search {
|
|
19
|
+
width: var(--ck-ai-dropdown-view-width);
|
|
20
|
+
|
|
21
|
+
& > .ck-labeled-field-view {
|
|
22
|
+
padding: var(--ck-spacing-large);
|
|
23
|
+
|
|
24
|
+
& .ck-input {
|
|
25
|
+
min-width: unset;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
& > .ck-search__results {
|
|
30
|
+
border-top: 1px solid var(--ck-color-base-border);
|
|
31
|
+
|
|
32
|
+
& > .ck-list {
|
|
33
|
+
max-height: var(--ck-ai-dropdown-view-list-max-height);
|
|
34
|
+
overflow: auto;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* What you're currently looking at is the source code of a legally protected, proprietary software.
|
|
3
|
+
* CKEditor 5 Collaboration is licensed under a commercial license and protected by copyright law. Where not otherwise indicated,
|
|
4
|
+
* all CKEditor 5 Collaboration content is authored by CKSource engineers and consists of CKSource-owned intellectual property.
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";
|
|
11
|
+
@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";
|
|
12
|
+
|
|
13
|
+
:root {
|
|
14
|
+
--ck-ai-form-view-width: 600px;
|
|
15
|
+
--ck-ai-form-content-height: 175px;
|
|
16
|
+
--ck-ai-form-content-background: hsl(0, 0%, 98%);
|
|
17
|
+
--ck-ai-form-history-font-size: .9em;
|
|
18
|
+
|
|
19
|
+
--ck-ai-form-error-background: var(--ck-color-light-red);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/* Note: This class name is mentioned in the guide and acts like a public API. */
|
|
23
|
+
.ck .ck-ai-form {
|
|
24
|
+
width: var(--ck-ai-form-view-width);
|
|
25
|
+
|
|
26
|
+
/* Don't overflow the parent dialog container */
|
|
27
|
+
max-width: 100%;
|
|
28
|
+
|
|
29
|
+
@mixin ck-media-phone {
|
|
30
|
+
/* Allow the for the layout to be fluid in narrow viewports to avoid breaking it due to limited
|
|
31
|
+
* horizontal space (https://github.com/cksource/ckeditor5-commercial/issues/5913). */
|
|
32
|
+
--ck-ai-form-view-width: 100vw;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
& .ck-ai-form-content {
|
|
36
|
+
padding: var(--ck-spacing-large);
|
|
37
|
+
width: 100%;
|
|
38
|
+
|
|
39
|
+
& .ck-input {
|
|
40
|
+
width: 100%;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
& .ck-ai-form__content-area-wrapper {
|
|
44
|
+
width: 100%;
|
|
45
|
+
max-height: var(--ck-ai-form-content-height);
|
|
46
|
+
overflow-y: auto;
|
|
47
|
+
border: 1px solid var(--ck-color-base-border);
|
|
48
|
+
border-radius: 2px;
|
|
49
|
+
|
|
50
|
+
&:focus {
|
|
51
|
+
outline: none;
|
|
52
|
+
border: var(--ck-focus-ring);
|
|
53
|
+
box-shadow: var(--ck-focus-outer-shadow), 0 0;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
& .ck-ai-form__content-area {
|
|
58
|
+
display: flex;
|
|
59
|
+
background-color: var(--ck-ai-form-content-background);
|
|
60
|
+
|
|
61
|
+
&.ck-ai-form__content-area--processing {
|
|
62
|
+
--ck-color-text: var(--ck-color-input-disabled-text);
|
|
63
|
+
background-color: var(--ck-color-input-disabled-background);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/* Note: This class name is mentioned in the guide and acts like a public API */
|
|
67
|
+
& .ck-ai-form__content-field {
|
|
68
|
+
width: 100%;
|
|
69
|
+
white-space: normal;
|
|
70
|
+
padding: var(--ck-spacing-tiny) var(--ck-spacing-medium);
|
|
71
|
+
min-height: calc( var(--ck-line-height-base) * var(--ck-font-size-base) );
|
|
72
|
+
box-sizing: content-box;
|
|
73
|
+
|
|
74
|
+
@mixin ck-dir ltr {
|
|
75
|
+
padding-right: 0;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
@mixin ck-dir rtl {
|
|
79
|
+
padding-left: 0;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
& > * {
|
|
83
|
+
white-space: normal;
|
|
84
|
+
color: inherit;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
& .ck-spinner-container {
|
|
89
|
+
@mixin ck-dir ltr {
|
|
90
|
+
margin-right: var(--ck-spacing-medium);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
@mixin ck-dir rtl {
|
|
94
|
+
margin-left: var(--ck-spacing-medium);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
& .ck-ai-form__copy-button-wrapper {
|
|
100
|
+
display: flex;
|
|
101
|
+
flex-direction: column-reverse;
|
|
102
|
+
padding-left: 2px;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
& .ck-ai-form__copy-button {
|
|
106
|
+
position: sticky;
|
|
107
|
+
right: 1px;
|
|
108
|
+
bottom: 1px;
|
|
109
|
+
padding: 4px;
|
|
110
|
+
min-height: unset;
|
|
111
|
+
min-width: unset;
|
|
112
|
+
|
|
113
|
+
& svg {
|
|
114
|
+
--ck-icon-size: 16px;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
&.ck-ai-form__copy-button--copied {
|
|
118
|
+
color: inherit;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
& .ck-ai-form__toolbar {
|
|
124
|
+
border: none;
|
|
125
|
+
padding: 0;
|
|
126
|
+
margin-top: var(--ck-spacing-medium);
|
|
127
|
+
margin-bottom: calc( 2 * var(--ck-spacing-medium) );
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
& .ck-ai-form__loader {
|
|
131
|
+
display: flex;
|
|
132
|
+
align-items: center;
|
|
133
|
+
|
|
134
|
+
& .ck-spinner {
|
|
135
|
+
box-sizing: border-box;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
& .ck-autocomplete {
|
|
140
|
+
display: flex;
|
|
141
|
+
justify-content: space-between;
|
|
142
|
+
|
|
143
|
+
& > .ck-labeled-field-view {
|
|
144
|
+
flex-grow: 1;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
& > .ck.ck-ai-form__submit {
|
|
148
|
+
@mixin ck-dir ltr {
|
|
149
|
+
margin-left: var(--ck-spacing-medium);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
@mixin ck-dir rtl {
|
|
153
|
+
margin-right: var(--ck-spacing-medium);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
border-color: var(--ck-ai-form-submit-button-border-color);
|
|
157
|
+
color: var(--ck-ai-form-submit-button-text-color);
|
|
158
|
+
|
|
159
|
+
&.ck-disabled {
|
|
160
|
+
border-color: var(--ck-ai-form-submit-button-disabled-border-color);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/* Toggle history button */
|
|
165
|
+
& > .ck-labeled-field-view .ck-ai-form__toggle-history {
|
|
166
|
+
position: absolute;
|
|
167
|
+
font-size: var(--ck-font-size-tiny);
|
|
168
|
+
|
|
169
|
+
@mixin ck-dir ltr {
|
|
170
|
+
right: var(--ck-spacing-medium);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
@mixin ck-dir rtl {
|
|
174
|
+
left: var(--ck-spacing-medium);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
bottom: var(--ck-spacing-small);
|
|
178
|
+
top: var(--ck-spacing-small);
|
|
179
|
+
padding: 4px;
|
|
180
|
+
min-height: unset;
|
|
181
|
+
min-width: unset;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
& .ck-textarea {
|
|
185
|
+
/* Give the toggle history button some space */
|
|
186
|
+
@mixin ck-dir ltr {
|
|
187
|
+
padding-right: 30px;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
@mixin ck-dir rtl {
|
|
191
|
+
padding-left: 30px;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/* Squash the textarea horizontally if necessary on narrow layouts
|
|
195
|
+
* to avoid breaking the layout even at the cost of the placeholder
|
|
196
|
+
* being cut off (https://github.com/cksource/ckeditor5-commercial/issues/5913). */
|
|
197
|
+
@mixin ck-media-phone {
|
|
198
|
+
--ck-input-width: auto;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/* Prompt history group */
|
|
203
|
+
& .ck-search__results .ck-list .ck-list__group {
|
|
204
|
+
display: grid;
|
|
205
|
+
grid-template-columns: auto 1fr;
|
|
206
|
+
grid-template-rows: auto;
|
|
207
|
+
grid-column-gap: 0px;
|
|
208
|
+
grid-row-gap: 0px;
|
|
209
|
+
|
|
210
|
+
/* History group label */
|
|
211
|
+
& > span {
|
|
212
|
+
grid-area: 1 / 1 / 2 / 2;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/* Clear button in the history */
|
|
216
|
+
& > .ck-button {
|
|
217
|
+
padding: 0;
|
|
218
|
+
min-height: auto;
|
|
219
|
+
grid-area: 1 / 2 / 2 / 3;
|
|
220
|
+
font-size: var(--ck-ai-form-history-font-size);
|
|
221
|
+
justify-self: start;
|
|
222
|
+
background: none;
|
|
223
|
+
margin: var(--ck-spacing-medium) 0 0;
|
|
224
|
+
|
|
225
|
+
& .ck-button__label {
|
|
226
|
+
line-height: inherit;
|
|
227
|
+
|
|
228
|
+
&:hover {
|
|
229
|
+
text-decoration: underline;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
& > .ck-list {
|
|
235
|
+
grid-area: 2 / 1 / 3 / 3;
|
|
236
|
+
|
|
237
|
+
/* Prompts can be very long. We need to display them whole. */
|
|
238
|
+
& .ck-list__item .ck-button .ck-button__label {
|
|
239
|
+
white-space: nowrap;
|
|
240
|
+
overflow: hidden;
|
|
241
|
+
max-width: 100%;
|
|
242
|
+
text-overflow: ellipsis;
|
|
243
|
+
font-size: var(--ck-ai-form-history-font-size);
|
|
244
|
+
line-height: var(--ck-line-height-base);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
& .ck-ai-form__error {
|
|
252
|
+
display: flex;
|
|
253
|
+
justify-content: center;
|
|
254
|
+
align-items: center;
|
|
255
|
+
padding: var(--ck-spacing-medium);
|
|
256
|
+
background-color: var(--ck-ai-form-error-background);
|
|
257
|
+
color: var(--ck-color-base-text);
|
|
258
|
+
border-radius: 2px;
|
|
259
|
+
margin-bottom: var(--ck-spacing-medium);
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
|
package/theme/ai.css
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* What you're currently looking at is the source code of a legally protected, proprietary software.
|
|
3
|
+
* CKEditor 5 Collaboration is licensed under a commercial license and protected by copyright law. Where not otherwise indicated,
|
|
4
|
+
* all CKEditor 5 Collaboration content is authored by CKSource engineers and consists of CKSource-owned intellectual property.
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/*
|
|
11
|
+
* These definitions bring violet accents (tint) across the AI UI.
|
|
12
|
+
*/
|
|
13
|
+
:root {
|
|
14
|
+
--ck-ai-form-submit-button-text-color: var(--ck-color-text);
|
|
15
|
+
--ck-ai-form-submit-button-border-color: transparent;
|
|
16
|
+
--ck-ai-form-submit-button-disabled-border-color: transparent;
|
|
17
|
+
--ck-ai-toolbar-button-hover-color: var(--ck-color-text);
|
|
18
|
+
--ck-color-ai-selection: hsla(201, 100%, 56%, 0.3);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/* Note: This class name is mentioned in the guide and acts like a public API. */
|
|
22
|
+
.ck-ai-assistant-ui_theme {
|
|
23
|
+
--ck-color-button-default-hover-background: hsl(262.1,100%,96.3%);
|
|
24
|
+
--ck-color-button-default-active-background: hsl(262.1,100%,96.3%);
|
|
25
|
+
|
|
26
|
+
--ck-color-button-on-background: hsl(262.1,100%,96.3%);
|
|
27
|
+
--ck-color-button-on-hover-background: hsl(262.1,100%,96.3%);
|
|
28
|
+
--ck-color-button-on-active-background: hsl(262.1,100%,96.3%);
|
|
29
|
+
--ck-color-button-on-disabled-background: hsl(262.1,100%,96.3%);
|
|
30
|
+
--ck-color-button-on-color: hsl(263.2,59.2%,52%);
|
|
31
|
+
|
|
32
|
+
--ck-color-button-action-background: hsl(263.2,59.2%,52%);
|
|
33
|
+
--ck-color-button-action-hover-background: hsl(262.6,58.9%,49.6%);
|
|
34
|
+
--ck-color-button-action-active-background: hsl(262.6,58.9%,49.6%);
|
|
35
|
+
--ck-color-button-action-disabled-background: hsl(263.8,59.3%,75.9%);
|
|
36
|
+
|
|
37
|
+
--ck-color-list-button-hover-background: hsl(262.1,100%,96.3%);
|
|
38
|
+
|
|
39
|
+
--ck-ai-form-content-background: hsl(0,0%,97.6%);
|
|
40
|
+
--ck-ai-form-submit-button-text-color: var(--ck-color-button-on-color);
|
|
41
|
+
--ck-ai-form-submit-button-border-color: var(--ck-color-button-action-background);
|
|
42
|
+
--ck-ai-form-submit-button-disabled-border-color: var(--ck-color-button-action-disabled-background);
|
|
43
|
+
--ck-ai-toolbar-button-hover-color: var(--ck-color-button-on-color);
|
|
44
|
+
|
|
45
|
+
--ck-color-ai-selection: hsl(262.5,60%,90%);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/*
|
|
49
|
+
* Apply the theme colors for specific elements.
|
|
50
|
+
*/
|
|
51
|
+
.ck-ai-commands-dropdown > .ck-button:hover,
|
|
52
|
+
.ck-ai-assistant-button:hover {
|
|
53
|
+
color: var(--ck-ai-toolbar-button-hover-color);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/*
|
|
57
|
+
* Classes used by the "fake visual selection" displayed in the content
|
|
58
|
+
* when the AI dialog is open.
|
|
59
|
+
*
|
|
60
|
+
* Narrow down to <span> to prevent changing background for widgets and nested editables.
|
|
61
|
+
*/
|
|
62
|
+
.ck span.ck-fake-ai-selection {
|
|
63
|
+
background: var(--ck-color-ai-selection);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.ck .ck-widget.ck-fake-ai-selection {
|
|
67
|
+
outline-color: var(--ck-color-ai-selection);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/*
|
|
71
|
+
* Classes used by the "fake visual candidate selection" displayed in the content when an input
|
|
72
|
+
* in the AI dropdown has focus (the browser does not render the native selection in this state).
|
|
73
|
+
*
|
|
74
|
+
* Narrow down to <span> to prevent changing background for widgets and nested editables.
|
|
75
|
+
*/
|
|
76
|
+
.ck span.ck-fake-ai-selection-candidate {
|
|
77
|
+
background: var(--ck-color-ai-selection);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/* A collapsed fake visual selection. */
|
|
81
|
+
.ck .ck-fake-ai-selection_collapsed {
|
|
82
|
+
height: 100%;
|
|
83
|
+
border-right: 1px solid var(--ck-color-base-text);
|
|
84
|
+
margin-right: -1px;
|
|
85
|
+
outline: solid 1px hsla(0, 0%, 100%, .5);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/*
|
|
89
|
+
* Styles of the AI response field. The margins, font sizes and line-heights have been reduced
|
|
90
|
+
* to save space.
|
|
91
|
+
*
|
|
92
|
+
* Note: This class name is mentioned in the guide and acts like a public API.
|
|
93
|
+
*/
|
|
94
|
+
.ck.ck-content.ck-ai-form__content-field {
|
|
95
|
+
& h2 {
|
|
96
|
+
font-size: 1.3em;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
& h3 {
|
|
100
|
+
font-size: 1.2em;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
& h4, & h5, & h6 {
|
|
104
|
+
font-size: 1.1em;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
& h2, & h3, & h4, & h5, & h6, & p, & ul, & ol {
|
|
108
|
+
margin-block-start: .5em;
|
|
109
|
+
margin-block-end: .5em;
|
|
110
|
+
line-height: 1.7em;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
& > :first-child {
|
|
114
|
+
margin-top: 0;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
& > :last-child {
|
|
118
|
+
margin-bottom: 0;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M5 2.801a.7.7 0 0 0-.7.7v11.5a.8.8 0 0 1-1.6 0v-11.5a2.3 2.3 0 0 1 2.3-2.3h6.5a.8.8 0 0 1 0 1.6H5Zm.7 3.7a2.3 2.3 0 0 1 2.3-2.3h7a2.3 2.3 0 0 1 2.3 2.3v10a2.3 2.3 0 0 1-2.3 2.3H8a2.3 2.3 0 0 1-2.3-2.3v-10Zm2.3-.7a.7.7 0 0 0-.7.7v10a.7.7 0 0 0 .7.7h7a.7.7 0 0 0 .7-.7v-10a.7.7 0 0 0-.7-.7H8Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
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>
|
|
@@ -0,0 +1 @@
|
|
|
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>
|
|
@@ -0,0 +1 @@
|
|
|
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>
|