@ckeditor/ckeditor5-ai 46.1.1 → 47.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +2742 -0
- package/dist/index.css +3141 -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 +163 -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/{legacyerrors.js → aiassistant/legacyerrors.js} +1 -1
- 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 +92 -30
- 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 +102 -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 +23 -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 +255 -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/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
|
+
const _0x16fbe8=_0x5540;function _0x374a(){const _0x5bc791=['document','253iIohmS','createAt','index','match','285tXkJKQ','isEqual','length','reduce','11134kbpmcj','indexOf','path','start','2727710pQndbq','parent','slice','createBefore','697887ZQpjES','6pnMkuO','data','1148975cVLugT','4108342dKiaOI','nextNode','getNudgedToWordBoundary','ai-documentposition-createfrompath-path-cannot-be-empty','72652XDoPtH','104LNFlbC','previousNode','same','createAfter','ai-documentposition-index-out-of-bounds','createFromPath','end','44145750VBZbVD'];_0x374a=function(){return _0x5bc791;};return _0x374a();}(function(_0x53931c,_0x4785b1){const _0x10c110=_0x5540,_0x311fea=_0x53931c();while(!![]){try{const _0xef535a=parseInt(_0x10c110(0x80))/0x1*(-parseInt(_0x10c110(0x88))/0x2)+-parseInt(_0x10c110(0x84))/0x3*(parseInt(_0x10c110(0x76))/0x4)+parseInt(_0x10c110(0x71))/0x5*(parseInt(_0x10c110(0x6f))/0x6)+parseInt(_0x10c110(0x72))/0x7+-parseInt(_0x10c110(0x77))/0x8*(parseInt(_0x10c110(0x6e))/0x9)+parseInt(_0x10c110(0x8c))/0xa+parseInt(_0x10c110(0x7e))/0xb;if(_0xef535a===_0x4785b1)break;else _0x311fea['push'](_0x311fea['shift']());}catch(_0x47382b){_0x311fea['push'](_0x311fea['shift']());}}}(_0x374a,0xea8d7));function _0x5540(_0x88278a,_0x318ae8){const _0x374ab4=_0x374a();return _0x5540=function(_0x554020,_0x288950){_0x554020=_0x554020-0x6d;let _0x1334b5=_0x374ab4[_0x554020];return _0x1334b5;},_0x5540(_0x88278a,_0x318ae8);}import{CKEditorError as _0x2e95d5,compareArrays as _0x11985e}from'ckeditor5/src/utils.js';import{getNodePath as _0x4e4133,isText as _0x544e86,getChildren as _0x2334fe,isDocument as _0x4b0653,getParent as _0x544e74,textContent as _0x2e9122,hasChildren as _0x5a6fb7}from'./htmlparser.js';export class DocumentPosition{[_0x16fbe8(0x8d)];[_0x16fbe8(0x82)];[_0x16fbe8(0x7f)];constructor(_0x28471b,_0x552924,_0x34d915){const _0x490209=_0x16fbe8;if(_0x544e86(_0x552924)&&_0x34d915>_0x552924[_0x490209(0x70)][_0x490209(0x86)])throw new _0x2e95d5(_0x490209(0x7b),null,{'index':_0x34d915,'parent':_0x552924});if(_0x5a6fb7(_0x552924)&&_0x34d915>_0x2334fe(_0x552924)[_0x490209(0x86)])throw new _0x2e95d5(_0x490209(0x7b),null,{'index':_0x34d915,'parent':_0x552924});if(_0x34d915<0x0)throw new _0x2e95d5(_0x490209(0x7b),null,{'index':_0x34d915,'parent':_0x552924});this[_0x490209(0x8d)]=_0x552924,this[_0x490209(0x82)]=_0x34d915,this[_0x490209(0x7f)]=_0x28471b;}get[_0x16fbe8(0x8a)](){const _0x17330e=_0x16fbe8;return[..._0x4e4133(this[_0x17330e(0x8d)]),this[_0x17330e(0x82)]];}[_0x16fbe8(0x85)](_0x28c57f){const _0x2dc8de=_0x16fbe8;return this[_0x2dc8de(0x7f)]==_0x28c57f[_0x2dc8de(0x7f)]&&_0x2dc8de(0x79)===_0x11985e(this[_0x2dc8de(0x8a)],_0x28c57f[_0x2dc8de(0x8a)]);}get[_0x16fbe8(0x73)](){const _0x457f1a=_0x16fbe8;if(_0x5a6fb7(this[_0x457f1a(0x8d)])){const _0x38d961=_0x2334fe(this[_0x457f1a(0x8d)])[this[_0x457f1a(0x82)]];if(_0x38d961)return _0x38d961;{const _0x170e03=DocumentPosition[_0x457f1a(0x7a)](this[_0x457f1a(0x7f)],this[_0x457f1a(0x8d)]);if(_0x170e03)return _0x170e03[_0x457f1a(0x73)];}}return null;}get[_0x16fbe8(0x78)](){const _0x5b3ba6=_0x16fbe8;if(_0x5a6fb7(this[_0x5b3ba6(0x8d)])){const _0x2d4edb=_0x2334fe(this[_0x5b3ba6(0x8d)])[this[_0x5b3ba6(0x82)]-0x1];if(_0x2d4edb)return _0x2d4edb;{const _0x4bb28e=DocumentPosition[_0x5b3ba6(0x6d)](this[_0x5b3ba6(0x7f)],this[_0x5b3ba6(0x8d)]);if(_0x4bb28e)return _0x4bb28e[_0x5b3ba6(0x78)];}}return null;}[_0x16fbe8(0x74)](_0x4c7cf2=_0x16fbe8(0x8b)){const _0x50d730=_0x16fbe8;if(!_0x544e86(this[_0x50d730(0x8d)]))return this;const _0x390a76=this[_0x50d730(0x8a)][this[_0x50d730(0x8a)][_0x50d730(0x86)]-0x1],_0x8571de=_0x2e9122(this[_0x50d730(0x8d)])[_0x50d730(0x83)](/(?:\s*\S+\s*)/g);let _0xf15126=0x0,_0x4af250=_0x390a76;for(const _0x54069f of _0x8571de){if(_0xf15126+_0x54069f[_0x50d730(0x86)]===_0x390a76)return this;if(_0xf15126+_0x54069f[_0x50d730(0x86)]>_0x390a76){_0x4af250=_0x50d730(0x8b)===_0x4c7cf2?_0xf15126:_0xf15126+_0x54069f[_0x50d730(0x86)];break;}_0xf15126+=_0x54069f[_0x50d730(0x86)];}return DocumentPosition[_0x50d730(0x81)](this[_0x50d730(0x7f)],this[_0x50d730(0x8d)],_0x4af250);}static[_0x16fbe8(0x7a)](_0x51e899,_0x215621){const _0x51e4d3=_0x16fbe8;if(_0x4b0653(_0x215621))return null;const _0x56f54d=_0x544e74(_0x215621);return DocumentPosition[_0x51e4d3(0x81)](_0x51e899,_0x56f54d,_0x2334fe(_0x56f54d)[_0x51e4d3(0x89)](_0x215621)+0x1);}static[_0x16fbe8(0x6d)](_0x16007,_0x53e0d9){const _0x509f02=_0x16fbe8;if(_0x4b0653(_0x53e0d9))return null;const _0x27830a=_0x544e74(_0x53e0d9);return DocumentPosition[_0x509f02(0x81)](_0x16007,_0x27830a,_0x2334fe(_0x27830a)[_0x509f02(0x89)](_0x53e0d9));}static[_0x16fbe8(0x81)](_0x725ccf,_0x4ef4c6,_0x5f0265=_0x16fbe8(0x8b)){const _0x4fa4c1=_0x16fbe8;return new DocumentPosition(_0x725ccf,_0x4ef4c6,_0x4fa4c1(0x8b)===_0x5f0265?0x0:_0x4fa4c1(0x7d)===_0x5f0265?_0x544e86(_0x4ef4c6)?_0x4ef4c6[_0x4fa4c1(0x70)][_0x4fa4c1(0x86)]:_0x2334fe(_0x4ef4c6)[_0x4fa4c1(0x86)]:_0x5f0265);}static[_0x16fbe8(0x7c)](_0x40e6ed,_0x585325){const _0x1b9f5a=_0x16fbe8;if(!_0x585325[_0x1b9f5a(0x86)])throw new _0x2e95d5(_0x1b9f5a(0x75),null,{'path':_0x585325});const _0x251b3b=_0x585325[_0x1b9f5a(0x8e)](0x0,-0x1)[_0x1b9f5a(0x87)]((_0x4c6282,_0x156e22)=>_0x544e86(_0x4c6282)?_0x4c6282:_0x2334fe(_0x4c6282)[_0x156e22],_0x40e6ed);return DocumentPosition[_0x1b9f5a(0x81)](_0x40e6ed,_0x251b3b,_0x585325[_0x585325[_0x1b9f5a(0x86)]-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 _0x2517(_0x5bd20a,_0x3223e8){const _0x1c6897=_0x1c68();return _0x2517=function(_0x25170f,_0x3415ae){_0x25170f=_0x25170f-0x154;let _0x399225=_0x1c6897[_0x25170f];return _0x399225;},_0x2517(_0x5bd20a,_0x3223e8);}const _0xf1d72a=_0x2517;(function(_0x279522,_0x2226a2){const _0x4c6846=_0x2517,_0x417fcc=_0x279522();while(!![]){try{const _0x3a2b16=parseInt(_0x4c6846(0x173))/0x1*(-parseInt(_0x4c6846(0x168))/0x2)+parseInt(_0x4c6846(0x161))/0x3*(parseInt(_0x4c6846(0x16a))/0x4)+-parseInt(_0x4c6846(0x163))/0x5+parseInt(_0x4c6846(0x155))/0x6+parseInt(_0x4c6846(0x172))/0x7+parseInt(_0x4c6846(0x167))/0x8+parseInt(_0x4c6846(0x15f))/0x9;if(_0x3a2b16===_0x2226a2)break;else _0x417fcc['push'](_0x417fcc['shift']());}catch(_0x49faab){_0x417fcc['push'](_0x417fcc['shift']());}}}(_0x1c68,0x1f2a1));import{DocumentPosition as _0x54a74d}from'./documentposition.js';import{clone as _0x191e8a,getParents as _0x19019d,Document as _0x4fb42e,Text as _0x1177df,isTag as _0x913ecc,isText as _0x5d3af6,replaceElement as _0x3908ff,removeElement as _0x315ff1}from'./htmlparser.js';export class DocumentRange{[_0xf1d72a(0x16f)];[_0xf1d72a(0x170)];constructor(_0xd03fc9,_0x1e6044){const _0x474e50=_0xf1d72a;this[_0x474e50(0x16f)]=_0xd03fc9,this[_0x474e50(0x170)]=_0x1e6044;}[_0xf1d72a(0x15e)](_0x29223d){const _0x42cd35=_0xf1d72a;return this==_0x29223d||this[_0x42cd35(0x16f)][_0x42cd35(0x15e)](_0x29223d[_0x42cd35(0x16f)])&&this[_0x42cd35(0x170)][_0x42cd35(0x15e)](_0x29223d[_0x42cd35(0x170)]);}[_0xf1d72a(0x162)](){const _0x1da44b=_0xf1d72a;return new DocumentRange(this[_0x1da44b(0x16f)][_0x1da44b(0x162)](_0x1da44b(0x16f)),this[_0x1da44b(0x170)][_0x1da44b(0x162)](_0x1da44b(0x170)));}[_0xf1d72a(0x15b)](){const _0x552f40=_0xf1d72a,_0x1cdd3a=_0x191e8a(this[_0x552f40(0x16f)][_0x552f40(0x157)]),_0x1f4eff=_0x54a74d[_0x552f40(0x159)](_0x1cdd3a,this[_0x552f40(0x16f)][_0x552f40(0x15c)]),_0x45895d=_0x54a74d[_0x552f40(0x159)](_0x1cdd3a,this[_0x552f40(0x170)][_0x552f40(0x15c)]);let _0x153012,_0x458623;if(_0x5d3af6(_0x1f4eff[_0x552f40(0x15a)])){const _0x343a39=_0x1f4eff[_0x552f40(0x15c)][_0x1f4eff[_0x552f40(0x15c)][_0x552f40(0x160)]-0x1],_0x5c9935=new _0x1177df(_0x1f4eff[_0x552f40(0x15a)][_0x552f40(0x171)][_0x552f40(0x165)](_0x343a39));_0x3908ff(_0x1f4eff[_0x552f40(0x15a)],_0x5c9935),_0x153012=_0x5c9935;}else _0x153012=_0x1f4eff[_0x552f40(0x16c)];if(_0x5d3af6(_0x45895d[_0x552f40(0x15a)])){const _0x58500c=_0x45895d[_0x552f40(0x15c)][_0x45895d[_0x552f40(0x15c)][_0x552f40(0x160)]-0x1],_0x201db7=new _0x1177df(_0x45895d[_0x552f40(0x15a)][_0x552f40(0x171)][_0x552f40(0x165)](0x0,_0x58500c));_0x3908ff(_0x45895d[_0x552f40(0x15a)],_0x201db7),_0x458623=_0x201db7;}else _0x458623=_0x45895d[_0x552f40(0x15d)];if(!(_0x153012&&_0x458623&&_0x1cdd3a[_0x552f40(0x169)]&&_0x1cdd3a[_0x552f40(0x16d)]))return new _0x4fb42e([]);const _0xa857e4=_0x19019d(_0x153012),_0xd9a298=_0x19019d(_0x458623),_0x25c115=[],_0xc5a460=[];let _0x159e9c=_0x1cdd3a[_0x552f40(0x169)];for(;_0x159e9c&&_0x159e9c!==_0x153012;){let _0x29601e;_0xa857e4[_0x552f40(0x16e)](_0x159e9c)||_0x25c115[_0x552f40(0x156)](_0x159e9c),_0x29601e=_0x913ecc(_0x159e9c)?_0x54a74d[_0x552f40(0x16b)](_0x1cdd3a,_0x159e9c,_0x552f40(0x16f)):_0x54a74d[_0x552f40(0x158)](_0x1cdd3a,_0x159e9c),_0x159e9c=_0x29601e?_0x29601e[_0x552f40(0x16c)]:null;}for(_0x159e9c=_0x1cdd3a[_0x552f40(0x16d)];_0x159e9c&&_0x159e9c!==_0x458623;){let _0x18fdae;_0xd9a298[_0x552f40(0x16e)](_0x159e9c)||_0xc5a460[_0x552f40(0x156)](_0x159e9c),_0x18fdae=_0x913ecc(_0x159e9c)?_0x54a74d[_0x552f40(0x16b)](_0x1cdd3a,_0x159e9c,_0x552f40(0x170)):_0x54a74d[_0x552f40(0x164)](_0x1cdd3a,_0x159e9c),_0x159e9c=_0x18fdae?_0x18fdae[_0x552f40(0x15d)]:null;}return _0x25c115[_0x552f40(0x166)](_0x351471=>{_0x315ff1(_0x351471);}),_0xc5a460[_0x552f40(0x154)]()[_0x552f40(0x166)](_0x30bb8e=>{_0x315ff1(_0x30bb8e);}),_0x1cdd3a;}}function _0x1c68(){const _0x13316e=['3DBmTMU','getNudgedToWordBoundary','1272060GeTWxV','createBefore','slice','forEach','885520Fcbfsg','120maAOyD','firstChild','101240ixiycJ','createAt','nextNode','lastChild','includes','start','end','data','1214290ynTpkT','3466GbJDdP','reverse','43200xMcrdl','push','document','createAfter','createFromPath','parent','getContent','path','previousNode','isEqual','2460159JpVUDe','length'];_0x1c68=function(){return _0x13316e;};return _0x1c68();}
|
|
@@ -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 _0x3d45(){const _0x15abb4=['29yKpKkb','1055368DwMzxt','2379036NazcFS','8FoTKCL','mouseLeaveSuggestion','25126hnkokQ','110zOATQK','4610ICuFSr','30ASKZil','toggleSuggestionDisplayMode','showChangeInText','36279jbWFtu','1468579uMMnsb','117545UzKEPY','like','dislike','rejectSuggestion','applySuggestion','insertSuggestion','mouseOverSuggestion','1168323DOBdkT'];_0x3d45=function(){return _0x15abb4;};return _0x3d45();}const _0x376c8a=_0x42b7;(function(_0x227e83,_0x23345a){const _0x3852a6=_0x42b7,_0x5a68d7=_0x227e83();while(!![]){try{const _0x1e8ff3=-parseInt(_0x3852a6(0xfc))/0x1*(-parseInt(_0x3852a6(0x101))/0x2)+parseInt(_0x3852a6(0xfb))/0x3+-parseInt(_0x3852a6(0xfd))/0x4+-parseInt(_0x3852a6(0x109))/0x5*(-parseInt(_0x3852a6(0x104))/0x6)+parseInt(_0x3852a6(0x108))/0x7*(parseInt(_0x3852a6(0xff))/0x8)+-parseInt(_0x3852a6(0x107))/0x9*(parseInt(_0x3852a6(0x103))/0xa)+-parseInt(_0x3852a6(0x102))/0xb*(-parseInt(_0x3852a6(0xfe))/0xc);if(_0x1e8ff3===_0x23345a)break;else _0x5a68d7['push'](_0x5a68d7['shift']());}catch(_0x5943b2){_0x5a68d7['push'](_0x5a68d7['shift']());}}}(_0x3d45,0xe5dc3));function _0x42b7(_0x42dec8,_0x41b3b1){const _0x3d457e=_0x3d45();return _0x42b7=function(_0x42b716,_0x1744d7){_0x42b716=_0x42b716-0xfb;let _0x1059f8=_0x3d457e[_0x42b716];return _0x1059f8;},_0x42b7(_0x42dec8,_0x41b3b1);}export const AI_SUGGESTION_UI_EVENT_NAMES=[_0x376c8a(0x106),_0x376c8a(0x10e),_0x376c8a(0x10d),_0x376c8a(0x10c),_0x376c8a(0x10f),_0x376c8a(0x100),_0x376c8a(0x105),_0x376c8a(0x10a),_0x376c8a(0x10b)];
|
|
@@ -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 _0x2b82(){var _0x1f4b17=['900700eYEpVm','6308630cTcjoc','28EDWRzF','110BdGMNw','12ASDMat','22zoxfVx','5002608YqRFLo','get','1579834dLJDgF','229380VofMEy','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.','length','2764064LhOPyW','2232248AbKAWb','ai-get-editor-from-context-no-editor','9XYOTrr','editors','warn'];_0x2b82=function(){return _0x1f4b17;};return _0x2b82();}(function(_0x23c2cc,_0x10406d){var _0x5b2344=_0x3063,_0x2bcfde=_0x23c2cc();while(!![]){try{var _0x366fd9=parseInt(_0x5b2344(0x1eb))/0x1+parseInt(_0x5b2344(0x1e3))/0x2*(-parseInt(_0x5b2344(0x1e7))/0x3)+parseInt(_0x5b2344(0x1ef))/0x4+-parseInt(_0x5b2344(0x1e6))/0x5*(parseInt(_0x5b2344(0x1ec))/0x6)+parseInt(_0x5b2344(0x1e5))/0x7*(parseInt(_0x5b2344(0x1de))/0x8)+parseInt(_0x5b2344(0x1e0))/0x9*(-parseInt(_0x5b2344(0x1e4))/0xa)+parseInt(_0x5b2344(0x1e8))/0xb*(parseInt(_0x5b2344(0x1e9))/0xc);if(_0x366fd9===_0x10406d)break;else _0x2bcfde['push'](_0x2bcfde['shift']());}catch(_0x2a2ad3){_0x2bcfde['push'](_0x2bcfde['shift']());}}}(_0x2b82,0xe74db));import{CKEditorError as _0x49e907}from'ckeditor5/src/utils.js';import{Editor as _0x41a0d0}from'ckeditor5/src/core.js';function _0x3063(_0x421070,_0x416e2d){var _0x2b8211=_0x2b82();return _0x3063=function(_0x30639a,_0x6f3f7d){_0x30639a=_0x30639a-0x1de;var _0x4d7f08=_0x2b8211[_0x30639a];return _0x4d7f08;},_0x3063(_0x421070,_0x416e2d);}export function getEditorFromContext(_0x47948a){var _0x422d2f=_0x3063;if(_0x47948a instanceof _0x41a0d0)return _0x47948a;if(_0x47948a?.[_0x422d2f(0x1e1)]&&_0x47948a[_0x422d2f(0x1e1)][_0x422d2f(0x1ea)](0x0))return _0x47948a[_0x422d2f(0x1e1)][_0x422d2f(0x1ee)]>0x1&&console[_0x422d2f(0x1e2)](_0x422d2f(0x1ed)),_0x47948a[_0x422d2f(0x1e1)][_0x422d2f(0x1ea)](0x0);throw new _0x49e907(_0x422d2f(0x1df));}
|
|
@@ -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(_0x2eecab,_0x385423){const _0x589b4a=_0x3222,_0x5e2b88=_0x2eecab();while(!![]){try{const _0x47c900=parseInt(_0x589b4a(0x1e2))/0x1+parseInt(_0x589b4a(0x1e0))/0x2+parseInt(_0x589b4a(0x1cc))/0x3+parseInt(_0x589b4a(0x1d1))/0x4*(parseInt(_0x589b4a(0x1cf))/0x5)+-parseInt(_0x589b4a(0x1d0))/0x6+-parseInt(_0x589b4a(0x1e5))/0x7*(-parseInt(_0x589b4a(0x1d6))/0x8)+-parseInt(_0x589b4a(0x1e4))/0x9;if(_0x47c900===_0x385423)break;else _0x5e2b88['push'](_0x5e2b88['shift']());}catch(_0x5cd0ad){_0x5e2b88['push'](_0x5e2b88['shift']());}}}(_0x46a9,0x6322d));import{transformOperationSets as _0xf026ca}from'ckeditor5/src/engine.js';import{append as _0x3922ef,findByAttribute as _0x4a07cc,prependChild as _0x51d058,removeElement as _0x2704f4,serialize as _0x56cdde}from'./htmlparser.js';function _0x3222(_0x1566ac,_0x142372){const _0x46a938=_0x46a9();return _0x3222=function(_0x322230,_0x10ee51){_0x322230=_0x322230-0x1c9;let _0x3a8dfb=_0x46a938[_0x322230];return _0x3a8dfb;},_0x3222(_0x1566ac,_0x142372);}function _0x46a9(){const _0x3e0ae4=['2340822tupRgy','4sJqFZb','length','anchorId','new','removed','680KOqPzA','node','model','cloneNode','operationsA','documentContextContent','getOperations','shift','content','previousSibling','49868ISWAJK','data-id','264478iWHJnF','history','816507yTxCtY','3017hQmLef','getDocumentContext','filter','getDiff','map','document','1291848VsYoTK','type','version','651290SLNlmI'];_0x46a9=function(){return _0x3e0ae4;};return _0x46a9();}export function getOperationsFromReply({editor:_0x2521ef,interaction:_0x5101e3,reply:_0x3f643e,groups:_0x9ccfb,transform:_0x1c4528,documentCompare:_0x220756,documentCompareOptions:_0x515c61}){const _0x2a3894=_0x3222,_0x222c47=_0x5101e3[_0x2a3894(0x1e6)]();if(!_0x222c47)return[];const _0x536f1a=_0x222c47[_0x2a3894(0x1de)],_0x5bf65b=_0x222c47[_0x2a3894(0x1ce)],_0x2bd275=_0x3f643e[_0x2a3894(0x1db)][_0x2a3894(0x1d9)](!0x0);for(const {changes:_0x77e4b5}of _0x9ccfb){const _0xb76797=_0x77e4b5[_0x2a3894(0x1e7)](_0x3be35f=>_0x2a3894(0x1d4)!=_0x3be35f[_0x2a3894(0x1cd)])[_0x2a3894(0x1ca)](_0x217757=>_0x4a07cc(_0x2a3894(0x1e1),_0x217757['id'],_0x2bd275)),_0x1f33a5=_0x77e4b5[_0x2a3894(0x1e7)](_0x4114ae=>_0x2a3894(0x1d5)!=_0x4114ae[_0x2a3894(0x1cd)])[_0x2a3894(0x1ca)](_0x59036c=>_0x59036c[_0x2a3894(0x1d7)][_0x2a3894(0x1d9)](!0x0));let _0x3d4a2d=null;if(_0xb76797[_0x2a3894(0x1d2)]){_0x3d4a2d=_0xb76797[0x0][_0x2a3894(0x1df)];for(let _0x346555=0x0;_0x346555<_0xb76797[_0x2a3894(0x1d2)];_0x346555++)_0x2704f4(_0xb76797[_0x346555]);}if(_0x1f33a5[_0x2a3894(0x1d2)]){_0x3d4a2d||(_0x77e4b5[0x0][_0x2a3894(0x1d3)]?_0x3d4a2d=_0x4a07cc(_0x2a3894(0x1e1),_0x77e4b5[0x0][_0x2a3894(0x1d3)],_0x2bd275):(_0x3d4a2d=_0x1f33a5[_0x2a3894(0x1dd)](),_0x51d058(_0x2bd275,_0x3d4a2d)));for(let _0x1adea0=0x0;_0x1adea0<_0x1f33a5[_0x2a3894(0x1d2)];_0x1adea0++)_0x3922ef(_0x3d4a2d,_0x1f33a5[_0x1adea0]),_0x3d4a2d=_0x1f33a5[_0x1adea0];}}const _0x52fc0a=_0x56cdde(_0x2bd275),_0x482e80=_0x220756[_0x2a3894(0x1c9)](_0x536f1a,_0x52fc0a,_0x515c61)[_0x2a3894(0x1dc)]();if(_0x1c4528){const _0x85d291=_0x2521ef[_0x2a3894(0x1d8)][_0x2a3894(0x1cb)][_0x2a3894(0x1e3)][_0x2a3894(0x1dc)](_0x5bf65b),_0x525a51={'document':_0x2521ef[_0x2a3894(0x1d8)][_0x2a3894(0x1cb)],'useRelations':!0x1,'padWithNoOps':!0x1};return _0xf026ca(_0x482e80,_0x85d291,_0x525a51)[_0x2a3894(0x1da)];}return _0x482e80;}
|
|
@@ -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(_0x2781b7,_0x5f1f25){const _0x4825c2=_0x5951,_0x2bab01=_0x2781b7();while(!![]){try{const _0x1fdbba=parseInt(_0x4825c2(0x1b2))/0x1+-parseInt(_0x4825c2(0x1f1))/0x2*(-parseInt(_0x4825c2(0x1ca))/0x3)+-parseInt(_0x4825c2(0x1e0))/0x4+-parseInt(_0x4825c2(0x1ef))/0x5*(parseInt(_0x4825c2(0x1c5))/0x6)+-parseInt(_0x4825c2(0x1f0))/0x7+-parseInt(_0x4825c2(0x1bf))/0x8+parseInt(_0x4825c2(0x1dd))/0x9;if(_0x1fdbba===_0x5f1f25)break;else _0x2bab01['push'](_0x2bab01['shift']());}catch(_0x4074cf){_0x2bab01['push'](_0x2bab01['shift']());}}}(_0x5928,0xa5be6));import{findOne as _0x284189,getAttribute as _0x34a605,Document as _0x5593fa,serialize as _0x21500f,parse as _0x5ae145}from'./htmlparser.js';import{_DetachOperation as _0x401acf,_removeFromModelNodeList as _0x30c234,_insertIntoModelNodeList as _0xd45f43}from'ckeditor5/src/engine.js';function _0x5951(_0x56f499,_0x378fa3){const _0x59289e=_0x5928();return _0x5951=function(_0x5951c8,_0x4c5894){_0x5951c8=_0x5951c8-0x1aa;let _0x4a427d=_0x59289e[_0x5951c8];return _0x4a427d;},_0x5951(_0x56f499,_0x378fa3);}export function getSuggestionPartsFromReply({editor:_0x4e4730,changeGroups:_0x27befe,documentContextContent:_0x13ab6d,showDiff:_0xa484f2,trimUnchanged:_0x4bc6b4=!0x0}){const _0x216e85=_0x5951;return _0x27befe[_0x216e85(0x1e5)](_0x35d4e5=>{const _0x37ee44=_0x216e85,_0x48f25d=new _0x5593fa([]),_0x39e5d9=new _0x5593fa([]);for(const _0x49bbd1 of _0x35d4e5[_0x37ee44(0x1e3)])if(_0xa484f2&&_0x37ee44(0x1c2)==_0x49bbd1[_0x37ee44(0x1de)]||_0x39e5d9[_0x37ee44(0x1ab)][_0x37ee44(0x1f3)](_0x49bbd1[_0x37ee44(0x1f9)][_0x37ee44(0x1fd)](!0x0)),_0x37ee44(0x1f8)!=_0x49bbd1[_0x37ee44(0x1de)]&&(_0xa484f2||_0x37ee44(0x1c2)!=_0x49bbd1[_0x37ee44(0x1de)])){const _0x353de7=_0x284189(_0x4b03d2=>_0x34a605(_0x4b03d2,_0x37ee44(0x1d1))==_0x49bbd1['id'],_0x13ab6d,!0x0);_0x353de7&&_0x48f25d[_0x37ee44(0x1ab)][_0x37ee44(0x1f3)](_0x353de7[_0x37ee44(0x1fd)](!0x0));}const _0x4c018c=function(_0x4e9027,_0x488e44,_0x1b2f42,_0x5b19d0,_0x32ef88=!0x0){const _0x5ef121=_0x37ee44,_0x3ad8da=_0x4e9027[_0x5ef121(0x1bc)][_0x5ef121(0x1df)](_0x5ef121(0x1d7)),_0x26b826=_0x4e9027[_0x5ef121(0x1bc)][_0x5ef121(0x1df)](_0x5ef121(0x1d2)),_0x12f923=_0x21500f(_0x488e44),_0x2215ac=_0x21500f(_0x1b2f42),_0x1e6666=_0x4e9027[_0x5ef121(0x1d9)][_0x5ef121(0x1cd)](_0x12f923,_0x5ef121(0x1d3)),_0x66c03d=_0x4e9027[_0x5ef121(0x1ee)][_0x5ef121(0x1e1)](_0x1e6666,0x0),_0x5bb54e=_0x3ad8da[_0x5ef121(0x1b4)](_0x12f923,_0x2215ac,{'anchor':_0x66c03d,'markDeletions':_0x5b19d0}),_0x15f766=_0x5bb54e[_0x5ef121(0x1c3)]();if(0x0==_0x15f766[_0x5ef121(0x1ec)])return null;_0x5b19d0?_0x26b826[_0x5ef121(0x1bd)](_0x15f766):_0x4e9027[_0x5ef121(0x1ee)][_0x5ef121(0x1fb)](_0x28cb40=>{const _0x37ce08=_0x5ef121;for(const _0x295e78 of _0x15f766)if(_0x37ce08(0x1fa)==_0x295e78[_0x37ce08(0x1de)]){const _0xdbb9ab=_0x295e78[_0x37ce08(0x207)],_0x41ed6b=_0x295e78[_0x37ce08(0x1ae)],_0x130902=new _0x401acf(_0xdbb9ab,_0x41ed6b);_0x28cb40[_0x37ce08(0x206)][_0x37ce08(0x1f7)](_0x130902),_0x4e9027[_0x37ce08(0x1ee)][_0x37ce08(0x1ce)](_0x130902);}else _0x295e78[_0x37ce08(0x1cb)]=null,_0x295e78[_0x37ce08(0x1c7)]=!0x1,_0x28cb40[_0x37ce08(0x206)][_0x37ce08(0x1f7)](_0x295e78),_0x4e9027[_0x37ce08(0x1ee)][_0x37ce08(0x1ce)](_0x295e78);});if(_0x32ef88){const _0x153118=getMinimalSelection(_0x4e9027,_0x15f766,_0x1e6666);expandSelectionWithContext(_0x4e9027[_0x5ef121(0x1ee)],_0x153118),function(_0x1d2e04,_0x5ab7ad){const _0x6f227f=_0x5ef121,_0x54cc14=_0x5ab7ad[_0x6f227f(0x1ed)]()[_0x6f227f(0x1e8)];let _0x9e2cb9=_0x5ab7ad[_0x6f227f(0x1ed)]()[_0x6f227f(0x200)];const _0x13679f=_0x54cc14[_0x6f227f(0x1d6)];(_0x9e2cb9[_0x6f227f(0x1e2)]||_0x9e2cb9[_0x6f227f(0x1f4)]&&_0x9e2cb9[_0x6f227f(0x1f4)]['is'](_0x6f227f(0x1b7)))&&(_0xd45f43(_0x9e2cb9,_0x6f227f(0x1ad)),_0x9e2cb9=_0x9e2cb9[_0x6f227f(0x1da)](0x3)),(_0x54cc14[_0x6f227f(0x1e2)]||_0x54cc14[_0x6f227f(0x1c4)]&&_0x54cc14[_0x6f227f(0x1c4)]['is'](_0x6f227f(0x1b7)))&&(_0xd45f43(_0x54cc14,_0x6f227f(0x1ad)),function(_0x2f97db,_0x155f87,_0x55b70d){const _0x247d32=_0x6f227f;for(let [_0x17760a,_0x42dfaa]of _0x2f97db[_0x247d32(0x1e4)]){const _0x5e20be=_0x42dfaa[_0x247d32(0x1bb)](_0x155f87,_0x55b70d,!0x1);_0x42dfaa=_0x5e20be[0x0],_0x2f97db[_0x247d32(0x1e4)][_0x247d32(0x1be)](_0x17760a,_0x42dfaa);}}(_0x13679f,_0x54cc14,0x3),_0x54cc14[_0x6f227f(0x1e7)]==_0x9e2cb9[_0x6f227f(0x1e7)]&&(_0x9e2cb9=_0x9e2cb9[_0x6f227f(0x1da)](0x3)));const _0x5ce3d7=_0x1d2e04[_0x6f227f(0x1af)](_0x1d2e04[_0x6f227f(0x1e1)](_0x13679f,0x0),_0x54cc14),_0x325646=_0x1d2e04[_0x6f227f(0x1af)](_0x9e2cb9,_0x1d2e04[_0x6f227f(0x1e1)](_0x13679f,_0x6f227f(0x200))),_0x4a1395=[..._0x5ce3d7[_0x6f227f(0x1cc)](),..._0x325646[_0x6f227f(0x1cc)]()];_0x4a1395[_0x6f227f(0x1b0)]();for(const _0xe41531 of _0x4a1395)_0x30c234(_0xe41531),_transformMarkersByDeletion(_0x13679f,_0xe41531);}(_0x4e9027[_0x5ef121(0x1ee)],_0x153118);}const _0x2a7f25=_0x4e9027[_0x5ef121(0x1d9)][_0x5ef121(0x1db)](_0x1e6666,{'showSuggestionHighlights':!0x0});return _0x5ae145(_0x2a7f25);}(_0x4e4730,_0x48f25d,_0x39e5d9,_0xa484f2,_0x4bc6b4);return{'type':_0x35d4e5[_0x37ee44(0x1e3)][0x0][_0x37ee44(0x1de)],'index':_0x35d4e5[_0x37ee44(0x1b6)],'content':_0x4c018c};});}function _0x5928(){const _0x11697b=['_applyOperationsAsSuggestions','set','6706728oKFpsR','merge','backward','removed','getOperations','nodeBefore','63870BougfO','newRange','isDocumentOperation','word','isBlock','6fMiFYm','baseVersion','getMinimalFlatRanges','parse','applyOperation','targetPosition','rename','data-id','TrackChangesEditing','$root','isMarkedRemoveOperation','forward','root','DocumentCompare','position','data','getShiftedBy','stringify','POSITIVE_INFINITY','29883627PMFpGY','type','get','4810064oIHUaG','createPositionAt','textNode','changes','markers','map','removeAttribute','parent','start','splitPosition','schema','createPositionFromPath','length','getFirstRange','model','455YvAuir','4697028WZvzKg','377458zLxHOB','addAttribute','push','nodeAfter','insert','_getTransformedByDeletion','addOperation','new','node','remove','change','createSelection','cloneNode','isAfter','setTo','end','isObject','focus','offset','getMovedRangeStart','changeAttribute','batch','sourcePosition','isBefore','children','slice','...','howMany','createRange','reverse','modifySelection','661581fTnrLm','moveTargetPosition','getDiff','split','index','$text','element','path','range','_getTransformedByInsertion','plugins'];_0x5928=function(){return _0x11697b;};return _0x5928();}export function getMinimalSelection(_0xcba9e6,_0x2ad25e,_0x5d8408){const _0x243287=_0x5951,_0x2742ca=_0xcba9e6[_0x243287(0x1bc)][_0x243287(0x1df)](_0x243287(0x1d7));let _0x38ec32=_0xcba9e6[_0x243287(0x1ee)][_0x243287(0x1e1)](_0x5d8408,Number[_0x243287(0x1dc)]),_0x1bc73a=_0xcba9e6[_0x243287(0x1ee)][_0x243287(0x1e1)](_0x5d8408,0x0);for(const _0x46fade of _0x2ad25e){let _0x3d6c2c,_0x4f2bd7;if(_0x2742ca[_0x243287(0x1d4)](_0x46fade))_0x3d6c2c=_0x46fade[_0x243287(0x1c6)][_0x243287(0x1e8)],_0x4f2bd7=_0x46fade[_0x243287(0x1c6)][_0x243287(0x200)];else switch(_0x46fade[_0x243287(0x1de)]){case _0x243287(0x1d0):_0x3d6c2c=_0x46fade[_0x243287(0x1d8)],_0x4f2bd7=_0x3d6c2c[_0x243287(0x1da)](0x1);break;case _0x243287(0x1f2):case _0x243287(0x1e6):case _0x243287(0x205):_0x3d6c2c=_0x46fade[_0x243287(0x1ba)][_0x243287(0x1e8)],_0x4f2bd7=_0x46fade[_0x243287(0x1ba)][_0x243287(0x200)];break;case _0x243287(0x1f5):_0x3d6c2c=_0x46fade[_0x243287(0x1d8)],_0x4f2bd7=_0x3d6c2c[_0x243287(0x1da)](_0x46fade[_0x243287(0x1ae)]);break;case _0x243287(0x1b5):_0x3d6c2c=_0x46fade[_0x243287(0x1e9)],_0x4f2bd7=_0x46fade[_0x243287(0x1b3)];break;case _0x243287(0x1c0):{const _0x15a4d7=_0x46fade[_0x243287(0x1cf)][_0x243287(0x1b9)][_0x243287(0x1ac)](-0x1);_0x3d6c2c=_0xcba9e6[_0x243287(0x1ee)][_0x243287(0x1eb)](_0x5d8408,_0x15a4d7),_0x4f2bd7=_0x3d6c2c[_0x243287(0x1da)](0x1);break;}case _0x243287(0x1fa):{const _0xca7705=_0x46fade[_0x243287(0x1ae)],_0x36dcc=_0x46fade[_0x243287(0x207)][_0x243287(0x1bb)](_0x46fade[_0x243287(0x1cf)],_0xca7705),_0x10fd1b=_0x46fade[_0x243287(0x204)]();_0x243287(0x1fa)==_0x46fade[_0x243287(0x1de)]?(_0x3d6c2c=_0x36dcc,_0x4f2bd7=_0x36dcc):(_0x3d6c2c=_0x10fd1b,_0x4f2bd7=_0x10fd1b[_0x243287(0x1da)](_0xca7705));break;}}_0x3d6c2c&&_0x3d6c2c[_0x243287(0x1aa)](_0x38ec32)&&(_0x38ec32=_0x3d6c2c),_0x4f2bd7&&_0x4f2bd7[_0x243287(0x1fe)](_0x1bc73a)&&(_0x1bc73a=_0x4f2bd7);}return _0xcba9e6[_0x243287(0x1ee)][_0x243287(0x1fc)](_0xcba9e6[_0x243287(0x1ee)][_0x243287(0x1af)](_0x38ec32,_0x1bc73a));}export function expandSelectionWithContext(_0x3359e8,_0xf4ce65){const _0x5b95cd=_0x5951;eo(_0x3359e8,_0xf4ce65,_0x5b95cd(0x1d5));const _0x3f0121=_0xf4ce65[_0x5b95cd(0x1ed)]();_0xf4ce65[_0x5b95cd(0x1ff)]([]),_0xf4ce65[_0x5b95cd(0x1ff)](_0x3f0121,{'backward':!0x0}),eo(_0x3359e8,_0xf4ce65,_0x5b95cd(0x1c1));}function eo(_0x1071ac,_0x14f879,_0x1230a1){const _0x4bc228=_0x5951;let _0x30b761=0x14;for(;_0x30b761;){_0x1071ac[_0x4bc228(0x1b1)](_0x14f879,{'unit':_0x4bc228(0x1c8),'direction':_0x1230a1}),_0x30b761--;const _0x551f3b=_0x14f879[_0x4bc228(0x202)][_0x4bc228(0x1d5)==_0x1230a1?_0x4bc228(0x1c4):_0x4bc228(0x1f4)];if(_0x551f3b&&_0x551f3b['is'](_0x4bc228(0x1b8))&&_0x1071ac[_0x4bc228(0x1ea)][_0x4bc228(0x1c9)](_0x551f3b)&&_0x1071ac[_0x4bc228(0x1ea)][_0x4bc228(0x201)](_0x551f3b))break;}}export function _transformMarkersByDeletion(_0x1d71a7,_0x492db4){const _0x47672c=_0x5951;for(let [_0x8f3cf8,_0x36288f]of _0x1d71a7[_0x47672c(0x1e4)])_0x36288f=_0x36288f[_0x47672c(0x1f6)](_0x492db4[_0x47672c(0x1e8)],_0x492db4[_0x47672c(0x200)][_0x47672c(0x203)]-_0x492db4[_0x47672c(0x1e8)][_0x47672c(0x203)]),_0x1d71a7[_0x47672c(0x1e4)][_0x47672c(0x1be)](_0x8f3cf8,_0x36288f);}
|
|
@@ -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(_0x3175fc,_0x3c22f5){const _0x534d93=_0x4dcd,_0x16724a=_0x3175fc();while(!![]){try{const _0x3e5017=-parseInt(_0x534d93(0x137))/0x1+-parseInt(_0x534d93(0x12b))/0x2*(-parseInt(_0x534d93(0x138))/0x3)+parseInt(_0x534d93(0x132))/0x4+parseInt(_0x534d93(0x13b))/0x5+-parseInt(_0x534d93(0x128))/0x6*(parseInt(_0x534d93(0x130))/0x7)+-parseInt(_0x534d93(0x13e))/0x8+-parseInt(_0x534d93(0x139))/0x9*(-parseInt(_0x534d93(0x134))/0xa);if(_0x3e5017===_0x3c22f5)break;else _0x16724a['push'](_0x16724a['shift']());}catch(_0x59bb2a){_0x16724a['push'](_0x16724a['shift']());}}}(_0x3a65,0xd589c));import{parseDocument as _0x1bc440}from'htmlparser2';import{append as _0x56a0c6,appendChild as _0x246e2b,find as _0x310e2c,findAll as _0x2093ff,findOne as _0x22a7cd,getChildren as _0x1c57ee,isComment as _0x27183b,isTag as _0x116f31,prepend as _0xf80453,prependChild as _0x2eae35,removeElement as _0x1cf70,replaceElement as _0x1a16e5,textContent as _0x187903,getParent as _0xef3f15,hasChildren as _0x29734f}from'domutils';import _0x4c2855 from'dom-serializer';import{cloneNode as _0x1cb1e7,isDocument as _0x202069,isText as _0x40661e,Element as _0x37392b,Text as _0x2bb329,Document as _0x5bc7c4,NodeWithChildren as _0x446bee}from'domhandler';export{_0x1cb1e7 as cloneNode,_0x310e2c as find,_0x22a7cd as findOne,_0x2093ff as findAll,_0x1c57ee as getChildren,_0xef3f15 as getParent,_0x27183b as isComment,_0x202069 as isDocument,_0x116f31 as isTag,_0x40661e as isText,_0x56a0c6 as append,_0x246e2b as appendChild,_0xf80453 as prepend,_0x2eae35 as prependChild,_0x4c2855 as render,_0x1cf70 as removeElement,_0x1a16e5 as replaceElement,_0x187903 as textContent,_0x29734f as hasChildren,_0x37392b as Element,_0x5bc7c4 as Document,_0x446bee as NodeWithChildren,_0x2bb329 as Text};export function parse(_0x33ab0c){return _0x1bc440(_0x33ab0c);}export function serialize(_0x3f95e9){return _0x4c2855(_0x3f95e9);}export function findByAttribute(_0x4ae446,_0x530198,_0x63c461){const _0x50d731=_0x4dcd,_0x1206b7=null!==_0x530198?_0x321cac=>_0x321cac[_0x50d731(0x131)][_0x4ae446]===_0x530198:_0x16794b=>Boolean(_0x16794b[_0x50d731(0x131)][_0x4ae446]);return _0x22a7cd(_0x5675fd=>_0x116f31(_0x5675fd)&&_0x1206b7(_0x5675fd),_0x63c461);}export function findAllByAttribute(_0x41df06,_0x51dced,_0x492ab9){const _0x3507f4=_0x4dcd,_0x2bf4d9=null!==_0x51dced?_0x180f00=>_0x180f00[_0x3507f4(0x131)][_0x41df06]===_0x51dced:_0xf9b1e6=>Boolean(_0xf9b1e6[_0x3507f4(0x131)][_0x41df06]);return _0x2093ff(_0x34c3e6=>_0x116f31(_0x34c3e6)&&_0x2bf4d9(_0x34c3e6),_0x492ab9);}export function findAllComments(_0x24a95b){return _0x310e2c(_0x4f7e91=>_0x27183b(_0x4f7e91),_0x24a95b,!0x0,0x1/0x0);}function _0x4dcd(_0x31d558,_0x53b024){const _0x3a653a=_0x3a65();return _0x4dcd=function(_0x4dcd07,_0x2e053f){_0x4dcd07=_0x4dcd07-0x128;let _0x2d4245=_0x3a653a[_0x4dcd07];return _0x2d4245;},_0x4dcd(_0x31d558,_0x53b024);}export function getAttribute(_0x47fb1a,_0x38b984){const _0xe935b7=_0x4dcd;return _0x47fb1a&&_0x116f31(_0x47fb1a)?_0x47fb1a[_0xe935b7(0x131)][_0x38b984]:null;}export function setAttribute(_0x31b6af,_0xe32017,_0x20bbd4){const _0x5bffd3=_0x4dcd;_0x116f31(_0x31b6af)&&(null===_0x20bbd4?delete _0x31b6af[_0x5bffd3(0x131)][_0xe32017]:_0x31b6af[_0x5bffd3(0x131)][_0xe32017]=_0x20bbd4);}export function insertElement(_0x192a45,_0x46c98f,_0x2eb4b3){const _0x7ab9ee=_0x4dcd,_0x41d9b4=_0x46c98f[_0x7ab9ee(0x135)](!0x0);_0x7ab9ee(0x12d)===_0x2eb4b3?_0xf80453(_0x192a45,_0x41d9b4):_0x7ab9ee(0x13a)===_0x2eb4b3?_0x2eae35(_0x192a45,_0x41d9b4):_0x7ab9ee(0x13c)===_0x2eb4b3?_0x246e2b(_0x192a45,_0x41d9b4):_0x7ab9ee(0x140)===_0x2eb4b3&&_0x56a0c6(_0x192a45,_0x41d9b4);}export function moveElement(_0x2eb231,_0x244453){_0x1cf70(_0x2eb231),_0x1a16e5(_0x244453,_0x2eb231);}export function clone(_0x1d2ee0){const _0x3c5a06=_0x4dcd;return _0x1d2ee0[_0x3c5a06(0x135)](!0x0);}export function getParents(_0x9bf23b){const _0x2af0e9=_0x4dcd,_0x211ae8=[];let _0x498967=_0x9bf23b;for(;_0x498967;)_0x498967=_0xef3f15(_0x498967),_0x498967&&_0x211ae8[_0x2af0e9(0x12f)](_0x498967);return _0x211ae8;}function _0x3a65(){const _0x51c247=['4586725YaWyHo','beforeend','parentNode','2620280MCtzcF','forEach','afterend','28206bKJbjX','map','nextSibling','148468twgGrb','slice','beforebegin','replace','push','2562cwYAKV','attribs','6843740RlsEHS','reverse','10vyqbWs','cloneNode','indexOf','1747717fSznbt','42NdsCrQ','9026226QxEsFR','afterbegin'];_0x3a65=function(){return _0x51c247;};return _0x3a65();}export function normalizeHTML(_0x24af85){const _0x5f09fc=_0x4dcd;return _0x24af85[_0x5f09fc(0x12e)](/^\s+/gm,'')[_0x5f09fc(0x12e)](/\s+$/gm,'')[_0x5f09fc(0x12e)](/\n*/g,'')[_0x5f09fc(0x12e)](/\s+/g,'\x20')[_0x5f09fc(0x12e)](/>\s*</g,'><');}export function areNodesSame(_0x446e9e,_0x21a566){return normalizeHTML(serialize(_0x446e9e))===normalizeHTML(serialize(_0x21a566));}export function getNodeNestingLevel(_0x4f4411){const _0x492aed=_0x4dcd;let _0x50116b=0x0;for(;_0x4f4411[_0x492aed(0x13d)];)_0x4f4411=_0x4f4411[_0x492aed(0x13d)],_0x50116b++;return _0x50116b;}export function removeElementsAfter(_0x488a64){const _0x2dc775=_0x4dcd,_0x28ea75=[];let _0x18f576=_0x488a64[_0x2dc775(0x12a)];for(;_0x18f576;)_0x28ea75[_0x2dc775(0x12f)](_0x18f576),_0x18f576=_0x18f576[_0x2dc775(0x12a)];_0x28ea75[_0x2dc775(0x13f)](_0x2b13db=>{_0x1cf70(_0x2b13db);});}export function getNodePath(_0x5a0781){const _0x25b790=_0x4dcd;return[_0x5a0781,...getParents(_0x5a0781)][_0x25b790(0x12c)](0x0,-0x1)[_0x25b790(0x129)](_0x500058=>{const _0xf23a44=_0x25b790,_0x5775c7=_0xef3f15(_0x500058);return _0x1c57ee(_0x5775c7)[_0xf23a44(0x136)](_0x500058);})[_0x25b790(0x133)]();}
|
|
@@ -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
|
+
const _0x44d0ae=_0x4ad6;(function(_0x247cf5,_0x27f608){const _0x3aae8c=_0x4ad6,_0x11c683=_0x247cf5();while(!![]){try{const _0x15fbcb=-parseInt(_0x3aae8c(0xd5))/0x1*(parseInt(_0x3aae8c(0xa0))/0x2)+-parseInt(_0x3aae8c(0xd3))/0x3*(parseInt(_0x3aae8c(0xa2))/0x4)+-parseInt(_0x3aae8c(0xc0))/0x5+parseInt(_0x3aae8c(0xc8))/0x6+-parseInt(_0x3aae8c(0xa5))/0x7+-parseInt(_0x3aae8c(0xd1))/0x8*(parseInt(_0x3aae8c(0xa8))/0x9)+parseInt(_0x3aae8c(0xb1))/0xa;if(_0x15fbcb===_0x27f608)break;else _0x11c683['push'](_0x11c683['shift']());}catch(_0x3aaccc){_0x11c683['push'](_0x11c683['shift']());}}}(_0x3842,0x99d42));import _0x13fc3c from'morphdom';function _0x4ad6(_0x121257,_0x278a5f){const _0x38428c=_0x3842();return _0x4ad6=function(_0x4ad6e6,_0x48e0aa){_0x4ad6e6=_0x4ad6e6-0x9b;let _0x2ec8e1=_0x38428c[_0x4ad6e6];return _0x2ec8e1;},_0x4ad6(_0x121257,_0x278a5f);}import{NodeWithChildren as _0x9615bb,Text as _0x205682,Element as _0x1aad7f,isText as _0x2b72c1,isDocument as _0x48e386,isTag as _0x54a5cf,cloneNode as _0x343bfb,getChildren as _0x540dbf,prepend as _0x4a6ac8,removeElement as _0xc939ed,textContent as _0x41b470,render as _0x5d8a30}from'./htmlparser.js';import{logWarning as _0x14a785}from'ckeditor5/src/utils.js';function _0x3842(){const _0x28e202=['now','1421665NAPxhD','children','includes','sup','stop','cleanUpAnimations','join','div','2602278vcQtRN','parent','abort','querySelectorAll','match','currentIndex','stream','bind','addEventListener','1192yiZzhp','splitTextNodeIntoWordNodes','2284320qrtEBF','isWordSplitResult','175IuFPiK','sub','tagName','childNodes','delay','entries','html-streamer-current-index-out-of-bounds','ins','11078HiFDJD','reverse','4VyvHWw','options','shouldBeStreamed','7409129YfBCgS','mark','from','24435UrAXWC','length','replaceWith','textNodeStyle','code','del','map','span[data-ck-html-streamer-word-chunk]','push','36744490ngZPiP','span','isStreaming','strong','attribs','renderNode','isWordSplitSource','timeoutAbortController','nodesList','getParsedDocumentNodeList','signal','forEach','onStreamUpdate','document'];_0x3842=function(){return _0x28e202;};return _0x3842();}export class HTMLStreamer{[_0x44d0ae(0xa3)];[_0x44d0ae(0xb3)]=!0x1;[_0x44d0ae(0xbe)]=null;[_0x44d0ae(0xb9)]=[];[_0x44d0ae(0xcd)]=0x0;[_0x44d0ae(0xb8)]=null;constructor(_0x49165a){const _0x4145ec=_0x44d0ae;this[_0x4145ec(0xa3)]={'delay':_0x49165a[_0x4145ec(0x9c)]??0x14,'textNodeStyle':_0x49165a[_0x4145ec(0xab)],'onStreamUpdate':_0x49165a[_0x4145ec(0xbd)]||(()=>{})};}async[_0x44d0ae(0xce)]({document:_0x614385,targetElement:_0x193a44,abortSignal:_0x28a8f4}){const _0x34517d=_0x44d0ae;this[_0x34517d(0xb3)]&&this[_0x34517d(0xc4)](),_0x28a8f4?.[_0x34517d(0xd0)](_0x34517d(0xca),this[_0x34517d(0xc4)][_0x34517d(0xcf)](this)),this[_0x34517d(0xbe)]=_0x343bfb(_0x614385,!0x0),this[_0x34517d(0xb9)]=this[_0x34517d(0xba)](),this[_0x34517d(0xb3)]=!0x0,this[_0x34517d(0xcd)]>this[_0x34517d(0xb9)][_0x34517d(0xa9)]&&(_0x14a785(_0x34517d(0x9e),{'currentIndex':this[_0x34517d(0xcd)],'nodeList':this[_0x34517d(0xb9)]}),this[_0x34517d(0xcd)]=this[_0x34517d(0xb9)][_0x34517d(0xa9)]);for(let _0x56c907=0x0;_0x56c907<this[_0x34517d(0xcd)];_0x56c907++)this[_0x34517d(0xb9)][_0x56c907][_0x34517d(0xa4)]=!0x0;let _0xfc434c=0x0;for(let _0x55e295=this[_0x34517d(0xcd)];_0x55e295<this[_0x34517d(0xb9)][_0x34517d(0xa9)];_0x55e295++){const _0x17c4d5=Date[_0x34517d(0xbf)](),_0x5a0ce5=this[_0x34517d(0xb9)][_0x55e295],_0xbdbc0f=_0x17c4d5-_0xfc434c;_0x5a0ce5[_0x34517d(0xa4)]=!0x0;let _0x48a58d=_0x5a0ce5[_0x34517d(0xc9)];for(;_0x48a58d;)_0x48a58d[_0x34517d(0xa4)]=!0x0,_0x48a58d=_0x48a58d[_0x34517d(0xc9)];if(_0xbdbc0f<this[_0x34517d(0xa3)][_0x34517d(0x9c)])try{const {promise:_0x2686f9,abortController:_0x2e7264}=mr(this[_0x34517d(0xa3)][_0x34517d(0x9c)]-_0xbdbc0f);this[_0x34517d(0xb8)]=_0x2e7264,await _0x2686f9;}catch(_0x229e53){return;}_0x13fc3c(_0x193a44,'<'+_0x193a44[_0x34517d(0xd7)]+'>'+this[_0x34517d(0xb6)](this[_0x34517d(0xbe)])+'</'+_0x193a44[_0x34517d(0xd7)]+'>',{'childrenOnly':!0x0}),this[_0x34517d(0xa3)][_0x34517d(0xbd)]&&this[_0x34517d(0xa3)][_0x34517d(0xbd)](),this[_0x34517d(0xcd)]=_0x55e295,_0xfc434c=Date[_0x34517d(0xbf)]();}this[_0x34517d(0xb3)]=!0x1;}[_0x44d0ae(0xc5)]({targetElement:_0xcb5117}){const _0x61957d=_0x44d0ae;Array[_0x61957d(0xa7)](_0xcb5117[_0x61957d(0xcb)](_0x61957d(0xaf)))[_0x61957d(0xa1)]()[_0x61957d(0xbc)](_0x25db31=>{const _0x8ec7da=_0x61957d;_0x25db31[_0x8ec7da(0xaa)](_0x25db31[_0x8ec7da(0x9b)][0x0]);});}[_0x44d0ae(0xc4)](){const _0x4b32ee=_0x44d0ae;this[_0x4b32ee(0xb3)]=!0x1,this[_0x4b32ee(0xb8)]&&(this[_0x4b32ee(0xb8)][_0x4b32ee(0xca)](),this[_0x4b32ee(0xb8)]=null);}[_0x44d0ae(0xb6)](_0xda1bc0){const _0x1fe0bf=_0x44d0ae;let _0x21f277='';if(function(_0x2e9234){return _0x48e386(_0x2e9234);}(_0xda1bc0)){for(const _0x824c4e of _0xda1bc0[_0x1fe0bf(0xc1)])_0x21f277+=this[_0x1fe0bf(0xb6)](_0x824c4e);}else{if(ar(_0xda1bc0)){if(!_0xda1bc0[_0x1fe0bf(0xa4)])return'';const _0x93f85c=_0xda1bc0,_0x2f28e2=Object[_0x1fe0bf(0x9d)](_0x93f85c[_0x1fe0bf(0xb5)])[_0x1fe0bf(0xae)](([_0x34c292,_0x2263de])=>_0x34c292+'=\x22'+_0x2263de+'\x22')[_0x1fe0bf(0xc6)]('\x20');_0x21f277+='<'+_0x93f85c[_0x1fe0bf(0xd7)]+(_0x2f28e2?'\x20'+_0x2f28e2:'')+'>';for(const _0xca72ca of _0x540dbf(_0x93f85c))_0x21f277+=this[_0x1fe0bf(0xb6)](_0xca72ca);_0x21f277+='</'+_0x93f85c[_0x1fe0bf(0xd7)]+'>';}else{if(!cr(_0xda1bc0))return'';if(!_0xda1bc0[_0x1fe0bf(0xa4)])return'';!function(_0xe53eda){const _0x1d169b=_0x1fe0bf;if(!_0xe53eda[_0x1d169b(0xc9)]||!ar(_0xe53eda[_0x1d169b(0xc9)]))return!0x1;if(!hr[_0x1d169b(0xc2)](_0xe53eda[_0x1d169b(0xc9)][_0x1d169b(0xd7)]))return!0x1;return!_0x41b470(_0xe53eda)[_0x1d169b(0xcc)](/^\s*[<>]\s*$/);}(_0xda1bc0)?_0x21f277+=_0x5d8a30(_0xda1bc0):_0x21f277+=_0x5d8a30(new _0x1aad7f(_0x1fe0bf(0xb2),{'data-ck-html-streamer-word-chunk':'','style':this[_0x1fe0bf(0xa3)][_0x1fe0bf(0xab)]},[_0xda1bc0]));}}return _0x21f277;}[_0x44d0ae(0xba)](){const _0x429863=_0x44d0ae,_0x576d63=[];return function(_0x43a3ef,_0x20d182){const _0x4ad818=_0x4ad6,_0xbacada=_0x18ef98=>{const _0x21ce79=_0x4ad6;if(_0x20d182(_0x18ef98),_0x18ef98 instanceof _0x9615bb)for(let _0x5d49c8=0x0;_0x5d49c8<_0x18ef98[_0x21ce79(0xc1)][_0x21ce79(0xa9)];_0x5d49c8++){const _0x222bac=_0x18ef98[_0x21ce79(0xc1)][_0x5d49c8];_0xbacada(_0x222bac);}};for(let _0x580121=0x0;_0x580121<_0x43a3ef[_0x4ad818(0xc1)][_0x4ad818(0xa9)];_0x580121++)_0xbacada(_0x43a3ef[_0x4ad818(0xc1)][_0x580121]);}(this[_0x429863(0xbe)],_0x3dbe4a=>{const _0x2aa09f=_0x429863;if(cr(_0x3dbe4a)){const _0x30ffbc=this[_0x2aa09f(0xd2)](_0x3dbe4a);_0x30ffbc[_0x2aa09f(0xa9)]&&_0x576d63[_0x2aa09f(0xb0)](..._0x30ffbc);}_0x3dbe4a[_0x2aa09f(0xb7)]||_0x3dbe4a[_0x2aa09f(0xd4)]||_0x576d63[_0x2aa09f(0xb0)](_0x3dbe4a);}),_0x576d63;}[_0x44d0ae(0xd2)](_0x2e5e50){const _0x4cd4e4=_0x44d0ae;if(_0x2e5e50[_0x4cd4e4(0xb7)]||_0x2e5e50[_0x4cd4e4(0xd4)])return[];const _0x36218a=_0x41b470(_0x2e5e50)[_0x4cd4e4(0xcc)](/(?:\s*\S+\s*)/g),_0x3aebe9=[];if(_0x36218a&&_0x36218a[_0x4cd4e4(0xa9)]>0x1){for(const _0x763c08 of _0x36218a){const _0x4db6d7=new _0x205682(_0x763c08);_0x4db6d7[_0x4cd4e4(0xd4)]=!0x0,_0x4a6ac8(_0x2e5e50,_0x4db6d7),_0x3aebe9[_0x4cd4e4(0xb0)](_0x4db6d7);}_0x2e5e50[_0x4cd4e4(0xb7)]=!0x0,_0xc939ed(_0x2e5e50);}return _0x3aebe9;}}const hr=['p','li','td','th',_0x44d0ae(0xb2),'h1','h2','h3','h4','h5','h6','b',_0x44d0ae(0xb4),'i','em',_0x44d0ae(0xa6),_0x44d0ae(0xad),_0x44d0ae(0x9f),_0x44d0ae(0xc3),_0x44d0ae(0xd6),'a',_0x44d0ae(0xac),_0x44d0ae(0xc7)];function cr(_0x29e1bf){return _0x2b72c1(_0x29e1bf);}function ar(_0x1afeda){return _0x54a5cf(_0x1afeda);}function mr(_0x5df3b9){const _0x139880=new AbortController();return{'promise':new Promise((_0x263a08,_0x127445)=>{const _0x4c7906=_0x4ad6,_0x2f01d7=setTimeout(_0x263a08,_0x5df3b9);_0x139880[_0x4c7906(0xbb)][_0x4c7906(0xd0)](_0x4c7906(0xca),()=>{clearTimeout(_0x2f01d7),_0x127445();});}),'abortController':_0x139880};}
|
|
@@ -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 _0x139385=_0x9228;function _0x9228(_0x1bdc4a,_0x54df22){var _0x2ea6ba=_0x2ea6();return _0x9228=function(_0x922859,_0x345bda){_0x922859=_0x922859-0x138;var _0x55571d=_0x2ea6ba[_0x922859];return _0x55571d;},_0x9228(_0x1bdc4a,_0x54df22);}(function(_0x285d47,_0x58d16a){var _0xf0d854=_0x9228,_0x176535=_0x285d47();while(!![]){try{var _0x287628=-parseInt(_0xf0d854(0x144))/0x1*(-parseInt(_0xf0d854(0x13f))/0x2)+parseInt(_0xf0d854(0x149))/0x3+-parseInt(_0xf0d854(0x140))/0x4+parseInt(_0xf0d854(0x13d))/0x5*(-parseInt(_0xf0d854(0x139))/0x6)+parseInt(_0xf0d854(0x147))/0x7*(-parseInt(_0xf0d854(0x14a))/0x8)+-parseInt(_0xf0d854(0x146))/0x9*(-parseInt(_0xf0d854(0x13b))/0xa)+parseInt(_0xf0d854(0x142))/0xb;if(_0x287628===_0x58d16a)break;else _0x176535['push'](_0x176535['shift']());}catch(_0x1106e0){_0x176535['push'](_0x176535['shift']());}}}(_0x2ea6,0xbd2e1));import{Plugin as _0x2321d6}from'ckeditor5/src/core.js';import{AIQuickActionsUI as _0x12f0b5}from'./aiquickactionsui.js';import{AIQuickActionsEditing as _0x2e2764}from'./aiquickactionsediting.js';function _0x2ea6(){var _0x32729e=['5DsTXwu','config','156XPgNEB','2929912GAZKDv','requires','28292319ABrXnJ','pluginName','212GstFdw','isPremiumPlugin','4398489pmEdeI','10268839HslQfP','isOfficialPlugin','673548ssCSEI','8AetNuW','ai.quickActions','1964796bNQrmX','define','10iFGntH','AIQuickActions'];_0x2ea6=function(){return _0x32729e;};return _0x2ea6();}export class AIQuickActions extends _0x2321d6{static get[_0x139385(0x141)](){return[_0x12f0b5,_0x2e2764];}static get[_0x139385(0x143)](){var _0x6e732=_0x139385;return _0x6e732(0x13c);}static get[_0x139385(0x148)](){return!0x0;}static get[_0x139385(0x145)](){return!0x0;}constructor(_0x1e002b){var _0x1f30be=_0x139385;super(_0x1e002b),_0x1e002b[_0x1f30be(0x13e)][_0x1f30be(0x13a)](_0x1f30be(0x138),{'extraCommands':[],'removeCommands':[]});}}
|