@silexlabs/silex 3.0.0-alpha.30 → 3.0.1-alpha.0

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.
Files changed (42) hide show
  1. package/.silex/default/.silex.data.json +1 -0
  2. package/.silex.js +1 -8
  3. package/CONTRIBUTING.md +48 -25
  4. package/README.md +96 -0
  5. package/dist/client/css/admin.css +4 -66
  6. package/dist/client/js/main.js +53 -103
  7. package/dist/client/js/main.js.LICENSE.txt +3 -19
  8. package/dist/constants.js +4 -0
  9. package/dist/page.js +15 -0
  10. package/dist/server/cli.js +9 -0
  11. package/dist/server/config.js +31 -11
  12. package/dist/server/{start.js → express.js} +1 -1
  13. package/dist/server/index.js +9 -3
  14. package/dist/types.js +34 -0
  15. package/package.json +35 -34
  16. package/public/silex.js +25 -0
  17. package/src/example-client-config.js +47 -0
  18. package/src/plugins/DefaultBackend.js +40 -4
  19. package/src/plugins/ExpressPlugin.js +9 -0
  20. package/src/plugins/PublishPlugin.js +4 -4
  21. package/src/plugins/WebsitePlugin.js +77 -18
  22. package/src/ts/client/config.ts +20 -2
  23. package/src/ts/client/grapesjs/blocks.ts +18 -86
  24. package/src/ts/client/grapesjs/index.ts +27 -9
  25. package/src/ts/client/grapesjs/internal-links.test.ts +1 -0
  26. package/src/ts/client/grapesjs/publish.ts +4 -4
  27. package/src/ts/client/grapesjs/semantic.ts +1 -0
  28. package/src/ts/client/index.ts +21 -8
  29. package/src/ts/constants.ts +5 -0
  30. package/src/ts/server/cli.ts +6 -0
  31. package/src/ts/server/config.ts +45 -16
  32. package/src/ts/server/{start.ts → express.ts} +1 -1
  33. package/src/ts/server/index.ts +9 -2
  34. package/src/ts/types.ts +6 -12
  35. package/tsconfig-server-debug.json +2 -3
  36. package/tsconfig-server-release.json +2 -3
  37. package/tsconfig.json +2 -3
  38. package/webpack.config.js +0 -1
  39. package/public/example-config.js +0 -31
  40. package/readme.md +0 -51
  41. /package/dist/{server/events.js → events.js} +0 -0
  42. /package/src/ts/{server/events.ts → events.ts} +0 -0
package/src/ts/types.ts CHANGED
@@ -2,11 +2,8 @@
2
2
  * @fileoverview define types for Silex client and server
3
3
  */
4
4
 
5
- export const WEBSITE_CONTEXT_RUNTIME_CLASS_NAME = 'silex-runtime'
6
- export const WEBSITE_CONTEXT_EDITOR_CLASS_NAME = 'silex-editor'
7
-
8
5
  // Note: paths begin and end **without** slash
