@creaditor/web-starterkit 1.0.10 → 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 (84) 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 +86 -42
  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 +21 -20
  10. package/dist/170.creaditor.bundle.js.gz +0 -0
  11. package/dist/2234.creaditor.bundle.js +121 -1
  12. package/dist/2234.creaditor.bundle.js.gz +0 -0
  13. package/dist/2765.creaditor.bundle.js +1 -1
  14. package/dist/2765.creaditor.bundle.js.gz +0 -0
  15. package/dist/2956.creaditor.bundle.js +1 -1
  16. package/dist/2956.creaditor.bundle.js.gz +0 -0
  17. package/dist/3418.creaditor.bundle.js +1 -1
  18. package/dist/3418.creaditor.bundle.js.gz +0 -0
  19. package/dist/3778.creaditor.bundle.js +1 -0
  20. package/dist/3778.creaditor.bundle.js.gz +0 -0
  21. package/dist/3792.creaditor.bundle.js +1 -0
  22. package/dist/3792.creaditor.bundle.js.gz +0 -0
  23. package/dist/4061.creaditor.bundle.js +1 -1
  24. package/dist/4061.creaditor.bundle.js.gz +0 -0
  25. package/dist/4288.creaditor.bundle.js +10 -10
  26. package/dist/4288.creaditor.bundle.js.gz +0 -0
  27. package/dist/453.creaditor.bundle.js +11 -111
  28. package/dist/453.creaditor.bundle.js.LICENSE.txt +5 -0
  29. package/dist/453.creaditor.bundle.js.gz +0 -0
  30. package/dist/4569.creaditor.bundle.js +3 -3
  31. package/dist/4569.creaditor.bundle.js.gz +0 -0
  32. package/dist/4639.creaditor.bundle.js +1 -1
  33. package/dist/4639.creaditor.bundle.js.gz +0 -0
  34. package/dist/4739.creaditor.bundle.js +1 -1
  35. package/dist/4739.creaditor.bundle.js.gz +0 -0
  36. package/dist/4762.creaditor.bundle.js +3 -3
  37. package/dist/4762.creaditor.bundle.js.gz +0 -0
  38. package/dist/4770.creaditor.bundle.js +3 -3
  39. package/dist/4770.creaditor.bundle.js.gz +0 -0
  40. package/dist/4970.creaditor.bundle.js +1316 -0
  41. package/dist/4970.creaditor.bundle.js.gz +0 -0
  42. package/dist/5119.creaditor.bundle.js +34 -1
  43. package/dist/5119.creaditor.bundle.js.gz +0 -0
  44. package/dist/5340.creaditor.bundle.js +30 -29
  45. package/dist/5340.creaditor.bundle.js.gz +0 -0
  46. package/dist/5884.creaditor.bundle.js +91 -0
  47. package/dist/5884.creaditor.bundle.js.gz +0 -0
  48. package/dist/5926.creaditor.bundle.js +9 -5
  49. package/dist/5926.creaditor.bundle.js.gz +0 -0
  50. package/dist/6151.creaditor.bundle.js +1 -1
  51. package/dist/6151.creaditor.bundle.js.gz +0 -0
  52. package/dist/638.creaditor.bundle.js +49 -20
  53. package/dist/638.creaditor.bundle.js.gz +0 -0
  54. package/dist/6713.creaditor.bundle.js +1 -1
  55. package/dist/6713.creaditor.bundle.js.gz +0 -0
  56. package/dist/6814.creaditor.bundle.js +1 -1
  57. package/dist/6814.creaditor.bundle.js.gz +0 -0
  58. package/dist/7209.creaditor.bundle.js +98 -56
  59. package/dist/7209.creaditor.bundle.js.gz +0 -0
  60. package/dist/752.creaditor.bundle.js +4 -4
  61. package/dist/752.creaditor.bundle.js.gz +0 -0
  62. package/dist/7564.creaditor.bundle.js +1 -1
  63. package/dist/7564.creaditor.bundle.js.gz +0 -0
  64. package/dist/7937.creaditor.bundle.js +20 -17
  65. package/dist/7937.creaditor.bundle.js.gz +0 -0
  66. package/dist/8250.creaditor.bundle.js +1 -1
  67. package/dist/8250.creaditor.bundle.js.gz +0 -0
  68. package/dist/8646.creaditor.bundle.js +20 -24
  69. package/dist/8646.creaditor.bundle.js.gz +0 -0
  70. package/dist/8654.creaditor.bundle.js +7 -7
  71. package/dist/8654.creaditor.bundle.js.gz +0 -0
  72. package/dist/9041.creaditor.bundle.js +13 -15
  73. package/dist/9041.creaditor.bundle.js.gz +0 -0
  74. package/dist/9431.creaditor.bundle.js +1 -1
  75. package/dist/9431.creaditor.bundle.js.gz +0 -0
  76. package/dist/9694.creaditor.bundle.js +1 -1
  77. package/dist/9694.creaditor.bundle.js.gz +0 -0
  78. package/dist/9994.creaditor.bundle.js +114 -0
  79. package/dist/9994.creaditor.bundle.js.gz +0 -0
  80. package/dist/creaditor.bundle.js +968 -583
  81. package/dist/creaditor.bundle.js.gz +0 -0
  82. package/dist/service-worker.js +1 -1
  83. package/dist/service-worker.js.gz +0 -0
  84. package/package.json +1 -1
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
@@ -1 +1 @@
1
- "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[4061],{84061(e,t,n){n.d(t,{default:()=>f});const r=e=>{const{component:t,commands:n}=e;return{select:e=>{let{changeTab:t,tab:n}=e;n.text||t("iframe")},tabs:e=>{const t=[{text:"iframe",selected:!0},{text:"design"},{text:"settings"}];return e?(t.forEach(t=>t.selected=t.text===e),t):t},layout:e=>{let{tab:r}=e;return[{type:"info",text:"this_is_empty_iframe_start_add_url_link",active:()=>"iframe"===r.text},{type:"input",title:"urlAddress",active:()=>"iframe"===r.text,value:t.props.src||"",onChange:e=>{const t=e.target.value;n.execCommand("src",t)}},{type:"slider",title:"width",min:100,max:1200,active:()=>"design"===r.text,value:parseInt(t.props.style?.width,10)||400,onInput:e=>{const t=e.target.value;n.execCommand("style",{width:t+"px"})}},{type:"slider",title:"height",min:100,max:800,active:()=>"design"===r.text,value:parseInt(t.props.style?.height,10)||300,onInput:e=>{const t=e.target.value;n.execCommand("style",{height:t+"px"})}}]}}},a=e=>{let{helpers:t}=e;return{set:(e,n,r)=>{switch(n){case"style":return e[n]=t.deepMerge(e[n],r),!0;case"src":return e[n]=r,!0;default:return!1}}}};var s=n(72591),i=n.n(s),o=n(88639),l=n.n(o),A=n(88128),d=n.n(A),c=n(30855),m=n.n(c),p=n(93051),h=n.n(p),u=n(22800),C={};C.setAttributes=m(),C.insert=d().bind(null,"head"),C.domAPI=l(),C.insertStyleElement=h();i()(u.A,C);const g=u.A&&u.A.locals?u.A.locals:void 0,f=()=>{const e="iframe";return{name:e,create:t=>{const{createElement:n,compose:s,helpers:i}=t,{arrayToString:o,mergeDiff:l}=i,A=document.createElement("div");A.setAttribute("data-id",s.id),A.setAttribute("draggable-element","element"),A.setAttribute("droppable-element","element"),A.className=o("iframe-component",g.main);const d=document.createElement("div");d.style.cssText="position:relative;max-width:100%;height:100%;width:100%;",A.appendChild(d);const c=document.createElement("iframe");c.style.cssText="width:100%;height:100%;border:none;",d.appendChild(c);const m=document.createElement("div");m.className=g.emptyIframeHolder;const p=document.createElement("h1");p.setAttribute("align","center");const h=document.createElement("lang-text");h.setAttribute("text","this_is_empty_iframe_start_add_url_link"),p.appendChild(h),m.appendChild(p),d.appendChild(m);return n({name:e,id:s.id,template:A,defaultProps:{style:{display:"block",margin:"auto",width:"400px",height:"300px"},src:""},draggable:{group:"element"},droppable:{group:"element"},render:()=>{l(c,{style:s.props.style,src:s.props.src||""}),s.props.src?m.style.display="none":m.style.display="flex"},resizeable:()=>d,handleBar:!0,validator:a({helpers:i}),schema:s.schema,onSelect:e=>{A.classList.add(e)},onDeselect:e=>{A.classList.remove(e)},elementProps:s,remove:()=>{A.remove()},createEditor:r})}}}},22800(e,t,n){n.d(t,{A:()=>o});var r=n(82001),a=n.n(r),s=n(40935),i=n.n(s)()(a());i.push([e.id,'.dwbwX3rm1rCfFBXzg4l5 {\n position: relative;\n width: 100%;\n}\n\n.dwbwX3rm1rCfFBXzg4l5:hover::after {\n content: "";\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n background: #000;\n background: var(--primary, #000);\n opacity: 0.1;\n z-index: 9;\n}\n\n.dwbwX3rm1rCfFBXzg4l5 iframe {\n width: 100%;\n height: 100%;\n border: none;\n}\n\n.TNFcnLszwFUVJerzzPS8 {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n z-index: 15;\n gap: 15px;\n}\n\n.TNFcnLszwFUVJerzzPS8 h1 {\n font-size: 1.2rem;\n font-weight: 500;\n color: rgba(0, 0, 0, 0.72);\n}\n',"",{version:3,sources:["webpack://./../web-editors/iframe-editor-component/lib/style.module.css"],names:[],mappings:"AAAA;EACE,kBAAkB;EAClB,WAAW;AACb;;AAEA;EACE,WAAW;EACX,kBAAkB;EAClB,OAAO;EACP,MAAM;EACN,WAAW;EACX,YAAY;EACZ,gBAAgC;EAAhC,gCAAgC;EAChC,YAAY;EACZ,UAAU;AACZ;;AAEA;EACE,WAAW;EACX,YAAY;EACZ,YAAY;AACd;;AAEA;EACE,kBAAkB;EAClB,SAAS;EACT,QAAQ;EACR,gCAAgC;EAChC,aAAa;EACb,uBAAuB;EACvB,mBAAmB;EACnB,sBAAsB;EACtB,WAAW;EACX,SAAS;AACX;;AAEA;EACE,iBAAiB;EACjB,gBAAgB;EAChB,0BAA0B;AAC5B",sourcesContent:['.main {\n position: relative;\n width: 100%;\n}\n\n.main:hover::after {\n content: "";\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n background: var(--primary, #000);\n opacity: 0.1;\n z-index: 9;\n}\n\n.main iframe {\n width: 100%;\n height: 100%;\n border: none;\n}\n\n.emptyIframeHolder {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n z-index: 15;\n gap: 15px;\n}\n\n.emptyIframeHolder h1 {\n font-size: 1.2rem;\n font-weight: 500;\n color: rgba(0, 0, 0, 0.72);\n}\n'],sourceRoot:""}]),i.locals={main:"dwbwX3rm1rCfFBXzg4l5",emptyIframeHolder:"TNFcnLszwFUVJerzzPS8"};const o=i}}]);
1
+ "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[4061],{84061(e,t,n){n.d(t,{default:()=>g});const r=e=>{const{component:t,commands:n}=e;return{select:e=>{let{changeTab:t,tab:n}=e;n.text||t("iframe")},tabs:e=>{const t=[{text:"iframe",selected:!0},{text:"style"},{text:"settings"}];return e?(t.forEach(t=>t.selected=t.text===e),t):t},layout:e=>{let{tab:r}=e;return[{type:"info",text:"this_is_empty_iframe_start_add_url_link",active:()=>"iframe"===r.text},{type:"input",title:"urlAddress",active:()=>"iframe"===r.text,value:t.props.src||"",onChange:e=>{const t=e.target.value;n.execCommand("src",t)}},{type:"slider",title:"width",min:100,max:1200,active:()=>"style"===r.text,value:parseInt(t.props.style?.width,10)||400,onInput:e=>{const t=e.target.value;n.execCommand("style",{width:t+"px"})}},{type:"slider",title:"height",min:100,max:800,active:()=>"style"===r.text,value:parseInt(t.props.style?.height,10)||300,onInput:e=>{const t=e.target.value;n.execCommand("style",{height:t+"px"})}}]}}},a=e=>{let{helpers:t}=e;return{set:(e,n,r)=>{switch(n){case"style":return e[n]=t.deepMerge(e[n],r),!0;case"src":return e[n]=r,!0;default:return!1}}}};var s=n(72591),i=n.n(s),o=n(88639),l=n.n(o),A=n(88128),d=n.n(A),c=n(30855),m=n.n(c),p=n(93051),h=n.n(p),u=n(22800),C={};C.setAttributes=m(),C.insert=d().bind(null,"head"),C.domAPI=l(),C.insertStyleElement=h();i()(u.A,C);const f=u.A&&u.A.locals?u.A.locals:void 0,g=()=>{const e="iframe";return{name:e,create:t=>{const{createElement:n,compose:s,helpers:i}=t,{arrayToString:o,mergeDiff:l}=i,A=document.createElement("div");A.setAttribute("data-id",s.id),A.setAttribute("draggable-element","element"),A.setAttribute("droppable-element","element"),A.className=o("iframe-component",f.main);const d=document.createElement("div");d.style.cssText="position:relative;max-width:100%;height:100%;width:100%;",A.appendChild(d);const c=document.createElement("iframe");c.style.cssText="width:100%;height:100%;border:none;",d.appendChild(c);const m=document.createElement("div");m.className=f.emptyIframeHolder;const p=document.createElement("h1");p.setAttribute("align","center");const h=document.createElement("lang-text");h.setAttribute("text","this_is_empty_iframe_start_add_url_link"),p.appendChild(h),m.appendChild(p),d.appendChild(m);return n({name:e,id:s.id,template:A,defaultProps:{style:{display:"block",margin:"auto",width:"400px",height:"300px"},src:""},draggable:{group:"element"},droppable:{group:"element"},render:()=>{l(c,{style:s.props.style,src:s.props.src||""}),s.props.src?m.style.display="none":m.style.display="flex"},resizeable:()=>d,handleBar:!0,validator:a({helpers:i}),schema:s.schema,onSelect:e=>{A.classList.add(e)},onDeselect:e=>{A.classList.remove(e)},elementProps:s,remove:()=>{A.remove()},createEditor:r})}}}},22800(e,t,n){n.d(t,{A:()=>o});var r=n(82001),a=n.n(r),s=n(40935),i=n.n(s)()(a());i.push([e.id,'.dwbwX3rm1rCfFBXzg4l5 {\n position: relative;\n width: 100%;\n}\n\n.dwbwX3rm1rCfFBXzg4l5:hover::after {\n content: "";\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n background: #000;\n background: var(--primary, #000);\n opacity: 0.1;\n z-index: 9;\n}\n\n.dwbwX3rm1rCfFBXzg4l5 iframe {\n width: 100%;\n height: 100%;\n border: none;\n}\n\n.TNFcnLszwFUVJerzzPS8 {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n z-index: 15;\n gap: 15px;\n}\n\n.TNFcnLszwFUVJerzzPS8 h1 {\n font-size: 1.2rem;\n font-weight: 500;\n color: rgba(0, 0, 0, 0.72);\n}\n',"",{version:3,sources:["webpack://./../web-editors/iframe-editor-component/lib/style.module.css"],names:[],mappings:"AAAA;EACE,kBAAkB;EAClB,WAAW;AACb;;AAEA;EACE,WAAW;EACX,kBAAkB;EAClB,OAAO;EACP,MAAM;EACN,WAAW;EACX,YAAY;EACZ,gBAAgC;EAAhC,gCAAgC;EAChC,YAAY;EACZ,UAAU;AACZ;;AAEA;EACE,WAAW;EACX,YAAY;EACZ,YAAY;AACd;;AAEA;EACE,kBAAkB;EAClB,SAAS;EACT,QAAQ;EACR,gCAAgC;EAChC,aAAa;EACb,uBAAuB;EACvB,mBAAmB;EACnB,sBAAsB;EACtB,WAAW;EACX,SAAS;AACX;;AAEA;EACE,iBAAiB;EACjB,gBAAgB;EAChB,0BAA0B;AAC5B",sourcesContent:['.main {\n position: relative;\n width: 100%;\n}\n\n.main:hover::after {\n content: "";\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n background: var(--primary, #000);\n opacity: 0.1;\n z-index: 9;\n}\n\n.main iframe {\n width: 100%;\n height: 100%;\n border: none;\n}\n\n.emptyIframeHolder {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n z-index: 15;\n gap: 15px;\n}\n\n.emptyIframeHolder h1 {\n font-size: 1.2rem;\n font-weight: 500;\n color: rgba(0, 0, 0, 0.72);\n}\n'],sourceRoot:""}]),i.locals={main:"dwbwX3rm1rCfFBXzg4l5",emptyIframeHolder:"TNFcnLszwFUVJerzzPS8"};const o=i}}]);
Binary file
@@ -1,4 +1,4 @@
1
- "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[4288],{64288(t,e,o){o.r(e),o.d(e,{ElementHandleBar:()=>r});var i=o(59929),s=o(86319),n=o(90142);class r extends i.WF{constructor(){super(),this.show_click_message=!0,this.onRemove=this.onRemove.bind(this)}onRemove(){const t={detail:this.closest(this.target),bubbles:!0,composed:!0};this.dispatchEvent(new CustomEvent("remove",t))}onClone(){const t={detail:this.closest(this.target),bubbles:!0,composed:!0};this.dispatchEvent(new CustomEvent("clone",t))}render(){const t="20",e="20",o=s.M.get("config","editor","configure","onSaveBlock");return i.qy`<cdtr-row
1
+ "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[4288],{64288(t,e,o){o.r(e),o.d(e,{ElementHandleBar:()=>n});var s=o(59929),i=o(86319),r=o(90142);class n extends s.WF{constructor(){super(),this.show_click_message=!0,this.onRemove=this.onRemove.bind(this)}onRemove(){const t={detail:this.closest(this.target),bubbles:!0,composed:!0};this.dispatchEvent(new CustomEvent("remove",t))}onClone(){const t={detail:this.closest(this.target),bubbles:!0,composed:!0};this.dispatchEvent(new CustomEvent("clone",t))}render(){const t="20",e="20",o=i.M.get("config","editor","configure","onSaveBlock");return s.qy`<cdtr-row
2
2
  alignItems="center"
