@creaditor/web-starterkit 1.0.11 → 1.0.13

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 (91) 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/170.creaditor.bundle.js +144 -17
  10. package/dist/170.creaditor.bundle.js.gz +0 -0
  11. package/dist/211.creaditor.bundle.js +1 -1
  12. package/dist/211.creaditor.bundle.js.gz +0 -0
  13. package/dist/2234.creaditor.bundle.js +121 -1
  14. package/dist/2234.creaditor.bundle.js.gz +0 -0
  15. package/dist/2590.creaditor.bundle.js +1 -1
  16. package/dist/2590.creaditor.bundle.js.gz +0 -0
  17. package/dist/2765.creaditor.bundle.js +1 -1
  18. package/dist/2765.creaditor.bundle.js.gz +0 -0
  19. package/dist/2956.creaditor.bundle.js +1 -1
  20. package/dist/2956.creaditor.bundle.js.gz +0 -0
  21. package/dist/3418.creaditor.bundle.js +1 -1
  22. package/dist/3418.creaditor.bundle.js.gz +0 -0
  23. package/dist/353.creaditor.bundle.js +3 -3
  24. package/dist/353.creaditor.bundle.js.gz +0 -0
  25. package/dist/3778.creaditor.bundle.js +1 -0
  26. package/dist/3778.creaditor.bundle.js.gz +0 -0
  27. package/dist/3792.creaditor.bundle.js +1 -0
  28. package/dist/3792.creaditor.bundle.js.gz +0 -0
  29. package/dist/4061.creaditor.bundle.js +1 -1
  30. package/dist/4061.creaditor.bundle.js.gz +0 -0
  31. package/dist/4288.creaditor.bundle.js +10 -10
  32. package/dist/4288.creaditor.bundle.js.gz +0 -0
  33. package/dist/4475.creaditor.bundle.js +1 -1
  34. package/dist/4475.creaditor.bundle.js.gz +0 -0
  35. package/dist/4639.creaditor.bundle.js +1 -1
  36. package/dist/4639.creaditor.bundle.js.gz +0 -0
  37. package/dist/4739.creaditor.bundle.js +1 -1
  38. package/dist/4739.creaditor.bundle.js.gz +0 -0
  39. package/dist/4762.creaditor.bundle.js +3 -3
  40. package/dist/4762.creaditor.bundle.js.gz +0 -0
  41. package/dist/4770.creaditor.bundle.js +3 -3
  42. package/dist/4770.creaditor.bundle.js.gz +0 -0
  43. package/dist/4970.creaditor.bundle.js +7 -7
  44. package/dist/4970.creaditor.bundle.js.gz +0 -0
  45. package/dist/5119.creaditor.bundle.js +5 -5
  46. package/dist/5119.creaditor.bundle.js.gz +0 -0
  47. package/dist/5340.creaditor.bundle.js +19 -18
  48. package/dist/5340.creaditor.bundle.js.gz +0 -0
  49. package/dist/5379.creaditor.bundle.js +70 -0
  50. package/dist/5379.creaditor.bundle.js.gz +0 -0
  51. package/dist/5391.creaditor.bundle.js +1 -1
  52. package/dist/5391.creaditor.bundle.js.gz +0 -0
  53. package/dist/5884.creaditor.bundle.js +91 -0
  54. package/dist/5884.creaditor.bundle.js.gz +0 -0
  55. package/dist/5909.creaditor.bundle.js +644 -0
  56. package/dist/5909.creaditor.bundle.js.gz +0 -0
  57. package/dist/5926.creaditor.bundle.js +26 -28
  58. package/dist/5926.creaditor.bundle.js.gz +0 -0
  59. package/dist/6151.creaditor.bundle.js +1 -1
  60. package/dist/6151.creaditor.bundle.js.gz +0 -0
  61. package/dist/638.creaditor.bundle.js +49 -20
  62. package/dist/638.creaditor.bundle.js.gz +0 -0
  63. package/dist/6713.creaditor.bundle.js +1 -1
  64. package/dist/6713.creaditor.bundle.js.gz +0 -0
  65. package/dist/6814.creaditor.bundle.js +1 -1
  66. package/dist/6814.creaditor.bundle.js.gz +0 -0
  67. package/dist/7209.creaditor.bundle.js +98 -56
  68. package/dist/7209.creaditor.bundle.js.gz +0 -0
  69. package/dist/7564.creaditor.bundle.js +1 -1
  70. package/dist/7564.creaditor.bundle.js.gz +0 -0
  71. package/dist/7937.creaditor.bundle.js +18 -42
  72. package/dist/7937.creaditor.bundle.js.gz +0 -0
  73. package/dist/8141.creaditor.bundle.js +2 -2
  74. package/dist/8141.creaditor.bundle.js.gz +0 -0
  75. package/dist/8250.creaditor.bundle.js +1 -1
  76. package/dist/8250.creaditor.bundle.js.gz +0 -0
  77. package/dist/8646.creaditor.bundle.js +20 -24
  78. package/dist/8646.creaditor.bundle.js.gz +0 -0
  79. package/dist/8654.creaditor.bundle.js +7 -7
  80. package/dist/8654.creaditor.bundle.js.gz +0 -0
  81. package/dist/9041.creaditor.bundle.js +13 -15
  82. package/dist/9041.creaditor.bundle.js.gz +0 -0
  83. package/dist/9431.creaditor.bundle.js +1 -1
  84. package/dist/9431.creaditor.bundle.js.gz +0 -0
  85. package/dist/9694.creaditor.bundle.js +1 -1
  86. package/dist/9694.creaditor.bundle.js.gz +0 -0
  87. package/dist/creaditor.bundle.js +2102 -1589
  88. package/dist/creaditor.bundle.js.gz +0 -0
  89. package/dist/service-worker.js +1 -1
  90. package/dist/service-worker.js.gz +0 -0
  91. 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,20 +1,30 @@
