@silexlabs/silex 3.0.0-alpha.92 → 3.0.0-alpha.93
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/js/main.js +2 -2
- package/package.json +2 -2
package/dist/client/js/main.js
CHANGED
|
@@ -57,7 +57,7 @@ var silex;(()=>{var t={357:function(t){var e;"undefined"!=typeof globalThis?glob
|
|
|
57
57
|
<footer>
|
|
58
58
|
<button type="button" class="gjs-btn-prim" @click=${()=>i(t)}>Retry</button>
|
|
59
59
|
</footer>
|
|
60
|
-
`,bn)}}t.Commands.add(cn,{async run(t){await r()},stop(t){n()}}),t.Commands.add(un,{async run(t){await Ke({type:R.STORAGE}),t.getModel().set("user",null),t.trigger(hn)}}),t.on(hn,(async()=>r()))}let _n,xn=[];const Cn=(t,e={})=>{const n={time:1e3,...e},r=t.StorageManager.getCurrentStorage(),o=t.StorageManager.getCurrentOptions();t.StorageManager.setCurrent("rate-limit");let i=!1,s=!1,a=null;window.addEventListener("beforeunload",(t=>{
|
|
60
|
+
`,bn)}}t.Commands.add(cn,{async run(t){await r()},stop(t){n()}}),t.Commands.add(un,{async run(t){await Ke({type:R.STORAGE}),t.getModel().set("user",null),t.trigger(hn)}}),t.on(hn,(async()=>r()))}let _n,xn=[];const Cn=(t,e={})=>{const n={time:1e3,...e},r=t.StorageManager.getCurrentStorage(),o=t.StorageManager.getCurrentOptions();t.StorageManager.setCurrent("rate-limit");let i=!1,s=!1,a=null;window.addEventListener("beforeunload",(t=>{s&&(t.preventDefault(),t.returnValue="")}));const l=async(e,n)=>{c();try{n&&(t.trigger("storage:start:store",e),t.trigger("storage:store",e)),await r.store(e,o),n&&(t.trigger("storage:end"),t.trigger("storage:end:store",e))}catch(e){if(!n)throw e;t.trigger("storage:error",e),t.trigger("storage:error:store",e)}},c=()=>{i=!0,setTimeout((async()=>{if(s){s=!1;const t=a;a=null,await l(t,!0)}else i=!1}),n.time)};t.Storage.add("rate-limit",{async store(t){i?(s=!0,a=t):await l(t,!1)},load:async t=>r.load(o)})};let Sn;const On="pages:open-panel",Tn="pages:add";function En(t,e){t.Pages.select(e)}const An=rt.plugins.add("page-panel",((t,e)=>{const n=document.createElement("div");n.classList.add("pages__wrapper");const r=()=>_e(function(t,e){const n=t.Pages.getAll(),r=t.Pages.getSelected(),o=e=>{const n=e.target.hasAttribute("data-page-id")?e.target:e.target.parentNode;return e.stopPropagation(),t.Pages.get(n.getAttribute("data-page-id"))};return re`<section class="pages">
|
|
61
61
|
<main class="pages__main ${1===n.length?"pages__single-page":""}">
|
|
62
62
|
<div class="pages__list">
|
|
63
63
|
${n.map((n=>{const i=n.getName()||n.attributes.type;return re`
|
|
@@ -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)}))),"string"==typeof e.command&&t.Commands.add(e.command,{run(){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")}()}))},Hn=document.createElement("div");let Fn;const Vn="open-settings";let Un="v3";const Bn=rt.plugins.add("settings-dialog",((t,e)=>{try{Un="3.0.0-alpha.
|
|
100
|
+
`,r),document.body.appendChild(r),t.on("load",(()=>{n.view.el.appendChild(r)}))),"string"==typeof e.command&&t.Commands.add(e.command,{run(){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")}()}))},Hn=document.createElement("div");let Fn;const Vn="open-settings";let Un="v3";const Bn=rt.plugins.add("settings-dialog",((t,e)=>{try{Un="3.0.0-alpha.93"}catch(t){}console.info("Silex version:",Un),t.Commands.add(Vn,{run:(e,n,{page:r})=>{Fn=t.Modal.open({title:r?"Page settings":"Site Settings",content:"",attributes:{class:"settings-dialog"}}).onceClose((()=>{n.set("active",0),t.stopCommand(Vn)})),function(t,e,n=t.getModel()){const r=n.get("settings")||{};n.set("settings",r),_e(re`
|
|
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>
|
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.
|
|
4
|
+
"version": "3.0.0-alpha.93",
|
|
5
5
|
"version:backwardcompat": "3.0.0",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Alex Hoyau",
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
"@gitbeaker/rest": "^39.7.0",
|
|
106
106
|
"@silexlabs/grapesjs-fonts": "1.0.12",
|
|
107
107
|
"@silexlabs/grapesjs-loading": "1.0.8",
|
|
108
|
-
"@silexlabs/grapesjs-storage-rate-limit": "^1.0.
|
|
108
|
+
"@silexlabs/grapesjs-storage-rate-limit": "^1.0.7",
|
|
109
109
|
"@silexlabs/grapesjs-symbols": "1.0.22",
|
|
110
110
|
"@silexlabs/grapesjs-ui-suggest-classes": "1.0.23",
|
|
111
111
|
"@silexlabs/silex-plugins": "1.0.10",
|