3
3
  justify="space-evenly"
4
4
  class="wrapper"
@@ -37,7 +37,7 @@
37
37
  ></cdtr-dupicate-icon>
38
38
  </cdtr-tooltip>
39
39
  </div>
40
- ${o&&i.qy` <div class="button" @mouseup=${n.A}>
40
+ ${o&&s.qy` <div class="button" @mouseup=${r.A}>
41
41
  <cdtr-tooltip content="save_block">
42
42
  <svg
43
43
  xmlns="http://www.w3.org/2000/svg"
@@ -57,14 +57,14 @@
57
57
  <cdtr-remove-icon width=${t} height=${e}></cdtr-remove-icon>
58
58
  </cdtr-tooltip>
59
59
  </div>
60
- </cdtr-row>`}}r.properties={target:{type:String},show_click_message:{type:Boolean}},r.styles=i.AH`
60
+ </cdtr-row>`}}n.properties={target:{type:String},show_click_message:{type:Boolean}},n.styles=s.AH`
61
61
  :host {
62
62
  position: absolute;
63
63
  top: 0;
64
64
  right: 0;
65
65
  height: 25px;
66
66
  background: transparent;
67
- z-index: 101;
67
+ z-index: var(--z-dropdown, 100);
68
68
  display: flex;
69
69
  align-items: center;
70
70
  width: 40%;
@@ -73,16 +73,16 @@
73
73
  .wrapper {
74
74
  position: absolute;
75
75
  right: 0;
76
- padding: 5px;
76
+ padding: var(--space-1, 4px);
77
77
  height: 100%;
78
78
  width: auto;
79
- box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;
79
+ box-shadow: var(--shadow-sm);
80
80
  transform: translateY(-30%);
81
- background: #fff;
82
- border-radius: 0.2rem;
81
+ background: var(--color-bg, #fff);
82
+ border-radius: var(--radius-sm, 6px);
83
83
  }
84
84
  .button {
85
- padding: 1px 7px;
85
+ padding: var(--space-1, 4px) var(--space-2, 8px);
86
86
  min-width: auto;
87
87
  }
88
88
 
@@ -95,4 +95,4 @@
95
95
  .drag_block:active {
96
96
  cursor: grabbing !important;
97
97
  }
98
- `,customElements.define("cdtr-element-handle-bar",r)}}]);
98
+ `,customElements.define("cdtr-element-handle-bar",n)}}]);
Binary file
@@ -1,114 +1,14 @@
1
- "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[453],{74726(p,x,r){function e(p){try{return function(p){const x=p.split(/ (?![^(]*\))/);let r="",e=0,t=0,a=0,o=0,i=!1;for(let p of x)p=p.trim(),"inset"===p?i=!0:p.endsWith("px")||p.endsWith("em")?0===t?t=parseFloat(p):0===e?e=parseFloat(p):0===a?a=parseFloat(p):0===o&&(o=parseFloat(p)):(p.includes("rgb")||p.includes("#"))&&(r=p);return[{color:r,offsetY:e,offsetX:t,blurRadius:a,spreadRadius:o,inset:i}]}(p)}catch(p){console.error(p)}}r.d(x,{A:()=>e})},50742(p,x,r){r.d(x,{P:()=>e});const e=[{rule:"rgba(149, 157, 165, 0.2) 0px 8px 24px;"},{rule:"rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;"},{rule:"rgba(0, 0, 0, 0.15) 1.95px 1.95px 2.6px;"},{rule:"rgba(0, 0, 0, 0.35) 0px 5px 15px;"},{rule:"rgba(0, 0, 0, 0.16) 0px 1px 4px;"},{rule:"rgba(0, 0, 0, 0.24) 0px 3px 8px;"},{rule:"rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;"},{rule:"rgba(0, 0, 0, 0.16) 0px 1px 4px, rgb(51, 51, 51) 0px 0px 0px 3px;"},{rule:"rgba(0, 0, 0, 0.02) 0px 1px 3px 0px, rgba(27, 31, 35, 0.15) 0px 0px 0px 1px;"},{rule:"rgba(0, 0, 0, 0.1) 0px 4px 12px;"},{rule:"rgba(0, 0, 0, 0.25) 0px 54px 55px, rgba(0, 0, 0, 0.12) 0px -12px 30px, rgba(0, 0, 0, 0.12) 0px 4px 6px, rgba(0, 0, 0, 0.17) 0px 12px 13px, rgba(0, 0, 0, 0.09) 0px -3px 5px;"},{rule:"rgba(0, 0, 0, 0.05) 0px 6px 24px 0px, rgba(0, 0, 0, 0.08) 0px 0px 0px 1px;"},{rule:"rgba(0, 0, 0, 0.05) 0px 6px 24px 0px, rgba(0, 0, 0, 0.08) 0px 0px 0px 1px;"},{rule:"rgba(0, 0, 0, 0.16) 0px 10px 36px 0px, rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;"},{rule:"rgba(17, 12, 46, 0.15) 0px 48px 100px 0px;"},{rule:"rgba(50, 50, 93, 0.25) 0px 50px 100px -20px, rgba(0, 0, 0, 0.3) 0px 30px 60px -30px, rgba(10, 37, 64, 0.35) 0px -2px 6px 0px inset;"},{rule:"rgba(255, 255, 255, 0.1) 0px 1px 1px 0px inset, rgba(50, 50, 93, 0.25) 0px 50px 100px -20px, rgba(0, 0, 0, 0.3) 0px 30px 60px -30px;"},{rule:"rgba(0, 0, 0, 0.16) 0px 10px 36px 0px, rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;"},{rule:"rgba(50, 50, 93, 0.25) 0px 50px 100px -20px, rgba(0, 0, 0, 0.3) 0px 30px 60px -30px;"},{rule:"rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;"},{rule:"rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;"},{rule:"rgb(38, 57, 77) 0px 20px 30px -10px;"},{rule:"rgba(6, 24, 44, 0.4) 0px 0px 0px 2px, rgba(6, 24, 44, 0.65) 0px 4px 6px -1px, rgba(255, 255, 255, 0.08) 0px 1px 0px inset;"},{rule:"rgba(50, 50, 93, 0.25) 0px 6px 12px -2px, rgba(0, 0, 0, 0.3) 0px 3px 7px -3px;"},{rule:"rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;"},{rule:"rgba(50, 50, 93, 0.25) 0px 30px 60px -12px, rgba(0, 0, 0, 0.3) 0px 18px 36px -18px;"},{rule:"rgba(50, 50, 93, 0.25) 0px 30px 60px -12px inset, rgba(0, 0, 0, 0.3) 0px 18px 36px -18px inset;"},{rule:"rgba(50, 50, 93, 0.25) 0px 50px 100px -20px, rgba(0, 0, 0, 0.3) 0px 30px 60px -30px;"},{rule:"rgba(0, 0, 0, 0.12) 0px 1px 3px, rgba(0, 0, 0, 0.24) 0px 1px 2px;"},{rule:"rgba(0, 0, 0, 0.16) 0px 3px 6px, rgba(0, 0, 0, 0.23) 0px 3px 6px;"},{rule:"rgba(0, 0, 0, 0.19) 0px 10px 20px, rgba(0, 0, 0, 0.23) 0px 6px 6px;"},{rule:"rgba(0, 0, 0, 0.25) 0px 14px 28px, rgba(0, 0, 0, 0.22) 0px 10px 10px;"},{rule:"rgba(0, 0, 0, 0.3) 0px 19px 38px, rgba(0, 0, 0, 0.22) 0px 15px 12px;"},{rule:"rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 2px 6px 2px;"},{rule:"rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 1px 3px 1px;"},{rule:"rgba(0, 0, 0, 0.05) 0px 0px 0px 1px;"},{rule:"rgba(0, 0, 0, 0.05) 0px 1px 2px 0px;"},{rule:"rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px;"},{rule:"rgba(0, 0, 0, 0.1) 0px 4px 6px -1px, rgba(0, 0, 0, 0.06) 0px 2px 4px -1px;"},{rule:"rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px;"},{rule:"rgba(0, 0, 0, 0.1) 0px 20px 25px -5px, rgba(0, 0, 0, 0.04) 0px 10px 10px -5px;"},{rule:"rgba(0, 0, 0, 0.25) 0px 25px 50px -12px;"},{rule:"rgba(0, 0, 0, 0.06) 0px 2px 4px 0px inset;"},{rule:"rgba(0, 0, 0, 0.1) 0px 0px 5px 0px, rgba(0, 0, 0, 0.1) 0px 0px 1px 0px;"},{rule:"rgba(0, 0, 0, 0.07) 0px 1px 2px, rgba(0, 0, 0, 0.07) 0px 2px 4px, rgba(0, 0, 0, 0.07) 0px 4px 8px, rgba(0, 0, 0, 0.07) 0px 8px 16px, rgba(0, 0, 0, 0.07) 0px 16px 32px, rgba(0, 0, 0, 0.07) 0px 32px 64px;"},{rule:"rgba(0, 0, 0, 0.09) 0px 2px 1px, rgba(0, 0, 0, 0.09) 0px 4px 2px, rgba(0, 0, 0, 0.09) 0px 8px 4px, rgba(0, 0, 0, 0.09) 0px 16px 8px, rgba(0, 0, 0, 0.09) 0px 32px 16px;"},{rule:"rgba(0, 0, 0, 0.2) 0px 18px 50px -10px;"},{rule:"rgba(0, 0, 0, 0.1) 0px 10px 50px;"},{rule:"rgba(240, 46, 170, 0.4) -5px 5px, rgba(240, 46, 170, 0.3) -10px 10px, rgba(240, 46, 170, 0.2) -15px 15px, rgba(240, 46, 170, 0.1) -20px 20px, rgba(240, 46, 170, 0.05) -25px 25px;"},{rule:"rgba(240, 46, 170, 0.4) 0px 5px, rgba(240, 46, 170, 0.3) 0px 10px, rgba(240, 46, 170, 0.2) 0px 15px, rgba(240, 46, 170, 0.1) 0px 20px, rgba(240, 46, 170, 0.05) 0px 25px;"},{rule:"rgba(240, 46, 170, 0.4) 5px 5px, rgba(240, 46, 170, 0.3) 10px 10px, rgba(240, 46, 170, 0.2) 15px 15px, rgba(240, 46, 170, 0.1) 20px 20px, rgba(240, 46, 170, 0.05) 25px 25px;"}]},50453(p,x,r){r.r(x),r.d(x,{BoxShadowEditor:()=>m});var e,t,a,o,i,d,l=r(59088),s=r(36936),n=r(59929),b=r(49410),g=r(86319),u=r(50742),c=r(74726);const h=r(36565).Ay,w="#000 0px 0px 0px 0px",f={};let m=(e=(0,b.MZ)({type:String}),t=(0,b.MZ)({type:String}),(d=class extends n.WF{constructor(){super(),(0,l.A)(this,"value",o,this),(0,l.A)(this,"boxShadow",i,this),this.tabName=void 0,this.theme=void 0,this.onChangeBoxShadow=(p,x)=>{const r={color:f.color,offsetY:f.offsetY,offsetX:f.offsetX,blurRadius:f.blurRadius,spreadRadius:f.spreadRadius,inset:!!f.inset};if(void 0!==r[p]&&("string"==typeof x||"number"==typeof x||"boolean"==typeof x)){r[p]=x,f[p]=x;const e=`${r.offsetX}px ${r.offsetY}px ${r.blurRadius}px ${r.spreadRadius}px ${r.color} ${r.inset?"inset":""}`;this.changeBoxShadowValue(e)}},this.tabName="design",this.theme=g.M.get("theme"),this.removeBoxShadow=this.removeBoxShadow.bind(this),this.onChangeBoxShadow=this.onChangeBoxShadow.bind(this)}changeBoxShadowValue(p){h.store().execCommand("style",{boxShadow:p}),this.boxShadow=this.value=p}removeBoxShadow(){h.store().execCommand("style",{boxShadow:w}),this.boxShadow=this.value=w}connectedCallback(){super.connectedCallback(),r.e(1456).then(r.bind(r,11456)),r.e(5666).then(r.bind(r,35666))}disconnectedCallback(){super.disconnectedCallback()}createRenderRoot(){return this}changeTab(p){this.tabName=p.target.value}render(){if(void 0===this.value||this.value!==this.boxShadow){this.value||(this.value=w),this.boxShadow=this.value;const p=(0,c.A)(this.value);Array.isArray(p)&&p.length>0?(f.offsetX=p[0].offsetX,f.offsetY=p[0].offsetY,f.blurRadius=p[0].blurRadius,f.spreadRadius=p[0].spreadRadius,f.color=p[0].color,f.inset=p[0].inset):(f.offsetX=0,f.offsetY=0,f.blurRadius=0,f.spreadRadius=0,f.color="#000",f.inset=void 0)}return n.qy`
2
- <cdtr-editor-container>
3
- <cdtr-row alignItems="center" justify="space-between">
4
- <cdtr-col>
5
- <cdtr-title>
6
- <lang-text text="box-shadow"></lang-text>
7
- </cdtr-title>
8
- </cdtr-col>
9
- <cdtr-col sm="2">
10
- ${this.boxShadow!==w?n.qy` <paper-button
11
- style="min-width:40px;padding:0;"
12
- @click=${this.removeBoxShadow}
13
- ><cdtr-icon icon="x"></cdtr-icon
14
- ></paper-button>`:null}
15
- </cdtr-col>
16
- <cdtr-col sm="3">
17
- <cdtr-dropdown custom overflow maxHeight="900px" top=${200}>
18
- <paper-button slot="trigger"
19
- ><cdtr-box-shadow-icon
20
- .iconStyle="box-shadow:${this.value};"
21
- ></cdtr-box-shadow-icon
22
- ></paper-button>
23
- <div slot="content">
24
- <div>
25
- ${"design"===this.tabName?n.qy`
26
- <cdtr-editor-container>
27
- <h1 class="mb-2">
28
- <lang-text
29
- whiteSpace="break-spaces"
30
- text="box-shadow"
31
- ></lang-text>
32
- </h1>
33
- <cdtr-width-editor
34
- text="horizontal_shadow_length"
35
- unit="px"
36
- max="200"
37
- min="-200"
38
- .value=${f.offsetX}
39
- @input=${p=>this.onChangeBoxShadow("offsetX",p.target.value)}
40
- ></cdtr-width-editor>
41
- </cdtr-editor-container>
42
- <cdtr-editor-container>
43
- <cdtr-width-editor
44
- text="vertical_shadow_length"
45
- unit="px"
46
- max="400"
47
- min="-400"
48
- .value=${f.offsetY}
49
- @input=${p=>this.onChangeBoxShadow("offsetY",p.target.value)}
50
- ></cdtr-width-editor>
51
- </cdtr-editor-container>
52
- <cdtr-editor-container>
53
- <cdtr-width-editor
54
- text="blur_radius"
55
- unit="px"
56
- max="400"
57
- min="0"
58
- .value=${f.blurRadius}
59
- @input=${p=>this.onChangeBoxShadow("blurRadius",p.target.value)}
60
- ></cdtr-width-editor>
61
- </cdtr-editor-container>
62
- <cdtr-editor-container>
63
- <cdtr-width-editor
64
- text="spread_radius"
65
- unit="px"
66
- max="200"
67
- min="-200"
68
- .value=${f.spreadRadius}
69
- @input=${p=>this.onChangeBoxShadow("spreadRadius",p.target.value)}
70
- ></cdtr-width-editor>
71
- </cdtr-editor-container>
72
- <cdtr-editor-container>
73
- <cdtr-colorpicker-editor
74
- @input=${p=>this.onChangeBoxShadow("color",p.target.value)}
75
- .value=${f.color}
76
- text="shadow_color"
77
- ></cdtr-colorpicker-editor>
78
- </cdtr-editor-container>
79
-
80
- <cdtr-editor-container>
81
- <cdtr-row justify="space-between" alignItems="center">
82
- <cdtr-title
83
- ><lang-text text="inset"></lang-text
84
- ></cdtr-title>
85
- <cdtr-toggle
86
- @change=${p=>this.onChangeBoxShadow("inset",!p.target.checked)}
87
- ></cdtr-toggle>
88
- </cdtr-row>
89
- </cdtr-editor-container>
90
- `:null}
91
- ${"gallery"===this.tabName?n.qy`<cdtr-row
92
- style="overflow-y: auto;
93
- max-height: 90vh;max-width:500px;"
94
- justify="center"
95
- spacing="10px"
96
- >
97
- ${u.P.map(p=>n.qy` <cdtr-col sm="5" style="height:120px;"
98
- ><paper-button
99
- @click=${()=>this.changeBoxShadowValue(p.rule)}
100
- style="box-shadow:${p.rule};margin:0 25px;width:90%;height:90%;"
101
- ></paper-button
102
- ></cdtr-col>`)}
103
- </cdtr-row>`:null}
104
- </div>
105
- </div>
106
- </cdtr-dropdown>
107
- </cdtr-col>
108
- </cdtr-row>
109
- </cdtr-editor-container>
110
- `}}).styles=n.AH`
1
+ /*! For license information please see 453.creaditor.bundle.js.LICENSE.txt */
2
+ "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[453],{70453(t,e,s){s.r(e),s.d(e,{TitleEditor:()=>o});var n=s(59929),r=s(70980);class o extends n.WF{constructor(){super(),this.pb="6px"}render(){const t={fontWeight:this.bold?700:400,paddingBottom:this.pb};return n.qy`<span style=${(0,r.W)(t)}><slot></slot></span>`}}o.styles=n.AH`
111
3
  :host {
4
+ display: block;
5
+ font-size: 13px;
6
+ font-weight: 500;
7
+ color: var(--text-dark-color);
8
+ font-family: var(--font-family);
9
+ -webkit-font-smoothing: antialiased;
10
+ text-align: var(--text-align-locale);
112
11
  direction: var(--direction-locale);
12
+ user-select: none;
113
13
  }