1
- "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[170],{60170(e,t,r){r.r(t),r.d(t,{BreadCrumbs:()=>a});var s=r(5441),o=r(59929),i=r(86319),n=r(58371),c=r(36565);class a extends o.WF{constructor(){super(),this.crumbs=[],this.cover=function(){const e=document.createElement("div");return e.style.position="fixed",e.style.background="var(--primary)",e.style.zIndex=2,e.style.border="1px dashed black",e.style.opacity=.2,e}(),this.currectCrumb={},this.onSubscribe=()=>{let e;this.crumbs=[];const t=c.Ay.components[c.Ay.components.length-1];if(!t)return;if(e=t.element,!e)return void console.error("selectElement not found","#1ppqmvss6");let r=t.type.getElementType(),s="";t.props.as&&(s=` (${i.M.get("lang",t.props.as)||t.props.as})`),this.currectCrumb={type:r,as:s,name:t.props.name,id:t.id};if(e){let t=e;for(;t&&t.parentElement;)if(t=t.parentElement.closest("[data-type]"),t){const e=i.M.get("components",t.dataset.id);let r=!0;e&&"row"!==e.type&&("col"===e.type&&"block"!==e.parent().type&&(r=!1),r&&this.crumbs.unshift({type:e.type,name:e.props.name,id:e.id,element:e.element,compose:e}))}this.dispatchEvent(new CustomEvent("change",[...this.crumbs]))}},this.onSubscribe=this.onSubscribe.bind(this)}updated(){this.toggleAttribute("hidden-crumbs",0===this.crumbs.length)}onHover(e){if(e){const t=e.getBoundingClientRect();this.cover.style.left=t.left+"px",this.cover.style.top=t.top+"px",this.cover.style.width=t.width+"px",this.cover.style.height=t.height+"px",document.body.appendChild(this.cover)}}render(){const e=i.M.get("langConfig","direction");return this.crumbs.length>0?o.qy`
2
- <!-- <cdtr-tooltip content="breadcrumbs_info" .opened=${!0}></cdtr-tooltip> -->
3
- <div>
4
- ${this.crumbs.map((t,r)=>o.qy` <span
5
- @mouseout=${()=>this.cover.remove()}
6
- @mouseover=${()=>this.onHover(t.element)}
7
- @mousedown=${()=>this.clickBread(t)}
8
- class="breadcrumb"
9
- >${t.name||o.qy`<lang-text text=${t.type}></lang-text>`}</span
10
- >${this.crumbs.length===r?null:(0,s.A)(n.D9,{style:{transform:`rotate(${"ltr"===e?"180deg":"0"})`},class:"arrow"})}`)}
11
- ${this.mainText?o.qy` <div class="currect">
12
- ${this.currectCrumb.name||o.qy`<lang-text text=${this.currectCrumb.type}></lang-text
13
- >${this.currectCrumb.as}`}
14
- </div>`:null}
1
+ "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[170],{60170(e,t,o){o.r(t),o.d(t,{BreadCrumbs:()=>i});var r=o(59929),s=o(86319),n=o(36565);class i extends r.WF{constructor(){super(),this.crumbs=[],this._menuOpen=!1,this._menuPos={left:0,top:0},this._collapsed=!1,this._fitScheduled=!1,this.cover=function(){const e=document.createElement("div");return e.style.position="fixed",e.style.background="var(--primary)",e.style.zIndex=2,e.style.border="1px dashed black",e.style.opacity=.2,e}(),this.currectCrumb={},this._onDocMouseDown=e=>{this._menuOpen&&(e.composedPath().includes(this)||this._closeMenu())},this._onDocKeyDown=e=>{this._menuOpen&&"Escape"===e.key&&this._closeMenu()},this.onSubscribe=()=>{let e;this.crumbs=[],this._menuOpen=!1,this._collapsed=!1;const t=n.Ay.components[n.Ay.components.length-1];if(!t)return;if(e=t.element,!e)return void console.error("selectElement not found","#1ppqmvss6");let o=t.type.getElementType(),r="";t.props.as&&(r=` (${s.M.get("lang",t.props.as)||t.props.as})`),this.currectCrumb={type:o,as:r,name:t.props.name,id:t.id};if(e){let t=e;for(;t&&t.parentElement;)if(t=t.parentElement.closest("[data-type]"),t){const e=s.M.get("components",t.dataset.id);let o=!0;e&&"row"!==e.type&&("col"===e.type&&"block"!==e.parent().type&&(o=!1),o&&this.crumbs.unshift({type:e.type,name:e.props.name,id:e.id,element:e.element,compose:e}))}this.dispatchEvent(new CustomEvent("change",[...this.crumbs]))}},this.onSubscribe=this.onSubscribe.bind(this)}updated(){if(this.toggleAttribute("hidden-crumbs",0===this.crumbs.length),!this._collapsed&&this.crumbs.length>1&&!this._fitScheduled&&(this._fitScheduled=!0,requestAnimationFrame(()=>{this._fitScheduled=!1;const e=this.shadowRoot.querySelector(".row");e&&!this._collapsed&&e.scrollWidth>e.clientWidth+1&&(this._collapsed=!0)})),this._menuOpen){const e=this.shadowRoot.querySelector(".crumb-menu");if(e){const t=e.offsetWidth,o=window.innerWidth-t-8,r=Math.max(8,Math.min(this._menuPos.left,o));r!==this._menuPos.left&&(e.style.left=r+"px")}}}_openMenu(){if(this._menuOpen)return void this._closeMenu();const e=this.getBoundingClientRect();this._menuPos={left:e.left,top:e.top},this._menuOpen=!0}_closeMenu(){this._menuOpen=!1}onHover(e){if(e){const t=e.getBoundingClientRect();this.cover.style.left=t.left+"px",this.cover.style.top=t.top+"px",this.cover.style.width=t.width+"px",this.cover.style.height=t.height+"px",document.body.appendChild(this.cover)}}render(){if(0===this.crumbs.length)return"";const e=(e,t,o)=>e||`${s.M.get("lang",t)||t||""}${o||""}`,t=()=>r.qy`<span class="sepc">›</span>`,o=t=>r.qy`<span
2
+ @mouseout=${()=>this.cover.remove()}
3
+ @mouseover=${()=>this.onHover(t.element)}
4
+ @mousedown=${()=>this.clickBread(t)}
5
+ class="breadcrumb"
6
+ >${e(t.name,t.type)}</span>`,n=e(this.currectCrumb.name,this.currectCrumb.type,this.currectCrumb.as),i=this._collapsed,a=this.mainText?r.qy`<span
7
+ class="currect${i?" clickable":""}"
8
+ @mousedown=${()=>{i&&this._openMenu()}}
9
+ >${n}</span
10
+ >`:null,c=this._collapsed,l=r.qy`<span
11
+ class="breadcrumb ellipsis"
12
+ @mousedown=${()=>this._openMenu()}
13
+ >…</span>`,p=c?r.qy`${o(this.crumbs[0])}${t()}${l}${t()}${o(this.crumbs[this.crumbs.length-1])}${t()}`:r.qy`${this.crumbs.map(e=>r.qy`${o(e)}${t()}`)}`,d=this._menuOpen?r.qy`<div
14
+ class="crumb-menu"
15
+ style="left:${this._menuPos.left}px; top:${this._menuPos.top}px;"
16
+ >
17
+ <div class="menu-path">
18
+ ${this.crumbs.map(e=>r.qy`${o(e)}<span class="sepc">›</span>`)}
19
+ <span class="crumb-current">${n}</span>
15
20
  </div>
