@silexlabs/silex 3.0.0-alpha.36 → 3.0.0-alpha.37
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 +1 -1
- package/dist/server/cli.js +5 -1
- package/package.json +1 -1
- package/src/ts/server/cli.ts +2 -2
package/dist/client/js/main.js
CHANGED
|
@@ -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.
|
|
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`
|
|
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/dist/server/cli.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
3
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
const index_1 = __importDefault(require("./index"));
|
|
4
8
|
const cli_1 = require("cli");
|
|
5
9
|
const options = (0, cli_1.parse)({
|
|
6
10
|
config: ['c', 'Path for the server side config file to load at startup', 'file'],
|
|
@@ -40,4 +44,4 @@ if (options['client-config'])
|
|
|
40
44
|
process.env.SILEX_CLIENT_CONFIG = options['client-config'];
|
|
41
45
|
if (options['fs-root'])
|
|
42
46
|
process.env.FS_ROOT = options['fs-root'];
|
|
43
|
-
|
|
47
|
+
(0, index_1.default)();
|
package/package.json
CHANGED
package/src/ts/server/cli.ts
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
import silex from './index'
|
|
21
21
|
import { parse } from 'cli'
|
|
22
22
|
|
|
23
23
|
const options = parse({
|
|
@@ -48,4 +48,4 @@ if(options['cors-url']) process.env.SILEX_CORS_URL = options['cors-url']
|
|
|
48
48
|
if(options['client-config']) process.env.SILEX_CLIENT_CONFIG = options['client-config']
|
|
49
49
|
if(options['fs-root']) process.env.FS_ROOT = options['fs-root']
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
silex()
|