@creaditor/web-starterkit 1.0.11 → 1.0.12

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.
Files changed (71) hide show
  1. package/dist/1142.creaditor.bundle.js +1 -1
  2. package/dist/1142.creaditor.bundle.js.gz +0 -0
  3. package/dist/1260.creaditor.bundle.js +63 -26
  4. package/dist/1260.creaditor.bundle.js.gz +0 -0
  5. package/dist/1271.creaditor.bundle.js +1 -1
  6. package/dist/1271.creaditor.bundle.js.gz +0 -0
  7. package/dist/1334.creaditor.bundle.js +2 -2
  8. package/dist/1334.creaditor.bundle.js.gz +0 -0
  9. package/dist/2234.creaditor.bundle.js +121 -1
  10. package/dist/2234.creaditor.bundle.js.gz +0 -0
  11. package/dist/2765.creaditor.bundle.js +1 -1
  12. package/dist/2765.creaditor.bundle.js.gz +0 -0
  13. package/dist/2956.creaditor.bundle.js +1 -1
  14. package/dist/2956.creaditor.bundle.js.gz +0 -0
  15. package/dist/3418.creaditor.bundle.js +1 -1
  16. package/dist/3418.creaditor.bundle.js.gz +0 -0
  17. package/dist/3778.creaditor.bundle.js +1 -0
  18. package/dist/3778.creaditor.bundle.js.gz +0 -0
  19. package/dist/3792.creaditor.bundle.js +1 -0
  20. package/dist/3792.creaditor.bundle.js.gz +0 -0
  21. package/dist/4061.creaditor.bundle.js +1 -1
  22. package/dist/4061.creaditor.bundle.js.gz +0 -0
  23. package/dist/4288.creaditor.bundle.js +10 -10
  24. package/dist/4288.creaditor.bundle.js.gz +0 -0
  25. package/dist/4639.creaditor.bundle.js +1 -1
  26. package/dist/4639.creaditor.bundle.js.gz +0 -0
  27. package/dist/4739.creaditor.bundle.js +1 -1
  28. package/dist/4739.creaditor.bundle.js.gz +0 -0
  29. package/dist/4762.creaditor.bundle.js +3 -3
  30. package/dist/4762.creaditor.bundle.js.gz +0 -0
  31. package/dist/4770.creaditor.bundle.js +3 -3
  32. package/dist/4770.creaditor.bundle.js.gz +0 -0
  33. package/dist/4970.creaditor.bundle.js +2 -2
  34. package/dist/4970.creaditor.bundle.js.gz +0 -0
  35. package/dist/5119.creaditor.bundle.js +2 -2
  36. package/dist/5119.creaditor.bundle.js.gz +0 -0
  37. package/dist/5340.creaditor.bundle.js +19 -18
  38. package/dist/5340.creaditor.bundle.js.gz +0 -0
  39. package/dist/5884.creaditor.bundle.js +91 -0
  40. package/dist/5884.creaditor.bundle.js.gz +0 -0
  41. package/dist/6151.creaditor.bundle.js +1 -1
  42. package/dist/6151.creaditor.bundle.js.gz +0 -0
  43. package/dist/638.creaditor.bundle.js +49 -20
  44. package/dist/638.creaditor.bundle.js.gz +0 -0
  45. package/dist/6713.creaditor.bundle.js +1 -1
  46. package/dist/6713.creaditor.bundle.js.gz +0 -0
  47. package/dist/6814.creaditor.bundle.js +1 -1
  48. package/dist/6814.creaditor.bundle.js.gz +0 -0
  49. package/dist/7209.creaditor.bundle.js +98 -56
  50. package/dist/7209.creaditor.bundle.js.gz +0 -0
  51. package/dist/7564.creaditor.bundle.js +1 -1
  52. package/dist/7564.creaditor.bundle.js.gz +0 -0
  53. package/dist/7937.creaditor.bundle.js +4 -1
  54. package/dist/7937.creaditor.bundle.js.gz +0 -0
  55. package/dist/8250.creaditor.bundle.js +1 -1
  56. package/dist/8250.creaditor.bundle.js.gz +0 -0
  57. package/dist/8646.creaditor.bundle.js +20 -24
  58. package/dist/8646.creaditor.bundle.js.gz +0 -0
  59. package/dist/8654.creaditor.bundle.js +7 -7
  60. package/dist/8654.creaditor.bundle.js.gz +0 -0
  61. package/dist/9041.creaditor.bundle.js +13 -15
  62. package/dist/9041.creaditor.bundle.js.gz +0 -0
  63. package/dist/9431.creaditor.bundle.js +1 -1
  64. package/dist/9431.creaditor.bundle.js.gz +0 -0
  65. package/dist/9694.creaditor.bundle.js +1 -1
  66. package/dist/9694.creaditor.bundle.js.gz +0 -0
  67. package/dist/creaditor.bundle.js +968 -583
  68. package/dist/creaditor.bundle.js.gz +0 -0
  69. package/dist/service-worker.js +1 -1
  70. package/dist/service-worker.js.gz +0 -0
  71. package/package.json +1 -1
