@ckeditor/ckeditor5-horizontal-line 47.1.0-alpha.2 → 47.2.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/build/horizontal-line.js +1 -1
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@ CKEditor 5 horizontal line feature
|
|
|
2
2
|
===========================
|
|
3
3
|
|
|
4
4
|
[](https://www.npmjs.com/package/@ckeditor/ckeditor5-horizontal-line)
|
|
5
|
-
[](https://codecov.io/gh/ckeditor/ckeditor5)
|
|
6
6
|
[](https://app.circleci.com/pipelines/github/ckeditor/ckeditor5?branch=master)
|
|
7
7
|
|
|
8
8
|
This package implements the horizontal line feature for CKEditor 5.
|
package/build/horizontal-line.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
/*!
|
|
3
3
|
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
4
4
|
* For licensing, see LICENSE.md.
|
|
5
|
-
*/(()=>{var e={
|
|
5
|
+
*/(()=>{var e={20:e=>{"use strict";var t,n=(t=[],function(e,n){return t[e]=n,t.filter(Boolean).join("\n")});function r(e,t,r,o){var i;if(r)i="";else{i="",o.supports&&(i+="@supports (".concat(o.supports,") {")),o.media&&(i+="@media ".concat(o.media," {"));var a=void 0!==o.layer;a&&(i+="@layer".concat(o.layer.length>0?" ".concat(o.layer):""," {")),i+=o.css,a&&(i+="}"),o.media&&(i+="}"),o.supports&&(i+="}")}if(e.styleSheet)e.styleSheet.cssText=n(t,i);else{var s=document.createTextNode(i),c=e.childNodes;c[t]&&e.removeChild(c[t]),c.length?e.insertBefore(s,c[t]):e.appendChild(s)}}var o={singleton:null,singletonCounter:0};e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=o.singletonCounter++,n=o.singleton||(o.singleton=e.insertStyleElement(e));return{update:function(e){r(n,t,!1,e)},remove:function(e){r(n,t,!0,e)}}}},28:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n}).join("")},t.i=function(e,n,r,o,i){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(r)for(var s=0;s<this.length;s++){var c=this[s][0];null!=c&&(a[c]=!0)}for(var l=0;l<e.length;l++){var u=[].concat(e[l]);r&&a[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),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),o&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=o):u[4]="".concat(o)),t.push(u))}},t}},48:e=>{"use strict";var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var i={},a=[],s=0;s<e.length;s++){var c=e[s],l=r.base?c[0]+r.base:c[0],u=i[l]||0,d="".concat(l," ").concat(u);i[l]=u+1;var p=n(d),f={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==p)t[p].references++,t[p].updater(f);else{var m=o(f,r);r.byIndex=s,t.splice(s,0,{identifier:d,updater:m,references:1})}a.push(d)}return a}function o(e,t){var n=t.domAPI(t);n.update(e);return function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,o){var i=r(e=e||[],o=o||{});return function(e){e=e||[];for(var a=0;a<i.length;a++){var s=n(i[a]);t[s].references--}for(var c=r(e,o),l=0;l<i.length;l++){var u=n(i[l]);0===t[u].references&&(t[u].updater(),t.splice(u,1))}i=c}}},180:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},237:e=>{"use strict";e.exports=CKEditor5.dll},311:(e,t,n)=>{e.exports=n(237)("./src/ui.js")},355:(e,t,n)=>{e.exports=n(237)("./src/icons.js")},388:e=>{"use strict";e.exports=function(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}},547:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(627),o=n.n(r),i=n(28),a=n.n(i)()(o());a.push([e.id,".ck-editor__editable .ck-horizontal-line{display:flow-root}.ck-content hr{background:#dedede;border:0;height:4px;margin:15px 0}",""]);const s=a},627:e=>{"use strict";e.exports=function(e){return e[1]}},691:e=>{"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},782:(e,t,n)=>{e.exports=n(237)("./src/core.js")},901:(e,t,n)=>{e.exports=n(237)("./src/widget.js")}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={id:r,exports:{}};return e[r](i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{"use strict";n.r(r),n.d(r,{HorizontalLine:()=>x,HorizontalLineCommand:()=>o,HorizontalLineEditing:()=>g,HorizontalLineUI:()=>w});var e=n(782),t=n(901);class o extends e.Command{refresh(){const e=this.editor.model,n=e.schema,r=e.document.selection;this.isEnabled=function(e,n,r){const o=function(e,n){const r=(0,t.findOptimalInsertionRange)(e,n),o=r.start.parent;if(o.isEmpty&&!o.is("element","$root"))return o.parent;return o}(e,r);return n.checkChild(o,"horizontalLine")}(r,n,e)}execute(){const e=this.editor.model;e.change(t=>{const n=t.createElement("horizontalLine");e.insertObject(n,null,null,{setSelection:"after"})})}}var i=n(48),a=n.n(i),s=n(20),c=n.n(s),l=n(691),u=n.n(l),d=n(388),p=n.n(d),f=n(180),m=n.n(f),h=n(547),v={attributes:{"data-cke":!0}};v.setAttributes=p(),v.insert=u().bind(null,"head"),v.domAPI=c(),v.insertStyleElement=m();a()(h.A,v);h.A&&h.A.locals&&h.A.locals;class g extends e.Plugin{static get pluginName(){return"HorizontalLineEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,n=e.model.schema,r=e.t,i=e.conversion;n.register("horizontalLine",{inheritAllFrom:"$blockObject"}),i.for("dataDowncast").elementToElement({model:"horizontalLine",view:(e,{writer:t})=>t.createEmptyElement("hr")}),i.for("editingDowncast").elementToStructure({model:"horizontalLine",view:(e,{writer:n})=>{const o=r("Horizontal line"),i=n.createContainerElement("div",null,n.createEmptyElement("hr"));return n.addClass("ck-horizontal-line",i),n.setCustomProperty("hr",!0,i),function(e,n,r){return n.setCustomProperty("horizontalLine",!0,e),(0,t.toWidget)(e,n,{label:r})}(i,n,o)}}),i.for("upcast").elementToElement({view:"hr",model:"horizontalLine"}),e.commands.add("horizontalLine",new o(e))}}var y=n(355),b=n(311);class w extends e.Plugin{static get pluginName(){return"HorizontalLineUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;e.ui.componentFactory.add("horizontalLine",()=>{const e=this._createButton(b.ButtonView);return e.set({tooltip:!0}),e}),e.ui.componentFactory.add("menuBar:horizontalLine",()=>this._createButton(b.MenuBarMenuListItemButtonView))}_createButton(e){const t=this.editor,n=t.locale,r=t.commands.get("horizontalLine"),o=new e(t.locale),i=n.t;return o.set({label:i("Horizontal line"),icon:y.IconHorizontalLine}),o.bind("isEnabled").to(r,"isEnabled"),this.listenTo(o,"execute",()=>{t.execute("horizontalLine"),t.editing.view.focus()}),o}}class x extends e.Plugin{static get requires(){return[g,w,t.Widget]}static get pluginName(){return"HorizontalLine"}static get isOfficialPlugin(){return!0}}})(),(window.CKEditor5=window.CKEditor5||{}).horizontalLine=r})();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-horizontal-line",
|
|
3
|
-
"version": "47.
|
|
3
|
+
"version": "47.2.0-alpha.0",
|
|
4
4
|
"description": "Horizontal line feature for CKEditor 5.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ckeditor",
|
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
"type": "module",
|
|
14
14
|
"main": "src/index.js",
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@ckeditor/ckeditor5-core": "47.
|
|
17
|
-
"@ckeditor/ckeditor5-icons": "47.
|
|
18
|
-
"@ckeditor/ckeditor5-ui": "47.
|
|
19
|
-
"@ckeditor/ckeditor5-utils": "47.
|
|
20
|
-
"@ckeditor/ckeditor5-widget": "47.
|
|
21
|
-
"ckeditor5": "47.
|
|
16
|
+
"@ckeditor/ckeditor5-core": "47.2.0-alpha.0",
|
|
17
|
+
"@ckeditor/ckeditor5-icons": "47.2.0-alpha.0",
|
|
18
|
+
"@ckeditor/ckeditor5-ui": "47.2.0-alpha.0",
|
|
19
|
+
"@ckeditor/ckeditor5-utils": "47.2.0-alpha.0",
|
|
20
|
+
"@ckeditor/ckeditor5-widget": "47.2.0-alpha.0",
|
|
21
|
+
"ckeditor5": "47.2.0-alpha.0"
|
|
22
22
|
},
|
|
23
23
|
"author": "CKSource (http://cksource.com/)",
|
|
24
24
|
"license": "SEE LICENSE IN LICENSE.md",
|