16
-
17
- `:""}connectedCallback(){super.connectedCallback(),c.Ay.on("select",this.onSubscribe),c.Ay.on("update",this.onSubscribe)}disconnectedCallback(){super.disconnectedCallback(),this.cover.remove(),c.Ay.off("select",this.onSubscribe),c.Ay.off("update",this.onSubscribe)}clickBread(e){this.cover.remove(),c.Ay.clean().selectComponent(e.compose)}}a.styles=o.AH`
21
+ </div>`:null;return r.qy`
22
+ <div class="row ${c?"collapsed":""}">
23
+ ${p}
24
+ ${a}
25
+ </div>
26
+ ${d}
27
+ `}connectedCallback(){super.connectedCallback(),n.Ay.on("select",this.onSubscribe),n.Ay.on("update",this.onSubscribe),document.addEventListener("mousedown",this._onDocMouseDown),document.addEventListener("keydown",this._onDocKeyDown)}disconnectedCallback(){super.disconnectedCallback(),this.cover.remove(),n.Ay.off("select",this.onSubscribe),n.Ay.off("update",this.onSubscribe),document.removeEventListener("mousedown",this._onDocMouseDown),document.removeEventListener("keydown",this._onDocKeyDown)}clickBread(e){this.cover.remove(),n.Ay.clean().selectComponent(e.compose)}}i.styles=r.AH`
18
28
  :host {
19
29
  direction: var(--direction);
20
30
  display: block;
@@ -55,4 +65,121 @@
55
65
  fill: var(--color-text-faint);
56
66
  vertical-align: middle;
57
67
  }