@@ -1 +1 @@
1
- "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[1142],{41142(e,t,n){n.d(t,{default:()=>b});const o=e=>{{const{component:t,commands:n,helpers:o}=e,s=t.parent("col");return{select:e=>{let{changeTab:t,tab:n}=e},tabs:e=>{const t=[{text:"design"},{text:"animations"},{text:"settings"}];return t.forEach(t=>t.selected=t.selected=t.text===e),t},layout:e=>{let{tab:r,changeTab:a,tabs:i}=e;const l=[{type:"input",title:"add_urlAddress_from_media_site",active:()=>"design"===r.text,value:t.props.url||"",onChange:e=>{let t=e.target.value;if(-1!==t.indexOf("youtube.com/shorts/")){const e=t.split("/");e.length>0&&(t=`https://youtu.be/${e[e.length-1]}`)}n.execCommand("url",t)}},{type:"divider",active:()=>"design"===r.text},{type:"fontSize",title:"size",min:10,active:()=>"design"===r.text,max:s?.element?.offsetWidth,value:parseInt(t.props.style.width),device:e=>{if("phone"===e.target.device){const n=t.props?.breakpoints?.sm?.style?.width||t.props.style.width;e.target.value=parseInt(n)}else e.target.value=parseInt(t.props.style.width)},onInput:e=>{const t=e.target.value;"phone"===e.target.device?n.execCommand("breakpoints",e=>{const n=e.props.breakpoints?.sm||{};return{sm:o.deepMerge(n,{style:{width:t+"px",height:e.props.isCircle?t+"px":"auto"}})}}):n.execCommand("style",e=>({width:t+"px",height:e.props.isCircle?t+"px":"auto"}))}},{type:"divider"},{type:"divider",active:()=>"design"===r.text}];return l}}}};var s=n(52144);const r=()=>({set:(e,t,n)=>{switch(t){case"url":return e[t]=n,!0;case"style":if("object"==typeof n)return n.width&&(n.height=parseFloat(n.width)/1.8+"px"),e[t]=(0,s.A)(e[t],n),!0}}});var a=n(72591),i=n.n(a),l=n(88639),c=n.n(l),p=n(88128),d=n.n(p),h=n(30855),u=n.n(h),A=n(93051),m=n.n(A),g=n(51115),v={};v.setAttributes=u(),v.insert=d().bind(null,"head"),v.domAPI=c(),v.insertStyleElement=m();i()(g.A,v);const y=g.A&&g.A.locals?g.A.locals:void 0;n(15284);const C="video";const b=()=>({name:C,create:e=>{const{createElement:t,compose:n,helpers:s}=e,{arrayToString:a,mergeDiff:i}=s,l=document.createElement("div");l.classList.add(y.root);const c=document.createElement("div");c.classList.add(y.cover);const p=document.createElement("cdtr-media-player");return l.append(p,c),l.addEventListener("click",()=>{p.playing=!1}),t({name:C,id:n.id,template:l,defaultProps:{style:{height:"auto",width:"400px",height:"300px",playing:!1,loop:!1,light:!1,controls:!0,autoPlay:!1,muted:!1,url:"https://www.youtube.com/watch?v=04Or_U9OexU"}},draggable:{group:"element"},droppable:{group:"element"},render:e=>{p.url=n.props.url,i(p,{style:n.props.style}),p.width=n.props.style.width,p.height=n.props.style.height},atomElement:p,resizeable:()=>l,handleBar:!0,validator:r(),schema:n.schema,onSelect:e=>{p.classList.add(e)},onDeselect:e=>{p.classList.remove(e)},elementProps:n,remove:()=>{l.remove()},createEditor:o})}})},51115(e,t,n){n.d(t,{A:()=>i});var o=n(82001),s=n.n(o),r=n(40935),a=n.n(r)()(s());a.push([e.id,".BaT92HY5C7Gxgg9C1_pc {\n position: relative;\n max-width: 100%;\n}\n.aybkK2AXl8f2XctkkRjJ {\n width: 100%;\n height: 100%;\n left: 0;\n top: 0;\n position: absolute;\n opacity: 0.6;\n}\n\n.BaT92HY5C7Gxgg9C1_pc:hover .aybkK2AXl8f2XctkkRjJ {\n display: block;\n background-color: var(--primary);\n}\n","",{version:3,sources:["webpack://./../web-editors/video-editor-component/lib/style.module.css"],names:[],mappings:"AAAA;EACE,kBAAkB;EAClB,eAAe;AACjB;AACA;EACE,WAAW;EACX,YAAY;EACZ,OAAO;EACP,MAAM;EACN,kBAAkB;EAClB,YAAY;AACd;;AAEA;EACE,cAAc;EACd,gCAAgC;AAClC",sourcesContent:[".root {\n position: relative;\n max-width: 100%;\n}\n.cover {\n width: 100%;\n height: 100%;\n left: 0;\n top: 0;\n position: absolute;\n opacity: 0.6;\n}\n\n.root:hover .cover {\n display: block;\n background-color: var(--primary);\n}\n"],sourceRoot:""}]),a.locals={root:"BaT92HY5C7Gxgg9C1_pc",cover:"aybkK2AXl8f2XctkkRjJ"};const i=a}}]);
1
+ "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[1142],{41142(e,t,n){n.d(t,{default:()=>b});const o=e=>{{const{component:t,commands:n,helpers:o}=e,s=t.parent("col");return{select:e=>{let{changeTab:t,tab:n}=e},tabs:e=>{const t=[{text:"style"},{text:"animations"},{text:"settings"}];return t.forEach(t=>t.selected=t.selected=t.text===e),t},layout:e=>{let{tab:r,changeTab:a,tabs:i}=e;const l=[{type:"input",title:"add_urlAddress_from_media_site",active:()=>"style"===r.text,value:t.props.url||"",onChange:e=>{let t=e.target.value;if(-1!==t.indexOf("youtube.com/shorts/")){const e=t.split("/");e.length>0&&(t=`https://youtu.be/${e[e.length-1]}`)}n.execCommand("url",t)}},{type:"divider",active:()=>"style"===r.text},{type:"fontSize",title:"size",min:10,active:()=>"style"===r.text,max:s?.element?.offsetWidth,value:parseInt(t.props.style.width),device:e=>{if("phone"===e.target.device){const n=t.props?.breakpoints?.sm?.style?.width||t.props.style.width;e.target.value=parseInt(n)}else e.target.value=parseInt(t.props.style.width)},onInput:e=>{const t=e.target.value;"phone"===e.target.device?n.execCommand("breakpoints",e=>{const n=e.props.breakpoints?.sm||{};return{sm:o.deepMerge(n,{style:{width:t+"px",height:e.props.isCircle?t+"px":"auto"}})}}):n.execCommand("style",e=>({width:t+"px",height:e.props.isCircle?t+"px":"auto"}))}},{type:"divider"},{type:"divider",active:()=>"style"===r.text}];return l}}}};var s=n(52144);const r=()=>({set:(e,t,n)=>{switch(t){case"url":return e[t]=n,!0;case"style":if("object"==typeof n)return n.width&&(n.height=parseFloat(n.width)/1.8+"px"),e[t]=(0,s.A)(e[t],n),!0}}});var a=n(72591),i=n.n(a),l=n(88639),c=n.n(l),p=n(88128),d=n.n(p),h=n(30855),u=n.n(h),A=n(93051),m=n.n(A),y=n(51115),g={};g.setAttributes=u(),g.insert=d().bind(null,"head"),g.domAPI=c(),g.insertStyleElement=m();i()(y.A,g);const v=y.A&&y.A.locals?y.A.locals:void 0;n(15284);const C="video";const b=()=>({name:C,create:e=>{const{createElement:t,compose:n,helpers:s}=e,{arrayToString:a,mergeDiff:i}=s,l=document.createElement("div");l.classList.add(v.root);const c=document.createElement("div");c.classList.add(v.cover);const p=document.createElement("cdtr-media-player");return l.append(p,c),l.addEventListener("click",()=>{p.playing=!1}),t({name:C,id:n.id,template:l,defaultProps:{style:{height:"auto",width:"400px",height:"300px",playing:!1,loop:!1,light:!1,controls:!0,autoPlay:!1,muted:!1,url:"https://www.youtube.com/watch?v=04Or_U9OexU"}},draggable:{group:"element"},droppable:{group:"element"},render:e=>{p.url=n.props.url,i(p,{style:n.props.style}),p.width=n.props.style.width,p.height=n.props.style.height},atomElement:p,resizeable:()=>l,handleBar:!0,validator:r(),schema:n.schema,onSelect:e=>{p.classList.add(e)},onDeselect:e=>{p.classList.remove(e)},elementProps:n,remove:()=>{l.remove()},createEditor:o})}})},51115(e,t,n){n.d(t,{A:()=>i});var o=n(82001),s=n.n(o),r=n(40935),a=n.n(r)()(s());a.push([e.id,".BaT92HY5C7Gxgg9C1_pc {\n position: relative;\n max-width: 100%;\n}\n.aybkK2AXl8f2XctkkRjJ {\n width: 100%;\n height: 100%;\n left: 0;\n top: 0;\n position: absolute;\n opacity: 0.6;\n}\n\n.BaT92HY5C7Gxgg9C1_pc:hover .aybkK2AXl8f2XctkkRjJ {\n display: block;\n background-color: var(--primary);\n}\n","",{version:3,sources:["webpack://./../web-editors/video-editor-component/lib/style.module.css"],names:[],mappings:"AAAA;EACE,kBAAkB;EAClB,eAAe;AACjB;AACA;EACE,WAAW;EACX,YAAY;EACZ,OAAO;EACP,MAAM;EACN,kBAAkB;EAClB,YAAY;AACd;;AAEA;EACE,cAAc;EACd,gCAAgC;AAClC",sourcesContent:[".root {\n position: relative;\n max-width: 100%;\n}\n.cover {\n width: 100%;\n height: 100%;\n left: 0;\n top: 0;\n position: absolute;\n opacity: 0.6;\n}\n\n.root:hover .cover {\n display: block;\n background-color: var(--primary);\n}\n"],sourceRoot:""}]),a.locals={root:"BaT92HY5C7Gxgg9C1_pc",cover:"aybkK2AXl8f2XctkkRjJ"};const i=a}}]);
Binary file
@@ -1,4 +1,4 @@
1
- "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[1260],{91260(t,e,o){o.r(e),o.d(e,{BlockEditor:()=>g});var r=o(59929),i=o(86319),n=o(36565),a=o(49937),s=o(83235);const d=JSON.parse('["3g2","3gp","aaf","asf","avchd","avi","drc","flv","m2v","m3u8","m4p","m4v","mkv","mng","mov","mp2","mp4","mpe","mpeg","mpg","mpv","mxf","nsv","ogg","ogv","qt","rm","rmvb","roq","svi","vob","webm","wmv","yuv"]');var c=o(9334),l=o(96374);const p=[{id:"video-background",name:"video",thumb:"https://i.ytimg.com/vi/RhlQvbvMg-0/hqdefault.jpg?sqp=-oaymwEWCKgBEF5IWvKriqkDCQgBFQAAiEIYAQ==&rs=AOn4CLCKBaHlpHj3ghOXWjB2br9kHjPg7w",group:["section-component"],type:"video",preset:{installed:!1,component:"cdtr-background-video",properties:{type:"video",url:"https://www.youtube.com/watch?v=RhlQvbvMg-0",loop:!0,volume:0,controls:0,muted:!0,playing:!0,config:{playerVars:{showinfo:0,controls:0,playsinline:0}},style:{zIndex:0,width:window.innerWidth+500,height:window.innerWidth-560,pointerEvents:"none",transform:"translate(-10%,-0%)"}}}},{id:"images-background",name:"some-images",thumb:"http://demos.creative-tim.com/paper-kit-2/assets/img/antoine-barres.jpg",group:["section-component"],type:"images",preset:{tags:[],installed:!1,type:"images",component:"cdtr-images-preset",properties:{src:"http://demos.creative-tim.com/paper-kit-2/assets/img/antoine-barres.jpg,https://images.pexels.com/photos/1408221/pexels-photo-1408221.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1",style:{backgroundAttachment:"local",backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"cover"}}}}];o(12258),o(15155);o.e(4217).then(o.bind(o,94217));class g extends r.WF{constructor(t){super(),this.onChangeBakgroundExpanding=t=>{const e=t.target.checked;n.Ay.store().execCommand("expand_image_for_outlook",!e)},this.getInnerBlocks=()=>{const t=[],e=this.component.parent();return e&&"section"===e.type?(e.children.forEach(e=>{const o=i.M.get("components",e);o&&"block"===o.type&&t.push(o)}),t):[this.component]},this.onChangeWidth=this.onChangeWidth.bind(this),this.getInnerBlocks=this.getInnerBlocks.bind(this),this.isBackgroundImage=!1,this.backgroundVideo="",this.galleryOpened=!1,this._sectionsExpanded=!1,this.onChangeBakgroundExpanding=this.onChangeBakgroundExpanding.bind(this);const e=i.M.get("config","channel");this.tabs=[{text:"background"},{text:"design",selected:!0},..."web"===e?[{text:"animations"}]:[],{text:"settings"}],this.tabName="design",this.maxWidth=0,this.background="",this.padding={topValue:0,bottomValue:0,leftValue:0,rightValue:0},this.margin={topValue:0,bottomValue:0},this.borderStyle="solid",this.borderWidth=0,this.borderColor="#000",this.theme=i.M.get("theme"),this.connectWith=this.connectWith.bind(this),this.cmds={onchangeRadius:t=>{n.Ay.store().execCommand("style",{...t.target.json})},toggleResponsive:t=>{this.noResponsive=!t.target.checked,n.Ay.store().execCommand("noResponsive",this.noResponsive)},onChangeBorderStyle:t=>{this.borderStyle=t.target.borderStyle||"",this.borderWidth=t.target.borderWidth||1,this.borderColor=t.target.borderColor||"#000",this.borderRadius=t.target.borderRadius||0;t.target.json;n.Ay.store().execCommand("style",{borderStyle:this.borderStyle,borderColor:this.borderColor,borderTopWidth:t.target.borderTopWidth||"0px",borderBottomWidth:t.target.borderBottomWidth||"0px",borderLeftWidth:t.target.borderLeftWidth||"0px",borderRightWidth:t.target.borderRightWidth||"0px",borderTopRightRadius:parseInt(t.target.borderTopRightRadius||0)+"px",borderTopLeftRadius:parseInt(t.target.borderTopLeftRadius||0)+"px",borderBottomRightRadius:parseInt(t.target.borderBottomRightRadius||0)+"px",borderBottomLeftRadius:parseInt(t.target.borderBottomLeftRadius||0)+"px",borderRadius:null})},onRemoveBackgroundVideo:()=>{this.backgroundVideo="",this.backgroundInstance={},n.Ay.store().execCommand("background","transparent")},onChangeBackgroundVideo:t=>{const e=t.target.value;let o;if((0,s.A)(e)){const t=p.find(t=>"images"===t.type);t.preset.properties.src=e,o=t.preset}else if(function(t){const e=(/(?:\.([^.]+))?$/.exec(t.toLowerCase())??[])[1]??"";return-1!==d.findIndex(t=>t===e)}(e));else if(function(t){if(t&&t.match(/^(?:https?:\/\/)?(?:m\.|www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/))return!0;return!1}(e)){const t=p.find(t=>"video"===t.type);t.preset.properties.url=e,delete t.preset.properties.videoPath,o=t.preset}o&&(n.Ay.store().execCommand("background",JSON.parse(JSON.stringify(o))),n.Ay.store().execCommand("style",{background:null})),this.backgroundVideo=e},onChangeImage:t=>{const e=t.detail,o=[];Array.isArray(e)?e.forEach(t=>o.push(t.src)):o.push(e.src),this.cmds.onChangeBackgroundVideo({target:{value:o.join(",")}}),this.galleryOpened=!1},onChangeHeight:t=>{const e=t.target.value;n.Ay.store().execCommand("style",{height:e+"%"}),this.height=e},onChangeMargin:t=>{const e=t.target.value,o=t.target.direction;"all"===o?(n.Ay.store().execCommand("style",{marginTop:e+"px",marginBottom:e+"px"}),this.margin={topValue:e,bottomValue:e}):n.Ay.store().execCommand("style",{[(0,c.A)(`margin-${o.toLowerCase()}`)]:e+"px"})},onChangePadding:t=>{const e=t.target.value,o=t.target.direction,r=(0,c.A)(`padding-${o.toLowerCase()}`);"all"===o?(n.Ay.store().execCommand("style",{padding:null,"padding-top":null,"padding-bottom":null,"padding-left":null,"padding-right":null,paddingTop:e+"px",paddingBottom:e+"px",paddingLeft:e+"px",paddingRight:e+"px","padding-right":null,"padding-left":null,"padding-top":null,"padding-bottom":null}),this.padding={topValue:e,bottomValue:e,leftValue:e,rightValue:e}):(n.Ay.store().execCommand("style",{[r]:e+"px",[`padding-${o.toLowerCase()}`]:null}),this.props.style={[r]:e+"px"},this[`padding${o.toLowerCase()}`]=e)},onChangebackground(t){const e=t.target.value;this.background=e;n.Ay.components.forEach(t=>{const o=t.find("text");if(o&&!o.closest("card")){let t=o.tiptap.getAttributes("textStyle").color;if(!t){const e=o.element.querySelector("p,h1,h2,h3,h4,h5,h6");e&&(t=window.getComputedStyle(e).color)}if(t){if("transparent"===t)return;if(!t.includes("var(--")&&!e.includes("var(--")&&"transparent"!==e&&"rgba(0, 0, 0, 0)"!==e&&"rgb(0, 0, 0)"!==e){const r=(0,l.w)(t,e);o.tiptap.chain().selectAll().setColor(r).run()}}}}),n.Ay.store().execCommand("style",{background:e,backgroundColor:null});"web"!==i.M.get("config","channel")&&n.Ay.store().execCommand("background",null)}}}onChangeImageBackgroundProp(t){const e=t.detail,{key:o,value:r}=e;if(this.props.background){const t=JSON.parse(JSON.stringify(this.props.background)),e=t.properties;if(!e.style[o])throw new Error(`${o} is not a valid property`);e.style[o]=r,n.Ay.store().execCommand("background",t)}}connectedCallback(){super.connectedCallback(),this.connectWith(),n.Ay.on("update",this.connectWith)}disconnectedCallback(){super.disconnectedCallback(),n.Ay.off("update",this.connectWith)}onChangeWidth(t){let e=t.target.value;e<500&&(e=500),e>1e3&&(e=1e3);const o=this.getInnerBlocks();n.Ay.store().execCommand2({transactions:[{key:"style",value:{width:e+"px",maxWidth:"100%"}}],update:[...o]}),this.maxWidth=e}connectWith(){const t=n.Ay.components[n.Ay.components.length-1];if(this.component=t,t&&"block"===t.type){this.props=t.props;let{style:e}=this.props;e||(e={}),t.props||(t.props={}),t.props.style||(t.props.style={}),this.expand_image_for_outlook=!!t.props.expand_image_for_outlook,this.boxShadow=t.props.style.boxShadow,this.borderStyle=t.props.style.borderStyle,this.borderWidth=t.props.style.borderWidth,this.borderTopRightRadius=parseInt(t.props.style.borderTopRightRadius),this.borderTopLeftRadius=parseInt(t.props.style.borderTopLeftRadius),this.borderBottomRightRadius=parseInt(t.props.style.borderBottomRightRadius),this.borderBottomLeftRadius=parseInt(t.props.style.borderBottomLeftRadius),this.borderTopWidth=parseInt(t.props.style.borderTopWidth),this.borderBottomWidth=parseInt(t.props.style.borderBottomWidth),this.borderLeftWidth=parseInt(t.props.style.borderLeftWidth),this.borderRightWidth=parseInt(t.props.style.borderRightWidth),this.borderColor=t.props.style.borderColor;const o=t.props.background;if(this.isBackgroundImage="images"===o?.type,this.noResponsive=!!t.props.noResponsive,this.modalable=!!t.props.modalable,this.modalName=t.props.modalName||"",this.isBackgroundImage){const t=o.properties;this.backgroundAttachment=t.style.backgroundAttachment,this.backgroundPosition=t.style.backgroundPosition,this.backgroundRepeat=t.style.backgroundRepeat,this.backgroundSize=t.style.backgroundSize}this.backgroundInstance=o,this.backgroundVideo=o?.properties?.src||o?.properties?.url||"";const r=t.element,i=window.getComputedStyle(r);this.maxWidth=parseInt(i.width),this.width=parseInt(e.width,10)||this.maxWidth,this.background=e.background||e.backgroundImage||i.backgroundColor,e.backgroundImage&&(this.background=`url(${e.backgroundImage})`),this.padding={topValue:parseInt(i.paddingTop),bottomValue:parseInt(i.paddingBottom),leftValue:parseInt(i.paddingLeft),rightValue:parseInt(i.paddingRight)},this.margin={topValue:parseInt(i.marginTop),bottomValue:parseInt(i.marginBottom)}}}changeTab(t){this.tabName=t.target.value}_toggleModalable(t){this.modalable=t,n.Ay.store().execCommand("modalable",this.modalable)}_setModalName(t){this.modalName=t,n.Ay.store().execCommand("modalName",t)}_onToggleAll(){this._sectionsExpanded=!this._sectionsExpanded,this.shadowRoot.querySelectorAll("cdtr-editor-section").forEach(t=>{t.open=this._sectionsExpanded})}render(){const t=i.M.get("config","channel");return r.qy`
1
+ "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[1260],{91260(t,e,o){o.r(e),o.d(e,{BlockEditor:()=>g});var r=o(59929),i=o(86319),a=o(36565),n=o(49937),s=o(83235);const d=JSON.parse('["3g2","3gp","aaf","asf","avchd","avi","drc","flv","m2v","m3u8","m4p","m4v","mkv","mng","mov","mp2","mp4","mpe","mpeg","mpg","mpv","mxf","nsv","ogg","ogv","qt","rm","rmvb","roq","svi","vob","webm","wmv","yuv"]');var l=o(9334),c=o(96374);const p=[{id:"video-background",name:"video",thumb:"https://i.ytimg.com/vi/RhlQvbvMg-0/hqdefault.jpg?sqp=-oaymwEWCKgBEF5IWvKriqkDCQgBFQAAiEIYAQ==&rs=AOn4CLCKBaHlpHj3ghOXWjB2br9kHjPg7w",group:["section-component"],type:"video",preset:{installed:!1,component:"cdtr-background-video",properties:{type:"video",url:"https://www.youtube.com/watch?v=RhlQvbvMg-0",loop:!0,volume:0,controls:0,muted:!0,playing:!0,config:{playerVars:{showinfo:0,controls:0,playsinline:0}},style:{zIndex:0,width:window.innerWidth+500,height:window.innerWidth-560,pointerEvents:"none",transform:"translate(-10%,-0%)"}}}},{id:"images-background",name:"some-images",thumb:"http://demos.creative-tim.com/paper-kit-2/assets/img/antoine-barres.jpg",group:["section-component"],type:"images",preset:{tags:[],installed:!1,type:"images",component:"cdtr-images-preset",properties:{src:"http://demos.creative-tim.com/paper-kit-2/assets/img/antoine-barres.jpg,https://images.pexels.com/photos/1408221/pexels-photo-1408221.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1",style:{backgroundAttachment:"local",backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"cover"}}}}];o(12258),o(15155);o.e(4217).then(o.bind(o,94217));class g extends r.WF{constructor(t){super(),this.onChangeBakgroundExpanding=t=>{const e=t.target.checked;a.Ay.store().execCommand("expand_image_for_outlook",!e)},this.getInnerBlocks=()=>{const t=[],e=this.component.parent();return e&&"section"===e.type?(e.children.forEach(e=>{const o=i.M.get("components",e);o&&"block"===o.type&&t.push(o)}),t):[this.component]},this.onChangeWidth=this.onChangeWidth.bind(this),this.getInnerBlocks=this.getInnerBlocks.bind(this),this.isBackgroundImage=!1,this.backgroundVideo="",this.galleryOpened=!1,this._sectionsExpanded=!1,this.onChangeBakgroundExpanding=this.onChangeBakgroundExpanding.bind(this);const e=i.M.get("config","channel");this.tabs=[{text:"background"},{text:"style",selected:!0},..."web"===e?[{text:"animations"}]:[],{text:"settings"}],this.tabName="style",this.maxWidth=0,this.background="",this.padding={topValue:0,bottomValue:0,leftValue:0,rightValue:0},this.margin={topValue:0,bottomValue:0},this.borderStyle="solid",this.borderWidth=0,this.borderColor="#000",this.theme=i.M.get("theme"),this.connectWith=this.connectWith.bind(this),this.cmds={onchangeRadius:t=>{a.Ay.store().execCommand("style",{...t.target.json})},toggleResponsive:t=>{this.noResponsive=!t.target.checked,a.Ay.store().execCommand("noResponsive",this.noResponsive)},onChangeBorderStyle:t=>{this.borderStyle=t.target.borderStyle||"",this.borderWidth=t.target.borderWidth||1,this.borderColor=t.target.borderColor||"#000",this.borderRadius=t.target.borderRadius||0;t.target.json;a.Ay.store().execCommand("style",{borderStyle:this.borderStyle,borderColor:this.borderColor,borderTopWidth:t.target.borderTopWidth||"0px",borderBottomWidth:t.target.borderBottomWidth||"0px",borderLeftWidth:t.target.borderLeftWidth||"0px",borderRightWidth:t.target.borderRightWidth||"0px",borderTopRightRadius:parseInt(t.target.borderTopRightRadius||0)+"px",borderTopLeftRadius:parseInt(t.target.borderTopLeftRadius||0)+"px",borderBottomRightRadius:parseInt(t.target.borderBottomRightRadius||0)+"px",borderBottomLeftRadius:parseInt(t.target.borderBottomLeftRadius||0)+"px",borderRadius:null})},onRemoveBackgroundVideo:()=>{this.backgroundVideo="",this.backgroundInstance={},a.Ay.store().execCommand("background","transparent")},onChangeBackgroundVideo:t=>{const e=t.target.value;let o;if((0,s.A)(e)){const t=p.find(t=>"images"===t.type);t.preset.properties.src=e,o=t.preset}else if(function(t){const e=(/(?:\.([^.]+))?$/.exec(t.toLowerCase())??[])[1]??"";return-1!==d.findIndex(t=>t===e)}(e));else if(function(t){if(t&&t.match(/^(?:https?:\/\/)?(?:m\.|www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/))return!0;return!1}(e)){const t=p.find(t=>"video"===t.type);t.preset.properties.url=e,delete t.preset.properties.videoPath,o=t.preset}o&&(a.Ay.store().execCommand("background",JSON.parse(JSON.stringify(o))),a.Ay.store().execCommand("style",{background:null})),this.backgroundVideo=e},onChangeImage:t=>{const e=t.detail,o=[];Array.isArray(e)?e.forEach(t=>o.push(t.src)):o.push(e.src),this.cmds.onChangeBackgroundVideo({target:{value:o.join(",")}}),this.galleryOpened=!1},onChangeHeight:t=>{const e=t.target.value;a.Ay.store().execCommand("style",{height:e+"%"}),this.height=e},onChangeMargin:t=>{const e=t.target.value,o=t.target.direction;"all"===o?(a.Ay.store().execCommand("style",{marginTop:e+"px",marginBottom:e+"px"}),this.margin={topValue:e,bottomValue:e}):a.Ay.store().execCommand("style",{[(0,l.A)(`margin-${o.toLowerCase()}`)]:e+"px"})},onChangePadding:t=>{const e=t.target.value,o=t.target.direction,r=(0,l.A)(`padding-${o.toLowerCase()}`);"all"===o?(a.Ay.store().execCommand("style",{padding:null,"padding-top":null,"padding-bottom":null,"padding-left":null,"padding-right":null,paddingTop:e+"px",paddingBottom:e+"px",paddingLeft:e+"px",paddingRight:e+"px","padding-right":null,"padding-left":null,"padding-top":null,"padding-bottom":null}),this.padding={topValue:e,bottomValue:e,leftValue:e,rightValue:e}):(a.Ay.store().execCommand("style",{[r]:e+"px",[`padding-${o.toLowerCase()}`]:null}),this.props.style={[r]:e+"px"},this[`padding${o.toLowerCase()}`]=e)},onChangebackground(t){const e=t.target.value;this.background=e;a.Ay.components.forEach(t=>{const o=t.find("text");if(o&&!o.closest("card")){let t=o.tiptap.getAttributes("textStyle").color;if(!t){const e=o.element.querySelector("p,h1,h2,h3,h4,h5,h6");e&&(t=window.getComputedStyle(e).color)}if(t){if("transparent"===t)return;if(!t.includes("var(--")&&!e.includes("var(--")&&"transparent"!==e&&"rgba(0, 0, 0, 0)"!==e&&"rgb(0, 0, 0)"!==e){const r=(0,c.w)(t,e);o.tiptap.chain().selectAll().setColor(r).run()}}}}),a.Ay.store().execCommand("style",{background:e,backgroundColor:null});"web"!==i.M.get("config","channel")&&a.Ay.store().execCommand("background",null)}}}onChangeImageBackgroundProp(t){const e=t.detail,{key:o,value:r}=e;if(this.props.background){const t=JSON.parse(JSON.stringify(this.props.background)),e=t.properties;if(!e.style[o])throw new Error(`${o} is not a valid property`);e.style[o]=r,a.Ay.store().execCommand("background",t)}}connectedCallback(){super.connectedCallback(),this.connectWith(),a.Ay.on("update",this.connectWith)}disconnectedCallback(){super.disconnectedCallback(),a.Ay.off("update",this.connectWith)}onChangeWidth(t){let e=t.target.value;e<500&&(e=500),e>1e3&&(e=1e3);const o=this.getInnerBlocks();a.Ay.store().execCommand2({transactions:[{key:"style",value:{width:e+"px",maxWidth:"100%"}}],update:[...o]}),this.maxWidth=e}connectWith(){const t=a.Ay.components[a.Ay.components.length-1];if(this.component=t,t&&"block"===t.type){this.props=t.props;let{style:e}=this.props;e||(e={}),t.props||(t.props={}),t.props.style||(t.props.style={}),this.expand_image_for_outlook=!!t.props.expand_image_for_outlook,this.boxShadow=t.props.style.boxShadow,this.borderStyle=t.props.style.borderStyle,this.borderWidth=t.props.style.borderWidth,this.borderTopRightRadius=parseInt(t.props.style.borderTopRightRadius),this.borderTopLeftRadius=parseInt(t.props.style.borderTopLeftRadius),this.borderBottomRightRadius=parseInt(t.props.style.borderBottomRightRadius),this.borderBottomLeftRadius=parseInt(t.props.style.borderBottomLeftRadius),this.borderTopWidth=parseInt(t.props.style.borderTopWidth),this.borderBottomWidth=parseInt(t.props.style.borderBottomWidth),this.borderLeftWidth=parseInt(t.props.style.borderLeftWidth),this.borderRightWidth=parseInt(t.props.style.borderRightWidth),this.borderColor=t.props.style.borderColor;const o=t.props.background;if(this.isBackgroundImage="images"===o?.type,this.noResponsive=!!t.props.noResponsive,this.modalable=!!t.props.modalable,this.modalName=t.props.modalName||"",this.popupTrigger=t.props.popupTrigger||"button",this.popupDelay=null==t.props.popupDelay?3:t.props.popupDelay,this._rebuildTabs(),this.isBackgroundImage){const t=o.properties;this.backgroundAttachment=t.style.backgroundAttachment,this.backgroundPosition=t.style.backgroundPosition,this.backgroundRepeat=t.style.backgroundRepeat,this.backgroundSize=t.style.backgroundSize}this.backgroundInstance=o,this.backgroundVideo=o?.properties?.src||o?.properties?.url||"";const r=t.element,i=window.getComputedStyle(r);this.maxWidth=parseInt(i.width),this.width=parseInt(e.width,10)||this.maxWidth,this.background=e.background||e.backgroundImage||i.backgroundColor,e.backgroundImage&&(this.background=`url(${e.backgroundImage})`),this.padding={topValue:parseInt(i.paddingTop),bottomValue:parseInt(i.paddingBottom),leftValue:parseInt(i.paddingLeft),rightValue:parseInt(i.paddingRight)},this.margin={topValue:parseInt(i.marginTop),bottomValue:parseInt(i.marginBottom)}}}changeTab(t){this.tabName=t.target.value}_toggleModalable(t){this.modalable=t,a.Ay.store().execCommand("modalable",this.modalable),this.tabName=t?"popup":"style",this._rebuildTabs()}_rebuildTabs(){const t=i.M.get("config","channel"),e="web"===t&&this.modalable,o=[{text:"background"},{text:"style"},..."web"===t?[{text:"animations"}]:[],{text:"settings"},...e?[{text:"popup"}]:[]];let r=this.tabName;o.some(t=>t.text===r)||(r=e?"popup":"style"),o.forEach(t=>t.selected=t.text===r),this.tabName=r,this.tabs=o}_setModalName(t){this.modalName=t,a.Ay.store().execCommand("modalName",t)}_setPopupTrigger(t){this.popupTrigger=t,a.Ay.store().execCommand("popupTrigger",t)}_setPopupDelay(t){const e=Math.max(0,parseInt(t,10)||0);this.popupDelay=e,a.Ay.store().execCommand("popupDelay",e)}_onToggleAll(){this._sectionsExpanded=!this._sectionsExpanded,this.shadowRoot.querySelectorAll("cdtr-editor-section").forEach(t=>{t.open=this._sectionsExpanded})}render(){const t=i.M.get("config","channel");return r.qy`
2
2
  <cdtr-editor-tabs .tabs=${this.tabs} @tabChanged=${this.changeTab}>
