ckeditor5-editor-classic-floating 47.5.1 → 47.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,4 +1,4 @@
1
- Changelog
2
- =========
3
-
4
- All changes in the package are documented in https://github.com/ckeditor/ckeditor5/blob/master/CHANGELOG.md.
1
+ Changelog
2
+ =========
3
+
4
+ All changes in the package are documented in https://github.com/ckeditor/ckeditor5/blob/master/CHANGELOG.md.
package/LICENSE.md CHANGED
@@ -1,26 +1,21 @@
1
- Software License Agreement
2
- ==========================
3
-
4
- **CKEditor&nbsp;5 Classic editor** (https://github.com/ckeditor/ckeditor5)<br>
5
- Copyright (c) 2003–2026, [CKSource Holding sp. z o.o.](https://cksource.com) All rights reserved.
6
-
7
- Licensed under a dual-license model, this software is available under:
8
-
9
- * the [GNU General Public License Version 2 or later](https://www.gnu.org/licenses/gpl.html),
10
- * or commercial license terms from CKSource Holding sp. z o.o.
11
-
12
- For more information, see: [https://ckeditor.com/legal/ckeditor-licensing-options](https://ckeditor.com/legal/ckeditor-licensing-options).
13
-
14
- Sources of Intellectual Property Included in CKEditor&nbsp;5
15
- ------------------------------------------------------------
16
-
17
- Where not otherwise indicated, all CKEditor&nbsp;5 content is authored by CKSource engineers and consists of CKSource-owned intellectual property. In some specific instances, CKEditor&nbsp;5 will incorporate work done by developers outside of CKSource with their express permission.
18
-
19
- The following libraries are included in CKEditor&nbsp;5 under the [MIT license](https://opensource.org/licenses/MIT):
20
-
21
- * es-toolkit - Copyright (c) 2024 Viva Republica, Inc.
22
-
23
- Trademarks
24
- ----------
25
-
26
- **CKEditor** is a trademark of [CKSource Holding sp. z o.o.](https://cksource.com) All other brand and product names are trademarks, registered trademarks, or service marks of their respective holders.
1
+ Software License Agreement
2
+ ==========================
3
+
4
+ **Classic editor implementation** https://github.com/ckeditor/ckeditor5-editor-classic <br>
5
+ Copyright (c) 2003–2024, [CKSource Holding sp. z o.o.](https://cksource.com) All rights reserved.
6
+
7
+ Licensed under the terms of [GNU General Public License Version 2 or later](http://www.gnu.org/licenses/gpl.html).
8
+
9
+ Sources of Intellectual Property Included in CKEditor
10
+ -----------------------------------------------------
11
+
12
+ Where not otherwise indicated, all CKEditor content is authored by CKSource engineers and consists of CKSource-owned intellectual property. In some specific instances, CKEditor will incorporate work done by developers outside of CKSource with their express permission.
13
+
14
+ The following libraries are included in CKEditor under the [MIT license](https://opensource.org/licenses/MIT):
15
+
16
+ * Lodash - Copyright (c) JS Foundation and other contributors https://js.foundation/. Based on Underscore.js, copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors http://underscorejs.org/.
17
+
18
+ Trademarks
19
+ ----------
20
+
21
+ **CKEditor** is a trademark of [CKSource Holding sp. z o.o.](https://cksource.com) All other brand and product names are trademarks, registered trademarks, or service marks of their respective holders.
package/README.md CHANGED
@@ -1,29 +1,26 @@
1
- CKEditor&nbsp;5 classic editor implementation
2
- ========================================
3
-
4
- [![npm version](https://badge.fury.io/js/%40ckeditor%2Fckeditor5-editor-classic.svg)](https://www.npmjs.com/package/@ckeditor/ckeditor5-editor-classic)
5
- [![codecov](https://codecov.io/gh/ckeditor/ckeditor5/branch/master/graph/badge.svg)](https://codecov.io/gh/ckeditor/ckeditor5)
6
- [![CircleCI](https://circleci.com/gh/ckeditor/ckeditor5.svg?style=shield)](https://app.circleci.com/pipelines/github/ckeditor/ckeditor5?branch=master)
7
-
8
- The classic editor implementation for CKEditor&nbsp;5.
9
-
10
- This package contains the [`ClassicEditor`](https://ckeditor.com/docs/ckeditor5/latest/api/module_editor-classic_classiceditor-ClassicEditor.html) class. Follow there to learn more about this type of editor and how to initialize it.
11
-
12
- ## Documentation
13
-
14
- See the [`@ckeditor/ckeditor5-editor-classic` package](https://ckeditor.com/docs/ckeditor5/latest/api/editor-classic.html) page in [CKEditor&nbsp;5 documentation](https://ckeditor.com/docs/ckeditor5/latest/).
15
-
16
- ## Installation
17
-
18
- ```bash
19
- npm install ckeditor5
20
- ```
21
-
22
- ## License
23
-
24
- Licensed under a dual-license model, this software is available under:
25
-
26
- * the [GNU General Public License Version 2 or later](https://www.gnu.org/licenses/gpl.html),
27
- * or commercial license terms from CKSource Holding sp. z o.o.
28
-
29
- For more information, see: [https://ckeditor.com/legal/ckeditor-licensing-options](https://ckeditor.com/legal/ckeditor-licensing-options).
1
+ CKEditor&nbsp;5 classic editor implementation
2
+ ========================================
3
+
4
+ [![npm version](https://badge.fury.io/js/%40ckeditor%2Fckeditor5-editor-classic.svg)](https://www.npmjs.com/package/@ckeditor/ckeditor5-editor-classic)
5
+ [![Coverage Status](https://coveralls.io/repos/github/ckeditor/ckeditor5/badge.svg?branch=master)](https://coveralls.io/github/ckeditor/ckeditor5?branch=master)
6
+ [![Build Status](https://travis-ci.com/ckeditor/ckeditor5.svg?branch=master)](https://app.travis-ci.com/github/ckeditor/ckeditor5)
7
+
8
+ The classic editor implementation for CKEditor&nbsp;5.
9
+
10
+ This package contains the [`ClassicEditor`](https://ckeditor.com/docs/ckeditor5/latest/api/module_editor-classic_classiceditor-ClassicEditor.html) class. Follow there to learn more about this type of editor and how to initialize it.
11
+
12
+ This package contains the source version of the classic editor. This kind of editor implementation is also available as a ready-to-use [classic build](https://www.npmjs.com/package/@ckeditor/ckeditor5-build-classic). Read more about [CKEditor&nbsp;5 predefined builds](https://ckeditor.com/docs/ckeditor5/latest/getting-started/legacy/advanced/alternative-setups/predefined-builds.html) in the CKEditor&nbsp;5 documentation.
13
+
14
+ ## Documentation
15
+
16
+ See the [`@ckeditor/ckeditor5-editor-classic` package](https://ckeditor.com/docs/ckeditor5/latest/api/editor-classic.html) page in [CKEditor&nbsp;5 documentation](https://ckeditor.com/docs/ckeditor5/latest/).
17
+
18
+ ## Installation
19
+
20
+ ```bash
21
+ npm install ckeditor5
22
+ ```
23
+
24
+ ## License
25
+
26
+ Licensed under the terms of [GNU General Public License Version 2 or later](http://www.gnu.org/licenses/gpl.html). For full details about the license, please check the `LICENSE.md` file or [https://ckeditor.com/legal/ckeditor-oss-license](https://ckeditor.com/legal/ckeditor-oss-license).
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md.
4
- */(()=>{var t={8(t,e,i){"use strict";i.d(e,{A:()=>l});var o=i(802),n=i.n(o),s=i(35),r=i.n(s)()(n());r.push([t.id,".ck.ck-editor{position:relative}.ck.ck-editor .ck-editor__top .ck-sticky-panel .ck-toolbar{z-index:var(--ck-z-panel)}",""]);const l=r},542(t,e,i){"use strict";i.d(e,{A:()=>l});var o=i(802),n=i.n(o),s=i(35),r=i.n(s)()(n());r.push([t.id,".ck.ck-sticky-panel .ck-sticky-panel__content_sticky{position:fixed;top:0;z-index:var(--ck-z-panel)}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky_bottom-limit{position:absolute;top:auto}",""]);const l=r},35(t){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var i="",o=void 0!==e[5];return e[4]&&(i+="@supports (".concat(e[4],") {")),e[2]&&(i+="@media ".concat(e[2]," {")),o&&(i+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),i+=t(e),o&&(i+="}"),e[2]&&(i+="}"),e[4]&&(i+="}"),i}).join("")},e.i=function(t,i,o,n,s){"string"==typeof t&&(t=[[null,t,void 0]]);var r={};if(o)for(var l=0;l<this.length;l++){var c=this[l][0];null!=c&&(r[c]=!0)}for(var a=0;a<t.length;a++){var h=[].concat(t[a]);o&&r[h[0]]||(void 0!==s&&(void 0===h[5]||(h[1]="@layer".concat(h[5].length>0?" ".concat(h[5]):""," {").concat(h[1],"}")),h[5]=s),i&&(h[2]?(h[1]="@media ".concat(h[2]," {").concat(h[1],"}"),h[2]=i):h[2]=i),n&&(h[4]?(h[1]="@supports (".concat(h[4],") {").concat(h[1],"}"),h[4]=n):h[4]="".concat(n)),e.push(h))}},e}},802(t){"use strict";t.exports=function(t){return t[1]}},345(t){"use strict";var e=[];function i(t){for(var i=-1,o=0;o<e.length;o++)if(e[o].identifier===t){i=o;break}return i}function o(t,o){for(var s={},r=[],l=0;l<t.length;l++){var c=t[l],a=o.base?c[0]+o.base:c[0],h=s[a]||0,u="".concat(a," ").concat(h);s[a]=h+1;var d=i(u),f={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==d)e[d].references++,e[d].updater(f);else{var p=n(f,o);o.byIndex=l,e.splice(l,0,{identifier:u,updater:p,references:1})}r.push(u)}return r}function n(t,e){var i=e.domAPI(e);i.update(t);return function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;i.update(t=e)}else i.remove()}}t.exports=function(t,n){var s=o(t=t||[],n=n||{});return function(t){t=t||[];for(var r=0;r<s.length;r++){var l=i(s[r]);e[l].references--}for(var c=o(t,n),a=0;a<s.length;a++){var h=i(s[a]);0===e[h].references&&(e[h].updater(),e.splice(h,1))}s=c}}},758(t){"use strict";var e={};t.exports=function(t,i){var o=function(t){if(void 0===e[t]){var i=document.querySelector(t);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(t){i=null}e[t]=i}return e[t]}(t);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(i)}},725(t){"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},667(t){"use strict";t.exports=function(t,e){Object.keys(e).forEach(function(i){t.setAttribute(i,e[i])})}},321(t){"use strict";var e,i=(e=[],function(t,i){return e[t]=i,e.filter(Boolean).join("\n")});function o(t,e,o,n){var s;if(o)s="";else{s="",n.supports&&(s+="@supports (".concat(n.supports,") {")),n.media&&(s+="@media ".concat(n.media," {"));var r=void 0!==n.layer;r&&(s+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),s+=n.css,r&&(s+="}"),n.media&&(s+="}"),n.supports&&(s+="}")}if(t.styleSheet)t.styleSheet.cssText=i(e,s);else{var l=document.createTextNode(s),c=t.childNodes;c[e]&&t.removeChild(c[e]),c.length?t.insertBefore(l,c[e]):t.appendChild(l)}}var n={singleton:null,singletonCounter:0};t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=n.singletonCounter++,i=n.singleton||(n.singleton=t.insertStyleElement(t));return{update:function(t){o(i,e,!1,t)},remove:function(t){o(i,e,!0,t)}}}},782(t,e,i){t.exports=i(237)("./src/core.js")},783(t,e,i){t.exports=i(237)("./src/engine.js")},311(t,e,i){t.exports=i(237)("./src/ui.js")},584(t,e,i){t.exports=i(237)("./src/utils.js")},237(t){"use strict";t.exports=CKEditor5.dll}},e={};function i(o){var n=e[o];if(void 0!==n)return n.exports;var s=e[o]={id:o,exports:{}};return t[o](s,s.exports,i),s.exports}i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var o in e)i.o(e,o)&&!i.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};(()=>{"use strict";i.r(o),i.d(o,{ClassicEditor:()=>S,ClassicEditorUI:()=>s,ClassicEditorUIView:()=>_,StickyPanelView:()=>b});var t=i(311),e=i(783),n=i(584);class s extends t.EditorUI{view;_toolbarConfig;_elementReplacer;constructor(e,i){super(e),this.view=i,this._toolbarConfig=(0,t.normalizeToolbarConfig)(e.config.get("toolbar")),this._elementReplacer=new n.ElementReplacer,this.listenTo(e.editing.view,"scrollToTheSelection",this._handleScrollToTheSelectionWithStickyPanel.bind(this))}get element(){return this.view.element}init(t){const e=this.editor,i=this.view,o=e.editing.view,n=i.editable,s=o.document.getRoot();n.name=s.rootName,i.render();const r=n.element;this.setEditableElement(n.name,r),i.editable.bind("isFocused").to(this.focusTracker),o.attachDomRoot(r),t&&this._elementReplacer.replace(t,this.element),this._initPlaceholder(),this._initToolbar(),i.menuBarView&&this.initMenuBar(i.menuBarView),this._initDialogPluginIntegration(),this._initContextualBalloonIntegration(),this.fire("ready")}destroy(){super.destroy();const t=this.view,e=this.editor.editing.view;this._elementReplacer.restore(),e.getDomRoot(t.editable.name)&&e.detachDomRoot(t.editable.name),t.destroy()}_initToolbar(){const t=this.view;t.stickyPanel.bind("isActive").to(this.focusTracker,"isFocused"),t.stickyPanel.limiterElement=t.element,t.stickyPanel.bind("viewportTopOffset").to(this,"viewportOffset",({visualTop:t})=>t||0),t.toolbar.fillFromConfig(this._toolbarConfig,this.componentFactory),this.addToolbar(t.toolbar)}_initPlaceholder(){const t=this.editor,i=t.editing.view,o=i.document.getRoot(),n=t.sourceElement;let s;const r=t.config.get("placeholder");r&&(s="string"==typeof r?r:r[this.view.editable.name]),!s&&n&&"textarea"===n.tagName.toLowerCase()&&(s=n.getAttribute("placeholder")),s&&(o.placeholder=s),(0,e.enableViewPlaceholder)({view:i,element:o,isDirectHost:!1,keepOnFocus:!0})}_initContextualBalloonIntegration(){if(!this.editor.plugins.has("ContextualBalloon"))return;const{stickyPanel:t}=this.view,e=this.editor.plugins.get("ContextualBalloon");e.on("getPositionOptions",e=>{const i=e.return;if(!i||!t.isSticky||!t.element)return;const o=new n.Rect(t.element).height,s="function"==typeof i.target?i.target():i.target,r="function"==typeof i.limiter?i.limiter():i.limiter;if(s&&r&&new n.Rect(s).height>=new n.Rect(r).height-o)return;const l={...i.viewportOffsetConfig},c=(l.top||0)+o;e.return={...i,viewportOffsetConfig:{...l,top:c}}},{priority:"low"});const i=()=>{e.visibleView&&e.updatePosition()};this.listenTo(t,"change:isSticky",i),this.listenTo(this.editor.ui,"change:viewportOffset",i)}_handleScrollToTheSelectionWithStickyPanel(t,e,i){const o=this.view.stickyPanel;if(o.isSticky){const t=new n.Rect(o.element).height;e.viewportOffset.top+=t}else{const t=()=>{this.editor.editing.view.scrollToTheSelection(i)};this.listenTo(o,"change:isSticky",t),setTimeout(()=>{this.stopListening(o,"change:isSticky",t)},20)}}_initDialogPluginIntegration(){if(!this.editor.plugins.has("Dialog"))return;const e=this.view.stickyPanel,i=this.editor.plugins.get("Dialog");i.on("show",()=>{const o=i.view;o.on("moveTo",(i,s)=>{if(!e.isSticky||o.wasMoved||o.isModal)return;const r=new n.Rect(e.contentPanelElement);s[1]<r.bottom+t.DialogView.defaultOffset&&(s[1]=r.bottom+t.DialogView.defaultOffset)},{priority:"high"})},{priority:"low"})}}var r=i(345),l=i.n(r),c=i(321),a=i.n(c),h=i(758),u=i.n(h),d=i(667),f=i.n(d),p=i(725),m=i.n(p),g=i(542),y={attributes:{"data-cke":!0}};y.setAttributes=f(),y.insert=u().bind(null,"head"),y.domAPI=a(),y.insertStyleElement=m();l()(g.A,y);g.A&&g.A.locals&&g.A.locals;const k=(0,n.toUnit)("px");class b extends t.View{content;containerEl;panelAbsolute;contentPanelElement;_contentPanelPlaceholder;constructor(e,i={}){super(e);const o=this.bindTemplate;this.containerEl=i.containerEl||n.global.window,this.panelAbsolute=!!i.panelAbsolute,this.set("position",null),this.set("isActive",!1),this.set("isSticky",!1),this.set("limiterElement",null),this.set("limiterBottomOffset",50),this.set("viewportTopOffset",0),this.set("_marginLeft",null),this.set("_isStickyToTheBottomOfLimiter",!1),this.set("_stickyTopOffset",null),this.set("_stickyBottomOffset",null),this.content=this.createCollection(),this._contentPanelPlaceholder=new t.Template({tag:"div",attributes:{class:["ck","ck-sticky-panel__placeholder"],style:{display:o.to("isSticky",t=>t?"block":"none"),height:o.to("isSticky",t=>t?k(this._contentPanelRect.height):null)}}}).render(),this.contentPanelElement=new t.Template({tag:"div",attributes:{class:["ck","ck-sticky-panel__content",o.if("isSticky","ck-sticky-panel__content_sticky"),o.if("_isStickyToTheBottomOfLimiter","ck-sticky-panel__content_sticky_bottom-limit")],style:{position:o.to("position",t=>t),width:o.to("isSticky",t=>t?k(this._contentPanelPlaceholder.getBoundingClientRect().width):null),top:o.to("_stickyTopOffset",t=>t?k(t):t),bottom:o.to("_stickyBottomOffset",t=>t?k(t):t),marginLeft:o.to("_marginLeft")}},children:this.content}).render(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-sticky-panel"]},children:[this._contentPanelPlaceholder,this.contentPanelElement]})}render(){super.render(),this.checkIfShouldBeSticky(),this.listenTo(this.containerEl,"scroll",()=>{this.checkIfShouldBeSticky()},{useCapture:!0}),this.listenTo(this,"change:isActive",()=>{this.checkIfShouldBeSticky()}),n.global.window.visualViewport&&(this.listenTo(n.global.window.visualViewport,"scroll",()=>{this.checkIfShouldBeSticky()}),this.listenTo(n.global.window.visualViewport,"resize",()=>{this.checkIfShouldBeSticky()}))}checkIfShouldBeSticky(){if(!this.limiterElement||!this.isActive)return void this._unstick();const t=new n.Rect(this.limiterElement);let e=t.getVisible();if(e){const i=new n.Rect(this.containerEl);t.top-=i.top,t.bottom-=i.top,i.top+=this.viewportTopOffset,i.height-=this.viewportTopOffset,e=e.getIntersection(i)}const{left:i,top:o}=(0,n.getVisualViewportOffset)();if(t.moveBy(i,o),e&&e.moveBy(i,o),e&&t.top<e.top)if(this._contentPanelRect.height+this.limiterBottomOffset>e.height){const i=Math.max(t.bottom-e.bottom,0)+this.limiterBottomOffset;this._contentPanelRect.height+i+1<t.height?this._stickToBottomOfLimiter(i):this._unstick()}else this._contentPanelRect.height+this.limiterBottomOffset<t.height?this.panelAbsolute?t.top<0&&-t.top<t.height-this.limiterBottomOffset?this._stickToTopOfAncestors(-t.top,"absolute"):this._unstick():this._stickToTopOfAncestors(e.top):this._unstick();else this._unstick()}_stickToTopOfAncestors(t,e=null){let i;this.isSticky=!0,this._isStickyToTheBottomOfLimiter=!1,this._stickyTopOffset=t,this._stickyBottomOffset=null,i=this.containerEl instanceof HTMLElement?this.containerEl.scrollLeft:this.containerEl.scrollX,this._marginLeft=k(-i+(0,n.getVisualViewportOffset)().left),this.position=e}_stickToBottomOfLimiter(t){let e;this.isSticky=!0,this._isStickyToTheBottomOfLimiter=!0,this._stickyTopOffset=null,this._stickyBottomOffset=t,e=this.containerEl instanceof HTMLElement?this.containerEl.scrollLeft:this.containerEl.scrollX,this._marginLeft=k(-e+(0,n.getVisualViewportOffset)().left),this.position=null}_unstick(){this.isSticky=!1,this._isStickyToTheBottomOfLimiter=!1,this._stickyTopOffset=null,this._stickyBottomOffset=null,this._marginLeft=null,this.position=null}get _contentPanelRect(){return new n.Rect(this.contentPanelElement)}}var v=i(8),w={attributes:{"data-cke":!0}};w.setAttributes=f(),w.insert=u().bind(null,"head"),w.domAPI=a(),w.insertStyleElement=m();l()(v.A,w);v.A&&v.A.locals&&v.A.locals;class _ extends t.BoxedEditorUIView{stickyPanel;toolbar;editable;constructor(e,i,o={}){super(e),this.stickyPanel=new b(e,o),this.toolbar=new t.ToolbarView(e,{shouldGroupWhenFull:o.shouldToolbarGroupWhenFull}),o.useMenuBar&&(this.menuBarView=new t.MenuBarView(e)),this.editable=new t.InlineEditableUIView(e,i,void 0,{label:o.label})}render(){super.render(),this.menuBarView?this.stickyPanel.content.addMany([this.menuBarView,this.toolbar]):this.stickyPanel.content.add(this.toolbar),this.top.add(this.stickyPanel),this.main.add(this.editable)}}var T=i(782);function O(t){return function(t){return"object"==typeof t&&null!==t}(t)&&1===t.nodeType&&!function(t){if("object"!=typeof t)return!1;if(null==t)return!1;if(null===Object.getPrototypeOf(t))return!0;if("[object Object]"!==Object.prototype.toString.call(t)){const e=t[Symbol.toStringTag];return null!=e&&(!!Object.getOwnPropertyDescriptor(t,Symbol.toStringTag)?.writable&&t.toString()===`[object ${e}]`)}let e=t;for(;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}(t)}class S extends((0,T.ElementApiMixin)(T.Editor)){static get editorName(){return"ClassicEditor"}ui;constructor(t,e={}){if(!E(t)&&void 0!==e.initialData)throw new n.CKEditorError("editor-create-initial-data",null);super(e),this.config.define("menuBar.isVisible",!1),void 0===this.config.get("initialData")&&this.config.set("initialData",function(t){return E(t)?(0,n.getDataFromElement)(t):t}(t)),E(t)&&(this.sourceElement=t),this.model.document.createRoot();const i=!this.config.get("toolbar.shouldNotGroupWhenFull"),o=this.config.get("menuBar"),r=new _(this.locale,this.editing.view,{shouldToolbarGroupWhenFull:i,useMenuBar:o.isVisible,label:this.config.get("label"),containerEl:e.containerEl,panelAbsolute:e.panelAbsolute});this.ui=new s(this,r),(0,T.attachToForm)(this)}destroy(){return this.sourceElement&&this.updateSourceElement(),this.ui.destroy(),super.destroy()}static create(t,e={}){return new Promise(i=>{const o=new this(t,e);i(o.initPlugins().then(()=>o.ui.init(E(t)?t:null)).then(()=>o.data.init(o.config.get("initialData"))).then(()=>o.fire("ready")).then(()=>o))})}}function E(t){return O(t)}})(),(window.CKEditor5=window.CKEditor5||{}).ckeditor5EditorClassicFloating=o})();
4
+ */(()=>{var t={662(t,e,i){"use strict";i.d(e,{A:()=>c});var n=i(758),o=i.n(n),s=i(935),r=i.n(s)()(o());r.push([t.id,".ck.ck-editor{position:relative}.ck.ck-editor .ck-editor__top .ck-sticky-panel .ck-toolbar{z-index:var(--ck-z-panel)}",""]);const c=r},428(t,e,i){"use strict";i.d(e,{A:()=>c});var n=i(758),o=i.n(n),s=i(935),r=i.n(s)()(o());r.push([t.id,".ck.ck-sticky-panel .ck-sticky-panel__content_sticky{position:fixed;top:0;z-index:var(--ck-z-panel)}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky_bottom-limit{position:absolute;top:auto}",""]);const c=r},935(t){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var i="",n=void 0!==e[5];return e[4]&&(i+="@supports (".concat(e[4],") {")),e[2]&&(i+="@media ".concat(e[2]," {")),n&&(i+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),i+=t(e),n&&(i+="}"),e[2]&&(i+="}"),e[4]&&(i+="}"),i}).join("")},e.i=function(t,i,n,o,s){"string"==typeof t&&(t=[[null,t,void 0]]);var r={};if(n)for(var c=0;c<this.length;c++){var l=this[c][0];null!=l&&(r[l]=!0)}for(var a=0;a<t.length;a++){var h=[].concat(t[a]);n&&r[h[0]]||(void 0!==s&&(void 0===h[5]||(h[1]="@layer".concat(h[5].length>0?" ".concat(h[5]):""," {").concat(h[1],"}")),h[5]=s),i&&(h[2]?(h[1]="@media ".concat(h[2]," {").concat(h[1],"}"),h[2]=i):h[2]=i),o&&(h[4]?(h[1]="@supports (".concat(h[4],") {").concat(h[1],"}"),h[4]=o):h[4]="".concat(o)),e.push(h))}},e}},758(t){"use strict";t.exports=function(t){return t[1]}},591(t){"use strict";var e=[];function i(t){for(var i=-1,n=0;n<e.length;n++)if(e[n].identifier===t){i=n;break}return i}function n(t,n){for(var s={},r=[],c=0;c<t.length;c++){var l=t[c],a=n.base?l[0]+n.base:l[0],h=s[a]||0,u="".concat(a," ").concat(h);s[a]=h+1;var f=i(u),d={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==f)e[f].references++,e[f].updater(d);else{var p=o(d,n);n.byIndex=c,e.splice(c,0,{identifier:u,updater:p,references:1})}r.push(u)}return r}function o(t,e){var i=e.domAPI(e);i.update(t);return function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;i.update(t=e)}else i.remove()}}t.exports=function(t,o){var s=n(t=t||[],o=o||{});return function(t){t=t||[];for(var r=0;r<s.length;r++){var c=i(s[r]);e[c].references--}for(var l=n(t,o),a=0;a<s.length;a++){var h=i(s[a]);0===e[h].references&&(e[h].updater(),e.splice(h,1))}s=l}}},128(t){"use strict";var e={};t.exports=function(t,i){var n=function(t){if(void 0===e[t]){var i=document.querySelector(t);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(t){i=null}e[t]=i}return e[t]}(t);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(i)}},51(t){"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},21(t){"use strict";t.exports=function(t,e){Object.keys(e).forEach(function(i){t.setAttribute(i,e[i])})}},639(t){"use strict";var e,i=(e=[],function(t,i){return e[t]=i,e.filter(Boolean).join("\n")});function n(t,e,n,o){var s;if(n)s="";else{s="",o.supports&&(s+="@supports (".concat(o.supports,") {")),o.media&&(s+="@media ".concat(o.media," {"));var r=void 0!==o.layer;r&&(s+="@layer".concat(o.layer.length>0?" ".concat(o.layer):""," {")),s+=o.css,r&&(s+="}"),o.media&&(s+="}"),o.supports&&(s+="}")}if(t.styleSheet)t.styleSheet.cssText=i(e,s);else{var c=document.createTextNode(s),l=t.childNodes;l[e]&&t.removeChild(l[e]),l.length?t.insertBefore(c,l[e]):t.appendChild(c)}}var o={singleton:null,singletonCounter:0};t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=o.singletonCounter++,i=o.singleton||(o.singleton=t.insertStyleElement(t));return{update:function(t){n(i,e,!1,t)},remove:function(t){n(i,e,!0,t)}}}},782(t,e,i){t.exports=i(237)("./src/core.js")},783(t,e,i){t.exports=i(237)("./src/engine.js")},311(t,e,i){t.exports=i(237)("./src/ui.js")},584(t,e,i){t.exports=i(237)("./src/utils.js")},237(t){"use strict";t.exports=CKEditor5.dll}},e={};function i(n){var o=e[n];if(void 0!==o)return o.exports;var s=e[n]={id:n,exports:{}};return t[n](s,s.exports,i),s.exports}i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{"use strict";i.r(n),i.d(n,{ClassicEditor:()=>ie});var t=i(311),e=i(783),o=i(584);class s extends t.EditorUI{constructor(e,i){super(e),this.view=i,this._toolbarConfig=(0,t.normalizeToolbarConfig)(e.config.get("toolbar")),this._elementReplacer=new o.ElementReplacer,this.listenTo(e.editing.view,"scrollToTheSelection",this._handleScrollToTheSelectionWithStickyPanel.bind(this))}get element(){return this.view.element}init(t){const e=this.editor,i=this.view,n=e.editing.view,o=i.editable,s=n.document.getRoot();o.name=s.rootName,i.render();const r=o.element;this.setEditableElement(o.name,r),i.editable.bind("isFocused").to(this.focusTracker),n.attachDomRoot(r),t&&this._elementReplacer.replace(t,this.element),this._initPlaceholder(),this._initToolbar(),i.menuBarView&&this._initMenuBar(i.menuBarView),this._initDialogPluginIntegration(),this._initContextualBalloonIntegration(),this.fire("ready")}destroy(){super.destroy();const t=this.view,e=this.editor.editing.view;this._elementReplacer.restore(),e.getDomRoot(t.editable.name)&&e.detachDomRoot(t.editable.name),t.destroy()}_initToolbar(){const t=this.view;t.stickyPanel.bind("isActive").to(this.focusTracker,"isFocused"),t.stickyPanel.limiterElement=t.element,t.stickyPanel.bind("viewportTopOffset").to(this,"viewportOffset",({top:t})=>t||0),t.toolbar.fillFromConfig(this._toolbarConfig,this.componentFactory),this.addToolbar(t.toolbar)}_initPlaceholder(){const t=this.editor,i=t.editing.view,n=i.document.getRoot(),o=t.sourceElement;let s;const r=t.config.get("placeholder");r&&(s="string"==typeof r?r:r[this.view.editable.name]),!s&&o&&"textarea"===o.tagName.toLowerCase()&&(s=o.getAttribute("placeholder")),s&&(n.placeholder=s),(0,e.enablePlaceholder)({view:i,element:n,isDirectHost:!1,keepOnFocus:!0})}_initContextualBalloonIntegration(){if(!this.editor.plugins.has("ContextualBalloon"))return;const{stickyPanel:t}=this.view,e=this.editor.plugins.get("ContextualBalloon");e.on("getPositionOptions",e=>{const i=e.return;if(!i||!t.isSticky||!t.element)return;const n=new o.Rect(t.element).height,s="function"==typeof i.target?i.target():i.target,r="function"==typeof i.limiter?i.limiter():i.limiter;if(s&&r&&new o.Rect(s).height>=new o.Rect(r).height-n)return;const c={...i.viewportOffsetConfig},l=(c.top||0)+n;e.return={...i,viewportOffsetConfig:{...c,top:l}}},{priority:"low"});const i=()=>{e.visibleView&&e.updatePosition()};this.listenTo(t,"change:isSticky",i),this.listenTo(this.editor.ui,"change:viewportOffset",i)}_handleScrollToTheSelectionWithStickyPanel(t,e,i){const n=this.view.stickyPanel;if(n.isSticky){const t=new o.Rect(n.element).height;e.viewportOffset.top+=t}else{const t=()=>{this.editor.editing.view.scrollToTheSelection(i)};this.listenTo(n,"change:isSticky",t),setTimeout(()=>{this.stopListening(n,"change:isSticky",t)},20)}}_initDialogPluginIntegration(){if(!this.editor.plugins.has("Dialog"))return;const e=this.view.stickyPanel,i=this.editor.plugins.get("Dialog");i.on("show",()=>{const n=i.view;n.on("moveTo",(i,s)=>{if(!e.isSticky||n.wasMoved)return;const r=new o.Rect(e.contentPanelElement);s[1]<r.bottom+t.DialogView.defaultOffset&&(s[1]=r.bottom+t.DialogView.defaultOffset)},{priority:"high"})},{priority:"low"})}}let r;try{r={window,document}}catch(t){r={window:{},document:{}}}const c=r;function l(){try{return navigator.userAgent.toLowerCase()}catch(t){return""}}const a=l(),h={isMac:u(a),isWindows:f(a),isGecko:d(a),isSafari:p(a),isiOS:m(a),isAndroid:b(a),isBlink:g(a),get isMediaForcedColors(){return!!c.window.matchMedia&&c.window.matchMedia("(forced-colors: active)").matches},get isMotionReduced(){return!!c.window.matchMedia&&c.window.matchMedia("(prefers-reduced-motion)").matches},features:{isRegExpUnicodePropertySupported:v()}};function u(t){return t.indexOf("macintosh")>-1}function f(t){return t.indexOf("windows")>-1}function d(t){return!!t.match(/gecko\/\d+/)}function p(t){return t.indexOf(" applewebkit/")>-1&&-1===t.indexOf("chrome")}function m(t){return!!t.match(/iphone|ipad/i)||u(t)&&navigator.maxTouchPoints>0}function b(t){return t.indexOf("android")>-1}function g(t){return t.indexOf("chrome/")>-1&&t.indexOf("edge/")<0}function v(){let t=!1;try{t=0==="ć".search(new RegExp("[\\p{L}]","u"))}catch(t){}return t}const y=function(){return function t(){t.called=!0}};class w{constructor(t,e){this.source=t,this.name=e,this.path=[],this.stop=y(),this.off=y()}}const _=new Array(256).fill("").map((t,e)=>("0"+e.toString(16)).slice(-2));function k(){const[t,e,i,n]=crypto.getRandomValues(new Uint32Array(4));return"e"+_[255&t]+_[t>>8&255]+_[t>>16&255]+_[t>>24&255]+_[255&e]+_[e>>8&255]+_[e>>16&255]+_[e>>24&255]+_[255&i]+_[i>>8&255]+_[i>>16&255]+_[i>>24&255]+_[255&n]+_[n>>8&255]+_[n>>16&255]+_[n>>24&255]}const E={get(t="normal"){return"number"!=typeof t?this[t]||this.normal:t},highest:1e5,high:1e3,normal:0,low:-1e3,lowest:-1e5};function T(t,e){const i=E.get(e.priority);for(let n=0;n<t.length;n++)if(E.get(t[n].priority)<i)return void t.splice(n,0,e);t.push(e)}class O extends Error{constructor(t,e,i){super(function(t,e){const i=new WeakSet,n=(t,e)=>{if("object"==typeof e&&null!==e){if(i.has(e))return`[object ${e.constructor.name}]`;i.add(e)}return e},o=e?` ${JSON.stringify(e,n)}`:"",s=S(t);return t+o+s}(t,i)),this.name="CKEditorError",this.context=e,this.data=i}is(t){return"CKEditorError"===t}static rethrowUnexpectedError(t,e){if(t.is&&t.is("CKEditorError"))throw t;const i=new O(t.message,e);throw i.stack=t.stack,i}}function S(t){return`\nRead more: https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html#error-${t}`}const L="43.3.1";new Date(2024,10,6);if(globalThis.CKEDITOR_VERSION)throw new O("ckeditor-duplicated-modules",null);globalThis.CKEDITOR_VERSION=L;const x=Symbol("listeningTo"),P=Symbol("emitterId"),C=Symbol("delegations"),I=A(Object);function A(t){if(!t)return I;return class extends t{on(t,e,i){this.listenTo(this,t,e,i)}once(t,e,i){let n=!1;this.listenTo(this,t,(t,...i)=>{n||(n=!0,t.off(),e.call(this,t,...i))},i)}off(t,e){this.stopListening(this,t,e)}listenTo(t,e,i,n={}){let o,s;this[x]||(this[x]={});const r=this[x];B(t)||j(t);const c=B(t);(o=r[c])||(o=r[c]={emitter:t,callbacks:{}}),(s=o.callbacks[e])||(s=o.callbacks[e]=[]),s.push(i),function(t,e,i,n,o){e._addEventListener?e._addEventListener(i,n,o):t._addEventListener.call(e,i,n,o)}(this,t,e,i,n)}stopListening(t,e,i){const n=this[x];let o=t&&B(t);const s=n&&o?n[o]:void 0,r=s&&e?s.callbacks[e]:void 0;if(!(!n||t&&!s||e&&!r))if(i){F(this,t,e,i);-1!==r.indexOf(i)&&(1===r.length?delete s.callbacks[e]:F(this,t,e,i))}else if(r){for(;i=r.pop();)F(this,t,e,i);delete s.callbacks[e]}else if(s){for(e in s.callbacks)this.stopListening(t,e);delete n[o]}else{for(o in n)this.stopListening(n[o].emitter);delete this[x]}}fire(t,...e){try{const i=t instanceof w?t:new w(this,t),n=i.name;let o=N(this,n);if(i.path.push(this),o){const t=[i,...e];o=Array.from(o);for(let e=0;e<o.length&&(o[e].callback.apply(this,t),i.off.called&&(delete i.off.called,this._removeEventListener(n,o[e].callback)),!i.stop.called);e++);}const s=this[C];if(s){const t=s.get(n),o=s.get("*");t&&V(t,i,e),o&&V(o,i,e)}return i.return}catch(t){O.rethrowUnexpectedError(t,this)}}delegate(...t){return{to:(e,i)=>{this[C]||(this[C]=new Map),t.forEach(t=>{const n=this[C].get(t);n?n.set(e,i):this[C].set(t,new Map([[e,i]]))})}}}stopDelegating(t,e){if(this[C])if(t)if(e){const i=this[C].get(t);i&&i.delete(e)}else this[C].delete(t);else this[C].clear()}_addEventListener(t,e,i){!function(t,e){const i=M(t);if(i[e])return;let n=e,o=null;const s=[];for(;""!==n&&!i[n];)i[n]=R(),s.push(i[n]),o&&i[n].childEvents.push(o),o=n,n=n.substr(0,n.lastIndexOf(":"));if(""!==n){for(const t of s)t.callbacks=i[n].callbacks.slice();i[n].childEvents.push(o)}}(this,t);const n=D(this,t),o={callback:e,priority:E.get(i.priority)};for(const t of n)T(t,o)}_removeEventListener(t,e){const i=D(this,t);for(const t of i)for(let i=0;i<t.length;i++)t[i].callback==e&&(t.splice(i,1),i--)}}}function j(t,e){t[P]||(t[P]=e||k())}function B(t){return t[P]}function M(t){return t._events||Object.defineProperty(t,"_events",{value:{}}),t._events}function R(){return{callbacks:[],childEvents:[]}}function D(t,e){const i=M(t)[e];if(!i)return[];let n=[i.callbacks];for(let e=0;e<i.childEvents.length;e++){const o=D(t,i.childEvents[e]);n=n.concat(o)}return n}function N(t,e){let i;return t._events&&(i=t._events[e])&&i.callbacks.length?i.callbacks:e.indexOf(":")>-1?N(t,e.substr(0,e.lastIndexOf(":"))):null}function V(t,e,i){for(let[n,o]of t){o?"function"==typeof o&&(o=o(e.name)):o=e.name;const t=new w(e.source,o);t.path=[...e.path],n.fire(t,...i)}}function F(t,e,i,n){e._removeEventListener?e._removeEventListener(i,n):t._removeEventListener.call(e,i,n)}["on","once","off","listenTo","stopListening","fire","delegate","stopDelegating","_addEventListener","_removeEventListener"].forEach(t=>{A[t]=I.prototype[t]});const W=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},H=Symbol("observableProperties"),z=Symbol("boundObservables"),K=Symbol("boundProperties"),U=Symbol("decoratedMethods"),G=Symbol("decoratedOriginal"),Y=$(A());function $(t){var e;if(!t)return Y;class i extends(e=t,e){set(t,e){if(W(t))return void Object.keys(t).forEach(e=>{this.set(e,t[e])},this);q(this);const i=this[H];if(t in this&&!i.has(t))throw new O("observable-set-cannot-override",this);Object.defineProperty(this,t,{enumerable:!0,configurable:!0,get:()=>i.get(t),set(e){const n=i.get(t);let o=this.fire(`set:${t}`,t,e,n);void 0===o&&(o=e),n===o&&i.has(t)||(i.set(t,o),this.fire(`change:${t}`,t,o,n))}}),this[t]=e}bind(...t){if(!t.length||!Q(t))throw new O("observable-bind-wrong-properties",this);if(new Set(t).size!==t.length)throw new O("observable-bind-duplicate-properties",this);q(this);const e=this[K];t.forEach(t=>{if(e.has(t))throw new O("observable-bind-rebind",this)});const i=new Map;return t.forEach(t=>{const n={property:t,to:[]};e.set(t,n),i.set(t,n)}),{to:X,toMany:J,_observable:this,_bindProperties:t,_to:[],_bindings:i}}unbind(...t){if(!this[H])return;const e=this[K],i=this[z];if(t.length){if(!Q(t))throw new O("observable-unbind-wrong-properties",this);t.forEach(t=>{const n=e.get(t);n&&(n.to.forEach(([t,e])=>{const o=i.get(t),s=o[e];s.delete(n),s.size||delete o[e],Object.keys(o).length||(i.delete(t),this.stopListening(t,"change"))}),e.delete(t))})}else i.forEach((t,e)=>{this.stopListening(e,"change")}),i.clear(),e.clear()}decorate(t){q(this);const e=this[t];if(!e)throw new O("observablemixin-cannot-decorate-undefined",this,{object:this,methodName:t});this.on(t,(t,i)=>{t.return=e.apply(this,i)}),this[t]=function(...e){return this.fire(t,e)},this[t][G]=e,this[U]||(this[U]=[]),this[U].push(t)}stopListening(t,e,i){if(!t&&this[U]){for(const t of this[U])this[t]=this[t][G];delete this[U]}super.stopListening(t,e,i)}}return i}function q(t){t[H]||(Object.defineProperty(t,H,{value:new Map}),Object.defineProperty(t,z,{value:new Map}),Object.defineProperty(t,K,{value:new Map}))}function X(...t){const e=function(...t){if(!t.length)throw new O("observable-bind-to-parse-error",null);const e={to:[]};let i;"function"==typeof t[t.length-1]&&(e.callback=t.pop());return t.forEach(t=>{if("string"==typeof t)i.properties.push(t);else{if("object"!=typeof t)throw new O("observable-bind-to-parse-error",null);i={observable:t,properties:[]},e.to.push(i)}}),e}(...t),i=Array.from(this._bindings.keys()),n=i.length;if(!e.callback&&e.to.length>1)throw new O("observable-bind-to-no-callback",this);if(n>1&&e.callback)throw new O("observable-bind-to-extra-callback",this);var o;e.to.forEach(t=>{if(t.properties.length&&t.properties.length!==n)throw new O("observable-bind-to-properties-length",this);t.properties.length||(t.properties=this._bindProperties)}),this._to=e.to,e.callback&&(this._bindings.get(i[0]).callback=e.callback),o=this._observable,this._to.forEach(t=>{const e=o[z];let i;e.get(t.observable)||o.listenTo(t.observable,"change",(n,s)=>{i=e.get(t.observable)[s],i&&i.forEach(t=>{Z(o,t.property)})})}),function(t){let e;t._bindings.forEach((i,n)=>{t._to.forEach(o=>{e=o.properties[i.callback?0:t._bindProperties.indexOf(n)],i.to.push([o.observable,e]),function(t,e,i,n){const o=t[z],s=o.get(i),r=s||{};r[n]||(r[n]=new Set);r[n].add(e),s||o.set(i,r)}(t._observable,i,o.observable,e)})})}(this),this._bindProperties.forEach(t=>{Z(this._observable,t)})}function J(t,e,i){if(this._bindings.size>1)throw new O("observable-bind-to-many-not-one-binding",this);this.to(...function(t,e){const i=t.map(t=>[t,e]);return Array.prototype.concat.apply([],i)}(t,e),i)}function Q(t){return t.every(t=>"string"==typeof t)}function Z(t,e){const i=t[K].get(e);let n;i.callback?n=i.callback.apply(t,i.to.map(t=>t[0][t[1]])):(n=i.to[0],n=n[0][n[1]]),Object.prototype.hasOwnProperty.call(t,e)?t[e]=n:t.set(e,n)}function tt(t){if(t){if(t.defaultView)return t instanceof t.defaultView.Document;if(t.ownerDocument&&t.ownerDocument.defaultView)return t instanceof t.ownerDocument.defaultView.Node}return!1}function et(t){const e=Object.prototype.toString.apply(t);return"[object Window]"==e||"[object global]"==e}["set","bind","unbind","decorate","on","once","off","listenTo","stopListening","fire","delegate","stopDelegating","_addEventListener","_removeEventListener"].forEach(t=>{$[t]=Y.prototype[t]});const it=nt(A());function nt(t){if(!t)return it;return class extends t{listenTo(t,e,i,n={}){if(tt(t)||et(t)){const o={capture:!!n.useCapture,passive:!!n.usePassive},s=this._getProxyEmitter(t,o)||new ot(t,o);this.listenTo(s,e,i,n)}else super.listenTo(t,e,i,n)}stopListening(t,e,i){if(tt(t)||et(t)){const n=this._getAllProxyEmitters(t);for(const t of n)this.stopListening(t,e,i)}else super.stopListening(t,e,i)}_getProxyEmitter(t,e){return function(t,e){const i=t[x];return i&&i[e]?i[e].emitter:null}(this,st(t,e))}_getAllProxyEmitters(t){return[{capture:!1,passive:!1},{capture:!1,passive:!0},{capture:!0,passive:!1},{capture:!0,passive:!0}].map(e=>this._getProxyEmitter(t,e)).filter(t=>!!t)}}}["_getProxyEmitter","_getAllProxyEmitters","on","once","off","listenTo","stopListening","fire","delegate","stopDelegating","_addEventListener","_removeEventListener"].forEach(t=>{nt[t]=it.prototype[t]});class ot extends(A()){constructor(t,e){super(),j(this,st(t,e)),this._domNode=t,this._options=e}attach(t){if(this._domListeners&&this._domListeners[t])return;const e=this._createDomListener(t);this._domNode.addEventListener(t,e,this._options),this._domListeners||(this._domListeners={}),this._domListeners[t]=e}detach(t){let e;!this._domListeners[t]||(e=this._events[t])&&e.callbacks.length||this._domListeners[t].removeListener()}_addEventListener(t,e,i){this.attach(t),A().prototype._addEventListener.call(this,t,e,i)}_removeEventListener(t,e){A().prototype._removeEventListener.call(this,t,e),this.detach(t)}_createDomListener(t){const e=e=>{this.fire(t,e)};return e.removeListener=()=>{this._domNode.removeEventListener(t,e,this._options),delete this._domListeners[t]},e}}function st(t,e){let i=function(t){return t["data-ck-expando"]||(t["data-ck-expando"]=k())}(t);for(const t of Object.keys(e).sort())e[t]&&(i+="-"+t);return i}function rt(t){const e=t.ownerDocument.defaultView.getComputedStyle(t);return{top:parseInt(e.borderTopWidth,10),right:parseInt(e.borderRightWidth,10),bottom:parseInt(e.borderBottomWidth,10),left:parseInt(e.borderLeftWidth,10)}}const ct=["top","right","bottom","left","width","height"];class lt{constructor(t){const e=(i=t,"[object Range]"==Object.prototype.toString.apply(i));var i;if(Object.defineProperty(this,"_source",{value:t._source||t,writable:!0,enumerable:!1}),ut(t)||e)if(e){const e=lt.getDomRangeRects(t);at(this,lt.getBoundingRect(e))}else at(this,t.getBoundingClientRect());else if(et(t)){const{innerWidth:e,innerHeight:i}=t;at(this,{top:0,right:e,bottom:i,left:0,width:e,height:i})}else at(this,t)}clone(){return new lt(this)}moveTo(t,e){return this.top=e,this.right=t+this.width,this.bottom=e+this.height,this.left=t,this}moveBy(t,e){return this.top+=e,this.right+=t,this.left+=t,this.bottom+=e,this}getIntersection(t){const e={top:Math.max(this.top,t.top),right:Math.min(this.right,t.right),bottom:Math.min(this.bottom,t.bottom),left:Math.max(this.left,t.left),width:0,height:0};if(e.width=e.right-e.left,e.height=e.bottom-e.top,e.width<0||e.height<0)return null;{const t=new lt(e);return t._source=this._source,t}}getIntersectionArea(t){const e=this.getIntersection(t);return e?e.getArea():0}getArea(){return this.width*this.height}getVisible(){const t=this._source;let e=this.clone();if(ht(t))return e;let i,n=t,o=t.parentNode||t.commonAncestorContainer;for(;o&&!ht(o);){const t="visible"===dt(o);n instanceof HTMLElement&&"absolute"===ft(n)&&(i=n);const s=ft(o);if(t||i&&("relative"===s&&t||"relative"!==s)){n=o,o=o.parentNode;continue}const r=new lt(o),c=e.getIntersection(r);if(!c)return null;c.getArea()<e.getArea()&&(e=c),n=o,o=o.parentNode}return e}isEqual(t){for(const e of ct)if(this[e]!==t[e])return!1;return!0}contains(t){const e=this.getIntersection(t);return!(!e||!e.isEqual(t))}toAbsoluteRect(){const{scrollX:t,scrollY:e}=c.window,i=this.clone().moveBy(t,e);if(ut(i._source)){const t=(n=i._source)&&n.parentNode?n.offsetParent===c.document.body?null:n.offsetParent:null;t&&function(t,e){const i=new lt(e),n=rt(e);let o=0,s=0;o-=i.left,s-=i.top,o+=e.scrollLeft,s+=e.scrollTop,o-=n.left,s-=n.top,t.moveBy(o,s)}(i,t)}var n;return i}excludeScrollbarsAndBorders(){const t=this._source;let e,i,n;if(et(t))e=t.innerWidth-t.document.documentElement.clientWidth,i=t.innerHeight-t.document.documentElement.clientHeight,n=t.getComputedStyle(t.document.documentElement).direction;else{const o=rt(t);e=t.offsetWidth-t.clientWidth-o.left-o.right,i=t.offsetHeight-t.clientHeight-o.top-o.bottom,n=t.ownerDocument.defaultView.getComputedStyle(t).direction,this.left+=o.left,this.top+=o.top,this.right-=o.right,this.bottom-=o.bottom,this.width=this.right-this.left,this.height=this.bottom-this.top}return this.width-=e,"ltr"===n?this.right-=e:this.left+=e,this.height-=i,this.bottom-=i,this}static getDomRangeRects(t){const e=[],i=Array.from(t.getClientRects());if(i.length)for(const t of i)e.push(new lt(t));else{let i=t.startContainer;n=i,"[object Text]"==Object.prototype.toString.call(n)&&(i=i.parentNode);const o=new lt(i.getBoundingClientRect());o.right=o.left,o.width=0,e.push(o)}var n;return e}static getBoundingRect(t){const e={left:Number.POSITIVE_INFINITY,top:Number.POSITIVE_INFINITY,right:Number.NEGATIVE_INFINITY,bottom:Number.NEGATIVE_INFINITY,width:0,height:0};let i=0;for(const n of t)i++,e.left=Math.min(e.left,n.left),e.top=Math.min(e.top,n.top),e.right=Math.max(e.right,n.right),e.bottom=Math.max(e.bottom,n.bottom);return 0==i?null:(e.width=e.right-e.left,e.height=e.bottom-e.top,new lt(e))}}function at(t,e){for(const i of ct)t[i]=e[i]}function ht(t){return!!ut(t)&&t===t.ownerDocument.body}function ut(t){return null!==t&&"object"==typeof t&&1===t.nodeType&&"function"==typeof t.getBoundingClientRect}function ft(t){return t instanceof HTMLElement?t.ownerDocument.defaultView.getComputedStyle(t).position:"static"}function dt(t){return t instanceof HTMLElement?t.ownerDocument.defaultView.getComputedStyle(t).overflow:"visible"}class pt{static{this._observerInstance=null}static{this._elementCallbacks=null}constructor(t,e){pt._observerInstance||pt._createObserver(),this._element=t,this._callback=e,pt._addElementCallback(t,e),pt._observerInstance.observe(t)}get element(){return this._element}destroy(){pt._deleteElementCallback(this._element,this._callback)}static _addElementCallback(t,e){pt._elementCallbacks||(pt._elementCallbacks=new Map);let i=pt._elementCallbacks.get(t);i||(i=new Set,pt._elementCallbacks.set(t,i)),i.add(e)}static _deleteElementCallback(t,e){const i=pt._getElementCallbacks(t);i&&(i.delete(e),i.size||(pt._elementCallbacks.delete(t),pt._observerInstance.unobserve(t))),pt._elementCallbacks&&!pt._elementCallbacks.size&&(pt._observerInstance=null,pt._elementCallbacks=null)}static _getElementCallbacks(t){return pt._elementCallbacks?pt._elementCallbacks.get(t):null}static _createObserver(){pt._observerInstance=new c.window.ResizeObserver(t=>{for(const e of t){const t=pt._getElementCallbacks(e.target);if(t)for(const i of t)i(e)}})}}function mt(t){return e=>e+t}c.window.CKEDITOR_TRANSLATIONS||(c.window.CKEDITOR_TRANSLATIONS={});Symbol.iterator;const bt=function(t){return null!=t&&"object"==typeof t};const gt="object"==typeof i.g&&i.g&&i.g.Object===Object&&i.g;var vt="object"==typeof self&&self&&self.Object===Object&&self;const yt=(gt||vt||Function("return this")()).Symbol;var wt=Object.prototype,_t=wt.hasOwnProperty,kt=wt.toString,Et=yt?yt.toStringTag:void 0;const Tt=function(t){var e=_t.call(t,Et),i=t[Et];try{t[Et]=void 0;var n=!0}catch(t){}var o=kt.call(t);return n&&(e?t[Et]=i:delete t[Et]),o};var Ot=Object.prototype.toString;const St=function(t){return Ot.call(t)};var Lt=yt?yt.toStringTag:void 0;const xt=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Lt&&Lt in Object(t)?Tt(t):St(t)};const Pt=function(t,e){return function(i){return t(e(i))}}(Object.getPrototypeOf,Object);var Ct=Function.prototype,It=Object.prototype,At=Ct.toString,jt=It.hasOwnProperty,Bt=At.call(Object);const Mt=function(t){if(!bt(t)||"[object Object]"!=xt(t))return!1;var e=Pt(t);if(null===e)return!0;var i=jt.call(e,"constructor")&&e.constructor;return"function"==typeof i&&i instanceof i&&At.call(i)==Bt};const Rt=function(t){return bt(t)&&1===t.nodeType&&!Mt(t)};var Dt=i(591),Nt=i.n(Dt),Vt=i(639),Ft=i.n(Vt),Wt=i(128),Ht=i.n(Wt),zt=i(21),Kt=i.n(zt),Ut=i(51),Gt=i.n(Ut),Yt=i(428),$t={attributes:{"data-cke":!0}};$t.setAttributes=Kt(),$t.insert=Ht().bind(null,"head"),$t.domAPI=Ft(),$t.insertStyleElement=Gt();Nt()(Yt.A,$t);Yt.A&&Yt.A.locals&&Yt.A.locals;const qt=mt("px");function Xt(){const t=c.window.visualViewport;if(!t||!h.isiOS&&!h.isSafari)return{left:0,top:0};return{left:Math.max(Math.round(t.offsetLeft),0),top:Math.max(Math.round(t.offsetTop),0)}}class Jt extends t.View{constructor(e,i={}){super(e);const n=this.bindTemplate;this.containerEl=i.containerEl||c.window,this.panelAbsolute=!!i.panelAbsolute,this.set("position",null),this.set("isActive",!1),this.set("isSticky",!1),this.set("limiterElement",null),this.set("limiterBottomOffset",50),this.set("viewportTopOffset",0),this.set("_marginLeft",null),this.set("_isStickyToTheBottomOfLimiter",!1),this.set("_stickyTopOffset",null),this.set("_stickyBottomOffset",null),this.content=this.createCollection(),this._contentPanelPlaceholder=new t.Template({tag:"div",attributes:{class:["ck","ck-sticky-panel__placeholder"],style:{display:n.to("isSticky",t=>t?"block":"none"),height:n.to("isSticky",t=>t?qt(this._contentPanelRect.height):null)}}}).render(),this.contentPanelElement=new t.Template({tag:"div",attributes:{class:["ck","ck-sticky-panel__content",n.if("isSticky","ck-sticky-panel__content_sticky"),n.if("_isStickyToTheBottomOfLimiter","ck-sticky-panel__content_sticky_bottom-limit")],style:{position:n.to("position",t=>t),width:n.to("isSticky",t=>t?qt(this._contentPanelPlaceholder.getBoundingClientRect().width):null),top:n.to("_stickyTopOffset",t=>t?qt(t):t),bottom:n.to("_stickyBottomOffset",t=>t?qt(t):t),marginLeft:n.to("_marginLeft")}},children:this.content}).render(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-sticky-panel"]},children:[this._contentPanelPlaceholder,this.contentPanelElement]})}render(){super.render(),this.checkIfShouldBeSticky(),this.listenTo(this.containerEl,"scroll",()=>{this.checkIfShouldBeSticky()},{useCapture:!0}),this.listenTo(this,"change:isActive",()=>{this.checkIfShouldBeSticky()})}checkIfShouldBeSticky(){if(!this.limiterElement||!this.isActive)return void this._unstick();const t=new lt(this.limiterElement);let e=t.getVisible();if(e){const i=new lt(this.containerEl);i.top+=this.viewportTopOffset,i.height-=this.viewportTopOffset,t.top-=i.top,t.bottom-=i.top,e=e.getIntersection(i)}const{left:i,top:n}=Xt();if(t.moveBy(i,n),e&&e.moveBy(i,n),e&&t.top<e.top)if(this._contentPanelRect.height+this.limiterBottomOffset>e.height){const i=Math.max(t.bottom-e.bottom,0)+this.limiterBottomOffset;this._contentPanelRect.height+i+1<t.height?this._stickToBottomOfLimiter(i):this._unstick()}else this._contentPanelRect.height+this.limiterBottomOffset<t.height?this.panelAbsolute?t.top<0&&-t.top<t.height-this.limiterBottomOffset?this._stickToTopOfAncestors(-t.top,"absolute"):this._unstick():this._stickToTopOfAncestors(e.top):this._unstick();else this._unstick()}_stickToTopOfAncestors(t,e=null){this.isSticky=!0,this._isStickyToTheBottomOfLimiter=!1,this._stickyTopOffset=t,this._stickyBottomOffset=null;let i=0;i=this.containerEl instanceof HTMLElement?this.containerEl.scrollLeft:this.containerEl.scrollX,this._marginLeft=qt(-i+Xt().left),this.position=e}_stickToBottomOfLimiter(t){this.isSticky=!0,this._isStickyToTheBottomOfLimiter=!0,this._stickyTopOffset=null,this._stickyBottomOffset=t;let e=0;e=this.containerEl instanceof HTMLElement?this.containerEl.scrollLeft:this.containerEl.scrollX,this._marginLeft=qt(-e+Xt().left),this.position=null}_unstick(){this.isSticky=!1,this._isStickyToTheBottomOfLimiter=!1,this._stickyTopOffset=null,this._stickyBottomOffset=null,this._marginLeft=null,this.position=null}get _contentPanelRect(){return new lt(this.contentPanelElement)}}var Qt=i(662),Zt={attributes:{"data-cke":!0}};Zt.setAttributes=Kt(),Zt.insert=Ht().bind(null,"head"),Zt.domAPI=Ft(),Zt.insertStyleElement=Gt();Nt()(Qt.A,Zt);Qt.A&&Qt.A.locals&&Qt.A.locals;class te extends t.BoxedEditorUIView{constructor(e,i,n={}){super(e),this.stickyPanel=new Jt(e,n),this.toolbar=new t.ToolbarView(e,{shouldGroupWhenFull:n.shouldToolbarGroupWhenFull}),n.useMenuBar&&(this.menuBarView=new t.MenuBarView(e)),this.editable=new t.InlineEditableUIView(e,i,void 0,{label:n.label})}render(){super.render(),this.menuBarView?this.stickyPanel.content.addMany([this.menuBarView,this.toolbar]):this.stickyPanel.content.add(this.toolbar),this.top.add(this.stickyPanel),this.main.add(this.editable)}}var ee=i(782);class ie extends((0,ee.ElementApiMixin)(ee.Editor)){constructor(t,e={}){if(!ne(t)&&void 0!==e.initialData)throw new o.CKEditorError("editor-create-initial-data",null);super(e),this.config.define("menuBar.isVisible",!1),void 0===this.config.get("initialData")&&this.config.set("initialData",function(t){return ne(t)?(0,o.getDataFromElement)(t):t}(t)),ne(t)&&(this.sourceElement=t),this.model.document.createRoot();const i=!this.config.get("toolbar.shouldNotGroupWhenFull"),n=this.config.get("menuBar"),r=new te(this.locale,this.editing.view,{shouldToolbarGroupWhenFull:i,useMenuBar:n.isVisible,label:this.config.get("label"),containerEl:e.containerEl,panelAbsolute:e.panelAbsolute});this.ui=new s(this,r),(0,ee.attachToForm)(this)}destroy(){return this.sourceElement&&this.updateSourceElement(),this.ui.destroy(),super.destroy()}static create(t,e={}){return new Promise(i=>{const n=new this(t,e);i(n.initPlugins().then(()=>n.ui.init(ne(t)?t:null)).then(()=>n.data.init(n.config.get("initialData"))).then(()=>n.fire("ready")).then(()=>n))})}}function ne(t){return Rt(t)}})(),(window.CKEditor5=window.CKEditor5||{}).ckeditor5EditorClassicFloating=n})();
package/package.json CHANGED
@@ -1,61 +1,61 @@
1
- {
2
- "name": "ckeditor5-editor-classic-floating",
3
- "version": "47.5.1",
4
- "description": "Classic editor implementation for CKEditor 5.",
5
- "keywords": [
6
- "ckeditor",
7
- "ckeditor5",
8
- "ckeditor 5",
9
- "ckeditor5-editor",
10
- "ckeditor5-dll"
11
- ],
12
- "type": "module",
13
- "main": "src/index.ts",
14
- "dependencies": {
15
- "@ckeditor/ckeditor5-core": "47.5.0",
16
- "@ckeditor/ckeditor5-engine": "47.5.0",
17
- "@ckeditor/ckeditor5-ui": "47.5.0",
18
- "@ckeditor/ckeditor5-utils": "47.5.0",
19
- "ckeditor5": "47.5.0",
20
- "es-toolkit": "1.39.5"
21
- },
22
- "devDependencies": {
23
- "@ckeditor/ckeditor5-basic-styles": "47.5.0",
24
- "@ckeditor/ckeditor5-dev-utils": "^54.3.4",
25
- "@ckeditor/ckeditor5-enter": "47.5.0",
26
- "@ckeditor/ckeditor5-heading": "47.5.0",
27
- "@ckeditor/ckeditor5-image": "47.5.0",
28
- "@ckeditor/ckeditor5-link": "47.5.0",
29
- "@ckeditor/ckeditor5-paragraph": "47.5.0",
30
- "@ckeditor/ckeditor5-theme-lark": "47.5.0",
31
- "@ckeditor/ckeditor5-typing": "47.5.0",
32
- "@ckeditor/ckeditor5-undo": "47.5.0",
33
- "@ckeditor/ckeditor5-watchdog": "47.5.0",
34
- "typescript": "5.3.3",
35
- "webpack": "^5.94.0",
36
- "webpack-cli": "^6.0.1"
37
- },
38
- "author": "CKSource (http://cksource.com/)",
39
- "license": "SEE LICENSE IN LICENSE.md",
40
- "homepage": "https://ckeditor.com/ckeditor-5",
41
- "bugs": "https://github.com/toannv17/ckeditor5/issues",
42
- "repository": {
43
- "type": "git",
44
- "url": "https://github.com/toannv17/ckeditor5.git",
45
- "directory": "packages/ckeditor5-editor-classic-floating"
46
- },
47
- "files": [
48
- "dist",
49
- "lang",
50
- "src/**/*.js",
51
- "src/**/*.d.ts",
52
- "theme",
53
- "build",
54
- "CHANGELOG.md"
55
- ],
56
- "scripts": {
57
- "dll:build": "webpack",
58
- "build": "tsc --build --force ./tsconfig.json",
59
- "build:dist": "node ../../scripts/nim/build-package.mjs"
60
- }
61
- }
1
+ {
2
+ "name": "ckeditor5-editor-classic-floating",
3
+ "version": "47.5.2",
4
+ "description": "Classic editor implementation for CKEditor 5.",
5
+ "keywords": [
6
+ "ckeditor",
7
+ "ckeditor5",
8
+ "ckeditor 5",
9
+ "ckeditor5-editor",
10
+ "ckeditor5-dll"
11
+ ],
12
+ "type": "module",
13
+ "main": "src/index.ts",
14
+ "dependencies": {
15
+ "@ckeditor/ckeditor5-core": "43.3.1",
16
+ "@ckeditor/ckeditor5-engine": "43.3.1",
17
+ "@ckeditor/ckeditor5-ui": "43.3.1",
18
+ "@ckeditor/ckeditor5-utils": "43.3.1",
19
+ "ckeditor5": "43.3.1",
20
+ "lodash-es": "4.17.21"
21
+ },
22
+ "devDependencies": {
23
+ "@ckeditor/ckeditor5-basic-styles": "43.3.1",
24
+ "@ckeditor/ckeditor5-dev-utils": "^45.0.0",
25
+ "@ckeditor/ckeditor5-enter": "43.3.1",
26
+ "@ckeditor/ckeditor5-heading": "43.3.1",
27
+ "@ckeditor/ckeditor5-image": "43.3.1",
28
+ "@ckeditor/ckeditor5-paragraph": "43.3.1",
29
+ "@ckeditor/ckeditor5-theme-lark": "43.3.1",
30
+ "@ckeditor/ckeditor5-typing": "43.3.1",
31
+ "@ckeditor/ckeditor5-undo": "43.3.1",
32
+ "@ckeditor/ckeditor5-watchdog": "43.3.1",
33
+ "typescript": "5.0.4",
34
+ "webpack": "^5.94.0",
35
+ "webpack-cli": "^5.1.4"
36
+ },
37
+ "author": "CKSource (http://cksource.com/)",
38
+ "license": "GPL-2.0-or-later",
39
+ "homepage": "https://ckeditor.com/ckeditor-5",
40
+ "bugs": "https://github.com/ckeditor/ckeditor5/issues",
41
+ "repository": {
42
+ "type": "git",
43
+ "url": "https://github.com/toannv17/ckeditor5.git",
44
+ "directory": "packages/ckeditor5-editor-classic-floating"
45
+ },
46
+ "files": [
47
+ "dist",
48
+ "lang",
49
+ "src/**/*.js",
50
+ "src/**/*.d.ts",
51
+ "theme",
52
+ "build",
53
+ "ckeditor5-metadata.json",
54
+ "CHANGELOG.md"
55
+ ],
56
+ "scripts": {
57
+ "dll:build": "webpack",
58
+ "build": "tsc -p ./tsconfig.json",
59
+ "build:dist": "node ../../scripts/nim/build-package.mjs"
60
+ }
61
+ }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ declare module '@ckeditor/ckeditor5-core' {
6
+ interface EditorConfig {
7
+ containerEl?: HTMLElement;
8
+ panelAbsolute?: boolean;
9
+ }
10
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
4
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
5
+ */
@@ -1,13 +1,13 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
  /**
6
6
  * @module editor-classic/classiceditor
7
7
  */
8
- import { ClassicEditorUI } from './classiceditorui.js';
9
- import { Editor, type EditorConfig } from 'ckeditor5/src/core.js';
10
- declare const ClassicEditor_base: import("ckeditor5/src/utils.js").Mixed<typeof Editor, import("ckeditor5/src/core.js").ElementApi>;
8
+ import ClassicEditorUI from './classiceditorui.js';
9
+ import { type EditorConfig } from 'ckeditor5/src/core.js';
10
+ declare const ClassicEditor_base: any;
11
11
  /**
12
12
  * The classic editor implementation. It uses an inline editable and a sticky toolbar, all enclosed in a boxed UI.
13
13
  * See the {@glink examples/builds/classic-editor demo}.
@@ -15,11 +15,7 @@ declare const ClassicEditor_base: import("ckeditor5/src/utils.js").Mixed<typeof
15
15
  * In order to create a classic editor instance, use the static
16
16
  * {@link module:editor-classic/classiceditor~ClassicEditor.create `ClassicEditor.create()`} method.
17
17
  */
18
- export declare class ClassicEditor extends /* #__PURE__ */ ClassicEditor_base {
19
- /**
20
- * @inheritDoc
21
- */
22
- static get editorName(): 'ClassicEditor';
18
+ export default class ClassicEditor extends /* #__PURE__ */ ClassicEditor_base {
23
19
  /**
24
20
  * @inheritDoc
25
21
  */
@@ -35,10 +31,7 @@ export declare class ClassicEditor extends /* #__PURE__ */ ClassicEditor_base {
35
31
  * {@link module:editor-classic/classiceditor~ClassicEditor.create `ClassicEditor.create()`}.
36
32
  * @param config The editor configuration.
37
33
  */
38
- protected constructor(sourceElementOrData: HTMLElement | string, config?: EditorConfig & {
39
- containerEl?: HTMLElement;
40
- panelAbsolute?: boolean;
41
- });
34
+ protected constructor(sourceElementOrData: HTMLElement | string, config?: EditorConfig);
42
35
  /**
43
36
  * Destroys the editor instance, releasing all resources used by it.
44
37
  *
@@ -1,15 +1,15 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
  /**
6
6
  * @module editor-classic/classiceditor
7
7
  */
8
- import { ClassicEditorUI } from './classiceditorui.js';
9
- import { ClassicEditorUIView } from './classiceditoruiview.js';
8
+ import ClassicEditorUI from './classiceditorui.js';
9
+ import ClassicEditorUIView from './classiceditoruiview.js';
10
10
  import { Editor, ElementApiMixin, attachToForm } from 'ckeditor5/src/core.js';
11
11
  import { getDataFromElement, CKEditorError } from 'ckeditor5/src/utils.js';
12
- import { isElement as _isElement } from 'es-toolkit/compat';
12
+ import { isElement as _isElement } from 'lodash-es';
13
13
  /**
14
14
  * The classic editor implementation. It uses an inline editable and a sticky toolbar, all enclosed in a boxed UI.
15
15
  * See the {@glink examples/builds/classic-editor demo}.
@@ -17,17 +17,7 @@ import { isElement as _isElement } from 'es-toolkit/compat';
17
17
  * In order to create a classic editor instance, use the static
18
18
  * {@link module:editor-classic/classiceditor~ClassicEditor.create `ClassicEditor.create()`} method.
19
19
  */
20
- export class ClassicEditor extends /* #__PURE__ */ ElementApiMixin(Editor) {
21
- /**
22
- * @inheritDoc
23
- */
24
- static get editorName() {
25
- return 'ClassicEditor';
26
- }
27
- /**
28
- * @inheritDoc
29
- */
30
- ui;
20
+ export default class ClassicEditor extends /* #__PURE__ */ ElementApiMixin(Editor) {
31
21
  /**
32
22
  * Creates an instance of the classic editor.
33
23
  *
@@ -1,17 +1,17 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
  /**
6
6
  * @module editor-classic/classiceditorui
7
7
  */
8
8
  import type { Editor } from 'ckeditor5/src/core.js';
9
9
  import { EditorUI } from 'ckeditor5/src/ui.js';
10
- import { type ClassicEditorUIView } from './classiceditoruiview.js';
10
+ import type ClassicEditorUIView from './classiceditoruiview.js';
11
11
  /**
12
12
  * The classic editor UI class.
13
13
  */
14
- export declare class ClassicEditorUI extends EditorUI {
14
+ export default class ClassicEditorUI extends EditorUI {
15
15
  /**
16
16
  * The main (top–most) view of the editor UI.
17
17
  */
@@ -1,26 +1,14 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
  import { EditorUI, DialogView, normalizeToolbarConfig } from 'ckeditor5/src/ui.js';
6
- import { enableViewPlaceholder } from 'ckeditor5/src/engine.js';
6
+ import { enablePlaceholder } from 'ckeditor5/src/engine.js';
7
7
  import { ElementReplacer, Rect } from 'ckeditor5/src/utils.js';
8
8
  /**
9
9
  * The classic editor UI class.
10
10
  */
11
- export class ClassicEditorUI extends EditorUI {
12
- /**
13
- * The main (top–most) view of the editor UI.
14
- */
15
- view;
16
- /**
17
- * A normalized `config.toolbar` object.
18
- */
19
- _toolbarConfig;
20
- /**
21
- * The element replacer instance used to hide the editor's source element.
22
- */
23
- _elementReplacer;
11
+ export default class ClassicEditorUI extends EditorUI {
24
12
  /**
25
13
  * Creates an instance of the classic editor UI class.
26
14
  *
@@ -81,7 +69,7 @@ export class ClassicEditorUI extends EditorUI {
81
69
  this._initPlaceholder();
82
70
  this._initToolbar();
83
71
  if (view.menuBarView) {
84
- this.initMenuBar(view.menuBarView);
72
+ this._initMenuBar(view.menuBarView);
85
73
  }
86
74
  this._initDialogPluginIntegration();
87
75
  this._initContextualBalloonIntegration();
@@ -108,7 +96,7 @@ export class ClassicEditorUI extends EditorUI {
108
96
  // Set–up the sticky panel with toolbar.
109
97
  view.stickyPanel.bind('isActive').to(this.focusTracker, 'isFocused');
110
98
  view.stickyPanel.limiterElement = view.element;
111
- view.stickyPanel.bind('viewportTopOffset').to(this, 'viewportOffset', ({ visualTop }) => visualTop || 0);
99
+ view.stickyPanel.bind('viewportTopOffset').to(this, 'viewportOffset', ({ top }) => top || 0);
112
100
  view.toolbar.fillFromConfig(this._toolbarConfig, this.componentFactory);
113
101
  // Register the toolbar so it becomes available for Alt+F10 and Esc navigation.
114
102
  this.addToolbar(view.toolbar);
@@ -132,7 +120,7 @@ export class ClassicEditorUI extends EditorUI {
132
120
  if (placeholderText) {
133
121
  editingRoot.placeholder = placeholderText;
134
122
  }
135
- enableViewPlaceholder({
123
+ enablePlaceholder({
136
124
  view: editingView,
137
125
  element: editingRoot,
138
126
  isDirectHost: false,
@@ -232,9 +220,7 @@ export class ClassicEditorUI extends EditorUI {
232
220
  const dialogView = dialogPlugin.view;
233
221
  dialogView.on('moveTo', (evt, data) => {
234
222
  // Engage only when the panel is sticky, and the dialog is using one of default positions.
235
- // Ignore modals because they are displayed on top of the page (and overlay) and they do not collide with anything
236
- // See (https://github.com/ckeditor/ckeditor5/issues/17339).
237
- if (!stickyPanel.isSticky || dialogView.wasMoved || dialogView.isModal) {
223
+ if (!stickyPanel.isSticky || dialogView.wasMoved) {
238
224
  return;
239
225
  }
240
226
  const stickyPanelContentRect = new Rect(stickyPanel.contentPanelElement);
@@ -1,11 +1,11 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
  /**
6
6
  * @module editor-classic/classiceditoruiview
7
7
  */
8
- import { StickyPanelView } from './stickypanelview.js';
8
+ import StickyPanelView from './stickypanelview.js';
9
9
  import { BoxedEditorUIView, InlineEditableUIView, ToolbarView } from 'ckeditor5/src/ui.js';
10
10
  import type { Locale } from 'ckeditor5/src/utils.js';
11
11
  import type { EditingView } from 'ckeditor5/src/engine.js';
@@ -14,7 +14,7 @@ import '../theme/classiceditor.css';
14
14
  * Classic editor UI view. Uses an inline editable and a sticky toolbar, all
15
15
  * enclosed in a boxed UI view.
16
16
  */
17
- export declare class ClassicEditorUIView extends BoxedEditorUIView {
17
+ export default class ClassicEditorUIView extends BoxedEditorUIView {
18
18
  /**
19
19
  * Sticky panel view instance. This is a parent view of a {@link #toolbar}
20
20
  * that makes toolbar sticky.
@@ -1,31 +1,18 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
  /**
6
6
  * @module editor-classic/classiceditoruiview
7
7
  */
8
- import { StickyPanelView } from './stickypanelview.js';
8
+ import StickyPanelView from './stickypanelview.js';
9
9
  import { BoxedEditorUIView, InlineEditableUIView, MenuBarView, ToolbarView } from 'ckeditor5/src/ui.js';
10
10
  import '../theme/classiceditor.css';
11
11
  /**
12
12
  * Classic editor UI view. Uses an inline editable and a sticky toolbar, all
13
13
  * enclosed in a boxed UI view.
14
14
  */
15
- export class ClassicEditorUIView extends BoxedEditorUIView {
16
- /**
17
- * Sticky panel view instance. This is a parent view of a {@link #toolbar}
18
- * that makes toolbar sticky.
19
- */
20
- stickyPanel;
21
- /**
22
- * Toolbar view instance.
23
- */
24
- toolbar;
25
- /**
26
- * Editable UI view.
27
- */
28
- editable;
15
+ export default class ClassicEditorUIView extends BoxedEditorUIView {
29
16
  /**
30
17
  * Creates an instance of the classic editor UI view.
31
18
  *