58
- `,a.properties={crumbs:{type:Array},mainText:{type:Boolean,reflect:!0}},customElements.define("cdtr-breadcrumbs",a)}}]);
68
+ .row {
69
+ display: flex;
70
+ align-items: center;
71
+ gap: 2px 8px;
72
+ min-width: 0;
73
+ min-height: 32px;
74
+ white-space: nowrap;
75
+ overflow: hidden;
76
+ }
77
+ .row .breadcrumb,
78
+ .row .currect,
79
+ .sepc {
80
+ flex: 0 0 auto;
81
+ margin: 0;
82
+ }
83
+ /* Cap individual crumb width so a long custom name can't break the row. */
84
+ .row .breadcrumb {
85
+ display: inline-block;
86
+ max-width: 140px;
87
+ overflow: hidden;
88
+ text-overflow: ellipsis;
89
+ vertical-align: middle;
90
+ }
91
+ /* When collapsed, the current element is the last (rightmost) crumb; let it
92
+ shrink and ellipsize so a long name (e.g. "Social Networks") truncates
93
+ cleanly instead of hard-clipping into the panel actions. The full name is
94
+ always one "…" click away. */
95
+ .row.collapsed .currect {
96
+ flex: 0 1 auto;
97
+ min-width: 0;
98
+ overflow: hidden;
99
+ text-overflow: ellipsis;
100
+ }
101
+ /* Collapsed current crumb opens the full-path popover (to read the full,
102
+ possibly-truncated name), so signal it's interactive. */
103
+ .row .currect.clickable {
104
+ cursor: pointer;
105
+ }
106
+ .row .currect.clickable:hover {
107
+ text-decoration: underline;
108
+ }
109
+ .sepc {
110
+ color: var(--color-text-faint);
111
+ font-size: var(--text-xs);
112
+ }
113
+ .ellipsis {
114
+ color: var(--color-text-muted);
115
+ cursor: pointer;
116
+ max-width: none;
117
+ }
118
+ .ellipsis:hover {
119
+ color: var(--color-primary, var(--primary));
120
+ }
121
+
122
+ /* Full-path popover. It opens positioned directly OVER the collapsed row
123
+ (opaque background covers it), so it reads as the breadcrumb expanding
124
+ in place rather than a second breadcrumb below it. Floats (fixed), so
125
+ the panel below never reflows; the extra line paints over the content. */
126
+ .crumb-menu {
127
+ position: fixed;
128
+ z-index: 1000;
129
+ min-width: 170px;
130
+ max-width: 300px;
131
+ background: var(--color-surface, #fff);
132
+ border: 1px solid var(--color-border, #e9e9e9);
133
+ border-radius: 6px;
134
+ box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
135
+ /* Unfold from the breadcrumb's start (top-left) so it reads as the
136
+ row expanding in place, not a menu dropping in. */
137
+ transform-origin: top left;
138
+ animation: crumb-menu-in 140ms cubic-bezier(0.2, 0, 0, 1);
139
+ }
140
+ @keyframes crumb-menu-in {
141
+ from {
142
+ opacity: 0;
143
+ transform: translateY(-2px) scale(0.97);
144
+ }
145
+ to {
146
+ opacity: 1;
147
+ transform: translateY(0) scale(1);
148
+ }
149
+ }
150
+ @media (prefers-reduced-motion: reduce) {
151
+ .crumb-menu {
152
+ animation: none;
153
+ }
154
+ }
155
+ /* The full breadcrumb laid out horizontally, wrapping onto extra lines —
156
+ same visual language as the row, just complete. */
157
+ .crumb-menu .menu-path {
158
+ display: flex;
159
+ flex-wrap: wrap;
160
+ align-items: center;
161
+ gap: 4px 8px;
162
+ padding: 6px 12px 8px;
163
+ }
164
+ .crumb-menu .menu-path .breadcrumb {
165
+ display: inline-block;
166
+ max-width: 170px;
167
+ margin: 0;
168
+ overflow: hidden;
169
+ text-overflow: ellipsis;
170
+ vertical-align: middle;
171
+ }
172
+ .crumb-menu .menu-path .sepc {
173
+ color: var(--color-text-faint);
174
+ font-size: var(--text-xs);
175
+ }
176
+ .crumb-menu .menu-path .crumb-current {
177
+ font-size: var(--text-xs);
178
+ font-family: var(--font-family);
179
+ font-weight: 600;
180
+ color: var(--color-primary, var(--primary));
181
+ max-width: 170px;
182
+ overflow: hidden;
183
+ text-overflow: ellipsis;
184
+ }
185
+ `,i.properties={crumbs:{type:Array},mainText:{type:Boolean,reflect:!0},_menuOpen:{type:Boolean,state:!0},_menuPos:{type:Object,state:!0},_collapsed:{type:Boolean,state:!0}},customElements.define("cdtr-breadcrumbs",i)}}]);
Binary file
@@ -1 +1 @@
1
- "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[211],{70211(e,t,n){var i=n(59929),a=n(21421),s=n(12106);class c extends i.WF{constructor(){super(),this.containerRef=(0,a._)(),this.containerId="particles-"+(0,s.A)(),this.config={particles:{number:{value:20},color:{value:"#ffffff"},shape:{type:"circle",stroke:{width:0,color:"#000000"},polygon:{nb_sides:5}},opacity:{value:.5,random:!1,anim:{enable:!1,speed:1,opacity_min:.1,sync:!1}},size:{value:10,random:!0,anim:{enable:!1,speed:80,size_min:.1,sync:!1}},line_linked:{enable:!0,distance:300,color:"#484554",opacity:.4,width:2},move:{enable:!0,speed:5,direction:"none",random:!1,straight:!1,out_mode:"out",bounce:!1,attract:{enable:!1,rotateX:600,rotateY:1200}}},interactivity:{detect_on:"canvas",events:{onhover:{enable:!1,mode:"repulse"},onclick:{enable:!0,mode:"push"},resize:!0},modes:{grab:{distance:800,line_linked:{opacity:1}},bubble:{distance:800,size:80,duration:2,opacity:.8,speed:3},repulse:{distance:400,duration:.4},push:{particles_nb:4},remove:{particles_nb:2}}},retina_detect:!0}}createRenderRoot(){return this}render(){return i.qy`<div id=${this.containerId} ${(0,a.K)(this.containerRef)}></div>`}connectedCallback(){super.connectedCallback(),n.e(3545).then(n.t.bind(n,5926,23)).then(()=>{setTimeout(()=>{particlesJS(this.containerId,this.config)},0)})}disconnectedCallback(){super.disconnectedCallback()}}c.properties={name:{}},c.styles=i.AH``,customElements.define("cdtr-particlesjs",c)}}]);
1
+ "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[211],{70211(e,n,t){t.r(n),t.d(n,{ParticlesJsBackground:()=>s});var i=t(59929),a=t(21421),o=t(12106);class s extends i.WF{constructor(){super(),this.containerRef=(0,a._)(),this.containerId="particles-"+(0,o.A)(),this.config={particles:{number:{value:20},color:{value:"#ffffff"},shape:{type:"circle",stroke:{width:0,color:"#000000"},polygon:{nb_sides:5}},opacity:{value:.5,random:!1,anim:{enable:!1,speed:1,opacity_min:.1,sync:!1}},size:{value:10,random:!0,anim:{enable:!1,speed:80,size_min:.1,sync:!1}},line_linked:{enable:!0,distance:300,color:"#484554",opacity:.4,width:2},move:{enable:!0,speed:5,direction:"none",random:!1,straight:!1,out_mode:"out",bounce:!1,attract:{enable:!1,rotateX:600,rotateY:1200}}},interactivity:{detect_on:"canvas",events:{onhover:{enable:!1,mode:"repulse"},onclick:{enable:!0,mode:"push"},resize:!0},modes:{grab:{distance:800,line_linked:{opacity:1}},bubble:{distance:800,size:80,duration:2,opacity:.8,speed:3},repulse:{distance:400,duration:.4},push:{particles_nb:4},remove:{particles_nb:2}}},retina_detect:!0}}createRenderRoot(){return this}render(){return i.qy`<div id=${this.containerId} ${(0,a.K)(this.containerRef)}></div>`}connectedCallback(){super.connectedCallback(),t.e(3545).then(t.t.bind(t,5926,23)).then(()=>{setTimeout(()=>{Array.isArray(window.pJSDom)||(window.pJSDom=[]),particlesJS(this.containerId,this.config)},0)})}disconnectedCallback(){super.disconnectedCallback();try{const e=window.pJSDom||[],n=[];for(let t=0;t<e.length;t++){const i=e[t]?.pJS?.canvas?.el;i&&i.parentElement&&i.parentElement.id===this.containerId?e[t].pJS.fn.vendors.destroypJS():n.push(e[t])}window.pJSDom=n}catch(e){Array.isArray(window.pJSDom)||(window.pJSDom=[])}}}s.properties={name:{}},s.styles=i.AH``,customElements.define("cdtr-particlesjs",s)}}]);
Binary file