@silexlabs/silex 3.0.0-alpha.62 → 3.0.0-alpha.64

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.
@@ -307,6 +307,15 @@ template {
307
307
  display: none;
308
308
  }
309
309
 
310
+ :root {
311
+ --primaryColor: #333333;
312
+ --secondaryColor: #ddd;
313
+ --tertiaryColor: #8873FE;
314
+ --quaternaryColor: #A291FF;
315
+ --darkerPrimaryColor: #292929;
316
+ --lighterPrimaryColor: #575757;
317
+ }
318
+
310
319
  /* stylelint-disable */ /* BASICS */
311
320
  .CodeMirror {
312
321
  /* Set height, width, borders, and global font properties here */
@@ -3986,7 +3995,7 @@ form.silex-form footer {
3986
3995
  margin: 20px 0 0;
3987
3996
  }
3988
3997
  form.silex-form button, form.silex-form input, form.silex-form optgroup, form.silex-form select, form.silex-form textarea {
3989
- background-color: #363636;
3998
+ background-color: #292929;
3990
3999
  color: #ddd;
3991
4000
  padding: 5px;
3992
4001
  border: none;
@@ -4065,7 +4074,7 @@ form.silex-form .silex-form__group.col2 {
4065
4074
  text-align: right;
4066
4075
  }
4067
4076
  .silex-dialog-inline a {
4068
- color: #56E3FF;
4077
+ color: #A291FF;
4069
4078
  }
4070
4079
  .silex-dialog-inline header > * {
4071
4080
  margin: 0;
@@ -4167,7 +4176,7 @@ iframe.enable-squeeze.silex-squeeze-left {
4167
4176
  line-height: 13px;
4168
4177
  }
4169
4178
  .gjs-pn-project-bar-container .project-bar__panel-header .project-bar__panel-header-button:hover {
4170
- color: #56E3FF;
4179
+ color: #A291FF;
4171
4180
  }
4172
4181
 
4173
4182
  .page-panel-container .pages__wrapper {
@@ -4180,13 +4189,13 @@ iframe.enable-squeeze.silex-squeeze-left {
4180
4189
  }
4181
4190
  .page-panel-container .pages .pages__main {
4182
4191
  flex: 1;
4183
- border: 1px solid #363636;
4192
+ border: 1px solid #292929;
4184
4193
  background-color: #333333;
4185
4194
  }
4186
4195
  .page-panel-container .pages .pages__page {
4187
4196
  display: flex;
4188
4197
  align-items: center;
4189
- background-color: #363636;
4198
+ background-color: #292929;
4190
4199
  border-bottom: 1px solid rgba(0, 0, 0, 0.25);
4191
4200
  cursor: pointer;
4192
4201
  }
@@ -4194,14 +4203,14 @@ iframe.enable-squeeze.silex-squeeze-left {
4194
4203
  background-color: #333333;
4195
4204
  }
4196
4205
  .page-panel-container .pages .pages__page:hover .pages__page-name {
4197
- color: #56E3FF;
4206
+ color: #A291FF;
4198
4207
  }
4199
4208
  .page-panel-container .pages .pages__page-selected {
4200
4209
  background-color: #575757;
4201
4210
  cursor: default;
4202
4211
  }
4203
4212
  .page-panel-container .pages .pages__page-selected .pages__page-name {
4204
- color: #56E3FF;
4213
+ color: #A291FF;
4205
4214
  }
4206
4215
  .page-panel-container .pages .pages__main.pages__single-page .pages__remove-btn {
4207
4216
  visibility: hidden;
@@ -4222,7 +4231,7 @@ iframe.enable-squeeze.silex-squeeze-left {
4222
4231
  cursor: pointer;
4223
4232
  }
4224
4233
  .page-panel-container .pages .pages__icon:hover {
4225
- color: #56E3FF;
4234
+ color: #A291FF;
4226
4235
  }
4227
4236
  .page-panel-container .gjs-pn-buttons {
4228
4237
  flex-direction: column;
@@ -4239,7 +4248,7 @@ iframe.enable-squeeze.silex-squeeze-left {
4239
4248
  line-height: 1;
4240
4249
  min-width: 100px;
4241
4250
  border: 1px solid #575757;
4242
- background-color: #363636;
4251
+ background-color: #292929;
4243
4252
  }
4244
4253
 
4245
4254
  #gjs {
@@ -4274,13 +4283,13 @@ iframe.enable-squeeze.silex-squeeze-left {
4274
4283
  color: #8873FE;
4275
4284
  }
4276
4285
  .gjs-four-bg {
4277
- background-color: #56E3FF;
4286
+ background-color: #A291FF;
4278
4287
  }
4279
4288
  .gjs-four-color {
4280
- color: #56E3FF;
4289
+ color: #A291FF;
4281
4290
  }
4282
4291
  .gjs-four-color-h:hover {
4283
- color: #56E3FF;
4292
+ color: #A291FF;
4284
4293
  }
4285
4294
 
4286
4295
  .gjs-cv-canvas,
@@ -4469,15 +4478,6 @@ iframe.enable-squeeze.silex-squeeze-left {
4469
4478
  }
4470
4479
  /* Normalize css */
4471
4480
  /* Silex styles imports */
4472
- :root {
4473
- --primaryColor: $primaryColor;
4474
- --secondaryColor: $secondaryColor;
4475
- --tertiaryColor: $tertiaryColor;
4476
- --quaternaryColor: $quaternaryColor;
4477
- --darkerPrimaryColor: $darkerPrimaryColor;
4478
- --lighterPrimaryColor: $lighterPrimaryColor;
4479
- }
4480
-
4481
4481
  .container-png::before {
4482
4482
  content: " ";
4483
4483
  background-image: url("../assets/container.png");
@@ -97,7 +97,7 @@ var silex;(()=>{var t={357:function(t){var e;"undefined"!=typeof globalThis?glob
97
97
  ><span>${e.text}</span></div>
98
98
  `))}
99
99
  </header>
100
- `,r),document.body.appendChild(r),t.on("load",(()=>{n.view.el.appendChild(r)}))),t.Commands.add(e.command,{run(){e.link&&window.open(e.link),e.attributes.containerClassName&&(n.set("visible",!0),r.classList.remove("gjs-hidden"),t.Canvas.getFrameEl().classList.add("silex-squeeze-left"))},stop(){e.attributes.containerClassName&&(n.set("visible",!1),r.classList.add("gjs-hidden"),t.Canvas.getFrameEl().classList.remove("silex-squeeze-left"))}})})),t.on("load device:select page",(()=>{!function(){const e=n.view.el,r=t.Canvas.getFrameEl();r.classList.remove("enable-squeeze"),setTimeout((()=>{const t=r.getClientRects()[0]?.left,n=e.getClientRects()[0]?.right;t<n||!n?r.classList.add("enable-squeeze"):r.classList.remove("enable-squeeze")}),400),n.get("visible")?r.classList.add("silex-squeeze-left"):r.classList.remove("silex-squeeze-left")}()}))},Nn=document.createElement("div");let In;const Dn="open-settings";let $n="v3";const Rn=nt.plugins.add("settings-dialog",((t,e)=>{try{$n="3.0.0-alpha.62"}catch(t){}console.info("Silex version:",$n),t.Commands.add(Dn,{run:(e,n,{page:r})=>{In=t.Modal.open({title:r?"Page settings":"Site Settings",content:"",attributes:{class:"settings-dialog"}}).onceClose((()=>{n.set("active",0),t.stopCommand(Dn)})),function(t,e,n=t.getModel()){const r=n.get("settings")||{};n.set("settings",r),we(ne`
100
+ `,r),document.body.appendChild(r),t.on("load",(()=>{n.view.el.appendChild(r)}))),t.Commands.add(e.command,{run(){e.link&&window.open(e.link),e.attributes.containerClassName&&(n.set("visible",!0),r.classList.remove("gjs-hidden"),t.Canvas.getFrameEl().classList.add("silex-squeeze-left"))},stop(){e.attributes.containerClassName&&(n.set("visible",!1),r.classList.add("gjs-hidden"),t.Canvas.getFrameEl().classList.remove("silex-squeeze-left"))}})})),t.on("load device:select page",(()=>{!function(){const e=n.view.el,r=t.Canvas.getFrameEl();r.classList.remove("enable-squeeze"),setTimeout((()=>{const t=r.getClientRects()[0]?.left,n=e.getClientRects()[0]?.right;t<n||!n?r.classList.add("enable-squeeze"):r.classList.remove("enable-squeeze")}),400),n.get("visible")?r.classList.add("silex-squeeze-left"):r.classList.remove("silex-squeeze-left")}()}))},Nn=document.createElement("div");let In;const Dn="open-settings";let $n="v3";const Rn=nt.plugins.add("settings-dialog",((t,e)=>{try{$n="3.0.0-alpha.64"}catch(t){}console.info("Silex version:",$n),t.Commands.add(Dn,{run:(e,n,{page:r})=>{In=t.Modal.open({title:r?"Page settings":"Site Settings",content:"",attributes:{class:"settings-dialog"}}).onceClose((()=>{n.set("active",0),t.stopCommand(Dn)})),function(t,e,n=t.getModel()){const r=n.get("settings")||{};n.set("settings",r),we(ne`
101
101
  <p>The page settings will override site settings, <a href="https://github.com/silexlabs/Silex/wiki/Settings" target="_blank">more info about settings here</a>.</p>
102
102
  <form class="silex-form">
103
103
  <h2>General settings</h2>
@@ -319,4 +319,4 @@ var silex;(()=>{var t={357:function(t){var e;"undefined"!=typeof globalThis?glob
319
319
  @click=${()=>this.editor.Commands.stop(Zn)}
320
320
  >Close</button>
321
321
  </footer>
322
- `}}displayPending(t,e){this.errorMessage=null,this.renderDialog(t,e)}displayError(t,e,n){console.info(t),this.errorMessage=t,this.renderDialog(e,n)}async closeDialog(){this.isOpen=!1,this.renderDialog(null,null),this.sender&&this.sender.set("active",0),this.sender=null}async toggleDialog(){this.isOpen?this.closeDialog():this.openDialog()}async openDialog(){this.isOpen=!0;const t=this.editor.Panels.getPanel("options")?.view.el.querySelector(".publish-button");if(t){const e=t.getBoundingClientRect(),n=450,r=20,o=50;this.move({left:e.right-n-r,top:e.bottom+10,width:n,minHeight:o})}else console.error("Unable to find publish button");this.renderDialog(null,hr.STATUS_NONE)}}var er;function nr(t,e){t.Pages.getAll().forEach((t=>{t.getMainComponent().onAll((t=>e(t)))}))}!function(t){t.STARTUP_START="silex:startup:start",t.STARTUP_END="silex:startup:end",t.GRAPESJS_START="silex:grapesjs:start",t.GRAPESJS_END="silex:grapesjs:end",t.PUBLISH_START="silex:publish:start",t.PUBLISH_DATA="silex:publish:data",t.PUBLISH_END="silex:publish:end",t.PUBLISH_ERROR="silex:publish:error",t.PUBLISH_LOGIN_START="silex:publish:login:start",t.PUBLISH_LOGIN_END="silex:publish:login:end",t.ASSET_WRITE_END="silex:asset:write:end",t.WRITE_END="silex:write:end"}(er||(er={}));const rr="tmp-pre-publication-transformer-tohtml",or="tmp-pre-publication-transformer-src",ir="tmp-pre-publication-transformer-inline-css",sr="tmp-pre-publication-transformer-href",ar="tmp-pre-publication-transformer-tocss";function lr(t,e){const n=e["background-image"],r=n?.match(/url\(["']?(.*?)["']?\)/)?.pop();return r?{...e,"background-image":`url(${cr(t,r,$.ASSET)})`}:e}function cr(t,e,n){return t.getModel().get("config").publicationTransformers.reduce(((t,e)=>{try{return e.transformPermalink?e.transformPermalink(t,n)??t:t}catch(e){return console.error("Publication transformer: error transforming path",t,e),t}}),e)}function ur(t,e,n){return t.getModel().get("config").publicationTransformers.reduce(((t,e)=>{try{return e.transformPath?e.transformPath(t,n)??t:t}catch(e){return console.error("Publication transformer: error transforming path",t,e),t}}),e)}const pr="publish",dr="publish-login",fr="publish-logout";var hr;function gr(t,e){t.PublicationManager=new mr(t,e)}function vr(t){switch(t){case H.IN_PROGRESS:return hr.STATUS_PENDING;case H.ERROR:return hr.STATUS_ERROR;case H.SUCCESS:return hr.STATUS_SUCCESS}throw new Error(`Unknown job status ${t}`)}!function(t){t.STATUS_NONE="STATUS_NONE",t.STATUS_PENDING="STATUS_PENDING",t.STATUS_ERROR="STATUS_ERROR",t.STATUS_SUCCESS="STATUS_SUCCESS",t.STATUS_LOGGED_OUT="STATUS_AUTH_ERROR"}(hr||(hr={}));class mr{editor;dialog;_settings;get settings(){return this._settings}set settings(t){this._settings=t,this.dialog&&(this.dialog.settings=t)}options;job=null;status=hr.STATUS_NONE;constructor(t,e){this.editor=t,this.options={appendTo:"options",...e},t.on("storage:start:store",(t=>{t.publication=this.settings})),t.on("storage:end:load",(t=>{this.settings=t.publication??{},ze({type:R.HOSTING,connectorId:this.settings.connector?.connectorId}).then((t=>{})).catch((t=>{this.status=hr.STATUS_LOGGED_OUT,this.settings={},this.dialog&&this.dialog.displayError("Please login",this.job,this.status)}))})),t.Commands.add(pr,(()=>this.startPublication())),t.Commands.add(dr,((t,e,n)=>this.goLogin(n))),t.Commands.add(fr,(()=>this.goLogout())),this.options.appendTo?this.dialog=new tr(t,{appendTo:this.options.appendTo}):console.info("PublicationUi is disabled because no appendTo option is set")}async goLogin(t){this.settings={},this.status=hr.STATUS_LOGGED_OUT,this.dialog&&this.dialog.displayPending(this.job,this.status);const e=t.connectorId,n=t.type;return window.open(t.oauthUrl||`${f}${h}${y}?connectorId=${e}&type=${n}`,"_blank"),new Promise((e=>{const n=async e=>{const r=e.data;"login"===r?.type&&(window.removeEventListener("message",n),r.error?(this.status=hr.STATUS_LOGGED_OUT,this.settings={},this.dialog&&this.dialog.displayError(r.message,this.job,this.status)):(this.editor.trigger(er.PUBLISH_LOGIN_END),this.settings.connector=t,this.settings.options=r.options,this.status=hr.STATUS_NONE,this.editor.store(null),this.dialog&&this.dialog.displayPending(this.job,this.status)))};window.addEventListener("message",n,!1)}))}async goLogout(){try{await We({type:R.HOSTING,connectorId:this.settings.connector.connectorId}),this.settings={},this.dialog&&this.dialog.displayPending(this.job,this.status)}catch(t){console.error("logout error",t),this.status=hr.STATUS_ERROR,this.dialog&&this.dialog.displayError(t.message,this.job,this.status)}}async startPublication(){if(this.status===hr.STATUS_PENDING)throw new Error("Publication is already in progress");this.status=hr.STATUS_PENDING,this.job=null,this.dialog&&this.dialog.displayPending(this.job,this.status),this.editor.trigger(er.PUBLISH_START);const t=this.editor.getModel().get("user");if(!t)throw new Error("User not logged in to a storage connector");if(!this.settings.connector?.connectorId)throw new Error("User not logged in to a hosting connector");const e=this.options.websiteId,n=t.storage.connectorId;this.setPublicationTransformers();const r=this.editor.getProjectData(),o=this.editor.getModel().get("settings"),i=(await this.getHtmlFiles(o)).flatMap((t=>[{path:t.htmlPath,content:t.html,type:$.HTML},{path:t.cssPath,content:t.css,type:$.CSS}])).concat(r.assets.map((t=>{const e=t.src.replace(/^\/assets/,""),n=ur(this.editor,e,$.ASSET),r=cr(this.editor,e,$.ASSET);return{...t,path:n,src:r,type:$.ASSET}}))),s={...r,settings:o,publication:this.settings,files:i};this.resetPublicationTransformers(),function(t,e){const n=t.getModel().get("config");e.files=n.publicationTransformers.reduce(((t,n)=>t.map(((t,r)=>{try{return e.pages[r],n.transformFile?n.transformFile(t)??t:t}catch(e){return console.error("Publication transformer: error transforming file",t,e),t}}))),e.files)}(this.editor,s),this.editor.trigger(er.PUBLISH_DATA,s);try{const[t,r]=await qe({websiteId:e,hostingId:this.settings.connector.connectorId,storageId:n,data:s,options:this.settings.options});this.job=r,this.status=vr(this.job.status),this.trackProgress()}catch(t){return console.error("publish error",t),401===t.code||401===t.httpStatusCode?(this.status=hr.STATUS_LOGGED_OUT,this.settings={},this.dialog&&this.dialog.displayError("Please login.",this.job,this.status)):(this.status=hr.STATUS_ERROR,this.dialog&&this.dialog.displayError(`An error occured, your site is not published. ${t.message}`,this.job,this.status)),this.editor.trigger(er.PUBLISH_ERROR,{success:!1,message:t.message}),void this.editor.trigger(er.PUBLISH_END,{success:!1,message:t.message})}}async getHtmlFiles(t){return this.editor.Pages.getAll().map((e=>{const n=e.get("settings");function r(e){return(n||{})[e]||(t||[])[e]||""}const o=e.getMainComponent(),i=qn(e.get("name")),s=`/css/${i}.css`,a=`/${i}.html`,l=cr(this.editor,s,$.CSS),c=ur(this.editor,s,$.CSS),u=ur(this.editor,a,$.HTML);return{html:`\n <!DOCTYPE html>\n <html lang="${r("lang")}">\n <head>\n <link rel="stylesheet" href="${l}" />\n ${t?.head||""}\n ${n?.head||""}\n <title>${r("title")}</title>\n <link rel="icon" href="${r("favicon")}" />\n ${["description","og:title","og:description","og:image"].map((t=>`<meta property="${t}" content="${r(t)}"/>`)).join("\n")}\n </head>\n ${this.editor.getHtml({component:o})}\n </html>\n `,css:this.editor.getCss({component:o}),cssPath:c,htmlPath:u}}))}async trackProgress(){try{this.job=await Ge({jobId:this.job.jobId}),this.status=vr(this.job.status)}catch(t){return this.status=hr.STATUS_ERROR,this.dialog&&this.dialog.displayError(`An error occured, your site is not published. ${t.message}`,this.job,this.status),this.editor.trigger(er.PUBLISH_END,{success:!1,message:t.message}),void this.editor.trigger(er.PUBLISH_ERROR,{success:!1,message:t.message})}this.job.status===H.IN_PROGRESS?setTimeout((()=>this.trackProgress()),2e3):this.editor.trigger(er.PUBLISH_END,{success:this.job.status===H.SUCCESS,message:this.job.message}),this.dialog&&this.dialog.displayPending(this.job,this.status)}setPublicationTransformers(){!function(t){const e=t.getModel().get("config");nr(t,(n=>{if(n.get(rr))console.warn("Publication transformer: HTML transform already altered",n);else{const r=n.toHTML.bind(n);n[rr]=n.toHTML;const o=n.getStyle.bind(n);n[ir]=n.getStyle;const i=n.get("attributes").href;if(i?.startsWith("./")&&(n[sr]=i,n.set("attributes",{...n.get("attributes"),href:cr(t,i,$.HTML)})),n.get("attributes").src){n[or]=n.get("attributes").src;const e=cr(t,n.get("attributes").src,$.ASSET);n.set("attributes",{...n.get("attributes"),src:e})}n.toHTML=()=>e.publicationTransformers.reduce(((t,e)=>{try{return e.renderComponent?e.renderComponent(n,(()=>t))??t:t}catch(e){return console.error("Publication transformer: error rendering component",n,e),t}}),r()),n.getStyle=()=>lr(t,o())}}))}(this.editor),function(t){const e=t.getModel().get("config");t.Css.getAll().forEach((n=>{if(n[ar])console.warn("Publication transformer: CSS transform already altered",n);else{const r=n.getStyle.bind(n);n[ar]=n.getStyle,n.getStyle=()=>{try{const n=e.publicationTransformers.reduce(((t,e)=>({...e.renderCssRule?e.renderCssRule(t,r)??t:t})),lr(t,r()));return n}catch(t){return console.error("Publication transformer: error rendering style",n,t),r()}}}}))}(this.editor)}resetPublicationTransformers(){!function(t){nr(t,(t=>{t[rr]&&(t.toHTML=t[rr],delete t[rr]),t[ir]&&(t.getStyle=t[ir],delete t[ir]),t[or]&&(t.set("attributes",{...t.get("attributes"),src:t[or]}),delete t[or]),t[sr]&&(t.set("attributes",{...t.get("attributes"),href:t[sr]}),delete t[sr])}))}(this.editor),function(t){t.Css.getAll().forEach((t=>{t[ar]&&(t.getStyle=t[ar],delete t[ar])}))}(this.editor)}}const yr=[{name:"./project-bar",value:Ln},{name:"./settings",value:Rn},{name:"@silexlabs/grapesjs-fonts",value:He()},{name:"./new-page-dialog",value:Mn},{name:"./page-panel",value:Cn},{name:"grapesjs-blocks-basic",value:it()},{name:"./blocks",value:(t,e)=>{const n="container";t.BlockManager.add(n,{label:"Container",category:"Basics",attributes:{class:"container-png"},content:{type:n,style:{"min-height":"100px"}}}),t.DomComponents.addType(n,{})}},{name:"./semantic",value:zn},{name:"./rich-text",value:Wn},{name:"grapesjs-style-filter",value:at()},{name:"grapesjs-plugin-forms",value:ct()},{name:"grapesjs-custom-code",value:pt()},{name:"./internal-links",value:Yn},{name:"@silexlabs/grapesjs-ui-suggest-classes",value:ft()},{name:"./symbolDialogs",value:Ve},{name:"@silexlabs/grapesjs-symbols",value:Ie},{name:"./PublicationManager",value:gr},{name:"./storage",value:t=>{function e(e){const n="string"==typeof e?JSON.parse(e):e;if(console.error("Error with loading or saving website or uploading asset",n,n instanceof N),!(n instanceof N))return t.Modal.open({title:"Error",content:`An error occured.<br>${n.message}`});switch(console.error("ApiError",n.httpStatusCode,n.message),n.httpStatusCode){case 404:return t.Modal.open({title:"Website not found",content:`This website could not be found.<br><hr>${n.message}`});case 403:return t.Modal.open({title:"Access denied",content:`You are not allowed to access this website.<br><hr>${n.message}`});case 401:return void t.trigger(pn);default:return t.Modal.open({title:"Error",content:`An error occured.<br>${n.message}`})}}t.Storage.add("connector",{async load(e){try{const i=await dn(t)??await fn(t,R.STORAGE,e.connectorId);if(i){const t=await Je({websiteId:e.id,connectorId:i.storage.connectorId});return t.assets&&(t.assets=(n=t.assets,r=e.id,o=i.storage.connectorId,n.map((t=>({...t,src:V(t.src,r,o)}))))),t.pages&&(t.pages=function(t,e,n){return t.map((t=>({...t,frames:t.frames.map((t=>({...t,component:z(t.component,e,n)})))})))}(t.pages,e.id,i.storage.connectorId)),t.styles&&(t.styles=function(t,e,n){const r=/url\((["']?)([^"']+?)\1\)/g;return t.map((t=>{if(t.style&&t.style["background-image"]){const o=[...t.style["background-image"].matchAll(r)].map((t=>V(t[2],e,n)));return{...t,style:{...t.style,"background-image":o.map((t=>`url('${t}')`)).join(", ")}}}return t}))}(t.styles,e.id,i.storage.connectorId)),t}return new Promise(((n,r)=>{t.once(cn,(async()=>{try{t.StorageManager.setAutosave(!1);const r=await t.Storage.load(e);t.StorageManager.setAutosave(!0),n(r)}catch(t){console.error("connectorPlugin load error",t),r(t)}})),t.Commands.run(sn)}))}catch(t){throw console.error("connectorPlugin load error",t),t}var n,r,o},async store(e,n){try{if(await dn(t)){const r=await dn(t);e.assets=e.assets.map((t=>({...t,src:U(t.src)}))),e.pages=e.pages.map((t=>({...t,frames:t.frames.map((t=>({...t,component:W(t.component)})))}))),e.styles=function(t){const e=/url\((["']?)([^"']+?)\1\)/g;return t.map((t=>{if(t.style&&t.style["background-image"]){const n=[...t.style["background-image"].matchAll(e)].map((t=>U(t[2])));return{...t,style:{...t.style,"background-image":n.map((t=>`url('${t}')`)).join(", ")}}}return t}))}(e.styles),await Xe({websiteId:n.id,connectorId:r.storage.connectorId,data:e})}else t.once(cn,(()=>t.Storage.save(n))),t.Commands.run(sn)}catch(t){throw console.error("connectorPlugin store error",t),t}}}),t.on("storage:error:load",(t=>{e(t)})),t.on("storage:error:store",(t=>{e(t)})),t.on("asset:upload:end",(e=>{t.store()})),t.on("asset:upload:error",(t=>{e(t)}))}},{name:"./LoginDialog",value:vn},{name:"@silexlabs/grapesjs-loading",value:$e()},{name:"./breadcrumbs",value:function(t,e){let n;var r;function o(){let e=t.getSelected()??t.Pages.getSelected().getMainComponent();if(!n)return;for(n.innerHTML="";e;){const t=i(e);n.prepend(t),console.log(e,e.tagName),e=e.parent()}const r=document.createElement("span");r.innerHTML="<h3>Selection:&nbsp;</h3>",n.prepend(r)}function i(e){const n=document.createElement("span");return e.model,n.onclick=()=>{t.select(e)},n.classList.add("breadcrumb"),n.innerHTML=`<span>${e.getName()??e.get("tagName")}</span>`,n}r=t=>{n=document.createElement("div"),n.id="breadcrumbs-container",t.prepend(n);const e=document.createElement("style");e.innerHTML='\n #breadcrumbs-container {\n display: flex;\n align-items: center;\n height: 100%;\n padding: 5px 10px 0;\n font-size: 12px;\n color: #999;\n overflow-x: auto;\n overflow-y: hidden;\n }\n #breadcrumbs-container h3 {\n margin: 0;\n }\n #breadcrumbs-container .breadcrumb {\n margin: 5px;\n font-size: 15px;\n line-height: 1;\n cursor: pointer;\n white-space: nowrap;\n }\n #breadcrumbs-container .breadcrumb::after {\n content: "➔";\n margin-left: 10px;\n }\n\n #breadcrumbs-container .breadcrumb:last-child::after {\n content: "";\n }\n ',t.prepend(e),o()},mn?r(mn):bn.push(r),t.on("component:selected style:target component:drag:end",(()=>o()))}},{name:"./footer",value:function(t,e){const n=t.Panels.addPanel({id:"footer",visible:!0,buttons:[{id:"myNewButton",className:"someClass",command:"someCommand",attributes:{title:"Some title"},active:!1}]});setTimeout((()=>{mn=n.view?.el,bn.forEach((t=>t(mn))),bn=[]}))}}];yr.filter((t=>"function"!=typeof t.value)).forEach((t=>{throw new Error(`Plugin ${t.name} could not be loaded correctly (${t.value})`)}));const br="Containers",wr="Components";function _r(t,e,n){return{container:"#gjs",height:"100%",showOffsets:!0,showDevices:!0,layerManager:{appendTo:".layer-manager-container"},blockManager:{appendTo:".block-manager-container"},assetManager:{upload:`${n}${f}${S}${j}/?websiteId=${t}${e?`&connectorId=${e}`:""}`},storageManager:{autoload:!1,type:"connector",options:{connector:{id:t,connectorId:e}}},cssIcons:"/css/all.min.css",canvasCss:"\n :root {\n --primaryColor: #333333;\n --secondaryColor: #ddd;\n --tertiaryColor: #8873FE;\n --quaternaryColor: #56E3FF;\n --darkerPrimaryColor: #363636;\n --lighterPrimaryColor: #575757;\n }\n .gjs-frame-selected {\n box-shadow: 0 0 0 2px rgba(255, 0, 0, 0.5) !important; // Change to red border\n }\n .gjs-selected {\n outline: 2px solid var(--tertiaryColor) !important;\n outline-offset: -2px;\n }\n .gjs-tools .gjs-badge { /* for the label */\n background-color: red;\n }\n .gjs-toolbar { /* for the toolbar */\n background-color: red;\n }\n ",plugins:yr.map((t=>t.value)),pluginsOpts:{[it()]:{blocks:["text","image","video","map"],category:br},[Ln]:{panels:[{id:"dash",className:"logo",attributes:{title:"Dashboard"},link:"/",command:"open-dash"},{id:"block-manager-btn",className:"block-manager-btn fa fa-fw fa-plus",attributes:{title:"Blocks",containerClassName:"block-manager-container"},command:"open-blocks"},{id:"symbols-btn",className:"symbols-btn fa-regular fa-gem",attributes:{title:"Symbols",containerClassName:"symbols-list-container"},command:"open-symbols",buttons:[{id:"symbol-create-button",className:"pages__add-page fa-solid fa-plus",label:"Create symbol from selection",command:Fe}]},{id:"page-panel-btn",className:"page-panel-btn fa fa-fw fa-file",attributes:{title:"Pages",containerClassName:"page-panel-container"},command:wn,buttons:[{className:"pages__add-page fa fa-file",command:_n,text:"+"}]},{id:"layer-manager-btn",className:"layer-manager-btn fa-solid fa-layer-group",attributes:{title:"Layers",containerClassName:"layer-manager-container"},command:"open-layers"},{id:"font-dialog-btn",className:"font-manager-btn fa-solid fa-font",attributes:{title:"Fonts"},command:Re.cmdOpenFonts},{id:"settings-dialog-btn",className:"page-panel-btn fa-solid fa-gears",attributes:{title:"Settings"},command:Dn},{id:"spacer",attributes:{},className:"project-bar-spacer"},{id:"dash2",className:"fa-solid fa-house",attributes:{title:"Dashboard"},link:"/",command:"open-dash"},{id:"help",className:"fa fa-fw fa-question-circle",attributes:{title:"Documentation"},link:"https://docs.silex.me/",command:"open-help"},{id:"logout-button",className:"page-panel-btn fa fa-fw fa-sign-out",attributes:{title:"Sign out"},command:an}]},[gr]:{appendTo:"options",websiteId:t},[Cn]:{cmdOpenNewPageDialog:jn,cmdOpenSettings:Dn,appendTo:".page-panel-container"},[ft()]:{enableCount:!1,enablePerformance:!1},[Yn]:{onError:t=>console.warn("Links errors:",t)},[pt()]:{blockLabel:"HTML",blockCustomCode:{category:wr}},[Ie]:{appendTo:".symbols-list-container"},[He()]:{api_key:"AIzaSyAdJTYSLPlKz4w5Iqyy-JAF2o8uQKd1FKc"},[vn]:{id:t}}}}let xr;async function Cr(t){if(xr)throw new Error("Grapesjs editor already created");return new Promise(((e,n)=>{try{xr=rt().init(t)}catch(t){console.error("Error initializing GrapesJs with plugins:",yr,t),n(t)}["text"].forEach((t=>xr.Blocks.get(t)?.set("category","Basics"))),["image","video"].forEach((t=>xr.Blocks.get(t)?.set("category","Media"))),["map"].forEach((t=>xr.Blocks.get(t)?.set("category","Components"))),xr.Blocks.render([]),xr.Commands.add("gjs-open-import-webpage",function(t,e){const n=t.getConfig("stylePrefix"),r=t.Modal,o=t.CodeManager.getViewer("CodeMirror").clone(),i=document.createElement("div"),s=e.modalImportLabel,a=e.modalImportContent;let l=o.editor;const c=document.createElement("button");return c.type="button",c.innerHTML=e.modalImportButton,c.className=`${n}btn-prim ${n}btn-import`,c.onclick=e=>{t.setComponents(l.getValue().trim()),r.close()},o.set({codeName:"htmlmixed",theme:"hopscotch",readOnly:0,...e.importViewerOptions}),{run(u){if(!l){const t=document.createElement("textarea");if(s){const t=document.createElement("div");t.className=`${n}import-label`,t.innerHTML=s,i.appendChild(t)}i.appendChild(t),i.appendChild(c),o.init(t),l=o.editor}r.setTitle(e.modalImportTitle),r.setContent(i);const p="function"==typeof a?a(t):a;o.setContent(p||""),r.open().getModel().once("change:open",(()=>t.stopCommand(this.id))),l.refresh()},stop(){r.close()}}}(xr,{modalImportLabel:"",modalImportContent:"Paste a web page HTML code here.",modalImportButton:"Import",modalImportTitle:"Import from website"})),xr.on("load",(()=>{xr.Panels.getPanel("views").buttons.remove("open-blocks"),xr.Panels.getPanel("views").buttons.remove("open-layers"),xr.Panels.getPanel("views").view.el.firstChild.style.justifyContent="initial",xr.Panels.getPanel("options").buttons.remove("export-template"),xr.BlockManager.render(null),xr.StyleManager.addProperty("extra",{extend:"filter"}),e(xr)}))}))}function Sr(){return xr}class Or extends et{api=o;websiteId=new URL(location.href).searchParams.get("id")??u;storageId=new URL(location.href).searchParams.get("connectorId");lang=new URL(location.href).searchParams.get("lang")??p;rootUrl=window.location.origin;debug=!1;grapesJsConfig;clientConfigUrl=`${this.rootUrl}/${d}`;initGrapesConfig(){this.grapesJsConfig=_r(this.websiteId,this.storageId,this.rootUrl)}getEditor(){return Sr()}publicationTransformers=[];addPublicationTransformers(t){Array.isArray(t)||(t=[t]),t.forEach((t=>{!function(t){const e=["renderComponent","renderCssRule","transformFile","transformPermalink","transformPath"];Object.keys(t).forEach((t=>{if(!e.includes(t))throw new Error(`Publication transformer: unknown property ${t}`)})),e.forEach((e=>{if("function"!=typeof t[e]&&void 0!==t[e])throw new Error(`Publication transformer: ${e} must be a function`)}))}(t)})),this.publicationTransformers=this.publicationTransformers.concat(t)}}async function Tr(t={}){const e=new Or;Object.assign(e,t),e.addPublicationTransformers(B),await e.addPlugin(e.clientConfigUrl,{}),e.debug&&console.warn("Silex starting in debug mode.",{config:e}),e.emit(er.STARTUP_START),e.initGrapesConfig(),e.emit(er.GRAPESJS_START);try{await Cr(e.grapesJsConfig)}catch(t){throw console.error("Error starting Silex",t),t}const n=Sr();n.getModel().set("config",e),e.emit(er.GRAPESJS_END,{editor:n}),n.I18n.setLocale(e.lang),n.StorageManager.setAutosave(!1);try{await n.load(null)}catch(t){t.httpStatusCode}finally{setTimeout((()=>{n.editor.set("changesCount",0),n.StorageManager.setAutosave(!0),document.querySelector(".silex-loader").classList.add("silex-dialog-hide"),document.querySelector("#gjs").classList.remove("silex-dialog-hide"),e.emit(er.STARTUP_END,{editor:n,config:e})}),100)}}console.info("\nSilex client loaded\n")})(),silex=r})();
322
+ `}}displayPending(t,e){this.errorMessage=null,this.renderDialog(t,e)}displayError(t,e,n){console.info(t),this.errorMessage=t,this.renderDialog(e,n)}async closeDialog(){this.isOpen=!1,this.renderDialog(null,null),this.sender&&this.sender.set("active",0),this.sender=null}async toggleDialog(){this.isOpen?this.closeDialog():this.openDialog()}async openDialog(){this.isOpen=!0;const t=this.editor.Panels.getPanel("options")?.view.el.querySelector(".publish-button");if(t){const e=t.getBoundingClientRect(),n=450,r=20,o=50;this.move({left:e.right-n-r,top:e.bottom+10,width:n,minHeight:o})}else console.error("Unable to find publish button");this.renderDialog(null,hr.STATUS_NONE)}}var er;function nr(t,e){t.Pages.getAll().forEach((t=>{t.getMainComponent().onAll((t=>e(t)))}))}!function(t){t.STARTUP_START="silex:startup:start",t.STARTUP_END="silex:startup:end",t.GRAPESJS_START="silex:grapesjs:start",t.GRAPESJS_END="silex:grapesjs:end",t.PUBLISH_START="silex:publish:start",t.PUBLISH_DATA="silex:publish:data",t.PUBLISH_END="silex:publish:end",t.PUBLISH_ERROR="silex:publish:error",t.PUBLISH_LOGIN_START="silex:publish:login:start",t.PUBLISH_LOGIN_END="silex:publish:login:end",t.ASSET_WRITE_END="silex:asset:write:end",t.WRITE_END="silex:write:end"}(er||(er={}));const rr="tmp-pre-publication-transformer-tohtml",or="tmp-pre-publication-transformer-src",ir="tmp-pre-publication-transformer-inline-css",sr="tmp-pre-publication-transformer-href",ar="tmp-pre-publication-transformer-tocss";function lr(t,e){const n=e["background-image"],r=n?.match(/url\(["']?(.*?)["']?\)/)?.pop();return r?{...e,"background-image":`url(${cr(t,r,$.ASSET)})`}:e}function cr(t,e,n){return t.getModel().get("config").publicationTransformers.reduce(((t,e)=>{try{return e.transformPermalink?e.transformPermalink(t,n)??t:t}catch(e){return console.error("Publication transformer: error transforming path",t,e),t}}),e)}function ur(t,e,n){return t.getModel().get("config").publicationTransformers.reduce(((t,e)=>{try{return e.transformPath?e.transformPath(t,n)??t:t}catch(e){return console.error("Publication transformer: error transforming path",t,e),t}}),e)}const pr="publish",dr="publish-login",fr="publish-logout";var hr;function gr(t,e){t.PublicationManager=new mr(t,e)}function vr(t){switch(t){case H.IN_PROGRESS:return hr.STATUS_PENDING;case H.ERROR:return hr.STATUS_ERROR;case H.SUCCESS:return hr.STATUS_SUCCESS}throw new Error(`Unknown job status ${t}`)}!function(t){t.STATUS_NONE="STATUS_NONE",t.STATUS_PENDING="STATUS_PENDING",t.STATUS_ERROR="STATUS_ERROR",t.STATUS_SUCCESS="STATUS_SUCCESS",t.STATUS_LOGGED_OUT="STATUS_AUTH_ERROR"}(hr||(hr={}));class mr{editor;dialog;_settings;get settings(){return this._settings}set settings(t){this._settings=t,this.dialog&&(this.dialog.settings=t)}options;job=null;status=hr.STATUS_NONE;constructor(t,e){this.editor=t,this.options={appendTo:"options",...e},t.on("storage:start:store",(t=>{t.publication=this.settings})),t.on("storage:end:load",(t=>{this.settings=t.publication??{},ze({type:R.HOSTING,connectorId:this.settings.connector?.connectorId}).then((t=>{})).catch((t=>{this.status=hr.STATUS_LOGGED_OUT,this.settings={},this.dialog&&this.dialog.displayError("Please login",this.job,this.status)}))})),t.Commands.add(pr,(()=>this.startPublication())),t.Commands.add(dr,((t,e,n)=>this.goLogin(n))),t.Commands.add(fr,(()=>this.goLogout())),this.options.appendTo?this.dialog=new tr(t,{appendTo:this.options.appendTo}):console.info("PublicationUi is disabled because no appendTo option is set")}async goLogin(t){this.settings={},this.status=hr.STATUS_LOGGED_OUT,this.dialog&&this.dialog.displayPending(this.job,this.status);const e=t.connectorId,n=t.type;return window.open(t.oauthUrl||`${f}${h}${y}?connectorId=${e}&type=${n}`,"_blank"),new Promise((e=>{const n=async e=>{const r=e.data;"login"===r?.type&&(window.removeEventListener("message",n),r.error?(this.status=hr.STATUS_LOGGED_OUT,this.settings={},this.dialog&&this.dialog.displayError(r.message,this.job,this.status)):(this.editor.trigger(er.PUBLISH_LOGIN_END),this.settings.connector=t,this.settings.options=r.options,this.status=hr.STATUS_NONE,this.editor.store(null),this.dialog&&this.dialog.displayPending(this.job,this.status)))};window.addEventListener("message",n,!1)}))}async goLogout(){try{await We({type:R.HOSTING,connectorId:this.settings.connector.connectorId}),this.settings={},this.dialog&&this.dialog.displayPending(this.job,this.status)}catch(t){console.error("logout error",t),this.status=hr.STATUS_ERROR,this.dialog&&this.dialog.displayError(t.message,this.job,this.status)}}async startPublication(){if(this.status===hr.STATUS_PENDING)throw new Error("Publication is already in progress");this.status=hr.STATUS_PENDING,this.job=null,this.dialog&&this.dialog.displayPending(this.job,this.status),this.editor.trigger(er.PUBLISH_START);const t=this.editor.getModel().get("user");if(!t)throw new Error("User not logged in to a storage connector");if(!this.settings.connector?.connectorId)throw new Error("User not logged in to a hosting connector");const e=this.options.websiteId,n=t.storage.connectorId;this.setPublicationTransformers();const r=this.editor.getProjectData(),o=this.editor.getModel().get("settings"),i=(await this.getHtmlFiles(o)).flatMap((t=>[{path:t.htmlPath,content:t.html,type:$.HTML},{path:t.cssPath,content:t.css,type:$.CSS}])).concat(r.assets.map((t=>{const e=t.src.replace(/^\/assets/,""),n=ur(this.editor,e,$.ASSET),r=cr(this.editor,e,$.ASSET);return{...t,path:n,src:r,type:$.ASSET}}))),s={...r,settings:o,publication:this.settings,files:i};this.resetPublicationTransformers(),function(t,e){const n=t.getModel().get("config");e.files=n.publicationTransformers.reduce(((t,n)=>t.map(((t,r)=>{try{return e.pages[r],n.transformFile?n.transformFile(t)??t:t}catch(e){return console.error("Publication transformer: error transforming file",t,e),t}}))),e.files)}(this.editor,s),this.editor.trigger(er.PUBLISH_DATA,s);try{const[t,r]=await qe({websiteId:e,hostingId:this.settings.connector.connectorId,storageId:n,data:s,options:this.settings.options});this.job=r,this.status=vr(this.job.status),this.trackProgress()}catch(t){return console.error("publish error",t),401===t.code||401===t.httpStatusCode?(this.status=hr.STATUS_LOGGED_OUT,this.settings={},this.dialog&&this.dialog.displayError("Please login.",this.job,this.status)):(this.status=hr.STATUS_ERROR,this.dialog&&this.dialog.displayError(`An error occured, your site is not published. ${t.message}`,this.job,this.status)),this.editor.trigger(er.PUBLISH_ERROR,{success:!1,message:t.message}),void this.editor.trigger(er.PUBLISH_END,{success:!1,message:t.message})}}async getHtmlFiles(t){return this.editor.Pages.getAll().map((e=>{const n=e.get("settings");function r(e){return(n||{})[e]||(t||[])[e]||""}const o=e.getMainComponent(),i=qn(e.get("name")),s=`/css/${i}.css`,a=`/${i}.html`,l=cr(this.editor,s,$.CSS),c=ur(this.editor,s,$.CSS),u=ur(this.editor,a,$.HTML),p=this.editor.getHtml({component:o});return{html:`\n <!DOCTYPE html>\n <html lang="${r("lang")}">\n <head>\n <link rel="stylesheet" href="${l}" />\n ${t?.head||""}\n ${n?.head||""}\n <title>${r("title")}</title>\n <link rel="icon" href="${r("favicon")}" />\n ${["description","og:title","og:description","og:image"].map((t=>`<meta property="${t}" content="${r(t)}"/>`)).join("\n")}\n </head>\n ${p}\n </html>\n `,css:this.editor.getCss({component:o}),cssPath:c,htmlPath:u}}))}async trackProgress(){try{this.job=await Ge({jobId:this.job.jobId}),this.status=vr(this.job.status)}catch(t){return this.status=hr.STATUS_ERROR,this.dialog&&this.dialog.displayError(`An error occured, your site is not published. ${t.message}`,this.job,this.status),this.editor.trigger(er.PUBLISH_END,{success:!1,message:t.message}),void this.editor.trigger(er.PUBLISH_ERROR,{success:!1,message:t.message})}this.job.status===H.IN_PROGRESS?setTimeout((()=>this.trackProgress()),2e3):this.editor.trigger(er.PUBLISH_END,{success:this.job.status===H.SUCCESS,message:this.job.message}),this.dialog&&this.dialog.displayPending(this.job,this.status)}setPublicationTransformers(){!function(t){const e=t.getModel().get("config");nr(t,(n=>{if(n.get(rr))console.warn("Publication transformer: HTML transform already altered",n);else{const r=n.toHTML.bind(n);n[rr]=n.toHTML;const o=n.getStyle.bind(n);n[ir]=n.getStyle;const i=n.get("attributes").href;if(i?.startsWith("./")&&(n[sr]=i,n.set("attributes",{...n.get("attributes"),href:cr(t,i,$.HTML)})),n.get("src")){n[or]=n.get("src");const e=cr(t,n.get("src"),$.ASSET);n.set("src",e)}n.toHTML=()=>e.publicationTransformers.reduce(((t,e)=>{try{return e.renderComponent?e.renderComponent(n,(()=>t))??t:t}catch(e){return console.error("Publication transformer: error rendering component",n,e),t}}),r()),n.getStyle=()=>lr(t,o())}}))}(this.editor),function(t){const e=t.getModel().get("config");t.Css.getAll().forEach((n=>{if(n[ar])console.warn("Publication transformer: CSS transform already altered",n);else{const r=n.getStyle.bind(n);n[ar]=n.getStyle,n.getStyle=()=>{try{const n=e.publicationTransformers.reduce(((t,e)=>({...e.renderCssRule?e.renderCssRule(t,r)??t:t})),lr(t,r()));return n}catch(t){return console.error("Publication transformer: error rendering style",n,t),r()}}}}))}(this.editor)}resetPublicationTransformers(){!function(t){nr(t,(t=>{t[rr]&&(t.toHTML=t[rr],delete t[rr]),t[ir]&&(t.getStyle=t[ir],delete t[ir]),t[or]&&(t.set("src",t[or]),delete t[or]),t[sr]&&(t.set("attributes",{...t.get("attributes"),href:t[sr]}),delete t[sr])}))}(this.editor),function(t){t.Css.getAll().forEach((t=>{t[ar]&&(t.getStyle=t[ar],delete t[ar])}))}(this.editor)}}const yr=[{name:"./project-bar",value:Ln},{name:"./settings",value:Rn},{name:"@silexlabs/grapesjs-fonts",value:He()},{name:"./new-page-dialog",value:Mn},{name:"./page-panel",value:Cn},{name:"grapesjs-blocks-basic",value:it()},{name:"./blocks",value:(t,e)=>{const n="container";t.BlockManager.add(n,{label:"Container",category:"Basics",attributes:{class:"container-png"},content:{type:n,style:{"min-height":"100px"}}}),t.DomComponents.addType(n,{})}},{name:"./semantic",value:zn},{name:"./rich-text",value:Wn},{name:"grapesjs-style-filter",value:at()},{name:"grapesjs-plugin-forms",value:ct()},{name:"grapesjs-custom-code",value:pt()},{name:"./internal-links",value:Yn},{name:"@silexlabs/grapesjs-ui-suggest-classes",value:ft()},{name:"./symbolDialogs",value:Ve},{name:"@silexlabs/grapesjs-symbols",value:Ie},{name:"./PublicationManager",value:gr},{name:"./storage",value:t=>{function e(e){const n="string"==typeof e?JSON.parse(e):e;if(console.error("Error with loading or saving website or uploading asset",n,n instanceof N),!(n instanceof N))return t.Modal.open({title:"Error",content:`An error occured.<br>${n.message}`});switch(console.error("ApiError",n.httpStatusCode,n.message),n.httpStatusCode){case 404:return t.Modal.open({title:"Website not found",content:`This website could not be found.<br><hr>${n.message}`});case 403:return t.Modal.open({title:"Access denied",content:`You are not allowed to access this website.<br><hr>${n.message}`});case 401:return void t.trigger(pn);default:return t.Modal.open({title:"Error",content:`An error occured.<br>${n.message}`})}}t.Storage.add("connector",{async load(e){try{const i=await dn(t)??await fn(t,R.STORAGE,e.connectorId);if(i){const t=await Je({websiteId:e.id,connectorId:i.storage.connectorId});return t.assets&&(t.assets=(n=t.assets,r=e.id,o=i.storage.connectorId,n.map((t=>({...t,src:V(t.src,r,o)}))))),t.pages&&(t.pages=function(t,e,n){return t.map((t=>({...t,frames:t.frames.map((t=>({...t,component:z(t.component,e,n)})))})))}(t.pages,e.id,i.storage.connectorId)),t.styles&&(t.styles=function(t,e,n){const r=/url\((["']?)([^"']+?)\1\)/g;return t.map((t=>{if(t.style&&t.style["background-image"]){const o=[...t.style["background-image"].matchAll(r)].map((t=>V(t[2],e,n)));return{...t,style:{...t.style,"background-image":o.map((t=>`url('${t}')`)).join(", ")}}}return t}))}(t.styles,e.id,i.storage.connectorId)),t}return new Promise(((n,r)=>{t.once(cn,(async()=>{try{t.StorageManager.setAutosave(!1);const r=await t.Storage.load(e);t.StorageManager.setAutosave(!0),n(r)}catch(t){console.error("connectorPlugin load error",t),r(t)}})),t.Commands.run(sn)}))}catch(t){throw console.error("connectorPlugin load error",t),t}var n,r,o},async store(e,n){try{if(await dn(t)){const r=await dn(t);e.assets=e.assets.map((t=>({...t,src:U(t.src)}))),e.pages=e.pages.map((t=>({...t,frames:t.frames.map((t=>({...t,component:W(t.component)})))}))),e.styles=function(t){const e=/url\((["']?)([^"']+?)\1\)/g;return t.map((t=>{if(t.style&&t.style["background-image"]){const n=[...t.style["background-image"].matchAll(e)].map((t=>U(t[2])));return{...t,style:{...t.style,"background-image":n.map((t=>`url('${t}')`)).join(", ")}}}return t}))}(e.styles),await Xe({websiteId:n.id,connectorId:r.storage.connectorId,data:e})}else t.once(cn,(()=>t.Storage.save(n))),t.Commands.run(sn)}catch(t){throw console.error("connectorPlugin store error",t),t}}}),t.on("storage:error:load",(t=>{e(t)})),t.on("storage:error:store",(t=>{e(t)})),t.on("asset:upload:end",(e=>{t.store()})),t.on("asset:upload:error",(t=>{e(t)}))}},{name:"./LoginDialog",value:vn},{name:"@silexlabs/grapesjs-loading",value:$e()},{name:"./breadcrumbs",value:function(t,e){let n;var r;function o(){let e=t.getSelected()??t.Pages.getSelected().getMainComponent();if(!n)return;for(n.innerHTML="";e;){const t=i(e);n.prepend(t),e=e.parent()}const r=document.createElement("span");r.innerHTML="<h3>Selection:&nbsp;</h3>",n.prepend(r)}function i(e){const n=document.createElement("span");return e.model,n.onclick=()=>{t.select(e)},n.classList.add("breadcrumb"),n.innerHTML=`<span>${e.getName()??e.get("tagName")}</span>`,n}r=t=>{n=document.createElement("div"),n.id="breadcrumbs-container",t.prepend(n);const e=document.createElement("style");e.innerHTML='\n #breadcrumbs-container {\n display: flex;\n align-items: center;\n height: 100%;\n padding: 0 10px;\n font-size: 12px;\n color: #999;\n overflow-x: auto;\n overflow-y: hidden;\n }\n #breadcrumbs-container h3 {\n font-size: inherit;\n margin: 0;\n }\n #breadcrumbs-container .breadcrumb {\n margin: 0 5px;\n font-size: 14px;\n line-height: 1;\n cursor: pointer;\n white-space: nowrap;\n }\n #breadcrumbs-container .breadcrumb::after {\n content: "➔";\n margin-left: 10px;\n }\n\n #breadcrumbs-container .breadcrumb:last-child::after {\n content: "";\n }\n ',t.prepend(e),o()},mn?r(mn):bn.push(r),t.on("component:selected style:target component:drag:end",(()=>o()))}},{name:"./footer",value:function(t,e){const n=t.Panels.addPanel({id:"footer",visible:!0,buttons:[{id:"myNewButton",className:"someClass",command:"someCommand",attributes:{title:"Some title"},active:!1}]});setTimeout((()=>{mn=n.view?.el,bn.forEach((t=>t(mn))),bn=[]}))}}];yr.filter((t=>"function"!=typeof t.value)).forEach((t=>{throw new Error(`Plugin ${t.name} could not be loaded correctly (${t.value})`)}));const br="Containers",wr="Components";function _r(t,e,n){return{container:"#gjs",height:"100%",showOffsets:!0,showDevices:!0,layerManager:{appendTo:".layer-manager-container"},blockManager:{appendTo:".block-manager-container"},assetManager:{upload:`${n}${f}${S}${j}/?websiteId=${t}${e?`&connectorId=${e}`:""}`},storageManager:{autoload:!1,type:"connector",options:{connector:{id:t,connectorId:e}}},cssIcons:"/css/all.min.css",canvasCss:"\n :root {\n --primaryColor: #333333;\n --secondaryColor: #ddd;\n --tertiaryColor: #8873FE;\n --quaternaryColor: #A291FF;\n --darkerPrimaryColor: #363636;\n --lighterPrimaryColor: #575757;\n }\n .gjs-frame-selected {\n box-shadow: 0 0 0 2px rgba(255, 0, 0, 0.5) !important; // Change to red border\n }\n .gjs-selected {\n outline: 2px solid var(--tertiaryColor) !important;\n outline-offset: -2px;\n }\n .gjs-tools .gjs-badge { /* for the label */\n background-color: red;\n }\n .gjs-toolbar { /* for the toolbar */\n background-color: red;\n }\n ",plugins:yr.map((t=>t.value)),pluginsOpts:{[it()]:{blocks:["text","image","video","map"],category:br},[Ln]:{panels:[{id:"dash",className:"logo",attributes:{title:"Dashboard"},link:"/",command:"open-dash"},{id:"block-manager-btn",className:"block-manager-btn fa fa-fw fa-plus",attributes:{title:"Blocks",containerClassName:"block-manager-container"},command:"open-blocks"},{id:"symbols-btn",className:"symbols-btn fa-regular fa-gem",attributes:{title:"Symbols",containerClassName:"symbols-list-container"},command:"open-symbols",buttons:[{id:"symbol-create-button",className:"pages__add-page fa-solid fa-plus",label:"Create symbol from selection",command:Fe}]},{id:"page-panel-btn",className:"page-panel-btn fa fa-fw fa-file",attributes:{title:"Pages",containerClassName:"page-panel-container"},command:wn,buttons:[{className:"pages__add-page fa fa-file",command:_n,text:"+"}]},{id:"layer-manager-btn",className:"layer-manager-btn fa-solid fa-layer-group",attributes:{title:"Layers",containerClassName:"layer-manager-container"},command:"open-layers"},{id:"font-dialog-btn",className:"font-manager-btn fa-solid fa-font",attributes:{title:"Fonts"},command:Re.cmdOpenFonts},{id:"settings-dialog-btn",className:"page-panel-btn fa-solid fa-gears",attributes:{title:"Settings"},command:Dn},{id:"spacer",attributes:{},className:"project-bar-spacer"},{id:"dash2",className:"fa-solid fa-house",attributes:{title:"Dashboard"},link:"/",command:"open-dash"},{id:"help",className:"fa fa-fw fa-question-circle",attributes:{title:"Documentation"},link:"https://docs.silex.me/",command:"open-help"},{id:"logout-button",className:"page-panel-btn fa fa-fw fa-sign-out",attributes:{title:"Sign out"},command:an}]},[gr]:{appendTo:"options",websiteId:t},[Cn]:{cmdOpenNewPageDialog:jn,cmdOpenSettings:Dn,appendTo:".page-panel-container"},[ft()]:{enableCount:!1,enablePerformance:!1},[Yn]:{onError:t=>console.warn("Links errors:",t)},[pt()]:{blockLabel:"HTML",blockCustomCode:{category:wr}},[Ie]:{appendTo:".symbols-list-container"},[He()]:{api_key:"AIzaSyAdJTYSLPlKz4w5Iqyy-JAF2o8uQKd1FKc"},[vn]:{id:t}}}}let xr;async function Cr(t){if(xr)throw new Error("Grapesjs editor already created");return new Promise(((e,n)=>{try{xr=rt().init(t)}catch(t){console.error("Error initializing GrapesJs with plugins:",yr,t),n(t)}["text"].forEach((t=>xr.Blocks.get(t)?.set("category","Basics"))),["image","video"].forEach((t=>xr.Blocks.get(t)?.set("category","Media"))),["map"].forEach((t=>xr.Blocks.get(t)?.set("category","Components"))),xr.Blocks.render([]),xr.Commands.add("gjs-open-import-webpage",function(t,e){const n=t.getConfig("stylePrefix"),r=t.Modal,o=t.CodeManager.getViewer("CodeMirror").clone(),i=document.createElement("div"),s=e.modalImportLabel,a=e.modalImportContent;let l=o.editor;const c=document.createElement("button");return c.type="button",c.innerHTML=e.modalImportButton,c.className=`${n}btn-prim ${n}btn-import`,c.onclick=e=>{t.setComponents(l.getValue().trim()),r.close()},o.set({codeName:"htmlmixed",theme:"hopscotch",readOnly:0,...e.importViewerOptions}),{run(u){if(!l){const t=document.createElement("textarea");if(s){const t=document.createElement("div");t.className=`${n}import-label`,t.innerHTML=s,i.appendChild(t)}i.appendChild(t),i.appendChild(c),o.init(t),l=o.editor}r.setTitle(e.modalImportTitle),r.setContent(i);const p="function"==typeof a?a(t):a;o.setContent(p||""),r.open().getModel().once("change:open",(()=>t.stopCommand(this.id))),l.refresh()},stop(){r.close()}}}(xr,{modalImportLabel:"",modalImportContent:"Paste a web page HTML code here.",modalImportButton:"Import",modalImportTitle:"Import from website"})),xr.on("load",(()=>{xr.Panels.getPanel("views").buttons.remove("open-blocks"),xr.Panels.getPanel("views").buttons.remove("open-layers"),xr.Panels.getPanel("views").view.el.firstChild.style.justifyContent="initial",xr.Panels.getPanel("options").buttons.remove("export-template"),xr.BlockManager.render(null),xr.StyleManager.addProperty("extra",{extend:"filter"}),e(xr)}))}))}function Sr(){return xr}class Or extends et{api=o;websiteId=new URL(location.href).searchParams.get("id")??u;storageId=new URL(location.href).searchParams.get("connectorId");lang=new URL(location.href).searchParams.get("lang")??p;rootUrl=window.location.origin;debug=!1;grapesJsConfig;clientConfigUrl=`${this.rootUrl}/${d}`;initGrapesConfig(){this.grapesJsConfig=_r(this.websiteId,this.storageId,this.rootUrl)}getEditor(){return Sr()}publicationTransformers=[];addPublicationTransformers(t){Array.isArray(t)||(t=[t]),t.forEach((t=>{!function(t){const e=["renderComponent","renderCssRule","transformFile","transformPermalink","transformPath"];Object.keys(t).forEach((t=>{if(!e.includes(t))throw new Error(`Publication transformer: unknown property ${t}`)})),e.forEach((e=>{if("function"!=typeof t[e]&&void 0!==t[e])throw new Error(`Publication transformer: ${e} must be a function`)}))}(t)})),this.publicationTransformers=this.publicationTransformers.concat(t)}}async function Tr(t={}){const e=new Or;Object.assign(e,t),e.addPublicationTransformers(B),await e.addPlugin(e.clientConfigUrl,{}),e.debug&&console.warn("Silex starting in debug mode.",{config:e}),e.emit(er.STARTUP_START),e.initGrapesConfig(),e.emit(er.GRAPESJS_START);try{await Cr(e.grapesJsConfig)}catch(t){throw console.error("Error starting Silex",t),t}const n=Sr();n.getModel().set("config",e),e.emit(er.GRAPESJS_END,{editor:n}),n.I18n.setLocale(e.lang),n.StorageManager.setAutosave(!1);try{await n.load(null)}catch(t){t.httpStatusCode}finally{setTimeout((()=>{n.editor.set("changesCount",0),n.StorageManager.setAutosave(!0),document.querySelector(".silex-loader").classList.add("silex-dialog-hide"),document.querySelector("#gjs").classList.remove("silex-dialog-hide"),e.emit(er.STARTUP_END,{editor:n,config:e})}),100)}}console.info("\nSilex client loaded\n")})(),silex=r})();
@@ -198,6 +198,7 @@ export class PublicationManager {
198
198
  const websiteId = this.options.websiteId;
199
199
  const storageId = storageUser.storage.connectorId;
200
200
  // Data to publish
201
+ // See assetUrl.ts which is a default transformer, always present
201
202
  this.setPublicationTransformers();
202
203
  const projectData = this.editor.getProjectData();
203
204
  const siteSettings = this.editor.getModel().get('settings');
@@ -285,6 +286,7 @@ export class PublicationManager {
285
286
  const cssPermalink = transformPermalink(this.editor, cssInitialPath, ClientSideFileType.CSS);
286
287
  const cssPath = transformPath(this.editor, cssInitialPath, ClientSideFileType.CSS);
287
288
  const htmlPath = transformPath(this.editor, htmlInitialPath, ClientSideFileType.HTML);
289
+ const body = this.editor.getHtml({ component });
288
290
  return {
289
291
  html: `
