@silexlabs/silex 3.0.0-alpha.81 → 3.0.0-alpha.82

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.
@@ -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")}()}))},Dn=document.createElement("div");let $n;const Rn="open-settings";let Hn="v3";const Fn=rt.plugins.add("settings-dialog",((t,e)=>{try{Hn="3.0.0-alpha.81"}catch(t){}console.info("Silex version:",Hn),t.Commands.add(Rn,{run:(e,n,{page:r})=>{$n=t.Modal.open({title:r?"Page settings":"Site Settings",content:"",attributes:{class:"settings-dialog"}}).onceClose((()=>{n.set("active",0),t.stopCommand(Rn)})),function(t,e,n=t.getModel()){const r=n.get("settings")||{};n.set("settings",r),_e(re`
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")}()}))},Dn=document.createElement("div");let $n;const Rn="open-settings";let Hn="v3";const Fn=rt.plugins.add("settings-dialog",((t,e)=>{try{Hn="3.0.0-alpha.82"}catch(t){}console.info("Silex version:",Hn),t.Commands.add(Rn,{run:(e,n,{page:r})=>{$n=t.Modal.open({title:r?"Page settings":"Site Settings",content:"",attributes:{class:"settings-dialog"}}).onceClose((()=>{n.set("active",0),t.stopCommand(Rn)})),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>
@@ -18,20 +18,20 @@ export default (config, opts) => {
18
18
  },
19
19
  };
20
20
  config.addPublicationTransformers({
21
- //transformPermalink: (path, type) => {
22
- // switch (type) {
23
- // case 'html':
24
- // console.log('Silex: transform path for 11ty', path, options.html.url + path)
25
- // return options.html.url + path
26
- // case 'css':
27
- // console.log('Silex: transform path for 11ty', path, options.css.url + path.replace(/\.css$/, '.css.liquid'))
28
- // return options.css.url + path.replace(/\.css$/, '.css.liquid')
29
- // case 'asset':
30
- // console.log('Silex: transform path for 11ty', path, options.assets.url + path)
31
- // return options.assets.url + path
32
- // }
33
- // throw new Error(`Unknown file type ${type}`)
34
- //},
21
+ transformPermalink: (path, type) => {
22
+ switch (type) {
23
+ case 'html':
24
+ console.log('Silex: transform path for 11ty', path, options.html.url + path);
25
+ return options.html.url + path;
26
+ case 'css':
27
+ console.log('Silex: transform path for 11ty', path, options.css.url + path.replace(/\.css$/, '.css.liquid'));
28
+ return options.css.url + path.replace(/\.css$/, '.css.liquid');
29
+ case 'asset':
30
+ console.log('Silex: transform path for 11ty', path, options.assets.url + path);
31
+ return options.assets.url + path;
32
+ }
33
+ throw new Error(`Unknown file type ${type}`);
34
+ },
35
35
  transformPath: (path, type) => {
36
36
  switch (type) {
37
37
  case 'html':
@@ -1 +1 @@
1
- {"version":3,"file":"11ty.js","sourceRoot":"","sources":["../../../../../src/ts/plugins/client/11ty.ts"],"names":[],"mappings":"AAkBA,eAAe,CAAC,MAAoB,EAAE,IAA4B,EAAE,EAAE;IACpE,MAAM,OAAO,GAAG;QACd,GAAG,IAAI;QACP,IAAI,EAAE;YACJ,GAAG,EAAE,GAAG;YACR,IAAI,EAAE,IAAI;YACV,GAAG,IAAI,CAAC,IAAI;SACb;QACD,GAAG,EAAE;YACH,GAAG,EAAE,MAAM;YACX,IAAI,EAAE,OAAO;YACb,GAAG,IAAI,CAAC,GAAG;SACZ;QACD,MAAM,EAAE;YACN,GAAG,EAAE,GAAG;YACR,IAAI,EAAE,IAAI;YACV,GAAG,IAAI,CAAC,MAAM;SACf;KACF,CAAA;IAED,MAAM,CAAC,0BAA0B,CAAC;QAChC,uCAAuC;QACvC,mBAAmB;QACnB,gBAAgB;QAChB,kFAAkF;QAClF,oCAAoC;QACpC,eAAe;QACf,kHAAkH;QAClH,oEAAoE;QACpE,iBAAiB;QACjB,oFAAoF;QACpF,sCAAsC;QACtC,KAAK;QACL,gDAAgD;QAChD,IAAI;QACJ,aAAa,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE;YAC5B,QAAQ,IAAI,EAAE;gBACd,KAAK,MAAM;oBACT,OAAO,OAAO,CAAC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;gBACjC,KAAK,KAAK;oBACR,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,C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,OAAO,CAAC,GAAG,CAAC,GAAG,GAAG,IAAI,UAAU,eAAe,CAAC,OAAO,EAAE;qBACtF,CAAA;gBACH,KAAK,OAAO;oBACV,OAAO;wBACL,GAAG,IAAI;wBACP,mDAAmD;qBACpD,CAAA;aACF;YACD,MAAM,IAAI,KAAK,CAAC,qBAAqB,IAAI,CAAC,IAAI,EAAE,CAAC,CAAA;QACnD,CAAC;KACF,CAAC,CAAA;AACJ,CAAC,CAAA"}
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.81",
4
+ "version": "3.0.0-alpha.82",
5
5
  "version:backwardcompat": "3.0.0",
6
6
  "author": {
7
7
  "name": "Alex Hoyau",
@@ -37,20 +37,20 @@ export default (config: ClientConfig, opts: Partial<PluginOptions>) => {
37
37
  }
38
38
 
39
39
  config.addPublicationTransformers({
40
- //transformPermalink: (path, type) => {
41
- // switch (type) {
42
- // case 'html':
43
- // console.log('Silex: transform path for 11ty', path, options.html.url + path)
44
- // return options.html.url + path
45
- // case 'css':
46
- // console.log('Silex: transform path for 11ty', path, options.css.url + path.replace(/\.css$/, '.css.liquid'))
47
- // return options.css.url + path.replace(/\.css$/, '.css.liquid')
48
- // case 'asset':
49
- // console.log('Silex: transform path for 11ty', path, options.assets.url + path)
50
- // return options.assets.url + path
51
- // }
52
- // throw new Error(`Unknown file type ${type}`)
53
- //},
40
+ transformPermalink: (path, type) => {
41
+ switch (type) {
42
+ case 'html':
43
+ console.log('Silex: transform path for 11ty', path, options.html.url + path)
44
+ return options.html.url + path
45
+ case 'css':
46
+ console.log('Silex: transform path for 11ty', path, options.css.url + path.replace(/\.css$/, '.css.liquid'))
47
+ return options.css.url + path.replace(/\.css$/, '.css.liquid')
48
+ case 'asset':
49
+ console.log('Silex: transform path for 11ty', path, options.assets.url + path)
50
+ return options.assets.url + path
51
+ }
52
+ throw new Error(`Unknown file type ${type}`)
53
+ },
54
54
  transformPath: (path, type) => {
55
55
  switch (type) {
56
56
  case 'html':