@silexlabs/silex 3.0.0-alpha.37 → 3.0.0-alpha.39

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.
@@ -0,0 +1 @@
1
+ {}
package/.silex.js ADDED
@@ -0,0 +1,12 @@
1
+ module.exports = function (silexConfig, options) {
2
+ silexConfig.addPlugin([
3
+ __dirname + '/src/plugins/ExpressPlugin.js',
4
+ __dirname + '/src/plugins/SslPlugin.js',
5
+ __dirname + '/src/plugins/StaticPlugin.js',
6
+ __dirname + '/src/plugins/WebsitePlugin.js',
7
+ __dirname + '/src/plugins/PublishPlugin.js',
8
+ ])
9
+
10
+ // Return an object to be merged with Silex config
11
+ return {}
12
+ }
@@ -39,7 +39,7 @@ var silex;(()=>{var t={357:function(t){var e;"undefined"!=typeof globalThis?glob
39
39
  ><span>${e.text}</span></div>
40
40
  `))}
41
41
  </header>
42
- `,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")}()}))},de=document.createElement("div");let he;const ge="open-settings";let ve="v3";const me=f.plugins.add("settings-dialog",((t,e)=>{try{ve="3.0.0-alpha.37"}catch(t){}console.log("Silex version:",ve),t.Commands.add(ge,{run:(e,n,{page:r})=>{he=t.Modal.open({title:r?"Page settings":"Site Settings",content:"",attributes:{class:"settings-dialog"}}).onceClose((()=>{t.stopCommand(ge)})),function(t,e,n=t.getModel()){const r=n.get("settings")||{};n.set("settings",r),Pt(ft`
42
+ `,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")}()}))},de=document.createElement("div");let he;const ge="open-settings";let ve="v3";const me=f.plugins.add("settings-dialog",((t,e)=>{try{ve="3.0.0-alpha.39"}catch(t){}console.log("Silex version:",ve),t.Commands.add(ge,{run:(e,n,{page:r})=>{he=t.Modal.open({title:r?"Page settings":"Site Settings",content:"",attributes:{class:"settings-dialog"}}).onceClose((()=>{t.stopCommand(ge)})),function(t,e,n=t.getModel()){const r=n.get("settings")||{};n.set("settings",r),Pt(ft`
43
43
  <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>
44
44
  <form class="silex-form">
45
45
  <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.37",
4
+ "version": "3.0.0-alpha.39",
5
5
  "version:backwardcompat": "3.0.0",
6
6
  "author": {
7
7
  "name": "Alex Hoyau",
@@ -14,7 +14,11 @@
14
14
  "files": [
15
15
  "dist/",
16
16
  "src/",
17
+ "public",
18
+ ".silex.js",
19
+ ".silex",
17
20
  "package.json",
21
+ "package-lock.json",
18
22
  "README.md",
19
23
  "LICENSE"
20
24
  ],
Binary file
Binary file
@@ -0,0 +1,2 @@
1
+ User-agent: *
2
+ Disallow: /
@@ -0,0 +1,25 @@
1
+ // This file is loaded by Silex when the user opens the editor
2
+ // Unless you override the default config with the environment variable SILEX_CLIENT_CONFIG or the CLI option --client-config
3
+ export default async function (config) {
4
+ // // For example add a GrapesJs plugin like this
5
+ // config.editor.plugins.push(plugin)
6
+ // config.editor.pluginsOpts[plugin] = {
7
+ // }
8
+ // // Or like this to override the default options
9
+ // // See the docs for the list of options
10
+ // return {
11
+ // ...config,
12
+ // editor: {
13
+ // ...config.editor,
14
+ // plugins: [
15
+ // ...config.editor.plugins,
16
+ // plugin,
17
+ // ],
18
+ // pluginsOpts: {
19
+ // ...config.editor.pluginsOpts,
20
+ // [plugin]: {
21
+ // },
22
+ // },
23
+ // },
24
+ // }
25
+ }
@@ -3,7 +3,7 @@ const { resolve } = require('path')
3
3
  const formidable = require('formidable')
4
4
 
5
5
  const { noCache } = require('./Cache')
6
- const { defaultSite } = require('@silexlabs/silex').default.types
6
+ const { defaultSite } = require('../../')
7
7
 
8
8
  const EVENT_READ_START = 'EVENT_READ_START'
9
9
  const EVENT_READ_END = 'EVENT_READ_END'