290
292
  <!DOCTYPE html>
@@ -299,7 +301,7 @@ export class PublicationManager {
299
301
  .map(prop => `<meta property="${prop}" content="${getSetting(prop)}"/>`)
300
302
  .join('\n')}
301
303
  </head>
302
- ${this.editor.getHtml({ component })}
304
+ ${body}
303
305
  </html>
304
306
  `,
305
307
  css: this.editor.getCss({ component }),
@@ -1 +1 @@
1
- {"version":3,"file":"PublicationManager.js","sourceRoot":"","sources":["../../../../../src/ts/client/grapesjs/PublicationManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,EAAsG,kBAAkB,EAAiB,aAAa,EAAiB,SAAS,EAAkH,MAAM,aAAa,CAAA;AAE5T,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;AACpE,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AACnF,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AACvC,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,cAAc,EAAE,aAAa,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAG7K;;;;;;;;;GASG;AAEH,YAAY;AACZ,MAAM,CAAC,MAAM,mBAAmB,GAAG,SAAS,CAAA;AAC5C,MAAM,CAAC,MAAM,mBAAmB,GAAG,eAAe,CAAA;AAClD,MAAM,CAAC,MAAM,oBAAoB,GAAG,gBAAgB,CAAA;AAOpD,MAAM,CAAN,IAAY,iBAMX;AAND,WAAY,iBAAiB;IAC3B,gDAA2B,CAAA;IAC3B,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EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAA;YACtF,OAAM;SACP;QACD,IAAI,IAAI,CAAC,GAAG,CAAC,MAAM,KAAK,SAAS,CAAC,WAAW,EAAE;YAC7C,UAAU,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,IAAI,CAAC,CAAA;SAC7C;aAAM;YACL,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,WAAW,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,GAAG,CAAC,MAAM,KAAK,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC,CAAA;SAC5H;QACD,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;IAClE,CAAC;IAEO,0BAA0B;QAChC,gBAAgB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QAC7B,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IAC7B,CAAC;IAEO,4BAA4B;QAClC,qBAAqB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QAClC,mBAAmB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IAClC,CAAC;CACF"}
@@ -13,18 +13,19 @@ export default function (editor, options) {
13
13
  display: flex;
14
14
  align-items: center;
15
15
  height: 100%;
16
- padding: 5px 10px 0;
16
+ padding: 0 10px;
17
17
  font-size: 12px;
18
18
  color: #999;
19
19
  overflow-x: auto;
20
20
  overflow-y: hidden;
21
21
  }
22
22
  #breadcrumbs-container h3 {
23
+ font-size: inherit;
23
24
  margin: 0;
24
25
  }
25
26
  #breadcrumbs-container .breadcrumb {
26
- margin: 5px;
27
- font-size: 15px;
27
+ margin: 0 5px;
28
+ font-size: 14px;
28
29
  line-height: 1;
29
30
  cursor: pointer;
30
31
  white-space: nowrap;
@@ -53,7 +54,6 @@ export default function (editor, options) {
53
54
  while (component) {
54
55
  const breadcrumb = createBreadcrumb(component);
55
56
  breadcrumbsContainer.prepend(breadcrumb);
56
- console.log(component, component.tagName);
57
57
  component = component.parent();
58
58
  }
59
59
  // Label
@@ -1 +1 @@
1
- {"version":3,"file":"breadcrumbs.js","sourceRoot":"","sources":["../../../../../src/ts/client/grapesjs/breadcrumbs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAEnC,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,OAAO;IACtC,IAAI,oBAAoB,CAAA;IACxB,QAAQ,CAAC,MAAM,CAAC,EAAE;QAChB,uCAAuC;QACvC,oBAAoB,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAA;QACpD,oBAAoB,CAAC,EAAE,GAAG,uBAAuB,CAAA;QACjD,MAAM,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAA;QACpC,yBAAyB;QACzB,MAAM,iBAAiB,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAA;QACzD,iBAAiB,CAAC,SAAS,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA6B7B,CAAA;QACD,MAAM,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAA;QACjC,iBAAiB,EAAE,CAAA;IACrB,CAAC,CAAC,CAAA;IACF,6DAA6D;IAE7D,MAAM,CAAC,EAAE,CAAC,oDAAoD,EAAE,GAAG,EAAE,CAAC,iBAAiB,EAAE,CAAC,CAAA;IAC1F,SAAS,iBAAiB;QACxB,IAAI,SAAS,GAAG,MAAM,CAAC,WAAW,EAAE,IAAI,MAAM,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,gBAAgB,EAAE,CAAA;QAErF,IAAG,CAAC,oBAAoB;YAAE,OAAM;QAEhC,kCAAkC;QAClC,oBAAoB,CAAC,SAAS,GAAG,EAAE,CAAA;QAEnC,yEAAyE;QACzE,OAAO,S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G,SAAS,CAAC,KAAK,CAAA;QAC7B,UAAU,CAAC,OAAO,GAAG,GAAG,EAAE;YACxB,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAA;QAC1B,CAAC,CAAA;QACD,UAAU,CAAC,SAAS,CAAC,GAAG,CAAC,YAAY,CAAC,CAAA;QACtC,UAAU,CAAC,SAAS,GAAG,SAAS,SAAS,CAAC,OAAO,EAAE,IAAI,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,SAAS,CAAA;QACxF,OAAO,UAAU,CAAA;IACnB,CAAC;AACH,CAAC"}
@@ -118,7 +118,7 @@ export function getEditorConfig(id, connectorId, rootUrl) {
118
118
  --primaryColor: #333333;
119
119
  --secondaryColor: #ddd;
120
120
  --tertiaryColor: #8873FE;
121
- --quaternaryColor: #56E3FF;
121
+ --quaternaryColor: #A291FF;
122
122
  --darkerPrimaryColor: #363636;
123
123
  --lighterPrimaryColor: #575757;
124
124
  }
@@ -78,13 +78,18 @@ export function renderComponents(editor) {
78
78
  });
79
79
  //}
80
80
  }
81
- if (c.get('attributes').src) {
82
- c[ATTRIBUTE_METHOD_STORE_SRC] = c.get('attributes').src;
83
- const src = transformPermalink(editor, c.get('attributes').src, ClientSideFileType.ASSET);
84
- c.set('attributes', {
85
- ...c.get('attributes'),
86
- src,
87
- });
81
+ //if(c.get('attributes').src) {
82
+ // c[ATTRIBUTE_METHOD_STORE_SRC] = c.get('attributes').src
83
+ // const src = transformPermalink(editor, c.get('attributes').src, ClientSideFileType.ASSET)
84
+ // c.set('attributes', {
85
+ // ...c.get('attributes'),
86
+ // src,
87
+ // })
88
+ //}
89
+ if (c.get('src')) {
90
+ c[ATTRIBUTE_METHOD_STORE_SRC] = c.get('src');
91
+ const src = transformPermalink(editor, c.get('src'), ClientSideFileType.ASSET);
92
+ c.set('src', src);
88
93
  }
89
94
  c.toHTML = () => {
90
95
  return config.publicationTransformers.reduce((html, transformer) => {
@@ -202,11 +207,15 @@ export function resetRenderComponents(editor) {
202
207
  c.getStyle = c[ATTRIBUTE_METHOD_STORE_INLINE_CSS];
203
208
  delete c[ATTRIBUTE_METHOD_STORE_INLINE_CSS];
204
209
  }
210
+ //if(c[ATTRIBUTE_METHOD_STORE_SRC]) {
211
+ // c.set('attributes', {
212
+ // ...c.get('attributes'),
213
+ // src: c[ATTRIBUTE_METHOD_STORE_SRC],
214
+ // })
215
+ // delete c[ATTRIBUTE_METHOD_STORE_SRC]
216
+ //}
205
217
  if (c[ATTRIBUTE_METHOD_STORE_SRC]) {
206
- c.set('attributes', {
207
- ...c.get('attributes'),
208
- src: c[ATTRIBUTE_METHOD_STORE_SRC],
209
- });
218
+ c.set('src', c[ATTRIBUTE_METHOD_STORE_SRC]);
210
219
  delete c[ATTRIBUTE_METHOD_STORE_SRC];
211
220
  }
212
221
  if (c[ATTRIBUTE_METHOD_STORE_HREF]) {
@@ -1 +1 @@
1
- {"version":3,"file":"publication-transformers.js","sourceRoot":"","sources":["../../../../src/ts/client/publication-transformers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,EAAkB,kBAAkB,EAAgD,MAAM,UAAU,CAAA;AAC3G,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAG/B;;;;;;GAMG;AAEH,mFAAmF;AACnF,MAAM,2BAA2B,GAAG,wCAAwC,CAAA;AAC5E,MAAM,0BAA0B,GAAG,qCAAqC,CAAA;AACxE,MAAM,iCAAiC,GAAG,4CAA4C,CAAA;AACtF,MAAM,2BAA2B,GAAG,sCAAsC,CAAA;AAC1E,MAAM,0BAA0B,GAAG,uCAAuC,CAAA;AAmB1E,MAAM,UAAU,8BAA8B,CAAC,WAAmC;IAChF,0BAA0B;IAC1B,MAAM,iBAAiB,GAAG;QACxB,iBAAiB;QACjB,eAAe;QACf,eAAe;QACf,oBAAoB;QACpB,eAAe;KAChB,CAAA;IAED,6CAA6C;IAC7C,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,OAAO,CAA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MAAM,GAAG,CAAC,CAAC,2BAA2B,CAAC,CAAA;YACzC,OAAO,CAAC,CAAC,2BAA2B,CAAC,CAAA;SACtC;QACD,IAAI,CAAC,CAAC,iCAAiC,CAAC,EAAE;YACxC,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,iCAAiC,CAAC,CAAA;YACjD,OAAO,CAAC,CAAC,iCAAiC,CAAC,CAAA;SAC5C;QACD,IAAG,CAAC,CAAC,0BAA0B,CAAC,EAAE;YAChC,CAAC,CAAC,GAAG,CAAC,YAAY,EAAE;gBAClB,GAAG,CAAC,CAAC,GAAG,CAAC,YAAY,CAAC;gBACtB,GAAG,EAAE,CAAC,CAAC,0BAA0B,CAAC;aACnC,CAAC,CAAA;YACF,OAAO,CAAC,CAAC,0BAA0B,CAAC,CAAA;SACrC;QACD,IAAG,CAAC,CAAC,2BAA2B,CAAC,EAAE;YACjC,CAAC,CAAC,GAAG,CAAC,YAAY,EAAE;gBAClB,GAAG,CAAC,CAAC,GAAG,CAAC,YAAY,CAAC;gBACtB,IAAI,EAAE,CAAC,CAAC,2BAA2B,CAAC;aACrC,CAAC,CAAA;YACF,OAAO,CAAC,CAAC,2BAA2B,CAAC,CAAA;SACtC;IACH,CAAC,CAAC,CAAA;AACJ,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,MAAc;IAChD,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;QAC9B,IAAI,CAAC,CAAC,0BAA0B,CAAC,EAAE;YACjC,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,0BAA0B,CAAC,CAAA;YAC1C,OAAO,CAAC,CAAC,0BAA0B,CAAC,CAAA;SACrC;IACH,CAAC,CAAC,CAAA;AACJ,CAAC"}
1
+ {"version":3,"file":"publication-transformers.js","sourceRoot":"","sources":["../../../../src/ts/client/publication-transformers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,EAAkB,kB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AI,EAAE,CAAC,CAAC,2BAA2B,CAAC;aACrC,CAAC,CAAA;YACF,OAAO,CAAC,CAAC,2BAA2B,CAAC,CAAA;SACtC;IACH,CAAC,CAAC,CAAA;AACJ,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,MAAc;IAChD,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;QAC9B,IAAI,CAAC,CAAC,0BAA0B,CAAC,EAAE;YACjC,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,0BAA0B,CAAC,CAAA;YAC1C,OAAO,CAAC,CAAC,0BAA0B,CAAC,CAAA;SACrC;IACH,CAAC,CAAC,CAAA;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@silexlabs/silex",
3
3
  "description": "Free and easy website builder for everyone.",
4
- "version": "3.0.0-alpha.62",
4
+ "version": "3.0.0-alpha.64",
5
5
  "version:backwardcompat": "3.0.0",
6
6
  "author": {
7
7
  "name": "Alex Hoyau",
@@ -1,11 +1,11 @@
1
1
  // All colors
2
2
  // /!\ Duplicated in the grapesjs/index.ts too => keep in sync
3
- $primaryColor: #333333 !default;
4
- $secondaryColor: #ddd !default;
5
- $tertiaryColor: #8873FE !default;
6
- $quaternaryColor: #56E3FF !default;
7
- $darkerPrimaryColor: #363636 !default;
8
- $lighterPrimaryColor: #575757 !default;
3
+ $primaryColor: #333333;
4
+ $secondaryColor: #ddd;
5
+ $tertiaryColor: #8873FE;
6
+ $quaternaryColor: #A291FF;;
7
+ $darkerPrimaryColor: #292929;
8
+ $lighterPrimaryColor: #575757;
9
9
 
10
10
  $topBarHeight: 40px;
11
11
  $projectBarWidth: 35px;
@@ -22,3 +22,12 @@ $z-dialog-inline: 10;
22
22
  $z-loader: 10;
23
23
 
24
24
  $fontFamily: 'Ubuntu', sans-serif;
25
+
26
+ :root {
27
+ --primaryColor: #{$primaryColor};
28
+ --secondaryColor: #{$secondaryColor};
29
+ --tertiaryColor: #{$tertiaryColor};
30
+ --quaternaryColor: #{$quaternaryColor};
31
+ --darkerPrimaryColor: #{$darkerPrimaryColor};
32
+ --lighterPrimaryColor: #{$lighterPrimaryColor};
33
+ }
@@ -0,0 +1,180 @@
1
+ // Comes from gramateria
2
+ /* Overwrite GrapeJS css */
3
+
4
+ .gjs-cm-editor#gjs-cm-css #gjs-cm-title,
5
+ .gjs-cm-editor#gjs-cm-htmlmixed #gjs-cm-title,
6
+ .gjs-two-color,
7
+ .gjs-four-color,
8
+ .gjs-color-warn, .gjs-sm-sector .gjs-sm-field input, .gjs-clm-tags .gjs-sm-field input, .gjs-sm-sector .gjs-clm-field input, .gjs-clm-tags .gjs-clm-field input, .gjs-sm-sector .gjs-sm-field select, .gjs-clm-tags .gjs-sm-field select, .gjs-sm-sector .gjs-clm-field select, .gjs-clm-tags .gjs-clm-field select {
9
+ color: #464973;
10
+ }
11
+
12
+ .gjs-one-bg {
13
+ background-color: #f6f7f9;
14
+ }
15
+
16
+ .gjs-block:hover {
17
+ box-shadow: 0 3px 4px 0 rgba(204, 210, 251, 0.42);
18
+ }
19
+
20
+ .gjs-category-title,
21
+ .gjs-sm-sector .gjs-sm-title,
22
+ .gjs-clm-tags .gjs-sm-title,
23
+ .gjs-block-category .gjs-title,
24
+ .gjs-layer-title {
25
+ background-color: #eee;
26
+ border-bottom: 1px solid rgba(121, 121, 121, 0.25);
27
+ }
28
+
29
+ /* text editor color */
30
+
31
+
32
+ .gjs-cm-editor #gjs-cm-title {
33
+ background-color: rgba(164, 190, 241, 0.2);
34
+ }
35
+
36
+ .cm-s-hopscotch.CodeMirror {
37
+ /* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#2f3c54+0,414251+100 */
38
+ background: #2f3c54;
39
+ /* Old browsers */
40
+ background: -moz-linear-gradient(-45deg, #2f3c54 0%, #414251 100%);
41
+ /* FF3.6-15 */
42
+ background: -webkit-linear-gradient(-45deg, #2f3c54 0%, #414251 100%);
43
+ /* Chrome10-25,Safari5.1-6 */
44
+ background: linear-gradient(135deg, #2f3c54 0%, #414251 100%);
45
+ /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
46
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#2f3c54', endColorstr='#414251', GradientType=1);
47
+ /* IE6-9 fallback on horizontal gradient */
48
+ color: #999;
49
+ }
50
+
51
+ .cm-s-hopscotch .CodeMirror-gutters {
52
+ background: #232c3c;
53
+ }
54
+
55
+
56
+ /* class name */
57
+ .gjs-clm-tags #gjs-clm-close,
58
+ .gjs-clm-tags #gjs-clm-checkbox {
59
+ color: #444;
60
+ }
61
+
62
+ .gjs-three-bg {
63
+ background-color: #f6f7f9;
64
+ }
65
+
66
+ /* select box */
67
+ .gjs-field-arrow-u {
68
+ border-bottom: 4px solid #444;
69
+ }
70
+
71
+ .gjs-field-arrow-d {
72
+ border-top: 4px solid #444;
73
+ }
74
+
75
+
76
+ .gjs-field .gjs-d-s-arrow {
77
+ border-top: 4px solid rgb(68, 68, 68);
78
+ }
79
+
80
+ .gjs-pn-btn.fa:before,
81
+ .gjs-block.fa:before {
82
+ color: #262c42;
83
+ }
84
+
85
+ .gjs-block {
86
+ background: #fff;
87
+ }
88
+
89
+ .gjs-blocks-c {
90
+ padding-bottom: 6px;
91
+ }
92
+
93
+ .gjs-field select.gjs-devices {
94
+ padding: 2px;
95
+ }
96
+
97
+ .gjs-color-warn,
98
+ .gjs-sm-sector .gjs-sm-field input,
99
+ .gjs-clm-tags .gjs-sm-field input,
100
+ .gjs-sm-sector .gjs-clm-field input,
101
+ .gjs-clm-tags .gjs-clm-field input,
102
+ .gjs-sm-sector .gjs-sm-field select,
103
+ .gjs-clm-tags .gjs-sm-field select,
104
+ .gjs-sm-sector .gjs-clm-field select,
105
+ .gjs-clm-tags .gjs-clm-field select {
106
+ color: #000;
107
+ }
108
+
109
+ #gjs-mdl-c .header-menus {
110
+ justify-content: space-between;
111
+ display: flex;
112
+ align-items: center;
113
+ }
114
+
115
+ label.gjs-import-file {
116
+ padding:10px 30px;
117
+ border:1px dashed #ddd;
118
+ font-size:13px;
119
+ background:#fff;
120
+ }
121
+
122
+ label.gjs-import-file:hover{
123
+ cursor:pointer;
124
+ border-color:var(--theme-color);
125
+ }
126
+
127
+ .CodeMirror {
128
+ height: 400px;
129
+ }
130
+
131
+ button.exportgram {
132
+ margin-left: 10px;
133
+ padding: 4px 10px;
134
+ background: #444;
135
+ color: #fff;
136
+ border-radius: 20px;
137
+ }
138
+
139
+ .html-wrapper,
140
+ .css-wrapper {
141
+ width: 49%;
142
+ float: left;
143
+ }
144
+
145
+ .html-wrapper h4,
146
+ .css-wrapper h4 {
147
+ margin: 4px 0 4px;
148
+ }
149
+
150
+ .gjs-mdl-dialog {
151
+ max-width: none;
152
+ }
153
+
154
+ .clear-fix {
155
+ width: 100%;
156
+ clear: both;
157
+ }
158
+
159
+ .css-wrapper {
160
+ margin-left: 2%;
161
+ }
162
+
163
+
164
+
165
+ .gjs-sm-sectors .gjs-radio-items .gjs-radio-item {
166
+ background: #585858;
167
+ }
168
+
169
+ label.gjs-radio-item-label,
170
+ .gjs-sm-sectors .gjs-radio-item .fa {
171
+ color: #fff;
172
+ }
173
+
174
+ .gjs-four-color-h:hover {
175
+ color: var(--theme-color);
176
+ }
177
+
178
+ .iframe-wrapper{
179
+ padding-bottom:30px;
180
+ }
@@ -20,15 +20,6 @@
20
20
  // Ubuntu Fonts
21
21
  @use "@fontsource/ubuntu";
22
22
 
23
- :root {
24
- --primaryColor: $primaryColor;
25
- --secondaryColor: $secondaryColor;
26
- --tertiaryColor: $tertiaryColor;
27
- --quaternaryColor: $quaternaryColor;
28
- --darkerPrimaryColor: $darkerPrimaryColor;
29
- --lighterPrimaryColor: $lighterPrimaryColor;
30
- }
31
-
32
23
  .container-png::before {
33
24
  content: " ";
34
25
  background-image: url("../assets/container.png");
@@ -0,0 +1,7 @@
1
+ $primaryColor: #DDD;
2
+ $secondaryColor: #222;
3
+ $tertiaryColor: #B2A3FE;
4
+ $quaternaryColor: #A1D9FF;
5
+ $quaternaryColor: #FF3333;
6
+ $darkerPrimaryColor: #E0E0E0;
7
+ $lighterPrimaryColor: #F0F0F0;
@@ -23,7 +23,6 @@ import { getUser, logout, publicationStatus, publish } from '../api'
23
23
  import { API_CONNECTOR_LOGIN, API_CONNECTOR_PATH, API_PATH } from '../../constants'
24
24
  import { ClientEvent } from '../events'
25
25
  import { resetRenderComponents, resetRenderCssRules, transformPermalink, transformFiles, transformPath, renderComponents, renderCssRules } from '../publication-transformers'
26
- import { removeTempDataFromAssetUrl, removeTempDataFromPages, removeTempDataFromStyles } from '../assetUrl'
27
26
 
28
27
  /**
29
28
  * @fileoverview Publication manager for Silex
@@ -212,6 +211,7 @@ export class PublicationManager {
212
211
  const websiteId = this.options.websiteId
213
212
  const storageId = storageUser.storage.connectorId
214
213
  // Data to publish
214
+ // See assetUrl.ts which is a default transformer, always present
215
215
  this.setPublicationTransformers()
216
216
  const projectData = this.editor.getProjectData() as WebsiteData
217
217
  const siteSettings = this.editor.getModel().get('settings') as WebsiteSettings
@@ -298,6 +298,7 @@ export class PublicationManager {
298
298
  const cssPermalink = transformPermalink(this.editor, cssInitialPath, ClientSideFileType.CSS)
299
299
  const cssPath = transformPath(this.editor, cssInitialPath, ClientSideFileType.CSS)
300
300
  const htmlPath = transformPath(this.editor, htmlInitialPath, ClientSideFileType.HTML)
301
+ const body = this.editor.getHtml({ component })
301
302
  return {
302
303
  html: `