3
3
  <div slot="content">
4
4
  <div style="display:flex;justify-content:flex-start;padding:12px 16px 4px;">
@@ -33,7 +33,7 @@
33
33
  ></lang-text></paper-button>
34
34
  <paper-button
35
35
  class="backgrounds"
36
- @click=${()=>a.A.dispatch("open_add_menu",{type:"backgrounds",disabledOptions:!0,target:n.Ay.components[0]})}
36
+ @click=${()=>n.A.dispatch("open_add_menu",{type:"backgrounds",disabledOptions:!0,target:a.Ay.components[0]})}
37
37
  ><lang-text
38
38
  text="backgrounds"
39
39
  ></lang-text></paper-button>
@@ -78,7 +78,7 @@
78
78
  ></lang-text>
79
79
  </h6>
80
80
  </cdtr-editor-section>`:null}
81
- ${"design"===this.tabName?r.qy`
81
+ ${"style"===this.tabName?r.qy`
82
82
  <cdtr-editor-section label="backgroundColor" .open=${!0}>
83
83
  <cdtr-color-swatch-group
84
84
  .columns=${1}
@@ -165,23 +165,60 @@
165
165
  ></cdtr-checkbox>
166
166
  </cdtr-col>
167
167
  </cdtr-row>
168
- ${this.modalable?r.qy`
169
- <cdtr-title style="display:block;margin-top:8px">
170
- <lang-text text="modal_name"></lang-text>
171
- </cdtr-title>
172
- <cdtr-input
173
- style="width:100%"
174
- .value=${this.modalName||""}
175
- .placeholder=${i.M.get("lang","modal_name")||""}
176
- @change=${t=>this._setModalName(t.target.value)}
177
- ></cdtr-input>
178
- <p
179
- style="font-size:12px;color:#888;line-height:1.5;margin:4px 0 0;font-style:italic;"
180
- >
181
- <lang-text text="modal_name_hint"></lang-text>
182
- </p>
183
- `:null}
168
+ ${this.modalable?r.qy`<p
169
+ style="font-size:12px;color:#888;line-height:1.5;margin:6px 0 0;font-style:italic;"
170
+ >
171
+ <lang-text
172
+ whiteSpace="normal"
173
+ text="popup_settings_in_tab"
174
+ ></lang-text>
175
+ </p>`:null}
176
+ `:null}
177
+ </cdtr-editor-section>
178
+ `:null}
179
+
180
+ ${"popup"===this.tabName?r.qy`
181
+ <cdtr-editor-section label="modal_name" .open=${!0}>
182
+ <cdtr-input
183
+ style="width:100%"
184
+ .value=${this.modalName||""}
185
+ .placeholder=${i.M.get("lang","modal_name")||""}
186
+ @change=${t=>this._setModalName(t.target.value)}
187
+ ></cdtr-input>
188
+ </cdtr-editor-section>
189
+
190
+ <cdtr-editor-section label="popup_trigger_label" .open=${!0}>
191
+ <select
192
+ style="width:100%;padding:8px;border:1px solid var(--color-border,#e0e0e0);border-radius:8px;font:inherit;background:#fff;cursor:pointer;"
193
+ @change=${t=>this._setPopupTrigger(t.target.value)}
194
+ >
195
+ ${["button","load","delay","exit"].map(t=>r.qy`<option
196
+ value=${t}
197
+ ?selected=${this.popupTrigger===t}
198
+ >
199
+ ${i.M.get("lang","popup_trigger_"+t)||t}
200
+ </option>`)}
201
+ </select>
202
+ ${"delay"===this.popupTrigger?r.qy`
203
+ <cdtr-title style="display:block;margin-top:8px">
204
+ <lang-text text="popup_delay_label"></lang-text>
205
+ </cdtr-title>
206
+ <input
207
+ type="number"
208
+ min="0"
209
+ style="width:100%;padding:8px;border:1px solid var(--color-border,#e0e0e0);border-radius:8px;font:inherit;box-sizing:border-box;"
210
+ .value=${String(this.popupDelay)}
211
+ @change=${t=>this._setPopupDelay(t.target.value)}
212
+ />
184
213
  `:null}
214
+ <p
215
+ style="font-size:12px;color:#888;line-height:1.5;margin:8px 0 0;font-style:italic;"
216
+ >
217
+ <lang-text
218
+ whiteSpace="normal"
219
+ text="modal_name_hint"
220
+ ></lang-text>
221
+ </p>
185
222
  </cdtr-editor-section>
