@creaditor/web-starterkit 1.0.41 → 1.0.43
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/dist/1271.creaditor.bundle.js +1 -1
- package/dist/1271.creaditor.bundle.js.gz +0 -0
- package/dist/2655.creaditor.bundle.js +823 -0
- package/dist/2655.creaditor.bundle.js.gz +0 -0
- package/dist/3521.creaditor.bundle.js +2 -2
- package/dist/3521.creaditor.bundle.js.gz +0 -0
- package/dist/3847.creaditor.bundle.js +228 -139
- package/dist/3847.creaditor.bundle.js.gz +0 -0
- package/dist/8547.creaditor.bundle.js +197 -149
- package/dist/8547.creaditor.bundle.js.gz +0 -0
- package/dist/8878.creaditor.bundle.js +1 -1
- package/dist/8878.creaditor.bundle.js.gz +0 -0
- package/dist/creaditor.bundle.js +263 -256
- package/dist/creaditor.bundle.js.gz +0 -0
- package/dist/service-worker.js +1 -1
- package/dist/service-worker.js.gz +0 -0
- package/package.json +1 -1
- package/dist/5909.creaditor.bundle.js +0 -693
- package/dist/5909.creaditor.bundle.js.gz +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[1271],{71271(e,t,n){n.d(t,{default:()=>h});var o=n(53577),i=n(74265),l=n(86319);const s=[100,300,400,500,600,700,900].map(e=>({value:String(e),label:String(e)})),a=e=>{{const{component:t,commands:n,helpers:a}=e,r=t.tiptap,c=r.state.selection.$anchor.node().attrs,p=r.isActive("heading",{level:1})?"h1":r.isActive("heading",{level:2})?"h2":r.isActive("heading",{level:3})?"h3":r.isActive("heading",{level:4})?"h4":r.isActive("heading",{level:5})?"h5":r.isActive("heading",{level:6})?"h6":"paragraph";let u=e.languageJson;const d=e.language||"he";return u||(u="he"===d?o:i),{select:e=>{let{changeTab:t,tab:n}=e},tabs:e=>{const t=r.isActive("customBulletItem"),n=[{text:"style",selected:!t},...t?[{text:"icons",selected:!0}]:[],{text:"settings"}];return n.forEach(t=>t.selected=t.text===e),n},layout:e=>{let{tab:o,changeTab:i,tabs:a}=e;return[{type:"info",text:"text_micro_copy",active:()=>"style"===o.text},{type:"heading",level:6,text:"typography",active:()=>"style"===o.text},{type:"dropdown",active:()=>"style"===o.text,title:"type",value:p,items:[{value:"H1"},{value:"H2"},{value:"H3"},{value:"H4"},{value:"H5"},{value:"H6"},{value:"paragraph"}],onChange:e=>{const t=e.target.value;switch(t){case"H1":case"H2":case"H3":case"H4":case"H5":case"H6":r.chain().setHeading({level:parseInt(t.slice(1))}).run();break;case"paragraph":r.chain().setParagraph().run()}}},{type:"slider",title:"fontSize",min:8,step:2,max:74,value:parseInt(r.getAttributes("textStyle").fontSize||"16px"),active:()=>"style"===o.text,onInput:e=>{const n=e.target.value,o=t.tiptap,i=o.view.state.selection;i.from===i.to?o.chain().selectAll().setFontSize(n).run():o.chain().setFontSize(n).run()}},{type:"dropdown",title:"fontWeight",active:()=>"style"===o.text&&"web"===l.M.get("config","channel"),value:String(r.getAttributes("textStyle").fontWeight||400),selected:String(r.getAttributes("textStyle").fontWeight||400),items:s,onChange:e=>{const n=e.target.value,o=t.tiptap,i=o.view.state.selection;i.from===i.to?o.chain().selectAll().setFontWeight(n).run():o.chain().setFontWeight(n).run()}},{type:"heading",level:6,text:"spacing",active:()=>"style"===o.text},{type:"slider",title:"lineHeight",min:1,max:3,step:.1,value:parseFloat(c.lineHeight||1),active:()=>"style"===o.text,onInput:e=>{const n=e.target.value,o=t.tiptap,i=o.view.state.selection;i.from===i.to?o.chain().selectAll().setLineHeight(n).run():o.chain().setLineHeight(n).run()}},{type:"slider",title:"letterSpacing",min:1,max:10,step:1,value:parseFloat(c.letterSpacing)||1,active:()=>"style"===o.text,onInput:e=>{const n=e.target.value,o=t.tiptap,i=o.view.state.selection;n<=1?i.from===i.to?o.chain().selectAll().setLetterSpacing("normal").run():o.chain().setLetterSpacing("normal").run():i.from===i.to?o.chain().selectAll().setLetterSpacing(n+"px").run():o.chain().setLetterSpacing(n+"px").run()}},{type:"heading",level:6,text:"colors",active:()=>"style"===o.text},{type:"colorSwatchGroup",active:()=>"style"===o.text,columns:2,items:[{title:"font_color",value:r.getAttributes("textStyle").color||"#000000",onChange:e=>{const n=e.target.value,o=t.tiptap,i=o.view.state.selection;if(i.from===i.to){const{state:e,view:t}=o,i=e.tr,{from:l,to:s}={from:0,to:e.doc.content.size};e.doc.nodesBetween(l,s,(t,o)=>{if(t.isText){t.marks.some(e=>"link"===e.type.name)||i.addMark(o,o+t.nodeSize,e.schema.marks.textStyle.create({color:n}))}}),t.dispatch(i)}else o.chain().setColor(n).focus().run()}},{title:"backgroundColor",allowGradient:!0,value:t.props.style.background||t.props.style.backgroundColor||"#ffffff",onChange:e=>{const t=e.target.value;n.execCommand("style",{background:t,backgroundColor:null})}}]},{type:"heading",level:6,text:"layout",active:()=>"style"===o.text},{type:"slider",active:()=>"style"===o.text,title:"maxWidth",value:parseFloat(t.props.style.width),min:20,max:1e3,onInput:e=>{const t=e.target.value;n.execCommand("style",{width:t+"px"})}},{type:"divider",active:()=>"style"===o.text},{type:"button",text:"reset_styling",icon:"formatClear",color:"currentColor",fontSize:"var(--text-sm, 13px)",active:()=>"style"===o.text,onClick:()=>(e=>{const{from:t,to:n}=e.view.state.selection,o=e.chain().focus();t===n&&o.selectAll(),o.unsetFontSize().unsetFontWeight().unsetFontFamily().unsetLetterSpacing().unsetLineHeight().unsetColor().unsetBackgroundColor().unsetBold().unsetItalic().unsetUnderline().run()})(t.tiptap)},{type:"divider"},{type:"colorpicker",active:()=>"icons"===o.text,title:u.iconColor||"Icon color",alpha:!1,value:r.getAttributes(" textStyle").color||"#0000",onChange:e=>{const t=e.target.value;r.chain().setCustomBulletStyles({fill:t}).run()}},{type:"divider",active:()=>"icons"===o.text},{type:"slider",active:()=>"icons"===o.text,title:u.iconSize||"Icon size",value:parseInt(r.getAttributes("customBulletItem").width)||24,min:10,max:40,onInput:e=>{const t=e.target.value;r.chain().setCustomBulletStyles({width:t+"px",height:t+"px"}).run()}},{type:"icons",active:()=>"icons"===o.text,selectedIcon:t.props.src,useIconsApi:!0,iconColor:t.props.iconColor||"000000",iconSize:parseInt(t.props.style?.width,10)||24,onChange:e=>{const n=e.detail;t.tiptap.chain().focus().setCustomBulletIcon({svgIcon:n.urlPng}).run()}}]}}}};var r=n(52144);const c=e=>{let{helpers:t,tiptap:n,composeId:o,template:i}=e;return{set:(e,l,s)=>{switch(l){case"style":return"object"==typeof s&&(e[l]=(0,r.A)(e[l],s),t.mergeDiff(i,{style:e[l]})),!0;case"text":e[l]=s;const a=n.getJSON();return s&&"object"==typeof s&&JSON.stringify(a)!==JSON.stringify(s.childNodes)&&(s&&s.focusedElement&&s.focusedElement===o?(n.chain().focus().setContent(s.childNodes).run(),s.to&&s.from&&n.commands.setTextSelection({from:s.from,to:s.to})):n.chain().setContent(s.childNodes).run()),delete e?.text?.markdown,!0}}}};var p=n(84488),u=n.n(p);n(70567);const d=[];let g=!1,m=null;const h=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t="text";return{name:t,create:n=>{const{createElement:o,compose:i,helpers:s}=n,{mergeDiff:r}=s,p=document.createElement("div");r(p,{style:i.props.style});const h=l.M.get("config","editor","configure","editorProps","fonts");let y=l.M.get("config","target");"string"==typeof y&&(y=document.querySelector(y)),y||(y=document.body);const v=u()({element:p,container:y||document.body,editable:!0,offsetTop:40,onClickMagic:e=>{const t=l.M.get("injectEditor"),n=document.createElement("cdtr-text-prompt-editor");n.commands=e,n.elementId=i.id,t(n)},content:"string"==typeof i.props.text.markdown?i.props.text.markdown:i.props.text.childNodes,defaultDirection:"rtl",onBlur:()=>{m===v&&(m=null),setTimeout(()=>{m!==v&&(g=!1)},150)},onFocus:()=>{if(!g||m===v||null===m){if(g=!0,m=v,d.length>0)for(d.forEach(e=>{e!==v&&e.hideEditor()});d.length>0;)d.pop();d.push(v),setTimeout(()=>{m===v&&g&&v.showEditor()},100)}},onUpdate:e=>{let{editor:t,transaction:n}=e;if(0===n.steps.length)return;const o=n.curSelection.from,l=n.curSelection.to,s={childNodes:t.getJSON(),from:o,to:l,focusedElement:i.id};f.commands.execCommand("text",s)},ignoresBlurByQuerySelectors:[".ignore-events"],builder:[{type:"fontFamily",fonts:h||[],useCloud:!0},{type:"fontSize",sizes:e.fontSize||[8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74]},{type:"horizonRule"},{type:"clearFormat"},{type:"bold"},{type:"strike"},{type:"italic"},{type:"underline"},{type:"table"},{type:"emoji"},{type:"unLink"},{type:"link"},{type:"customList"},{type:"numbered"},{type:"bullet"},{type:"backcolor"},{type:"fontColor"},{type:"direction"},{type:"justify"},{type:"right"},{type:"center"},{type:"left"},{type:"image"},{type:"mergeTags"},{type:"magic"}]}),f=o({name:t,id:i.id,template:p,defaultProps:{text:{},style:{}},draggable:{group:"element"},droppable:{group:"element"},resizeable:()=>p,handleBar:!0,validator:c({template:p,helpers:s,tiptap:v,composeId:i.id}),schema:i.schema,onSelect:e=>{p.classList.add(e)},onDeselect:e=>{p.classList.remove(e)},elementProps:i,remove:()=>{p.remove()},createEditor:a});return i.props.text.markdown&&v.chain().insertContent(" ").run(),f.addProp("tiptap",v),f}}}}}]);
|
|
1
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[1271],{71271(e,t,n){n.d(t,{default:()=>h});var o=n(53577),i=n(74265),l=n(86319);const s=[100,300,400,500,600,700,900].map(e=>({value:String(e),label:String(e)})),a=e=>{{const{component:t,commands:n,helpers:a}=e,r=t.tiptap,c=r.state.selection.$anchor.node().attrs,p=r.isActive("heading",{level:1})?"h1":r.isActive("heading",{level:2})?"h2":r.isActive("heading",{level:3})?"h3":r.isActive("heading",{level:4})?"h4":r.isActive("heading",{level:5})?"h5":r.isActive("heading",{level:6})?"h6":"paragraph";let u=e.languageJson;const d=e.language||"he";return u||(u="he"===d?o:i),{select:e=>{let{changeTab:t,tab:n}=e},tabs:e=>{const t=r.isActive("customBulletItem"),n=[{text:"style",selected:!t},...t?[{text:"icons",selected:!0}]:[],{text:"settings"}];return n.forEach(t=>t.selected=t.text===e),n},layout:e=>{let{tab:o,changeTab:i,tabs:a}=e;return[{type:"info",text:"text_micro_copy",active:()=>"style"===o.text},{type:"heading",level:6,text:"typography",active:()=>"style"===o.text},{type:"dropdown",active:()=>"style"===o.text,title:"type",value:p,items:[{value:"H1"},{value:"H2"},{value:"H3"},{value:"H4"},{value:"H5"},{value:"H6"},{value:"paragraph"}],onChange:e=>{const t=e.target.value;switch(t){case"H1":case"H2":case"H3":case"H4":case"H5":case"H6":r.chain().setHeading({level:parseInt(t.slice(1))}).run();break;case"paragraph":r.chain().setParagraph().run()}}},{type:"slider",title:"fontSize",min:8,step:2,max:74,value:parseInt(r.getAttributes("textStyle").fontSize||"16px"),active:()=>"style"===o.text,onInput:e=>{const n=e.target.value,o=t.tiptap,i=o.view.state.selection;i.from===i.to?o.chain().selectAll().setFontSize(n).run():o.chain().setFontSize(n).run()}},{type:"dropdown",title:"fontWeight",active:()=>"style"===o.text&&"web"===l.M.get("config","channel"),value:String(r.getAttributes("textStyle").fontWeight||400),selected:String(r.getAttributes("textStyle").fontWeight||400),items:s,onChange:e=>{const n=e.target.value,o=t.tiptap,i=o.view.state.selection;i.from===i.to?o.chain().selectAll().setFontWeight(n).run():o.chain().setFontWeight(n).run()}},{type:"heading",level:6,text:"spacing",active:()=>"style"===o.text},{type:"slider",title:"lineHeight",min:1,max:3,step:.1,value:parseFloat(c.lineHeight||1),active:()=>"style"===o.text,onInput:e=>{const n=e.target.value,o=t.tiptap,i=o.view.state.selection;i.from===i.to?o.chain().selectAll().setLineHeight(n).run():o.chain().setLineHeight(n).run()}},{type:"slider",title:"letterSpacing",min:1,max:10,step:1,value:parseFloat(c.letterSpacing)||1,active:()=>"style"===o.text,onInput:e=>{const n=e.target.value,o=t.tiptap,i=o.view.state.selection;n<=1?i.from===i.to?o.chain().selectAll().setLetterSpacing("normal").run():o.chain().setLetterSpacing("normal").run():i.from===i.to?o.chain().selectAll().setLetterSpacing(n+"px").run():o.chain().setLetterSpacing(n+"px").run()}},{type:"heading",level:6,text:"colors",active:()=>"style"===o.text},{type:"colorSwatchGroup",active:()=>"style"===o.text,columns:2,items:[{title:"font_color",value:r.getAttributes("textStyle").color||"#000000",onChange:e=>{const n=e.target.value,o=t.tiptap,i=o.view.state.selection;if(i.from===i.to){const{state:e,view:t}=o,i=e.tr,{from:l,to:s}={from:0,to:e.doc.content.size};e.doc.nodesBetween(l,s,(t,o)=>{if(t.isText){t.marks.some(e=>"link"===e.type.name)||i.addMark(o,o+t.nodeSize,e.schema.marks.textStyle.create({color:n}))}}),t.dispatch(i)}else o.chain().setColor(n).focus().run()}},{title:"backgroundColor",allowGradient:!0,value:t.props.style.background||t.props.style.backgroundColor||"#ffffff",onChange:e=>{const t=e.target.value;n.execCommand("style",{background:t,backgroundColor:null})}}]},{type:"heading",level:6,text:"layout",active:()=>"style"===o.text},{type:"slider",active:()=>"style"===o.text,title:"maxWidth",value:parseFloat(t.props.style.width),min:20,max:1e3,onInput:e=>{const t=e.target.value;n.execCommand("style",{width:t+"px"})}},{type:"divider",active:()=>"style"===o.text},{type:"button",text:"reset_styling",icon:"formatClear",color:"currentColor",fontSize:"var(--text-sm, 13px)",active:()=>"style"===o.text,onClick:()=>(e=>{const{from:t,to:n}=e.view.state.selection,o=e.chain().focus();t===n&&o.selectAll(),o.unsetFontSize().unsetFontWeight().unsetFontFamily().unsetLetterSpacing().unsetLineHeight().unsetColor().unsetBackgroundColor().unsetBold().unsetItalic().unsetUnderline().run()})(t.tiptap)},{type:"divider"},{type:"colorpicker",active:()=>"icons"===o.text,title:u.iconColor||"Icon color",alpha:!1,value:r.getAttributes(" textStyle").color||"#0000",onChange:e=>{const t=e.target.value;r.chain().setCustomBulletStyles({fill:t}).run()}},{type:"divider",active:()=>"icons"===o.text},{type:"slider",active:()=>"icons"===o.text,title:u.iconSize||"Icon size",value:parseInt(r.getAttributes("customBulletItem").width)||24,min:10,max:40,onInput:e=>{const t=e.target.value;r.chain().setCustomBulletStyles({width:t+"px",height:t+"px"}).run()}},{type:"icons",active:()=>"icons"===o.text,selectedIcon:t.props.src,useIconsApi:!0,iconColor:t.props.iconColor||"000000",iconSize:parseInt(t.props.style?.width,10)||24,onChange:e=>{const n=e.detail;t.tiptap.chain().focus().setCustomBulletIcon({svgIcon:n.urlPng}).run()}}]}}}};var r=n(52144);const c=e=>{let{helpers:t,tiptap:n,composeId:o,template:i}=e;return{set:(e,l,s)=>{switch(l){case"style":return"object"==typeof s&&(e[l]=(0,r.A)(e[l],s),t.mergeDiff(i,{style:e[l]})),!0;case"text":e[l]=s;const a=n.getJSON();return s&&"object"==typeof s&&JSON.stringify(a)!==JSON.stringify(s.childNodes)&&(s&&s.focusedElement&&s.focusedElement===o?(n.chain().focus().setContent(s.childNodes).run(),s.to&&s.from&&n.commands.setTextSelection({from:s.from,to:s.to})):n.chain().setContent(s.childNodes).run()),delete e?.text?.markdown,!0}}}};var p=n(84488),u=n.n(p);n(70567);const d=[];let g=!1,m=null;const h=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t="text";return{name:t,create:n=>{const{createElement:o,compose:i,helpers:s}=n,{mergeDiff:r}=s,p=document.createElement("div");r(p,{style:i.props.style});const h=l.M.get("config","editor","configure","editorProps","fonts");let y=l.M.get("config","target");"string"==typeof y&&(y=document.querySelector(y)),y||(y=document.body);const v=u()({element:p,container:y||document.body,editable:!0,offsetTop:40,onClickMagic:e=>{const t=l.M.get("injectEditor"),n=document.createElement("cdtr-text-prompt-editor");n.commands=e,n.elementId=i.id,t(n)},content:"string"==typeof i.props.text.markdown?i.props.text.markdown:i.props.text.childNodes,defaultDirection:"rtl",onBlur:()=>{m===v&&(m=null),setTimeout(()=>{m!==v&&(g=!1)},150)},onFocus:()=>{if(!g||m===v||null===m){if(g=!0,m=v,d.length>0)for(d.forEach(e=>{e!==v&&e.hideEditor()});d.length>0;)d.pop();d.push(v),setTimeout(()=>{m===v&&g&&v.showEditor()},100)}},onUpdate:e=>{let{editor:t,transaction:n}=e;if(0===n.steps.length)return;const o=n.curSelection.from,l=n.curSelection.to,s={childNodes:t.getJSON(),from:o,to:l,focusedElement:i.id};f.commands.execCommand("text",s)},ignoresBlurByQuerySelectors:[".ignore-events"],builder:[{type:"fontFamily",fonts:h||[],useCloud:!0},{type:"fontSize",sizes:e.fontSize||[8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74]},{type:"horizonRule"},{type:"clearFormat"},{type:"bold"},{type:"strike"},{type:"italic"},{type:"underline"},{type:"table"},{type:"emoji"},{type:"unLink"},{type:"automation"},{type:"link"},{type:"customList"},{type:"numbered"},{type:"bullet"},{type:"backcolor"},{type:"fontColor"},{type:"direction"},{type:"justify"},{type:"right"},{type:"center"},{type:"left"},{type:"image"},{type:"mergeTags"},{type:"magic"}]}),f=o({name:t,id:i.id,template:p,defaultProps:{text:{},style:{}},draggable:{group:"element"},droppable:{group:"element"},resizeable:()=>p,handleBar:!0,validator:c({template:p,helpers:s,tiptap:v,composeId:i.id}),schema:i.schema,onSelect:e=>{p.classList.add(e)},onDeselect:e=>{p.classList.remove(e)},elementProps:i,remove:()=>{p.remove()},createEditor:a});return i.props.text.markdown&&v.chain().insertContent(" ").run(),f.addProp("tiptap",v),f}}}}}]);
|
|
Binary file
|