@ckeditor/ckeditor5-editor-inline 44.2.0 → 44.2.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/build/editor-inline.js +1 -1
- package/package.json +6 -6
package/build/editor-inline.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
3
3
|
* For licensing, see LICENSE.md.
|
4
|
-
*/(()=>{var t={
|
4
|
+
*/(()=>{var t={21:t=>{"use strict";t.exports=function(t,e){Object.keys(e).forEach((function(o){t.setAttribute(o,e[o])}))}},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}},128:t=>{"use strict";var e={};t.exports=function(t,o){var n=function(t){if(void 0===e[t]){var o=document.querySelector(t);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(t){o=null}e[t]=o}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(o)}},237:t=>{"use strict";t.exports=CKEditor5.dll},311:(t,e,o)=>{t.exports=o(237)("./src/ui.js")},584:(t,e,o)=>{t.exports=o(237)("./src/utils.js")},591:t=>{"use strict";var e=[];function o(t){for(var o=-1,n=0;n<e.length;n++)if(e[n].identifier===t){o=n;break}return o}function n(t,n){for(var i={},s=[],a=0;a<t.length;a++){var l=t[a],c=n.base?l[0]+n.base:l[0],u=i[c]||0,d="".concat(c," ").concat(u);i[c]=u+1;var h=o(d),p={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==h)e[h].references++,e[h].updater(p);else{var f=r(p,n);n.byIndex=a,e.splice(a,0,{identifier:d,updater:f,references:1})}s.push(d)}return s}function r(t,e){var o=e.domAPI(e);o.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;o.update(t=e)}else o.remove()}}t.exports=function(t,r){var i=n(t=t||[],r=r||{});return function(t){t=t||[];for(var s=0;s<i.length;s++){var a=o(i[s]);e[a].references--}for(var l=n(t,r),c=0;c<i.length;c++){var u=o(i[c]);0===e[u].references&&(e[u].updater(),e.splice(u,1))}i=l}}},639:t=>{"use strict";var e,o=(e=[],function(t,o){return e[t]=o,e.filter(Boolean).join("\n")});function n(t,e,n,r){var i;if(n)i="";else{i="",r.supports&&(i+="@supports (".concat(r.supports,") {")),r.media&&(i+="@media ".concat(r.media," {"));var s=void 0!==r.layer;s&&(i+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),i+=r.css,s&&(i+="}"),r.media&&(i+="}"),r.supports&&(i+="}")}if(t.styleSheet)t.styleSheet.cssText=o(e,i);else{var a=document.createTextNode(i),l=t.childNodes;l[e]&&t.removeChild(l[e]),l.length?t.insertBefore(a,l[e]):t.appendChild(a)}}var r={singleton:null,singletonCounter:0};t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=r.singletonCounter++,o=r.singleton||(r.singleton=t.insertStyleElement(t));return{update:function(t){n(o,e,!1,t)},remove:function(t){n(o,e,!0,t)}}}},693:(t,e,o)=>{"use strict";o.d(e,{A:()=>a});var n=o(758),r=o.n(n),i=o(935),s=o.n(i)()(r());s.push([t.id,".ck.ck-menu-bar{border:none;border-bottom:1px solid var(--ck-color-toolbar-border)}",""]);const a=s},758:t=>{"use strict";t.exports=function(t){return t[1]}},782:(t,e,o)=>{t.exports=o(237)("./src/core.js")},783:(t,e,o)=>{t.exports=o(237)("./src/engine.js")},935:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var o="",n=void 0!==e[5];return e[4]&&(o+="@supports (".concat(e[4],") {")),e[2]&&(o+="@media ".concat(e[2]," {")),n&&(o+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),o+=t(e),n&&(o+="}"),e[2]&&(o+="}"),e[4]&&(o+="}"),o})).join("")},e.i=function(t,o,n,r,i){"string"==typeof t&&(t=[[null,t,void 0]]);var s={};if(n)for(var a=0;a<this.length;a++){var l=this[a][0];null!=l&&(s[l]=!0)}for(var c=0;c<t.length;c++){var u=[].concat(t[c]);n&&s[u[0]]||(void 0!==i&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=i),o&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=o):u[2]=o),r&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=r):u[4]="".concat(r)),e.push(u))}},e}}},e={};function o(n){var r=e[n];if(void 0!==r)return r.exports;var i=e[n]={id:n,exports:{}};return t[n](i,i.exports,o),i.exports}o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{"use strict";o.r(n),o.d(n,{InlineEditor:()=>G});var t=o(782),e=o(584),r=o(311),i=o(783);class s extends r.EditorUI{constructor(t,e){super(t),this.view=e,this._toolbarConfig=(0,r.normalizeToolbarConfig)(t.config.get("toolbar"))}get element(){return this.view.editable.element}init(){const t=this.editor,e=this.view,o=t.editing.view,n=e.editable,r=o.document.getRoot();n.name=r.rootName,e.render();const i=n.element;this.setEditableElement(n.name,i),n.bind("isFocused").to(this.focusTracker),o.attachDomRoot(i),this._initPlaceholder(),this._initToolbar(),e.menuBarView&&this._initMenuBar(e.menuBarView),this.fire("ready")}destroy(){super.destroy();const t=this.view,e=this.editor.editing.view;e.getDomRoot(t.editable.name)&&e.detachDomRoot(t.editable.name),t.destroy()}_initToolbar(){const t=this.editor,e=this.view,o=e.editable.element,n=e.toolbar;e.panel.bind("isVisible").to(this.focusTracker,"isFocused"),e.bind("viewportTopOffset").to(this,"viewportOffset",(({top:t})=>t||0)),e.listenTo(t.ui,"update",(()=>{e.panel.isVisible&&e.panel.pin({target:o,positions:e.panelPositions})})),n.fillFromConfig(this._toolbarConfig,this.componentFactory),this.addToolbar(n)}_initPlaceholder(){const t=this.editor,e=t.editing.view,o=e.document.getRoot(),n=t.config.get("placeholder");if(n){const t="string"==typeof n?n:n[o.rootName];t&&(o.placeholder=t)}(0,i.enablePlaceholder)({view:e,element:o,isDirectHost:!1,keepOnFocus:!0})}}var a=o(591),l=o.n(a),c=o(639),u=o.n(c),d=o(128),h=o.n(d),p=o(21),f=o.n(p),b=o(51),v=o.n(b),g=o(693),m={attributes:{"data-cke":!0}};m.setAttributes=f(),m.insert=h().bind(null,"head"),m.domAPI=u(),m.insertStyleElement=v();l()(g.A,m);g.A&&g.A.locals&&g.A.locals;const w=(0,e.toUnit)("px");class y extends r.EditorUIView{constructor(t,e,o,n={}){super(t),this.toolbar=new r.ToolbarView(t,{shouldGroupWhenFull:n.shouldToolbarGroupWhenFull,isFloating:!0}),n.useMenuBar&&(this.menuBarView=new r.MenuBarView(t)),this.set("viewportTopOffset",0),this.panel=new r.BalloonPanelView(t),this.panelPositions=this._getPanelPositions(),this.panel.extendTemplate({attributes:{class:"ck-toolbar-container"}}),this.editable=new r.InlineEditableUIView(t,e,o,{label:n.label}),this._resizeObserver=null}render(){super.render(),this.body.add(this.panel),this.registerChild(this.editable),this.menuBarView?this.panel.content.addMany([this.menuBarView,this.toolbar]):this.panel.content.add(this.toolbar);if(this.toolbar.options.shouldGroupWhenFull){const t=this.editable.element;this._resizeObserver=new e.ResizeObserver(t,(()=>{this.toolbar.maxWidth=w(new e.Rect(t).width)}))}}destroy(){super.destroy(),this._resizeObserver&&this._resizeObserver.destroy()}_getPanelPositionTop(t,e){let o;return o=t.top>e.height+this.viewportTopOffset?t.top-e.height:t.bottom>e.height+this.viewportTopOffset+50?this.viewportTopOffset:t.bottom,o}_getPanelPositions(){const t=[(t,e)=>({top:this._getPanelPositionTop(t,e),left:t.left,name:"toolbar_west",config:{withArrow:!1}}),(t,e)=>({top:this._getPanelPositionTop(t,e),left:t.left+t.width-e.width,name:"toolbar_east",config:{withArrow:!1}})];return"ltr"===this.locale.uiLanguageDirection?t:t.reverse()}}const O=function(t){return null!=t&&"object"==typeof t};const T="object"==typeof global&&global&&global.Object===Object&&global;var E="object"==typeof self&&self&&self.Object===Object&&self;const j=(T||E||Function("return this")()).Symbol;var x=Object.prototype,P=x.hasOwnProperty,_=x.toString,S=j?j.toStringTag:void 0;const F=function(t){var e=P.call(t,S),o=t[S];try{t[S]=void 0;var n=!0}catch(t){}var r=_.call(t);return n&&(e?t[S]=o:delete t[S]),r};var C=Object.prototype.toString;const A=function(t){return C.call(t)};var B=j?j.toStringTag:void 0;const M=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":B&&B in Object(t)?F(t):A(t)};const V=function(t,e){return function(o){return t(e(o))}}(Object.getPrototypeOf,Object);var D=Function.prototype,I=Object.prototype,k=D.toString,R=I.hasOwnProperty,N=k.call(Object);const z=function(t){if(!O(t)||"[object Object]"!=M(t))return!1;var e=V(t);if(null===e)return!0;var o=R.call(e,"constructor")&&e.constructor;return"function"==typeof o&&o instanceof o&&k.call(o)==N};const W=function(t){return O(t)&&1===t.nodeType&&!z(t)};class G extends((0,t.ElementApiMixin)(t.Editor)){static get editorName(){return"InlineEditor"}constructor(o,n={}){if(!K(o)&&void 0!==n.initialData)throw new e.CKEditorError("editor-create-initial-data",null);super(n),this.config.define("menuBar.isVisible",!1),void 0===this.config.get("initialData")&&this.config.set("initialData",function(t){return K(t)?(0,e.getDataFromElement)(t):t}(o)),this.model.document.createRoot(),K(o)&&(this.sourceElement=o,(0,t.secureSourceElement)(this,o));const r=!this.config.get("toolbar.shouldNotGroupWhenFull"),i=this.config.get("menuBar"),a=new y(this.locale,this.editing.view,this.sourceElement,{shouldToolbarGroupWhenFull:r,useMenuBar:i.isVisible,label:this.config.get("label")});this.ui=new s(this,a),(0,t.attachToForm)(this)}destroy(){const t=this.getData();return this.ui.destroy(),super.destroy().then((()=>{this.sourceElement&&this.updateSourceElement(t)}))}static create(t,o={}){return new Promise((n=>{if(K(t)&&"TEXTAREA"===t.tagName)throw new e.CKEditorError("editor-wrong-element",null);const r=new this(t,o);n(r.initPlugins().then((()=>r.ui.init())).then((()=>r.data.init(r.config.get("initialData")))).then((()=>r.fire("ready"))).then((()=>r)))}))}}function K(t){return W(t)}})(),(window.CKEditor5=window.CKEditor5||{}).editorInline=n})();
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ckeditor/ckeditor5-editor-inline",
|
3
|
-
"version": "44.2.
|
3
|
+
"version": "44.2.1",
|
4
4
|
"description": "Inline editor implementation for CKEditor 5.",
|
5
5
|
"keywords": [
|
6
6
|
"ckeditor",
|
@@ -12,11 +12,11 @@
|
|
12
12
|
"type": "module",
|
13
13
|
"main": "src/index.js",
|
14
14
|
"dependencies": {
|
15
|
-
"@ckeditor/ckeditor5-core": "44.2.
|
16
|
-
"@ckeditor/ckeditor5-engine": "44.2.
|
17
|
-
"@ckeditor/ckeditor5-ui": "44.2.
|
18
|
-
"@ckeditor/ckeditor5-utils": "44.2.
|
19
|
-
"ckeditor5": "44.2.
|
15
|
+
"@ckeditor/ckeditor5-core": "44.2.1",
|
16
|
+
"@ckeditor/ckeditor5-engine": "44.2.1",
|
17
|
+
"@ckeditor/ckeditor5-ui": "44.2.1",
|
18
|
+
"@ckeditor/ckeditor5-utils": "44.2.1",
|
19
|
+
"ckeditor5": "44.2.1",
|
20
20
|
"lodash-es": "4.17.21"
|
21
21
|
},
|
22
22
|
"author": "CKSource (http://cksource.com/)",
|