186
223
  `:null}
187
224
 
@@ -260,7 +297,7 @@
260
297
  paper-button.backgrounds:hover {
261
298
  background: #eaeaed;
262
299
  }
263
- `,g.properties={maxWidth:{type:Number},backgroundInstance:{type:Object},padding:{type:Object},margin:{type:Object},tabs:{type:Array},tabName:{type:String},galleryOpened:{type:Boolean},backgroundVideo:{type:String,reflect:!0},isBackgroundImage:{type:Boolean},backgroundAttachment:{type:String},backgroundPosition:{type:String},backgroundRepeat:{type:String},backgroundSize:{type:String},noResponsive:{type:Boolean},modalable:{type:Boolean},modalName:{type:String},borderStyle:{type:String},borderWidth:{type:Number},borderColor:{type:String},borderTopRightRadius:{type:Number},borderTopLeftRadius:{type:Number},borderBottomRightRadius:{type:Number},borderBottomLeftRadius:{type:Number},borderTopWidth:{type:Number},borderBottomWidth:{type:Number},borderLeftWidth:{type:Number},borderRightWidth:{type:Number},_sectionsExpanded:{type:Boolean,state:!0}},customElements.define("block-editor",g)},15155(t,e,o){o.d(e,{A:()=>a});var r=o(59929),i=o(57176);class n extends r.WF{constructor(){super(),this.items=[],this.columns=2}async openPicker(t){const e=this.shadowRoot.querySelector(`#picker-${t}`);if(!e)return;await e.updateComplete;const o=e.shadowRoot?.querySelector("color-playground");if(o)if(await o.updateComplete,"function"==typeof o.openColorpicker)o.openColorpicker();else{(o.shadowRoot?.querySelector('[role="button"]')||o.shadowRoot?.querySelector("div")||o).click()}}render(){const t=1===this.columns?"grid single-col":"grid";return r.qy`
300
+ `,g.properties={maxWidth:{type:Number},backgroundInstance:{type:Object},padding:{type:Object},margin:{type:Object},tabs:{type:Array},tabName:{type:String},galleryOpened:{type:Boolean},backgroundVideo:{type:String,reflect:!0},isBackgroundImage:{type:Boolean},backgroundAttachment:{type:String},backgroundPosition:{type:String},backgroundRepeat:{type:String},backgroundSize:{type:String},noResponsive:{type:Boolean},modalable:{type:Boolean},modalName:{type:String},popupTrigger:{type:String},popupDelay:{type:Number},borderStyle:{type:String},borderWidth:{type:Number},borderColor:{type:String},borderTopRightRadius:{type:Number},borderTopLeftRadius:{type:Number},borderBottomRightRadius:{type:Number},borderBottomLeftRadius:{type:Number},borderTopWidth:{type:Number},borderBottomWidth:{type:Number},borderLeftWidth:{type:Number},borderRightWidth:{type:Number},_sectionsExpanded:{type:Boolean,state:!0}},customElements.define("block-editor",g)},15155(t,e,o){o.d(e,{A:()=>n});var r=o(59929),i=o(57176);class a extends r.WF{constructor(){super(),this.items=[],this.columns=2}async openPicker(t){const e=this.shadowRoot.querySelector(`#picker-${t}`);if(!e)return;await e.updateComplete;const o=e.shadowRoot?.querySelector("color-playground");if(o)if(await o.updateComplete,"function"==typeof o.openColorpicker)o.openColorpicker();else{(o.shadowRoot?.querySelector('[role="button"]')||o.shadowRoot?.querySelector("div")||o).click()}}render(){const t=1===this.columns?"grid single-col":"grid";return r.qy`
264
301
  <div class="${t}">
265
302
  ${(this.items||[]).map((t,e)=>r.qy`
266
303
  <div class="swatch-item" @click=${()=>this.openPicker(e)}>
@@ -284,7 +321,7 @@
284
321
  </div>
285
322
  `)}
286
323
  </div>
287
- `}}n.styles=[i.L,r.AH`
324
+ `}}a.styles=[i.L,r.AH`
288
325
  :host {
289
326
  display: block;
290
327
  direction: var(--direction-locale, ltr);
@@ -332,12 +369,12 @@
332
369
  clip: rect(0,0,0,0);
333
370
  pointer-events: none;
334
371
  }
335
- `],n.properties={items:{type:Array},columns:{type:Number}},customElements.define("cdtr-color-swatch-group",n);const a=t=>r.qy`
372
+ `],a.properties={items:{type:Array},columns:{type:Number}},customElements.define("cdtr-color-swatch-group",a);const n=t=>r.qy`
336
373
  <cdtr-color-swatch-group
337
374
  .items=${t.items}
338
375
  .columns=${t.columns||2}
339
376
  ></cdtr-color-swatch-group>
340
- `},12258(t,e,o){o.d(e,{A:()=>a});var r=o(59929),i=o(40648);class n extends r.WF{constructor(){super(),this.label="",this.open=!0,this.persistKey=""}toggle(){this.open=!this.open,(0,i.Q)(this.persistKey,this.open)}render(){return r.qy`
377
+ `},12258(t,e,o){o.d(e,{A:()=>n});var r=o(59929),i=o(40648);class a extends r.WF{constructor(){super(),this.label="",this.open=!0,this.persistKey=""}toggle(){this.open=!this.open,(0,i.Q)(this.persistKey,this.open)}render(){return r.qy`
341
378
  <div class="section">
342
379
  <div class="header" @click=${this.toggle}>
343
380
  <span class="title"><lang-text text="${this.label}"></lang-text></span>
@@ -351,7 +388,7 @@
351
388
  </div>
352
389
  </div>
353
390
  </div>
354
- `}}n.styles=r.AH`
391
+ `}}a.styles=r.AH`
355
392
  :host {
356
393
  display: block;
357
394
  direction: var(--direction-locale, ltr);
@@ -399,7 +436,7 @@
399
436
  .content-inner {
400
437
  padding: var(--space-3) var(--space-4) var(--space-3) var(--space-4);
401
438
  }
402
- `,n.properties={label:{type:String},open:{type:Boolean},persistKey:{type:String}},customElements.define("cdtr-editor-section",n);const a=(t,e)=>r.qy`
439
+ `,a.properties={label:{type:String},open:{type:Boolean},persistKey:{type:String}},customElements.define("cdtr-editor-section",a);const n=(t,e)=>r.qy`
403
440
  <cdtr-editor-section
404
441
  .label=${t.label}
405
442
  .open=${!1!==t.open}
@@ -407,4 +444,4 @@
407
444
  >
408
445
  ${e}
409
446
  </cdtr-editor-section>
410
- `},40648(t,e,o){o.d(e,{Q:()=>a,i:()=>n});const r="cdtr:section-open";function i(){try{const t=localStorage.getItem(r);return t?JSON.parse(t):{}}catch(t){return{}}}function n(t){if(!t)return;const e=i();return Object.prototype.hasOwnProperty.call(e,t)?!!e[t]:void 0}function a(t,e){if(!t)return;const o=i();o[t]=!!e,function(t){try{localStorage.setItem(r,JSON.stringify(t))}catch(t){}}(o)}}}]);
447
+ `},40648(t,e,o){o.d(e,{Q:()=>n,i:()=>a});const r="cdtr:section-open";function i(){try{const t=localStorage.getItem(r);return t?JSON.parse(t):{}}catch(t){return{}}}function a(t){if(!t)return;const e=i();return Object.prototype.hasOwnProperty.call(e,t)?!!e[t]:void 0}function n(t,e){if(!t)return;const o=i();o[t]=!!e,function(t){try{localStorage.setItem(r,JSON.stringify(t))}catch(t){}}(o)}}}]);
Binary file
@@ -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:()=>v});var o=n(53577),i=n(74265),a=n(86319),s=n(20252);const l=[100,300,400,500,600,700,900].map(e=>({value:String(e),label:String(e)})),r=e=>{{const{component:t,commands:n,helpers:r}=e,c=t.tiptap,p=c.state.selection.$anchor.node().attrs,d=c.isActive("heading",{level:1})?"h1":c.isActive("heading",{level:2})?"h2":c.isActive("heading",{level:3})?"h3":c.isActive("heading",{level:4})?"h4":c.isActive("heading",{level:5})?"h5":c.isActive("heading",{level:6})?"h6":"paragraph";let u=e.languageJson;const g=e.language||"he";return u||(u="he"===g?o:i),{select:e=>{let{changeTab:t,tab:n}=e},tabs:e=>{const t=c.isActive("customBulletItem"),n=[{text:"design",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:r}=e;return[{type:"info",text:"text_micro_copy",active:()=>"design"===o.text},{type:"heading",level:6,text:"typography",active:()=>"design"===o.text},{type:"dropdown",active:()=>"design"===o.text,title:"type",value:d,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":c.chain().setHeading({level:parseInt(t.slice(1))}).run();break;case"paragraph":c.chain().setParagraph().run()}}},{type:"slider",title:"fontSize",min:8,step:2,max:74,value:parseInt(c.getAttributes("textStyle").fontSize||"16px"),active:()=>"design"===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:()=>"design"===o.text&&"web"===a.M.get("config","channel"),value:String(c.getAttributes("textStyle").fontWeight||400),selected:String(c.getAttributes("textStyle").fontWeight||400),items:l,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:"checkbox",title:"smart_change",active:()=>"design"===o.text,checked:(0,s.z)(),onChange:e=>{(0,s.R)(!!e.target.checked)}},{type:"heading",level:6,text:"spacing",active:()=>"design"===o.text},{type:"slider",title:"lineHeight",min:1,max:3,step:.1,value:parseFloat(p.lineHeight||1),active:()=>"design"===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(p.letterSpacing)||1,active:()=>"design"===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:()=>"design"===o.text},{type:"colorSwatchGroup",active:()=>"design"===o.text,columns:2,items:[{title:"font_color",value:c.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:a,to:s}={from:0,to:e.doc.content.size};e.doc.nodesBetween(a,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:()=>"design"===o.text},{type:"slider",active:()=>"design"===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"},{type:"colorpicker",active:()=>"icons"===o.text,title:u.iconColor||"Icon color",alpha:!1,value:c.getAttributes(" textStyle").color||"#0000",onChange:e=>{const t=e.target.value;c.chain().setCustomBulletStyles({fill:t}).run()}},{type:"divider",active:()=>"icons"===o.text},{type:"slider",active:()=>"icons"===o.text,title:u.iconSize||"Icon size",value:parseInt(c.getAttributes("customBulletItem").width)||24,min:10,max:40,onInput:e=>{const t=e.target.value;c.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 c=n(52144);const p=e=>{let{helpers:t,tiptap:n,composeId:o,template:i}=e;return{set:(e,a,s)=>{switch(a){case"style":return"object"==typeof s&&(e[a]=(0,c.A)(e[a],s),t.mergeDiff(i,{style:e[a]})),!0;case"text":e[a]=s;const l=n.getJSON();return s&&"object"==typeof s&&JSON.stringify(l)!==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 d=n(84488),u=n.n(d);n(70567);const g=[];let h=!1,m=null;const v=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:l}=s,c=document.createElement("div");l(c,{style:i.props.style});const d=a.M.get("config","editor","configure","editorProps","fonts");let v=a.M.get("config","target");"string"==typeof v&&(v=document.querySelector(v)),v||(v=document.body);const y=u()({element:c,container:v||document.body,editable:!0,offsetTop:40,onClickMagic:e=>{let{insertContent:t,getJSON:n,getHTML:o,getText:i,selectAll:s,insertContentHtml:l}=e;const r=a.M.get("injectEditor"),c=document.createElement("cdtr-text-prompt-editor");r(c),c.context=i(),c.addEventListener("text-generation-start",e=>{s()}),c.addEventListener("text-generation-chunk",e=>{t(e.detail.chunk)}),c.addEventListener("text-generation-complete",e=>{s(),l(e.detail.text)}),c.addEventListener("text-generation-error",e=>{console.error("Text generation error:",e.detail.error)})},content:"string"==typeof i.props.text.markdown?i.props.text.markdown:i.props.text.childNodes,defaultDirection:"rtl",onBlur:()=>{m===y&&(m=null),setTimeout(()=>{m!==y&&(h=!1)},150)},onFocus:()=>{if(!h||m===y||null===m){if(h=!0,m=y,g.length>0)for(g.forEach(e=>{e!==y&&e.hideEditor()});g.length>0;)g.pop();g.push(y),setTimeout(()=>{m===y&&h&&y.showEditor()},100)}},onUpdate:e=>{let{editor:t,transaction:n}=e;if(0===n.steps.length)return;const o=n.curSelection.from,a=n.curSelection.to,s={childNodes:t.getJSON(),from:o,to:a,focusedElement:i.id};f.commands.execCommand("text",s)},ignoresBlurByQuerySelectors:[".ignore-events"],builder:[{type:"fontFamily",fonts:d||[],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:c,defaultProps:{text:{},style:{}},draggable:{group:"element"},droppable:{group:"element"},resizeable:()=>c,handleBar:!0,validator:p({template:c,helpers:s,tiptap:y,composeId:i.id}),schema:i.schema,onSelect:e=>{c.classList.add(e)},onDeselect:e=>{c.classList.remove(e)},elementProps:i,remove:()=>{c.remove()},createEditor:r});return i.props.text.markdown&&y.chain().insertContent(" ").run(),f.addProp("tiptap",y),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:()=>y});var o=n(53577),i=n(74265),a=n(86319),l=n(20252);const s=[100,300,400,500,600,700,900].map(e=>({value:String(e),label:String(e)})),r=e=>{{const{component:t,commands:n,helpers:r}=e,c=t.tiptap,p=c.state.selection.$anchor.node().attrs,u=c.isActive("heading",{level:1})?"h1":c.isActive("heading",{level:2})?"h2":c.isActive("heading",{level:3})?"h3":c.isActive("heading",{level:4})?"h4":c.isActive("heading",{level:5})?"h5":c.isActive("heading",{level:6})?"h6":"paragraph";let d=e.languageJson;const g=e.language||"he";return d||(d="he"===g?o:i),{select:e=>{let{changeTab:t,tab:n}=e},tabs:e=>{const t=c.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:r}=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:u,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":c.chain().setHeading({level:parseInt(t.slice(1))}).run();break;case"paragraph":c.chain().setParagraph().run()}}},{type:"slider",title:"fontSize",min:8,step:2,max:74,value:parseInt(c.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"===a.M.get("config","channel"),value:String(c.getAttributes("textStyle").fontWeight||400),selected:String(c.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:"checkbox",title:"smart_change",active:()=>"style"===o.text,checked:(0,l.z)(),onChange:e=>{(0,l.R)(!!e.target.checked)}},{type:"heading",level:6,text:"spacing",active:()=>"style"===o.text},{type:"slider",title:"lineHeight",min:1,max:3,step:.1,value:parseFloat(p.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(p.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:c.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:a,to:l}={from:0,to:e.doc.content.size};e.doc.nodesBetween(a,l,(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"},{type:"colorpicker",active:()=>"icons"===o.text,title:d.iconColor||"Icon color",alpha:!1,value:c.getAttributes(" textStyle").color||"#0000",onChange:e=>{const t=e.target.value;c.chain().setCustomBulletStyles({fill:t}).run()}},{type:"divider",active:()=>"icons"===o.text},{type:"slider",active:()=>"icons"===o.text,title:d.iconSize||"Icon size",value:parseInt(c.getAttributes("customBulletItem").width)||24,min:10,max:40,onInput:e=>{const t=e.target.value;c.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 c=n(52144);const p=e=>{let{helpers:t,tiptap:n,composeId:o,template:i}=e;return{set:(e,a,l)=>{switch(a){case"style":return"object"==typeof l&&(e[a]=(0,c.A)(e[a],l),t.mergeDiff(i,{style:e[a]})),!0;case"text":e[a]=l;const s=n.getJSON();return l&&"object"==typeof l&&JSON.stringify(s)!==JSON.stringify(l.childNodes)&&(l&&l.focusedElement&&l.focusedElement===o?(n.chain().focus().setContent(l.childNodes).run(),l.to&&l.from&&n.commands.setTextSelection({from:l.from,to:l.to})):n.chain().setContent(l.childNodes).run()),delete e?.text?.markdown,!0}}}};var u=n(84488),d=n.n(u);n(70567);const g=[];let h=!1,m=null;const y=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:l}=n,{mergeDiff:s}=l,c=document.createElement("div");s(c,{style:i.props.style});const u=a.M.get("config","editor","configure","editorProps","fonts");let y=a.M.get("config","target");"string"==typeof y&&(y=document.querySelector(y)),y||(y=document.body);const v=d()({element:c,container:y||document.body,editable:!0,offsetTop:40,onClickMagic:e=>{let{insertContent:t,getJSON:n,getHTML:o,getText:i,selectAll:l,insertContentHtml:s}=e;const r=a.M.get("injectEditor"),c=document.createElement("cdtr-text-prompt-editor");r(c),c.context=i(),c.addEventListener("text-generation-start",e=>{l()}),c.addEventListener("text-generation-chunk",e=>{t(e.detail.chunk)}),c.addEventListener("text-generation-complete",e=>{l(),s(e.detail.text)}),c.addEventListener("text-generation-error",e=>{console.error("Text generation error:",e.detail.error)})},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&&(h=!1)},150)},onFocus:()=>{if(!h||m===v||null===m){if(h=!0,m=v,g.length>0)for(g.forEach(e=>{e!==v&&e.hideEditor()});g.length>0;)g.pop();g.push(v),setTimeout(()=>{m===v&&h&&v.showEditor()},100)}},onUpdate:e=>{let{editor:t,transaction:n}=e;if(0===n.steps.length)return;const o=n.curSelection.from,a=n.curSelection.to,l={childNodes:t.getJSON(),from:o,to:a,focusedElement:i.id};f.commands.execCommand("text",l)},ignoresBlurByQuerySelectors:[".ignore-events"],builder:[{type:"fontFamily",fonts:u||[],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:c,defaultProps:{text:{},style:{}},draggable:{group:"element"},droppable:{group:"element"},resizeable:()=>c,handleBar:!0,validator:p({template:c,helpers:l,tiptap:v,composeId:i.id}),schema:i.schema,onSelect:e=>{c.classList.add(e)},onDeselect:e=>{c.classList.remove(e)},elementProps:i,remove:()=>{c.remove()},createEditor:r});return i.props.text.markdown&&v.chain().insertContent(" ").run(),f.addProp("tiptap",v),f}}}}}]);
Binary file
@@ -24,7 +24,7 @@
24
24
  height: 100vh;
25
25
  left: 0;
26
26
  top: 0;
27
- z-index: 999999;
27
+ z-index: var(--z-blocking, 2147483646);
28
28
  background-color: #0000001f;
29
29
  }
30
30
  .container {
@@ -35,7 +35,7 @@
35
35
  background: #fff;
36
36
  width: auto;
37
37
  height: 500px;
38
- z-index: 9999999;
38
+ z-index: var(--z-toast, 1100);
39
39
  box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
40
40
  padding: 3rem;
41
41
  direction: var(--direction-locale);
Binary file
@@ -1 +1,121 @@
1
- "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[2234],{62234(e,t,s){s.r(t);s(49937).A.subscribe("snackbar",e=>{let{text:t,timeout:s=3e3}=e;"function"==typeof window.snackbar&&window.snackbar({text:t})})}}]);
1
+ "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[2234],{62234(t,a,s){s.r(a),s.d(a,{ToastProvider:()=>i});var e=s(59929),o=s(49937);let r=0;class i extends e.WF{constructor(){super(),this._toasts=[],this._handleSnackbar=this._handleSnackbar.bind(this)}connectedCallback(){super.connectedCallback(),o.A.subscribe("snackbar",this._handleSnackbar),window.snackbar=t=>{"string"==typeof t&&(t={text:t}),this._handleSnackbar(t)}}disconnectedCallback(){super.disconnectedCallback()}_handleSnackbar(){let{text:t,type:a,action:s,timeout:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!t)return;const o=++r,i={id:o,text:t,type:a||"neutral",action:s||null};this._toasts=[...this._toasts,i],this._toasts.length>3&&(this._toasts=this._toasts.slice(-3)),setTimeout(()=>this._dismiss(o),e||4e3)}_dismiss(t){const a=this.shadowRoot?.querySelector(`[data-toast-id="${t}"]`);a?(a.classList.add("removing"),setTimeout(()=>{this._toasts=this._toasts.filter(a=>a.id!==t)},120)):this._toasts=this._toasts.filter(a=>a.id!==t)}_onAction(t){t.action&&"function"==typeof t.action.onClick&&t.action.onClick(),this._dismiss(t.id)}render(){return e.qy`${this._toasts.map(t=>e.qy`
2
+ <div class="toast ${t.type}" data-toast-id="${t.id}">
3
+ <span class="toast-text">${t.text}</span>
4
+ ${t.action?e.qy`<button class="toast-action" @click=${()=>this._onAction(t)}>${t.action.label}</button>`:null}
5
+ <button class="toast-close" @click=${()=>this._dismiss(t.id)}>
6
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">
7
+ <line x1="18" y1="6" x2="6" y2="18"></line>
8
+ <line x1="6" y1="6" x2="18" y2="18"></line>
9
+ </svg>
10
+ </button>
11
+ </div>
12
+ `)}`}}i.properties={_toasts:{state:!0}},i.styles=e.AH`
13
+ :host {
14
+ position: fixed;
15
+ bottom: 0;
16
+ left: 50%;
17
+ transform: translateX(-50%);
18
+ z-index: var(--z-toast, 1100);
19
+ display: flex;
20
+ flex-direction: column-reverse;
21
+ align-items: center;
22
+ gap: var(--space-2, 8px);
23
+ padding: var(--space-6, 24px);
24
+ pointer-events: none;
25
+ direction: ltr;
26
+ }
27
+
28
+ .toast {
29
+ display: flex;
30
+ align-items: center;
31
+ gap: var(--space-3, 12px);
32
+ max-width: 420px;
33
+ min-width: 200px;
34
+ padding: var(--space-3, 12px) var(--space-4, 16px);
35
+ background: var(--color-text, #1a1a1f);
36
+ color: #fff;
37
+ border-radius: var(--radius-md, 10px);
38
+ box-shadow: var(--shadow-lg);
39
+ font-family: var(--font-sans, -apple-system, system-ui, 'Segoe UI', Roboto, sans-serif);
40
+ font-size: var(--text-sm, 13px);
41
+ font-weight: 500;
42
+ line-height: 1.4;
43
+ pointer-events: auto;
44
+ animation: cdtr-toast-in var(--duration-normal, 200ms) var(--ease-out, cubic-bezier(0, 0, 0.2, 1));
45
+ }
46
+
47
+ .toast.removing {
48
+ animation: cdtr-toast-out var(--duration-fast, 120ms) var(--ease-default, ease) forwards;
49
+ }
50
+
51
+ /* Accent stripe on the left for semantic variants */
52
+ .toast::before {
53
+ content: '';
54
+ flex: 0 0 auto;
55
+ width: 3px;
56
+ align-self: stretch;
57
+ border-radius: 2px;
58
+ background: transparent;
59
+ }
60
+ .toast.success::before { background: var(--color-success, #16a34a); }
61
+ .toast.error::before { background: var(--color-danger, #dc2626); }
62
+ .toast.warning::before { background: var(--color-warning, #d97706); }
63
+
64
+ .toast-text {
65
+ flex: 1 1 auto;
66
+ min-width: 0;
67
+ }
68
+
69
+ .toast-action {
70
+ flex: 0 0 auto;
71
+ background: transparent;
72
+ border: 1px solid rgba(255, 255, 255, 0.25);
73
+ color: #fff;
74
+ padding: var(--space-1, 4px) var(--space-2, 8px);
75
+ border-radius: var(--radius-sm, 6px);
76
+ font: inherit;
77
+ font-size: var(--text-xs, 12px);
78
+ font-weight: 600;
79
+ cursor: pointer;
80
+ white-space: nowrap;
81
+ transition: background var(--duration-fast, 120ms) ease;
82
+ }
83
+ .toast-action:hover {
84
+ background: rgba(255, 255, 255, 0.15);
85
+ }
86
+
87
+ .toast-close {
88
+ flex: 0 0 auto;
89
+ background: transparent;
90
+ border: none;
91
+ color: rgba(255, 255, 255, 0.5);
92
+ padding: var(--space-1, 4px);
93
+ cursor: pointer;
94
+ display: flex;
95
+ align-items: center;
96
+ justify-content: center;
97
+ border-radius: var(--radius-sm, 6px);
98
+ transition: color var(--duration-fast, 120ms) ease;
99
+ }
100
+ .toast-close:hover {
101
+ color: #fff;
102
+ }
103
+ .toast-close svg {
104
+ width: 14px;
105
+ height: 14px;
106
+ }
107
+
108
+ @keyframes cdtr-toast-in {
109
+ from {
110
+ opacity: 0;
111
+ transform: translateY(16px);
112
+ }
113
+ }
114
+
115
+ @keyframes cdtr-toast-out {
116
+ to {
117
+ opacity: 0;
118
+ transform: translateY(8px);
119
+ }
120
+ }
121
+ `,customElements.define("cdtr-toast-provider",i)}}]);
Binary file
@@ -1 +1 @@
1
- "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[2765],{12765(e,t,o){o.d(t,{default:()=>c});var n=o(61919);const r=e=>{{const{component:t,commands:o}=e;return{select:e=>{let{changeTab:t,tab:o}=e;o.text||t("icon")},tabs:e=>{const t=[{text:"icon",selected:!0},{text:"design"},{text:"link"},{text:"settings"}];return e?(t.forEach(t=>t.selected=t.text===e),t):t},layout:e=>{let{tab:r}=e;const s=t.props.src.includes("img.creaditor.ai");return[{type:"icons",active:()=>"icon"===r.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;if(n){const e=n.urlPng||n.src;e&&o.execCommand("src",e),t.props.alt&&"icon"!==t.props.alt||o.execCommand("alt",n.name),n.size?.width&&n.size?.height&&o.execCommand("style",{width:n.size.width+"px",height:n.size.height+"px"}),null!=n.category&&null!=n.name&&(o.execCommand("iconCategory",n.category),o.execCommand("iconName",n.name));const r=(n.color??t.props.iconColor??"000000").toString().replace(/^#/,"");o.execCommand("iconColor",r)}}},{type:"input",title:"altText",active:()=>"icon"===r.text,value:t.props.alt||"",onChange:e=>{const t=e.target.value;o.execCommand("alt",t)}},{type:"slider",title:"size",min:8,max:256,active:()=>"design"===r.text,value:parseInt(t.props.style?.width,10)||24,onInput:e=>{const t=e.target.value;o.execCommand("style",{width:t+"px",height:t+"px"})}},{type:"colorpicker",title:"icon_color",alpha:!1,active:()=>"design"===r.text&&s,value:t.props.iconColor?t.props.iconColor.startsWith("#")?t.props.iconColor:"#"+t.props.iconColor:"#000000",onChange:e=>{let t=e.target.value;t=(0,n.A)(t).toHex(),t.startsWith("#")&&(t=t.slice(1)),o.execCommand("iconColor",t)}},{type:"linkpicker",href:t.props.onClick?.link,protocol:t.props.onClick?.link?.protocol,target:t.props.onClick?.link?.target,autofocus:!0,active:()=>"link"===r.text,onChange:e=>{const t={link:e.target.value};o.execCommand("onClick",t)}}]}}}},s=e=>{let{helpers:t}=e;return{set:(e,o,n)=>{switch(o){case"style":return e[o]=t.deepMerge(e[o],n),!0;case"src":case"alt":case"iconColor":case"iconCategory":case"iconName":return e[o]=n,!0;case"onClick":if(n&&n.link)return e[o]=n,!0}}}};const c=()=>{const e="icon";return{name:e,create:t=>{const{createElement:o,compose:n,helpers:c}=t,{mergeDiff:i}=c,a=document.createElement("div"),l=document.createElement("img");a.appendChild(l);return o({name:e,id:n.id,template:a,defaultProps:{style:{height:"24px",width:"24px",display:"inline-block"},src:"",alt:"",iconColor:"000000"},draggable:{group:"element"},droppable:{group:"element"},render:()=>{i(l,{style:n.props.style});const e=function(e){const t=e.props.iconCategory,o=e.props.iconName;if(!t||!o)return null;let n=parseInt(e.props.style?.width,10)||24,r=parseInt(e.props.style?.height,10)||24;n=Math.min(512,Math.max(1,n)),r=Math.min(512,Math.max(1,r));const s=function(e){let t=(e||"000000").toString().trim();return t.startsWith("#")&&(t=t.slice(1)),3===t.length&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),6!==t.length?"000000":t}(e.props.iconColor);return`https://img.creaditor.ai/icons/serve/${encodeURIComponent(t)}/${encodeURIComponent(o)}.png?${new URLSearchParams({width:String(n),height:String(r),color:s}).toString()}`}(n)||n.props.src;i(l,{src:e,alt:n.props.alt||""})},resizeable:null,handleBar:!0,validator:s({helpers:c}),schema:n.schema,onSelect:e=>{a.classList.add(e)},onDeselect:e=>{a.classList.remove(e)},elementProps:n,remove:()=>{a.remove()},createEditor:r})}}}}}]);
1
+ "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[2765],{12765(e,t,o){o.d(t,{default:()=>c});var n=o(61919);const r=e=>{{const{component:t,commands:o}=e;return{select:e=>{let{changeTab:t,tab:o}=e;o.text||t("icon")},tabs:e=>{const t=[{text:"icon",selected:!0},{text:"style"},{text:"link"},{text:"settings"}];return e?(t.forEach(t=>t.selected=t.text===e),t):t},layout:e=>{let{tab:r}=e;const s=t.props.src.includes("img.creaditor.ai");return[{type:"icons",active:()=>"icon"===r.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;if(n){const e=n.urlPng||n.src;e&&o.execCommand("src",e),t.props.alt&&"icon"!==t.props.alt||o.execCommand("alt",n.name),n.size?.width&&n.size?.height&&o.execCommand("style",{width:n.size.width+"px",height:n.size.height+"px"}),null!=n.category&&null!=n.name&&(o.execCommand("iconCategory",n.category),o.execCommand("iconName",n.name));const r=(n.color??t.props.iconColor??"000000").toString().replace(/^#/,"");o.execCommand("iconColor",r)}}},{type:"input",title:"altText",active:()=>"icon"===r.text,value:t.props.alt||"",onChange:e=>{const t=e.target.value;o.execCommand("alt",t)}},{type:"slider",title:"size",min:8,max:256,active:()=>"style"===r.text,value:parseInt(t.props.style?.width,10)||24,onInput:e=>{const t=e.target.value;o.execCommand("style",{width:t+"px",height:t+"px"})}},{type:"colorpicker",title:"icon_color",alpha:!1,active:()=>"style"===r.text&&s,value:t.props.iconColor?t.props.iconColor.startsWith("#")?t.props.iconColor:"#"+t.props.iconColor:"#000000",onChange:e=>{let t=e.target.value;t=(0,n.A)(t).toHex(),t.startsWith("#")&&(t=t.slice(1)),o.execCommand("iconColor",t)}},{type:"linkpicker",href:t.props.onClick?.link,protocol:t.props.onClick?.link?.protocol,target:t.props.onClick?.link?.target,autofocus:!0,active:()=>"link"===r.text,onChange:e=>{const t={link:e.target.value};o.execCommand("onClick",t)}}]}}}},s=e=>{let{helpers:t}=e;return{set:(e,o,n)=>{switch(o){case"style":return e[o]=t.deepMerge(e[o],n),!0;case"src":case"alt":case"iconColor":case"iconCategory":case"iconName":return e[o]=n,!0;case"onClick":if(n&&n.link)return e[o]=n,!0}}}};const c=()=>{const e="icon";return{name:e,create:t=>{const{createElement:o,compose:n,helpers:c}=t,{mergeDiff:i}=c,a=document.createElement("div"),l=document.createElement("img");a.appendChild(l);return o({name:e,id:n.id,template:a,defaultProps:{style:{height:"24px",width:"24px",display:"inline-block"},src:"",alt:"",iconColor:"000000"},draggable:{group:"element"},droppable:{group:"element"},render:()=>{i(l,{style:n.props.style});const e=function(e){const t=e.props.iconCategory,o=e.props.iconName;if(!t||!o)return null;let n=parseInt(e.props.style?.width,10)||24,r=parseInt(e.props.style?.height,10)||24;n=Math.min(512,Math.max(1,n)),r=Math.min(512,Math.max(1,r));const s=function(e){let t=(e||"000000").toString().trim();return t.startsWith("#")&&(t=t.slice(1)),3===t.length&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),6!==t.length?"000000":t}(e.props.iconColor);return`https://img.creaditor.ai/icons/serve/${encodeURIComponent(t)}/${encodeURIComponent(o)}.png?${new URLSearchParams({width:String(n),height:String(r),color:s}).toString()}`}(n)||n.props.src;i(l,{src:e,alt:n.props.alt||""})},resizeable:null,handleBar:!0,validator:s({helpers:c}),schema:n.schema,onSelect:e=>{a.classList.add(e)},onDeselect:e=>{a.classList.remove(e)},elementProps:n,remove:()=>{a.remove()},createEditor:r})}}}}}]);
Binary file
@@ -27,7 +27,7 @@
27
27
  overflow: hidden;
28
28
  max-width: 100%;
29
29
  position: fixed;
30
- z-index: 9999;
30
+ z-index: var(--z-dropdown, 100);
31
31
  background: rgb(255, 255, 255);
32
32
  height: 100%;
33
33
  top: 52px;
Binary file
@@ -1 +1 @@
1
- "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[3418],{3418(e,t,n){n.d(t,{default:()=>r});const s=e=>{{const{component:t,commands:n,helpers:s}=e;return{select:e=>{let{changeTab:t,tab:n}=e;"design"!==n.text&&t("design")},tabs:e=>{const t=[{text:"design"},{text:"link"},{text:"list-check"}];return t.forEach(t=>t.selected=t.selected=t.text===e),t},layout:e=>{let{tab:o,changeTab:i,tabs:r}=e;return[{type:"linkpicker",active:"link"===o.text,protocol:t.props.onClick?.link?.protocol,target:t.props.onClick?.link?.target,href:t.props.onClick?.link?.href,onChange:e=>{const t={link:e.target.value};n.execCommand("onClick",t)}},{type:"heading",level:4,text:"typography",active:"design"===o.text},{active:"design"===o.text,type:"typography",bold:700===t.props.style.fontWeight,italic:"italic"===t.props.style.fontStyle,underline:"underline"===t.props.style.textDecoration,onChange:e=>{switch(e){case"bold":const e=700===t.props.style.fontWeight?400:700;n.execCommand("style",{fontWeight:e});break;case"italic":const s="italic"===t.props.style.fontStyle?"normal":"italic";n.execCommand("style",{fontStyle:s});break;case"underline":const o="underline"===t.props.style.textDecoration?"none":"underline";n.execCommand("style",{textDecoration:o})}}},{active:"design"===o.text,type:"fontFamily",value:t.props.style.fontFamily,weight:!0,weightValue:t.props.style.fontWeight,onChange:e=>{const t=e.target.value;n.execCommand("style",{fontFamily:t})},onWeightChange:e=>{n.execCommand("style",{fontWeight:e.detail.value})}},{active:"design"===o.text,type:"colorpicker",title:"color",value:t.props.style?.color,onChange:e=>{const t=e.target.value;n.execCommand("style",{color:t})}},{active:"design"===o.text,type:"fontSize",min:8,max:80,title:"fontSize",value:parseInt(t.props.style?.fontSize)||14,device:e=>{const n=e.target.device;e.target.value="phone"===n?parseInt(t.props?.breakpoints?.sm?.style?.fontSize)||14:parseInt(t.props.style.fontSize)||14},value:parseInt(t.props.style.fontSize)||14,onInput:e=>{const t=e.target.value;"phone"===e.target.device?n.execCommand("breakpoints",e=>{const n=e.props.breakpoints?.sm||{};return{sm:s.deepMerge(n,{style:{fontSize:t+"px"}})}}):n.execCommand("style",{fontSize:t+"px"})}},{active:"design"===o.text,type:"input",title:"prefix",value:t.props.prefix||"",onInput:e=>{const t=e.target.value;n.execCommand("prefix",t)}},{active:"design"===o.text,type:"input",title:"suffix",value:t.props.suffix||"",onInput:e=>{const t=e.target.value;n.execCommand("suffix",t)}},{active:"design"===o.text,type:"divider"},{active:"design"===o.text,type:"heading",level:4,text:"svg"},{active:"design"===o.text,type:"slider",min:10,max:600,title:"size",value:parseInt(t.props.width)||14,onInput:e=>{const t=e.target.value;n.execCommand("width",t)}},{active:"design"===o.text,type:"colorpicker",title:"svg_color",value:t.props.fill,onChange:e=>{const t=e.target.value;n.execCommand("fill",t)}},{active:"list-check"===o.text,type:"svgpicker",value:t.props.content,onChange:e=>{n.execCommand("content",e.svg)}}]}}}},o=["fontWeight","color","fontSize","textDecdoration","fontStyle","fontFamily"],i=e=>{let{helpers:t,template:n,svgElement:s,suffix:i,prefix:r}=e;return{set:(e,l,a)=>{switch(l){case"style":e[l]=t.deepMerge(e[l],a);for(const t in e[l])if(Object.hasOwnProperty.call(e[l],t)&&-1!==o.indexOf(t)){const s=e[l][t];n.style[t]=s}return!0;case"suffix":return e[l]=a,i(a),!0;case"prefix":return e[l]=a,r(a),!0;case"onClick":if(a.link)return e.onClick||(e.onClick={}),e.onClick={...e.onClick,...a},!0;break;case"content":return s.innerHTML=a,e[l]=a,!0;case"width":case"height":case"fill":return e[l]=a,s.setAttribute(l,a),s.style[l]=a,s.style.height="auto",!0;default:return!0}}}},r=()=>({name:"svg",create:e=>{let{createElement:t,compose:n,helpers:r}=e;"string"==typeof n.props.content&&-1!==n.props.content.indexOf("<svg")&&(n.props.content=(new DOMParser).parseFromString(n.props.content,"text/xml").firstElementChild.innerHTML);const l=document.createElement("span");l.innerHTML=n.props.prefix||"";const a=document.createElement("span");a.innerHTML=n.props.suffix||"";let p=(new DOMParser).parseFromString(`<svg\n width="30"\n height="auto"\n xmlns="http://www.w3.org/2000/svg"\n viewBox="0 0 24 24">${n.props.content}</svg>`,"text/xml").firstChild;p.setAttribute("width",n?.props?.width||n?.props?.style?.width),p.setAttribute("fill",n?.props?.fill||n.props.style.fill);const c=document.createElement("div");if(c.setAttribute("dir","auto"),c.style=n.props.style,c.style.display="flex",c.style.alignItems="center",n.props.style)for(const e in n.props.style)if(Object.hasOwnProperty.call(n.props.style,e)&&-1!==o.indexOf(e)){const t=n.props.style[e];c.style[e]=t}const d=document.createElement("cdtr-move-handle-bar");return d.for=n.id,c.append(a,p,l,d),t({name:"svg",id:n.id,template:c,defaultProps:{},draggable:{group:"elements"},validator:i({template:c,helpers:r,svgElement:p,suffix:e=>a.innerHTML=e,prefix:e=>l.innerHTML=e}),schema:n.schema,onSelect:e=>{c.classList.add(e)},onDeselect:e=>{c.classList.remove(e)},elementProps:n,remove:()=>{c.remove()},createEditor:s})}})}}]);
1
+ "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[3418],{3418(e,t,n){n.d(t,{default:()=>r});const s=e=>{{const{component:t,commands:n,helpers:s}=e;return{select:e=>{let{changeTab:t,tab:n}=e;"style"!==n.text&&t("style")},tabs:e=>{const t=[{text:"style"},{text:"link"},{text:"list-check"}];return t.forEach(t=>t.selected=t.selected=t.text===e),t},layout:e=>{let{tab:o,changeTab:l,tabs:r}=e;return[{type:"linkpicker",active:"link"===o.text,protocol:t.props.onClick?.link?.protocol,target:t.props.onClick?.link?.target,href:t.props.onClick?.link?.href,onChange:e=>{const t={link:e.target.value};n.execCommand("onClick",t)}},{type:"heading",level:4,text:"typography",active:"style"===o.text},{active:"style"===o.text,type:"typography",bold:700===t.props.style.fontWeight,italic:"italic"===t.props.style.fontStyle,underline:"underline"===t.props.style.textDecoration,onChange:e=>{switch(e){case"bold":const e=700===t.props.style.fontWeight?400:700;n.execCommand("style",{fontWeight:e});break;case"italic":const s="italic"===t.props.style.fontStyle?"normal":"italic";n.execCommand("style",{fontStyle:s});break;case"underline":const o="underline"===t.props.style.textDecoration?"none":"underline";n.execCommand("style",{textDecoration:o})}}},{active:"style"===o.text,type:"fontFamily",value:t.props.style.fontFamily,weight:!0,weightValue:t.props.style.fontWeight,onChange:e=>{const t=e.target.value;n.execCommand("style",{fontFamily:t})},onWeightChange:e=>{n.execCommand("style",{fontWeight:e.detail.value})}},{active:"style"===o.text,type:"colorpicker",title:"color",value:t.props.style?.color,onChange:e=>{const t=e.target.value;n.execCommand("style",{color:t})}},{active:"style"===o.text,type:"fontSize",min:8,max:80,title:"fontSize",value:parseInt(t.props.style?.fontSize)||14,device:e=>{const n=e.target.device;e.target.value="phone"===n?parseInt(t.props?.breakpoints?.sm?.style?.fontSize)||14:parseInt(t.props.style.fontSize)||14},value:parseInt(t.props.style.fontSize)||14,onInput:e=>{const t=e.target.value;"phone"===e.target.device?n.execCommand("breakpoints",e=>{const n=e.props.breakpoints?.sm||{};return{sm:s.deepMerge(n,{style:{fontSize:t+"px"}})}}):n.execCommand("style",{fontSize:t+"px"})}},{active:"style"===o.text,type:"input",title:"prefix",value:t.props.prefix||"",onInput:e=>{const t=e.target.value;n.execCommand("prefix",t)}},{active:"style"===o.text,type:"input",title:"suffix",value:t.props.suffix||"",onInput:e=>{const t=e.target.value;n.execCommand("suffix",t)}},{active:"style"===o.text,type:"divider"},{active:"style"===o.text,type:"heading",level:4,text:"svg"},{active:"style"===o.text,type:"slider",min:10,max:600,title:"size",value:parseInt(t.props.width)||14,onInput:e=>{const t=e.target.value;n.execCommand("width",t)}},{active:"style"===o.text,type:"colorpicker",title:"svg_color",value:t.props.fill,onChange:e=>{const t=e.target.value;n.execCommand("fill",t)}},{active:"list-check"===o.text,type:"svgpicker",value:t.props.content,onChange:e=>{n.execCommand("content",e.svg)}}]}}}},o=["fontWeight","color","fontSize","textDecdoration","fontStyle","fontFamily"],l=e=>{let{helpers:t,template:n,svgElement:s,suffix:l,prefix:r}=e;return{set:(e,i,a)=>{switch(i){case"style":e[i]=t.deepMerge(e[i],a);for(const t in e[i])if(Object.hasOwnProperty.call(e[i],t)&&-1!==o.indexOf(t)){const s=e[i][t];n.style[t]=s}return!0;case"suffix":return e[i]=a,l(a),!0;case"prefix":return e[i]=a,r(a),!0;case"onClick":if(a.link)return e.onClick||(e.onClick={}),e.onClick={...e.onClick,...a},!0;break;case"content":return s.innerHTML=a,e[i]=a,!0;case"width":case"height":case"fill":return e[i]=a,s.setAttribute(i,a),s.style[i]=a,s.style.height="auto",!0;default:return!0}}}},r=()=>({name:"svg",create:e=>{let{createElement:t,compose:n,helpers:r}=e;"string"==typeof n.props.content&&-1!==n.props.content.indexOf("<svg")&&(n.props.content=(new DOMParser).parseFromString(n.props.content,"text/xml").firstElementChild.innerHTML);const i=document.createElement("span");i.innerHTML=n.props.prefix||"";const a=document.createElement("span");a.innerHTML=n.props.suffix||"";let p=(new DOMParser).parseFromString(`<svg\n width="30"\n height="auto"\n xmlns="http://www.w3.org/2000/svg"\n viewBox="0 0 24 24">${n.props.content}</svg>`,"text/xml").firstChild;p.setAttribute("width",n?.props?.width||n?.props?.style?.width),p.setAttribute("fill",n?.props?.fill||n.props.style.fill);const c=document.createElement("div");if(c.setAttribute("dir","auto"),c.style=n.props.style,c.style.display="flex",c.style.alignItems="center",n.props.style)for(const e in n.props.style)if(Object.hasOwnProperty.call(n.props.style,e)&&-1!==o.indexOf(e)){const t=n.props.style[e];c.style[e]=t}const y=document.createElement("cdtr-move-handle-bar");return y.for=n.id,c.append(a,p,i,y),t({name:"svg",id:n.id,template:c,defaultProps:{},draggable:{group:"elements"},validator:l({template:c,helpers:r,svgElement:p,suffix:e=>a.innerHTML=e,prefix:e=>i.innerHTML=e}),schema:n.schema,onSelect:e=>{c.classList.add(e)},onDeselect:e=>{c.classList.remove(e)},elementProps:n,remove:()=>{c.remove()},createEditor:s})}})}}]);
Binary file
@@ -0,0 +1 @@
1
+ "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[3778],{43778(e,t,o){o.d(t,{default:()=>E});var n=o(86319),r=o(61919);function c(e){let t=(e||"000000").toString().trim();return t.startsWith("#")&&(t=t.slice(1)),3===t.length&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),6!==t.length?"000000":t}function i(e){const t=e.iconCategory||"Arrows",o=e.iconName||"arrow-down-s-line",n=c(e.iconColor);return`https://img.creaditor.ai/icons/serve/${encodeURIComponent(t)}/${encodeURIComponent(o)}.png?width=40&height=40&color=${n}`}const a={he:{designTab:"עיצוב",designDesc:"פאנלים",arrowTab:"חץ",arrowDesc:"סמל וצבע החץ",settingsTab:"הגדרות",settingsDesc:"גודל והתנהגות",panel:e=>`פאנל ${e}`,panelDesc:"שנו סדר, קבעו מצב פתיחה או הסירו פאנל. עריכת הטקסט מתבצעת ישירות על הקנבס.",openDefault:"פתוח כברירת מחדל",openDefaultDesc:"הצג פאנל זה פתוח בטעינת העמוד.",moveUp:"הזז למעלה",moveUpDesc:"העבר פאנל זה מיקום אחד למעלה.",moveDown:"הזז למטה",moveDownDesc:"העבר פאנל זה מיקום אחד למטה.",removePanel:"הסר פאנל",removePanelDesc:"מחק פאנל זה.",addPanel:"הוסף פאנל",addPanelDesc:"הוסף פאנל חדש לאקורדיון.",arrowIcon:"סמל החץ",arrowColor:"צבע החץ",width:"רוחב",widthDesc:"הרוחב הכולל של האקורדיון.",maxWidth:"רוחב מרבי",maxWidthDesc:"הרוחב המרבי של האקורדיון.",multipleOpen:"מספר פאנלים פתוחים בו-זמנית",singleOpen:"פאנל אחד פתוח בכל פעם",allowMultipleDesc:"קבע האם ניתן לפתוח כמה פאנלים יחד.",borderColor:"צבע גבול",checkmark:" ✓"},en:{designTab:"Design",designDesc:"Panels",arrowTab:"Arrow",arrowDesc:"Arrow icon & color",settingsTab:"Settings",settingsDesc:"Size & behavior",panel:e=>`Panel ${e}`,panelDesc:"Reorder, set default state, or remove this panel. Edit its text directly on the canvas.",openDefault:"Open by default",openDefaultDesc:"Show this panel expanded when the page loads.",moveUp:"Move Up",moveUpDesc:"Move this panel one position up.",moveDown:"Move Down",moveDownDesc:"Move this panel one position down.",removePanel:"Remove Panel",removePanelDesc:"Delete this panel.",addPanel:"Add Panel",addPanelDesc:"Add a new panel to the accordion.",arrowIcon:"Arrow icon",arrowColor:"Arrow color",width:"Width",widthDesc:"Overall width of the accordion.",maxWidth:"Max Width",maxWidthDesc:"Maximum width of the accordion.",multipleOpen:"Multiple panels open",singleOpen:"One panel open at a time",allowMultipleDesc:"Toggle whether several panels can be expanded at once.",borderColor:"Border Color",checkmark:" ✓"}};function l(e){let{component:t,commands:o}=e;const l=function(){try{return"en"!==n.M.get("config","language")}catch(e){return!1}}()?a.he:a.en,s=Array.isArray(t.props.items)?t.props.items:[],d=t.props.style||{},p=t.accordion||{},m=!1!==t.props.allowMultiple,u=s.map((e,t)=>({type:"accordion",label:l.panel(t+1),isOpen:!1,description:l.panelDesc,onToggle:()=>{},children:[{type:"option",text:e.isOpen?l.openDefault+l.checkmark:l.openDefault,description:l.openDefaultDesc,active:!0,onClick:()=>p.setDefaultOpen&&p.setDefaultOpen(t,!e.isOpen)},{type:"option",text:l.moveUp,description:l.moveUpDesc,active:t>0,onClick:()=>p.moveItem&&p.moveItem(t,t-1)},{type:"option",text:l.moveDown,description:l.moveDownDesc,active:t<s.length-1,onClick:()=>p.moveItem&&p.moveItem(t,t+1)},{type:"option",text:l.removePanel,icon:"remove",color:"red",description:l.removePanelDesc,onClick:()=>p.removeItem&&p.removeItem(t)},{type:"divider"}]}));return{tabs:e=>{const t=[{text:l.designTab,description:l.designDesc},{text:l.arrowTab,description:l.arrowDesc},{text:l.settingsTab,description:l.settingsDesc}];return t.forEach(t=>{t.selected=t.text===e}),t},layout:e=>{let{tab:n}=e;return n.text===l.arrowTab?[{type:"icons",title:l.arrowIcon,useIconsApi:!0,selectedIcon:i(t.props),iconColor:c(t.props.iconColor),iconSize:24,onChange:e=>{const n=e.detail;if(!n)return;null!=n.category&&null!=n.name&&(o.execCommand("iconCategory",n.category),o.execCommand("iconName",n.name));const r=(null!=n.color?n.color:t.props.iconColor||"000000").toString().replace(/^#/,"");o.execCommand("iconColor",r)}},{type:"colorpicker",title:l.arrowColor,alpha:!1,value:t.props.iconColor?t.props.iconColor.startsWith("#")?t.props.iconColor:"#"+t.props.iconColor:"#000000",onChange:e=>{o.execCommand("iconColor",(0,r.A)(e.target.value).toHex())}}]:n.text===l.settingsTab?[{type:"input",title:l.width,description:l.widthDesc,value:d.width||"",onInput:e=>{let{target:t}=e;return o.execCommand("style",{width:t.value})}},{type:"input",title:l.maxWidth,description:l.maxWidthDesc,value:d.maxWidth||"",onInput:e=>{let{target:t}=e;return o.execCommand("style",{maxWidth:t.value})}},{type:"option",text:m?l.multipleOpen+l.checkmark:l.singleOpen,description:l.allowMultipleDesc,active:!0,onClick:()=>o.execCommand("allowMultiple",!m)},{type:"colorpicker",title:l.borderColor,alpha:!1,value:t.props.borderColor||"#e6e6e6",onChange:e=>o.execCommand("borderColor",(0,r.A)(e.target.value).toHexString())}]:[...u,{type:"option",text:l.addPanel,icon:"add",description:l.addPanelDesc,onClick:()=>p.addItem&&p.addItem()}]}}}function s(e){let{helpers:t,controller:o}=e;return{set:(e,n,r)=>{switch(n){case"style":return e[n]=t.deepMerge(e[n]||{},r),o.applyStyle(),!0;case"items":return!!Array.isArray(r)&&(e[n]=r,o.reconcile(r),!0);case"allowMultiple":return e[n]=r,!0;case"borderColor":return e[n]=r,o.applyStyle(),!0;case"iconCategory":case"iconName":case"iconColor":return e[n]=r,o.refreshArrows(),!0;default:return!1}}}}var d=o(84488),p=o.n(d);const m="cdtr-accordion-styles",u=[];let h=!1,g=null;function y(e){const t=e.iconCategory||"Arrows",o=e.iconName||"arrow-down-s-line",n=function(e){let t=(e||"000000").toString().trim();return t.startsWith("#")&&(t=t.slice(1)),3===t.length&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),6!==t.length?"000000":t}(e.iconColor);return`${`https://img.creaditor.ai/icons/serve/${encodeURIComponent(t)}/${encodeURIComponent(o)}.png`}?${new URLSearchParams({width:"40",height:"40",color:n}).toString()}`}function f(e){const t=w();return{type:"doc",content:[{type:"paragraph",attrs:{lineHeight:"1.4",direction:t?"rtl":"ltr",textAlign:t?"right":"left"},content:e?[{type:"text",text:String(e)}]:[]}]}}function w(){try{return"en"!==n.M.get("config","language")}catch(e){return!1}}function v(e){return e&&"object"==typeof e&&e.childNodes?{childNodes:e.childNodes}:{childNodes:f("string"==typeof e?e:"")}}function C(e){return{title:v(e&&e.title),content:v(e&&e.content),isOpen:!(!e||!e.isOpen)}}const D=[8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,40,44,48,56,64,72];function x(e){return[{type:"fontFamily",fonts:e||[],useCloud:!0},{type:"fontSize",sizes:D},{type:"bold"},{type:"italic"},{type:"underline"},{type:"fontColor"},{type:"backcolor"},{type:"direction"},{type:"left"},{type:"center"},{type:"right"},{type:"clearFormat"}]}function b(e){return[{type:"fontFamily",fonts:e||[],useCloud:!0},{type:"fontSize",sizes:D},{type:"bold"},{type:"italic"},{type:"underline"},{type:"strike"},{type:"fontColor"},{type:"backcolor"},{type:"bullet"},{type:"numbered"},{type:"link"},{type:"unLink"},{type:"direction"},{type:"left"},{type:"center"},{type:"right"},{type:"clearFormat"}]}const E=()=>{const e="accordion";return{name:e,create:t=>{const{createElement:o,compose:r,helpers:c}=t,i=document.createElement("div");i.classList.add("cdtr-acc-root"),function(e){if(!e||!e.head||e.getElementById(m))return;const t=e.createElement("style");t.id=m,t.textContent="\n.cdtr-acc-root { display: block; }\n.cdtr-acc-item { border-bottom: 1px solid var(--cdtr-acc-border, #e6e6e6); }\n.cdtr-acc-header {\n display: flex; align-items: center; justify-content: space-between;\n gap: 12px; cursor: pointer; padding: 14px 4px;\n}\n.cdtr-acc-title-host { flex: 1 1 auto; min-width: 0; font-weight: 600; }\n.cdtr-acc-arrow {\n flex: 0 0 auto; width: 20px; height: 20px; user-select: none;\n transition: transform .3s ease; pointer-events: none;\n}\n.cdtr-acc-item.is-open > .cdtr-acc-header .cdtr-acc-arrow { transform: rotate(180deg); }\n.cdtr-acc-panel {\n display: grid; grid-template-rows: 0fr;\n transition: grid-template-rows .3s ease;\n}\n.cdtr-acc-item.is-open > .cdtr-acc-panel { grid-template-rows: 1fr; }\n.cdtr-acc-panel-inner { overflow: hidden; min-height: 0; }\n.cdtr-acc-content-host { padding: 4px 4px 14px; }\n",e.head.appendChild(t)}(i.ownerDocument||document);let a=n.M.get("config","target");"string"==typeof a&&(a=document.querySelector(a)),a||(a=document.body);const d=n.M.get("config","editor","configure","editorProps","fonts");let f=[],D=null,E=!1,O=null;const k=()=>Array.isArray(r.props.items)?r.props.items:[],A=()=>k().map(e=>C(e)),I=()=>{const e=r.props.style||{};for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(i.style[t]=e[t]);r.props.borderColor&&i.style.setProperty("--cdtr-acc-border",r.props.borderColor)},N=function(e){let{structural:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};O&&(E=t,O.commands.execCommand("items",e),E=!1)},S=(e,t,o)=>{const n=k()[o],r=v(n&&n[t]).childNodes,c=p()({element:e,container:a||document.body,editable:!0,offsetTop:40,defaultDirection:w()?"rtl":"ltr",content:r,ignoresBlurByQuerySelectors:[".ignore-events"],builder:"title"===t?x(d):b(d),onFocus:()=>{if(!h||g===c||null===g){if(h=!0,g=c,D={index:o,field:t},u.length>0)for(u.forEach(e=>{e!==c&&e.hideEditor()});u.length>0;)u.pop();u.push(c),setTimeout(()=>{g===c&&h&&c.showEditor()},100)}},onBlur:()=>{g===c&&(g=null),setTimeout(()=>{g!==c&&(h=!1)},150)},onUpdate:e=>{let{editor:n,transaction:r}=e;if(0===r.steps.length)return;D={index:o,field:t};const c=A();c[o]&&(c[o][t]={childNodes:n.getJSON()},N(c))}});return c},P=e=>{const t=k()[e],o=document.createElement("div");o.className="cdtr-acc-item",t&&t.isOpen&&o.classList.add("is-open");const n=document.createElement("div");n.className="cdtr-acc-header";const c=document.createElement("div");c.className="cdtr-acc-title-host";const i=document.createElement("img");i.className="cdtr-acc-arrow",i.alt="",i.setAttribute("draggable","false"),i.src=y(r.props),n.append(c,i);const a=document.createElement("div");a.className="cdtr-acc-panel";const l=document.createElement("div");l.className="cdtr-acc-panel-inner";const s=document.createElement("div");return s.className="cdtr-acc-content-host",l.appendChild(s),a.appendChild(l),o.append(n,a),n.addEventListener("click",t=>{c.contains(t.target)||function(e){const t=!1!==r.props.allowMultiple,o=A();if(!o[e])return;const n=!o[e].isOpen;o.forEach((o,r)=>{o.isOpen=t?r===e?n:o.isOpen:r===e&&n}),f.forEach((e,t)=>{e.node&&e.node.classList.toggle("is-open",!!o[t].isOpen)}),N(o,{structural:!0})}(e)}),{itemNode:o,header:n,arrow:i,titleHost:c,panelInner:l,contentHost:s}},M=()=>{f.forEach(e=>{try{e.title&&e.title.hideEditor&&e.title.hideEditor(),e.content&&e.content.hideEditor&&e.content.hideEditor()}catch(e){}}),f=[]},T=()=>{M(),i.innerHTML="",k().forEach((e,t)=>{const{itemNode:o,header:n,arrow:r,titleHost:c,panelInner:a,contentHost:l}=P(t);i.appendChild(o);const s=S(c,"title",t);c.parentElement!==n&&n.insertBefore(c,r);const d=S(l,"content",t);l.parentElement!==a&&a.appendChild(l),f.push({title:s,content:d,node:o})})};const U={reconcile:e=>{!E&&Array.isArray(e)&&(e.length===f.length?e.forEach((e,t)=>{["title","content"].forEach(o=>{const n=f[t]&&f[t][o],r=e[o]&&e[o].childNodes;if(n&&r&&(!D||D.index!==t||D.field!==o))try{JSON.stringify(n.getJSON())!==JSON.stringify(r)&&n.chain().setContent(r).run()}catch(e){}});const o=f[t]&&f[t].node;o&&o.classList.toggle("is-open",!!e.isOpen)}):T())},applyStyle:I,refreshArrows:()=>{const e=y(r.props);f.forEach(t=>{const o=t.node&&t.node.querySelector(".cdtr-acc-arrow");o&&(o.src=e)})}};return T(),I(),O=o({name:e,id:r.id,template:i,defaultProps:{style:{},items:[],allowMultiple:!0,iconCategory:"Arrows",iconName:"arrow-down-s-line",iconColor:"000000"},draggable:{group:"element"},droppable:{group:"element"},resizeable:()=>i,handleBar:!0,validator:s({helpers:c,controller:U}),schema:r.schema,onSelect:e=>i.classList.add(e),onDeselect:e=>i.classList.remove(e),elementProps:r,remove:()=>{M(),i.remove()},createEditor:l}),O.addProp("accordion",{addItem:()=>{const e=A(),t=e.length+1,o=w();e.push(C({title:o?`כותרת ${t}`:`Accordion title ${t}`,content:o?`תוכן הסעיף ${t}`:`Accordion content ${t}`})),N(e,{structural:!0}),T()},removeItem:e=>{const t=A();e<0||e>=t.length||(t.splice(e,1),N(t,{structural:!0}),T())},moveItem:(e,t)=>{const o=A();if(t<0||t>=o.length||e<0||e>=o.length)return;const[n]=o.splice(e,1);o.splice(t,0,n),N(o,{structural:!0}),T()},setDefaultOpen:(e,t)=>{const o=A();o[e]&&(o[e].isOpen=!!t,t&&!1===r.props.allowMultiple&&o.forEach((t,o)=>{o!==e&&(t.isOpen=!1)}),f.forEach((e,t)=>{e.node&&e.node.classList.toggle("is-open",!!o[t].isOpen)}),N(o,{structural:!0}))}}),O}}}}}]);
Binary file
@@ -0,0 +1 @@
1
+ "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[3792],{23792(e,t,n){n.d(t,{default:()=>E});let s=!1;const o=e=>{{const{component:t,commands:n,helpers:o}=e;return{select:e=>{let{changeTab:t,tab:n}=e;"design"!==n.text&&t("design")},tabs:e=>{const t=[{text:"design"},{text:"list-settings"},{text:"settings"}];return t.forEach(t=>t.selected=t.selected=t.text===e),t},layout:e=>{let{tab:a,changeTab:i,tabs:r}=e;s=!1;return[{type:"heading",active:()=>"list-settings"===a.text,level:5,text:"autotype_info"},{type:"heading",level:3,text:"design",active:()=>"design"===a.text},{type:"typography",active:()=>"design"===a.text,bold:700===t.props.style.fontWeight,italic:"italic"===t.props.style.fontStyle,underline:"underline"===t.props.style.textDecoration,onChange:e=>{switch(e){case"bold":const e=700===t.props.style.fontWeight?400:700;n.execCommand("style",{fontWeight:e});break;case"italic":const s="italic"===t.props.style.fontStyle?"normal":"italic";n.execCommand("style",{fontStyle:s});break;case"underline":const o="underline"===t.props.style.textDecoration?"none":"underline";n.execCommand("style",{textDecoration:o})}}},{type:"fontFamily",active:()=>"design"===a.text,value:t.props.style.fontFamily,weight:!0,weightValue:t.props.style.fontWeight,onChange:e=>{const t=e.target.value;n.execCommand("style",{fontFamily:t})},onWeightChange:e=>{n.execCommand("style",{fontWeight:e.detail.value})}},{type:"divider",active:()=>"design"===a.text},{type:"colorpicker",active:()=>"design"===a.text,title:"color",value:t.props.style.color,onChange:e=>{const t=e.target.value;n.execCommand("style",{color:t})}},{type:"fontSize",active:()=>"design"===a.text,title:"size",max:150,min:8,device:e=>{const n=e.target.device;e.target.value="phone"===n?parseInt(t.props?.breakpoints?.sm?.style?.fontSize)||14:parseInt(t.props.style.fontSize)||14},value:parseInt(t.props.style.fontSize)||14,onInput:e=>{const t=e.target.value;"phone"===e.target.device?n.execCommand("breakpoints",e=>{const n=e.props.breakpoints?.sm||{};return{sm:o.deepMerge(n,{style:{fontSize:t+"px"}})}}):n.execCommand("style",{fontSize:t+"px"})}},{type:"slider",max:5e3,min:0,title:"sleepBetween",value:parseInt(t.props.sleepBetween)||1e3,active:()=>"list-settings"===a.text,onInput:e=>{const t=e.target.value;n.execCommand("sleepBetween",parseInt(t))}},{type:"heading",active:()=>"list-settings"===a.text,level:6,text:"how_much_should_wait_between_each_item"},{type:"slider",active:()=>"list-settings"===a.text,max:5e3,min:0,title:"speed",value:parseInt(t.props.speed)||50,active:()=>"list-settings"===a.text,onInput:e=>{const t=e.target.value;n.execCommand("speed",parseInt(t))}}]}}}},a=e=>{let{helpers:t,template:n,reRender:s}=e;return{set:(e,n,o)=>{switch(n){case"style":const a={...e[n]};return e[n]=t.deepMerge(a,o),s(),!0;case"size":case"text":return e[n]=o,s(),!0;case"data":Array.isArray(o)&&(e[n]=o,s())}return!0}}};var i=n(25873),r=n(81318),l=n(1366),c=n(67291),p=n(28396);let d;var m=n(72591),u=n.n(m),y=n(88639),g=n.n(y),h=n(88128),A=n.n(h),C=n(30855),x=n.n(C),v=n(93051),f=n.n(v),b=n(48135),k={};k.setAttributes=x(),k.insert=A().bind(null,"head"),k.domAPI=g(),k.insertStyleElement=f();u()(b.A,k);const w=b.A&&b.A.locals?b.A.locals:void 0,E=()=>{const e="autotype";return{name:e,menu:t=>{let{Compose:n}=t;return new n(()=>({type:e,props:{style:{},speed:50,sleepBetween:1e3,text:{type:"doc",content:[{type:"paragraph",content:[{type:"text",text:"Hello World"}]}]}}}),{group:"elements",name:e,puzzle:['<svg width="46" height="32" viewBox="0 0 46 32" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M17.44 31L14.688 23.928H5.632L2.912 31H0L8.928 8.056H11.52L20.416 31H17.44ZM11.264 14.456C11.2 14.2853 11.0933 13.976 10.944 13.528C10.7947 13.08 10.6453 12.6213 10.496 12.152C10.368 11.6613 10.2613 11.288 10.176 11.032C10.0693 11.4587 9.952 11.896 9.824 12.344C9.71733 12.7707 9.6 13.1653 9.472 13.528C9.36533 13.8907 9.26933 14.2 9.184 14.456L6.592 21.368H13.824L11.264 14.456ZM30.0695 8.152C31.9682 8.152 33.5575 8.33333 34.8375 8.696C36.1388 9.05867 37.1095 9.656 37.7495 10.488C38.4108 11.32 38.7415 12.4293 38.7415 13.816C38.7415 14.712 38.5708 15.512 38.2295 16.216C37.9095 16.8987 37.4188 17.4747 36.7575 17.944C36.1175 18.392 35.3282 18.7013 34.3895 18.872V19.032C35.3495 19.1813 36.2135 19.4587 36.9815 19.864C37.7708 20.2693 38.3895 20.8453 38.8375 21.592C39.2855 22.3387 39.5095 23.3093 39.5095 24.504C39.5095 25.8907 39.1895 27.0747 38.5495 28.056C37.9095 29.016 36.9922 29.752 35.7975 30.264C34.6242 30.7547 33.2162 31 31.5735 31H23.5415V8.152H30.0695ZM30.6455 17.88C32.6082 17.88 33.9522 17.5707 34.6775 16.952C35.4028 16.312 35.7655 15.3733 35.7655 14.136C35.7655 12.8773 35.3175 11.9813 34.4215 11.448C33.5468 10.8933 32.1388 10.616 30.1975 10.616H26.4215V17.88H30.6455ZM26.4215 20.28V28.568H31.0295C33.0562 28.568 34.4642 28.1733 35.2535 27.384C36.0428 26.5947 36.4375 25.56 36.4375 24.28C36.4375 23.4693 36.2562 22.7653 35.8935 22.168C35.5522 21.5707 34.9655 21.112 34.1335 20.792C33.3228 20.4507 32.2135 20.28 30.8055 20.28H26.4215Z" fill="black"/>\n<rect x="42" y="1" width="1" height="30" fill="black"/>\n<rect x="39" width="7" height="1" fill="black"/>\n<rect x="39" y="31" width="7" height="1" fill="black"/>\n</svg>\n'],tags:[e,"text"],index:null})},create:t=>{const{createElement:n,compose:s,helpers:m}=t,u=(s.editor,e=>{for(const t in e.style)if(Object.hasOwnProperty.call(e.style,t)){const n=e.style[t];y.style[t]=n}y.classList.contains("autotype-selected")||A.chain().focus().setContent(e.text).run()}),y=document.createElement("div");y.classList.add(w.autoTypeEditing);const g=document.createElement("div"),h=document.createElement("div");h.classList.add(w.caret);const A=(e=>{let{content:t,element:n}=e;return d=new r.KE({element:n,extensions:[l.A,c.A,p.A],editorProps:{},injectCSS:!1,content:t}),d})({element:h,content:s.props.text});A.on("focus",()=>{y.classList.add("autotype-selected")}),A.on("blur",()=>{y.classList.remove("autotype-selected")}),A.on("update",e=>{let{editor:t,transaction:n}=e;if(0===n.steps.length)return;(e=>{s.editor.store().execCommands([{key:"text",value:JSON.parse(JSON.stringify(e))}])})(A.getJSON())}),y.append(g,h);i.H(g);return u(s.props),n({name:e,id:s.id,template:y,resizeable:!0,handleBar:!0,draggable:{group:"element"},defaultProps:{},validator:a({template:y,helpers:m,reRender:()=>{u(s.props)}}),schema:s.schema,onSelect:e=>{y.classList.add(e)},onDeselect:e=>{y.classList.remove(e)},elementProps:s,remove:()=>{y.remove()},createEditor:o})}}}},48135(e,t,n){n.d(t,{A:()=>r});var s=n(82001),o=n.n(s),a=n(40935),i=n.n(a)()(o());i.push([e.id,'\n.ZBsBZOYVC6wCOkoT7OFk {\n background-color: transparent;\n min-width: 1rem;\n min-height: 1em;\n}\n\n.yOO_P1NnvBQ705I1zyUA {\n display: inline-block;\n}\n\n.yOO_P1NnvBQ705I1zyUA::after {\n content: "";\n width: 2px;\n height: 1em;\n background: #ec7fff;\n display: inline-block;\n vertical-align: text-bottom;\n animation: p0oX1Sqo4sKJHs_I1qOK 1.5s steps(2) infinite;\n}\n\n@keyframes p0oX1Sqo4sKJHs_I1qOK {\n 0% {\n opacity: 0;\n }\n}\n',"",{version:3,sources:["webpack://./../web-editors/autotype-editor-component/src/styles.module.css"],names:[],mappings:";AACA;EACE,6BAA6B;EAC7B,eAAe;EACf,eAAe;AACjB;;AAEA;EACE,qBAAqB;AACvB;;AAEA;EACE,WAAW;EACX,UAAU;EACV,WAAW;EACX,mBAAmB;EACnB,qBAAqB;EACrB,2BAA2B;EAC3B,sDAA8C;AAChD;;AAEA;EACE;IACE,UAAU;EACZ;AACF",sourcesContent:['\n.autoTypeEditing {\n background-color: transparent;\n min-width: 1rem;\n min-height: 1em;\n}\n\n.caret {\n display: inline-block;\n}\n\n.caret::after {\n content: "";\n width: 2px;\n height: 1em;\n background: #ec7fff;\n display: inline-block;\n vertical-align: text-bottom;\n animation: cursor-blink 1.5s steps(2) infinite;\n}\n\n@keyframes cursor-blink {\n 0% {\n opacity: 0;\n }\n}\n'],sourceRoot:""}]),i.locals={autoTypeEditing:"ZBsBZOYVC6wCOkoT7OFk",caret:"yOO_P1NnvBQ705I1zyUA","cursor-blink":"p0oX1Sqo4sKJHs_I1qOK"};const r=i},67291(e,t,n){n.d(t,{A:()=>o});var s=n(81318);const o=s.bP.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:e}){return["p",(0,s.KV)(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}})}}]);
Binary file