@silexlabs/silex 3.0.1-0 → 3.0.1
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/.env.default +3 -2
- package/.silex.js +39 -1
- package/README.md +37 -35
- package/dist/client/client/api.d.ts +8 -1
- package/dist/client/client/assetUrl.d.ts +54 -0
- package/dist/client/client/config.d.ts +60 -1
- package/dist/client/client/events.d.ts +19 -10
- package/dist/client/client/grapesjs/PublicationManager.d.ts +6 -8
- package/dist/client/client/grapesjs/PublicationUi.d.ts +8 -10
- package/dist/client/client/grapesjs/breadcrumbs.d.ts +1 -0
- package/dist/client/client/grapesjs/css-props.d.ts +6 -0
- package/dist/client/client/grapesjs/footer.d.ts +2 -0
- package/dist/client/client/grapesjs/img.d.ts +6 -0
- package/dist/client/client/grapesjs/index.d.ts +6 -2
- package/dist/client/client/grapesjs/internal-links.d.ts +1 -1
- package/dist/client/client/grapesjs/keymaps.d.ts +123 -0
- package/dist/client/client/grapesjs/new-page-dialog.d.ts +1 -1
- package/dist/client/client/grapesjs/page-panel.d.ts +7 -1
- package/dist/client/client/grapesjs/project-bar.d.ts +20 -0
- package/dist/client/client/grapesjs/resize-panel.d.ts +1 -0
- package/dist/client/client/grapesjs/rich-text.d.ts +4 -1
- package/dist/client/client/grapesjs/semantic.d.ts +1 -1
- package/dist/client/client/grapesjs/settings-sections.d.ts +16 -0
- package/dist/client/client/grapesjs/settings.d.ts +3 -1
- package/dist/client/client/grapesjs/storage.d.ts +1 -0
- package/dist/client/client/grapesjs/symbolDialogs.d.ts +1 -1
- package/dist/client/client/grapesjs/view-buttons.d.ts +1 -0
- package/dist/client/client/index.d.ts +5 -0
- package/dist/client/client/publication-transformers.d.ts +42 -0
- package/dist/client/client/publish-custom-code-block.d.ts +4 -0
- package/dist/client/client/publish-fonts.d.ts +4 -0
- package/dist/client/client/utils.d.ts +22 -1
- package/dist/client/constants.d.ts +3 -0
- package/dist/client/css/admin.css +1107 -411
- package/dist/client/css/admin.css.map +1 -0
- package/dist/client/grapesjs-filter-styles/dist/index.d.ts +4 -0
- package/dist/client/grapesjs-fonts/dist/index.d.ts +4 -0
- package/dist/client/grapesjs-fonts/src/commands.d.ts +3 -0
- package/dist/client/grapesjs-fonts/src/fonts.d.ts +4 -0
- package/dist/client/grapesjs-storage-rate-limit/dist/index.d.ts +4 -0
- package/dist/client/grapesjs-ui-suggest-classes/dist/index.d.ts +4 -0
- package/dist/client/index.html +3 -2
- package/dist/client/js/main.js +305 -170
- package/dist/client/js/main.js.LICENSE.txt +21 -1
- package/dist/client/page.d.ts +1 -1
- package/dist/client/silex-lib/src/ts/client/api.d.ts +90 -0
- package/dist/client/silex-lib/src/ts/client/assetUrl.d.ts +54 -0
- package/dist/client/silex-lib/src/ts/client/config.d.ts +102 -0
- package/dist/client/silex-lib/src/ts/client/events.d.ts +23 -0
- package/dist/client/silex-lib/src/ts/client/expose.d.ts +8 -0
- package/dist/client/silex-lib/src/ts/client/grapesjs/LoginDialog.d.ts +15 -0
- package/dist/client/silex-lib/src/ts/client/grapesjs/PublicationManager.d.ts +73 -0
- package/dist/client/silex-lib/src/ts/client/grapesjs/PublicationUi.d.ts +59 -0
- package/dist/client/silex-lib/src/ts/client/grapesjs/blocks.d.ts +1 -0
- package/dist/client/silex-lib/src/ts/client/grapesjs/breadcrumbs.d.ts +1 -0
- package/dist/client/silex-lib/src/ts/client/grapesjs/css-props.d.ts +6 -0
- package/dist/client/silex-lib/src/ts/client/grapesjs/footer.d.ts +2 -0
- package/dist/client/silex-lib/src/ts/client/grapesjs/img.d.ts +6 -0
- package/dist/client/silex-lib/src/ts/client/grapesjs/index.d.ts +9 -0
- package/dist/client/silex-lib/src/ts/client/grapesjs/internal-links.d.ts +1 -0
- package/dist/client/silex-lib/src/ts/client/grapesjs/keymaps.d.ts +123 -0
- package/dist/client/silex-lib/src/ts/client/grapesjs/new-page-dialog.d.ts +2 -0
- package/dist/client/silex-lib/src/ts/client/grapesjs/openImport.d.ts +9 -0
- package/dist/client/silex-lib/src/ts/client/grapesjs/page-panel.d.ts +9 -0
- package/dist/client/silex-lib/src/ts/client/grapesjs/project-bar.d.ts +21 -0
- package/dist/client/silex-lib/src/ts/client/grapesjs/resize-panel.d.ts +1 -0
- package/dist/client/silex-lib/src/ts/client/grapesjs/rich-text.d.ts +4 -0
- package/dist/client/silex-lib/src/ts/client/grapesjs/semantic.d.ts +1 -0
- package/dist/client/silex-lib/src/ts/client/grapesjs/settings-sections.d.ts +16 -0
- package/dist/client/silex-lib/src/ts/client/grapesjs/settings.d.ts +4 -0
- package/dist/client/silex-lib/src/ts/client/grapesjs/storage.d.ts +2 -0
- package/dist/client/silex-lib/src/ts/client/grapesjs/symbolDialogs.d.ts +3 -0
- package/dist/client/silex-lib/src/ts/client/grapesjs/view-buttons.d.ts +1 -0
- package/dist/client/silex-lib/src/ts/client/index.d.ts +10 -0
- package/dist/client/silex-lib/src/ts/client/publication-transformers.d.ts +42 -0
- package/dist/client/silex-lib/src/ts/client/publish-custom-code-block.d.ts +4 -0
- package/dist/client/silex-lib/src/ts/client/publish-fonts.d.ts +4 -0
- package/dist/client/silex-lib/src/ts/client/utils.d.ts +22 -0
- package/dist/client/silex-lib/src/ts/constants.d.ts +32 -0
- package/dist/client/silex-lib/src/ts/page.d.ts +2 -0
- package/dist/client/silex-lib/src/ts/types.d.ts +339 -0
- package/dist/client/types.d.ts +59 -35
- package/dist/plugins/client/client/events.d.ts +19 -10
- package/dist/plugins/client/client/events.js +11 -0
- package/dist/plugins/client/client/events.js.map +1 -1
- package/dist/plugins/client/plugins/client/template.js +119 -71
- package/dist/plugins/client/plugins/client/template.js.map +1 -1
- package/dist/plugins/client/plugins/client/website-info.d.ts +1 -0
- package/dist/plugins/client/plugins/client/website-info.js +72 -0
- package/dist/plugins/client/plugins/client/website-info.js.map +1 -0
- package/dist/plugins/client/types.d.ts +59 -35
- package/dist/plugins/client/types.js +23 -0
- package/dist/plugins/client/types.js.map +1 -1
- package/dist/plugins/server/constants.d.ts +3 -0
- package/dist/plugins/server/constants.js +28 -1
- package/dist/plugins/server/constants.js.map +1 -1
- package/dist/plugins/server/plugins/server/Cache.js +9 -5
- package/dist/plugins/server/plugins/server/Cache.js.map +1 -1
- package/dist/plugins/server/plugins/server/DownloadConnector.d.ts +29 -0
- package/dist/plugins/server/plugins/server/DownloadConnector.js +127 -0
- package/dist/plugins/server/plugins/server/DownloadConnector.js.map +1 -0
- package/dist/plugins/server/plugins/server/FtpConnector.d.ts +5 -2
- package/dist/plugins/server/plugins/server/FtpConnector.js +38 -23
- package/dist/plugins/server/plugins/server/FtpConnector.js.map +1 -1
- package/dist/plugins/server/plugins/server/GitlabConnector.d.ts +63 -9
- package/dist/plugins/server/plugins/server/GitlabConnector.js +367 -91
- package/dist/plugins/server/plugins/server/GitlabConnector.js.map +1 -1
- package/dist/plugins/server/plugins/server/GitlabHostingConnector.d.ts +16 -0
- package/dist/plugins/server/plugins/server/GitlabHostingConnector.js +209 -0
- package/dist/plugins/server/plugins/server/GitlabHostingConnector.js.map +1 -0
- package/dist/plugins/server/plugins/server/SslPlugin.js +6 -6
- package/dist/plugins/server/plugins/server/SslPlugin.js.map +1 -1
- package/dist/plugins/server/plugins/server/StaticPlugin.d.ts +8 -1
- package/dist/plugins/server/plugins/server/StaticPlugin.js +5 -31
- package/dist/plugins/server/plugins/server/StaticPlugin.js.map +1 -1
- package/dist/plugins/server/server/config.js +8 -9
- package/dist/plugins/server/server/config.js.map +1 -1
- package/dist/plugins/server/server/connectors/FsHosting.d.ts +3 -2
- package/dist/plugins/server/server/connectors/FsHosting.js +18 -7
- package/dist/plugins/server/server/connectors/FsHosting.js.map +1 -1
- package/dist/plugins/server/server/connectors/FsStorage.d.ts +3 -1
- package/dist/plugins/server/server/connectors/FsStorage.js +35 -28
- package/dist/plugins/server/server/connectors/FsStorage.js.map +1 -1
- package/dist/plugins/server/server/connectors/connectors.d.ts +7 -7
- package/dist/plugins/server/server/connectors/connectors.js +6 -7
- package/dist/plugins/server/server/connectors/connectors.js.map +1 -1
- package/dist/plugins/server/server/events.js +16 -0
- package/dist/plugins/server/server/events.js.map +1 -1
- package/dist/plugins/server/server/jobs.d.ts +6 -0
- package/dist/plugins/server/server/jobs.js +12 -8
- package/dist/plugins/server/server/jobs.js.map +1 -1
- package/dist/plugins/server/server/utils/validation.js +1 -2
- package/dist/plugins/server/server/utils/validation.js.map +1 -1
- package/dist/plugins/server/types.d.ts +59 -35
- package/dist/plugins/server/types.js +24 -1
- package/dist/plugins/server/types.js.map +1 -1
- package/dist/server/constants.js +27 -1
- package/dist/server/plugins/server/Cache.js +9 -5
- package/dist/server/server/api/api.js +1 -1
- package/dist/server/server/api/connectorApi.js +154 -25
- package/dist/server/server/api/publicationApi.js +17 -25
- package/dist/server/server/api/websiteApi.js +30 -8
- package/dist/server/server/cli.js +9 -6
- package/dist/server/server/config.js +8 -9
- package/dist/server/server/connectors/FsHosting.js +17 -7
- package/dist/server/server/connectors/FsStorage.js +34 -28
- package/dist/server/server/connectors/connectors.js +6 -7
- package/dist/server/server/express.js +4 -5
- package/dist/server/server/index.js +5 -1
- package/dist/server/server/jobs.js +11 -8
- package/dist/server/server/utils/validation.js +1 -2
- package/dist/server/types.js +13 -1
- package/package.json +56 -42
- package/public/assets/download.png +0 -0
- package/public/assets/favicon.ico +0 -0
- package/public/assets/favicon.png +0 -0
- package/public/assets/ftp.png +0 -0
- package/public/assets/gitlab.png +0 -0
- package/public/assets/gitlab2.png +0 -0
- package/public/assets/laptop.png +0 -0
- package/public/assets/logo-silex-small.png +0 -0
- package/public/silex.js +5 -23
- package/src/css/_variables.scss +23 -20
- package/src/css/dialog.scss +27 -1
- package/src/css/fonts.scss +31 -0
- package/src/css/footer.scss +12 -0
- package/src/css/grapesjs-light.scss +180 -0
- package/src/css/grapesjs-plugins.scss +227 -0
- package/src/css/grapesjs.scss +84 -10
- package/src/css/index.scss +12 -1
- package/src/css/light.scss +7 -0
- package/src/css/project-bar.scss +32 -16
- package/src/css/silex.scss +79 -5
- package/src/css/website-info.scss +14 -0
- package/src/html/index.pug +3 -3
- package/src/ts/client/api.ts +38 -14
- package/src/ts/client/assetUrl.test.ts +164 -0
- package/src/ts/client/assetUrl.ts +254 -0
- package/src/ts/client/config.ts +133 -5
- package/src/ts/client/events.ts +21 -9
- package/src/ts/client/grapesjs/LoginDialog.ts +4 -2
- package/src/ts/client/grapesjs/PublicationManager.ts +180 -54
- package/src/ts/client/grapesjs/PublicationUi.ts +122 -86
- package/src/ts/client/grapesjs/breadcrumbs.ts +79 -0
- package/src/ts/client/grapesjs/css-props.ts +910 -0
- package/src/ts/client/grapesjs/eleventy.ts +11 -8
- package/{dist/plugins/client/page.js → src/ts/client/grapesjs/footer.ts} +24 -13
- package/src/ts/client/grapesjs/img.ts +147 -0
- package/src/ts/client/grapesjs/index.ts +234 -52
- package/src/ts/client/grapesjs/internal-links.test.ts +2 -1
- package/src/ts/client/grapesjs/internal-links.ts +14 -7
- package/src/ts/client/grapesjs/keymaps.ts +207 -0
- package/src/ts/client/grapesjs/new-page-dialog.ts +2 -3
- package/src/ts/client/grapesjs/page-panel.ts +92 -7
- package/src/ts/client/grapesjs/project-bar.ts +116 -72
- package/src/ts/client/grapesjs/resize-panel.ts +20 -0
- package/src/ts/client/grapesjs/rich-text.ts +21 -13
- package/src/ts/client/grapesjs/semantic.ts +3 -3
- package/src/ts/client/grapesjs/settings-sections.ts +117 -0
- package/src/ts/client/grapesjs/settings.ts +174 -96
- package/src/ts/client/grapesjs/storage.ts +98 -33
- package/src/ts/client/grapesjs/symbolDialogs.ts +3 -4
- package/src/ts/{plugins/server/AuthPlugin.ts → client/grapesjs/view-buttons.ts} +23 -19
- package/src/ts/client/index.ts +35 -16
- package/src/ts/client/publication-transformers.test.ts +207 -0
- package/src/ts/client/publication-transformers.ts +280 -0
- package/{dist/plugins/client/client/utils.js → src/ts/client/publish-custom-code-block.ts} +14 -8
- package/src/ts/client/publish-fonts.ts +36 -0
- package/src/ts/client/utils.ts +53 -1
- package/src/ts/constants.ts +31 -0
- package/src/ts/page.ts +2 -2
- package/src/ts/plugins/client/template.ts +125 -75
- package/src/ts/plugins/client/website-info.ts +84 -0
- package/src/ts/plugins/server/Cache.ts +6 -2
- package/src/ts/plugins/server/DownloadConnector.ts +146 -0
- package/src/ts/plugins/server/FtpConnector.ts +47 -21
- package/src/ts/plugins/server/GitlabConnector.ts +423 -108
- package/src/ts/plugins/server/GitlabHostingConnector.ts +215 -0
- package/src/ts/plugins/server/SslPlugin.ts +5 -5
- package/src/ts/plugins/server/StaticPlugin.ts +3 -30
- package/src/ts/server/api/connectorApi.ts +165 -28
- package/src/ts/server/api/publicationApi.ts +17 -24
- package/src/ts/server/api/websiteApi.ts +57 -14
- package/src/ts/server/cli.ts +7 -5
- package/src/ts/server/config.ts +9 -10
- package/src/ts/server/connectors/FsHosting.ts +14 -8
- package/src/ts/server/connectors/FsStorage.ts +40 -7
- package/src/ts/server/connectors/connectors.ts +8 -6
- package/src/ts/server/events.ts +17 -0
- package/src/ts/server/express.ts +2 -2
- package/src/ts/server/index.ts +6 -0
- package/src/ts/server/jobs.ts +14 -2
- package/src/ts/server/utils/BackwardCompat.ts +530 -529
- package/src/ts/types.ts +78 -34
- package/dist/plugins/client/client/utils.d.ts +0 -1
- package/dist/plugins/client/client/utils.js.map +0 -1
- package/dist/plugins/client/page.d.ts +0 -2
- package/dist/plugins/client/page.js.map +0 -1
- package/dist/plugins/client/plugins/client/publicationRenderer.d.ts +0 -2
- package/dist/plugins/client/plugins/client/publicationRenderer.js +0 -128
- package/dist/plugins/client/plugins/client/publicationRenderer.js.map +0 -1
- package/dist/plugins/server/plugins/server/AuthPlugin.d.ts +0 -1
- package/dist/plugins/server/plugins/server/AuthPlugin.js +0 -38
- package/dist/plugins/server/plugins/server/AuthPlugin.js.map +0 -1
- package/dist/plugins/server/plugins/server/HooksPlugin.d.ts +0 -7
- package/dist/plugins/server/plugins/server/HooksPlugin.js +0 -74
- package/dist/plugins/server/plugins/server/HooksPlugin.js.map +0 -1
- package/src/example-client-config.js +0 -64
- package/src/ts/plugins/client/publicationRenderer.ts +0 -128
- package/src/ts/plugins/server/HooksPlugin.ts +0 -76
package/.env.default
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
SILEX_URL=
|
|
1
|
+
SILEX_URL=http://localhost:6805
|
|
2
2
|
SILEX_EXPRESS_JSON_LIMIT=1mb
|
|
3
3
|
SILEX_EXPRESS_TEXT_LIMIT=10mb
|
|
4
4
|
SILEX_EXPRESS_URLENCODED_LIMIT=1mb
|
|
@@ -8,7 +8,7 @@ SILEX_PORT=6805 # 6805 is the date of sexual revolution started in paris france
|
|
|
8
8
|
SILEX_HOST=localhost
|
|
9
9
|
SILEX_PROTOCOL=http
|
|
10
10
|
SILEX_DEBUG=FALSE
|
|
11
|
-
|
|
11
|
+
SILEX_SERVER_CONFIG=
|
|
12
12
|
SILEX_SSL_PORT=
|
|
13
13
|
SILEX_FORCE_HTTPS=
|
|
14
14
|
SILEX_SSL_PRIVATE_KEY=
|
|
@@ -17,3 +17,4 @@ SILEX_FORCE_HTTPS_TRUST_XFP_HEADER=
|
|
|
17
17
|
SILEX_CORS_URL=
|
|
18
18
|
SILEX_CLIENT_CONFIG=
|
|
19
19
|
SILEX_FS_ROOT=
|
|
20
|
+
SILEX_FS_HOSTING_ROOT=
|
package/.silex.js
CHANGED
|
@@ -15,15 +15,53 @@
|
|
|
15
15
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
+
/**
|
|
19
|
+
* @fileoverview This file is loaded by Silex at startup, after the user config if you specify one
|
|
20
|
+
*/
|
|
21
|
+
|
|
18
22
|
const SslPlugin = require('./dist/plugins/server/plugins/server/SslPlugin').default
|
|
19
23
|
const StaticPlugin = require('./dist/plugins/server/plugins/server/StaticPlugin').default
|
|
24
|
+
const { join } = require('path')
|
|
25
|
+
const nodeModules = require('node_modules-path')
|
|
20
26
|
|
|
21
27
|
module.exports = async function(config, options) {
|
|
22
28
|
try {
|
|
23
29
|
await config.addPlugin([
|
|
24
30
|
SslPlugin,
|
|
25
31
|
StaticPlugin,
|
|
26
|
-
]
|
|
32
|
+
], {
|
|
33
|
+
[StaticPlugin]: {
|
|
34
|
+
routes: [
|
|
35
|
+
{
|
|
36
|
+
route: '/',
|
|
37
|
+
path: join(__dirname, 'public'),
|
|
38
|
+
}, {
|
|
39
|
+
route: '/css/',
|
|
40
|
+
path: nodeModules('@fortawesome/fontawesome-free') + '/@fortawesome/fontawesome-free/css/',
|
|
41
|
+
}, {
|
|
42
|
+
route: '/webfonts/',
|
|
43
|
+
path: nodeModules('@fortawesome/fontawesome-free') + '/@fortawesome/fontawesome-free/webfonts/',
|
|
44
|
+
}, {
|
|
45
|
+
route: '/css/files/',
|
|
46
|
+
path: nodeModules('@fontsource/ubuntu') + '/@fontsource/ubuntu/files/',
|
|
47
|
+
}, {
|
|
48
|
+
route: '/',
|
|
49
|
+
path: join(__dirname, 'dist', 'client'),
|
|
50
|
+
}, {
|
|
51
|
+
route: '/',
|
|
52
|
+
path: join(__dirname, 'dist', 'plugins', 'client'),
|
|
53
|
+
},
|
|
54
|
+
]
|
|
55
|
+
// add project route for source maps
|
|
56
|
+
.concat(config.debug ? [{
|
|
57
|
+
route: '/',
|
|
58
|
+
path: './',
|
|
59
|
+
}, {
|
|
60
|
+
route: '/js/',
|
|
61
|
+
path: nodeModules('@silexlabs/silex-cms') + '/@silexlabs/silex-cms/',
|
|
62
|
+
}] : []),
|
|
63
|
+
},
|
|
64
|
+
})
|
|
27
65
|
} catch(e) {
|
|
28
66
|
console.error(e)
|
|
29
67
|
}
|
package/README.md
CHANGED
|
@@ -1,44 +1,24 @@
|
|
|
1
|
-
|
|
1
|
+
## Silex core library
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Brought to you by [Alex Hoyau](https://www.patreon.com/lexoyo) and [Silex contributors](https://github.com/silexlabs/Silex/graphs/contributors).
|
|
6
|
-
|
|
7
|
-
You can help make Silex sustainable by being part of the community, contributing documentation or making a financial contribution. [Let's chat - every little bit helps!](https://github.com/silexlabs/Silex/discussions)
|
|
8
|
-
|
|
9
|
-
## About Silex, live web creation.
|
|
10
|
-
|
|
11
|
-
Silex is a no-code tool for building websites. It also lets you code when needed. It can be used online, offline or in a JAMStack project.
|
|
12
|
-
|
|
13
|
-
Silex lets you create websites without coding, but it also has built-in editors for HTML, CSS, and JavaScript for when you need more control. It is used by freelancers and web studios to make real websites for real clients. Also Silex can generate templates or be integrated in a nodejs project, it has a plugin system and can integrate with headleass CMS and static site generators, it is part of the JSAMStack ecosystem since the v3.
|
|
3
|
+
This repository is the core library of Silex, it is a nodejs server which serves the Silex editor and the websites created with Silex. The core library is used in the online version of Silex, in the desktop app, and in the nodejs integration. It is available as a npx cli, as a docker image, and as a npm/nodejs library.
|
|
14
4
|
|
|
15
5
|
Useful links
|
|
16
6
|
|
|
7
|
+
* [npm package for this repo](https://www.npmjs.com/package/@silexlabs/silex)
|
|
8
|
+
* [Docker image for this repo](https://hub.docker.com/r/silexlabs/silex)
|
|
17
9
|
* [Official website](https://www.silex.me/)
|
|
18
|
-
* [Road map (please help defining tasks and prioritising)](https://
|
|
10
|
+
* [Road map (please help defining tasks and prioritising)](https://roadmap.silex.me)
|
|
19
11
|
* [Bug report in Github issues](https://github.com/silexlabs/Silex/issues)
|
|
20
|
-
* [Forums in Github discussions](https://
|
|
21
|
-
* [Silex meta package with more source code](https://github.com/silexlabs/
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
* Free and Open Source, open to contributions
|
|
26
|
-
* Visual Editor: Silex offers a visual editor that allows users to create websites without needing to write code. It supports drag-and-drop functionality for easy website creation.
|
|
27
|
-
* Online CSS Editor: Alongside the visual editor, Silex also provides an online CSS editor for more advanced customization.
|
|
28
|
-
* Static HTML Websites: Silex is designed to create static HTML websites, which are fast, secure, and easy to host.
|
|
29
|
-
* SEO Features: Silex includes SEO features to help improve the visibility of websites on search engines.
|
|
30
|
-
* Editor UI: Silex offers features like fonts, visual CSS editor, publication...
|
|
31
|
-
* Self-hosting Option: Users can choose to host their Silex website builder on their own server.
|
|
32
|
-
* Community Support: Being an open-source project, Silex has a community of developers who contribute to its development and provide support.
|
|
33
|
-
* Silex v3 > Silex is based on [GrapesJs](https://grapesjs.com/)
|
|
34
|
-
* Silex v2 > Sync with Dropbox and FTP: Users can sync their Silex projects with Dropbox and FTP, allowing for easy access and management of files.
|
|
35
|
-
* Silex v2 > Templates: Silex comes with a growing number of templates (both free and paid) that users can use as a starting point for their websites.
|
|
12
|
+
* [Forums in Github discussions](https://community.silex.me)
|
|
13
|
+
* [Silex meta package with more source code](https://github.com/silexlabs/Silex)
|
|
14
|
+
|
|
15
|
+
Help make Silex sustainable by being [part of the community](https://community.silex.me/), [contributing documentation](https://docs.silex.me/), [making a financial contribution](https://opencollective.com/silex), [report bugs](https://github.com/silexlabs/Silex/issues).
|
|
36
16
|
|
|
37
17
|
## Getting Started
|
|
38
18
|
|
|
39
19
|
### Online Version
|
|
40
20
|
|
|
41
|
-
The easiest way to start using Silex is by using the online version provided by [Silex Labs foundation](https://www.silexlabs.org). Simply visit [
|
|
21
|
+
The easiest way to start using Silex is by using the online version provided by [Silex Labs foundation](https://www.silexlabs.org). Simply visit [v3.silex.me](https://v3.silex.me) and start building your website right away.
|
|
42
22
|
|
|
43
23
|
### Desktop App (beta)
|
|
44
24
|
|
|
@@ -48,13 +28,15 @@ There is a desktop application that you can install on your computer which may b
|
|
|
48
28
|
|
|
49
29
|
You can also run Silex locally or on your server using `npx`, `npm`, or `Docker`.
|
|
50
30
|
|
|
31
|
+
Check the [developer docs](https://docs.silex.me/en/dev) for configuration options and integration with your js projects.
|
|
32
|
+
|
|
51
33
|
#### Using npx
|
|
52
34
|
|
|
53
35
|
```bash
|
|
54
36
|
npx @silexlabs/silex
|
|
55
37
|
```
|
|
56
38
|
|
|
57
|
-
This command will run Silex with
|
|
39
|
+
This command will run Silex with default config.
|
|
58
40
|
|
|
59
41
|
#### Using Docker
|
|
60
42
|
|
|
@@ -62,7 +44,7 @@ This command will run Silex with the entry point being `src/ts/server/cli.ts`.
|
|
|
62
44
|
docker run -p 6805:6805 silexlabs/silex
|
|
63
45
|
```
|
|
64
46
|
|
|
65
|
-
This command will run Silex in a Docker container
|
|
47
|
+
This command will run Silex in a Docker container.
|
|
66
48
|
|
|
67
49
|
#### Using npm
|
|
68
50
|
|
|
@@ -72,11 +54,31 @@ First, install Silex as a dev dependency in your project:
|
|
|
72
54
|
npm install --save-dev @silexlabs/silex
|
|
73
55
|
```
|
|
74
56
|
|
|
75
|
-
Then, you can run Silex with the `silex` command
|
|
57
|
+
Then, you can run Silex with the `silex` command in your `package.json` scripts:
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"scripts": {
|
|
62
|
+
"start": "silex"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
```
|
|
76
66
|
|
|
77
67
|
## Configuration
|
|
78
68
|
|
|
79
|
-
You can configure Silex using environment variables and command-line options. All available options can be found in `src/ts/server/cli.ts
|
|
69
|
+
You can configure Silex using environment variables and command-line options. All available options can be found in the [developer docs](https://docs.silex.me/en/dev) as well as in the code: [`src/ts/server/cli.ts`](./src/ts/server/cli.ts).
|
|
70
|
+
|
|
71
|
+
Check the example config files - which are the same as plugins in Silex, in the [`examples/`](./examples/) folder. To test these configs, start Silex locally like this:
|
|
72
|
+
|
|
73
|
+
```sh
|
|
74
|
+
$ npx silex --client-config=./examples/client-config-transformers.js --server-config=`pwd`/examples/server-config-plugins.js
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Or like this:
|
|
78
|
+
|
|
79
|
+
```sh
|
|
80
|
+
$ SILEX_CLIENT_CONFIG=./examples/client-config-transformers.js SILEX_SERVER_CONFIG=`pwd`/examples/server-config-plugins.js npm run start:debug
|
|
81
|
+
```
|
|
80
82
|
|
|
81
83
|
## Contributing
|
|
82
84
|
|
|
@@ -88,7 +90,7 @@ Silex is free and open-source software licensed under the [GPL-3.0](LICENSE.md).
|
|
|
88
90
|
|
|
89
91
|
## Dependencies
|
|
90
92
|
|
|
91
|
-
The upstream projects we use in Silex are all listed in [Silex meta package](https://github.com/silexlabs/
|
|
93
|
+
The upstream projects we use in Silex are all listed in [Silex meta package](https://github.com/silexlabs/Silex)
|
|
92
94
|
|
|
93
95
|
## Github stars history
|
|
94
96
|
|
|
@@ -8,6 +8,7 @@ export declare enum ApiRoute {
|
|
|
8
8
|
WEBSITE_READ = "/api/website/",
|
|
9
9
|
WEBSITE_WRITE = "/api/website/",
|
|
10
10
|
WEBSITE_DELETE = "/api/website/",
|
|
11
|
+
WEBSITE_DUPLICATE = "/api/website/duplicate",
|
|
11
12
|
WEBSITE_CREATE = "/api/website/",
|
|
12
13
|
WEBSITE_LIST = "/api/website/",
|
|
13
14
|
WEBSITE_ASSETS_READ = "/api/website/assets",
|
|
@@ -15,6 +16,8 @@ export declare enum ApiRoute {
|
|
|
15
16
|
WEBSITE_META_READ = "/api/website/meta",
|
|
16
17
|
WEBSITE_META_WRITE = "/api/website/meta"
|
|
17
18
|
}
|
|
19
|
+
export declare function setServerUrl(url: string): void;
|
|
20
|
+
export declare function getServerUrl(): string;
|
|
18
21
|
export declare function getUser({ type, connectorId }: {
|
|
19
22
|
type: ConnectorType;
|
|
20
23
|
connectorId?: ConnectorId;
|
|
@@ -52,6 +55,10 @@ export declare function websiteDelete({ websiteId, connectorId }: {
|
|
|
52
55
|
websiteId: WebsiteId;
|
|
53
56
|
connectorId?: ConnectorId;
|
|
54
57
|
}): Promise<void>;
|
|
58
|
+
export declare function websiteDuplicate({ websiteId, connectorId }: {
|
|
59
|
+
websiteId: WebsiteId;
|
|
60
|
+
connectorId?: ConnectorId;
|
|
61
|
+
}): Promise<void>;
|
|
55
62
|
export declare function websiteCreate({ websiteId, data, connectorId }: {
|
|
56
63
|
websiteId: WebsiteId;
|
|
57
64
|
data: WebsiteMetaFileContent;
|
|
@@ -65,7 +72,7 @@ export declare function websiteMetaWrite({ websiteId, data, connectorId }: {
|
|
|
65
72
|
export declare function websiteMetaRead({ websiteId, connectorId }: {
|
|
66
73
|
websiteId: WebsiteId;
|
|
67
74
|
connectorId?: ConnectorId;
|
|
68
|
-
}): Promise<
|
|
75
|
+
}): Promise<WebsiteMeta>;
|
|
69
76
|
export declare function websiteAssetsLoad({ path, websiteId, connectorId }: {
|
|
70
77
|
path: string;
|
|
71
78
|
websiteId: WebsiteId;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Asset, ClientSideFileType, ConnectorId, Page, Style, WebsiteId } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Function to convert a path from it stored version to the displayed version
|
|
4
|
+
* Stored version is like `/assets/image.webp`
|
|
5
|
+
* Grapesjs version is like `/api/website/assets/image.webp?websiteId=47868975&connectorId=gitlab`
|
|
6
|
+
* Exported for unit tests
|
|
7
|
+
*/
|
|
8
|
+
export declare function storedToDisplayed(path: string, websiteId: WebsiteId, storageId: ConnectorId): string;
|
|
9
|
+
/**
|
|
10
|
+
* Function to convert a path from the one we give to grapesjs to the stored version
|
|
11
|
+
* Grapesjs version is like `/api/website/assets/image.webp?websiteId=47868975&connectorId=gitlab`
|
|
12
|
+
* Stored version is like `/assets/image.webp`
|
|
13
|
+
* @param path the path to convert
|
|
14
|
+
* @returns the converted path
|
|
15
|
+
* Exported for unit tests
|
|
16
|
+
*/
|
|
17
|
+
export declare function displayedToStored(path: string): string;
|
|
18
|
+
/**
|
|
19
|
+
* Publication transformer to convert the asset URL during publication
|
|
20
|
+
*/
|
|
21
|
+
export declare const assetsPublicationTransformer: {
|
|
22
|
+
transformPath(path: string, type: ClientSideFileType): string;
|
|
23
|
+
transformPermalink(path: string, type: ClientSideFileType): string;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Update asset URL to use the current storage connector and website ID
|
|
27
|
+
* Assets URLs are stored in the project data in the form `/assets/image.webp`
|
|
28
|
+
* This function adds the API path and the connectorId and websiteId like so: `/api/website/assets/image.webp?websiteId=47868975&connectorId=gitlab`
|
|
29
|
+
*/
|
|
30
|
+
export declare function addTempDataToAssetUrl(assets: Asset[], websiteId: WebsiteId, storageId: ConnectorId): Asset[];
|
|
31
|
+
/**
|
|
32
|
+
* Remove the temporary data from the asset URL
|
|
33
|
+
* Remove the API path and the connectorId and websiteId like so: `/assets/image.webp`
|
|
34
|
+
*/
|
|
35
|
+
export declare function removeTempDataFromAssetUrl(assets: Asset[]): Asset[];
|
|
36
|
+
/**
|
|
37
|
+
* Add temp data to pages
|
|
38
|
+
*/
|
|
39
|
+
export declare function addTempDataToPages(pages: Page[], websiteId: WebsiteId, storageId: ConnectorId): Page[];
|
|
40
|
+
/**
|
|
41
|
+
* Remove temp data from asset URL in the components
|
|
42
|
+
*/
|
|
43
|
+
export declare function removeTempDataFromPages(pages: Page[]): Page[];
|
|
44
|
+
/**
|
|
45
|
+
* Add data to stylesheets
|
|
46
|
+
* e.g. linear-gradient(to right, #1fb101 0%, #df1313 67%, rgba(234, 97, 97, 255) 78%, white 100%), url('/assets/qIg7JPRc.webp'), linear-gradient(#0ca311 0%, #0ca311 100%)
|
|
47
|
+
*/
|
|
48
|
+
export declare function addTempDataToStyles(styles: Style[], websiteId: WebsiteId, storageId: ConnectorId): Style[];
|
|
49
|
+
/**
|
|
50
|
+
* Remove temp data from stylesheets
|
|
51
|
+
* The property `background-image` contains the URLs of the assets and other values,
|
|
52
|
+
* e.g. `linear-gradient(to right, #1fb101 0%, #df1313 67%, rgba(234, 97, 97, 255) 78%, white 100%), url('/api/website/assets/qIg7JPRc.webp?websiteId=default&connectorId=fs-storage'), linear-gradient(#0ca311 0%, #0ca311 100%)`
|
|
53
|
+
*/
|
|
54
|
+
export declare function removeTempDataFromStyles(styles: Style[]): Style[];
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { Config } from '@silexlabs/silex-plugins';
|
|
2
2
|
import { ConnectorId, WebsiteId } from '../types';
|
|
3
|
-
import { EditorConfig } from 'grapesjs';
|
|
3
|
+
import { Editor, EditorConfig } from 'grapesjs';
|
|
4
|
+
import { PublicationTransformer } from './publication-transformers';
|
|
5
|
+
import * as api from './api';
|
|
6
|
+
import { SettingsSection } from './grapesjs/settings-sections';
|
|
4
7
|
/**
|
|
5
8
|
* @fileoverview Silex client side config
|
|
6
9
|
*/
|
|
7
10
|
export declare class ClientConfig extends Config {
|
|
11
|
+
api: typeof api;
|
|
8
12
|
/**
|
|
9
13
|
* The website to load
|
|
10
14
|
* This is the id of the website in the storage connector
|
|
@@ -27,6 +31,20 @@ export declare class ClientConfig extends Config {
|
|
|
27
31
|
* debug mode
|
|
28
32
|
*/
|
|
29
33
|
debug: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Add hash in the file name of CSS at the time of publication
|
|
36
|
+
* If true, CSS files of generated pages will look like `page-name.123456.css` instead of `page-name.css`
|
|
37
|
+
* This is useful to avoid caching issues
|
|
38
|
+
* @default true
|
|
39
|
+
*/
|
|
40
|
+
addHashInCssFileName: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Replaced elements
|
|
43
|
+
* This is a list of elements which support the object-fit and object-position CSS properties
|
|
44
|
+
* https://developer.mozilla.org/en-US/docs/Web/CSS/Replaced_element
|
|
45
|
+
* When selected, Silex will show the object-fit and object-position properties in the style panel
|
|
46
|
+
*/
|
|
47
|
+
replacedElements: string[];
|
|
30
48
|
/**
|
|
31
49
|
* Grapesjs config
|
|
32
50
|
*/
|
|
@@ -36,8 +54,49 @@ export declare class ClientConfig extends Config {
|
|
|
36
54
|
* This is the url of the config file which is a plugin
|
|
37
55
|
*/
|
|
38
56
|
clientConfigUrl: string;
|
|
57
|
+
/**
|
|
58
|
+
* Google fonts API key, see this doc to get an API key: https://developers.google.com/fonts/docs/developer_api#APIKey
|
|
59
|
+
* @default Test key for local dev
|
|
60
|
+
*/
|
|
61
|
+
fontsApiKey: string;
|
|
62
|
+
/**
|
|
63
|
+
* Google fonts server or a free privacy-friendly drop-in replacement for Google Fonts or a proxy server to speed up the load and protect privacy
|
|
64
|
+
* @see https://github.com/coollabsio/fonts
|
|
65
|
+
* @see https://fontlay.com/
|
|
66
|
+
* @default Google Fonts
|
|
67
|
+
*/
|
|
68
|
+
fontsServerUrl: string;
|
|
69
|
+
fontsApiUrl: string;
|
|
39
70
|
/**
|
|
40
71
|
* Init GrapesJS config which depend on the config file properties
|
|
41
72
|
*/
|
|
42
73
|
initGrapesConfig(): void;
|
|
74
|
+
/**
|
|
75
|
+
* Get grapesjs editor
|
|
76
|
+
*/
|
|
77
|
+
getEditor(): Editor;
|
|
78
|
+
/**
|
|
79
|
+
* Publication transformers let plugins change files before they are published
|
|
80
|
+
*/
|
|
81
|
+
publicationTransformers: Array<PublicationTransformer>;
|
|
82
|
+
/**
|
|
83
|
+
* Reset publication transformers
|
|
84
|
+
*/
|
|
85
|
+
resetPublicationTransformers(): void;
|
|
86
|
+
/**
|
|
87
|
+
* Add a publication transformer(s)
|
|
88
|
+
*/
|
|
89
|
+
addPublicationTransformers(transformers: PublicationTransformer | PublicationTransformer[]): void;
|
|
90
|
+
/**
|
|
91
|
+
* Add a section to the settings dialog
|
|
92
|
+
*/
|
|
93
|
+
addSettings(section: SettingsSection, siteOrPage: 'site' | 'page', position?: 'first' | 'last' | number): void;
|
|
94
|
+
/**
|
|
95
|
+
* Remove a section from the settings dialog
|
|
96
|
+
*/
|
|
97
|
+
removeSettings(id: string, siteOrPage: 'site' | 'page'): void;
|
|
98
|
+
/**
|
|
99
|
+
* Add default plugins
|
|
100
|
+
*/
|
|
101
|
+
addDefaultPlugins(): Promise<void>;
|
|
43
102
|
}
|
|
@@ -1,14 +1,23 @@
|
|
|
1
1
|
export declare enum ClientEvent {
|
|
2
|
-
STARTUP_START = "silex:startup:start"
|
|
3
|
-
STARTUP_END = "silex:startup:end"
|
|
4
|
-
GRAPESJS_START = "silex:grapesjs:start",
|
|
5
|
-
GRAPESJS_END = "silex:grapesjs:end",
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
STARTUP_START = "silex:startup:start",/* Loading is over and Silex is starting */
|
|
3
|
+
STARTUP_END = "silex:startup:end",/* Silex is ready to be used */
|
|
4
|
+
GRAPESJS_START = "silex:grapesjs:start",/* GrapesJS is about to be initialized, it is time to edit config.grapesJsConfig */
|
|
5
|
+
GRAPESJS_END = "silex:grapesjs:end",/* GrapesJS is ready to be used, `editor` is passed as an argument */
|
|
6
|
+
PUBLICATION_UI_OPEN = "silex:publication-ui:open",/* The publication UI is opened, you can access it with { publicationUi } */
|
|
7
|
+
PUBLICATION_UI_CLOSE = "silex:publication-ui:close",/* The publication UI is closed, you can access it with { publicationUi } */
|
|
8
|
+
PUBLISH_BEFORE = "silex:publish:before",/* Publication is about to start, you can read+write {projectData, siteSettings} */
|
|
9
|
+
PUBLISH_START = "silex:publish:start",/* Publication starts, you can read+write project data/settings, use publication manager/ui, prevent publication {projectData, siteSettings, publicationManager, prenventDefault} */
|
|
10
|
+
PUBLISH_PAGE = "silex:publish:page",/* Publication of a page, read+write settings and page data, use publication manager and prevent publication { siteSettings, pageSettings, page, publicationManager, preventDefault } */
|
|
11
|
+
PUBLISH_DATA = "silex:publish:data",/* Just before we send the published data to the server, read+write all publication data, check PublicationData type in types.ts { data, publicationManager } */
|
|
12
|
+
PUBLISH_END = "silex:publish:end",/* Publication is over, the argument is the publication result with {success: boolean, message: string} */
|
|
13
|
+
PUBLISH_ERROR = "silex:publish:error",/* Publication failed, the argument is the publication result with {success: boolean, message: string} */
|
|
14
|
+
PUBLISH_LOGIN_START = "silex:publish:login:start",/* The user is about to login before publication, you can read+write connector data and use publication manager and prevent publication {connector, publicationManager, preventDefault} */
|
|
11
15
|
PUBLISH_LOGIN_END = "silex:publish:login:end",
|
|
12
16
|
ASSET_WRITE_END = "silex:asset:write:end",
|
|
13
|
-
WRITE_END = "silex:write:end"
|
|
17
|
+
WRITE_END = "silex:write:end",
|
|
18
|
+
SETTINGS_OPEN = "silex:settings:open",/* The settings dialog is opened */
|
|
19
|
+
SETTINGS_CLOSE = "silex:settings:close",/* The settings dialog is closed */
|
|
20
|
+
SETTINGS_SAVE_START = "silex:settings:save:start",/* The settings dialog is closed and the settings are about to be saved */
|
|
21
|
+
SETTINGS_SAVE_END = "silex:settings:save:end",/* The settings dialog is closed and the settings are saved */
|
|
22
|
+
SETTINGS_SECTION_CHANGE = "silex:settings:section-change"
|
|
14
23
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ConnectorData, PublicationJobData, PublicationSettings, WebsiteId, WebsiteSettings } from '../../types';
|
|
1
|
+
import { ConnectorData, PublicationData, PublicationJobData, PublicationSettings, WebsiteFile, WebsiteId, WebsiteSettings } from '../../types';
|
|
2
2
|
import { Editor } from 'grapesjs';
|
|
3
3
|
import { PublicationUi } from './PublicationUi';
|
|
4
4
|
/**
|
|
@@ -58,18 +58,16 @@ export declare class PublicationManager {
|
|
|
58
58
|
*/
|
|
59
59
|
status: PublicationStatus;
|
|
60
60
|
constructor(editor: PublishableEditor, opts: PublicationManagerOptions);
|
|
61
|
-
goLogin(connector: ConnectorData): Promise<
|
|
61
|
+
goLogin(connector: ConnectorData): Promise<void>;
|
|
62
62
|
goLogout(): Promise<void>;
|
|
63
|
+
getPublicationData(projectData: any, siteSettings: any, preventDefault: () => void): Promise<PublicationData>;
|
|
63
64
|
/**
|
|
64
65
|
* Start the publication process
|
|
65
66
|
* This is the command "publish"
|
|
66
67
|
*/
|
|
67
68
|
startPublication(): Promise<void>;
|
|
68
|
-
|
|
69
|
-
html: string;
|
|
70
|
-
css: string;
|
|
71
|
-
cssPath: string;
|
|
72
|
-
htmlPath: string;
|
|
73
|
-
}[]>;
|
|
69
|
+
getHtmlFiles(siteSettings: WebsiteSettings, preventDefault: any): Promise<WebsiteFile[]>;
|
|
74
70
|
trackProgress(): Promise<void>;
|
|
71
|
+
private setPublicationTransformers;
|
|
72
|
+
private resetPublicationTransformers;
|
|
75
73
|
}
|
|
@@ -34,20 +34,18 @@ export declare class PublicationUi {
|
|
|
34
34
|
*/
|
|
35
35
|
private el;
|
|
36
36
|
settings: PublicationSettings;
|
|
37
|
+
private sender;
|
|
37
38
|
/**
|
|
38
39
|
* Initialize the dialog and the publish button
|
|
39
40
|
*/
|
|
40
41
|
constructor(editor: PublishableEditor, options: PublicationDialogOptions);
|
|
41
|
-
isSuccess(status: PublicationStatus):
|
|
42
|
-
isPending(status: PublicationStatus):
|
|
43
|
-
isError(status: PublicationStatus):
|
|
44
|
-
isLoggedOut(status: PublicationStatus):
|
|
45
|
-
isReady(status: PublicationStatus):
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
primary: HTMLElement;
|
|
49
|
-
secondary: HTMLElement;
|
|
50
|
-
};
|
|
42
|
+
isSuccess(status: PublicationStatus): status is PublicationStatus.STATUS_SUCCESS;
|
|
43
|
+
isPending(status: PublicationStatus): status is PublicationStatus.STATUS_PENDING;
|
|
44
|
+
isError(status: PublicationStatus): status is PublicationStatus.STATUS_ERROR;
|
|
45
|
+
isLoggedOut(status: PublicationStatus): status is PublicationStatus.STATUS_LOGGED_OUT;
|
|
46
|
+
isReady(status: PublicationStatus): status is PublicationStatus.STATUS_NONE;
|
|
47
|
+
userContent: TemplateResult | null;
|
|
48
|
+
setUserContent(content: TemplateResult): void;
|
|
51
49
|
createDialogElements(): HTMLElement;
|
|
52
50
|
move(rect: any): void;
|
|
53
51
|
private renderDialog;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (editor: any, options: any): void;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { Editor, EditorConfig } from 'grapesjs';
|
|
2
|
-
import {
|
|
3
|
-
export declare
|
|
2
|
+
import { ClientConfig } from '../config';
|
|
3
|
+
export declare const cmdToggleLayers = "open-layers";
|
|
4
|
+
export declare const cmdToggleBlocks = "open-blocks";
|
|
5
|
+
export declare const cmdToggleSymbols = "open-symbols";
|
|
6
|
+
export declare const cmdToggleNotifications = "open-notifications";
|
|
7
|
+
export declare function getEditorConfig(config: ClientConfig): EditorConfig;
|
|
4
8
|
export declare function initEditor(config: EditorConfig): Promise<Editor>;
|
|
5
9
|
export declare function getEditor(): Editor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const internalLinksPlugin: any;
|
|
1
|
+
export declare const internalLinksPlugin: (editor: any, opts: any) => void;
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { Editor, PluginOptions } from 'grapesjs';
|
|
2
|
+
/**
|
|
3
|
+
* Opens the Publish dialog and publishes the website.
|
|
4
|
+
* @param editor The editor.
|
|
5
|
+
*/
|
|
6
|
+
declare function publish(editor: Editor): void;
|
|
7
|
+
/**
|
|
8
|
+
* Escapes the current context in this order : modal, Publish dialog, left panel.
|
|
9
|
+
* If none of these are open, it selects the body.
|
|
10
|
+
* @param editor The editor.
|
|
11
|
+
*/
|
|
12
|
+
declare function escapeContext(editor: Editor): void;
|
|
13
|
+
export declare const cmdSelectBody = "select-body";
|
|
14
|
+
export declare let prefixKey: string;
|
|
15
|
+
export declare const defaultKms: {
|
|
16
|
+
kmOpenSettings: {
|
|
17
|
+
id: string;
|
|
18
|
+
keys: string;
|
|
19
|
+
handler: (editor: any) => void;
|
|
20
|
+
};
|
|
21
|
+
kmOpenPublish: {
|
|
22
|
+
id: string;
|
|
23
|
+
keys: string;
|
|
24
|
+
handler: (editor: any) => void;
|
|
25
|
+
};
|
|
26
|
+
kmOpenFonts: {
|
|
27
|
+
id: string;
|
|
28
|
+
keys: string;
|
|
29
|
+
handler: (editor: any) => void;
|
|
30
|
+
};
|
|
31
|
+
kmPreviewMode: {
|
|
32
|
+
id: string;
|
|
33
|
+
keys: string;
|
|
34
|
+
handler: (editor: any) => void;
|
|
35
|
+
};
|
|
36
|
+
kmLayers: {
|
|
37
|
+
id: string;
|
|
38
|
+
keys: string;
|
|
39
|
+
handler: (editor: any) => void;
|
|
40
|
+
};
|
|
41
|
+
kmBlocks: {
|
|
42
|
+
id: string;
|
|
43
|
+
keys: string;
|
|
44
|
+
handler: (editor: any) => void;
|
|
45
|
+
};
|
|
46
|
+
kmNotifications: {
|
|
47
|
+
id: string;
|
|
48
|
+
keys: string;
|
|
49
|
+
handler: (editor: any) => void;
|
|
50
|
+
};
|
|
51
|
+
kmPages: {
|
|
52
|
+
id: string;
|
|
53
|
+
keys: string;
|
|
54
|
+
handler: (editor: any) => void;
|
|
55
|
+
};
|
|
56
|
+
kmSymbols: {
|
|
57
|
+
id: string;
|
|
58
|
+
keys: string;
|
|
59
|
+
handler: (editor: any) => void;
|
|
60
|
+
};
|
|
61
|
+
kmStyleManager: {
|
|
62
|
+
id: string;
|
|
63
|
+
keys: string;
|
|
64
|
+
handler: (editor: any) => void;
|
|
65
|
+
};
|
|
66
|
+
kmTraitsManager: {
|
|
67
|
+
id: string;
|
|
68
|
+
keys: string;
|
|
69
|
+
handler: (editor: any) => void;
|
|
70
|
+
};
|
|
71
|
+
kmClosePanel: {
|
|
72
|
+
id: string;
|
|
73
|
+
keys: string;
|
|
74
|
+
handler: typeof escapeContext;
|
|
75
|
+
};
|
|
76
|
+
kmSelectBody: {
|
|
77
|
+
id: string;
|
|
78
|
+
keys: string;
|
|
79
|
+
handler: string;
|
|
80
|
+
};
|
|
81
|
+
kmDuplicateSelection: {
|
|
82
|
+
id: string;
|
|
83
|
+
keys: string;
|
|
84
|
+
handler: string;
|
|
85
|
+
};
|
|
86
|
+
kmPublish: {
|
|
87
|
+
id: string;
|
|
88
|
+
keys: string;
|
|
89
|
+
handler: typeof publish;
|
|
90
|
+
};
|
|
91
|
+
kmAddPage: {
|
|
92
|
+
id: string;
|
|
93
|
+
keys: string;
|
|
94
|
+
handler: string;
|
|
95
|
+
};
|
|
96
|
+
kmRemovePage: {
|
|
97
|
+
id: string;
|
|
98
|
+
keys: string;
|
|
99
|
+
handler: string;
|
|
100
|
+
};
|
|
101
|
+
kmClonePage: {
|
|
102
|
+
id: string;
|
|
103
|
+
keys: string;
|
|
104
|
+
handler: string;
|
|
105
|
+
};
|
|
106
|
+
kmSelectNextPage: {
|
|
107
|
+
id: string;
|
|
108
|
+
keys: string;
|
|
109
|
+
handler: string;
|
|
110
|
+
};
|
|
111
|
+
kmSelectPrevPage: {
|
|
112
|
+
id: string;
|
|
113
|
+
keys: string;
|
|
114
|
+
handler: string;
|
|
115
|
+
};
|
|
116
|
+
kmSelectFirstPage: {
|
|
117
|
+
id: string;
|
|
118
|
+
keys: string;
|
|
119
|
+
handler: string;
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
export declare function keymapsPlugin(editor: Editor, opts: PluginOptions): void;
|
|
123
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const cmdOpenNewPageDialog = "new-page-dialog";
|
|
2
|
-
export declare const newPageDialog: any;
|
|
2
|
+
export declare const newPageDialog: (editor: any, opts: any) => void;
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import { Editor } from 'grapesjs';
|
|
1
2
|
export declare const cmdTogglePages = "pages:open-panel";
|
|
2
3
|
export declare const cmdAddPage = "pages:add";
|
|
3
|
-
export declare const
|
|
4
|
+
export declare const cmdRemovePage = "pages:remove";
|
|
5
|
+
export declare const cmdClonePage = "pages:clone";
|
|
6
|
+
export declare const cmdSelectNextPage = "pages:select-next";
|
|
7
|
+
export declare const cmdSelectPrevPage = "pages:select-prev";
|
|
8
|
+
export declare const cmdSelectFirstPage = "pages:select-first";
|
|
9
|
+
export declare const pagePanelPlugin: (editor: Editor, opts: any) => void;
|