114
- `,a=d,o=(0,s.A)(a.prototype,"value",[e],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),i=(0,s.A)(a.prototype,"boxShadow",[t],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),a);customElements.define("cdtr-box-shadow-editor",m)}}]);
14
+ `,o.properties={bold:{type:Boolean},pb:{type:String}},customElements.define("cdtr-title",o)},70980(t,e,s){s.d(e,{W:()=>l});var n=s(80181),r=s(16655);const o="important",i=" !"+o,l=(0,r.u$)(class extends r.WL{constructor(t){if(super(t),t.type!==r.OA.ATTRIBUTE||"style"!==t.name||t.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce((e,s)=>{const n=t[s];return null==n?e:e+`${s=s.includes("-")?s:s.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${n};`},"")}update(t,[e]){const{style:s}=t.element;if(void 0===this.ft)return this.ft=new Set(Object.keys(e)),this.render(e);for(const t of this.ft)null==e[t]&&(this.ft.delete(t),t.includes("-")?s.removeProperty(t):s[t]=null);for(const t in e){const n=e[t];if(null!=n){this.ft.add(t);const e="string"==typeof n&&n.endsWith(i);t.includes("-")||e?s.setProperty(t,e?n.slice(0,-11):n,e?o:""):s[t]=n}}return n.c0}})}}]);
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2018 Google LLC
4
+ * SPDX-License-Identifier: BSD-3-Clause
5
+ */
Binary file
@@ -788,7 +788,7 @@
788
788
  </cdtr-row>