303
304
  <!DOCTYPE html>
@@ -313,7 +314,7 @@ export class PublicationManager {
313
314
  .join('\n')
314
315
  }
315
316
  </head>
316
- ${this.editor.getHtml({ component })}
317
+ ${body}
317
318
  </html>
318
319
  `,
319
320
  css: this.editor.getCss({ component }),
@@ -14,18 +14,19 @@ export default function (editor, options) {
14
14
  display: flex;
15
15
  align-items: center;
16
16
  height: 100%;
17
- padding: 5px 10px 0;
17
+ padding: 0 10px;
18
18
  font-size: 12px;
19
19
  color: #999;
20
20
  overflow-x: auto;
21
21
  overflow-y: hidden;
22
22
  }
23
23
  #breadcrumbs-container h3 {
24
+ font-size: inherit;
24
25
  margin: 0;
25
26
  }
26
27
  #breadcrumbs-container .breadcrumb {
27
- margin: 5px;
28
- font-size: 15px;
28
+ margin: 0 5px;
29
+ font-size: 14px;
29
30
  line-height: 1;
30
31
  cursor: pointer;
31
32
  white-space: nowrap;
@@ -57,7 +58,6 @@ export default function (editor, options) {
57
58
  while (component) {
58
59
  const breadcrumb = createBreadcrumb(component)
59
60
  breadcrumbsContainer.prepend(breadcrumb)
60
- console.log(component, component.tagName)
61
61
  component = component.parent()
62
62
  }
63
63
 
@@ -132,7 +132,7 @@ export function getEditorConfig(id: WebsiteId, connectorId: ConnectorId, rootUrl
132
132
  --primaryColor: #333333;
133
133
  --secondaryColor: #ddd;
134
134
  --tertiaryColor: #8873FE;
135
- --quaternaryColor: #56E3FF;
135
+ --quaternaryColor: #A291FF;
136
136
  --darkerPrimaryColor: #363636;
137
137
  --lighterPrimaryColor: #575757;
138
138
  }
@@ -104,13 +104,18 @@ export function renderComponents(editor: Editor) {
104
104
  })
105
105
  //}
106
106
  }
107
- if(c.get('attributes').src) {
108
- c[ATTRIBUTE_METHOD_STORE_SRC] = c.get('attributes').src
109
- const src = transformPermalink(editor, c.get('attributes').src, ClientSideFileType.ASSET)
110
- c.set('attributes', {
111
- ...c.get('attributes'),
112
- src,
113
- })
107
+ //if(c.get('attributes').src) {
108
+ // c[ATTRIBUTE_METHOD_STORE_SRC] = c.get('attributes').src
109
+ // const src = transformPermalink(editor, c.get('attributes').src, ClientSideFileType.ASSET)
110
+ // c.set('attributes', {
111
+ // ...c.get('attributes'),
112
+ // src,
113
+ // })
114
+ //}
115
+ if(c.get('src')) {
116
+ c[ATTRIBUTE_METHOD_STORE_SRC] = c.get('src')
117
+ const src = transformPermalink(editor, c.get('src'), ClientSideFileType.ASSET)
118
+ c.set('src', src)
114
119
  }
115
120
  c.toHTML = () => {
116
121
  return config.publicationTransformers.reduce((html: string, transformer: PublicationTransformer) => {
@@ -228,11 +233,15 @@ export function resetRenderComponents(editor: Editor) {
228
233
  c.getStyle = c[ATTRIBUTE_METHOD_STORE_INLINE_CSS]
229
234
  delete c[ATTRIBUTE_METHOD_STORE_INLINE_CSS]
230
235
  }
236
+ //if(c[ATTRIBUTE_METHOD_STORE_SRC]) {
237
+ // c.set('attributes', {
238
+ // ...c.get('attributes'),
239
+ // src: c[ATTRIBUTE_METHOD_STORE_SRC],
240
+ // })
241
+ // delete c[ATTRIBUTE_METHOD_STORE_SRC]
242
+ //}
231
243
  if(c[ATTRIBUTE_METHOD_STORE_SRC]) {
232
- c.set('attributes', {
233
- ...c.get('attributes'),
234
- src: c[ATTRIBUTE_METHOD_STORE_SRC],
235
- })
244
+ c.set('src', c[ATTRIBUTE_METHOD_STORE_SRC])
236
245
  delete c[ATTRIBUTE_METHOD_STORE_SRC]
237
246
  }
238
247
  if(c[ATTRIBUTE_METHOD_STORE_HREF]) {