@ckeditor/ckeditor5-style 35.0.1 → 35.1.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/build/style.js +1 -1
- package/build/translations/ur.js +1 -0
- package/lang/translations/ur.po +33 -0
- package/package.json +34 -34
package/build/style.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
/*!
|
|
3
3
|
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
4
4
|
* For licensing, see LICENSE.md.
|
|
5
|
-
*/(()=>{var e={529:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var s=n(609),o=n.n(s)()((function(e){return e[1]}));o.push([e.id,".ck.ck-dropdown.ck-style-dropdown.ck-style-dropdown_multiple-active>.ck-button>.ck-button__label{font-style:italic}",""]);const i=o},945:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var s=n(609),o=n.n(s)()((function(e){return e[1]}));o.push([e.id,":root{--ck-style-panel-columns:3}.ck.ck-style-panel .ck-style-grid{display:grid;grid-template-columns:repeat(var(--ck-style-panel-columns),auto);justify-content:start}.ck.ck-style-panel .ck-style-grid .ck-style-grid__button{display:flex;flex-direction:column;justify-content:space-between}.ck.ck-style-panel .ck-style-grid .ck-style-grid__button .ck-style-grid__button__preview{align-content:center;align-items:center;display:flex;flex-basis:100%;flex-grow:1;justify-content:flex-start}:root{--ck-style-panel-button-width:120px;--ck-style-panel-button-height:80px;--ck-style-panel-button-shadow-color:rgba(0,0,0,.1);--ck-style-panel-button-shadow:0px 0px 6px var(--ck-style-panel-button-shadow-color);--ck-style-panel-button-label-background:#e6e6e6;--ck-style-panel-button-hover-label-background:#ccc;--ck-style-panel-button-hover-border-color:#b3b3b3}.ck.ck-style-panel .ck-style-grid{column-gap:var(--ck-spacing-large);row-gap:var(--ck-spacing-large)}.ck.ck-style-panel .ck-style-grid .ck-style-grid__button{--ck-color-button-default-hover-background:var(--ck-color-base-background);--ck-color-button-default-active-background:var(--ck-color-base-background);height:var(--ck-style-panel-button-height);padding:0;width:var(--ck-style-panel-button-width)}.ck.ck-style-panel .ck-style-grid .ck-style-grid__button:not(:focus){border:1px solid var(--ck-color-base-border);box-shadow:var(--ck-style-panel-button-shadow)}.ck.ck-style-panel .ck-style-grid .ck-style-grid__button .ck-button__label{background:var(--ck-style-panel-button-label-background);flex-shrink:0;height:22px;line-height:22px;overflow:hidden;padding:0 var(--ck-spacing-medium);text-overflow:ellipsis;width:100%}.ck.ck-style-panel .ck-style-grid .ck-style-grid__button .ck-style-grid__button__preview{border:2px solid var(--ck-color-base-background);opacity:.9;overflow:hidden;padding:var(--ck-spacing-medium);width:100%}.ck.ck-style-panel .ck-style-grid .ck-style-grid__button.ck-disabled{--ck-color-button-default-disabled-background:var(--ck-color-base-foreground)}.ck.ck-style-panel .ck-style-grid .ck-style-grid__button.ck-disabled:not(:focus){border-color:var(--ck-style-panel-button-label-background);box-shadow:none}.ck.ck-style-panel .ck-style-grid .ck-style-grid__button.ck-disabled .ck-button__label{background:var(--ck-style-panel-button-label-background)}.ck.ck-style-panel .ck-style-grid .ck-style-grid__button.ck-disabled .ck-style-grid__button__preview{border-color:var(--ck-color-base-foreground);filter:saturate(.3);opacity:.4}.ck.ck-style-panel .ck-style-grid .ck-style-grid__button.ck-on{--ck-color-button-on-background:var(--ck-color-base-background);--ck-color-button-on-hover-background:var(--ck-color-base-background);--ck-color-button-on-active-background:var(--ck-color-base-background);--ck-style-panel-button-shadow-color:rgba(25,140,240,.1);border-color:var(--ck-color-base-active)}.ck.ck-style-panel .ck-style-grid .ck-style-grid__button.ck-on .ck-button__label{background:var(--ck-color-base-active);color:var(--ck-color-base-background)}.ck.ck-style-panel .ck-style-grid .ck-style-grid__button.ck-on:hover{border-color:var(--ck-color-base-active-focus)}.ck.ck-style-panel .ck-style-grid .ck-style-grid__button.ck-on:hover .ck-button__label{background:var(--ck-color-base-active-focus)}.ck.ck-style-panel .ck-style-grid .ck-style-grid__button:hover:not(.ck-disabled):not(.ck-on){border-color:var(--ck-style-panel-button-hover-border-color)}.ck.ck-style-panel .ck-style-grid .ck-style-grid__button:hover:not(.ck-disabled):not(.ck-on) .ck-style-grid__button__preview{opacity:1}.ck.ck-style-panel .ck-style-grid .ck-style-grid__button:hover:not(.ck-disabled):not(.ck-on) .ck-button__label{background:var(--ck-style-panel-button-hover-label-background)}",""]);const i=o},561:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var s=n(609),o=n.n(s)()((function(e){return e[1]}));o.push([e.id,".ck.ck-style-panel .ck-style-panel__style-group>.ck-label{margin:var(--ck-spacing-large) 0}.ck.ck-style-panel .ck-style-panel__style-group:first-child>.ck-label{margin-top:0}",""]);const i=o},662:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var s=n(609),o=n.n(s)()((function(e){return e[1]}));o.push([e.id,":root{--ck-style-panel-max-height:470px}.ck.ck-style-panel{max-height:var(--ck-style-panel-max-height);overflow-y:auto;padding:var(--ck-spacing-large)}",""]);const i=o},609:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=e(t);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,s){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(s)for(var i=0;i<this.length;i++){var l=this[i][0];null!=l&&(o[l]=!0)}for(var r=0;r<e.length;r++){var c=[].concat(e[r]);s&&o[c[0]]||(n&&(c[2]?c[2]="".concat(n," and ").concat(c[2]):c[2]=n),t.push(c))}},t}},62:(e,t,n)=>{"use strict";var s,o=function(){return void 0===s&&(s=Boolean(window&&document&&document.all&&!window.atob)),s},i=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),l=[];function r(e){for(var t=-1,n=0;n<l.length;n++)if(l[n].identifier===e){t=n;break}return t}function c(e,t){for(var n={},s=[],o=0;o<e.length;o++){var i=e[o],c=t.base?i[0]+t.base:i[0],a=n[c]||0,d="".concat(c," ").concat(a);n[c]=a+1;var u=r(d),k={css:i[1],media:i[2],sourceMap:i[3]};-1!==u?(l[u].references++,l[u].updater(k)):l.push({identifier:d,updater:g(k,t),references:1}),s.push(d)}return s}function a(e){var t=document.createElement("style"),s=e.attributes||{};if(void 0===s.nonce){var o=n.nc;o&&(s.nonce=o)}if(Object.keys(s).forEach((function(e){t.setAttribute(e,s[e])})),"function"==typeof e.insert)e.insert(t);else{var l=i(e.insert||"head");if(!l)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");l.appendChild(t)}return t}var d,u=(d=[],function(e,t){return d[e]=t,d.filter(Boolean).join("\n")});function k(e,t,n,s){var o=n?"":s.media?"@media ".concat(s.media," {").concat(s.css,"}"):s.css;if(e.styleSheet)e.styleSheet.cssText=u(t,o);else{var i=document.createTextNode(o),l=e.childNodes;l[t]&&e.removeChild(l[t]),l.length?e.insertBefore(i,l[t]):e.appendChild(i)}}function b(e,t,n){var s=n.css,o=n.media,i=n.sourceMap;if(o?e.setAttribute("media",o):e.removeAttribute("media"),i&&"undefined"!=typeof btoa&&(s+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleSheet)e.styleSheet.cssText=s;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(s))}}var h=null,y=0;function g(e,t){var n,s,o;if(t.singleton){var i=y++;n=h||(h=a(t)),s=k.bind(null,n,i,!1),o=k.bind(null,n,i,!0)}else n=a(t),s=b.bind(null,n,t),o=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return s(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;s(e=t)}else o()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=o());var n=c(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var s=0;s<n.length;s++){var o=r(n[s]);l[o].references--}for(var i=c(e,t),a=0;a<n.length;a++){var d=r(n[a]);0===l[d].references&&(l[d].updater(),l.splice(d,1))}n=i}}}},704:(e,t,n)=>{e.exports=n(79)("./src/core.js")},273:(e,t,n)=>{e.exports=n(79)("./src/ui.js")},209:(e,t,n)=>{e.exports=n(79)("./src/utils.js")},79:e=>{"use strict";e.exports=CKEditor5.dll}},t={};function n(s){var o=t[s];if(void 0!==o)return o.exports;var i=t[s]={id:s,exports:{}};return e[s](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 s in t)n.o(t,s)&&!n.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},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})},n.nc=void 0;var s={};(()=>{"use strict";n.r(s),n.d(s,{Style:()=>V,StyleEditing:()=>x,StyleUI:()=>w});var e=n(704),t=n(273),o=n(209);const i=["caption","colgroup","dd","dt","figcaption","legend","li","optgroup","option","rp","rt","summary","tbody","td","tfoot","th","thead","tr"];class l extends t.ButtonView{constructor(e,t){super(e),this.styleDefinition=t,this.previewView=this._createPreview(),this.set({label:t.name,class:"ck-style-grid__button",withText:!0}),this.extendTemplate({attributes:{role:"option"}}),this.children.add(this.previewView,0)}_createPreview(){const{element:e,classes:n}=this.styleDefinition,s=new t.View(this.locale);return s.setTemplate({tag:"div",attributes:{class:["ck","ck-reset_all-excluded","ck-style-grid__button__preview","ck-content"]},children:[{tag:this._isPreviewable(e)?e:"div",attributes:{class:n},children:[{text:"AaBbCcDdEeFfGgHhIiJj"}]}]}),s}_isPreviewable(e){return!i.includes(e)}}var r=n(62),c=n.n(r),a=n(945),d={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};c()(a.Z,d);a.Z.locals;class u extends t.View{constructor(e,t){super(e),this.set("activeStyles",[]),this.set("enabledStyles",[]),this.children=this.createCollection(),this.children.delegate("execute").to(this);for(const n of t){const t=new l(e,n);this.children.add(t)}this.on("change:activeStyles",(()=>{for(const e of this.children)e.isOn=this.activeStyles.includes(e.styleDefinition.name)})),this.on("change:enabledStyles",(()=>{for(const e of this.children)e.isEnabled=this.enabledStyles.includes(e.styleDefinition.name)})),this.setTemplate({tag:"div",attributes:{class:["ck","ck-style-grid"],role:"listbox"},children:this.children})}}var k=n(561),b={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};c()(k.Z,b);k.Z.locals;class h extends t.View{constructor(e,n,s){super(e),this.labelView=new t.LabelView(e),this.labelView.text=n,this.gridView=new u(e,s),this.setTemplate({tag:"div",attributes:{class:["ck","ck-style-panel__style-group"],role:"group","aria-labelledby":this.labelView.id},children:[this.labelView,this.gridView]})}}var y=n(662),g={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};c()(y.Z,g);y.Z.locals;class p extends t.View{constructor(e,n){super(e);const s=e.t;this.focusTracker=new o.FocusTracker,this.keystrokes=new o.KeystrokeHandler,this.children=this.createCollection(),this.blockStylesGroupView=new h(e,s("Block styles"),n.block),this.inlineStylesGroupView=new h(e,s("Text styles"),n.inline),this.set("activeStyles",[]),this.set("enabledStyles",[]),this._focusables=new t.ViewCollection,this._focusCycler=new t.FocusCycler({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:["arrowup","arrowleft"],focusNext:["arrowdown","arrowright"]}}),n.block.length&&this.children.add(this.blockStylesGroupView),n.inline.length&&this.children.add(this.inlineStylesGroupView),this.blockStylesGroupView.gridView.delegate("execute").to(this),this.inlineStylesGroupView.gridView.delegate("execute").to(this),this.blockStylesGroupView.gridView.bind("activeStyles","enabledStyles").to(this),this.inlineStylesGroupView.gridView.bind("activeStyles","enabledStyles").to(this),this.setTemplate({tag:"div",attributes:{class:["ck","ck-style-panel"]},children:this.children})}render(){super.render();[...this.blockStylesGroupView.gridView.children,...this.inlineStylesGroupView.gridView.children].forEach((e=>{this._focusables.add(e),this.focusTracker.add(e.element)})),this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}}function f(e,t=[]){const n={block:[],inline:[]};for(const s of t){const t=[],o=[];for(const n of e.getDefinitionsForView(s.element))n.isBlock?t.push(n.model):o.push(n.model);t.length?n.block.push({...s,modelElements:t,isBlock:!0}):n.inline.push({...s,ghsAttributes:o})}return n}var v=n(529),m={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};c()(v.Z,m);v.Z.locals;class w extends e.Plugin{static get pluginName(){return"StyleUI"}init(){const e=this.editor,n=f(e.plugins.get("DataSchema"),e.config.get("style.definitions"));e.ui.componentFactory.add("style",(s=>{const o=s.t,i=(0,t.createDropdown)(s),l=new p(s,n),r=e.commands.get("style");return i.bind("isEnabled").to(r),i.panelView.children.add(l),i.buttonView.withText=!0,i.buttonView.bind("label").to(r,"value",(e=>e.length>1?o("Multiple styles"):1===e.length?e[0]:o("Styles"))),i.bind("class").to(r,"value",(e=>{const t=["ck-style-dropdown"];return e.length>1&&t.push("ck-style-dropdown_multiple-active"),t.join(" ")})),l.delegate("execute").to(i),i.on("execute",(t=>{e.execute("style",{styleName:t.source.styleDefinition.name}),e.editing.view.focus()})),l.bind("activeStyles").to(r,"value"),l.bind("enabledStyles").to(r,"enabledStyles"),i}))}}class _ extends e.Command{constructor(e,t){super(e),this.set("value",[]),this.set("enabledStyles",[]),this._styleDefinitions=t}refresh(){const e=this.editor.model,t=e.document.selection,n=new Set,s=new Set;for(const o of this._styleDefinitions.inline)for(const i of o.ghsAttributes){e.schema.checkAttributeInSelection(t,i)&&s.add(o.name);S(this._getValueFromFirstAllowedNode(i),o.classes)&&n.add(o.name)}const i=(0,o.first)(t.getSelectedBlocks());if(i){const t=i.getAncestors({includeSelf:!0,parentFirst:!0});for(const o of t){if(e.schema.isLimit(o))break;if(e.schema.checkAttribute(o,"htmlAttributes"))for(const e of this._styleDefinitions.block){if(!e.modelElements.includes(o.name))continue;s.add(e.name);S(o.getAttribute("htmlAttributes"),e.classes)&&n.add(e.name)}}}this.enabledStyles=Array.from(s).sort(),this.isEnabled=this.enabledStyles.length>0,this.value=this.isEnabled?Array.from(n).sort():[]}execute({styleName:e,forceValue:t}){if(!this.enabledStyles.includes(e))return void(0,o.logWarning)("style-command-executed-with-incorrect-style-name");const n=this.editor.model,s=n.document.selection,i=this.editor.plugins.get("GeneralHtmlSupport"),l=[...this._styleDefinitions.inline,...this._styleDefinitions.block].find((({name:t})=>t==e)),r=void 0===t?!this.value.includes(l.name):t;n.change((()=>{let e;e=l.isBlock?function(e,t,n){const s=new Set;for(const o of e){const e=o.getAncestors({includeSelf:!0,parentFirst:!0});for(const o of e){if(n.isLimit(o))break;if(t.includes(o.name)){s.add(o);break}}}return s}(s.getSelectedBlocks(),l.modelElements,n.schema):[s];for(const t of e)r?i.addModelHtmlClass(l.element,l.classes,t):i.removeModelHtmlClass(l.element,l.classes,t)}))}_getValueFromFirstAllowedNode(e){const t=this.editor.model,n=t.schema,s=t.document.selection;if(s.isCollapsed)return s.getAttribute(e);for(const t of s.getRanges())for(const s of t.getItems())if(n.checkAttribute(s,e))return s.getAttribute(e);return null}}function S(e,t){return!(!e||!e.classes)&&t.every((t=>e.classes.includes(t)))}class x extends e.Plugin{static get pluginName(){return"StyleEditing"}static get requires(){return["GeneralHtmlSupport"]}init(){const e=this.editor,t=f(e.plugins.get("DataSchema"),e.config.get("style.definitions"));e.commands.add("style",new _(e,t)),this._configureGHSDataFilter(t)}_configureGHSDataFilter({block:e,inline:t}){const n=this.editor.plugins.get("DataFilter");n.loadAllowedConfig(e.map(T)),n.loadAllowedConfig(t.map(T))}}function T({element:e,classes:t}){return{name:e,classes:t}}class V extends e.Plugin{static get pluginName(){return"Style"}static get requires(){return[x,w]}}})(),(window.CKEditor5=window.CKEditor5||{}).style=s})();
|
|
5
|
+
*/(()=>{var e={529:(e,t,s)=>{"use strict";s.d(t,{Z:()=>l});var n=s(609),i=s.n(n)()((function(e){return e[1]}));i.push([e.id,".ck.ck-dropdown.ck-style-dropdown.ck-style-dropdown_multiple-active>.ck-button>.ck-button__label{font-style:italic}",""]);const l=i},945:(e,t,s)=>{"use strict";s.d(t,{Z:()=>l});var n=s(609),i=s.n(n)()((function(e){return e[1]}));i.push([e.id,":root{--ck-style-panel-columns:3}.ck.ck-style-panel .ck-style-grid{display:grid;grid-template-columns:repeat(var(--ck-style-panel-columns),auto);justify-content:start}.ck.ck-style-panel .ck-style-grid .ck-style-grid__button{display:flex;flex-direction:column;justify-content:space-between}.ck.ck-style-panel .ck-style-grid .ck-style-grid__button .ck-style-grid__button__preview{align-content:center;align-items:center;display:flex;flex-basis:100%;flex-grow:1;justify-content:flex-start}:root{--ck-style-panel-button-width:120px;--ck-style-panel-button-height:80px;--ck-style-panel-button-label-background:#f0f0f0;--ck-style-panel-button-hover-label-background:#ebebeb;--ck-style-panel-button-hover-border-color:#b3b3b3}.ck.ck-style-panel .ck-style-grid{column-gap:var(--ck-spacing-large);row-gap:var(--ck-spacing-large)}.ck.ck-style-panel .ck-style-grid .ck-style-grid__button{--ck-color-button-default-hover-background:var(--ck-color-base-background);--ck-color-button-default-active-background:var(--ck-color-base-background);height:var(--ck-style-panel-button-height);padding:0;width:var(--ck-style-panel-button-width)}.ck.ck-style-panel .ck-style-grid .ck-style-grid__button:not(:focus){border:1px solid var(--ck-color-base-border)}.ck.ck-style-panel .ck-style-grid .ck-style-grid__button .ck-button__label{flex-shrink:0;height:22px;line-height:22px;overflow:hidden;padding:0 var(--ck-spacing-medium);text-overflow:ellipsis;width:100%}.ck.ck-style-panel .ck-style-grid .ck-style-grid__button .ck-style-grid__button__preview{background:var(--ck-color-base-background);border:2px solid var(--ck-color-base-background);opacity:.9;overflow:hidden;padding:var(--ck-spacing-medium);width:100%}.ck.ck-style-panel .ck-style-grid .ck-style-grid__button.ck-disabled{--ck-color-button-default-disabled-background:var(--ck-color-base-foreground)}.ck.ck-style-panel .ck-style-grid .ck-style-grid__button.ck-disabled:not(:focus){border-color:var(--ck-style-panel-button-label-background)}.ck.ck-style-panel .ck-style-grid .ck-style-grid__button.ck-disabled .ck-style-grid__button__preview{border-color:var(--ck-color-base-foreground);filter:saturate(.3);opacity:.4}.ck.ck-style-panel .ck-style-grid .ck-style-grid__button.ck-on{border-color:var(--ck-color-base-active)}.ck.ck-style-panel .ck-style-grid .ck-style-grid__button.ck-on .ck-button__label{box-shadow:0 -1px 0 var(--ck-color-base-active);z-index:1}.ck.ck-style-panel .ck-style-grid .ck-style-grid__button.ck-on:hover{border-color:var(--ck-color-base-active-focus)}.ck.ck-style-panel .ck-style-grid .ck-style-grid__button:not(.ck-on) .ck-button__label{background:var(--ck-style-panel-button-label-background)}.ck.ck-style-panel .ck-style-grid .ck-style-grid__button:not(.ck-on):hover .ck-button__label{background:var(--ck-style-panel-button-hover-label-background)}.ck.ck-style-panel .ck-style-grid .ck-style-grid__button:hover:not(.ck-disabled):not(.ck-on){border-color:var(--ck-style-panel-button-hover-border-color)}.ck.ck-style-panel .ck-style-grid .ck-style-grid__button:hover:not(.ck-disabled):not(.ck-on) .ck-style-grid__button__preview{opacity:1}",""]);const l=i},561:(e,t,s)=>{"use strict";s.d(t,{Z:()=>l});var n=s(609),i=s.n(n)()((function(e){return e[1]}));i.push([e.id,".ck.ck-style-panel .ck-style-panel__style-group>.ck-label{margin:var(--ck-spacing-large) 0}.ck.ck-style-panel .ck-style-panel__style-group:first-child>.ck-label{margin-top:0}",""]);const l=i},662:(e,t,s)=>{"use strict";s.d(t,{Z:()=>l});var n=s(609),i=s.n(n)()((function(e){return e[1]}));i.push([e.id,":root{--ck-style-panel-max-height:470px}.ck.ck-style-panel{max-height:var(--ck-style-panel-max-height);overflow-y:auto;padding:var(--ck-spacing-large)}",""]);const l=i},609:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var s=e(t);return t[2]?"@media ".concat(t[2]," {").concat(s,"}"):s})).join("")},t.i=function(e,s,n){"string"==typeof e&&(e=[[null,e,""]]);var i={};if(n)for(var l=0;l<this.length;l++){var o=this[l][0];null!=o&&(i[o]=!0)}for(var r=0;r<e.length;r++){var c=[].concat(e[r]);n&&i[c[0]]||(s&&(c[2]?c[2]="".concat(s," and ").concat(c[2]):c[2]=s),t.push(c))}},t}},62:(e,t,s)=>{"use strict";var n,i=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},l=function(){var e={};return function(t){if(void 0===e[t]){var s=document.querySelector(t);if(window.HTMLIFrameElement&&s instanceof window.HTMLIFrameElement)try{s=s.contentDocument.head}catch(e){s=null}e[t]=s}return e[t]}}(),o=[];function r(e){for(var t=-1,s=0;s<o.length;s++)if(o[s].identifier===e){t=s;break}return t}function c(e,t){for(var s={},n=[],i=0;i<e.length;i++){var l=e[i],c=t.base?l[0]+t.base:l[0],a=s[c]||0,d="".concat(c," ").concat(a);s[c]=a+1;var u=r(d),h={css:l[1],media:l[2],sourceMap:l[3]};-1!==u?(o[u].references++,o[u].updater(h)):o.push({identifier:d,updater:g(h,t),references:1}),n.push(d)}return n}function a(e){var t=document.createElement("style"),n=e.attributes||{};if(void 0===n.nonce){var i=s.nc;i&&(n.nonce=i)}if(Object.keys(n).forEach((function(e){t.setAttribute(e,n[e])})),"function"==typeof e.insert)e.insert(t);else{var o=l(e.insert||"head");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(t)}return t}var d,u=(d=[],function(e,t){return d[e]=t,d.filter(Boolean).join("\n")});function h(e,t,s,n){var i=s?"":n.media?"@media ".concat(n.media," {").concat(n.css,"}"):n.css;if(e.styleSheet)e.styleSheet.cssText=u(t,i);else{var l=document.createTextNode(i),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(l,o[t]):e.appendChild(l)}}function y(e,t,s){var n=s.css,i=s.media,l=s.sourceMap;if(i?e.setAttribute("media",i):e.removeAttribute("media"),l&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(l))))," */")),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var k=null,b=0;function g(e,t){var s,n,i;if(t.singleton){var l=b++;s=k||(k=a(t)),n=h.bind(null,s,l,!1),i=h.bind(null,s,l,!0)}else s=a(t),n=y.bind(null,s,t),i=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(s)};return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else i()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=i());var s=c(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var n=0;n<s.length;n++){var i=r(s[n]);o[i].references--}for(var l=c(e,t),a=0;a<s.length;a++){var d=r(s[a]);0===o[d].references&&(o[d].updater(),o.splice(d,1))}s=l}}}},704:(e,t,s)=>{e.exports=s(79)("./src/core.js")},273:(e,t,s)=>{e.exports=s(79)("./src/ui.js")},209:(e,t,s)=>{e.exports=s(79)("./src/utils.js")},79:e=>{"use strict";e.exports=CKEditor5.dll}},t={};function s(n){var i=t[n];if(void 0!==i)return i.exports;var l=t[n]={id:n,exports:{}};return e[n](l,l.exports,s),l.exports}s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.nc=void 0;var n={};(()=>{"use strict";s.r(n),s.d(n,{Style:()=>V,StyleEditing:()=>x,StyleUI:()=>w});var e=s(704),t=s(273),i=s(209);const l=["caption","colgroup","dd","dt","figcaption","legend","li","optgroup","option","rp","rt","summary","tbody","td","tfoot","th","thead","tr"];class o extends t.ButtonView{constructor(e,t){super(e),this.styleDefinition=t,this.previewView=this._createPreview(),this.set({label:t.name,class:"ck-style-grid__button",withText:!0}),this.extendTemplate({attributes:{role:"option"}}),this.children.add(this.previewView,0)}_createPreview(){const{element:e,classes:s}=this.styleDefinition,n=new t.View(this.locale);return n.setTemplate({tag:"div",attributes:{class:["ck","ck-reset_all-excluded","ck-style-grid__button__preview","ck-content"]},children:[{tag:this._isPreviewable(e)?e:"div",attributes:{class:s},children:[{text:"AaBbCcDdEeFfGgHhIiJj"}]}]}),n}_isPreviewable(e){return!l.includes(e)}}var r=s(62),c=s.n(r),a=s(945),d={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};c()(a.Z,d);a.Z.locals;class u extends t.View{constructor(e,t){super(e),this.set("activeStyles",[]),this.set("enabledStyles",[]),this.children=this.createCollection(),this.children.delegate("execute").to(this);for(const s of t){const t=new o(e,s);this.children.add(t)}this.on("change:activeStyles",(()=>{for(const e of this.children)e.isOn=this.activeStyles.includes(e.styleDefinition.name)})),this.on("change:enabledStyles",(()=>{for(const e of this.children)e.isEnabled=this.enabledStyles.includes(e.styleDefinition.name)})),this.setTemplate({tag:"div",attributes:{class:["ck","ck-style-grid"],role:"listbox"},children:this.children})}}var h=s(561),y={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};c()(h.Z,y);h.Z.locals;class k extends t.View{constructor(e,s,n){super(e),this.labelView=new t.LabelView(e),this.labelView.text=s,this.gridView=new u(e,n),this.setTemplate({tag:"div",attributes:{class:["ck","ck-style-panel__style-group"],role:"group","aria-labelledby":this.labelView.id},children:[this.labelView,this.gridView]})}}var b=s(662),g={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};c()(b.Z,g);b.Z.locals;class p extends t.View{constructor(e,s){super(e);const n=e.t;this.focusTracker=new i.FocusTracker,this.keystrokes=new i.KeystrokeHandler,this.children=this.createCollection(),this.blockStylesGroupView=new k(e,n("Block styles"),s.block),this.inlineStylesGroupView=new k(e,n("Text styles"),s.inline),this.set("activeStyles",[]),this.set("enabledStyles",[]),this._focusables=new t.ViewCollection,this._focusCycler=new t.FocusCycler({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:["arrowup","arrowleft"],focusNext:["arrowdown","arrowright"]}}),s.block.length&&this.children.add(this.blockStylesGroupView),s.inline.length&&this.children.add(this.inlineStylesGroupView),this.blockStylesGroupView.gridView.delegate("execute").to(this),this.inlineStylesGroupView.gridView.delegate("execute").to(this),this.blockStylesGroupView.gridView.bind("activeStyles","enabledStyles").to(this),this.inlineStylesGroupView.gridView.bind("activeStyles","enabledStyles").to(this),this.setTemplate({tag:"div",attributes:{class:["ck","ck-style-panel"]},children:this.children})}render(){super.render();[...this.blockStylesGroupView.gridView.children,...this.inlineStylesGroupView.gridView.children].forEach((e=>{this._focusables.add(e),this.focusTracker.add(e.element)})),this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}}function f(e,t=[]){const s={block:[],inline:[]};for(const n of t){const t=[],i=[];for(const s of e.getDefinitionsForView(n.element))s.isBlock?t.push(s.model):i.push(s.model);t.length?s.block.push({...n,modelElements:t,isBlock:!0}):s.inline.push({...n,ghsAttributes:i})}return s}var v=s(529),m={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};c()(v.Z,m);v.Z.locals;class w extends e.Plugin{static get pluginName(){return"StyleUI"}init(){const e=this.editor,s=f(e.plugins.get("DataSchema"),e.config.get("style.definitions"));e.ui.componentFactory.add("style",(n=>{const i=n.t,l=(0,t.createDropdown)(n),o=new p(n,s),r=e.commands.get("style");return l.bind("isEnabled").to(r),l.panelView.children.add(o),l.buttonView.withText=!0,l.buttonView.bind("label").to(r,"value",(e=>e.length>1?i("Multiple styles"):1===e.length?e[0]:i("Styles"))),l.bind("class").to(r,"value",(e=>{const t=["ck-style-dropdown"];return e.length>1&&t.push("ck-style-dropdown_multiple-active"),t.join(" ")})),o.delegate("execute").to(l),l.on("execute",(t=>{e.execute("style",{styleName:t.source.styleDefinition.name}),e.editing.view.focus()})),o.bind("activeStyles").to(r,"value"),o.bind("enabledStyles").to(r,"enabledStyles"),l}))}}class _ extends e.Command{constructor(e,t){super(e),this.set("value",[]),this.set("enabledStyles",[]),this._styleDefinitions=t}refresh(){const e=this.editor.model,t=e.document.selection,s=new Set,n=new Set;for(const i of this._styleDefinitions.inline)for(const l of i.ghsAttributes){e.schema.checkAttributeInSelection(t,l)&&n.add(i.name);S(this._getValueFromFirstAllowedNode(l),i.classes)&&s.add(i.name)}const l=(0,i.first)(t.getSelectedBlocks());if(l){const t=l.getAncestors({includeSelf:!0,parentFirst:!0});for(const i of t){if(e.schema.isLimit(i))break;if(e.schema.checkAttribute(i,"htmlAttributes"))for(const e of this._styleDefinitions.block){if(!e.modelElements.includes(i.name))continue;n.add(e.name);S(i.getAttribute("htmlAttributes"),e.classes)&&s.add(e.name)}}}this.enabledStyles=Array.from(n).sort(),this.isEnabled=this.enabledStyles.length>0,this.value=this.isEnabled?Array.from(s).sort():[]}execute({styleName:e,forceValue:t}){if(!this.enabledStyles.includes(e))return void(0,i.logWarning)("style-command-executed-with-incorrect-style-name");const s=this.editor.model,n=s.document.selection,l=this.editor.plugins.get("GeneralHtmlSupport"),o=[...this._styleDefinitions.inline,...this._styleDefinitions.block].find((({name:t})=>t==e)),r=void 0===t?!this.value.includes(o.name):t;s.change((()=>{let e;e=o.isBlock?function(e,t,s){const n=new Set;for(const i of e){const e=i.getAncestors({includeSelf:!0,parentFirst:!0});for(const i of e){if(s.isLimit(i))break;if(t.includes(i.name)){n.add(i);break}}}return n}(n.getSelectedBlocks(),o.modelElements,s.schema):[n];for(const t of e)r?l.addModelHtmlClass(o.element,o.classes,t):l.removeModelHtmlClass(o.element,o.classes,t)}))}_getValueFromFirstAllowedNode(e){const t=this.editor.model,s=t.schema,n=t.document.selection;if(n.isCollapsed)return n.getAttribute(e);for(const t of n.getRanges())for(const n of t.getItems())if(s.checkAttribute(n,e))return n.getAttribute(e);return null}}function S(e,t){return!(!e||!e.classes)&&t.every((t=>e.classes.includes(t)))}class x extends e.Plugin{static get pluginName(){return"StyleEditing"}static get requires(){return["GeneralHtmlSupport"]}init(){const e=this.editor,t=f(e.plugins.get("DataSchema"),e.config.get("style.definitions"));e.commands.add("style",new _(e,t)),this._configureGHSDataFilter(t)}_configureGHSDataFilter({block:e,inline:t}){const s=this.editor.plugins.get("DataFilter");s.loadAllowedConfig(e.map(T)),s.loadAllowedConfig(t.map(T))}}function T({element:e,classes:t}){return{name:e,classes:t}}class V extends e.Plugin{static get pluginName(){return"Style"}static get requires(){return[x,w]}}})(),(window.CKEditor5=window.CKEditor5||{}).style=n})();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(t){const s=t.ur=t.ur||{};s.dictionary=Object.assign(s.dictionary||{},{"Block styles":"خانہ کے انداز","Multiple styles":"متعدد انداز",Styles:"انداز","Text styles":"متن کے انداز"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
2
|
+
#
|
|
3
|
+
# !!! IMPORTANT !!!
|
|
4
|
+
#
|
|
5
|
+
# Before you edit this file, please keep in mind that contributing to the project
|
|
6
|
+
# translations is possible ONLY via the Transifex online service.
|
|
7
|
+
#
|
|
8
|
+
# To submit your translations, visit https://www.transifex.com/ckeditor/ckeditor5.
|
|
9
|
+
#
|
|
10
|
+
# To learn more, check out the official contributor's guide:
|
|
11
|
+
# https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
|
|
12
|
+
#
|
|
13
|
+
msgid ""
|
|
14
|
+
msgstr ""
|
|
15
|
+
"Language-Team: Urdu (https://www.transifex.com/ckeditor/teams/11143/ur/)\n"
|
|
16
|
+
"Language: ur\n"
|
|
17
|
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
|
18
|
+
|
|
19
|
+
msgctxt "The label of the styles dropdown button in the toolbar displayed when no style is currently active."
|
|
20
|
+
msgid "Styles"
|
|
21
|
+
msgstr "انداز"
|
|
22
|
+
|
|
23
|
+
msgctxt "The label of the styles dropdown button in the toolbar displayed when multiple styles are currently active."
|
|
24
|
+
msgid "Multiple styles"
|
|
25
|
+
msgstr "متعدد انداز"
|
|
26
|
+
|
|
27
|
+
msgctxt "The label of the group in the styles dropdown containing styles applicable to blocks only (paragraphs, headings, etc.)."
|
|
28
|
+
msgid "Block styles"
|
|
29
|
+
msgstr "خانہ کے انداز"
|
|
30
|
+
|
|
31
|
+
msgctxt "The label of the group in the styles dropdown containing inline applicable to text only."
|
|
32
|
+
msgid "Text styles"
|
|
33
|
+
msgstr "متن کے انداز"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-style",
|
|
3
|
-
"version": "35.0
|
|
3
|
+
"version": "35.1.0",
|
|
4
4
|
"description": "Style feature for CKEditor 5.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ckeditor",
|
|
@@ -12,42 +12,42 @@
|
|
|
12
12
|
],
|
|
13
13
|
"main": "src/index.js",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"ckeditor5": "^35.0
|
|
15
|
+
"ckeditor5": "^35.1.0"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
|
-
"@ckeditor/ckeditor5-alignment": "^35.0
|
|
19
|
-
"@ckeditor/ckeditor5-basic-styles": "^35.0
|
|
20
|
-
"@ckeditor/ckeditor5-block-quote": "^35.0
|
|
21
|
-
"@ckeditor/ckeditor5-cloud-services": "^35.0
|
|
22
|
-
"@ckeditor/ckeditor5-code-block": "^35.0
|
|
23
|
-
"@ckeditor/ckeditor5-core": "^35.0
|
|
18
|
+
"@ckeditor/ckeditor5-alignment": "^35.1.0",
|
|
19
|
+
"@ckeditor/ckeditor5-basic-styles": "^35.1.0",
|
|
20
|
+
"@ckeditor/ckeditor5-block-quote": "^35.1.0",
|
|
21
|
+
"@ckeditor/ckeditor5-cloud-services": "^35.1.0",
|
|
22
|
+
"@ckeditor/ckeditor5-code-block": "^35.1.0",
|
|
23
|
+
"@ckeditor/ckeditor5-core": "^35.1.0",
|
|
24
24
|
"@ckeditor/ckeditor5-dev-utils": "^30.0.0",
|
|
25
|
-
"@ckeditor/ckeditor5-easy-image": "^35.0
|
|
26
|
-
"@ckeditor/ckeditor5-editor-classic": "^35.0
|
|
27
|
-
"@ckeditor/ckeditor5-engine": "^35.0
|
|
28
|
-
"@ckeditor/ckeditor5-font": "^35.0
|
|
29
|
-
"@ckeditor/ckeditor5-heading": "^35.0
|
|
30
|
-
"@ckeditor/ckeditor5-highlight": "^35.0
|
|
31
|
-
"@ckeditor/ckeditor5-horizontal-line": "^35.0
|
|
32
|
-
"@ckeditor/ckeditor5-html-embed": "^35.0
|
|
33
|
-
"@ckeditor/ckeditor5-html-support": "^35.0
|
|
34
|
-
"@ckeditor/ckeditor5-image": "^35.0
|
|
35
|
-
"@ckeditor/ckeditor5-indent": "^35.0
|
|
36
|
-
"@ckeditor/ckeditor5-language": "^35.0
|
|
37
|
-
"@ckeditor/ckeditor5-link": "^35.0
|
|
38
|
-
"@ckeditor/ckeditor5-list": "^35.0
|
|
39
|
-
"@ckeditor/ckeditor5-mention": "^35.0
|
|
40
|
-
"@ckeditor/ckeditor5-page-break": "^35.0
|
|
41
|
-
"@ckeditor/ckeditor5-paragraph": "^35.0
|
|
42
|
-
"@ckeditor/ckeditor5-paste-from-office": "^35.0
|
|
43
|
-
"@ckeditor/ckeditor5-remove-format": "^35.0
|
|
44
|
-
"@ckeditor/ckeditor5-source-editing": "^35.0
|
|
45
|
-
"@ckeditor/ckeditor5-table": "^35.0
|
|
46
|
-
"@ckeditor/ckeditor5-theme-lark": "^35.0
|
|
47
|
-
"@ckeditor/ckeditor5-typing": "^35.0
|
|
48
|
-
"@ckeditor/ckeditor5-ui": "^35.0
|
|
49
|
-
"@ckeditor/ckeditor5-utils": "^35.0
|
|
50
|
-
"@ckeditor/ckeditor5-word-count": "^35.0
|
|
25
|
+
"@ckeditor/ckeditor5-easy-image": "^35.1.0",
|
|
26
|
+
"@ckeditor/ckeditor5-editor-classic": "^35.1.0",
|
|
27
|
+
"@ckeditor/ckeditor5-engine": "^35.1.0",
|
|
28
|
+
"@ckeditor/ckeditor5-font": "^35.1.0",
|
|
29
|
+
"@ckeditor/ckeditor5-heading": "^35.1.0",
|
|
30
|
+
"@ckeditor/ckeditor5-highlight": "^35.1.0",
|
|
31
|
+
"@ckeditor/ckeditor5-horizontal-line": "^35.1.0",
|
|
32
|
+
"@ckeditor/ckeditor5-html-embed": "^35.1.0",
|
|
33
|
+
"@ckeditor/ckeditor5-html-support": "^35.1.0",
|
|
34
|
+
"@ckeditor/ckeditor5-image": "^35.1.0",
|
|
35
|
+
"@ckeditor/ckeditor5-indent": "^35.1.0",
|
|
36
|
+
"@ckeditor/ckeditor5-language": "^35.1.0",
|
|
37
|
+
"@ckeditor/ckeditor5-link": "^35.1.0",
|
|
38
|
+
"@ckeditor/ckeditor5-list": "^35.1.0",
|
|
39
|
+
"@ckeditor/ckeditor5-mention": "^35.1.0",
|
|
40
|
+
"@ckeditor/ckeditor5-page-break": "^35.1.0",
|
|
41
|
+
"@ckeditor/ckeditor5-paragraph": "^35.1.0",
|
|
42
|
+
"@ckeditor/ckeditor5-paste-from-office": "^35.1.0",
|
|
43
|
+
"@ckeditor/ckeditor5-remove-format": "^35.1.0",
|
|
44
|
+
"@ckeditor/ckeditor5-source-editing": "^35.1.0",
|
|
45
|
+
"@ckeditor/ckeditor5-table": "^35.1.0",
|
|
46
|
+
"@ckeditor/ckeditor5-theme-lark": "^35.1.0",
|
|
47
|
+
"@ckeditor/ckeditor5-typing": "^35.1.0",
|
|
48
|
+
"@ckeditor/ckeditor5-ui": "^35.1.0",
|
|
49
|
+
"@ckeditor/ckeditor5-utils": "^35.1.0",
|
|
50
|
+
"@ckeditor/ckeditor5-word-count": "^35.1.0",
|
|
51
51
|
"webpack": "^5.58.1",
|
|
52
52
|
"webpack-cli": "^4.9.0"
|
|
53
53
|
},
|