789
789
  </div>
790
790
  </div>
791
- `}}}customElements.get("paper-button")||Promise.resolve().then(i.bind(i,39239)),customElements.get("cdtr-emoji-picker")||i.e(3105).then(i.t.bind(i,63105,23));class x extends(v(s.WF)){constructor(){super(),this.inputRef=(0,a._)(),this.onBlur=this.onBlur.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.urlInputFocused=!1,this._urlInputRawValue="",this._lastSyncedMyHref=void 0,this._lastBodySyncHref=void 0,this.lastUrl=void 0,this.target="_blank",this.anchors=[],this.event=new UIEvent("change",{view:window,bubbles:!0,cancelable:!0}),this.options=c,this.body="",this.subject="",this.name=o.M.get("lang",c[0].text),this.initAutomations()}onDispatch(){const t=function(t){const{href:e,protocol:i,params:s,body:o,subject:r,target:n,dispatchEvent:a,event:l}=t;if(!e)return a(l),{dispatched:!0};const c=g(e,i,s,o,r,n);return c?{dispatched:!0,href:c.url,protocol:c.protocol,params:c.params,value:c.url,link:c.url,lastUrl:c.url}:{dispatched:!1}}({href:this.href,protocol:this.protocol,params:this.params,body:this.body,subject:this.subject,target:this.target,dispatchEvent:this.dispatchEvent.bind(this),event:this.event});if(t.dispatched){if(t.href){this.href=t.href,this.protocol=t.protocol,this.params=t.params?{...t.params}:{},this.value=t.value,this.link=t.link,this.lastUrl=t.lastUrl;const e="string"==typeof t.href?t.href:t.href?.href;this._urlInputRawValue=null!=e&&""!==e?String(e):""}this.dispatchEvent(this.event)}}onChangeLink(t){const e=t.target.value;this._urlInputRawValue=e;const i=y(e,this.protocol,this.href);null!==i?(this.href=i.href,this.protocol=i.protocol,i.clearParams&&(this.body="",this.subject=""),void 0!==i.body&&(this.body=i.body),void 0!==i.subject&&(this.subject=i.subject),i.shouldBlur&&this.onBlur()):this.href=e}onKeyDown(t){if("submit"===t.type){const t=this.inputRef?.value;void 0!==t?.value&&this.onChangeLink({target:{value:t.value}}),t&&"function"==typeof t.success&&t.success(),this.onDispatch()}}onUrlInputFocus(){const t=this.inputRef?.value?.value;null!=t&&(this._urlInputRawValue=t),this.urlInputFocused=!0}onUrlInputBlur(){this.urlInputFocused=!1,this.hasButton||this.onDispatch()}onBlur(){this.hasButton||this.onDispatch()}onClickOk(){this.onDispatch()}onChangeTarget(t){const e={target:t.target.value};this.target=e.target,t.stopPropagation(),!this.hasButton&&this.href&&this.onBlur()}resolveAnchors(){this.anchors=function(){const t=o.M.get("components");return t?.filter(t=>"anchor"===t.type&&t.props.name||t.props.element_ID)||[]}()}onChangeType(t){const e=function(t,e,i,s){const o=e.find(e=>e.type===t);if(!o)return{forceProtocolChange:!1};const r="anchor"===o.text,n=s!==o.type;return setTimeout(()=>{i&&i.value&&i.value.focus()},500),{protocol:o.type,forceProtocolChange:!0,shouldResolveAnchors:r,clearParams:n}}(t,this.options,this.inputRef,this.protocol);if(e.shouldResolveAnchors&&this.resolveAnchors(),this.protocol=e.protocol,this.forceProtocolChange=e.forceProtocolChange,e.clearParams&&(this.body="",this.subject=""),e.forceProtocolChange){const t=new r.A(this.href,{protocol:this.protocol});t.protocol=this.protocol,this.href=t,this.onBlur()}}connectedCallback(){super.connectedCallback(),this.href=new r.A(this.href);const t=String(this.href?.href||"").match(/^\[\[([^\]]+)\]\]\?/),e=this.href&&this.href.params&&this.href.params[p];(t||e)&&this.parseAutomationLink(this.href)}render(){const t=o.M.get("config","editor","configure","editorProps","linkPicker","savedVariables");this.resolveAnchors();const e=this.lastUrl!==this.href,i=new r.A(this.href,{protocol:e?null:this.protocol});this.protocol&&!e?i.protocol=this.protocol:i.protocol&&(this.protocol=i.protocol);const n=String(this.href?.href||this.href||"");if(this._lastBodySyncHref!==n){this._lastBodySyncHref=n,i.params?(this.body=i.params.text||i.params.body||"",this.subject=i.params.subject||""):(this.body="",this.subject="");n.match(/^\[\[([^\]]+)\]\]\?/)||i.params&&i.params[p]?(this.selectedAutomation=null,this.activeAutomationId=null,this.selectedMailingLists=[],this.selectedMailingListsForAdd=[],this.selectedMailingListsForRemove=[],this.automationAction=null,this.showAutomations=!0,this.parseAutomationLink(this.href)):(this.showAutomations=!1,this.selectedAutomation=null,this.activeAutomationId=null,this.selectedMailingLists=[],this.selectedMailingListsForAdd=[],this.selectedMailingListsForRemove=[],this.automationAction=null)}const l=function(t,e,i){let s=[];return t.isEmail?s=[]:t.isPhone?s=i.filter(t=>("tel:"===t.type||"sms:"===t.type||"whatsapp:"===t.type)&&t.type!==e):-1!==t.href.indexOf("http://")&&"https:"!==e&&(s=[{type:"https:",text:o.M.get("lang","is_user_wants_https"),reccomanded:!0}]),"anchor:"===e&&(s=[]),s}(i,this.protocol,this.options);let c=i.href;const h=String(i.href||""),d=h.match(/^\[\[([^\]]+)\]\]\?/),m=i.params&&i.params[p];if(d)c=h;else if(m){const t=u,e=[];i.params&&Object.keys(i.params).forEach(s=>{if(!t.includes(s)){const t=i.params[s];e.push(`${s}=${encodeURIComponent(t).replace(/%24/g,"$")}`)}});const s=i.url||"";c=i.protocol?"http:"===i.protocol||"https:"===i.protocol?`${i.protocol}//${s}`:`${i.protocol}${s}`:s,e.length>0&&(c+=`?${e.join("&")}`)}const g=function(t){switch(t){case"mailto:":return"what_the_email_address";case"tel:":return"what_the_phone_number";case"sms:":case"whatsapp:":return"what_the_phone_number_to_send_msg";case"anchor:":return"what_the_anchor_name";case"file:":return"what_the_file_name";default:return"what_the_url_address"}}(this.protocol),y=[...this.options],v=y.findIndex(t=>"http:"===t.type);v>-1&&y.splice(v,1);const x=o.M.get("config","editor","configure","editorProps","automations"),w={url:i,href:this.href,protocol:this.protocol,anchors:this.anchors,body:this.body,subject:this.subject,onChangeLink:this.onChangeLink.bind(this),onBlur:this.onBlur.bind(this),onRequest:this.onRequest,updateBody:t=>{this.body=t},updateSubject:t=>{this.subject=t}},$=null!=c&&""!==c?String(c):"",A=this._urlInputRawValue!==$,k=void 0!==this._lastSyncedMyHref&&$!==this._lastSyncedMyHref,_=this.urlInputFocused&&this._urlInputRawValue&&$&&!k;A&&!_?(this._urlInputRawValue=$,this._lastSyncedMyHref=$):A||(this._lastSyncedMyHref=$);const R=this.urlInputFocused&&void 0!==this._urlInputRawValue?this._urlInputRawValue:c,S={protocol:this.protocol,url:i,autofocus:this.autofocus,inputRef:(0,a.K)(this.inputRef),onChangeLink:this.onChangeLink.bind(this),onBlur:this.onUrlInputBlur.bind(this),onFocus:this.onUrlInputFocus.bind(this),onKeyDown:this.onKeyDown.bind(this),myHref:R};return this.showAutomations?s.qy` <div class="root">${this.renderAutomationsView()}</div>`:s.qy` <div class="root">
791
+ `}}}customElements.get("paper-button")||Promise.resolve().then(i.bind(i,39239)),customElements.get("cdtr-emoji-picker")||i.e(3105).then(i.t.bind(i,63105,23));class x extends(v(s.WF)){constructor(){super(),this.inputRef=(0,a._)(),this.onBlur=this.onBlur.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.urlInputFocused=!1,this._urlInputRawValue="",this._lastSyncedMyHref=void 0,this._lastBodySyncHref=void 0,this.lastUrl=void 0,this.target="_blank",this.anchors=[],this.event=new UIEvent("change",{view:window,bubbles:!0,cancelable:!0}),this.options=c,this.body="",this.subject="",this.name=o.M.get("lang",c[0].text),this.initAutomations()}onDispatch(){const t=function(t){const{href:e,protocol:i,params:s,body:o,subject:r,target:n,dispatchEvent:a,event:l}=t;if(!e)return a(l),{dispatched:!0};const c=g(e,i,s,o,r,n);return c?{dispatched:!0,href:c.url,protocol:c.protocol,params:c.params,value:c.url,link:c.url,lastUrl:c.url}:{dispatched:!1}}({href:this.href,protocol:this.protocol,params:this.params,body:this.body,subject:this.subject,target:this.target,dispatchEvent:this.dispatchEvent.bind(this),event:this.event});if(t.dispatched){if(t.href){this.href=t.href,this.protocol=t.protocol,this.params=t.params?{...t.params}:{},this.value=t.value,this.link=t.link,this.lastUrl=t.lastUrl;const e="string"==typeof t.href?t.href:t.href?.href;this._urlInputRawValue=null!=e&&""!==e?String(e):""}this.dispatchEvent(this.event)}}onChangeLink(t){const e=t.target.value;this._urlInputRawValue=e;const i=y(e,this.protocol,this.href);null!==i?(this.href=i.href,this.protocol=i.protocol,i.clearParams&&(this.body="",this.subject=""),void 0!==i.body&&(this.body=i.body),void 0!==i.subject&&(this.subject=i.subject),i.shouldBlur&&this.onBlur()):this.href=e}onKeyDown(t){if("submit"===t.type){const t=this.inputRef?.value;void 0!==t?.value&&this.onChangeLink({target:{value:t.value}}),t&&"function"==typeof t.success&&t.success(),this.onDispatch()}}onUrlInputFocus(){const t=this.inputRef?.value?.value;null!=t&&(this._urlInputRawValue=t),this.urlInputFocused=!0}onUrlInputBlur(){this.urlInputFocused=!1,this.hasButton||this.onDispatch()}onBlur(){this.hasButton||this.onDispatch()}onClickOk(){this.onDispatch()}onChangeTarget(t){const e={target:t.target.value};this.target=e.target,t.stopPropagation(),!this.hasButton&&this.href&&this.onBlur()}resolveAnchors(){this.anchors=function(){const t=o.M.get("components");return t?.filter(t=>"anchor"===t.type&&t.props.name||t.props.element_ID)||[]}()}onChangeType(t){const e=function(t,e,i,s){const o=e.find(e=>e.type===t);if(!o)return{forceProtocolChange:!1};const r="anchor"===o.text,n=s!==o.type;return setTimeout(()=>{i&&i.value&&i.value.focus()},500),{protocol:o.type,forceProtocolChange:!0,shouldResolveAnchors:r,clearParams:n}}(t,this.options,this.inputRef,this.protocol);if(e.shouldResolveAnchors&&this.resolveAnchors(),this.protocol=e.protocol,this.forceProtocolChange=e.forceProtocolChange,e.clearParams&&(this.body="",this.subject=""),e.forceProtocolChange){const t=new r.A(this.href,{protocol:this.protocol});t.protocol=this.protocol,this.href=t,this.onBlur()}}connectedCallback(){super.connectedCallback(),this.href=new r.A(this.href);const t=String(this.href?.href||"").match(/^\[\[([^\]]+)\]\]\?/),e=this.href&&this.href.params&&this.href.params[p];(t||e)&&this.parseAutomationLink(this.href)}render(){const t=o.M.get("config","editor","configure","editorProps","linkPicker","savedVariables");this.resolveAnchors();const e=this.lastUrl!==this.href,i=new r.A(this.href,{protocol:e?null:this.protocol});this.protocol&&!e?i.protocol=this.protocol:i.protocol&&(this.protocol=i.protocol);const n=String(this.href?.href||this.href||"");if(this._lastBodySyncHref!==n){this._lastBodySyncHref=n,i.params?(this.body=i.params.text||i.params.body||"",this.subject=i.params.subject||""):(this.body="",this.subject="");n.match(/^\[\[([^\]]+)\]\]\?/)||i.params&&i.params[p]?(this.selectedAutomation=null,this.activeAutomationId=null,this.selectedMailingLists=[],this.selectedMailingListsForAdd=[],this.selectedMailingListsForRemove=[],this.automationAction=null,this.showAutomations=!0,this.parseAutomationLink(this.href)):(this.showAutomations=!1,this.selectedAutomation=null,this.activeAutomationId=null,this.selectedMailingLists=[],this.selectedMailingListsForAdd=[],this.selectedMailingListsForRemove=[],this.automationAction=null)}const l=function(t,e,i){let s=[];return t.isEmail?s=[]:t.isPhone?s=i.filter(t=>("tel:"===t.type||"sms:"===t.type||"whatsapp:"===t.type)&&t.type!==e):-1!==t.href.indexOf("http://")&&"https:"!==e&&(s=[{type:"https:",text:o.M.get("lang","is_user_wants_https"),reccomanded:!0}]),"anchor:"===e&&(s=[]),s}(i,this.protocol,this.options);let c=i.href;const h=String(i.href||""),d=h.match(/^\[\[([^\]]+)\]\]\?/),m=i.params&&i.params[p];if(d)c=h;else if(m){const t=u,e=[];i.params&&Object.keys(i.params).forEach(s=>{if(!t.includes(s)){const t=i.params[s];e.push(`${s}=${encodeURIComponent(t).replace(/%24/g,"$")}`)}});const s=i.url||"";c=i.protocol?"http:"===i.protocol||"https:"===i.protocol?`${i.protocol}//${s}`:`${i.protocol}${s}`:s,e.length>0&&(c+=`?${e.join("&")}`)}const g=function(t){switch(t){case"mailto:":return"what_the_email_address";case"tel:":return"what_the_phone_number";case"sms:":case"whatsapp:":return"what_the_phone_number_to_send_msg";case"anchor:":return"what_the_anchor_name";case"file:":return"what_the_file_name";default:return"what_the_url_address"}}(this.protocol),y=[...this.options],v=y.findIndex(t=>"http:"===t.type);v>-1&&y.splice(v,1);const x=o.M.get("config","editor","configure","editorProps","automations"),w={url:i,href:this.href,protocol:this.protocol,anchors:this.anchors,body:this.body,subject:this.subject,onChangeLink:this.onChangeLink.bind(this),onBlur:this.onBlur.bind(this),onRequest:this.onRequest,updateBody:t=>{this.body=t},updateSubject:t=>{this.subject=t}},$=null!=c&&""!==c?String(c):"",A=this._urlInputRawValue!==$,k=void 0!==this._lastSyncedMyHref&&$!==this._lastSyncedMyHref,_=this.urlInputFocused&&this._urlInputRawValue&&$&&!k;A&&!_?(this._urlInputRawValue=$,this._lastSyncedMyHref=$):A||(this._lastSyncedMyHref=$);const S=this.urlInputFocused&&void 0!==this._urlInputRawValue?this._urlInputRawValue:c,R={protocol:this.protocol,url:i,autofocus:this.autofocus,inputRef:(0,a.K)(this.inputRef),onChangeLink:this.onChangeLink.bind(this),onBlur:this.onUrlInputBlur.bind(this),onFocus:this.onUrlInputFocus.bind(this),onKeyDown:this.onKeyDown.bind(this),myHref:S};return this.showAutomations?s.qy` <div class="root">${this.renderAutomationsView()}</div>`:s.qy` <div class="root">
792
792
  ${j=this.label,j?s.qy`<cdtr-title
793
793
  style="font-weight: 700;
794
794
  font-size: 14.4px;
@@ -852,7 +852,7 @@
852
852
  <cdtr-title class="explain-title"
853
853
  ><lang-text .text="${g}"></lang-text
854
854
  ></cdtr-title>
855
- ${function(t){const{protocol:e,url:i,autofocus:s,inputRef:o,onChangeLink:r,onBlur:n,onFocus:a,onKeyDown:l,myHref:c}=t;return"anchor:"===e?null:b({value:c,inputRef:o,autofocus:s,onChange:r,onBlur:n,onFocus:a,onKeyDown:l})}(S)}
855
+ ${function(t){const{protocol:e,url:i,autofocus:s,inputRef:o,onChangeLink:r,onBlur:n,onFocus:a,onKeyDown:l,myHref:c}=t;return"anchor:"===e?null:b({value:c,inputRef:o,autofocus:s,onChange:r,onBlur:n,onFocus:a,onKeyDown:l})}(R)}
856
856
  ${f(this.protocol,w)}
857
857
  ${x?s.qy` <cdtr-divider></cdtr-divider>
858
858
  <cdtr-row justify="flex-start" mt="1">
@@ -884,4 +884,4 @@
884
884
  <lang-text text="add_now"></lang-text>
885
885
  </paper-button>
886
886
  </cdtr-row>`:null}
887
- </div>`;var U,L,C,I,M,F,q,j}}x.styles=n,x.properties={href:{type:String,reflect:!0},value:{type:Object},protocol:{type:String},name:{type:String},label:{type:String},target:{type:String},hasButton:{type:Boolean},params:{type:Object},explain:{type:String},anchors:{type:Array},link:{},body:{type:String},subject:{type:String},autofocus:{type:Boolean},onRequest:{type:Function}},customElements.get("cdtr-link-element")||customElements.define("cdtr-link-element",x)},88385(t,e,i){i.d(e,{A:()=>a});const s=t=>!(!t||!t.match(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/)),o=t=>!(!t||!t.replace("-","").match(/^[+]*[(]{0,1}[0-9]{9,9}[)]{0,1}[-\s\./0-9]*$/g)&&!t.match(/[0-9]{3}-[0-9]{3}-[0-9]{4}/));function r(t){const e={},i=/([^&=]+)=?([^&]*)/g,s=t=>{try{return decodeURIComponent(t.replace(/\+/g," "))}catch(e){return t.replace(/\+/g," ")}},o=t.indexOf("?");let r,n=-1!==o?t.substring(o+1):"";for(;null!==(r=i.exec(n));){const t=s(r[1]),i=s(r[2]);t&&(e[t]=i)}return e}function n(t){if(!t)return"";let e=t.replace(/^[^:]+:(?:\/\/)?/,"");return e=e.replace(/^\/+/,""),e=e.split("?")[0],encodeURIComponent(e).replace(/%24/g,"$")}class a{static getProtocol(t){if(!t)return"";const e=t.indexOf(":");return e>0?t.slice(0,e):""}constructor(t,e){if(this.protocol="",this.href="",this.fullHref="",this.target="_self",this.isEmail=!1,this.isPhone=!1,this.isAnchor=!1,this.url="",this.isValid=!0,this.params={},"string"==typeof t?this.href=t:t&&"object"==typeof t&&Object.assign(this,t),/^\[\[[^\]]+\]\]\?/.test(this.href)){const t=this.href;this.isValid=!1,this.protocol=e?.protocol??"",this.isEmail=!1,this.isPhone=!1,this.isAnchor=!1,this.params={...this.params,...e?.params,...r(t)};const i=t.indexOf("?");return this.url=i>-1?t.slice(0,i):t,this.href=t,void(this.fullHref=t)}this.isValid=this.isValidUrl(this.href),this.protocol=e?.protocol??a.getProtocol(this.href);const i=function(t){if(!t)return"";let e=t.replace(/^[^:]+:(?:\/\/)?/,"");return e=e.replace(/^\/+/,""),e=e.split("?")[0],e}(this.href);if(this.isEmail=s(i),this.isPhone=o(i),this.protocol||(this.isEmail?this.protocol="mailto:":this.isPhone?this.protocol="tel:":this.isValid&&(this.protocol="https:")),this.isAnchor=this.href.startsWith("#"),e?.target){if(!["_blank","_self","_parent","_top"].includes(e.target))throw new Error(`Url: invalid target "${e.target}"`);this.target=e.target}this.params={...this.params,...e?.params,...r(this.href)},this.url=n(this.href),this.protocol&&!this.protocol.endsWith(":")&&(this.protocol+=":");const l="http:"===this.protocol||"https:"===this.protocol;this.href=l?`${this.protocol}//${this.url}`:this.protocol+this.url,this.fullHref=this.getUrlWithParams(),this.href=this.getUrlWithParams()}addParam(t,e){this.href=this.href.replace(new RegExp(`${t}=[^&]*`),`${t}=${e}`),this.params[t]=e}getUrlWithParams(){let t,e="";try{t=decodeURIComponent(this.url)}catch(e){t=this.url}if(Object.keys(this.params).length>0){t+="?",e="?";for(const i in this.params){const s=this.params[i],o=encodeURIComponent(i).replace(/%24/g,"$");if(s){const i=encodeURIComponent(s).replace(/%24/g,"$");t+=`${o}=${i}&`,e+=`${o}=${i}&`}else t+=`${o}&`,e+=`${o}&`}t=t.slice(0,-1)}const i=t=>{try{return decodeURIComponent(t)}catch{return t}};if(this.protocol&&("http:"===this.protocol||"https:"===this.protocol))return i(this.protocol+"//"+t);if("whatsapp:"===this.protocol){const s=this.extractPhoneFromTextUsingRegex(t);return s.length>0?i("https://wa.me/"+s[0]+e):i("https://wa.me/"+e)}return i(this.protocol+t)}extractPhoneFromTextUsingRegex(t){if(!t)return[];const e=[...t.matchAll(/(?:whatsapp:([^?\s]+)|\+?[\d\s\-\(\)\.]{7,20})/g)];return Array.from(new Set(e.map(t=>t[1]||t[0]).filter(t=>{const e=t.replace(/\D/g,"");return e.length>=7&&e.length<=15}).map(t=>t.trim())))}isValidUrl(t){if(!t)return!1;return/^(https?:\/\/)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}(\/.*)?$/.test(t)}}a.resetURL=n}}]);
887
+ </div>`;var U,L,C,I,M,F,q,j}}x.styles=n,x.properties={href:{type:String,reflect:!0},value:{type:Object},protocol:{type:String},name:{type:String},label:{type:String},target:{type:String},hasButton:{type:Boolean},params:{type:Object},explain:{type:String},anchors:{type:Array},link:{},body:{type:String},subject:{type:String},autofocus:{type:Boolean},onRequest:{type:Function}},customElements.get("cdtr-link-element")||customElements.define("cdtr-link-element",x)},88385(t,e,i){i.d(e,{A:()=>a});const s=t=>!(!t||!t.match(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/)),o=t=>!(!t||!t.replace("-","").match(/^[+]*[(]{0,1}[0-9]{9,9}[)]{0,1}[-\s\./0-9]*$/g)&&!t.match(/[0-9]{3}-[0-9]{3}-[0-9]{4}/));function r(t){const e={},i=/([^&=]+)=?([^&]*)/g,s=t=>{try{return decodeURIComponent(t.replace(/\+/g," "))}catch(e){return t.replace(/\+/g," ")}},o=t.indexOf("?");let r,n=-1!==o?t.substring(o+1):"";for(;null!==(r=i.exec(n));){const t=s(r[1]),i=s(r[2]);t&&(e[t]=i)}return e}function n(t){if(!t)return"";let e=t.replace(/^[^:]+:(?:\/\/)?/,"");return e=e.replace(/^\/+/,""),e=e.split("?")[0],encodeURIComponent(e).replace(/%24/g,"$")}class a{static getProtocol(t){if(!t)return"";const e=t.indexOf(":");return e>0?t.slice(0,e):""}constructor(t,e){if(this.protocol="",this.href="",this.fullHref="",this.target="_self",this.isEmail=!1,this.isPhone=!1,this.isAnchor=!1,this.url="",this.isValid=!0,this.params={},"string"==typeof t?this.href=t:t&&"object"==typeof t&&Object.assign(this,t),/^\[\[[^\]]+\]\]\?/.test(this.href)){const t=this.href;this.isValid=!1,this.protocol=e?.protocol??"",this.isEmail=!1,this.isPhone=!1,this.isAnchor=!1,this.params={...this.params,...e?.params,...r(t)};const i=t.indexOf("?");return this.url=i>-1?t.slice(0,i):t,this.href=t,void(this.fullHref=t)}this.isValid=this.isValidUrl(this.href),this.protocol=e?.protocol??a.getProtocol(this.href);const i=function(t){if(!t)return"";let e=t.replace(/^[^:]+:(?:\/\/)?/,"");return e=e.replace(/^\/+/,""),e=e.split("?")[0],e}(this.href);if(this.isEmail=s(i),this.isPhone=o(i),this.protocol||(this.isEmail?this.protocol="mailto:":this.isPhone?this.protocol="tel:":this.isValid&&(this.protocol="https:")),this.isAnchor=this.href.startsWith("#"),e?.target){if(!["_blank","_self","_parent","_top"].includes(e.target))throw new Error(`Url: invalid target "${e.target}"`);this.target=e.target}this.params={...this.params,...e?.params,...r(this.href)},this.url=n(this.href),this.protocol&&!this.protocol.endsWith(":")&&(this.protocol+=":");const l="http:"===this.protocol||"https:"===this.protocol;this.href=l?`${this.protocol}//${this.url}`:this.protocol+this.url,this.fullHref=this.getUrlWithParams(),this.href=this.getUrlWithParams()}addParam(t,e){this.params[t]=e,this.href=this.getUrlWithParams()}getUrlWithParams(){let t,e="";try{t=decodeURIComponent(this.url)}catch(e){t=this.url}if(Object.keys(this.params).length>0){t+="?",e="?";for(const i in this.params){const s=this.params[i],o=encodeURIComponent(i).replace(/%24/g,"$");if(s){const i=encodeURIComponent(s).replace(/%24/g,"$");t+=`${o}=${i}&`,e+=`${o}=${i}&`}else t+=`${o}&`,e+=`${o}&`}t=t.slice(0,-1)}const i=t=>{try{return decodeURIComponent(t)}catch{return t}};if(this.protocol&&("http:"===this.protocol||"https:"===this.protocol))return i(this.protocol+"//"+t);if("whatsapp:"===this.protocol){const s=this.extractPhoneFromTextUsingRegex(t);return s.length>0?i("https://wa.me/"+s[0]+e):i("https://wa.me/"+e)}return i(this.protocol+t)}extractPhoneFromTextUsingRegex(t){if(!t)return[];const e=[...t.matchAll(/(?:whatsapp:([^?\s]+)|\+?[\d\s\-\(\)\.]{7,20})/g)];return Array.from(new Set(e.map(t=>t[1]||t[0]).filter(t=>{const e=t.replace(/\D/g,"");return e.length>=7&&e.length<=15}).map(t=>t.trim())))}isValidUrl(t){if(!t)return!1;return/^(https?:\/\/)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}(\/.*)?$/.test(t)}}a.resetURL=n}}]);
Binary file
@@ -1 +1 @@
1
- "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[4639],{84639(e,t,r){r.d(t,{default:()=>i});const s=e=>{const{component:t,commands:r}=e;return{select:e=>{let{changeTab:t,tab:r}=e;r.text||t("qr")},tabs:e=>{const t=[{text:"qr",selected:!0},{text:"design"},{text:"settings"}];return e?(t.forEach(t=>t.selected=t.text===e),t):t},layout:e=>{let{tab:s}=e;return[{type:"linkpicker",href:t.props.link,protocol:t.props.link?.protocol,target:t.props.link?.target,autofocus:!0,active:()=>"qr"===s.text,title:"QR link",onChange:e=>{const t=e.target.value;r.execCommand("link",t)}},{type:"slider",title:"size",min:100,max:600,active:()=>"design"===s.text,value:parseInt(t.props.size,10)||200,onInput:e=>{const t=parseInt(e.target.value,10);r.execCommand("size",t),r.execCommand("style",{width:t+"px",height:t+"px"})}}]}}},n=e=>{let{helpers:t}=e;return{set:(e,r,s)=>{switch(r){case"style":return e[r]=t.deepMerge(e[r],s),!0;case"link":case"size":return e[r]=s,!0;default:return!1}}}},a=200;const i=()=>({name:"qr",create:e=>{const{createElement:t,compose:r,helpers:i}=e,{mergeDiff:l}=i,o=document.createElement("div"),c=document.createElement("img");c.alt="QR code",o.appendChild(c);return t({name:"qr",id:r.id,template:o,defaultProps:{style:{width:a+"px",height:a+"px",display:"block"},link:"",size:a},draggable:{group:"element"},droppable:{group:"element"},render:()=>{l(c,{style:r.props.style});const e=function(e,t){if("object"==typeof e&&(e=e.fullHref||e.href),!e||"string"!=typeof e||!e.trim())return"";const r=Math.min(600,Math.max(100,parseInt(t,10)||a));return`https://img.creaditor.ai/images/qr?${new URLSearchParams({link:e.trim(),size:String(r)}).toString()}`}(r.props.link,r.props.size);l(c,{src:e})},resizeable:()=>o,handleBar:!0,validator:n({helpers:i}),schema:r.schema,onSelect:e=>{o.classList.add(e)},onDeselect:e=>{o.classList.remove(e)},elementProps:r,remove:()=>o.remove(),createEditor:s})}})}}]);
1
+ "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[4639],{84639(e,t,r){r.d(t,{default:()=>l});const s=e=>{const{component:t,commands:r}=e;return{select:e=>{let{changeTab:t,tab:r}=e;r.text||t("qr")},tabs:e=>{const t=[{text:"qr",selected:!0},{text:"style"},{text:"settings"}];return e?(t.forEach(t=>t.selected=t.text===e),t):t},layout:e=>{let{tab:s}=e;return[{type:"linkpicker",href:t.props.link,protocol:t.props.link?.protocol,target:t.props.link?.target,autofocus:!0,active:()=>"qr"===s.text,title:"QR link",onChange:e=>{const t=e.target.value;r.execCommand("link",t)}},{type:"slider",title:"size",min:100,max:600,active:()=>"style"===s.text,value:parseInt(t.props.size,10)||200,onInput:e=>{const t=parseInt(e.target.value,10);r.execCommand("size",t),r.execCommand("style",{width:t+"px",height:t+"px"})}}]}}},n=e=>{let{helpers:t}=e;return{set:(e,r,s)=>{switch(r){case"style":return e[r]=t.deepMerge(e[r],s),!0;case"link":case"size":return e[r]=s,!0;default:return!1}}}},a=200;const l=()=>({name:"qr",create:e=>{const{createElement:t,compose:r,helpers:l}=e,{mergeDiff:o}=l,i=document.createElement("div"),c=document.createElement("img");c.alt="QR code",i.appendChild(c);return t({name:"qr",id:r.id,template:i,defaultProps:{style:{width:a+"px",height:a+"px",display:"block"},link:"",size:a},draggable:{group:"element"},droppable:{group:"element"},render:()=>{o(c,{style:r.props.style});const e=function(e,t){if("object"==typeof e&&(e=e.fullHref||e.href),!e||"string"!=typeof e||!e.trim())return"";const r=Math.min(600,Math.max(100,parseInt(t,10)||a));return`https://img.creaditor.ai/images/qr?${new URLSearchParams({link:e.trim(),size:String(r)}).toString()}`}(r.props.link,r.props.size);o(c,{src:e})},resizeable:()=>i,handleBar:!0,validator:n({helpers:l}),schema:r.schema,onSelect:e=>{i.classList.add(e)},onDeselect:e=>{i.classList.remove(e)},elementProps:r,remove:()=>i.remove(),createEditor:s})}})}}]);
Binary file
@@ -1 +1 @@
1
- "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[4739],{54739(e,t,n){n.d(t,{default:()=>k});var o=n(86319);function i(){const e="undefined"!=typeof window&&window.location.hostname||"";return/^(localhost|127\.0\.0\.1|0\.0\.0\.0|\[::1\])$/.test(e)}function a(){const e=o.M.get("config","mcpUrl");if("string"==typeof e&&e)return e;return`${i()?"http://localhost:3000":"https://api.creaditor.ai"}/v1/mcp`}const r="https://claude.ai/settings/connectors";function c(){const e="undefined"!=typeof window?window.open("about:blank","_blank"):null,t=t=>{e?e.location=t:"undefined"!=typeof window&&window.open(t,"_blank","noopener,noreferrer")};(async function(){const e=o.M.get("editor");if(!e)return null;if("function"==typeof e.studioTokenProvider)try{const t=await e.studioTokenProvider({});if("string"==typeof t&&t)return t}catch(e){}return"string"==typeof e.studioToken&&e.studioToken?e.studioToken:null})().then(async e=>{if(!e)return t(r);const n=await fetch(`${a().replace(/\/v1\/mcp\/?$/,"")}/oauth/connect/ticket`,{method:"POST",headers:{Authorization:`Bearer ${e}`}});if(!n.ok)return t(r);const{sessionUrl:o}=await n.json();t(o||r)}).catch(()=>t(r))}function s(e,t){return o.M.get("lang",e)||t}function l(e,t,n){const o=()=>{return e=t,o=n,void("undefined"!=typeof window&&"function"==typeof window.snackbar&&window.snackbar({text:s(e,o)}));var e,o};"undefined"!=typeof navigator&&navigator.clipboard&&navigator.clipboard.writeText?navigator.clipboard.writeText(e).then(o).catch(()=>d(e,o)):d(e,o)}function d(e,t){try{const n=document.createElement("textarea");n.value=e,n.style.position="fixed",n.style.opacity="0",document.body.appendChild(n),n.focus(),n.select(),document.execCommand("copy"),document.body.removeChild(n),t()}catch{}}const A=e=>{const{component:t,commands:n}=e,r=t.id;return{select:e=>{let{changeTab:t,tab:n}=e;n.text||t("ai")},tabs:e=>{const t=[{text:"ai",selected:!0},{text:"design"},{text:"settings"}];return e?(t.forEach(t=>t.selected=t.text===e),t):t},layout:e=>{let{tab:s}=e;const d=()=>"ai"===s.text;return[{type:"info",text:"ai_connect_intro",active:d},{type:"button",text:"ai_connect_btn",bgColor:"#6c47ff",color:"#ffffff",active:d,onClick:()=>{l(a(),"ai_connect_link_copied","Connection link copied — paste it in Claude's connector settings."),c()}},{type:"info",text:"ai_connect_localhost_note",active:()=>d()&&i()},{type:"input",title:"ai_connect_url_label",active:d,value:a(),onChange:e=>{e&&e.target&&(e.target.value=a())}},{type:"button",text:"ai_connect_prompt_btn",active:d,onClick:()=>{l(function(e){const t=o.M.get("app"),n=t&&t._id,i=n?`the AI element with id \`${e}\` on site \`${n}\``:`the AI element with id \`${e}\``;return[`Connect to my Creaditor site builder via its MCP connector at ${a()}.`,"",`Then use the write_element_html tool to build a complete, modern, responsive landing page into ${i}.`,"","If you're not sure what the page should be about, ask me first."].join("\n")}(r),"ai_connect_prompt_copied","Prompt copied — paste it into a Claude chat.")}},{type:"input",title:"elementId",active:d,value:r,onChange:()=>{}},{type:"slider",title:"height",min:200,max:2400,active:()=>"design"===s.text,value:parseInt(t.props.style?.height,10)||900,onInput:e=>{const t=e.target.value;n.execCommand("style",{height:t+"px"})}}]}}},p=e=>{let{helpers:t}=e;return{set:(e,n,o)=>{switch(n){case"style":return e[n]=t.deepMerge(e[n],o),!0;case"html":return e[n]=o,!0;default:return!1}}}};var u=n(72591),h=n.n(u),m=n(88639),f=n.n(m),g=n(88128),C=n.n(g),y=n(30855),b=n.n(y),E=n(93051),v=n.n(E),w=n(79646),B={};B.setAttributes=b(),B.insert=C().bind(null,"head"),B.domAPI=f(),B.insertStyleElement=v();h()(w.A,B);const x=w.A&&w.A.locals?w.A.locals:void 0,k=()=>({name:"ai",create:e=>{const{createElement:t,compose:n,helpers:o}=e,{arrayToString:i,mergeDiff:a}=o,r=document.createElement("div");r.setAttribute("data-id",n.id),r.setAttribute("draggable-element","element"),r.setAttribute("droppable-element","element"),r.className=i("ai-component",x.main);const c=document.createElement("div");c.style.cssText="position:relative;max-width:100%;height:100%;width:100%;",r.appendChild(c);const s=document.createElement("iframe");s.style.cssText="width:100%;height:100%;border:none;display:block;",c.appendChild(s);const l=document.createElement("div");l.className=x.emptyAiHolder;const d=document.createElement("h1");d.setAttribute("align","center");const u=document.createElement("lang-text");u.setAttribute("text","ai_element_empty_connect_claude"),d.appendChild(u),l.appendChild(d),c.appendChild(l);return t({name:"ai",id:n.id,template:r,defaultProps:{style:{display:"block",width:"100%",height:"100vh"},html:""},draggable:{group:"element"},droppable:{group:"element"},render:()=>{a(s,{style:n.props.style});const e=n.props.html||"";e?(s.srcdoc!==e&&(s.srcdoc=e),s.style.display="block",l.style.display="none"):(s.removeAttribute("srcdoc"),s.style.display="none",l.style.display="flex")},resizeable:()=>c,handleBar:!0,validator:p({helpers:o}),schema:n.schema,onSelect:e=>{r.classList.add(e)},onDeselect:e=>{r.classList.remove(e)},elementProps:n,remove:()=>{r.remove()},createEditor:A})}})},79646(e,t,n){n.d(t,{A:()=>c});var o=n(82001),i=n.n(o),a=n(40935),r=n.n(a)()(i());r.push([e.id,'.NBtRDhA9L9rE8tvMRYXh {\n position: relative;\n width: 100%;\n}\n\n.NBtRDhA9L9rE8tvMRYXh:hover::after {\n content: "";\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n background: #000;\n background: var(--primary, #000);\n opacity: 0.1;\n z-index: 9;\n}\n\n.NBtRDhA9L9rE8tvMRYXh iframe {\n width: 100%;\n height: 100%;\n border: none;\n}\n\n.BwJnFUnLniO8YoMqBrOB {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n gap: 15px;\n z-index: 15;\n width: 100%;\n padding: 24px;\n text-align: center;\n}\n\n.BwJnFUnLniO8YoMqBrOB h1 {\n font-size: 1.2rem;\n font-weight: 500;\n color: rgba(0, 0, 0, 0.72);\n}\n',"",{version:3,sources:["webpack://./../web-editors/ai-editor-component/lib/style.module.css"],names:[],mappings:"AAAA;EACE,kBAAkB;EAClB,WAAW;AACb;;AAEA;EACE,WAAW;EACX,kBAAkB;EAClB,OAAO;EACP,MAAM;EACN,WAAW;EACX,YAAY;EACZ,gBAAgC;EAAhC,gCAAgC;EAChC,YAAY;EACZ,UAAU;AACZ;;AAEA;EACE,WAAW;EACX,YAAY;EACZ,YAAY;AACd;;AAEA;EACE,kBAAkB;EAClB,SAAS;EACT,QAAQ;EACR,gCAAgC;EAChC,aAAa;EACb,uBAAuB;EACvB,mBAAmB;EACnB,sBAAsB;EACtB,SAAS;EACT,WAAW;EACX,WAAW;EACX,aAAa;EACb,kBAAkB;AACpB;;AAEA;EACE,iBAAiB;EACjB,gBAAgB;EAChB,0BAA0B;AAC5B",sourcesContent:['.main {\n position: relative;\n width: 100%;\n}\n\n.main:hover::after {\n content: "";\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n background: var(--primary, #000);\n opacity: 0.1;\n z-index: 9;\n}\n\n.main iframe {\n width: 100%;\n height: 100%;\n border: none;\n}\n\n.emptyAiHolder {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n gap: 15px;\n z-index: 15;\n width: 100%;\n padding: 24px;\n text-align: center;\n}\n\n.emptyAiHolder h1 {\n font-size: 1.2rem;\n font-weight: 500;\n color: rgba(0, 0, 0, 0.72);\n}\n'],sourceRoot:""}]),r.locals={main:"NBtRDhA9L9rE8tvMRYXh",emptyAiHolder:"BwJnFUnLniO8YoMqBrOB"};const c=r}}]);
1
+ "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[4739],{54739(e,t,n){n.d(t,{default:()=>k});var o=n(86319);function i(){const e="undefined"!=typeof window&&window.location.hostname||"";return/^(localhost|127\.0\.0\.1|0\.0\.0\.0|\[::1\])$/.test(e)}function a(){const e=o.M.get("config","mcpUrl");if("string"==typeof e&&e)return e;return`${i()?"http://localhost:3000":"https://api.creaditor.ai"}/v1/mcp`}const r="https://claude.ai/settings/connectors";function c(){const e="undefined"!=typeof window?window.open("about:blank","_blank"):null,t=t=>{e?e.location=t:"undefined"!=typeof window&&window.open(t,"_blank","noopener,noreferrer")};(async function(){const e=o.M.get("editor");if(!e)return null;if("function"==typeof e.studioTokenProvider)try{const t=await e.studioTokenProvider({});if("string"==typeof t&&t)return t}catch(e){}return"string"==typeof e.studioToken&&e.studioToken?e.studioToken:null})().then(async e=>{if(!e)return t(r);const n=await fetch(`${a().replace(/\/v1\/mcp\/?$/,"")}/oauth/connect/ticket`,{method:"POST",headers:{Authorization:`Bearer ${e}`}});if(!n.ok)return t(r);const{sessionUrl:o}=await n.json();t(o||r)}).catch(()=>t(r))}function s(e,t){return o.M.get("lang",e)||t}function l(e,t,n){const o=()=>{return e=t,o=n,void("undefined"!=typeof window&&"function"==typeof window.snackbar&&window.snackbar({text:s(e,o)}));var e,o};"undefined"!=typeof navigator&&navigator.clipboard&&navigator.clipboard.writeText?navigator.clipboard.writeText(e).then(o).catch(()=>d(e,o)):d(e,o)}function d(e,t){try{const n=document.createElement("textarea");n.value=e,n.style.position="fixed",n.style.opacity="0",document.body.appendChild(n),n.focus(),n.select(),document.execCommand("copy"),document.body.removeChild(n),t()}catch{}}const A=e=>{const{component:t,commands:n}=e,r=t.id;return{select:e=>{let{changeTab:t,tab:n}=e;n.text||t("ai")},tabs:e=>{const t=[{text:"ai",selected:!0},{text:"style"},{text:"settings"}];return e?(t.forEach(t=>t.selected=t.text===e),t):t},layout:e=>{let{tab:s}=e;const d=()=>"ai"===s.text;return[{type:"info",text:"ai_connect_intro",active:d},{type:"button",text:"ai_connect_btn",bgColor:"#6c47ff",color:"#ffffff",active:d,onClick:()=>{l(a(),"ai_connect_link_copied","Connection link copied — paste it in Claude's connector settings."),c()}},{type:"info",text:"ai_connect_localhost_note",active:()=>d()&&i()},{type:"input",title:"ai_connect_url_label",active:d,value:a(),onChange:e=>{e&&e.target&&(e.target.value=a())}},{type:"button",text:"ai_connect_prompt_btn",active:d,onClick:()=>{l(function(e){const t=o.M.get("app"),n=t&&t._id,i=n?`the AI element with id \`${e}\` on site \`${n}\``:`the AI element with id \`${e}\``;return[`Connect to my Creaditor site builder via its MCP connector at ${a()}.`,"",`Then use the write_element_html tool to build a complete, modern, responsive landing page into ${i}.`,"","If you're not sure what the page should be about, ask me first."].join("\n")}(r),"ai_connect_prompt_copied","Prompt copied — paste it into a Claude chat.")}},{type:"input",title:"elementId",active:d,value:r,onChange:()=>{}},{type:"slider",title:"height",min:200,max:2400,active:()=>"style"===s.text,value:parseInt(t.props.style?.height,10)||900,onInput:e=>{const t=e.target.value;n.execCommand("style",{height:t+"px"})}}]}}},p=e=>{let{helpers:t}=e;return{set:(e,n,o)=>{switch(n){case"style":return e[n]=t.deepMerge(e[n],o),!0;case"html":return e[n]=o,!0;default:return!1}}}};var u=n(72591),h=n.n(u),m=n(88639),f=n.n(m),g=n(88128),y=n.n(g),C=n(30855),b=n.n(C),E=n(93051),v=n.n(E),w=n(79646),B={};B.setAttributes=b(),B.insert=y().bind(null,"head"),B.domAPI=f(),B.insertStyleElement=v();h()(w.A,B);const x=w.A&&w.A.locals?w.A.locals:void 0,k=()=>({name:"ai",create:e=>{const{createElement:t,compose:n,helpers:o}=e,{arrayToString:i,mergeDiff:a}=o,r=document.createElement("div");r.setAttribute("data-id",n.id),r.setAttribute("draggable-element","element"),r.setAttribute("droppable-element","element"),r.className=i("ai-component",x.main);const c=document.createElement("div");c.style.cssText="position:relative;max-width:100%;height:100%;width:100%;",r.appendChild(c);const s=document.createElement("iframe");s.style.cssText="width:100%;height:100%;border:none;display:block;",c.appendChild(s);const l=document.createElement("div");l.className=x.emptyAiHolder;const d=document.createElement("h1");d.setAttribute("align","center");const u=document.createElement("lang-text");u.setAttribute("text","ai_element_empty_connect_claude"),d.appendChild(u),l.appendChild(d),c.appendChild(l);return t({name:"ai",id:n.id,template:r,defaultProps:{style:{display:"block",width:"100%",height:"100vh"},html:""},draggable:{group:"element"},droppable:{group:"element"},render:()=>{a(s,{style:n.props.style});const e=n.props.html||"";e?(s.srcdoc!==e&&(s.srcdoc=e),s.style.display="block",l.style.display="none"):(s.removeAttribute("srcdoc"),s.style.display="none",l.style.display="flex")},resizeable:()=>c,handleBar:!0,validator:p({helpers:o}),schema:n.schema,onSelect:e=>{r.classList.add(e)},onDeselect:e=>{r.classList.remove(e)},elementProps:n,remove:()=>{r.remove()},createEditor:A})}})},79646(e,t,n){n.d(t,{A:()=>c});var o=n(82001),i=n.n(o),a=n(40935),r=n.n(a)()(i());r.push([e.id,'.NBtRDhA9L9rE8tvMRYXh {\n position: relative;\n width: 100%;\n}\n\n.NBtRDhA9L9rE8tvMRYXh:hover::after {\n content: "";\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n background: #000;\n background: var(--primary, #000);\n opacity: 0.1;\n z-index: 9;\n}\n\n.NBtRDhA9L9rE8tvMRYXh iframe {\n width: 100%;\n height: 100%;\n border: none;\n}\n\n.BwJnFUnLniO8YoMqBrOB {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n gap: 15px;\n z-index: 15;\n width: 100%;\n padding: 24px;\n text-align: center;\n}\n\n.BwJnFUnLniO8YoMqBrOB h1 {\n font-size: 1.2rem;\n font-weight: 500;\n color: rgba(0, 0, 0, 0.72);\n}\n',"",{version:3,sources:["webpack://./../web-editors/ai-editor-component/lib/style.module.css"],names:[],mappings:"AAAA;EACE,kBAAkB;EAClB,WAAW;AACb;;AAEA;EACE,WAAW;EACX,kBAAkB;EAClB,OAAO;EACP,MAAM;EACN,WAAW;EACX,YAAY;EACZ,gBAAgC;EAAhC,gCAAgC;EAChC,YAAY;EACZ,UAAU;AACZ;;AAEA;EACE,WAAW;EACX,YAAY;EACZ,YAAY;AACd;;AAEA;EACE,kBAAkB;EAClB,SAAS;EACT,QAAQ;EACR,gCAAgC;EAChC,aAAa;EACb,uBAAuB;EACvB,mBAAmB;EACnB,sBAAsB;EACtB,SAAS;EACT,WAAW;EACX,WAAW;EACX,aAAa;EACb,kBAAkB;AACpB;;AAEA;EACE,iBAAiB;EACjB,gBAAgB;EAChB,0BAA0B;AAC5B",sourcesContent:['.main {\n position: relative;\n width: 100%;\n}\n\n.main:hover::after {\n content: "";\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n background: var(--primary, #000);\n opacity: 0.1;\n z-index: 9;\n}\n\n.main iframe {\n width: 100%;\n height: 100%;\n border: none;\n}\n\n.emptyAiHolder {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n gap: 15px;\n z-index: 15;\n width: 100%;\n padding: 24px;\n text-align: center;\n}\n\n.emptyAiHolder h1 {\n font-size: 1.2rem;\n font-weight: 500;\n color: rgba(0, 0, 0, 0.72);\n}\n'],sourceRoot:""}]),r.locals={main:"NBtRDhA9L9rE8tvMRYXh",emptyAiHolder:"BwJnFUnLniO8YoMqBrOB"};const c=r}}]);
Binary file
@@ -1,4 +1,4 @@
1
- "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[4762],{64762(e,t,r){r.r(t),r.d(t,{Page500:()=>o});var a=r(59929);class o extends a.WF{constructor(){super()}render(){return a.qy`<div class="root">
1
+ "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[4762],{64762(t,e,r){r.r(e),r.d(e,{Page500:()=>o});var a=r(59929);class o extends a.WF{constructor(){super()}render(){return a.qy`<div class="root">
2
2
  <div class="container">