9
- export const defaultSettings: PublicationSettings = {
6
+ export const defaultPublicationSettings: PublicationSettings = {
10
7
  path: 'publication',
11
8
  url: '',
12
9
  autoHomePage: true,
@@ -16,7 +13,7 @@ export const defaultSettings: PublicationSettings = {
16
13
  }
17
14
 
18
15
  export const defaultSite: WebsiteData = {
19
- pages: [],
16
+ pages: [{name: 'Main', id: 'main', frames: [{component: {type: 'text', stylable: []}, components: []}]}],
20
17
  assets: [],
21
18
  styles: [],
22
19
  name: 'New website',
@@ -24,18 +21,15 @@ export const defaultSite: WebsiteData = {
24
21
  description: '',
25
22
  title: '',
26
23
  head: '',
27
- lang: 'en',
28
- favicon: 'https://editor.silex.me/assets/favicon.png',
24
+ lang: '',
25
+ favicon: '',
29
26
  'og:title': '',
30
27
  'og:description': '',
31
28
  'og:image': '',
32
29
  },
33
- fonts: [
34
- { name: 'Arial', value: 'Arial, Helvetica, sans-serif', variants: [] },
35
- { name: 'Times New Roman', value: '"Times New Roman", Times, serif', variants: [] },
36
- ],
30
+ fonts: [],
37
31
  symbols: [],
38
- publication: defaultSettings,
32
+ publication: defaultPublicationSettings,
39
33
  }
40
34
 
41
35
  export interface WebsiteSettings {
@@ -1,11 +1,10 @@
1
1
  {
2
2
  "compileOnSave": true,
3
3
  "compilerOptions": {
4
- "outDir": "dist/server/",
4
+ "outDir": "dist/",
5
5
  "target": "esnext",
6
- "watch": false,
7
6
  "inlineSourceMap": true,
8
- "module": "commonjs",
7
+ "module": "CommonJS",
9
8
  "removeComments": false,
10
9
  "esModuleInterop": true, /* for import 'Events' in silex-plugins */
11
10
  "typeRoots": [
@@ -1,11 +1,10 @@
1
1
  {
2
2
  "compileOnSave": false,
3
3
  "compilerOptions": {
4
- "outDir": "dist/server/",
4
+ "outDir": "dist/",
5
5
  "target": "esnext",
6
- "watch": false,
7
6
  "sourceMap": false,
8
- "module": "commonjs",
7
+ "module": "CommonJS",
9
8
  "removeComments": true,
10
9
  "esModuleInterop": true, /* for import 'Events' in silex-plugins */
11
10
  "typeRoots": [
package/tsconfig.json CHANGED
@@ -2,10 +2,9 @@
2
2
  "compileOnSave": true,
3
3
  "compilerOptions": {
4
4
  "outDir": "dist/client/",
5
- "target": "ES2022",
6
- "watch": true,
5
+ "target": "ESNext",
7
6
  "sourceMap": true,
8
- "module": "esnext",
7
+ "module": "ESNext",
9
8
  "removeComments": false,
10
9
  "allowJs": true,
11
10
  "typeRoots": [
package/webpack.config.js CHANGED
@@ -23,7 +23,6 @@ module.exports = {
23
23
  plugins: [
24
24
  new webpack.DefinePlugin({
25
25
  VERSION: JSON.stringify(require("./package.json").version),
26
- CONFIG_URL: process.env.CONFIG_URL && JSON.stringify(process.env.CONFIG_URL),
27
26
  }),
28
27
  ]
29
28
  };
@@ -1,31 +0,0 @@
1
- export default async function(config, options) {
2
- //await config.addPlugin('gjs-blocks-basic', 'https://unpkg.com/grapesjs-blocks-basic', {
3
- // blocks: ['text', 'image', 'video', 'map'],
4
- //})
5
-
6
- // Optional plugins
7
- await config.addPlugin([
8
- '@silexlabs/grapesjs-directus-storage',
9
- './plugins/@silexlabs/grapesjs-directus-storage/dist/index.js',
10
- ], {
11
- '@silexlabs/grapesjs-directus-storage': {
12
- directusUrl: 'http://localhost:8055',
13
- },
14
- './plugins/@silexlabs/grapesjs-directus-storage/dist/index.js': {
15
- directusUrl: 'http://localhost:8055',
16
- },
17
- })
18
-
19
- // Return an object to override default config
20
- return {
21
- ...config,
22
- ...options,
23
- editor: {
24
- ...config.editor,
25
- storageManager: {
26
- autoload: false,
27
- type: 'directus',
28
- },
29
- },
30
- }
31
- }
package/readme.md DELETED
@@ -1,51 +0,0 @@
1
- [![status of silex.me instance](https://monitoshi.lexoyo.me/badge/1525963562293-6552)](https://editor.silex.me) [![Join the chat at https://gitter.im/silex-website-builder/community](https://badges.gitter.im/silex-website-builder/community.svg)](https://gitter.im/silex-website-builder/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
2
-
3
- ![Silex UI](https://github.com/silexlabs/www.silex.me/raw/gh-pages/assets/silex-ui.gif)
4
-
5
- ## About Silex, live web creation.
6
-
7
- | :fire: Developers can test silex v3 with `npx @silexlabs/silex` |
8
- |-------------------------------------------------------------------------------|
9
-
10
- Silex, is a free and open source website builder in the cloud. Create websites directly in the browser without writing code. And it is suitable for professional designers to produce great websites without constraints. Silex is also known as the HTML5 editor.
11
-
12
- Brought to you by Silex Labs team, promoting free software. Feel free to [use the free Silex instance](https://editor.silex.me/) provided by [Silex Labs foundation](https://www.silexlabs.org/).
13
-
14
- Silex for makers and web designers who want a free alternative to Webflow or other closed source website builders:
15
-
16
- * [Use Silex online for free](https://editor.silex.me)
17
- * [Silex desktop app (works offline, with your local files)](https://github.com/silexlabs/silex-desktop/)
18
- * [Silex official website](http://www.silex.me/)
19
- * [Documentation wiki](https://github.com/silexlabs/Silex/wiki)
20
- * [Silex forums](https://github.com/silexlabs/Silex/issues)
21
- * [subscribe to Silex news by email (a few messages per year)](http://eepurl.com/F48q5) and follow us on [Facebook](http://www.facebook.com/silexlabs), [Twitter](https://twitter.com/silexlabs)
22
-
23
-
24
- Silex for professionals, agencies and hosting companies:
25
-
26
- * [Install Silex on your computer or server](https://github.com/silexlabs/Silex/wiki/How-to-Host-An-Instance-of-Silex#as-a-web-app-silex-web-version) (basically this is `npm install -g silex-website-builder && silex`)
27
- * If you know HTML and CSS here is how to [add your own components to the "+" menu](https://github.com/silexlabs/Silex/wiki/Create-Silex-components)
28
- * If you are a designer, here is how to [add your own templates to Silex](https://github.com/silexlabs/Silex/wiki/Create-templates-for-Silex)
29
- * If you are a freelance designer and wants to create Silex website for clients, [please leave your email here](http://eepurl.com/gjYnib)
30
- * If you are looking for a designer to help you create your website, [please leave your email here](http://eepurl.com/gjYnib)
31
- * [Hire a contributor from this list](https://github.com/silexlabs/Silex/graphs/contributors) or [from one](https://github.com/silexlabs/unifile/graphs/contributors) [of these](https://github.com/silexlabs/CloudExplorer2/graphs/contributors) [other lists](https://github.com/silexlabs/drag-drop-stage-component/graphs/contributors)
32
-
33
-
34
- Other links
35
-
36
- * [Silex meta repository for Silex contribution](https://github.com/silexlabs/silex-meta)
37
- * [Silex is dual licensed under GPL or MPL](http://www.silexlabs.org/silex/silex-licensing/)
38
- * [Road map](https://github.com/silexlabs/Silex/milestones)
39
- * [Change log](https://github.com/silexlabs/Silex/pulls?utf8=%E2%9C%93&q=is%3Apr)
40
- * [Open positions, join the team](https://github.com/silexlabs/Silex/issues?q=is%3Aissue+is%3Aopen+label%3A%22open+position%22)
41
- * [Become a core contributor with these issues to get started](https://github.com/silexlabs/Silex/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22)
42
- * [Testers, docs and other help wanted annoucements](https://github.com/silexlabs/Silex/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22)
43
-
44
- ## Dependencies
45
-
46
- The upstream projects we use in Silex are all listed in [Silex meta package](https://github.com/silexlabs/silex-meta)
47
-
48
- ## Github stars history
49
-
50
- [![Star History Chart](https://api.star-history.com/svg?repos=silexlabs/Silex&type=Timeline)](https://star-history.com/#silexlabs/Silex&Timeline)
51
-
File without changes
File without changes