@ckeditor/ckeditor5-ai 46.1.1-alpha.3 → 47.0.0-alpha.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/LICENSE.md +18 -5
- package/README.md +10 -9
- package/build/ai.js +2 -2
- package/build/translations/af.js +1 -1
- package/build/translations/ar.js +1 -1
- package/build/translations/ast.js +1 -1
- package/build/translations/az.js +1 -1
- package/build/translations/be.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/en-gb.js +1 -1
- package/build/translations/eo.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/eu.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/gu.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/hy.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/kk.js +1 -1
- package/build/translations/km.js +1 -1
- package/build/translations/kn.js +1 -1
- package/build/translations/ko.js +1 -1
- package/build/translations/ku.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/nb.js +1 -1
- package/build/translations/ne.js +1 -1
- package/build/translations/nl.js +1 -1
- package/build/translations/no.js +1 -1
- package/build/translations/oc.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/si.js +1 -1
- package/build/translations/sk.js +1 -1
- package/build/translations/sl.js +1 -1
- package/build/translations/sq.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/ti.js +1 -1
- package/build/translations/tk.js +1 -1
- package/build/translations/tr.js +1 -1
- package/build/translations/tt.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/uz.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/ckeditor5-metadata.json +24 -3
- package/dist/index-content.css +0 -1
- package/dist/index-editor.css +2648 -0
- package/dist/index.css +3047 -0
- package/dist/index.js +4 -2
- package/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/lang/contexts.json +162 -1
- package/lang/translations/af.po +612 -0
- package/lang/translations/ar.po +628 -0
- package/lang/translations/ast.po +612 -0
- package/lang/translations/az.po +612 -0
- package/lang/translations/be.po +616 -0
- package/lang/translations/bg.po +612 -0
- package/lang/translations/bn.po +612 -0
- package/lang/translations/bs.po +616 -0
- package/lang/translations/ca.po +612 -0
- package/lang/translations/cs.po +616 -0
- package/lang/translations/da.po +612 -0
- package/lang/translations/de-ch.po +612 -0
- package/lang/translations/de.po +612 -0
- package/lang/translations/el.po +612 -0
- package/lang/translations/en-au.po +612 -0
- package/lang/translations/en-gb.po +612 -0
- package/lang/translations/en.po +612 -0
- package/lang/translations/eo.po +612 -0
- package/lang/translations/es-co.po +612 -0
- package/lang/translations/es.po +612 -0
- package/lang/translations/et.po +612 -0
- package/lang/translations/eu.po +612 -0
- package/lang/translations/fa.po +608 -0
- package/lang/translations/fi.po +612 -0
- package/lang/translations/fr.po +612 -0
- package/lang/translations/gl.po +612 -0
- package/lang/translations/gu.po +612 -0
- package/lang/translations/he.po +612 -0
- package/lang/translations/hi.po +612 -0
- package/lang/translations/hr.po +616 -0
- package/lang/translations/hu.po +612 -0
- package/lang/translations/hy.po +612 -0
- package/lang/translations/id.po +608 -0
- package/lang/translations/it.po +612 -0
- package/lang/translations/ja.po +608 -0
- package/lang/translations/jv.po +612 -0
- package/lang/translations/kk.po +612 -0
- package/lang/translations/km.po +608 -0
- package/lang/translations/kn.po +612 -0
- package/lang/translations/ko.po +608 -0
- package/lang/translations/ku.po +612 -0
- package/lang/translations/lt.po +616 -0
- package/lang/translations/lv.po +616 -0
- package/lang/translations/ms.po +608 -0
- package/lang/translations/nb.po +612 -0
- package/lang/translations/ne.po +612 -0
- package/lang/translations/nl.po +612 -0
- package/lang/translations/no.po +612 -0
- package/lang/translations/oc.po +612 -0
- package/lang/translations/pl.po +616 -0
- package/lang/translations/pt-br.po +612 -0
- package/lang/translations/pt.po +612 -0
- package/lang/translations/ro.po +616 -0
- package/lang/translations/ru.po +616 -0
- package/lang/translations/si.po +612 -0
- package/lang/translations/sk.po +616 -0
- package/lang/translations/sl.po +620 -0
- package/lang/translations/sq.po +612 -0
- package/lang/translations/sr-latn.po +616 -0
- package/lang/translations/sr.po +616 -0
- package/lang/translations/sv.po +612 -0
- package/lang/translations/th.po +608 -0
- package/lang/translations/ti.po +612 -0
- package/lang/translations/tk.po +612 -0
- package/lang/translations/tr.po +612 -0
- package/lang/translations/tt.po +608 -0
- package/lang/translations/ug.po +608 -0
- package/lang/translations/uk.po +616 -0
- package/lang/translations/ur.po +612 -0
- package/lang/translations/uz.po +612 -0
- package/lang/translations/vi.po +608 -0
- package/lang/translations/zh-cn.po +608 -0
- package/lang/translations/zh.po +608 -0
- package/package.json +23 -11
- package/src/aiactions/aiactions.d.ts +48 -0
- package/src/aiactions/aiactions.js +23 -0
- package/src/aiactions/model/aiactionsinteraction.d.ts +48 -0
- package/src/aiactions/model/aiactionsinteraction.js +23 -0
- package/src/aiactions/model/aiactionsreply.d.ts +15 -0
- package/src/aiactions/model/aiactionsreply.js +23 -0
- package/src/{adapters → aiassistant/adapters}/aiadapter.d.ts +1 -1
- package/src/aiassistant/adapters/aiadapter.js +23 -0
- package/src/{adapters → aiassistant/adapters}/aitextadapter.d.ts +9 -9
- package/src/aiassistant/adapters/aitextadapter.js +23 -0
- package/src/{adapters → aiassistant/adapters}/awstextadapter.d.ts +36 -23
- package/src/aiassistant/adapters/awstextadapter.js +23 -0
- package/src/{adapters → aiassistant/adapters}/openaitextadapter.d.ts +38 -25
- package/src/aiassistant/adapters/openaitextadapter.js +23 -0
- package/src/{aiassistant.d.ts → aiassistant/aiassistant.d.ts} +54 -13
- package/src/aiassistant/aiassistant.js +23 -0
- package/src/aiassistant/aiassistantediting.js +23 -0
- package/src/{aiassistantui.d.ts → aiassistant/aiassistantui.d.ts} +4 -4
- package/src/aiassistant/aiassistantui.js +23 -0
- package/src/aiassistant/legacyerrors.js +23 -0
- package/src/{ui → aiassistant/ui}/aiassistantcontroller.d.ts +5 -4
- package/src/aiassistant/ui/aiassistantcontroller.js +24 -0
- package/src/{ui → aiassistant/ui}/form/aiformcontentarea.d.ts +1 -1
- package/src/aiassistant/ui/form/aiformcontentarea.js +23 -0
- package/src/aiassistant/ui/form/aiformerrorview.js +23 -0
- package/src/{ui → aiassistant/ui}/form/aiformpromptview.d.ts +1 -1
- package/src/aiassistant/ui/form/aiformpromptview.js +23 -0
- package/src/{ui → aiassistant/ui}/form/aiformtoolbarview.d.ts +1 -1
- package/src/aiassistant/ui/form/aiformtoolbarview.js +23 -0
- package/src/{ui → aiassistant/ui}/form/aiformview.d.ts +1 -1
- package/src/aiassistant/ui/form/aiformview.js +23 -0
- package/src/{ui → aiassistant/ui}/form/aihistorylistitemview.d.ts +1 -1
- package/src/aiassistant/ui/form/aihistorylistitemview.js +23 -0
- package/src/{ui → aiassistant/ui}/form/aihistorylistview.d.ts +1 -1
- package/src/aiassistant/ui/form/aihistorylistview.js +23 -0
- package/src/{ui → aiassistant/ui}/form/prompthistory.d.ts +3 -0
- package/src/aiassistant/ui/form/prompthistory.js +23 -0
- package/src/{ui → aiassistant/ui}/showaiassistantcommand.d.ts +2 -2
- package/src/aiassistant/ui/showaiassistantcommand.js +23 -0
- package/src/{utils → aiassistant/utils}/common-translations.d.ts +1 -1
- package/src/{utils → aiassistant/utils}/common-translations.js +1 -1
- package/src/{utils → aiassistant/utils}/normalizecommandsconfig.d.ts +2 -2
- package/src/{utils → aiassistant/utils}/normalizecommandsconfig.js +1 -1
- package/src/aiballoon/aiballoon.d.ts +72 -0
- package/src/aiballoon/aiballoon.js +23 -0
- package/src/aiballoon/ui/aiballoondisclaimerview.d.ts +17 -0
- package/src/aiballoon/ui/aiballoondisclaimerview.js +23 -0
- package/src/aiballoon/ui/aiballoontoolbarview.d.ts +31 -0
- package/src/aiballoon/ui/aiballoontoolbarview.js +23 -0
- package/src/aiballoon/ui/aiballoonview.d.ts +109 -0
- package/src/aiballoon/ui/aiballoonview.js +23 -0
- package/src/aichat/aichat.d.ts +79 -0
- package/src/aichat/aichat.js +23 -0
- package/src/aichat/aichatcontroller.d.ts +68 -0
- package/src/aichat/aichatcontroller.js +23 -0
- package/src/aichat/aichatui.d.ts +297 -0
- package/src/aichat/aichatui.js +23 -0
- package/src/aichat/model/aichatcontext.d.ts +360 -0
- package/src/aichat/model/aichatcontext.js +23 -0
- package/src/aichat/model/aichatconversation.d.ts +270 -0
- package/src/aichat/model/aichatconversation.js +23 -0
- package/src/aichat/model/aichatinteraction.d.ts +46 -0
- package/src/aichat/model/aichatinteraction.js +23 -0
- package/src/aichat/model/aichatmodels.d.ts +77 -0
- package/src/aichat/model/aichatmodels.js +23 -0
- package/src/aichat/ui/aichatcontrolsview.d.ts +98 -0
- package/src/aichat/ui/aichatcontrolsview.js +23 -0
- package/src/aichat/ui/aichatfeedview.d.ts +114 -0
- package/src/aichat/ui/aichatfeedview.js +23 -0
- package/src/aichat/ui/aichatheaderview.d.ts +29 -0
- package/src/aichat/ui/aichatheaderview.js +23 -0
- package/src/aichat/ui/aichatview.d.ts +37 -0
- package/src/aichat/ui/aichatview.js +23 -0
- package/src/aichat/ui/controls/aichatchipsoverflowmanager.d.ts +71 -0
- package/src/aichat/ui/controls/aichatchipsoverflowmanager.js +23 -0
- package/src/aichat/ui/controls/aichatcontextitembuttonview.d.ts +46 -0
- package/src/aichat/ui/controls/aichatcontextitembuttonview.js +23 -0
- package/src/aichat/ui/controls/aichatcontextpanelurlinputview.d.ts +89 -0
- package/src/aichat/ui/controls/aichatcontextpanelurlinputview.js +23 -0
- package/src/aichat/ui/controls/aichatcontextpanelview.d.ts +105 -0
- package/src/aichat/ui/controls/aichatcontextpanelview.js +23 -0
- package/src/aichat/ui/controls/aichatcontrolsloaderview.d.ts +12 -0
- package/src/aichat/ui/controls/aichatcontrolsloaderview.js +23 -0
- package/src/aichat/ui/controls/aichatpromptcapabilitiesview.d.ts +89 -0
- package/src/aichat/ui/controls/aichatpromptcapabilitiesview.js +23 -0
- package/src/aichat/ui/controls/aichatpromptinputview.d.ts +44 -0
- package/src/aichat/ui/controls/aichatpromptinputview.js +23 -0
- package/src/aichat/ui/controls/aichatpromptsuggestionslistview.d.ts +17 -0
- package/src/aichat/ui/controls/aichatpromptsuggestionslistview.js +23 -0
- package/src/aichat/ui/controls/resources/aichatresourcelistitemview.d.ts +61 -0
- package/src/aichat/ui/controls/resources/aichatresourcelistitemview.js +23 -0
- package/src/aichat/ui/controls/resources/aichatresourcesballoonview.d.ts +100 -0
- package/src/aichat/ui/controls/resources/aichatresourcesballoonview.js +23 -0
- package/src/aichat/ui/controls/resources/aichatresourceslistview.d.ts +49 -0
- package/src/aichat/ui/controls/resources/aichatresourceslistview.js +23 -0
- package/src/aichat/ui/controls/resources/aichatresourcessearchinputview.d.ts +61 -0
- package/src/aichat/ui/controls/resources/aichatresourcessearchinputview.js +23 -0
- package/src/aichat/ui/controls/resources/aichatresourcesview.d.ts +54 -0
- package/src/aichat/ui/controls/resources/aichatresourcesview.js +23 -0
- package/src/aichat/ui/feed/aichatfeedcontextchipsview.d.ts +27 -0
- package/src/aichat/ui/feed/aichatfeedcontextchipsview.js +23 -0
- package/src/aichat/ui/feed/aichatfeederroritemview.d.ts +39 -0
- package/src/aichat/ui/feed/aichatfeederroritemview.js +23 -0
- package/src/aichat/ui/feed/aichatfeedinteractionheaderview.d.ts +29 -0
- package/src/aichat/ui/feed/aichatfeedinteractionheaderview.js +23 -0
- package/src/aichat/ui/feed/aichatfeeditemview.d.ts +46 -0
- package/src/aichat/ui/feed/aichatfeeditemview.js +23 -0
- package/src/aichat/ui/feed/aichatfeedreplyitemview.d.ts +46 -0
- package/src/aichat/ui/feed/aichatfeedreplyitemview.js +23 -0
- package/src/aichat/ui/feed/aichatfeedsuggestionitemactionsview.d.ts +74 -0
- package/src/aichat/ui/feed/aichatfeedsuggestionitemactionsview.js +23 -0
- package/src/aichat/ui/feed/aichatfeedsuggestionitemview.d.ts +74 -0
- package/src/aichat/ui/feed/aichatfeedsuggestionitemview.js +23 -0
- package/src/aichat/ui/feed/aichatfeedusermessageitem.d.ts +40 -0
- package/src/aichat/ui/feed/aichatfeedusermessageitem.js +23 -0
- package/src/aichat/utils/eventnames.d.ts +5 -0
- package/src/aichat/utils/eventnames.js +23 -0
- package/src/aichat/utils/promisequeue.d.ts +32 -0
- package/src/aichat/utils/promisequeue.js +23 -0
- package/src/aichat/utils/scrollmanager.d.ts +23 -0
- package/src/aichat/utils/scrollmanager.js +23 -0
- package/src/aichathistory/aichathistory.d.ts +30 -0
- package/src/aichathistory/aichathistory.js +23 -0
- package/src/aichathistory/aichathistorycontroller.d.ts +40 -0
- package/src/aichathistory/aichathistorycontroller.js +23 -0
- package/src/aichathistory/aichathistoryui.d.ts +112 -0
- package/src/aichathistory/aichathistoryui.js +23 -0
- package/src/aichathistory/model/aichathistoryconversations.d.ts +114 -0
- package/src/aichathistory/model/aichathistoryconversations.js +23 -0
- package/src/aichathistory/model/aichathistoryitem.d.ts +59 -0
- package/src/aichathistory/model/aichathistoryitem.js +23 -0
- package/src/aichathistory/ui/aichathistorylistitemview.d.ts +42 -0
- package/src/aichathistory/ui/aichathistorylistitemview.js +23 -0
- package/src/aichathistory/ui/aichathistorylistview.d.ts +31 -0
- package/src/aichathistory/ui/aichathistorylistview.js +23 -0
- package/src/aichathistory/ui/aichathistorysectionlistview.d.ts +17 -0
- package/src/aichathistory/ui/aichathistorysectionlistview.js +23 -0
- package/src/aichathistory/ui/aichathistoryview.d.ts +41 -0
- package/src/aichathistory/ui/aichathistoryview.js +23 -0
- package/src/aiconfig.d.ts +82 -31
- package/src/aicore/aiconnector.d.ts +302 -0
- package/src/aicore/aiconnector.js +23 -0
- package/src/aicore/aiediting.d.ts +61 -0
- package/src/aicore/aiediting.js +23 -0
- package/src/aicore/model/aicapabilities.d.ts +55 -0
- package/src/aicore/model/aicapabilities.js +23 -0
- package/src/aicore/model/aicontext.d.ts +53 -0
- package/src/aicore/model/aicontext.js +23 -0
- package/src/aicore/model/aiinteraction.d.ts +135 -0
- package/src/aicore/model/aiinteraction.js +23 -0
- package/src/aicore/model/aireply.d.ts +178 -0
- package/src/aicore/model/aireply.js +23 -0
- package/src/aicore/pipeline/airesponseapplier.d.ts +291 -0
- package/src/aicore/pipeline/airesponseapplier.js +24 -0
- package/src/aicore/pipeline/airesponseparser.d.ts +27 -0
- package/src/aicore/pipeline/airesponseparser.js +24 -0
- package/src/aicore/ui/aidisclaimerview.d.ts +17 -0
- package/src/aicore/ui/aidisclaimerview.js +23 -0
- package/src/aicore/ui/aiskeleton.d.ts +37 -0
- package/src/aicore/ui/aiskeleton.js +23 -0
- package/src/aicore/ui/aispinner.d.ts +14 -0
- package/src/aicore/ui/aispinner.js +23 -0
- package/src/aicore/ui/suggestioncontainer/aiminitoolbarview.d.ts +62 -0
- package/src/aicore/ui/suggestioncontainer/aiminitoolbarview.js +23 -0
- package/src/aicore/ui/suggestioncontainer/aisuggestionbodyview.d.ts +38 -0
- package/src/aicore/ui/suggestioncontainer/aisuggestionbodyview.js +23 -0
- package/src/aicore/ui/suggestioncontainer/aisuggestioncontainerview.d.ts +80 -0
- package/src/aicore/ui/suggestioncontainer/aisuggestioncontainerview.js +23 -0
- package/src/aicore/ui/suggestioncontainer/aisuggestioncontentpartview.d.ts +39 -0
- package/src/aicore/ui/suggestioncontainer/aisuggestioncontentpartview.js +23 -0
- package/src/aicore/ui/suggestioncontainer/aisuggestionheaderview.d.ts +39 -0
- package/src/aicore/ui/suggestioncontainer/aisuggestionheaderview.js +23 -0
- package/src/aicore/utils/common-translations.d.ts +9 -0
- package/src/aicore/utils/common-translations.js +23 -0
- package/src/aicore/utils/createresizebutton.d.ts +12 -0
- package/src/aicore/utils/createresizebutton.js +23 -0
- package/src/aicore/utils/documentposition.d.ts +41 -0
- package/src/aicore/utils/documentposition.js +23 -0
- package/src/aicore/utils/documentrange.d.ts +46 -0
- package/src/aicore/utils/documentrange.js +23 -0
- package/src/aicore/utils/eventnames.d.ts +9 -0
- package/src/aicore/utils/eventnames.js +23 -0
- package/src/aicore/utils/geteditorfromcontext.d.ts +6 -0
- package/src/aicore/utils/geteditorfromcontext.js +23 -0
- package/src/aicore/utils/getoperationsfromreply.d.ts +21 -0
- package/src/aicore/utils/getoperationsfromreply.js +23 -0
- package/src/aicore/utils/getsuggestionpartsfromreply.d.ts +19 -0
- package/src/aicore/utils/getsuggestionpartsfromreply.js +23 -0
- package/src/aicore/utils/htmlparser.d.ts +35 -0
- package/src/aicore/utils/htmlparser.js +23 -0
- package/src/aicore/utils/htmlstreamer.d.ts +123 -0
- package/src/aicore/utils/htmlstreamer.js +23 -0
- package/src/aiquickactions/aiquickactions.d.ts +41 -0
- package/src/aiquickactions/aiquickactions.js +23 -0
- package/src/aiquickactions/aiquickactionscommand.d.ts +12 -0
- package/src/aiquickactions/aiquickactionscommand.js +23 -0
- package/src/aiquickactions/aiquickactionsediting.d.ts +23 -0
- package/src/aiquickactions/aiquickactionsediting.js +23 -0
- package/src/aiquickactions/aiquickactionsui.d.ts +150 -0
- package/src/aiquickactions/aiquickactionsui.js +23 -0
- package/src/aiquickactions/ui/aiquickactionsbuttoncreator.d.ts +30 -0
- package/src/aiquickactions/ui/aiquickactionsbuttoncreator.js +23 -0
- package/src/aiquickactions/ui/aiquickactionsdropdowncontentview.d.ts +45 -0
- package/src/aiquickactions/ui/aiquickactionsdropdowncontentview.js +23 -0
- package/src/aiquickactions/ui/aiquickactionsdropdowncreator.d.ts +45 -0
- package/src/aiquickactions/ui/aiquickactionsdropdowncreator.js +23 -0
- package/src/aiquickactions/utils/common-translations.d.ts +9 -0
- package/src/aiquickactions/utils/common-translations.js +23 -0
- package/src/aireviewmode/aireviewmode.d.ts +30 -0
- package/src/aireviewmode/aireviewmode.js +23 -0
- package/src/aireviewmode/aireviewmodecontroller.d.ts +32 -0
- package/src/aireviewmode/aireviewmodecontroller.js +23 -0
- package/src/aireviewmode/aireviewmodeediting.d.ts +129 -0
- package/src/aireviewmode/aireviewmodeediting.js +23 -0
- package/src/aireviewmode/aireviewmodeui.d.ts +73 -0
- package/src/aireviewmode/aireviewmodeui.js +23 -0
- package/src/aireviewmode/model/aireviewcheck.d.ts +60 -0
- package/src/aireviewmode/model/aireviewcheck.js +23 -0
- package/src/aireviewmode/model/aireviewcheckcustom.d.ts +17 -0
- package/src/aireviewmode/model/aireviewcheckcustom.js +23 -0
- package/src/aireviewmode/model/aireviewchecklist.d.ts +31 -0
- package/src/aireviewmode/model/aireviewchecklist.js +23 -0
- package/src/aireviewmode/model/aireviewcheckresult.d.ts +39 -0
- package/src/aireviewmode/model/aireviewcheckresult.js +23 -0
- package/src/aireviewmode/model/aireviewcheckresultchange.d.ts +42 -0
- package/src/aireviewmode/model/aireviewcheckresultchange.js +23 -0
- package/src/aireviewmode/model/aireviewcheckrun.d.ts +101 -0
- package/src/aireviewmode/model/aireviewcheckrun.js +23 -0
- package/src/aireviewmode/model/aireviewcustomcheckrun.d.ts +18 -0
- package/src/aireviewmode/model/aireviewcustomcheckrun.js +23 -0
- package/src/aireviewmode/model/aireviewmodels.d.ts +26 -0
- package/src/aireviewmode/model/aireviewmodels.js +23 -0
- package/src/aireviewmode/model/aireviewsystemcheckrun.d.ts +14 -0
- package/src/aireviewmode/model/aireviewsystemcheckrun.js +23 -0
- package/src/aireviewmode/ui/aireviemodepromptinputview.d.ts +29 -0
- package/src/aireviewmode/ui/aireviemodepromptinputview.js +23 -0
- package/src/aireviewmode/ui/aireviewmodechecklistitemresultview.d.ts +46 -0
- package/src/aireviewmode/ui/aireviewmodechecklistitemresultview.js +23 -0
- package/src/aireviewmode/ui/aireviewmodecustomcheckview.d.ts +19 -0
- package/src/aireviewmode/ui/aireviewmodecustomcheckview.js +23 -0
- package/src/aireviewmode/ui/aireviewmodereviewchecklistview.d.ts +23 -0
- package/src/aireviewmode/ui/aireviewmodereviewchecklistview.js +23 -0
- package/src/aireviewmode/ui/aireviewmodereviewcheckresultsview.d.ts +80 -0
- package/src/aireviewmode/ui/aireviewmodereviewcheckresultsview.js +23 -0
- package/src/aireviewmode/ui/aireviewmodereviewcommandlistitemview.d.ts +45 -0
- package/src/aireviewmode/ui/aireviewmodereviewcommandlistitemview.js +23 -0
- package/src/aireviewmode/ui/aireviewmodereviewcompletedview.d.ts +18 -0
- package/src/aireviewmode/ui/aireviewmodereviewcompletedview.js +23 -0
- package/src/aireviewmode/ui/aireviewmodeview.d.ts +42 -0
- package/src/aireviewmode/ui/aireviewmodeview.js +23 -0
- package/src/aireviewmode/ui/form/aireviewmodeformamanager.d.ts +16 -0
- package/src/aireviewmode/ui/form/aireviewmodeformamanager.js +23 -0
- package/src/aireviewmode/ui/form/aireviewmodeformdropdown.d.ts +20 -0
- package/src/aireviewmode/ui/form/aireviewmodeformdropdown.js +23 -0
- package/src/aireviewmode/ui/form/aireviewmodeformmanager.d.ts +16 -0
- package/src/aireviewmode/ui/form/aireviewmodeformmanager.js +23 -0
- package/src/aireviewmode/utils/common-translations.d.ts +9 -0
- package/src/aireviewmode/utils/common-translations.js +23 -0
- package/src/aitabs/aitabs.d.ts +92 -0
- package/src/aitabs/aitabs.js +23 -0
- package/src/aitabs/aitabsmainview.d.ts +45 -0
- package/src/aitabs/aitabsmainview.js +23 -0
- package/src/aitabs/tabs/aitabsview.d.ts +147 -0
- package/src/aitabs/tabs/aitabsview.js +23 -0
- package/src/aitabs/tabs/tabbuttonview.d.ts +47 -0
- package/src/aitabs/tabs/tabbuttonview.js +23 -0
- package/src/aitabs/tabs/tabpanelview.d.ts +44 -0
- package/src/aitabs/tabs/tabpanelview.js +23 -0
- package/src/augmentation.d.ts +22 -6
- package/src/index.d.ts +40 -9
- package/src/index.js +1 -1
- package/theme/aiballoon/aiballoon.css +207 -0
- package/theme/aichat/aichat-controls/aichat-context-chip.css +139 -0
- package/theme/aichat/aichat-controls/aichat-context-controls-balloon-panels.css +194 -0
- package/theme/aichat/aichat-controls/aichat-context-controls.css +46 -0
- package/theme/aichat/aichat-controls/aichat-controls-button.css +74 -0
- package/theme/aichat/aichat-controls/aichat-controls-loader.css +93 -0
- package/theme/aichat/aichat-controls/prompt-capabilities.css +46 -0
- package/theme/aichat/aichat-controls/prompt-input.css +55 -0
- package/theme/aichat/aichat-controls.css +154 -0
- package/theme/aichat/aichat.css +68 -0
- package/theme/aichat/aichatfeed.css +376 -0
- package/theme/aichat/aichathistory.css +235 -0
- package/theme/aichat/aiminitoolbar.css +94 -0
- package/theme/aichat/aisuggestioncontainer.css +203 -0
- package/theme/aiquickactions/aiquickactions.css +43 -0
- package/theme/aireviewmode/aireviewmode-check-list.css +154 -0
- package/theme/aireviewmode/aireviewmode-check-run.css +202 -0
- package/theme/aireviewmode/aireviewmode-review-completed.css +52 -0
- package/theme/aireviewmode/aireviewmode.css +73 -0
- package/theme/aitabs/aitabsview.css +64 -0
- package/theme/aitabs/tabs/tabbuttonview.css +74 -0
- package/theme/aitabs/tabs/tabsview.css +78 -0
- package/theme/common/aibutton.css +145 -0
- package/theme/common/aichaterror.css +61 -0
- package/theme/common/aidisclaimer.css +29 -0
- package/theme/common/aiheader.css +88 -0
- package/theme/common/aiskeleton.css +54 -0
- package/theme/common/aispinner.css +58 -0
- package/src/adapters/aiadapter.js +0 -23
- package/src/adapters/aitextadapter.js +0 -23
- package/src/adapters/awstextadapter.js +0 -23
- package/src/adapters/openaitextadapter.js +0 -23
- package/src/aiassistant.js +0 -23
- package/src/aiassistantediting.js +0 -23
- package/src/aiassistantui.js +0 -23
- package/src/legacyerrors.js +0 -23
- package/src/ui/aiassistantcontroller.js +0 -24
- package/src/ui/form/aiformcontentarea.js +0 -23
- package/src/ui/form/aiformerrorview.js +0 -23
- package/src/ui/form/aiformpromptview.js +0 -23
- package/src/ui/form/aiformtoolbarview.js +0 -23
- package/src/ui/form/aiformview.js +0 -23
- package/src/ui/form/aihistorylistitemview.js +0 -23
- package/src/ui/form/aihistorylistview.js +0 -23
- package/src/ui/form/prompthistory.js +0 -23
- package/src/ui/showaiassistantcommand.js +0 -23
- /package/src/{aiassistantediting.d.ts → aiassistant/aiassistantediting.d.ts} +0 -0
- /package/src/{legacyerrors.d.ts → aiassistant/legacyerrors.d.ts} +0 -0
- /package/src/{ui → aiassistant/ui}/form/aiformerrorview.d.ts +0 -0
- /package/theme/{ai-dropdown.css → aiassistant/ai-dropdown.css} +0 -0
- /package/theme/{ai-form.css → aiassistant/ai-form.css} +0 -0
- /package/theme/{ai.css → aiassistant/ai.css} +0 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
function _0x17ff(_0x1f359a,_0x42bf1f){const _0x2ecd46=_0x2ecd();return _0x17ff=function(_0x17ff9e,_0x5daeca){_0x17ff9e=_0x17ff9e-0xf6;let _0x972f6e=_0x2ecd46[_0x17ff9e];return _0x972f6e;},_0x17ff(_0x1f359a,_0x42bf1f);}const _0x6d1f06=_0x17ff;function _0x2ecd(){const _0x594719=['reduce','same','createAt','36hJnyoE','createBefore','index','3571738hlFXrN','nextNode','data','end','ai-documentposition-index-out-of-bounds','6YcELXC','match','start','length','getNudgedToWordBoundary','3747954JcLIcV','createFromPath','1OhaaHj','882uPLtkr','3911281XTvFZK','slice','previousNode','1074308ATyVWv','path','parent','69864IDksIS','1181845efgdjz','indexOf','ai-documentposition-createfrompath-path-cannot-be-empty','15hygkBe','isEqual','createAfter','13143260jZpNSo','document'];_0x2ecd=function(){return _0x594719;};return _0x2ecd();}(function(_0x151d92,_0x1a7119){const _0x236545=_0x17ff,_0x5081a3=_0x151d92();while(!![]){try{const _0x1f033b=-parseInt(_0x236545(0xfc))/0x1*(-parseInt(_0x236545(0x113))/0x2)+-parseInt(_0x236545(0xfa))/0x3+parseInt(_0x236545(0x101))/0x4*(parseInt(_0x236545(0x108))/0x5)+parseInt(_0x236545(0x118))/0x6*(parseInt(_0x236545(0x105))/0x7)+-parseInt(_0x236545(0x104))/0x8*(parseInt(_0x236545(0xfd))/0x9)+parseInt(_0x236545(0x10b))/0xa+-parseInt(_0x236545(0xfe))/0xb*(parseInt(_0x236545(0x110))/0xc);if(_0x1f033b===_0x1a7119)break;else _0x5081a3['push'](_0x5081a3['shift']());}catch(_0x3a3e02){_0x5081a3['push'](_0x5081a3['shift']());}}}(_0x2ecd,0xdc6f0));import{CKEditorError as _0x1d9b96,compareArrays as _0x3f35f}from'ckeditor5/src/utils.js';import{getNodePath as _0x832899,isText as _0x1e56ac,getChildren as _0x2669f1,isDocument as _0x1f9607,getParent as _0x759548,textContent as _0x4370f0,hasChildren as _0x5346bb}from'./htmlparser.js';export class DocumentPosition{[_0x6d1f06(0x103)];[_0x6d1f06(0x112)];[_0x6d1f06(0x10c)];constructor(_0x44cb40,_0x2c1f25,_0x2fbcf2){const _0x15f7a8=_0x6d1f06;if(_0x1e56ac(_0x2c1f25)&&_0x2fbcf2>_0x2c1f25[_0x15f7a8(0x115)][_0x15f7a8(0xf8)])throw new _0x1d9b96(_0x15f7a8(0x117),null,{'index':_0x2fbcf2,'parent':_0x2c1f25});if(_0x5346bb(_0x2c1f25)&&_0x2fbcf2>_0x2669f1(_0x2c1f25)[_0x15f7a8(0xf8)])throw new _0x1d9b96(_0x15f7a8(0x117),null,{'index':_0x2fbcf2,'parent':_0x2c1f25});if(_0x2fbcf2<0x0)throw new _0x1d9b96(_0x15f7a8(0x117),null,{'index':_0x2fbcf2,'parent':_0x2c1f25});this[_0x15f7a8(0x103)]=_0x2c1f25,this[_0x15f7a8(0x112)]=_0x2fbcf2,this[_0x15f7a8(0x10c)]=_0x44cb40;}get[_0x6d1f06(0x102)](){const _0x55268f=_0x6d1f06;return[..._0x832899(this[_0x55268f(0x103)]),this[_0x55268f(0x112)]];}[_0x6d1f06(0x109)](_0xf6640a){const _0x55dbee=_0x6d1f06;return this[_0x55dbee(0x10c)]==_0xf6640a[_0x55dbee(0x10c)]&&_0x55dbee(0x10e)===_0x3f35f(this[_0x55dbee(0x102)],_0xf6640a[_0x55dbee(0x102)]);}get[_0x6d1f06(0x114)](){const _0x49d808=_0x6d1f06;if(_0x5346bb(this[_0x49d808(0x103)])){const _0x3393a4=_0x2669f1(this[_0x49d808(0x103)])[this[_0x49d808(0x112)]];if(_0x3393a4)return _0x3393a4;{const _0x23801a=DocumentPosition[_0x49d808(0x10a)](this[_0x49d808(0x10c)],this[_0x49d808(0x103)]);if(_0x23801a)return _0x23801a[_0x49d808(0x114)];}}return null;}get[_0x6d1f06(0x100)](){const _0x439366=_0x6d1f06;if(_0x5346bb(this[_0x439366(0x103)])){const _0x356528=_0x2669f1(this[_0x439366(0x103)])[this[_0x439366(0x112)]-0x1];if(_0x356528)return _0x356528;{const _0x51a7ca=DocumentPosition[_0x439366(0x111)](this[_0x439366(0x10c)],this[_0x439366(0x103)]);if(_0x51a7ca)return _0x51a7ca[_0x439366(0x100)];}}return null;}[_0x6d1f06(0xf9)](_0xeac353=_0x6d1f06(0xf7)){const _0x4533b3=_0x6d1f06;if(!_0x1e56ac(this[_0x4533b3(0x103)]))return this;const _0x1cbd3f=this[_0x4533b3(0x102)][this[_0x4533b3(0x102)][_0x4533b3(0xf8)]-0x1],_0x25f73d=_0x4370f0(this[_0x4533b3(0x103)])[_0x4533b3(0xf6)](/(?:\s*\S+\s*)/g);let _0x21157e=0x0,_0x47e0d7=_0x1cbd3f;for(const _0x432744 of _0x25f73d){if(_0x21157e+_0x432744[_0x4533b3(0xf8)]===_0x1cbd3f)return this;if(_0x21157e+_0x432744[_0x4533b3(0xf8)]>_0x1cbd3f){_0x47e0d7=_0x4533b3(0xf7)===_0xeac353?_0x21157e:_0x21157e+_0x432744[_0x4533b3(0xf8)];break;}_0x21157e+=_0x432744[_0x4533b3(0xf8)];}return DocumentPosition[_0x4533b3(0x10f)](this[_0x4533b3(0x10c)],this[_0x4533b3(0x103)],_0x47e0d7);}static[_0x6d1f06(0x10a)](_0x3300f7,_0x1041b1){const _0x19ab1c=_0x6d1f06;if(_0x1f9607(_0x1041b1))return null;const _0x5575fe=_0x759548(_0x1041b1);return DocumentPosition[_0x19ab1c(0x10f)](_0x3300f7,_0x5575fe,_0x2669f1(_0x5575fe)[_0x19ab1c(0x106)](_0x1041b1)+0x1);}static[_0x6d1f06(0x111)](_0x4963da,_0x3bf016){const _0x1fa788=_0x6d1f06;if(_0x1f9607(_0x3bf016))return null;const _0x3a0d95=_0x759548(_0x3bf016);return DocumentPosition[_0x1fa788(0x10f)](_0x4963da,_0x3a0d95,_0x2669f1(_0x3a0d95)[_0x1fa788(0x106)](_0x3bf016));}static[_0x6d1f06(0x10f)](_0x1b195f,_0x2e3dfc,_0x4f2a2f=_0x6d1f06(0xf7)){const _0xe9e49d=_0x6d1f06;return new DocumentPosition(_0x1b195f,_0x2e3dfc,_0xe9e49d(0xf7)===_0x4f2a2f?0x0:_0xe9e49d(0x116)===_0x4f2a2f?_0x1e56ac(_0x2e3dfc)?_0x2e3dfc[_0xe9e49d(0x115)][_0xe9e49d(0xf8)]:_0x2669f1(_0x2e3dfc)[_0xe9e49d(0xf8)]:_0x4f2a2f);}static[_0x6d1f06(0xfb)](_0x166e50,_0x562b75){const _0x4b3fd7=_0x6d1f06;if(!_0x562b75[_0x4b3fd7(0xf8)])throw new _0x1d9b96(_0x4b3fd7(0x107),null,{'path':_0x562b75});const _0x3e38f5=_0x562b75[_0x4b3fd7(0xff)](0x0,-0x1)[_0x4b3fd7(0x10d)]((_0x32f8fb,_0x371484)=>_0x1e56ac(_0x32f8fb)?_0x32f8fb:_0x2669f1(_0x32f8fb)[_0x371484],_0x166e50);return DocumentPosition[_0x4b3fd7(0x10f)](_0x166e50,_0x3e38f5,_0x562b75[_0x562b75[_0x4b3fd7(0xf8)]-0x1]);}}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module ai/aicore/utils/documentrange
|
|
7
|
+
*/
|
|
8
|
+
import { DocumentPosition } from './documentposition.js';
|
|
9
|
+
import { Document } from './htmlparser.js';
|
|
10
|
+
/**
|
|
11
|
+
* Represents a range in a htmlparser's Document limited by two
|
|
12
|
+
* {@link module:ai/aicore/utils/documentposition~DocumentPosition} instances.
|
|
13
|
+
*/
|
|
14
|
+
export declare class DocumentRange {
|
|
15
|
+
readonly start: DocumentPosition;
|
|
16
|
+
readonly end: DocumentPosition;
|
|
17
|
+
constructor(start: DocumentPosition, end: DocumentPosition);
|
|
18
|
+
isEqual(otherRange: DocumentRange): boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Nudges {@link #start} and {@link #end} positions to the word boundary so that the range does not split
|
|
21
|
+
* a word.
|
|
22
|
+
*
|
|
23
|
+
* See {@link module:ai/aicore/utils/documentposition~DocumentPosition#getNudgedToWordBoundary} for more details.
|
|
24
|
+
*/
|
|
25
|
+
getNudgedToWordBoundary(): DocumentRange;
|
|
26
|
+
/**
|
|
27
|
+
* Returns a document with the content of this range. The content is extracted from the original document,
|
|
28
|
+
* preserving the original structure.
|
|
29
|
+
*
|
|
30
|
+
* For instance, for the following document and range:
|
|
31
|
+
*
|
|
32
|
+
* ```html
|
|
33
|
+
* <p>fo[o</p>
|
|
34
|
+
* <p>bar <b>ba]z</b></p>
|
|
35
|
+
* <p>qux</p>
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* the resulting document will be
|
|
39
|
+
*
|
|
40
|
+
* ```html
|
|
41
|
+
* <p>o</p>
|
|
42
|
+
* <p>bar <b>ba</b></p>
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
getContent(): Document;
|
|
46
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
function _0x2a09(_0x326a2e,_0x9bbb4e){const _0x1e7b0d=_0x1e7b();return _0x2a09=function(_0x2a09a1,_0xd85b29){_0x2a09a1=_0x2a09a1-0x11c;let _0x655887=_0x1e7b0d[_0x2a09a1];return _0x655887;},_0x2a09(_0x326a2e,_0x9bbb4e);}const _0x4419d7=_0x2a09;(function(_0x1e8d73,_0x84dd69){const _0x498f53=_0x2a09,_0x5108e3=_0x1e8d73();while(!![]){try{const _0x239ffc=-parseInt(_0x498f53(0x136))/0x1*(parseInt(_0x498f53(0x139))/0x2)+-parseInt(_0x498f53(0x11d))/0x3+parseInt(_0x498f53(0x122))/0x4+parseInt(_0x498f53(0x135))/0x5*(-parseInt(_0x498f53(0x129))/0x6)+parseInt(_0x498f53(0x11c))/0x7*(-parseInt(_0x498f53(0x12d))/0x8)+-parseInt(_0x498f53(0x125))/0x9+parseInt(_0x498f53(0x120))/0xa*(parseInt(_0x498f53(0x126))/0xb);if(_0x239ffc===_0x84dd69)break;else _0x5108e3['push'](_0x5108e3['shift']());}catch(_0x23506e){_0x5108e3['push'](_0x5108e3['shift']());}}}(_0x1e7b,0x38bbf));import{DocumentPosition as _0x1be4cb}from'./documentposition.js';function _0x1e7b(){const _0xe735ec=['length','previousNode','102528CUxHzy','createAt','slice','parent','data','push','path','includes','25wxBkpe','13tPmvIP','end','getNudgedToWordBoundary','10174tjgyvp','getContent','forEach','reverse','createBefore','35qwOSGp','645474bUuZsq','lastChild','firstChild','918670VBGYOa','createFromPath','329660JnxYtF','nextNode','isEqual','3458034iifRas','154vfddWY','createAfter','start','487890YkaACz','document'];_0x1e7b=function(){return _0xe735ec;};return _0x1e7b();}import{clone as _0x296600,getParents as _0x2a2a0e,Document as _0x2a62ea,Text as _0x38420e,isTag as _0x1166a5,isText as _0x290838,replaceElement as _0x2d21dc,removeElement as _0x2aec4a}from'./htmlparser.js';export class DocumentRange{[_0x4419d7(0x128)];[_0x4419d7(0x137)];constructor(_0x2746be,_0x3fcef2){const _0x3fae48=_0x4419d7;this[_0x3fae48(0x128)]=_0x2746be,this[_0x3fae48(0x137)]=_0x3fcef2;}[_0x4419d7(0x124)](_0x5a4343){const _0x3a2b4d=_0x4419d7;return this==_0x5a4343||this[_0x3a2b4d(0x128)][_0x3a2b4d(0x124)](_0x5a4343[_0x3a2b4d(0x128)])&&this[_0x3a2b4d(0x137)][_0x3a2b4d(0x124)](_0x5a4343[_0x3a2b4d(0x137)]);}[_0x4419d7(0x138)](){const _0xf70c56=_0x4419d7;return new DocumentRange(this[_0xf70c56(0x128)][_0xf70c56(0x138)](_0xf70c56(0x128)),this[_0xf70c56(0x137)][_0xf70c56(0x138)](_0xf70c56(0x137)));}[_0x4419d7(0x13a)](){const _0x41ecbd=_0x4419d7,_0x2c53b5=_0x296600(this[_0x41ecbd(0x128)][_0x41ecbd(0x12a)]),_0x4f7e00=_0x1be4cb[_0x41ecbd(0x121)](_0x2c53b5,this[_0x41ecbd(0x128)][_0x41ecbd(0x133)]),_0xf15158=_0x1be4cb[_0x41ecbd(0x121)](_0x2c53b5,this[_0x41ecbd(0x137)][_0x41ecbd(0x133)]);let _0x2f34cd,_0x2c0220;if(_0x290838(_0x4f7e00[_0x41ecbd(0x130)])){const _0x58cb1f=_0x4f7e00[_0x41ecbd(0x133)][_0x4f7e00[_0x41ecbd(0x133)][_0x41ecbd(0x12b)]-0x1],_0x2bae95=new _0x38420e(_0x4f7e00[_0x41ecbd(0x130)][_0x41ecbd(0x131)][_0x41ecbd(0x12f)](_0x58cb1f));_0x2d21dc(_0x4f7e00[_0x41ecbd(0x130)],_0x2bae95),_0x2f34cd=_0x2bae95;}else _0x2f34cd=_0x4f7e00[_0x41ecbd(0x123)];if(_0x290838(_0xf15158[_0x41ecbd(0x130)])){const _0x37ccab=_0xf15158[_0x41ecbd(0x133)][_0xf15158[_0x41ecbd(0x133)][_0x41ecbd(0x12b)]-0x1],_0x65dfd8=new _0x38420e(_0xf15158[_0x41ecbd(0x130)][_0x41ecbd(0x131)][_0x41ecbd(0x12f)](0x0,_0x37ccab));_0x2d21dc(_0xf15158[_0x41ecbd(0x130)],_0x65dfd8),_0x2c0220=_0x65dfd8;}else _0x2c0220=_0xf15158[_0x41ecbd(0x12c)];if(!(_0x2f34cd&&_0x2c0220&&_0x2c53b5[_0x41ecbd(0x11f)]&&_0x2c53b5[_0x41ecbd(0x11e)]))return new _0x2a62ea([]);const _0x31f24e=_0x2a2a0e(_0x2f34cd),_0x3dbdbc=_0x2a2a0e(_0x2c0220),_0x54543e=[],_0x3cf907=[];let _0x218f37=_0x2c53b5[_0x41ecbd(0x11f)];for(;_0x218f37&&_0x218f37!==_0x2f34cd;){let _0x4480bb;_0x31f24e[_0x41ecbd(0x134)](_0x218f37)||_0x54543e[_0x41ecbd(0x132)](_0x218f37),_0x4480bb=_0x1166a5(_0x218f37)?_0x1be4cb[_0x41ecbd(0x12e)](_0x2c53b5,_0x218f37,_0x41ecbd(0x128)):_0x1be4cb[_0x41ecbd(0x127)](_0x2c53b5,_0x218f37),_0x218f37=_0x4480bb?_0x4480bb[_0x41ecbd(0x123)]:null;}for(_0x218f37=_0x2c53b5[_0x41ecbd(0x11e)];_0x218f37&&_0x218f37!==_0x2c0220;){let _0x405df6;_0x3dbdbc[_0x41ecbd(0x134)](_0x218f37)||_0x3cf907[_0x41ecbd(0x132)](_0x218f37),_0x405df6=_0x1166a5(_0x218f37)?_0x1be4cb[_0x41ecbd(0x12e)](_0x2c53b5,_0x218f37,_0x41ecbd(0x137)):_0x1be4cb[_0x41ecbd(0x13d)](_0x2c53b5,_0x218f37),_0x218f37=_0x405df6?_0x405df6[_0x41ecbd(0x12c)]:null;}return _0x54543e[_0x41ecbd(0x13b)](_0x1089ed=>{_0x2aec4a(_0x1089ed);}),_0x3cf907[_0x41ecbd(0x13c)]()[_0x41ecbd(0x13b)](_0x2d605e=>{_0x2aec4a(_0x2d605e);}),_0x2c53b5;}}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module ai/aicore/utils/eventnames
|
|
7
|
+
* @publicApi
|
|
8
|
+
*/
|
|
9
|
+
export declare const AI_SUGGESTION_UI_EVENT_NAMES: readonly ["showChangeInText", "insertSuggestion", "applySuggestion", "rejectSuggestion", "mouseOverSuggestion", "mouseLeaveSuggestion", "toggleSuggestionDisplayMode", "like", "dislike"];
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
function _0x5ee2(_0x20add0,_0x1e59b1){const _0x199649=_0x1996();return _0x5ee2=function(_0x5ee215,_0x4ca7f3){_0x5ee215=_0x5ee215-0x19f;let _0x51f8f3=_0x199649[_0x5ee215];return _0x51f8f3;},_0x5ee2(_0x20add0,_0x1e59b1);}const _0x53ea4f=_0x5ee2;(function(_0x2eae65,_0x612281){const _0x53ab4e=_0x5ee2,_0x23f344=_0x2eae65();while(!![]){try{const _0x5dd260=parseInt(_0x53ab4e(0x1a0))/0x1*(-parseInt(_0x53ab4e(0x1b3))/0x2)+parseInt(_0x53ab4e(0x19f))/0x3+parseInt(_0x53ab4e(0x1ae))/0x4*(parseInt(_0x53ab4e(0x1a4))/0x5)+-parseInt(_0x53ab4e(0x1a3))/0x6*(-parseInt(_0x53ab4e(0x1a6))/0x7)+parseInt(_0x53ab4e(0x1a5))/0x8+parseInt(_0x53ab4e(0x1a9))/0x9*(parseInt(_0x53ab4e(0x1ad))/0xa)+parseInt(_0x53ab4e(0x1b0))/0xb*(-parseInt(_0x53ab4e(0x1af))/0xc);if(_0x5dd260===_0x612281)break;else _0x23f344['push'](_0x23f344['shift']());}catch(_0x4cc9b0){_0x23f344['push'](_0x23f344['shift']());}}}(_0x1996,0xab1d0));export const AI_SUGGESTION_UI_EVENT_NAMES=[_0x53ea4f(0x1b1),_0x53ea4f(0x1ab),_0x53ea4f(0x1a2),_0x53ea4f(0x1a1),_0x53ea4f(0x1b2),_0x53ea4f(0x1a8),_0x53ea4f(0x1aa),_0x53ea4f(0x1a7),_0x53ea4f(0x1ac)];function _0x1996(){const _0x48b430=['660723NHDGcQ','174821yuJoQc','rejectSuggestion','applySuggestion','12zlMJNK','163105QfMvFd','3730760hZVsem','2822869GCYSBq','like','mouseLeaveSuggestion','9zyJQnG','toggleSuggestionDisplayMode','insertSuggestion','dislike','132510mcWqGe','16cFqeyx','31212bTYjRF','1001MgkzXc','showChangeInText','mouseOverSuggestion','8DrRTHW'];_0x1996=function(){return _0x48b430;};return _0x1996();}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
import { type ContextInterface, Editor } from 'ckeditor5/src/core.js';
|
|
6
|
+
export declare function getEditorFromContext(context: ContextInterface): Editor;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
function _0x294a(){var _0x5e66e0=['2960116NwuHmr','get','701uvkfWT','4768211OkEtoj','ai-get-editor-from-context-no-editor','length','3788850xkIkdy','2638HNldul','5990165IZixsh','8pgBMhR','5152086XwHHlP','17307162qdYRlT','AIChat:\x20Multiple\x20editor\x20instances\x20detected.\x20Only\x20the\x20first\x20editor\x20instance\x20will\x20be\x20used\x20for\x20AI\x20operations.\x20This\x20configuration\x20is\x20not\x20fully\x20supported\x20and\x20may\x20lead\x20to\x20unexpected\x20behavior.','10WWIXpB','editors','warn'];_0x294a=function(){return _0x5e66e0;};return _0x294a();}(function(_0x357d76,_0x52be05){var _0x38384f=_0x315b,_0x364a52=_0x357d76();while(!![]){try{var _0x25a1e7=-parseInt(_0x38384f(0x124))/0x1*(-parseInt(_0x38384f(0x129))/0x2)+parseInt(_0x38384f(0x128))/0x3+parseInt(_0x38384f(0x132))/0x4+parseInt(_0x38384f(0x12a))/0x5+-parseInt(_0x38384f(0x12c))/0x6+-parseInt(_0x38384f(0x125))/0x7*(parseInt(_0x38384f(0x12b))/0x8)+-parseInt(_0x38384f(0x12d))/0x9*(parseInt(_0x38384f(0x12f))/0xa);if(_0x25a1e7===_0x52be05)break;else _0x364a52['push'](_0x364a52['shift']());}catch(_0x36160d){_0x364a52['push'](_0x364a52['shift']());}}}(_0x294a,0xa1ce7));import{CKEditorError as _0xdb0d27}from'ckeditor5/src/utils.js';import{Editor as _0x3fb3ec}from'ckeditor5/src/core.js';function _0x315b(_0x34cb19,_0x2e9fc0){var _0x294a98=_0x294a();return _0x315b=function(_0x315b81,_0x51dc66){_0x315b81=_0x315b81-0x123;var _0x6b60ec=_0x294a98[_0x315b81];return _0x6b60ec;},_0x315b(_0x34cb19,_0x2e9fc0);}export function getEditorFromContext(_0x177862){var _0x396476=_0x315b;if(_0x177862 instanceof _0x3fb3ec)return _0x177862;if(_0x177862?.[_0x396476(0x130)]&&_0x177862[_0x396476(0x130)][_0x396476(0x123)](0x0))return _0x177862[_0x396476(0x130)][_0x396476(0x127)]>0x1&&console[_0x396476(0x131)](_0x396476(0x12e)),_0x177862[_0x396476(0x130)][_0x396476(0x123)](0x0);throw new _0xdb0d27(_0x396476(0x126));}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module ai/aicore/utils/getoperationsfromreply
|
|
7
|
+
*/
|
|
8
|
+
import { type DocumentCompare, type DocumentCompareOptions } from '@ckeditor/ckeditor5-collaboration-core';
|
|
9
|
+
import { type Operation } from 'ckeditor5/src/engine.js';
|
|
10
|
+
import { type AIInteraction } from '../model/aiinteraction.js';
|
|
11
|
+
import type { AIReply, AIReplyChangeGroup } from '../model/aireply.js';
|
|
12
|
+
import { type Editor } from 'ckeditor5/src/core.js';
|
|
13
|
+
export declare function getOperationsFromReply({ editor, interaction, reply, groups, transform, documentCompare, documentCompareOptions }: {
|
|
14
|
+
editor: Editor;
|
|
15
|
+
interaction: AIInteraction;
|
|
16
|
+
reply: AIReply;
|
|
17
|
+
transform: boolean;
|
|
18
|
+
groups: Array<AIReplyChangeGroup>;
|
|
19
|
+
documentCompare: DocumentCompare;
|
|
20
|
+
documentCompareOptions: DocumentCompareOptions;
|
|
21
|
+
}): Array<Operation>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
function _0x39eb(){const _0x13a7a9=['node','2636aGTOIY','2222178risAOv','11148QsJihr','data-id','new','removed','document','operationsA','map','previousSibling','length','15pFVIoJ','type','99APPlCA','version','56114qNtQwa','342816WoKHao','documentContextContent','632367wHfOyp','3RtPfwf','getOperations','shift','cloneNode','698090XHAevz','history','getDiff','filter','95bkkxzU','model','content','anchorId','getDocumentContext'];_0x39eb=function(){return _0x13a7a9;};return _0x39eb();}function _0x5402(_0x4a0635,_0x1a7ab0){const _0x39eb2a=_0x39eb();return _0x5402=function(_0x540204,_0x58a114){_0x540204=_0x540204-0xc1;let _0x3ab428=_0x39eb2a[_0x540204];return _0x3ab428;},_0x5402(_0x4a0635,_0x1a7ab0);}(function(_0x2b4f8b,_0x1af2ed){const _0xdb4a9=_0x5402,_0x594531=_0x2b4f8b();while(!![]){try{const _0x5b4d5b=parseInt(_0xdb4a9(0xd8))/0x1*(-parseInt(_0xdb4a9(0xd4))/0x2)+parseInt(_0xdb4a9(0xd0))/0x3*(-parseInt(_0xdb4a9(0xc5))/0x4)+-parseInt(_0xdb4a9(0xe0))/0x5*(parseInt(_0xdb4a9(0xc7))/0x6)+-parseInt(_0xdb4a9(0xc6))/0x7+parseInt(_0xdb4a9(0xd5))/0x8+-parseInt(_0xdb4a9(0xd7))/0x9+parseInt(_0xdb4a9(0xdc))/0xa*(parseInt(_0xdb4a9(0xd2))/0xb);if(_0x5b4d5b===_0x1af2ed)break;else _0x594531['push'](_0x594531['shift']());}catch(_0x5bc12a){_0x594531['push'](_0x594531['shift']());}}}(_0x39eb,0x27388));import{transformOperationSets as _0x4cc757}from'ckeditor5/src/engine.js';import{append as _0x283153,findByAttribute as _0xe20e5b,prependChild as _0x2ef191,removeElement as _0x41dc3e,serialize as _0xf0983a}from'./htmlparser.js';export function getOperationsFromReply({editor:_0x199015,interaction:_0x19a600,reply:_0x530d80,groups:_0x7f75d8,transform:_0x1cfbb3,documentCompare:_0x2302ff,documentCompareOptions:_0x1264a2}){const _0x5dd573=_0x5402,_0x54414f=_0x19a600[_0x5dd573(0xc3)]();if(!_0x54414f)return[];const _0x31298a=_0x54414f[_0x5dd573(0xc1)],_0x54f578=_0x54414f[_0x5dd573(0xd3)],_0x9e371c=_0x530d80[_0x5dd573(0xd6)][_0x5dd573(0xdb)](!0x0);for(const {changes:_0x34403b}of _0x7f75d8){const _0x524987=_0x34403b[_0x5dd573(0xdf)](_0x5bd6ed=>_0x5dd573(0xc9)!=_0x5bd6ed[_0x5dd573(0xd1)])[_0x5dd573(0xcd)](_0x6faa7b=>_0xe20e5b(_0x5dd573(0xc8),_0x6faa7b['id'],_0x9e371c)),_0x43dd2e=_0x34403b[_0x5dd573(0xdf)](_0x20f19d=>_0x5dd573(0xca)!=_0x20f19d[_0x5dd573(0xd1)])[_0x5dd573(0xcd)](_0x40f2bb=>_0x40f2bb[_0x5dd573(0xc4)][_0x5dd573(0xdb)](!0x0));let _0x372377=null;if(_0x524987[_0x5dd573(0xcf)]){_0x372377=_0x524987[0x0][_0x5dd573(0xce)];for(let _0x1c4eae=0x0;_0x1c4eae<_0x524987[_0x5dd573(0xcf)];_0x1c4eae++)_0x41dc3e(_0x524987[_0x1c4eae]);}if(_0x43dd2e[_0x5dd573(0xcf)]){_0x372377||(_0x34403b[0x0][_0x5dd573(0xc2)]?_0x372377=_0xe20e5b(_0x5dd573(0xc8),_0x34403b[0x0][_0x5dd573(0xc2)],_0x9e371c):(_0x372377=_0x43dd2e[_0x5dd573(0xda)](),_0x2ef191(_0x9e371c,_0x372377)));for(let _0x1beb88=0x0;_0x1beb88<_0x43dd2e[_0x5dd573(0xcf)];_0x1beb88++)_0x283153(_0x372377,_0x43dd2e[_0x1beb88]),_0x372377=_0x43dd2e[_0x1beb88];}}const _0x556489=_0xf0983a(_0x9e371c),_0x528365=_0x2302ff[_0x5dd573(0xde)](_0x31298a,_0x556489,_0x1264a2)[_0x5dd573(0xd9)]();if(_0x1cfbb3){const _0x4cb7ad=_0x199015[_0x5dd573(0xe1)][_0x5dd573(0xcb)][_0x5dd573(0xdd)][_0x5dd573(0xd9)](_0x54f578),_0x3db59b={'document':_0x199015[_0x5dd573(0xe1)][_0x5dd573(0xcb)],'useRelations':!0x1,'padWithNoOps':!0x1};return _0x4cc757(_0x528365,_0x4cb7ad,_0x3db59b)[_0x5dd573(0xcc)];}return _0x528365;}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
import { type Editor } from 'ckeditor5/src/core.js';
|
|
6
|
+
import { Document } from './htmlparser.js';
|
|
7
|
+
import { type AIReplyChangeGroup } from '../model/aireply.js';
|
|
8
|
+
export declare function getSuggestionPartsFromReply({ editor, changeGroups, documentContextContent, showDiff, trimUnchanged }: {
|
|
9
|
+
editor: Editor;
|
|
10
|
+
showDiff: boolean;
|
|
11
|
+
changeGroups: Array<AIReplyChangeGroup>;
|
|
12
|
+
documentContextContent: Document;
|
|
13
|
+
trimUnchanged?: boolean;
|
|
14
|
+
}): Array<AISuggestionContentPartDefinition>;
|
|
15
|
+
export type AISuggestionContentPartDefinition = {
|
|
16
|
+
type: 'modified' | 'new' | 'removed' | 'context';
|
|
17
|
+
index: number;
|
|
18
|
+
content: Document | null;
|
|
19
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
(function(_0x38bd9d,_0x4165d6){const _0x5a7a6e=_0x45f4,_0x229430=_0x38bd9d();while(!![]){try{const _0x59f605=parseInt(_0x5a7a6e(0x1ad))/0x1+parseInt(_0x5a7a6e(0x1aa))/0x2+parseInt(_0x5a7a6e(0x192))/0x3*(-parseInt(_0x5a7a6e(0x18d))/0x4)+parseInt(_0x5a7a6e(0x17f))/0x5*(-parseInt(_0x5a7a6e(0x1a4))/0x6)+parseInt(_0x5a7a6e(0x185))/0x7+parseInt(_0x5a7a6e(0x19d))/0x8*(-parseInt(_0x5a7a6e(0x183))/0x9)+parseInt(_0x5a7a6e(0x1bf))/0xa;if(_0x59f605===_0x4165d6)break;else _0x229430['push'](_0x229430['shift']());}catch(_0x30c9bf){_0x229430['push'](_0x229430['shift']());}}}(_0x3e08,0x18bc8));import{findOne as _0x390fba,getAttribute as _0x45ad8a,Document as _0xe3be1b,serialize as _0x1e8887,parse as _0x62b326}from'./htmlparser.js';import{_DetachOperation as _0x17caeb,_removeFromModelNodeList as _0x2170f4,_insertIntoModelNodeList as _0x1b372d}from'ckeditor5/src/engine.js';function _0x3e08(){const _0x1e9ea2=['textNode','_applyOperationsAsSuggestions','applyOperation','getOperations','982140YdXIkK','createSelection','push','changeAttribute','isBlock','getMinimalFlatRanges','parent','removeAttribute','split','index','parse','children','setTo','node','nodeAfter','insert','createPositionFromPath','howMany','...','forward','removed','isMarkedRemoveOperation','getDiff','isDocumentOperation','start','data-id','length','plugins','sourcePosition','isObject','_getTransformedByDeletion','197755QAbQlG','stringify','batch','baseVersion','673128TzkVEx','targetPosition','629006XdTguv','markers','reverse','set','addAttribute','map','type','get','44hRyItU','path','DocumentCompare','addOperation','createRange','3795LqgXLu','data','changes','$text','merge','word','getFirstRange','$root','position','getMovedRangeStart','offset','8ZIcaUs','end','moveTargetPosition','schema','getShiftedBy','isBefore','createPositionAt','24aoKubQ','element','remove','cloneNode','_getTransformedByInsertion','root','97380TMMgpr','TrackChangesEditing','splitPosition','111469GOLLOy','backward','newRange','model','modifySelection','isAfter','nodeBefore','new','rename','focus','change','POSITIVE_INFINITY','range','slice'];_0x3e08=function(){return _0x1e9ea2;};return _0x3e08();}export function getSuggestionPartsFromReply({editor:_0x4ae43d,changeGroups:_0x45c577,documentContextContent:_0x191a19,showDiff:_0x10e1a7,trimUnchanged:_0x4d36bf=!0x0}){const _0x27d7bb=_0x45f4;return _0x45c577[_0x27d7bb(0x18a)](_0x33d313=>{const _0x4ea664=_0x27d7bb,_0x45f2b0=new _0xe3be1b([]),_0x35ba23=new _0xe3be1b([]);for(const _0x2e2bc3 of _0x33d313[_0x4ea664(0x194)])if(_0x10e1a7&&_0x4ea664(0x174)==_0x2e2bc3[_0x4ea664(0x18b)]||_0x35ba23[_0x4ea664(0x16b)][_0x4ea664(0x162)](_0x2e2bc3[_0x4ea664(0x16d)][_0x4ea664(0x1a7)](!0x0)),_0x4ea664(0x1b4)!=_0x2e2bc3[_0x4ea664(0x18b)]&&(_0x10e1a7||_0x4ea664(0x174)!=_0x2e2bc3[_0x4ea664(0x18b)])){const _0x2ec1bb=_0x390fba(_0x2d02bd=>_0x45ad8a(_0x2d02bd,_0x4ea664(0x179))==_0x2e2bc3['id'],_0x191a19,!0x0);_0x2ec1bb&&_0x45f2b0[_0x4ea664(0x16b)][_0x4ea664(0x162)](_0x2ec1bb[_0x4ea664(0x1a7)](!0x0));}const _0x355a7c=function(_0x2f2e89,_0x25bf92,_0x223978,_0x4cea31,_0x5808a5=!0x0){const _0xb28f6d=_0x4ea664,_0x233425=_0x2f2e89[_0xb28f6d(0x17b)][_0xb28f6d(0x18c)](_0xb28f6d(0x18f)),_0x1d33ca=_0x2f2e89[_0xb28f6d(0x17b)][_0xb28f6d(0x18c)](_0xb28f6d(0x1ab)),_0x2252e0=_0x1e8887(_0x25bf92),_0x23e4fc=_0x1e8887(_0x223978),_0x1e6de0=_0x2f2e89[_0xb28f6d(0x193)][_0xb28f6d(0x16a)](_0x2252e0,_0xb28f6d(0x199)),_0x2ba9c1=_0x2f2e89[_0xb28f6d(0x1b0)][_0xb28f6d(0x1a3)](_0x1e6de0,0x0),_0x3c8d57=_0x233425[_0xb28f6d(0x176)](_0x2252e0,_0x23e4fc,{'anchor':_0x2ba9c1,'markDeletions':_0x4cea31}),_0x286b99=_0x3c8d57[_0xb28f6d(0x1be)]();if(0x0==_0x286b99[_0xb28f6d(0x17a)])return null;_0x4cea31?_0x1d33ca[_0xb28f6d(0x1bc)](_0x286b99):_0x2f2e89[_0xb28f6d(0x1b0)][_0xb28f6d(0x1b7)](_0x41147d=>{const _0x317606=_0xb28f6d;for(const _0x3e8ab9 of _0x286b99)if(_0x317606(0x1a6)==_0x3e8ab9[_0x317606(0x18b)]){const _0x1e9336=_0x3e8ab9[_0x317606(0x17c)],_0xdc67f3=_0x3e8ab9[_0x317606(0x171)],_0x1602af=new _0x17caeb(_0x1e9336,_0xdc67f3);_0x41147d[_0x317606(0x181)][_0x317606(0x190)](_0x1602af),_0x2f2e89[_0x317606(0x1b0)][_0x317606(0x1bd)](_0x1602af);}else _0x3e8ab9[_0x317606(0x182)]=null,_0x3e8ab9[_0x317606(0x177)]=!0x1,_0x41147d[_0x317606(0x181)][_0x317606(0x190)](_0x3e8ab9),_0x2f2e89[_0x317606(0x1b0)][_0x317606(0x1bd)](_0x3e8ab9);});if(_0x5808a5){const _0x5e7467=getMinimalSelection(_0x2f2e89,_0x286b99,_0x1e6de0);expandSelectionWithContext(_0x2f2e89[_0xb28f6d(0x1b0)],_0x5e7467),function(_0x2f58dd,_0x33aa5b){const _0x942bb3=_0xb28f6d,_0x6debbe=_0x33aa5b[_0x942bb3(0x198)]()[_0x942bb3(0x178)];let _0x38ca09=_0x33aa5b[_0x942bb3(0x198)]()[_0x942bb3(0x19e)];const _0x50acdc=_0x6debbe[_0x942bb3(0x1a9)];(_0x38ca09[_0x942bb3(0x1bb)]||_0x38ca09[_0x942bb3(0x16e)]&&_0x38ca09[_0x942bb3(0x16e)]['is'](_0x942bb3(0x195)))&&(_0x1b372d(_0x38ca09,_0x942bb3(0x172)),_0x38ca09=_0x38ca09[_0x942bb3(0x1a1)](0x3)),(_0x6debbe[_0x942bb3(0x1bb)]||_0x6debbe[_0x942bb3(0x1b3)]&&_0x6debbe[_0x942bb3(0x1b3)]['is'](_0x942bb3(0x195)))&&(_0x1b372d(_0x6debbe,_0x942bb3(0x172)),function(_0x2ce6df,_0x51ee5b,_0x59469a){const _0x4eb2e7=_0x942bb3;for(let [_0x2c9cf5,_0x11c492]of _0x2ce6df[_0x4eb2e7(0x186)]){const _0x336b4c=_0x11c492[_0x4eb2e7(0x1a8)](_0x51ee5b,_0x59469a,!0x1);_0x11c492=_0x336b4c[0x0],_0x2ce6df[_0x4eb2e7(0x186)][_0x4eb2e7(0x188)](_0x2c9cf5,_0x11c492);}}(_0x50acdc,_0x6debbe,0x3),_0x6debbe[_0x942bb3(0x166)]==_0x38ca09[_0x942bb3(0x166)]&&(_0x38ca09=_0x38ca09[_0x942bb3(0x1a1)](0x3)));const _0x1034fd=_0x2f58dd[_0x942bb3(0x191)](_0x2f58dd[_0x942bb3(0x1a3)](_0x50acdc,0x0),_0x6debbe),_0x21236f=_0x2f58dd[_0x942bb3(0x191)](_0x38ca09,_0x2f58dd[_0x942bb3(0x1a3)](_0x50acdc,_0x942bb3(0x19e))),_0x5ba41f=[..._0x1034fd[_0x942bb3(0x165)](),..._0x21236f[_0x942bb3(0x165)]()];_0x5ba41f[_0x942bb3(0x187)]();for(const _0x35a165 of _0x5ba41f)_0x2170f4(_0x35a165),_transformMarkersByDeletion(_0x50acdc,_0x35a165);}(_0x2f2e89[_0xb28f6d(0x1b0)],_0x5e7467);}const _0x50a16c=_0x2f2e89[_0xb28f6d(0x193)][_0xb28f6d(0x180)](_0x1e6de0,{'showSuggestionHighlights':!0x0});return _0x62b326(_0x50a16c);}(_0x4ae43d,_0x45f2b0,_0x35ba23,_0x10e1a7,_0x4d36bf);return{'type':_0x33d313[_0x4ea664(0x194)][0x0][_0x4ea664(0x18b)],'index':_0x33d313[_0x4ea664(0x169)],'content':_0x355a7c};});}export function getMinimalSelection(_0x263732,_0x3540eb,_0x30a929){const _0x331879=_0x45f4,_0xe4d8bb=_0x263732[_0x331879(0x17b)][_0x331879(0x18c)](_0x331879(0x18f));let _0x5ed9f9=_0x263732[_0x331879(0x1b0)][_0x331879(0x1a3)](_0x30a929,Number[_0x331879(0x1b8)]),_0x3890d6=_0x263732[_0x331879(0x1b0)][_0x331879(0x1a3)](_0x30a929,0x0);for(const _0x47e7f3 of _0x3540eb){let _0x429915,_0x160926;if(_0xe4d8bb[_0x331879(0x175)](_0x47e7f3))_0x429915=_0x47e7f3[_0x331879(0x1af)][_0x331879(0x178)],_0x160926=_0x47e7f3[_0x331879(0x1af)][_0x331879(0x19e)];else switch(_0x47e7f3[_0x331879(0x18b)]){case _0x331879(0x1b5):_0x429915=_0x47e7f3[_0x331879(0x19a)],_0x160926=_0x429915[_0x331879(0x1a1)](0x1);break;case _0x331879(0x189):case _0x331879(0x167):case _0x331879(0x163):_0x429915=_0x47e7f3[_0x331879(0x1b9)][_0x331879(0x178)],_0x160926=_0x47e7f3[_0x331879(0x1b9)][_0x331879(0x19e)];break;case _0x331879(0x16f):_0x429915=_0x47e7f3[_0x331879(0x19a)],_0x160926=_0x429915[_0x331879(0x1a1)](_0x47e7f3[_0x331879(0x171)]);break;case _0x331879(0x168):_0x429915=_0x47e7f3[_0x331879(0x1ac)],_0x160926=_0x47e7f3[_0x331879(0x19f)];break;case _0x331879(0x196):{const _0x2ebaf5=_0x47e7f3[_0x331879(0x184)][_0x331879(0x18e)][_0x331879(0x1ba)](-0x1);_0x429915=_0x263732[_0x331879(0x1b0)][_0x331879(0x170)](_0x30a929,_0x2ebaf5),_0x160926=_0x429915[_0x331879(0x1a1)](0x1);break;}case _0x331879(0x1a6):{const _0x125dbd=_0x47e7f3[_0x331879(0x171)],_0x3135b0=_0x47e7f3[_0x331879(0x17c)][_0x331879(0x1a8)](_0x47e7f3[_0x331879(0x184)],_0x125dbd),_0x1f0ffa=_0x47e7f3[_0x331879(0x19b)]();_0x331879(0x1a6)==_0x47e7f3[_0x331879(0x18b)]?(_0x429915=_0x3135b0,_0x160926=_0x3135b0):(_0x429915=_0x1f0ffa,_0x160926=_0x1f0ffa[_0x331879(0x1a1)](_0x125dbd));break;}}_0x429915&&_0x429915[_0x331879(0x1a2)](_0x5ed9f9)&&(_0x5ed9f9=_0x429915),_0x160926&&_0x160926[_0x331879(0x1b2)](_0x3890d6)&&(_0x3890d6=_0x160926);}return _0x263732[_0x331879(0x1b0)][_0x331879(0x161)](_0x263732[_0x331879(0x1b0)][_0x331879(0x191)](_0x5ed9f9,_0x3890d6));}export function expandSelectionWithContext(_0x8bb086,_0x16e321){const _0x261371=_0x45f4;Ke(_0x8bb086,_0x16e321,_0x261371(0x173));const _0x36ca9c=_0x16e321[_0x261371(0x198)]();_0x16e321[_0x261371(0x16c)]([]),_0x16e321[_0x261371(0x16c)](_0x36ca9c,{'backward':!0x0}),Ke(_0x8bb086,_0x16e321,_0x261371(0x1ae));}function Ke(_0x48647d,_0x4c6000,_0x5aec6d){const _0x47c3fe=_0x45f4;let _0x2403d4=0x14;for(;_0x2403d4;){_0x48647d[_0x47c3fe(0x1b1)](_0x4c6000,{'unit':_0x47c3fe(0x197),'direction':_0x5aec6d}),_0x2403d4--;const _0x5a293a=_0x4c6000[_0x47c3fe(0x1b6)][_0x47c3fe(0x173)==_0x5aec6d?_0x47c3fe(0x1b3):_0x47c3fe(0x16e)];if(_0x5a293a&&_0x5a293a['is'](_0x47c3fe(0x1a5))&&_0x48647d[_0x47c3fe(0x1a0)][_0x47c3fe(0x164)](_0x5a293a)&&_0x48647d[_0x47c3fe(0x1a0)][_0x47c3fe(0x17d)](_0x5a293a))break;}}function _0x45f4(_0x1a1fb6,_0x54452d){const _0x3e082f=_0x3e08();return _0x45f4=function(_0x45f4da,_0x40e497){_0x45f4da=_0x45f4da-0x161;let _0x24af6c=_0x3e082f[_0x45f4da];return _0x24af6c;},_0x45f4(_0x1a1fb6,_0x54452d);}export function _transformMarkersByDeletion(_0x30c625,_0x1f0e02){const _0x42bf62=_0x45f4;for(let [_0x1ae812,_0x2c2f1b]of _0x30c625[_0x42bf62(0x186)])_0x2c2f1b=_0x2c2f1b[_0x42bf62(0x17e)](_0x1f0e02[_0x42bf62(0x178)],_0x1f0e02[_0x42bf62(0x19e)][_0x42bf62(0x19c)]-_0x1f0e02[_0x42bf62(0x178)][_0x42bf62(0x19c)]),_0x30c625[_0x42bf62(0x186)][_0x42bf62(0x188)](_0x1ae812,_0x2c2f1b);}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
import { append, appendChild, find, findAll, findOne, getChildren, isComment, isTag, prepend, prependChild, removeElement, replaceElement, textContent, getParent, hasChildren } from 'domutils';
|
|
6
|
+
import render from 'dom-serializer';
|
|
7
|
+
import { cloneNode, isDocument, isText, Element, Text, type AnyNode, type ChildNode, type Comment, Document, NodeWithChildren, type ParentNode } from 'domhandler';
|
|
8
|
+
export { cloneNode, find, findOne, findAll, getChildren, getParent, isComment, isDocument, isTag, isText, append, appendChild, prepend, prependChild, render, removeElement, replaceElement, textContent, hasChildren, Element, Document, NodeWithChildren, Text };
|
|
9
|
+
export type { AnyNode, ParentNode, ChildNode };
|
|
10
|
+
export declare function parse(html: string): Document;
|
|
11
|
+
export declare function serialize(document: Document | AnyNode): string;
|
|
12
|
+
export declare function findByAttribute(name: string, value: string | null, nodes: Array<AnyNode> | ParentNode): ReturnType<typeof findOne>;
|
|
13
|
+
export declare function findAllByAttribute(name: string, value: string | null, nodes: Array<AnyNode> | ParentNode): ReturnType<typeof findAll>;
|
|
14
|
+
export declare function findAllComments(document: Document): Array<Comment>;
|
|
15
|
+
export declare function getAttribute(node: AnyNode | null, name: string): string | null;
|
|
16
|
+
export declare function setAttribute(node: AnyNode, name: string, value: string | null): void;
|
|
17
|
+
export declare function insertElement(target: ParentNode | ChildNode, newElement: ParentNode | ChildNode, position: InsertPosition): void;
|
|
18
|
+
export declare function moveElement(to: ParentNode, from: ParentNode): void;
|
|
19
|
+
export declare function clone(node: Document): Document;
|
|
20
|
+
export declare function getParents(node: AnyNode): Array<ParentNode>;
|
|
21
|
+
export declare function normalizeHTML(html: string): string;
|
|
22
|
+
export declare function areNodesSame(node1: ChildNode, node2: ChildNode): boolean;
|
|
23
|
+
export declare function getNodeNestingLevel(node: ChildNode): number;
|
|
24
|
+
export declare function removeElementsAfter(node: ChildNode): void;
|
|
25
|
+
export declare function getNodePath(node: AnyNode): DocumentPath;
|
|
26
|
+
/**
|
|
27
|
+
* Represents a position in the HTML document as an array of numbers.
|
|
28
|
+
*
|
|
29
|
+
* Each number represents either:
|
|
30
|
+
* - An index of an element among its siblings (for element nodes)
|
|
31
|
+
* - A character position within a text node (for text nodes)
|
|
32
|
+
*
|
|
33
|
+
* Example: [0, 1, 2] means the third child of the second child of the first element.
|
|
34
|
+
*/
|
|
35
|
+
export type DocumentPath = ReadonlyArray<number>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
(function(_0x15f88d,_0x306c6f){const _0x58e8f2=_0xf278,_0x562e2e=_0x15f88d();while(!![]){try{const _0x5e5b49=parseInt(_0x58e8f2(0xe5))/0x1*(-parseInt(_0x58e8f2(0xea))/0x2)+parseInt(_0x58e8f2(0xf1))/0x3+-parseInt(_0x58e8f2(0xf2))/0x4+parseInt(_0x58e8f2(0xe9))/0x5*(-parseInt(_0x58e8f2(0xfa))/0x6)+parseInt(_0x58e8f2(0xfd))/0x7*(parseInt(_0x58e8f2(0xf0))/0x8)+parseInt(_0x58e8f2(0xf3))/0x9*(parseInt(_0x58e8f2(0xfb))/0xa)+parseInt(_0x58e8f2(0xe8))/0xb;if(_0x5e5b49===_0x306c6f)break;else _0x562e2e['push'](_0x562e2e['shift']());}catch(_0x5cfb25){_0x562e2e['push'](_0x562e2e['shift']());}}}(_0x7fb6,0x33ade));import{parseDocument as _0x47a170}from'htmlparser2';import{append as _0x1706d0,appendChild as _0x5989ee,find as _0x3d5919,findAll as _0x4da4bc,findOne as _0x523fa6,getChildren as _0x5d64c2,isComment as _0x3aa7b0,isTag as _0x324931,prepend as _0x5edb17,prependChild as _0x4bfa75,removeElement as _0x1f05d7,replaceElement as _0x32655a,textContent as _0x1e4bb0,getParent as _0x2491e4,hasChildren as _0x2a4611}from'domutils';import _0x1da839 from'dom-serializer';import{cloneNode as _0x8aa6b8,isDocument as _0x4c2b4a,isText as _0x539f0a,Element as _0x35d66f,Text as _0x258fec,Document as _0x48ef5c,NodeWithChildren as _0x526173}from'domhandler';export{_0x8aa6b8 as cloneNode,_0x3d5919 as find,_0x523fa6 as findOne,_0x4da4bc as findAll,_0x5d64c2 as getChildren,_0x2491e4 as getParent,_0x3aa7b0 as isComment,_0x4c2b4a as isDocument,_0x324931 as isTag,_0x539f0a as isText,_0x1706d0 as append,_0x5989ee as appendChild,_0x5edb17 as prepend,_0x4bfa75 as prependChild,_0x1da839 as render,_0x1f05d7 as removeElement,_0x32655a as replaceElement,_0x1e4bb0 as textContent,_0x2a4611 as hasChildren,_0x35d66f as Element,_0x48ef5c as Document,_0x526173 as NodeWithChildren,_0x258fec as Text};export function parse(_0x10f6c7){return _0x47a170(_0x10f6c7);}function _0x7fb6(){const _0xd438dd=['cloneNode','parentNode','push','576LgERrd','20VPjsIP','reverse','836843WVUXUL','indexOf','77537itTsMf','forEach','afterend','3114034qZXtet','16760gDXXnD','6TjhLKR','map','afterbegin','replace','attribs','beforebegin','8IJepqY','777177pdILLB','316892IWGooX','826209CNVfbW','nextSibling','slice','beforeend'];_0x7fb6=function(){return _0xd438dd;};return _0x7fb6();}export function serialize(_0x2e2b1a){return _0x1da839(_0x2e2b1a);}function _0xf278(_0x2ae9fa,_0x5400b2){const _0x7fb6be=_0x7fb6();return _0xf278=function(_0xf2788e,_0x2f8020){_0xf2788e=_0xf2788e-0xe5;let _0x372e6e=_0x7fb6be[_0xf2788e];return _0x372e6e;},_0xf278(_0x2ae9fa,_0x5400b2);}export function findByAttribute(_0x164d68,_0x491029,_0x3dd369){const _0x19758c=_0xf278,_0x11f167=null!==_0x491029?_0x15fdd5=>_0x15fdd5[_0x19758c(0xee)][_0x164d68]===_0x491029:_0xd05640=>Boolean(_0xd05640[_0x19758c(0xee)][_0x164d68]);return _0x523fa6(_0x3916c0=>_0x324931(_0x3916c0)&&_0x11f167(_0x3916c0),_0x3dd369);}export function findAllByAttribute(_0x468be4,_0x2ccd7a,_0x2dc2f){const _0x181203=_0xf278,_0x50ff6c=null!==_0x2ccd7a?_0x34e2a8=>_0x34e2a8[_0x181203(0xee)][_0x468be4]===_0x2ccd7a:_0x5e6aaf=>Boolean(_0x5e6aaf[_0x181203(0xee)][_0x468be4]);return _0x4da4bc(_0x30dad3=>_0x324931(_0x30dad3)&&_0x50ff6c(_0x30dad3),_0x2dc2f);}export function findAllComments(_0x7f22eb){return _0x3d5919(_0x3c47c9=>_0x3aa7b0(_0x3c47c9),_0x7f22eb,!0x0,0x1/0x0);}export function getAttribute(_0x3ad349,_0x51a9af){const _0x8b07fe=_0xf278;return _0x3ad349&&_0x324931(_0x3ad349)?_0x3ad349[_0x8b07fe(0xee)][_0x51a9af]:null;}export function setAttribute(_0x5ff70e,_0x32ac97,_0x14b2b1){const _0x389e7c=_0xf278;_0x324931(_0x5ff70e)&&(null===_0x14b2b1?delete _0x5ff70e[_0x389e7c(0xee)][_0x32ac97]:_0x5ff70e[_0x389e7c(0xee)][_0x32ac97]=_0x14b2b1);}export function insertElement(_0x4ee1a,_0x32991e,_0x2c2b3e){const _0x1b6fc6=_0xf278,_0x2e0caa=_0x32991e[_0x1b6fc6(0xf7)](!0x0);_0x1b6fc6(0xef)===_0x2c2b3e?_0x5edb17(_0x4ee1a,_0x2e0caa):_0x1b6fc6(0xec)===_0x2c2b3e?_0x4bfa75(_0x4ee1a,_0x2e0caa):_0x1b6fc6(0xf6)===_0x2c2b3e?_0x5989ee(_0x4ee1a,_0x2e0caa):_0x1b6fc6(0xe7)===_0x2c2b3e&&_0x1706d0(_0x4ee1a,_0x2e0caa);}export function moveElement(_0x14e6c7,_0x536a8b){_0x1f05d7(_0x14e6c7),_0x32655a(_0x536a8b,_0x14e6c7);}export function clone(_0x2795fd){const _0x4888ee=_0xf278;return _0x2795fd[_0x4888ee(0xf7)](!0x0);}export function getParents(_0x3fe1a0){const _0x55b747=_0xf278,_0xd96f85=[];let _0x4f1117=_0x3fe1a0;for(;_0x4f1117;)_0x4f1117=_0x2491e4(_0x4f1117),_0x4f1117&&_0xd96f85[_0x55b747(0xf9)](_0x4f1117);return _0xd96f85;}export function normalizeHTML(_0x1e4ea6){const _0x274f45=_0xf278;return _0x1e4ea6[_0x274f45(0xed)](/^\s+/gm,'')[_0x274f45(0xed)](/\s+$/gm,'')[_0x274f45(0xed)](/\n*/g,'')[_0x274f45(0xed)](/\s+/g,'\x20')[_0x274f45(0xed)](/>\s*</g,'><');}export function areNodesSame(_0x169a1d,_0x428063){return normalizeHTML(serialize(_0x169a1d))===normalizeHTML(serialize(_0x428063));}export function getNodeNestingLevel(_0xe0462a){const _0x175536=_0xf278;let _0x46e3af=0x0;for(;_0xe0462a[_0x175536(0xf8)];)_0xe0462a=_0xe0462a[_0x175536(0xf8)],_0x46e3af++;return _0x46e3af;}export function removeElementsAfter(_0x59538a){const _0x331613=_0xf278,_0x3905d5=[];let _0x111ee4=_0x59538a[_0x331613(0xf4)];for(;_0x111ee4;)_0x3905d5[_0x331613(0xf9)](_0x111ee4),_0x111ee4=_0x111ee4[_0x331613(0xf4)];_0x3905d5[_0x331613(0xe6)](_0x179696=>{_0x1f05d7(_0x179696);});}export function getNodePath(_0x1cd563){const _0xd1ddf5=_0xf278;return[_0x1cd563,...getParents(_0x1cd563)][_0xd1ddf5(0xf5)](0x0,-0x1)[_0xd1ddf5(0xeb)](_0x148b8f=>{const _0x4c3b75=_0xd1ddf5,_0x3573e9=_0x2491e4(_0x148b8f);return _0x5d64c2(_0x3573e9)[_0x4c3b75(0xfe)](_0x148b8f);})[_0xd1ddf5(0xfc)]();}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
import { type Document } from './htmlparser.js';
|
|
6
|
+
/**
|
|
7
|
+
* A class that streams arbitrary HTML content into a target DOM element in an incremental manner.
|
|
8
|
+
*
|
|
9
|
+
* It uses a virtual DOM to avoid flickering of images and other dynamic content.
|
|
10
|
+
*/
|
|
11
|
+
export declare class HTMLStreamer {
|
|
12
|
+
/**
|
|
13
|
+
* Creates an instance of HTMLStreamer.
|
|
14
|
+
*/
|
|
15
|
+
constructor(options: HTMLStreamerOptions);
|
|
16
|
+
/**
|
|
17
|
+
* Incrementally streams the HTML string into provided target DOM element.
|
|
18
|
+
*
|
|
19
|
+
* **Note**: This method can be called repeatedly with a new document to continue the previous call. The new parsed document
|
|
20
|
+
* must be an extension of the previous document (only growing, never shrinking).
|
|
21
|
+
*
|
|
22
|
+
* ## Basic example
|
|
23
|
+
*
|
|
24
|
+
* ```ts
|
|
25
|
+
* const document = parse( '<p>foo bar</p>' );
|
|
26
|
+
*
|
|
27
|
+
* const htmlStreamer = new HTMLStreamer( {
|
|
28
|
+
* targetElement,
|
|
29
|
+
* textNodeStyle: 'animation: my-animation .5s'
|
|
30
|
+
* } );
|
|
31
|
+
*
|
|
32
|
+
* await htmlStreamer.stream( { document } );
|
|
33
|
+
* ```
|
|
34
|
+
*
|
|
35
|
+
* after 20ms will stream:
|
|
36
|
+
*
|
|
37
|
+
* ```html
|
|
38
|
+
* <p></p>
|
|
39
|
+
* ```
|
|
40
|
+
*
|
|
41
|
+
* and after 40ms:
|
|
42
|
+
*
|
|
43
|
+
* ```html
|
|
44
|
+
* <p><span data-ck-html-streamer-word-chunk="" style="animation: my-animation .5s">foo </span></p>
|
|
45
|
+
* ```
|
|
46
|
+
*
|
|
47
|
+
* and after 60ms:
|
|
48
|
+
*
|
|
49
|
+
* ```html
|
|
50
|
+
* <p>
|
|
51
|
+
* <span data-ck-html-streamer-word-chunk="" style="animation: my-animation .5s">foo </span>
|
|
52
|
+
* <span data-ck-html-streamer-word-chunk="" style="animation: my-animation .5s">bar</span>
|
|
53
|
+
* </p>
|
|
54
|
+
* ```
|
|
55
|
+
*
|
|
56
|
+
* ## Using paths
|
|
57
|
+
*
|
|
58
|
+
* You can control the streaming process by providing a start and end path. The rest of the parsed document will not
|
|
59
|
+
* be streamed.
|
|
60
|
+
*
|
|
61
|
+
* **Note**: The paths are indices of the nodes in the parsed document. The last segment of the path may be a character position
|
|
62
|
+
* in a text node. Paths that start or end in a text node will be adjusted in such way that only the whole word will be streamed
|
|
63
|
+
* to improve the user experience.
|
|
64
|
+
*
|
|
65
|
+
* ```ts
|
|
66
|
+
* const parsedDocument = parse( '<blockquote><p>foo bar baz qux</p></blockquote>' );
|
|
67
|
+
* const htmlStreamer = new HTMLStreamer( {
|
|
68
|
+
* targetElement,
|
|
69
|
+
* textNodeStyle: 'animation: my-animation .5s'
|
|
70
|
+
* } );
|
|
71
|
+
*
|
|
72
|
+
* await htmlStreamer.stream( {
|
|
73
|
+
* document: parsedDocument,
|
|
74
|
+
* startPath: [ 0, 0, 0, 6 ], // <blockquote><p>foo ba[r baz qux</p></blockquote>
|
|
75
|
+
* endPath: [ 0, 0, 0, 9 ], // <blockquote><p>foo bar b]az qux</p></blockquote>
|
|
76
|
+
* } );
|
|
77
|
+
* ```
|
|
78
|
+
*
|
|
79
|
+
* will stream:
|
|
80
|
+
*
|
|
81
|
+
* ```html
|
|
82
|
+
* <blockquote>
|
|
83
|
+
* <p>
|
|
84
|
+
* <span data-ck-html-streamer-word-chunk="" style="animation: my-animation .5s">bar </span>
|
|
85
|
+
* <span data-ck-html-streamer-word-chunk="" style="animation: my-animation .5s">baz </span>
|
|
86
|
+
* </p>
|
|
87
|
+
* </blockquote>
|
|
88
|
+
* ```
|
|
89
|
+
*/
|
|
90
|
+
stream({ document, targetElement, abortSignal }: {
|
|
91
|
+
document: Document;
|
|
92
|
+
targetElement: HTMLElement;
|
|
93
|
+
abortSignal?: AbortSignal;
|
|
94
|
+
}): Promise<void>;
|
|
95
|
+
/**
|
|
96
|
+
* Cleans up the animation `<span>` elements from the configured target element with minimum DOM manipulation.
|
|
97
|
+
*/
|
|
98
|
+
cleanUpAnimations({ targetElement }: {
|
|
99
|
+
targetElement: HTMLElement;
|
|
100
|
+
}): void;
|
|
101
|
+
/**
|
|
102
|
+
* Stops the streaming process.
|
|
103
|
+
*/
|
|
104
|
+
stop(): void;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Options for the HTMLStreamer.
|
|
108
|
+
*/
|
|
109
|
+
interface HTMLStreamerOptions {
|
|
110
|
+
/**
|
|
111
|
+
* Delay between `stream()` updates in milliseconds. Default is 20ms.
|
|
112
|
+
*/
|
|
113
|
+
delay?: number;
|
|
114
|
+
/**
|
|
115
|
+
* The `style` attribute value for `<span>` elements that wrap text nodes.
|
|
116
|
+
*/
|
|
117
|
+
textNodeStyle: string;
|
|
118
|
+
/**
|
|
119
|
+
* Callback to be called every time the stream is updated.
|
|
120
|
+
*/
|
|
121
|
+
onStreamUpdate?: () => void;
|
|
122
|
+
}
|
|
123
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
function _0x4f68(){const _0x236666=['isWordSplitSource','abort','querySelectorAll','106afiqBQ','map','code','now','isStreaming','delay','bind','mark','textNodeStyle','14CyDoaS','push','forEach','cleanUpAnimations','3155040yUKmYs','from','4772YdJlaJ','addEventListener','join','del','replaceWith','366768YyImwn','1606580LjCNcM','splitTextNodeIntoWordNodes','shouldBeStreamed','children','759784HVOEjN','renderNode','sup','sub','document','isWordSplitResult','options','length','ins','15MLcPta','1903068NkfcgW','stop','childNodes','getParsedDocumentNodeList','includes','entries','match','nodesList','onStreamUpdate','html-streamer-current-index-out-of-bounds','reverse','span[data-ck-html-streamer-word-chunk]','strong','parent','1415262kQmUgF','timeoutAbortController','span','currentIndex','tagName','attribs','signal','div','stream'];_0x4f68=function(){return _0x236666;};return _0x4f68();}const _0x10f1c0=_0x210f;function _0x210f(_0x2e6f23,_0x1af7dc){const _0x4f68fe=_0x4f68();return _0x210f=function(_0x210f2f,_0x9492ae){_0x210f2f=_0x210f2f-0x1dc;let _0x5dbd09=_0x4f68fe[_0x210f2f];return _0x5dbd09;},_0x210f(_0x2e6f23,_0x1af7dc);}(function(_0x34cef5,_0x1d5007){const _0x1bb4ef=_0x210f,_0x22d2e2=_0x34cef5();while(!![]){try{const _0x2e63c2=-parseInt(_0x1bb4ef(0x1f2))/0x1*(parseInt(_0x1bb4ef(0x1e3))/0x2)+-parseInt(_0x1bb4ef(0x205))/0x3*(parseInt(_0x1bb4ef(0x1f7))/0x4)+parseInt(_0x1bb4ef(0x1f8))/0x5+parseInt(_0x1bb4ef(0x214))/0x6*(parseInt(_0x1bb4ef(0x1ec))/0x7)+parseInt(_0x1bb4ef(0x1fc))/0x8+-parseInt(_0x1bb4ef(0x206))/0x9+parseInt(_0x1bb4ef(0x1f0))/0xa;if(_0x2e63c2===_0x1d5007)break;else _0x22d2e2['push'](_0x22d2e2['shift']());}catch(_0xd8ecf9){_0x22d2e2['push'](_0x22d2e2['shift']());}}}(_0x4f68,0x4488f));import _0x4cd07c from'morphdom';import{NodeWithChildren as _0x84cf97,Text as _0x1d0aa0,Element as _0xc2cdb0,isText as _0x1a8704,isDocument as _0x533815,isTag as _0x5ba497,cloneNode as _0x3a9734,getChildren as _0x30cae5,prepend as _0x3abf8f,removeElement as _0x1da62d,textContent as _0x277547,render as _0x42151e}from'./htmlparser.js';import{logWarning as _0x1e5e32}from'ckeditor5/src/utils.js';export class HTMLStreamer{[_0x10f1c0(0x202)];[_0x10f1c0(0x1e7)]=!0x1;[_0x10f1c0(0x200)]=null;[_0x10f1c0(0x20d)]=[];[_0x10f1c0(0x217)]=0x0;[_0x10f1c0(0x215)]=null;constructor(_0xbc6d2e){const _0x27089c=_0x10f1c0;this[_0x27089c(0x202)]={'delay':_0xbc6d2e[_0x27089c(0x1e8)]??0x14,'textNodeStyle':_0xbc6d2e[_0x27089c(0x1eb)],'onStreamUpdate':_0xbc6d2e[_0x27089c(0x20e)]||(()=>{})};}async[_0x10f1c0(0x1df)]({document:_0x3b8c82,targetElement:_0x301058,abortSignal:_0xbec0b0}){const _0x4e306a=_0x10f1c0;this[_0x4e306a(0x1e7)]&&this[_0x4e306a(0x207)](),_0xbec0b0?.[_0x4e306a(0x1f3)](_0x4e306a(0x1e1),this[_0x4e306a(0x207)][_0x4e306a(0x1e9)](this)),this[_0x4e306a(0x200)]=_0x3a9734(_0x3b8c82,!0x0),this[_0x4e306a(0x20d)]=this[_0x4e306a(0x209)](),this[_0x4e306a(0x1e7)]=!0x0,this[_0x4e306a(0x217)]>this[_0x4e306a(0x20d)][_0x4e306a(0x203)]&&(_0x1e5e32(_0x4e306a(0x20f),{'currentIndex':this[_0x4e306a(0x217)],'nodeList':this[_0x4e306a(0x20d)]}),this[_0x4e306a(0x217)]=this[_0x4e306a(0x20d)][_0x4e306a(0x203)]);for(let _0x3f1698=0x0;_0x3f1698<this[_0x4e306a(0x217)];_0x3f1698++)this[_0x4e306a(0x20d)][_0x3f1698][_0x4e306a(0x1fa)]=!0x0;let _0x4ff415=0x0;for(let _0x691f3e=this[_0x4e306a(0x217)];_0x691f3e<this[_0x4e306a(0x20d)][_0x4e306a(0x203)];_0x691f3e++){const _0xd7736f=Date[_0x4e306a(0x1e6)](),_0x5c0d0a=this[_0x4e306a(0x20d)][_0x691f3e],_0x3e268b=_0xd7736f-_0x4ff415;_0x5c0d0a[_0x4e306a(0x1fa)]=!0x0;let _0x299e48=_0x5c0d0a[_0x4e306a(0x213)];for(;_0x299e48;)_0x299e48[_0x4e306a(0x1fa)]=!0x0,_0x299e48=_0x299e48[_0x4e306a(0x213)];if(_0x3e268b<this[_0x4e306a(0x202)][_0x4e306a(0x1e8)])try{const {promise:_0x2c0da3,abortController:_0x22f3c3}=ar(this[_0x4e306a(0x202)][_0x4e306a(0x1e8)]-_0x3e268b);this[_0x4e306a(0x215)]=_0x22f3c3,await _0x2c0da3;}catch(_0x419c9a){return;}_0x4cd07c(_0x301058,'<'+_0x301058[_0x4e306a(0x218)]+'>'+this[_0x4e306a(0x1fd)](this[_0x4e306a(0x200)])+'</'+_0x301058[_0x4e306a(0x218)]+'>',{'childrenOnly':!0x0}),this[_0x4e306a(0x202)][_0x4e306a(0x20e)]&&this[_0x4e306a(0x202)][_0x4e306a(0x20e)](),this[_0x4e306a(0x217)]=_0x691f3e,_0x4ff415=Date[_0x4e306a(0x1e6)]();}this[_0x4e306a(0x1e7)]=!0x1;}[_0x10f1c0(0x1ef)]({targetElement:_0x405cb4}){const _0x377aa7=_0x10f1c0;Array[_0x377aa7(0x1f1)](_0x405cb4[_0x377aa7(0x1e2)](_0x377aa7(0x211)))[_0x377aa7(0x210)]()[_0x377aa7(0x1ee)](_0x282418=>{const _0x7c760=_0x377aa7;_0x282418[_0x7c760(0x1f6)](_0x282418[_0x7c760(0x208)][0x0]);});}[_0x10f1c0(0x207)](){const _0x14f333=_0x10f1c0;this[_0x14f333(0x1e7)]=!0x1,this[_0x14f333(0x215)]&&(this[_0x14f333(0x215)][_0x14f333(0x1e1)](),this[_0x14f333(0x215)]=null);}[_0x10f1c0(0x1fd)](_0x209080){const _0x3a0e32=_0x10f1c0;let _0x285709='';if(function(_0xfd672d){return _0x533815(_0xfd672d);}(_0x209080)){for(const _0x37b771 of _0x209080[_0x3a0e32(0x1fb)])_0x285709+=this[_0x3a0e32(0x1fd)](_0x37b771);}else{if(ur(_0x209080)){if(!_0x209080[_0x3a0e32(0x1fa)])return'';const _0xbf5abd=_0x209080,_0x403b50=Object[_0x3a0e32(0x20b)](_0xbf5abd[_0x3a0e32(0x1dc)])[_0x3a0e32(0x1e4)](([_0xf9b3ef,_0x1087e6])=>_0xf9b3ef+'=\x22'+_0x1087e6+'\x22')[_0x3a0e32(0x1f4)]('\x20');_0x285709+='<'+_0xbf5abd[_0x3a0e32(0x218)]+(_0x403b50?'\x20'+_0x403b50:'')+'>';for(const _0x4c92ff of _0x30cae5(_0xbf5abd))_0x285709+=this[_0x3a0e32(0x1fd)](_0x4c92ff);_0x285709+='</'+_0xbf5abd[_0x3a0e32(0x218)]+'>';}else{if(!lr(_0x209080))return'';if(!_0x209080[_0x3a0e32(0x1fa)])return'';!function(_0xd8e0a4){const _0x2ba2ee=_0x3a0e32;if(!_0xd8e0a4[_0x2ba2ee(0x213)]||!ur(_0xd8e0a4[_0x2ba2ee(0x213)]))return!0x1;if(!cr[_0x2ba2ee(0x20a)](_0xd8e0a4[_0x2ba2ee(0x213)][_0x2ba2ee(0x218)]))return!0x1;return!_0x277547(_0xd8e0a4)[_0x2ba2ee(0x20c)](/^\s*[<>]\s*$/);}(_0x209080)?_0x285709+=_0x42151e(_0x209080):_0x285709+=_0x42151e(new _0xc2cdb0(_0x3a0e32(0x216),{'data-ck-html-streamer-word-chunk':'','style':this[_0x3a0e32(0x202)][_0x3a0e32(0x1eb)]},[_0x209080]));}}return _0x285709;}[_0x10f1c0(0x209)](){const _0x371d95=_0x10f1c0,_0x3e088f=[];return function(_0x1f8c02,_0x77abd7){const _0x1df6c5=_0x210f,_0x236043=_0x52ea78=>{const _0x300f84=_0x210f;if(_0x77abd7(_0x52ea78),_0x52ea78 instanceof _0x84cf97)for(let _0x3e2099=0x0;_0x3e2099<_0x52ea78[_0x300f84(0x1fb)][_0x300f84(0x203)];_0x3e2099++){const _0x395e31=_0x52ea78[_0x300f84(0x1fb)][_0x3e2099];_0x236043(_0x395e31);}};for(let _0x26fa77=0x0;_0x26fa77<_0x1f8c02[_0x1df6c5(0x1fb)][_0x1df6c5(0x203)];_0x26fa77++)_0x236043(_0x1f8c02[_0x1df6c5(0x1fb)][_0x26fa77]);}(this[_0x371d95(0x200)],_0x5e791d=>{const _0x596328=_0x371d95;if(lr(_0x5e791d)){const _0x3b94a3=this[_0x596328(0x1f9)](_0x5e791d);_0x3b94a3[_0x596328(0x203)]&&_0x3e088f[_0x596328(0x1ed)](..._0x3b94a3);}_0x5e791d[_0x596328(0x1e0)]||_0x5e791d[_0x596328(0x201)]||_0x3e088f[_0x596328(0x1ed)](_0x5e791d);}),_0x3e088f;}[_0x10f1c0(0x1f9)](_0x3efa86){const _0x1d9782=_0x10f1c0;if(_0x3efa86[_0x1d9782(0x1e0)]||_0x3efa86[_0x1d9782(0x201)])return[];const _0x46bfe0=_0x277547(_0x3efa86)[_0x1d9782(0x20c)](/(?:\s*\S+\s*)/g),_0x5c77c0=[];if(_0x46bfe0&&_0x46bfe0[_0x1d9782(0x203)]>0x1){for(const _0x3955a0 of _0x46bfe0){const _0x2d96c0=new _0x1d0aa0(_0x3955a0);_0x2d96c0[_0x1d9782(0x201)]=!0x0,_0x3abf8f(_0x3efa86,_0x2d96c0),_0x5c77c0[_0x1d9782(0x1ed)](_0x2d96c0);}_0x3efa86[_0x1d9782(0x1e0)]=!0x0,_0x1da62d(_0x3efa86);}return _0x5c77c0;}}const cr=['p','li','td','th',_0x10f1c0(0x216),'h1','h2','h3','h4','h5','h6','b',_0x10f1c0(0x212),'i','em',_0x10f1c0(0x1ea),_0x10f1c0(0x1f5),_0x10f1c0(0x204),_0x10f1c0(0x1fe),_0x10f1c0(0x1ff),'a',_0x10f1c0(0x1e5),_0x10f1c0(0x1de)];function lr(_0x4e5bbe){return _0x1a8704(_0x4e5bbe);}function ur(_0x449664){return _0x5ba497(_0x449664);}function ar(_0x5de4c6){const _0x3bfd33=new AbortController();return{'promise':new Promise((_0x443df8,_0xaf2136)=>{const _0x389b37=_0x210f,_0x378c3c=setTimeout(_0x443df8,_0x5de4c6);_0x3bfd33[_0x389b37(0x1dd)][_0x389b37(0x1f3)](_0x389b37(0x1e1),()=>{clearTimeout(_0x378c3c),_0xaf2136();});}),'abortController':_0x3bfd33};}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module ai/aiquickactions/aiquickactions
|
|
7
|
+
* @publicApi
|
|
8
|
+
*/
|
|
9
|
+
import { type Editor, Plugin } from 'ckeditor5/src/core.js';
|
|
10
|
+
import { AIQuickActionsUI, type AIQuickActionDefinition } from './aiquickactionsui.js';
|
|
11
|
+
import { AIQuickActionsEditing } from './aiquickactionsediting.js';
|
|
12
|
+
export declare class AIQuickActions extends Plugin {
|
|
13
|
+
/**
|
|
14
|
+
* @inheritDoc
|
|
15
|
+
*/
|
|
16
|
+
static get requires(): readonly [typeof AIQuickActionsUI, typeof AIQuickActionsEditing];
|
|
17
|
+
/**
|
|
18
|
+
* @inheritDoc
|
|
19
|
+
*/
|
|
20
|
+
static get pluginName(): "AIQuickActions";
|
|
21
|
+
/**
|
|
22
|
+
* @inheritDoc
|
|
23
|
+
*/
|
|
24
|
+
static get isOfficialPlugin(): true;
|
|
25
|
+
/**
|
|
26
|
+
* @inheritDoc
|
|
27
|
+
*/
|
|
28
|
+
static get isPremiumPlugin(): true;
|
|
29
|
+
constructor(editor: Editor);
|
|
30
|
+
}
|
|
31
|
+
export interface AIQuickActionsConfig {
|
|
32
|
+
extraCommands?: Array<AICustomQuickActionDefinition>;
|
|
33
|
+
removeCommands?: Array<string>;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Defines a custom AI quick action with all required properties.
|
|
37
|
+
*/
|
|
38
|
+
export type AICustomQuickActionDefinition = Required<Pick<AIQuickActionDefinition, 'id' | 'displayedPrompt' | 'prompt' | 'type'>> & {
|
|
39
|
+
requiresContent?: boolean;
|
|
40
|
+
};
|
|
41
|
+
export type AIQuickActionRequestData = Pick<AIQuickActionDefinition, 'id' | 'displayedPrompt'>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
var _0x2adc0d=_0x4f1b;function _0x2c84(){var _0x4b8edf=['6352874DPaBJf','6359157FFvaBj','395VjTdYa','548871kLuVIv','177870QYIArC','98ZajNUR','pluginName','10PAKokD','40728arqbYw','isPremiumPlugin','define','2FVspmF','isOfficialPlugin','1685656ZdHvym','ai.quickActions','config','1359324hbLXZU','AIQuickActions','requires'];_0x2c84=function(){return _0x4b8edf;};return _0x2c84();}(function(_0x2a5b23,_0xd8a5e5){var _0x39ecb0=_0x4f1b,_0x336db9=_0x2a5b23();while(!![]){try{var _0x16d54b=-parseInt(_0x39ecb0(0xc1))/0x1*(-parseInt(_0x39ecb0(0xc9))/0x2)+parseInt(_0x39ecb0(0xbb))/0x3+parseInt(_0x39ecb0(0xc6))/0x4*(-parseInt(_0x39ecb0(0xc0))/0x5)+parseInt(_0x39ecb0(0xc2))/0x6*(-parseInt(_0x39ecb0(0xc3))/0x7)+-parseInt(_0x39ecb0(0xcb))/0x8+parseInt(_0x39ecb0(0xbf))/0x9*(parseInt(_0x39ecb0(0xc5))/0xa)+parseInt(_0x39ecb0(0xbe))/0xb;if(_0x16d54b===_0xd8a5e5)break;else _0x336db9['push'](_0x336db9['shift']());}catch(_0x1a2184){_0x336db9['push'](_0x336db9['shift']());}}}(_0x2c84,0xd0fa3));import{Plugin as _0x4fddbb}from'ckeditor5/src/core.js';function _0x4f1b(_0xeaddac,_0xb077){var _0x2c845e=_0x2c84();return _0x4f1b=function(_0x4f1b8b,_0x2bb657){_0x4f1b8b=_0x4f1b8b-0xba;var _0x53eb7c=_0x2c845e[_0x4f1b8b];return _0x53eb7c;},_0x4f1b(_0xeaddac,_0xb077);}import{AIQuickActionsUI as _0x4ea2dd}from'./aiquickactionsui.js';import{AIQuickActionsEditing as _0x3c89de}from'./aiquickactionsediting.js';export class AIQuickActions extends _0x4fddbb{static get[_0x2adc0d(0xbd)](){return[_0x4ea2dd,_0x3c89de];}static get[_0x2adc0d(0xc4)](){var _0x3ce2e3=_0x2adc0d;return _0x3ce2e3(0xbc);}static get[_0x2adc0d(0xca)](){return!0x0;}static get[_0x2adc0d(0xc7)](){return!0x0;}constructor(_0x48535e){var _0x28ac41=_0x2adc0d;super(_0x48535e),_0x48535e[_0x28ac41(0xba)][_0x28ac41(0xc8)](_0x28ac41(0xcc),{'extraCommands':[],'removeCommands':[]});}}
|