3
3
  <cdtr-row spacing="1rem">
4
4
  <h1><lang-text text="connection_error"></lang-text></h1>
@@ -25,7 +25,7 @@
25
25
  height: 100vh;
26
26
  left: 0;
27
27
  top: 0;
28
- z-index: 999999;
28
+ z-index: var(--z-blocking, 2147483646);
29
29
  background-color: #0000001f;
30
30
  }
31
31
  .container {
@@ -35,7 +35,7 @@
35
35
  transform: translate(-50%, -50%);
36
36
  background: #fff;
37
37
  width: 700px;
38
- z-index: 9999999;
38
+ z-index: var(--z-toast, 1100);
39
39
  max-width: 100%;
40
40
  box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
41
41
  padding: 3rem;
Binary file
@@ -1,4 +1,4 @@
1
- "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[4770],{94770(e,t,c){c.r(t),c.d(t,{RangeByDeviceEditor:()=>n});var i=c(59929);class n extends i.WF{constructor(e){super(),this.device="desktop",this.deviceEvent=new UIEvent("device",{view:window,bubbles:!0,cancelable:!0}),this.inputEvent=new UIEvent("input",{view:window,bubbles:!0,cancelable:!0}),this.changeEvent=new UIEvent("change",{view:window,bubbles:!0,cancelable:!0})}connectedCallback(){super.connectedCallback(),this.device="desktop"}disconnectedCallback(){super.disconnectedCallback()}onChange(e){const t=e.target.value;this.value=t,this.dispatchEvent(this.changeEvent)}onInput(e){const t=e.target.value;this.value=t,this.dispatchEvent(this.inputEvent)}pickerDevice(e){this.device=e.target.device,this.dispatchEvent(this.deviceEvent)}render(){return i.qy` <cdtr-row class="container">
1
+ "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[4770],{94770(e,t,i){i.r(t),i.d(t,{RangeByDeviceEditor:()=>n});var c=i(59929);class n extends c.WF{constructor(e){super(),this.device="desktop",this.deviceEvent=new UIEvent("device",{view:window,bubbles:!0,cancelable:!0}),this.inputEvent=new UIEvent("input",{view:window,bubbles:!0,cancelable:!0}),this.changeEvent=new UIEvent("change",{view:window,bubbles:!0,cancelable:!0})}connectedCallback(){super.connectedCallback(),this.device="desktop"}disconnectedCallback(){super.disconnectedCallback()}onChange(e){const t=e.target.value;this.value=t,this.dispatchEvent(this.changeEvent)}onInput(e){const t=e.target.value;this.value=t,this.dispatchEvent(this.inputEvent)}pickerDevice(e){this.device=e.detail?.device??e.target.device,this.dispatchEvent(this.deviceEvent)}render(){return c.qy` <cdtr-row class="container">
2
2
  <cdtr-col sm="12">
3
3
  <cdtr-row alignItems="center">
4
4
  <cdtr-title pb="0"
@@ -7,7 +7,7 @@
7
7
  <cdtr-col class="device-picker" sm="4">
8
8
  <cdtr-device-picker
9
9
  device=${this.device}
10
- @click=${this.pickerDevice}
10
+ @device-change=${this.pickerDevice}
11
11
  ></cdtr-device-picker>
12
12
  </cdtr-col>
13
13
  </cdtr-row>
@@ -22,7 +22,7 @@
22
22
  min="${this.min}"
23
23
  ></cdtr-range-input
24
24
  ></cdtr-col>
25
- </cdtr-row>`}}n.styles=i.AH`
25
+ </cdtr-row>`}}n.styles=c.AH`
26
26
  .device-picker {
27
27
  opacity: 0;
28
28
  }
Binary file