@silexlabs/silex 3.7.0 → 3.9.0-canary.2
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/README.md +115 -78
- package/common/examples/plugin.js +6 -0
- package/common/silex-plugins/config.test.ts +71 -0
- package/common/silex-plugins/config.ts +25 -0
- package/common/silex-plugins/index.ts +2 -0
- package/common/silex-plugins/plugin.test.ts +57 -0
- package/common/silex-plugins/plugin.ts +65 -0
- package/dist/client/css/admin.css +25 -12
- package/dist/client/css/all.min.css +5 -5
- package/dist/client/index.html +2 -2
- package/dist/client/js/main.js +3108 -2940
- package/dist/client/js/main.js.LICENSE.txt +6 -4
- package/dist/client/webfonts/fa-brands-400.woff2 +0 -0
- package/dist/client/webfonts/fa-regular-400.woff2 +0 -0
- package/dist/client/webfonts/fa-solid-900.woff2 +0 -0
- package/dist/client/webfonts/fa-v4compatibility.woff2 +0 -0
- package/dist/server/common/externs.js +2 -0
- package/dist/server/common/silex-plugins/config.js +25 -0
- package/dist/server/common/silex-plugins/index.js +18 -0
- package/dist/server/common/silex-plugins/plugin.js +41 -0
- package/dist/server/server/api/api.js +9 -9
- package/dist/server/server/api/connectorApi.js +35 -35
- package/dist/server/server/api/publicationApi.js +19 -19
- package/dist/server/server/api/websiteApi.js +46 -46
- package/dist/server/server/config.js +19 -19
- package/dist/server/server/connectors/FsHosting.js +6 -6
- package/dist/server/server/connectors/FsStorage.js +35 -35
- package/dist/server/server/connectors/connectors.js +3 -3
- package/dist/server/server/expose.js +18 -8
- package/dist/server/server/express.js +3 -3
- package/dist/server/server/index.js +29 -19
- package/dist/server/server/jobs.js +4 -4
- package/dist/{plugins/server/plugins/server → server/server/plugins}/DownloadConnector.js +23 -28
- package/dist/{plugins/server/plugins/server → server/server/plugins}/FtpConnector.js +42 -117
- package/dist/{plugins/server/plugins/server → server/server/plugins}/GitlabConnector.js +80 -271
- package/dist/{plugins/server/plugins/server → server/server/plugins}/GitlabHostingConnector.js +11 -134
- package/dist/server/server/plugins/PublicationOptimizer.js +2 -0
- package/dist/{plugins/server/plugins/server → server/server/plugins}/SslPlugin.js +3 -32
- package/dist/{plugins/server/plugins/server → server/server/plugins}/StaticPlugin.js +4 -21
- package/dist/server/server/utils/BackwardCompat.js +2 -0
- package/dist/server/server/utils/websiteDataSerialization.js +10 -10
- package/{src/ts/client → editor}/api.ts +2 -2
- package/{src/ts/client → editor}/assetUrl.test.ts +6 -33
- package/{src/ts/client → editor}/assetUrl.ts +2 -2
- package/{src/ts/client → editor}/config.ts +3 -3
- package/{src/css/theme-modern.scss → editor/css/design-system.scss} +29 -14
- package/{src → editor}/css/index.scss +1 -3
- package/{src → editor}/css/project-bar.scss +5 -0
- package/{src/ts/client → editor}/expose.ts +3 -3
- package/{src/ts/client → editor}/grapesjs/LoginDialog.ts +3 -3
- package/{src/ts/client → editor}/grapesjs/PublicationManager.ts +3 -3
- package/{src/ts/client → editor}/grapesjs/PublicationUi.ts +1 -1
- package/{src/ts/client → editor}/grapesjs/cms/index.ts +1 -1
- package/{src/ts/client → editor}/grapesjs/cms/page-settings.ts +1 -1
- package/{src/ts/client → editor}/grapesjs/cms/publication.ts +1 -1
- package/{src/ts/client → editor}/grapesjs/eleventy.ts +1 -1
- package/{src/ts/client → editor}/grapesjs/index.ts +5 -3
- package/{src/ts/client → editor}/grapesjs/internal-links.ts +2 -2
- package/{src/ts/client → editor}/grapesjs/resize-panel.ts +2 -1
- package/{src/ts/client → editor}/grapesjs/settings-sections.ts +1 -1
- package/{src/ts/client → editor}/grapesjs/settings.ts +2 -2
- package/{src/ts/client → editor}/grapesjs/storage.ts +1 -1
- package/editor/grapesjs/website-info.ts +52 -0
- package/{src/ts/client → editor}/index.ts +1 -1
- package/{src/ts/client → editor}/publication-transformers.test.ts +10 -10
- package/{src/ts/client → editor}/publication-transformers.ts +1 -1
- package/{src/ts/client → editor}/publish-fonts.ts +2 -2
- package/grapesjs-plugins/expression-input/.husky/pre-commit +2 -0
- package/grapesjs-plugins/expression-input/.prettierrc.json +7 -0
- package/grapesjs-plugins/expression-input/.vscode/extensions.json +9 -0
- package/grapesjs-plugins/expression-input/CHANGELOG.md +47 -0
- package/grapesjs-plugins/expression-input/LICENSE +661 -0
- package/grapesjs-plugins/expression-input/README.md +59 -0
- package/grapesjs-plugins/expression-input/babel.config.js +3 -0
- package/grapesjs-plugins/expression-input/commitlint.config.js +1 -0
- package/grapesjs-plugins/expression-input/dev/README.md +1 -0
- package/grapesjs-plugins/expression-input/dev/expression-input.html +148 -0
- package/grapesjs-plugins/expression-input/dev/input-chain.html +88 -0
- package/grapesjs-plugins/expression-input/dev/popin-form.html +83 -0
- package/grapesjs-plugins/expression-input/docs/expression-input.md +173 -0
- package/grapesjs-plugins/expression-input/docs/popin-form.md +228 -0
- package/grapesjs-plugins/expression-input/eslint.config.mjs +71 -0
- package/grapesjs-plugins/expression-input/package.json +84 -0
- package/grapesjs-plugins/expression-input/playwright.config.ts +6 -0
- package/grapesjs-plugins/expression-input/rollup.config.js +39 -0
- package/grapesjs-plugins/expression-input/src/expression-input.ts +339 -0
- package/grapesjs-plugins/expression-input/src/index.ts +3 -0
- package/grapesjs-plugins/expression-input/src/input-chain.ts +216 -0
- package/grapesjs-plugins/expression-input/src/popin-form.ts +189 -0
- package/grapesjs-plugins/expression-input/src/popin-overlay.ts +188 -0
- package/grapesjs-plugins/expression-input/src/styles.ts +374 -0
- package/grapesjs-plugins/expression-input/src/test/popin-form_test.ts +47 -0
- package/grapesjs-plugins/expression-input/tsconfig.json +34 -0
- package/grapesjs-plugins/expression-input/web-dev-server.config.js +25 -0
- package/grapesjs-plugins/expression-input/web-test-runner.config.js +124 -0
- package/grapesjs-plugins/grapesjs-advanced-selector/.editorconfig +5 -0
- package/grapesjs-plugins/grapesjs-advanced-selector/.husky/pre-commit +4 -0
- package/grapesjs-plugins/grapesjs-advanced-selector/LICENSE +661 -0
- package/grapesjs-plugins/grapesjs-advanced-selector/README.md +158 -0
- package/grapesjs-plugins/grapesjs-advanced-selector/babel.config.js +3 -0
- package/grapesjs-plugins/grapesjs-advanced-selector/eslint.config.mjs +20 -0
- package/grapesjs-plugins/grapesjs-advanced-selector/index.html +353 -0
- package/grapesjs-plugins/grapesjs-advanced-selector/jest.config.cjs +11 -0
- package/grapesjs-plugins/grapesjs-advanced-selector/package-lock.json +12500 -0
- package/grapesjs-plugins/grapesjs-advanced-selector/package.json +75 -0
- package/grapesjs-plugins/grapesjs-advanced-selector/public/simple-selector.html +12 -0
- package/grapesjs-plugins/grapesjs-advanced-selector/src/StylableElement.ts +15 -0
- package/grapesjs-plugins/grapesjs-advanced-selector/src/capabilities.ts +49 -0
- package/grapesjs-plugins/grapesjs-advanced-selector/src/commands.ts +89 -0
- package/grapesjs-plugins/grapesjs-advanced-selector/src/components/complex-selector.ts +187 -0
- package/grapesjs-plugins/grapesjs-advanced-selector/src/components/compound-selector.ts +241 -0
- package/grapesjs-plugins/grapesjs-advanced-selector/src/components/current-selector-display.ts +289 -0
- package/grapesjs-plugins/grapesjs-advanced-selector/src/components/inline-select.ts +199 -0
- package/grapesjs-plugins/grapesjs-advanced-selector/src/components/resize-input.ts +19 -0
- package/grapesjs-plugins/grapesjs-advanced-selector/src/components/simple-selector.ts +537 -0
- package/grapesjs-plugins/grapesjs-advanced-selector/src/i18n/en.ts +75 -0
- package/grapesjs-plugins/grapesjs-advanced-selector/src/i18n/fr.ts +75 -0
- package/grapesjs-plugins/grapesjs-advanced-selector/src/index.ts +47 -0
- package/grapesjs-plugins/grapesjs-advanced-selector/src/model/ComplexSelector.test.ts +380 -0
- package/grapesjs-plugins/grapesjs-advanced-selector/src/model/ComplexSelector.ts +231 -0
- package/grapesjs-plugins/grapesjs-advanced-selector/src/model/CompoundSelector.test.ts +232 -0
- package/grapesjs-plugins/grapesjs-advanced-selector/src/model/CompoundSelector.ts +128 -0
- package/grapesjs-plugins/grapesjs-advanced-selector/src/model/GrapesJsSelectors.test.ts +1077 -0
- package/grapesjs-plugins/grapesjs-advanced-selector/src/model/GrapesJsSelectors.ts +653 -0
- package/grapesjs-plugins/grapesjs-advanced-selector/src/model/Operator.test.ts +45 -0
- package/grapesjs-plugins/grapesjs-advanced-selector/src/model/Operator.ts +129 -0
- package/grapesjs-plugins/grapesjs-advanced-selector/src/model/PseudoClass.test.ts +31 -0
- package/grapesjs-plugins/grapesjs-advanced-selector/src/model/PseudoClass.ts +159 -0
- package/grapesjs-plugins/grapesjs-advanced-selector/src/model/SimpleSelector.test.ts +181 -0
- package/grapesjs-plugins/grapesjs-advanced-selector/src/model/SimpleSelector.ts +379 -0
- package/grapesjs-plugins/grapesjs-advanced-selector/src/plugin.ts +225 -0
- package/grapesjs-plugins/grapesjs-advanced-selector/src/styles.ts +40 -0
- package/grapesjs-plugins/grapesjs-advanced-selector/src/test-data.json +3546 -0
- package/grapesjs-plugins/grapesjs-advanced-selector/tsconfig.json +37 -0
- package/grapesjs-plugins/grapesjs-ai-capabilities/.eslintrc.json +31 -0
- package/grapesjs-plugins/grapesjs-ai-capabilities/LICENSE +17 -0
- package/grapesjs-plugins/grapesjs-ai-capabilities/README.md +129 -0
- package/grapesjs-plugins/grapesjs-ai-capabilities/_index.html +37 -0
- package/grapesjs-plugins/grapesjs-ai-capabilities/package-lock.json +9023 -0
- package/grapesjs-plugins/grapesjs-ai-capabilities/package.json +46 -0
- package/grapesjs-plugins/grapesjs-ai-capabilities/src/index.js +97 -0
- package/grapesjs-plugins/grapesjs-ai-capabilities/test/index.test.js +198 -0
- package/grapesjs-plugins/grapesjs-ai-capabilities/tsconfig.json +29 -0
- package/grapesjs-plugins/grapesjs-css-variables/.eslintrc.json +31 -0
- package/grapesjs-plugins/grapesjs-css-variables/LICENSE +661 -0
- package/grapesjs-plugins/grapesjs-css-variables/README.md +172 -0
- package/grapesjs-plugins/grapesjs-css-variables/TEST_SCENARIOS.md +181 -0
- package/grapesjs-plugins/grapesjs-css-variables/_index.html +93 -0
- package/grapesjs-plugins/grapesjs-css-variables/package-lock.json +9020 -0
- package/grapesjs-plugins/grapesjs-css-variables/package.json +46 -0
- package/grapesjs-plugins/grapesjs-css-variables/src/capabilities.js +133 -0
- package/grapesjs-plugins/grapesjs-css-variables/src/index.js +37 -0
- package/grapesjs-plugins/grapesjs-css-variables/src/locale/en.js +22 -0
- package/grapesjs-plugins/grapesjs-css-variables/src/locale/fr.js +22 -0
- package/grapesjs-plugins/grapesjs-css-variables/src/modal.js +692 -0
- package/grapesjs-plugins/grapesjs-css-variables/src/style-manager.js +461 -0
- package/grapesjs-plugins/grapesjs-css-variables/src/types.js +8 -0
- package/grapesjs-plugins/grapesjs-css-variables/src/variables.js +439 -0
- package/grapesjs-plugins/grapesjs-data-source/.husky/pre-commit +4 -0
- package/grapesjs-plugins/grapesjs-data-source/.nvmrc +1 -0
- package/grapesjs-plugins/grapesjs-data-source/LICENSE +661 -0
- package/grapesjs-plugins/grapesjs-data-source/README.md +674 -0
- package/grapesjs-plugins/grapesjs-data-source/__mocks__/directus-schema.json +67137 -0
- package/grapesjs-plugins/grapesjs-data-source/__mocks__/directus-test-schema.json +8393 -0
- package/grapesjs-plugins/grapesjs-data-source/__mocks__/graphql-mocks.js +7 -0
- package/grapesjs-plugins/grapesjs-data-source/__mocks__/simple-schema.json +493 -0
- package/grapesjs-plugins/grapesjs-data-source/__mocks__/squidex-schema.json +6656 -0
- package/grapesjs-plugins/grapesjs-data-source/__mocks__/strapi-schema.json +7986 -0
- package/grapesjs-plugins/grapesjs-data-source/_index.html +110 -0
- package/grapesjs-plugins/grapesjs-data-source/babel.config.js +7 -0
- package/grapesjs-plugins/grapesjs-data-source/eslint.config.mjs +47 -0
- package/grapesjs-plugins/grapesjs-data-source/example.graphql +355 -0
- package/grapesjs-plugins/grapesjs-data-source/example.graphql.json +5666 -0
- package/grapesjs-plugins/grapesjs-data-source/example.page.json +1 -0
- package/grapesjs-plugins/grapesjs-data-source/integration-tests/base/graphql-response.json +6 -0
- package/grapesjs-plugins/grapesjs-data-source/integration-tests/base/graphql-types.json +2095 -0
- package/grapesjs-plugins/grapesjs-data-source/integration-tests/base/preview.html +5 -0
- package/grapesjs-plugins/grapesjs-data-source/integration-tests/base/website.json +79 -0
- package/grapesjs-plugins/grapesjs-data-source/integration-tests/countries-lists/graphql-response.json +1056 -0
- package/grapesjs-plugins/grapesjs-data-source/integration-tests/countries-lists/graphql-types.json +2095 -0
- package/grapesjs-plugins/grapesjs-data-source/integration-tests/countries-lists/preview.html +36 -0
- package/grapesjs-plugins/grapesjs-data-source/integration-tests/countries-lists/website.json +422 -0
- package/grapesjs-plugins/grapesjs-data-source/integration-tests/example.graphql-result.json +18718 -0
- package/grapesjs-plugins/grapesjs-data-source/integration-tests/example.graphql-types.json +1955 -0
- package/grapesjs-plugins/grapesjs-data-source/integration-tests/graphql-modules.json +191 -0
- package/grapesjs-plugins/grapesjs-data-source/integration-tests/modules.html +45 -0
- package/grapesjs-plugins/grapesjs-data-source/integration-tests/visibility-truthy/graphql-response.json +1056 -0
- package/grapesjs-plugins/grapesjs-data-source/integration-tests/visibility-truthy/graphql-types.json +2095 -0
- package/grapesjs-plugins/grapesjs-data-source/integration-tests/visibility-truthy/preview.html +31 -0
- package/grapesjs-plugins/grapesjs-data-source/integration-tests/visibility-truthy/website.json +261 -0
- package/grapesjs-plugins/grapesjs-data-source/integration-tests/website-modules.json +650 -0
- package/grapesjs-plugins/grapesjs-data-source/jest.config.js +21 -0
- package/grapesjs-plugins/grapesjs-data-source/package-lock.json +13182 -0
- package/grapesjs-plugins/grapesjs-data-source/package.json +77 -0
- package/grapesjs-plugins/grapesjs-data-source/src/api.ts +386 -0
- package/grapesjs-plugins/grapesjs-data-source/src/capabilities.ts +80 -0
- package/grapesjs-plugins/grapesjs-data-source/src/commands.ts +269 -0
- package/grapesjs-plugins/grapesjs-data-source/src/datasources/GraphQL.ts +1039 -0
- package/grapesjs-plugins/grapesjs-data-source/src/datasources/graphql-introspection-query.ts +112 -0
- package/grapesjs-plugins/grapesjs-data-source/src/datasources/graphql.test.ts +657 -0
- package/grapesjs-plugins/grapesjs-data-source/src/filters/index.ts +102 -0
- package/grapesjs-plugins/grapesjs-data-source/src/filters/liquid.test.ts +27 -0
- package/grapesjs-plugins/grapesjs-data-source/src/filters/liquid.ts +985 -0
- package/grapesjs-plugins/grapesjs-data-source/src/index.ts +103 -0
- package/grapesjs-plugins/grapesjs-data-source/src/integration.test.ts +504 -0
- package/grapesjs-plugins/grapesjs-data-source/src/model/ExpressionTree.ts +251 -0
- package/grapesjs-plugins/grapesjs-data-source/src/model/completion.ts +213 -0
- package/grapesjs-plugins/grapesjs-data-source/src/model/dataSourceManager.ts +315 -0
- package/grapesjs-plugins/grapesjs-data-source/src/model/dataSourceRegistry.test.ts +170 -0
- package/grapesjs-plugins/grapesjs-data-source/src/model/dataSourceRegistry.ts +117 -0
- package/grapesjs-plugins/grapesjs-data-source/src/model/expressionEvaluator.ts +241 -0
- package/grapesjs-plugins/grapesjs-data-source/src/model/previewDataLoader.ts +196 -0
- package/grapesjs-plugins/grapesjs-data-source/src/model/queryBuilder.ts +118 -0
- package/grapesjs-plugins/grapesjs-data-source/src/model/state.test.ts +76 -0
- package/grapesjs-plugins/grapesjs-data-source/src/model/state.ts +243 -0
- package/grapesjs-plugins/grapesjs-data-source/src/model/token.ts +336 -0
- package/grapesjs-plugins/grapesjs-data-source/src/storage.test.ts +81 -0
- package/grapesjs-plugins/grapesjs-data-source/src/storage.ts +55 -0
- package/grapesjs-plugins/grapesjs-data-source/src/test-data.ts +154 -0
- package/grapesjs-plugins/grapesjs-data-source/src/types.ts +299 -0
- package/grapesjs-plugins/grapesjs-data-source/src/utils.test.ts +46 -0
- package/grapesjs-plugins/grapesjs-data-source/src/utils.ts +367 -0
- package/grapesjs-plugins/grapesjs-data-source/src/view/canvas.ts +718 -0
- package/grapesjs-plugins/grapesjs-data-source/src/view/custom-states-editor.ts +371 -0
- package/grapesjs-plugins/grapesjs-data-source/src/view/defaultStyles.ts +432 -0
- package/grapesjs-plugins/grapesjs-data-source/src/view/index.ts +168 -0
- package/grapesjs-plugins/grapesjs-data-source/src/view/properties-editor.ts +249 -0
- package/grapesjs-plugins/grapesjs-data-source/src/view/settings.ts +1551 -0
- package/grapesjs-plugins/grapesjs-data-source/src/view/state-editor.ts +528 -0
- package/grapesjs-plugins/grapesjs-data-source/strapi/.editorconfig +16 -0
- package/grapesjs-plugins/grapesjs-data-source/strapi/.env.example +7 -0
- package/grapesjs-plugins/grapesjs-data-source/strapi/.eslintignore +3 -0
- package/grapesjs-plugins/grapesjs-data-source/strapi/.eslintrc +27 -0
- package/grapesjs-plugins/grapesjs-data-source/strapi/README.md +57 -0
- package/grapesjs-plugins/grapesjs-data-source/strapi/config/admin.js +13 -0
- package/grapesjs-plugins/grapesjs-data-source/strapi/config/api.js +7 -0
- package/grapesjs-plugins/grapesjs-data-source/strapi/config/database.js +92 -0
- package/grapesjs-plugins/grapesjs-data-source/strapi/config/middlewares.js +12 -0
- package/grapesjs-plugins/grapesjs-data-source/strapi/config/server.js +10 -0
- package/grapesjs-plugins/grapesjs-data-source/strapi/database/migrations/.gitkeep +0 -0
- package/grapesjs-plugins/grapesjs-data-source/strapi/favicon.png +0 -0
- package/grapesjs-plugins/grapesjs-data-source/strapi/jsconfig.json +8 -0
- package/grapesjs-plugins/grapesjs-data-source/strapi/package.json +31 -0
- package/grapesjs-plugins/grapesjs-data-source/strapi/public/robots.txt +3 -0
- package/grapesjs-plugins/grapesjs-data-source/strapi/public/uploads/.gitkeep +0 -0
- package/grapesjs-plugins/grapesjs-data-source/strapi/src/admin/app.example.js +39 -0
- package/grapesjs-plugins/grapesjs-data-source/strapi/src/admin/webpack.config.example.js +9 -0
- package/grapesjs-plugins/grapesjs-data-source/strapi/src/api/.gitkeep +0 -0
- package/grapesjs-plugins/grapesjs-data-source/strapi/src/api/post/content-types/post/schema.json +26 -0
- package/grapesjs-plugins/grapesjs-data-source/strapi/src/api/post/controllers/post.js +9 -0
- package/grapesjs-plugins/grapesjs-data-source/strapi/src/api/post/routes/post.js +9 -0
- package/grapesjs-plugins/grapesjs-data-source/strapi/src/api/post/services/post.js +9 -0
- package/grapesjs-plugins/grapesjs-data-source/strapi/src/extensions/.gitkeep +0 -0
- package/grapesjs-plugins/grapesjs-data-source/strapi/src/index.js +20 -0
- package/grapesjs-plugins/grapesjs-data-source/strapi/types/generated/components.d.ts +5 -0
- package/grapesjs-plugins/grapesjs-data-source/strapi/types/generated/contentTypes.d.ts +723 -0
- package/grapesjs-plugins/grapesjs-data-source/tmp/countries-lists.html +1 -0
- package/grapesjs-plugins/grapesjs-data-source/tsconfig.cjs.json +8 -0
- package/grapesjs-plugins/grapesjs-data-source/tsconfig.json +49 -0
- package/grapesjs-plugins/grapesjs-filter-styles/README.md +137 -0
- package/grapesjs-plugins/grapesjs-filter-styles/eslint.config.mjs +35 -0
- package/grapesjs-plugins/grapesjs-filter-styles/package-lock.json +8927 -0
- package/grapesjs-plugins/grapesjs-filter-styles/package.json +40 -0
- package/grapesjs-plugins/grapesjs-filter-styles/src/index.js +283 -0
- package/grapesjs-plugins/grapesjs-filter-styles/tsconfig.json +26 -0
- package/grapesjs-plugins/grapesjs-fonts/.eslintrc.json +31 -0
- package/grapesjs-plugins/grapesjs-fonts/LICENSE +9 -0
- package/grapesjs-plugins/grapesjs-fonts/README.md +231 -0
- package/grapesjs-plugins/grapesjs-fonts/_index.html +95 -0
- package/grapesjs-plugins/grapesjs-fonts/package-lock.json +9024 -0
- package/grapesjs-plugins/grapesjs-fonts/package.json +46 -0
- package/grapesjs-plugins/grapesjs-fonts/src/capabilities.js +61 -0
- package/grapesjs-plugins/grapesjs-fonts/src/commands.js +100 -0
- package/grapesjs-plugins/grapesjs-fonts/src/fonts.js +396 -0
- package/grapesjs-plugins/grapesjs-fonts/src/index.js +34 -0
- package/grapesjs-plugins/grapesjs-fonts/src/locale/en.js +19 -0
- package/grapesjs-plugins/grapesjs-fonts/src/locale/fr.js +21 -0
- package/grapesjs-plugins/grapesjs-fonts/src/locale/ptbr.js +18 -0
- package/grapesjs-plugins/grapesjs-fonts/tsconfig.json +29 -0
- package/grapesjs-plugins/grapesjs-keymaps-dialog/README.md +116 -0
- package/grapesjs-plugins/grapesjs-keymaps-dialog/package.json +46 -0
- package/grapesjs-plugins/grapesjs-keymaps-dialog/src/KeymapsDialog.ts +208 -0
- package/grapesjs-plugins/grapesjs-keymaps-dialog/src/KeymapsDialogManager.ts +78 -0
- package/grapesjs-plugins/grapesjs-keymaps-dialog/src/index.ts +70 -0
- package/grapesjs-plugins/grapesjs-keymaps-dialog/tsconfig.json +29 -0
- package/grapesjs-plugins/grapesjs-loading/.eslintrc.json +22 -0
- package/grapesjs-plugins/grapesjs-loading/README.md +140 -0
- package/grapesjs-plugins/grapesjs-loading/_index.html +90 -0
- package/grapesjs-plugins/grapesjs-loading/eslint.config.mjs +20 -0
- package/grapesjs-plugins/grapesjs-loading/grapesjs-loading.gif +0 -0
- package/grapesjs-plugins/grapesjs-loading/package.json +50 -0
- package/grapesjs-plugins/grapesjs-loading/src/index.ts +54 -0
- package/grapesjs-plugins/grapesjs-loading/tsconfig.json +20 -0
- package/grapesjs-plugins/grapesjs-notifications/LICENSE +661 -0
- package/grapesjs-plugins/grapesjs-notifications/README.md +295 -0
- package/grapesjs-plugins/grapesjs-notifications/_index.html +95 -0
- package/grapesjs-plugins/grapesjs-notifications/package-lock.json +8187 -0
- package/grapesjs-plugins/grapesjs-notifications/package.json +58 -0
- package/grapesjs-plugins/grapesjs-notifications/src/Notification.ts +117 -0
- package/grapesjs-plugins/grapesjs-notifications/src/NotificationManager.ts +93 -0
- package/grapesjs-plugins/grapesjs-notifications/src/Storage.ts +26 -0
- package/grapesjs-plugins/grapesjs-notifications/src/capabilities.ts +33 -0
- package/grapesjs-plugins/grapesjs-notifications/src/commands.ts +5 -0
- package/grapesjs-plugins/grapesjs-notifications/src/index.ts +126 -0
- package/grapesjs-plugins/grapesjs-notifications/src/locale/en.js +8 -0
- package/grapesjs-plugins/grapesjs-notifications/src/view.ts +127 -0
- package/grapesjs-plugins/grapesjs-notifications/tsconfig.json +30 -0
- package/grapesjs-plugins/grapesjs-storage-rate-limit/LICENSE +213 -0
- package/grapesjs-plugins/grapesjs-storage-rate-limit/README.md +119 -0
- package/grapesjs-plugins/grapesjs-storage-rate-limit/jest.config.js +197 -0
- package/grapesjs-plugins/grapesjs-storage-rate-limit/package-lock.json +10752 -0
- package/grapesjs-plugins/grapesjs-storage-rate-limit/package.json +44 -0
- package/grapesjs-plugins/grapesjs-storage-rate-limit/src/index.js +90 -0
- package/grapesjs-plugins/grapesjs-storage-rate-limit/src/index.test.js +122 -0
- package/grapesjs-plugins/grapesjs-symbols/.eslintrc.cjs +20 -0
- package/grapesjs-plugins/grapesjs-symbols/.husky/pre-commit +5 -0
- package/grapesjs-plugins/grapesjs-symbols/.nvmrc +1 -0
- package/grapesjs-plugins/grapesjs-symbols/LICENSE +661 -0
- package/grapesjs-plugins/grapesjs-symbols/README.md +228 -0
- package/grapesjs-plugins/grapesjs-symbols/_index.html +104 -0
- package/grapesjs-plugins/grapesjs-symbols/es5.html +119 -0
- package/grapesjs-plugins/grapesjs-symbols/es6.html +107 -0
- package/grapesjs-plugins/grapesjs-symbols/eslint.config.mjs +72 -0
- package/grapesjs-plugins/grapesjs-symbols/jest.config.js +12 -0
- package/grapesjs-plugins/grapesjs-symbols/package-lock.json +6867 -0
- package/grapesjs-plugins/grapesjs-symbols/package.json +73 -0
- package/grapesjs-plugins/grapesjs-symbols/rollup.config.mjs +26 -0
- package/grapesjs-plugins/grapesjs-symbols/src/SymbolsCommands.test.ts +147 -0
- package/grapesjs-plugins/grapesjs-symbols/src/SymbolsCommands.ts +144 -0
- package/grapesjs-plugins/grapesjs-symbols/src/capabilities.ts +50 -0
- package/grapesjs-plugins/grapesjs-symbols/src/events.ts +8 -0
- package/grapesjs-plugins/grapesjs-symbols/src/id-utils.ts +158 -0
- package/grapesjs-plugins/grapesjs-symbols/src/index.ts +46 -0
- package/grapesjs-plugins/grapesjs-symbols/src/test-utils.ts +51 -0
- package/grapesjs-plugins/grapesjs-symbols/src/utils.test.ts +118 -0
- package/grapesjs-plugins/grapesjs-symbols/src/utils.ts +90 -0
- package/grapesjs-plugins/grapesjs-symbols/src/view/SymbolsView.ts +251 -0
- package/grapesjs-plugins/grapesjs-symbols/src/view/traits.ts +101 -0
- package/grapesjs-plugins/grapesjs-symbols/tsconfig.json +35 -0
- package/grapesjs-plugins/grapesjs-symbols/tsconfig.test.json +12 -0
- package/grapesjs-plugins/grapesjs-version-flow/LICENSE +661 -0
- package/grapesjs-plugins/grapesjs-version-flow/README.md +422 -0
- package/grapesjs-plugins/grapesjs-version-flow/_index.html +494 -0
- package/grapesjs-plugins/grapesjs-version-flow/babel.config.js +9 -0
- package/grapesjs-plugins/grapesjs-version-flow/package-lock.json +11832 -0
- package/grapesjs-plugins/grapesjs-version-flow/package.json +77 -0
- package/grapesjs-plugins/grapesjs-version-flow/prompts/initial.txt +116 -0
- package/grapesjs-plugins/grapesjs-version-flow/src/event-system.js +48 -0
- package/grapesjs-plugins/grapesjs-version-flow/src/index.js +87 -0
- package/grapesjs-plugins/grapesjs-version-flow/src/locale/en.js +26 -0
- package/grapesjs-plugins/grapesjs-version-flow/src/locale/fr.js +26 -0
- package/grapesjs-plugins/grapesjs-version-flow/src/modal-ui.js +562 -0
- package/grapesjs-plugins/grapesjs-version-flow/src/style-manager.js +240 -0
- package/grapesjs-plugins/grapesjs-version-flow/src/upgrade-engine.js +237 -0
- package/grapesjs-plugins/grapesjs-version-flow/src/version-manager.js +117 -0
- package/grapesjs-plugins/grapesjs-version-flow/tests/index.test.js +241 -0
- package/grapesjs-plugins/grapesjs-version-flow/tests/integration.test.js +227 -0
- package/grapesjs-plugins/grapesjs-version-flow/tests/setup.js +67 -0
- package/grapesjs-plugins/grapesjs-version-flow/tests/upgrade-engine.test.js +360 -0
- package/grapesjs-plugins/grapesjs-version-flow/tests/version-manager.test.js +168 -0
- package/grapesjs-plugins/grapesjs-version-flow/tests/version-storage.test.js +203 -0
- package/grapesjs-plugins/grapesjs-version-flow/tsconfig.json +26 -0
- package/package.json +127 -159
- package/{src/ts/server → server}/api/api.ts +6 -6
- package/{src/ts/server → server}/api/connectorApi.ts +5 -5
- package/{src/ts/server → server}/api/publicationApi.ts +7 -7
- package/{src/ts/server → server}/api/websiteApi.ts +7 -8
- package/{src/ts/server → server}/config.ts +14 -12
- package/{src/ts/server → server}/connectors/FsHosting.ts +4 -4
- package/{src/ts/server → server}/connectors/FsStorage.test.ts +2 -2
- package/{src/ts/server → server}/connectors/FsStorage.ts +8 -8
- package/{src/ts/server → server}/connectors/connectors.ts +3 -3
- package/server/deploy/.nvmrc +1 -0
- package/server/deploy/.silex.js +220 -0
- package/server/deploy/client-config.js +17 -0
- package/server/deploy/client-plugins/.gitkeep +0 -0
- package/server/deploy/client-plugins/onboarding.js +67 -0
- package/server/deploy/example.env +25 -0
- package/server/deploy/onboarding.json +22 -0
- package/server/deploy/picto-silex@3x.png +0 -0
- package/server/deploy/server-plugins/dashboard.js +74 -0
- package/server/deploy/server-plugins/onboarding.js +212 -0
- package/server/deploy/silex-platform.yml +75 -0
- package/{src/ts/server → server}/events.ts +2 -2
- package/{src/ts/server → server}/expose.ts +1 -1
- package/{src/ts/server → server}/express.ts +2 -2
- package/{src/ts/server → server}/index.ts +7 -7
- package/{src/ts/server → server}/jobs.test.ts +1 -1
- package/{src/ts/server → server}/jobs.ts +1 -1
- package/server/plugins/DownloadConnector.publish.test.ts +32 -0
- package/server/plugins/DownloadConnector.test.ts +70 -0
- package/{src/ts/plugins/server → server/plugins}/DownloadConnector.ts +22 -10
- package/{src/ts/plugins/server → server/plugins}/FtpConnector.test.ts +3 -3
- package/{src/ts/plugins/server → server/plugins}/FtpConnector.ts +7 -7
- package/{src/ts/plugins/server → server/plugins}/GitlabConnector.ts +9 -26
- package/{src/ts/plugins/server → server/plugins}/GitlabHostingConnector.ts +5 -5
- package/{src/ts/plugins/server → server/plugins}/SslPlugin.ts +2 -2
- package/{src/ts/plugins/server → server/plugins}/StaticPlugin.ts +2 -2
- package/{src/ts/server → server}/utils/BackwardCompat.ts +1 -1
- package/{src/ts/server → server}/utils/websiteDataSerialization.test.ts +2 -2
- package/{src/ts/server → server}/utils/websiteDataSerialization.ts +3 -3
- package/.silex.js +0 -76
- package/dist/client/client/api.d.ts +0 -101
- package/dist/client/client/assetUrl.d.ts +0 -60
- package/dist/client/client/config.d.ts +0 -110
- package/dist/client/client/events.d.ts +0 -23
- package/dist/client/client/expose.d.ts +0 -10
- package/dist/client/client/grapesjs/LoginDialog.d.ts +0 -15
- package/dist/client/client/grapesjs/PublicationManager.d.ts +0 -117
- package/dist/client/client/grapesjs/PublicationUi.d.ts +0 -59
- package/dist/client/client/grapesjs/blocks.d.ts +0 -1
- package/dist/client/client/grapesjs/body-remap.d.ts +0 -15
- package/dist/client/client/grapesjs/breadcrumbs.d.ts +0 -1
- package/dist/client/client/grapesjs/cms/DataSource.d.ts +0 -43
- package/dist/client/client/grapesjs/cms/blocks.d.ts +0 -2
- package/dist/client/client/grapesjs/cms/buttons.d.ts +0 -2
- package/dist/client/client/grapesjs/cms/collection-pages.d.ts +0 -4
- package/dist/client/client/grapesjs/cms/config.d.ts +0 -9
- package/dist/client/client/grapesjs/cms/filters.d.ts +0 -3
- package/dist/client/client/grapesjs/cms/index.d.ts +0 -43
- package/dist/client/client/grapesjs/cms/liquid.d.ts +0 -73
- package/dist/client/client/grapesjs/cms/page-settings.d.ts +0 -6
- package/dist/client/client/grapesjs/cms/publication.d.ts +0 -60
- package/dist/client/client/grapesjs/cms/site-settings.d.ts +0 -3
- package/dist/client/client/grapesjs/cms/states.d.ts +0 -8
- package/dist/client/client/grapesjs/cms/traits.d.ts +0 -8
- package/dist/client/client/grapesjs/core-commands.d.ts +0 -3
- package/dist/client/client/grapesjs/css-props.d.ts +0 -6
- package/dist/client/client/grapesjs/flex.d.ts +0 -3
- package/dist/client/client/grapesjs/footer.d.ts +0 -2
- package/dist/client/client/grapesjs/img.d.ts +0 -6
- package/dist/client/client/grapesjs/index.d.ts +0 -9
- package/dist/client/client/grapesjs/internal-links.d.ts +0 -1
- package/dist/client/client/grapesjs/keymaps.d.ts +0 -123
- package/dist/client/client/grapesjs/li.d.ts +0 -7
- package/dist/client/client/grapesjs/new-page-dialog.d.ts +0 -2
- package/dist/client/client/grapesjs/openImport.d.ts +0 -9
- package/dist/client/client/grapesjs/page-panel.d.ts +0 -13
- package/dist/client/client/grapesjs/project-bar.d.ts +0 -21
- package/dist/client/client/grapesjs/resize-panel.d.ts +0 -1
- package/dist/client/client/grapesjs/rich-text.d.ts +0 -4
- package/dist/client/client/grapesjs/sectors.d.ts +0 -12
- package/dist/client/client/grapesjs/semantic.d.ts +0 -1
- package/dist/client/client/grapesjs/settings-sections.d.ts +0 -19
- package/dist/client/client/grapesjs/settings.d.ts +0 -16
- package/dist/client/client/grapesjs/storage.d.ts +0 -3
- package/dist/client/client/grapesjs/symbolDialogs.d.ts +0 -4
- package/dist/client/client/grapesjs/upload-progress.d.ts +0 -2
- package/dist/client/client/grapesjs/view-buttons.d.ts +0 -2
- package/dist/client/client/index.d.ts +0 -10
- package/dist/client/client/publication-transformers.d.ts +0 -42
- package/dist/client/client/publish-custom-code-block.d.ts +0 -4
- package/dist/client/client/publish-fonts.d.ts +0 -4
- package/dist/client/client/utils.d.ts +0 -23
- package/dist/client/constants.d.ts +0 -35
- package/dist/client/page.d.ts +0 -2
- package/dist/client/types.d.ts +0 -365
- package/dist/client/webfonts/fa-brands-400.ttf +0 -0
- package/dist/client/webfonts/fa-regular-400.ttf +0 -0
- package/dist/client/webfonts/fa-solid-900.ttf +0 -0
- package/dist/client/webfonts/fa-v4compatibility.ttf +0 -0
- package/dist/plugins/client/client/events.d.ts +0 -23
- package/dist/plugins/client/client/events.js +0 -43
- package/dist/plugins/client/client/events.js.map +0 -1
- package/dist/plugins/client/plugins/client/template.d.ts +0 -2
- package/dist/plugins/client/plugins/client/template.js +0 -234
- package/dist/plugins/client/plugins/client/template.js.map +0 -1
- package/dist/plugins/client/plugins/client/website-info.d.ts +0 -1
- package/dist/plugins/client/plugins/client/website-info.js +0 -72
- package/dist/plugins/client/plugins/client/website-info.js.map +0 -1
- package/dist/plugins/client/types.d.ts +0 -365
- package/dist/plugins/client/types.js +0 -83
- package/dist/plugins/client/types.js.map +0 -1
- package/dist/plugins/server/constants.d.ts +0 -35
- package/dist/plugins/server/constants.js +0 -79
- package/dist/plugins/server/constants.js.map +0 -1
- package/dist/plugins/server/page.d.ts +0 -2
- package/dist/plugins/server/page.js +0 -35
- package/dist/plugins/server/page.js.map +0 -1
- package/dist/plugins/server/plugins/server/Cache.d.ts +0 -2
- package/dist/plugins/server/plugins/server/Cache.js +0 -36
- package/dist/plugins/server/plugins/server/Cache.js.map +0 -1
- package/dist/plugins/server/plugins/server/DownloadConnector.d.ts +0 -29
- package/dist/plugins/server/plugins/server/DownloadConnector.js.map +0 -1
- package/dist/plugins/server/plugins/server/FtpConnector.d.ts +0 -86
- package/dist/plugins/server/plugins/server/FtpConnector.js.map +0 -1
- package/dist/plugins/server/plugins/server/GitlabConnector.d.ts +0 -172
- package/dist/plugins/server/plugins/server/GitlabConnector.js.map +0 -1
- package/dist/plugins/server/plugins/server/GitlabHostingConnector.d.ts +0 -23
- package/dist/plugins/server/plugins/server/GitlabHostingConnector.js.map +0 -1
- package/dist/plugins/server/plugins/server/PublicationOptimizer.js +0 -14
- package/dist/plugins/server/plugins/server/PublicationOptimizer.js.map +0 -1
- package/dist/plugins/server/plugins/server/SslPlugin.d.ts +0 -1
- package/dist/plugins/server/plugins/server/SslPlugin.js.map +0 -1
- package/dist/plugins/server/plugins/server/StaticPlugin.d.ts +0 -8
- package/dist/plugins/server/plugins/server/StaticPlugin.js.map +0 -1
- package/dist/plugins/server/server/config.d.ts +0 -59
- package/dist/plugins/server/server/config.js +0 -181
- package/dist/plugins/server/server/config.js.map +0 -1
- package/dist/plugins/server/server/connectors/FsHosting.d.ts +0 -14
- package/dist/plugins/server/server/connectors/FsHosting.js +0 -66
- package/dist/plugins/server/server/connectors/FsHosting.js.map +0 -1
- package/dist/plugins/server/server/connectors/FsStorage.d.ts +0 -44
- package/dist/plugins/server/server/connectors/FsStorage.js +0 -303
- package/dist/plugins/server/server/connectors/FsStorage.js.map +0 -1
- package/dist/plugins/server/server/connectors/connectors.d.ts +0 -86
- package/dist/plugins/server/server/connectors/connectors.js +0 -126
- package/dist/plugins/server/server/connectors/connectors.js.map +0 -1
- package/dist/plugins/server/server/events.d.ts +0 -26
- package/dist/plugins/server/server/events.js +0 -31
- package/dist/plugins/server/server/events.js.map +0 -1
- package/dist/plugins/server/server/jobs.d.ts +0 -12
- package/dist/plugins/server/server/jobs.js +0 -79
- package/dist/plugins/server/server/jobs.js.map +0 -1
- package/dist/plugins/server/server/utils/validation.d.ts +0 -7
- package/dist/plugins/server/server/utils/validation.js +0 -37
- package/dist/plugins/server/server/utils/validation.js.map +0 -1
- package/dist/plugins/server/server/utils/websiteDataSerialization.d.ts +0 -24
- package/dist/plugins/server/server/utils/websiteDataSerialization.js +0 -136
- package/dist/plugins/server/server/utils/websiteDataSerialization.js.map +0 -1
- package/dist/plugins/server/types.d.ts +0 -365
- package/dist/plugins/server/types.js +0 -87
- package/dist/plugins/server/types.js.map +0 -1
- package/dist/server/server/cli.js +0 -71
- package/src/css/grapesjs-light.scss +0 -180
- package/src/ts/plugins/client/template.ts +0 -246
- package/src/ts/plugins/client/website-info.ts +0 -84
- package/src/ts/server/cli.ts +0 -67
- /package/{src/ts → common}/constants.ts +0 -0
- /package/{src/ts → common}/externs.ts +0 -0
- /package/{src/ts → common}/page.ts +0 -0
- /package/{src/ts → common}/types.ts +0 -0
- /package/dist/server/{constants.js → common/constants.js} +0 -0
- /package/dist/server/{page.js → common/page.js} +0 -0
- /package/dist/server/{types.js → common/types.js} +0 -0
- /package/dist/server/{plugins/server → server/plugins}/Cache.js +0 -0
- /package/{src → editor}/css/_mixins.scss +0 -0
- /package/{src → editor}/css/_variables.scss +0 -0
- /package/{src → editor}/css/dialog.scss +0 -0
- /package/{src → editor}/css/dialogs.scss +0 -0
- /package/{src → editor}/css/fonts.scss +0 -0
- /package/{src → editor}/css/footer.scss +0 -0
- /package/{src → editor}/css/grapesjs-plugins.scss +0 -0
- /package/{src → editor}/css/grapesjs.scss +0 -0
- /package/{src → editor}/css/loader.scss +0 -0
- /package/{src → editor}/css/page-panel.scss +0 -0
- /package/{src → editor}/css/panels.scss +0 -0
- /package/{src → editor}/css/silex.scss +0 -0
- /package/{src → editor}/css/theme-base.scss +0 -0
- /package/{src → editor}/css/website-info.scss +0 -0
- /package/{src/ts/client → editor}/events.ts +0 -0
- /package/{src/ts/client → editor}/grapesjs/blocks.ts +0 -0
- /package/{src/ts/client → editor}/grapesjs/body-remap.ts +0 -0
- /package/{src/ts/client → editor}/grapesjs/breadcrumbs.ts +0 -0
- /package/{src/ts/client → editor}/grapesjs/cms/DataSource.ts +0 -0
- /package/{src/ts/client → editor}/grapesjs/cms/blocks.ts +0 -0
- /package/{src/ts/client → editor}/grapesjs/cms/buttons.ts +0 -0
- /package/{src/ts/client → editor}/grapesjs/cms/collection-pages.ts +0 -0
- /package/{src/ts/client → editor}/grapesjs/cms/config.ts +0 -0
- /package/{src/ts/client → editor}/grapesjs/cms/filters.ts +0 -0
- /package/{src/ts/client → editor}/grapesjs/cms/liquid.mock.ts +0 -0
- /package/{src/ts/client → editor}/grapesjs/cms/liquid.test.ts +0 -0
- /package/{src/ts/client → editor}/grapesjs/cms/liquid.ts +0 -0
- /package/{src/ts/client → editor}/grapesjs/cms/publication.test.ts +0 -0
- /package/{src/ts/client → editor}/grapesjs/cms/site-settings.ts +0 -0
- /package/{src/ts/client → editor}/grapesjs/cms/states.ts +0 -0
- /package/{src/ts/client → editor}/grapesjs/cms/traits.ts +0 -0
- /package/{src/ts/client → editor}/grapesjs/core-commands.ts +0 -0
- /package/{src/ts/client → editor}/grapesjs/css-props.ts +0 -0
- /package/{src/ts/client → editor}/grapesjs/flex.ts +0 -0
- /package/{src/ts/client → editor}/grapesjs/footer.ts +0 -0
- /package/{src/ts/client → editor}/grapesjs/img.ts +0 -0
- /package/{src/ts/client → editor}/grapesjs/internal-links.test.ts +0 -0
- /package/{src/ts/client → editor}/grapesjs/keymaps.ts +0 -0
- /package/{src/ts/client → editor}/grapesjs/li.ts +0 -0
- /package/{src/ts/client → editor}/grapesjs/new-page-dialog.ts +0 -0
- /package/{src/ts/client → editor}/grapesjs/openImport.ts +0 -0
- /package/{src/ts/client → editor}/grapesjs/page-panel.ts +0 -0
- /package/{src/ts/client → editor}/grapesjs/project-bar.ts +0 -0
- /package/{src/ts/client → editor}/grapesjs/rich-text.ts +0 -0
- /package/{src/ts/client → editor}/grapesjs/sectors.ts +0 -0
- /package/{src/ts/client → editor}/grapesjs/semantic.ts +0 -0
- /package/{src/ts/client → editor}/grapesjs/static-plugins.ts +0 -0
- /package/{src/ts/client → editor}/grapesjs/symbolDialogs.ts +0 -0
- /package/{src/ts/client → editor}/grapesjs/upload-progress.ts +0 -0
- /package/{src/ts/client → editor}/grapesjs/view-buttons.ts +0 -0
- /package/{src → editor}/html/debug.pug +0 -0
- /package/{src → editor}/html/index.pug +0 -0
- /package/{src → editor}/html/templates/includes.pug +0 -0
- /package/{src → editor}/html/templates/workspace.pug +0 -0
- /package/{src/ts/client → editor}/publish-custom-code-block.ts +0 -0
- /package/{src/ts/client → editor}/utils.ts +0 -0
- /package/{dist/plugins/server/plugins/server/PublicationOptimizer.d.ts → grapesjs-plugins/expression-input/docs/.nojekyll} +0 -0
- /package/{src/ts/plugins/server → server/plugins}/Cache.ts +0 -0
- /package/{src/ts/plugins/server → server/plugins}/PublicationOptimizer.ts +0 -0
- /package/{src/ts/server → server}/utils/validation.ts +0 -0
package/README.md
CHANGED
|
@@ -1,123 +1,160 @@
|
|
|
1
|
-
|
|
1
|
+
[](https://github.com/silexlabs/Silex/stargazers)
|
|
2
|
+
[](https://github.com/silexlabs/Silex/issues)
|
|
3
|
+
[](https://github.com/silexlabs/Silex/blob/main/LICENSE)
|
|
4
|
+
[](https://github.com/silexlabs/Silex/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22)
|
|
2
5
|
|
|
3
|
-
|
|
6
|
+
# Silex — the visual builder for static sites
|
|
4
7
|
|
|
5
|
-
|
|
8
|
+
The web belongs to everyone. Silex is a free/libre visual website builder — no lock-in, no subscription, no tracking. Design visually, export clean HTML/CSS, host anywhere.
|
|
6
9
|
|
|
7
|
-
|
|
8
|
-
* [npm package for this repo](https://www.npmjs.com/package/@silexlabs/silex)
|
|
9
|
-
* [Docker image for this repo](https://hub.docker.com/r/silexlabs/silex)
|
|
10
|
-
* [Official website](https://www.silex.me/)
|
|
11
|
-
* [Road map (please help defining tasks and prioritising)](https://roadmap.silex.me)
|
|
12
|
-
* [Bug report in Github issues](https://github.com/silexlabs/Silex/issues)
|
|
13
|
-
* [Forums in Github discussions](https://community.silex.me)
|
|
14
|
-
* [Silex meta package with more source code](https://github.com/silexlabs/Silex)
|
|
10
|
+
**[Try Silex online](https://v3.silex.me/)** | **[Documentation](https://docs.silex.me)** | **[Desktop app — coming soon](https://roadmap.silex.me/posts/3/silex-desktop)** | **[Manifesto](https://www.silex.me/manifesto/)**
|
|
15
11
|
|
|
16
|
-
|
|
12
|
+

|
|
17
13
|
|
|
18
|
-
##
|
|
14
|
+
## Why Silex?
|
|
19
15
|
|
|
20
|
-
|
|
16
|
+
Most no-code tools lock you in: proprietary formats, forced hosting, subscriptions. Silex is different.
|
|
21
17
|
|
|
22
|
-
|
|
18
|
+
- **Your data is yours** — standard HTML/CSS output, export everything, host anywhere, leave anytime
|
|
19
|
+
- **Real web skills** — everything you learn in Silex (HTML, CSS, JAMstack) is transferable knowledge
|
|
20
|
+
- **Community-owned** — maintained by [Silex Labs](https://www.silexlabs.org/), a non-profit recognized as being of general interest. No investors, no exit strategy, [transparent finances](https://opencollective.com/silex)
|
|
21
|
+
- **Free forever** — always free software (AGPL), all features included, no premium tier
|
|
23
22
|
|
|
24
|
-
|
|
23
|
+
> _"The only open source alternative to Webflow."_ — _"The most powerful and graphically precise website builder that I have experienced."_
|
|
25
24
|
|
|
26
|
-
|
|
25
|
+
## Who is Silex for?
|
|
27
26
|
|
|
28
|
-
|
|
27
|
+
- **Web agencies** — visual workflow, static output, scale client work without scaling your team
|
|
28
|
+
- **WordPress developers** — visual frontend, content from WP via GraphQL, ditch the theme layer
|
|
29
|
+
- **Freelance webdesigners** — create client sites without code, export standard HTML, host anywhere
|
|
30
|
+
- **No-code developers** — go beyond Wix/Squarespace with full CSS control and no vendor lock-in
|
|
29
31
|
|
|
30
|
-
|
|
32
|
+
## Features
|
|
31
33
|
|
|
32
|
-
|
|
34
|
+
- **[GrapesJS](https://github.com/GrapesJS/grapesjs)-based visual editor** — drag-and-drop page building with HTML, CSS, and JS editors
|
|
35
|
+
- **Static HTML output** — fast, secure, easy to host anywhere
|
|
36
|
+
- **CMS integration** — bind components to WordPress, Strapi, Squidex, or any GraphQL API
|
|
37
|
+
- **[11ty](https://www.11ty.dev/) compatible** — generate static sites from Silex templates, deploy with CI/CD
|
|
38
|
+
- **Desktop app (coming soon)** — work offline, no account needed, AI-ready with built-in [MCP server](#ai--vibe-coding). Built with [Tauri](https://tauri.app/) for Windows, macOS, Linux. [Follow progress](https://roadmap.silex.me/posts/3/silex-desktop).
|
|
39
|
+
- **Plugin system** — extend with server and client plugins in JS/TS
|
|
40
|
+
- **SEO tools** — meta tags, Open Graph, per-page settings
|
|
41
|
+
- **Self-hosting** — Docker, Node.js, or one-click deploy on [CapRover](https://caprover.com/)
|
|
33
42
|
|
|
34
|
-
|
|
43
|
+
## Quick start
|
|
35
44
|
|
|
36
|
-
|
|
37
|
-
npx @silexlabs/silex
|
|
38
|
-
```
|
|
45
|
+
**Use it online** — **[v3.silex.me](https://v3.silex.me/)** (free, requires a GitLab account for storage)
|
|
39
46
|
|
|
40
|
-
|
|
47
|
+
**Desktop app (alpha)** — [download for Windows, macOS or Linux](https://github.com/silexlabs/Silex/releases/latest). Work offline, no account needed.
|
|
41
48
|
|
|
42
|
-
|
|
49
|
+
## Contribute
|
|
43
50
|
|
|
44
|
-
```
|
|
45
|
-
|
|
51
|
+
```sh
|
|
52
|
+
git clone --recurse-submodules https://github.com/silexlabs/Silex.git
|
|
53
|
+
cd Silex
|
|
54
|
+
pnpm install && pnpm build && pnpm start
|
|
46
55
|
```
|
|
47
56
|
|
|
48
|
-
|
|
57
|
+
Then open [http://localhost:6805](http://localhost:6805). For Docker and production setups, see the [self-hosting guide](https://docs.silex.me).
|
|
49
58
|
|
|
50
|
-
|
|
59
|
+
Useful links to get you contributing fast:
|
|
51
60
|
|
|
52
|
-
|
|
61
|
+
- **[Good first issues](https://github.com/silexlabs/Silex/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22)** — start here
|
|
62
|
+
- **[Contributing guide](./CONTRIBUTING.md)** — coding standards, PR process, discuss-first rule
|
|
63
|
+
- **[Community forums](https://community.silex.me)** — ask questions, share ideas
|
|
64
|
+
- **[Chat](https://short.silex.me/chat)** — quick help
|
|
65
|
+
- **[Bug reports](https://github.com/silexlabs/Silex/issues)**
|
|
66
|
+
- **[AI-assisted coding](AGENTS.md)** — setup guide for Claude Code, Cursor, opencode, etc.
|
|
53
67
|
|
|
54
|
-
|
|
55
|
-
yarn add -D @silexlabs/silex
|
|
56
|
-
```
|
|
68
|
+
## AI / Vibe coding
|
|
57
69
|
|
|
58
|
-
|
|
70
|
+
> Design websites with AI — open, local, yours. [Learn more](https://www.silex.me/ai/)
|
|
59
71
|
|
|
60
|
-
|
|
61
|
-
{
|
|
62
|
-
"scripts": {
|
|
63
|
-
"start": "silex"
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
```
|
|
72
|
+
The upcoming Silex Desktop app will let you create and transform sites through prompts: describe what you want, see it built live, refine the design in real time, publish clean HTML/CSS anywhere.
|
|
67
73
|
|
|
68
|
-
|
|
74
|
+
Silex uses [MCP](https://modelcontextprotocol.io/) (Model Context Protocol), an open standard — so you choose your AI. Run a local model with [Ollama](https://ollama.com/) for full privacy, or use any MCP-compatible tool: [OpenCode](https://opencode.ai/), [Goose](https://goose-docs.ai/), Claude Code, etc. The MCP server is optimized for small local models (7B+).
|
|
69
75
|
|
|
70
|
-
|
|
76
|
+
See the [vibe coding roadmap](https://roadmap.silex.me/posts/65/vibe-coding-with-silex-desktop) for what's coming (prompt library, examples cookbook, best practices guide — contributions welcome).
|
|
71
77
|
|
|
72
|
-
|
|
78
|
+
### MCP setup (for developers)
|
|
73
79
|
|
|
74
|
-
|
|
75
|
-
|
|
80
|
+
Once Silex Desktop is running, connect your AI tool to:
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
http://localhost:6807/mcp
|
|
76
84
|
```
|
|
77
85
|
|
|
78
|
-
|
|
86
|
+
**[OpenCode](https://opencode.ai/)** — add an MCP server in your [config file](https://opencode.ai/docs/mcp-servers) with URL `http://localhost:6807/mcp`.
|
|
79
87
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
88
|
+
**[Goose](https://goose-docs.ai/)** — add a remote server in your [profile config](https://goose-docs.ai/docs/getting-started/using-extensions#remote-extensions-over-streamable-http) with endpoint `http://localhost:6807/mcp`.
|
|
89
|
+
|
|
90
|
+
**Claude Code** — `claude mcp add --transport http silex http://localhost:6807/mcp`
|
|
91
|
+
|
|
92
|
+
**Any other MCP client** — use a Streamable HTTP transport pointed at the same URL.
|
|
93
|
+
|
|
94
|
+
## Contributors
|
|
95
|
+
|
|
96
|
+
Silex is the work of contributors from all over the world. This project is maintained by [Alex Hoyau](https://lexoyo.me) and owned by the non-profit [Silex Labs](https://www.silexlabs.org/)
|
|
97
|
+
|
|
98
|
+
<!-- Auto generated contributors -->
|
|
99
|
+
|
|
100
|
+
**2026** — [Alex Hoyau](https://github.com/lexoyo), [Ola Mohamed](https://github.com/ola-a11y), [Syed Ishmum Ahnaf](https://github.com/SyedIshmumAhnaf), [Safal2004](https://github.com/Safal2004), [Wassim Triki](https://github.com/wassim-triki)
|
|
101
|
+
|
|
102
|
+
**2025** — [Alex Hoyau](https://github.com/lexoyo), [ceubri](https://github.com/ceubri), [Mazen Kamal](https://github.com/Mazen050), Piotr Golebiewski, [oliviermgx](https://github.com/oliviermgx)
|
|
103
|
+
|
|
104
|
+
**2024** — [Alex Hoyau](https://github.com/lexoyo), [oliviermgx](https://github.com/oliviermgx), [JeremyZXi](https://github.com/JeremyZXi), [SuperDelphi](https://github.com/SuperDelphi)
|
|
105
|
+
|
|
106
|
+
**2023** — [Alex Hoyau](https://github.com/lexoyo), [Eskeminha](https://github.com/Eskeminha), [Ari Karageorgos](https://github.com/arisk)
|
|
107
|
+
|
|
108
|
+
**2022** — [Alex Hoyau](https://github.com/lexoyo), [Khaled Bentoumi](https://github.com/BentoumiTech)
|
|
109
|
+
|
|
110
|
+
**2021** — [Alex Hoyau](https://github.com/lexoyo)
|
|
111
|
+
|
|
112
|
+
**2020** — [Alex Hoyau](https://github.com/lexoyo)
|
|
113
|
+
|
|
114
|
+
**2019** — [Alex Hoyau](https://github.com/lexoyo)
|
|
115
|
+
|
|
116
|
+
**2018** — [Alex Hoyau](https://github.com/lexoyo), [Jean-Baptiste Richardet](https://github.com/JbIPS), [jotakar](https://github.com/jotakar), [swakarm](https://github.com/swakarm)
|
|
117
|
+
|
|
118
|
+
**2017** — [Alex Hoyau](https://github.com/lexoyo), [Jean-Baptiste Richardet](https://github.com/JbIPS), [Jenn Parker](https://github.com/jennparker), [Rapenne Solène](https://github.com/rapenne-s), [tariqbenezza](https://github.com/tariqbenezza), [singchan](https://github.com/singchan)
|
|
119
|
+
|
|
120
|
+
**2016** — [Alex Hoyau](https://github.com/lexoyo), [singchan](https://github.com/singchan), [Pierre Ozoux](https://github.com/pierreozoux)
|
|
121
|
+
|
|
122
|
+
**2015** — [Alex Hoyau](https://github.com/lexoyo), [singchan](https://github.com/singchan), [Christophe](https://github.com/ondrejec), [Pierre Ozoux](https://github.com/pierreozoux), [René Föhring](https://github.com/rrrene), [christian-bromann](https://github.com/christian-bromann)
|
|
123
|
+
|
|
124
|
+
**2014** — [Alex Hoyau](https://github.com/lexoyo), [Camille Gérard-Hirne](https://github.com/camcrock), [neocorp64](https://github.com/NeoCorp), Michele Martone, [peoslaap](https://github.com/peoslaap)
|
|
83
125
|
|
|
84
|
-
|
|
126
|
+
**2013** — [Alex Hoyau](https://github.com/lexoyo), Yann Le Scouarnec, TheCause, yanhick, Thomas Fetiveau
|
|
85
127
|
|
|
86
|
-
To contribute to this project:
|
|
87
128
|
|
|
88
|
-
1. **Clone the Repository**:
|
|
89
|
-
```bash
|
|
90
|
-
git clone https://github.com/silexlabs/silex-lib.git
|
|
91
|
-
cd silex-lib
|
|
92
|
-
```
|
|
93
129
|
|
|
94
|
-
|
|
95
|
-
```bash
|
|
96
|
-
yarn install
|
|
97
|
-
```
|
|
130
|
+
<!-- Auto generated contributors -->
|
|
98
131
|
|
|
99
|
-
|
|
100
|
-
```bash
|
|
101
|
-
yarn run build
|
|
102
|
-
```
|
|
132
|
+
## Links
|
|
103
133
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
134
|
+
- [Official website](https://www.silex.me/)
|
|
135
|
+
- [Manifesto](https://www.silex.me/manifesto/) — our values and commitments
|
|
136
|
+
- [User documentation](https://docs.silex.me/)
|
|
137
|
+
- [Developer documentation](https://docs.silex.me/en/dev)
|
|
138
|
+
- [Road map](https://roadmap.silex.me) — help define tasks and priorities
|
|
139
|
+
- [Community forums](https://community.silex.me)
|
|
140
|
+
- [Newsletter (EN)](https://short.silex.me/news_en) | [(FR)](https://short.silex.me/news_fr)
|
|
141
|
+
- [OpenCollective](https://opencollective.com/silex) — financial contributions
|
|
108
142
|
|
|
109
|
-
##
|
|
143
|
+
## Built on
|
|
110
144
|
|
|
111
|
-
|
|
145
|
+
Silex stands on the shoulders of these open-source projects and their communities:
|
|
112
146
|
|
|
113
|
-
|
|
147
|
+
- [GrapesJS](https://github.com/GrapesJS/grapesjs) — front-end drag-and-drop framework
|
|
148
|
+
- [11ty (Eleventy)](https://www.11ty.dev/) — static site generator used for CMS integration
|
|
149
|
+
- [Tauri](https://tauri.app/) — desktop app framework (Rust + WebView)
|
|
150
|
+
- [TypeScript](https://www.typescriptlang.org/) — language used across packages
|
|
114
151
|
|
|
115
|
-
|
|
152
|
+
## Funding
|
|
116
153
|
|
|
117
|
-
|
|
154
|
+
An [OW2 project](https://projects.ow2.org/view/silex/), funded by the [NGI0 Commons Fund](https://www.silex.me/nlnet), supported by its [sponsors and volunteers](https://opencollective.com/silex).
|
|
118
155
|
|
|
119
|
-
|
|
156
|
+
## Credits
|
|
120
157
|
|
|
121
|
-
|
|
158
|
+
Brought to you since 2009 by [Alex Hoyau](https://lexoyo.me) and the Silex community.
|
|
122
159
|
|
|
123
|
-
[
|
|
160
|
+
Silex is free/libre software. [Join the community](https://community.silex.me/), [contribute](./CONTRIBUTING.md), [donate](https://opencollective.com/silex), or [report bugs](https://github.com/silexlabs/Silex/issues).
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import {describe, expect, test, beforeEach, jest,} from '@jest/globals'
|
|
2
|
+
|
|
3
|
+
// ESM module mocking: unstable_mockModule must run before the module under test
|
|
4
|
+
// is imported, hence the dynamic import of ./config below.
|
|
5
|
+
const PLUGIN_RESULT = { test: 'any value?', }
|
|
6
|
+
const loadPlugins = jest.fn<(...args: unknown[]) => Promise<unknown>>().mockResolvedValue(PLUGIN_RESULT)
|
|
7
|
+
jest.unstable_mockModule('./plugin', () => ({
|
|
8
|
+
loadPlugins,
|
|
9
|
+
}))
|
|
10
|
+
const { default: config } = await import('./config')
|
|
11
|
+
|
|
12
|
+
describe('Config test', () => {
|
|
13
|
+
let instance
|
|
14
|
+
let empty
|
|
15
|
+
beforeEach(() => {
|
|
16
|
+
loadPlugins.mockClear()
|
|
17
|
+
expect(config).not.toBeUndefined()
|
|
18
|
+
instance = config('..')
|
|
19
|
+
empty = config('..')
|
|
20
|
+
expect(instance).not.toBeUndefined()
|
|
21
|
+
})
|
|
22
|
+
test('Test add a single plugin', async () => {
|
|
23
|
+
const plugin = {
|
|
24
|
+
require: 'examples/plugin.js',
|
|
25
|
+
type: ['test',],
|
|
26
|
+
active: true,
|
|
27
|
+
hidden: false,
|
|
28
|
+
options: {},
|
|
29
|
+
}
|
|
30
|
+
const result = await instance.addPlugin(plugin)
|
|
31
|
+
// Check that the config includes the plugin result
|
|
32
|
+
expect(result).toBe(instance)
|
|
33
|
+
expect(instance).toEqual({
|
|
34
|
+
...empty,
|
|
35
|
+
...PLUGIN_RESULT,
|
|
36
|
+
})
|
|
37
|
+
// Check the loadPlugins calls
|
|
38
|
+
expect(loadPlugins.mock.calls).toHaveLength(1)
|
|
39
|
+
expect(loadPlugins.mock.calls[0][0]).toBe(instance)
|
|
40
|
+
expect(loadPlugins.mock.calls[0][1]).toBeInstanceOf(Array)
|
|
41
|
+
expect(loadPlugins.mock.calls[0][1][0]).toBe(plugin)
|
|
42
|
+
})
|
|
43
|
+
test('Test add multiple plugins', async () => {
|
|
44
|
+
const plugin1 = {
|
|
45
|
+
require: 'examples/plugin.js',
|
|
46
|
+
type: ['test',],
|
|
47
|
+
active: true,
|
|
48
|
+
hidden: false,
|
|
49
|
+
options: {},
|
|
50
|
+
}
|
|
51
|
+
const plugin2 = { ...plugin1, }
|
|
52
|
+
await instance.addPlugin([plugin1, plugin2,])
|
|
53
|
+
// Check the loadPlugins calls
|
|
54
|
+
expect(loadPlugins.mock.calls).toHaveLength(1)
|
|
55
|
+
expect(loadPlugins.mock.calls[0][0]).toBe(instance)
|
|
56
|
+
expect(loadPlugins.mock.calls[0][1]).toBeInstanceOf(Array)
|
|
57
|
+
expect(loadPlugins.mock.calls[0][1][0]).toBe(plugin1)
|
|
58
|
+
expect(loadPlugins.mock.calls[0][1][1]).toBe(plugin2)
|
|
59
|
+
})
|
|
60
|
+
test('Test events', async () => {
|
|
61
|
+
const cbk = jest.fn()
|
|
62
|
+
const params = 'test params'
|
|
63
|
+
const eventName = 'test:event'
|
|
64
|
+
instance.on(eventName, cbk)
|
|
65
|
+
instance.on(eventName, cbk)
|
|
66
|
+
instance.emit(eventName, params)
|
|
67
|
+
instance.emit(eventName, params)
|
|
68
|
+
expect(cbk).toHaveBeenCalledTimes(4)
|
|
69
|
+
expect(cbk).toHaveBeenLastCalledWith(params)
|
|
70
|
+
})
|
|
71
|
+
})
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Plugin, loadPlugins, } from './plugin.js'
|
|
2
|
+
import EventEmitter from 'component-emitter'
|
|
3
|
+
|
|
4
|
+
export default function( baseUrl: string = null) {
|
|
5
|
+
return new Config(baseUrl)
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export class Config extends EventEmitter {
|
|
9
|
+
constructor(public baseUrl: string = null) {
|
|
10
|
+
super()
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Add one or multiple plugins
|
|
15
|
+
* @param plugin One or more plugin definition object
|
|
16
|
+
* @param options An object containing the plugin options or each plugin options in `options[pluginName]`
|
|
17
|
+
* @returns A Config object which merges the objects returned by the plugin(s)
|
|
18
|
+
*/
|
|
19
|
+
public async addPlugin(plugin: Plugin | Plugin[], options: object) {
|
|
20
|
+
// Load plugin if necessary
|
|
21
|
+
const result = await loadPlugins(this, [].concat(plugin), options, this.baseUrl)
|
|
22
|
+
Object.assign(this, result)
|
|
23
|
+
return this
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import {describe, expect, test, jest, } from '@jest/globals'
|
|
2
|
+
import { loadPlugins, Plugin, } from './plugin'
|
|
3
|
+
import { Config, } from '.'
|
|
4
|
+
|
|
5
|
+
const TEST_VALUE = {test: 'example',}
|
|
6
|
+
const FAKE_CONFIG = {} as Config
|
|
7
|
+
|
|
8
|
+
describe('Plugins test', () => {
|
|
9
|
+
test('Test loading 0 plugins', async () => {
|
|
10
|
+
const result = await loadPlugins(FAKE_CONFIG, [], {})
|
|
11
|
+
expect(result).toEqual({})
|
|
12
|
+
})
|
|
13
|
+
test('Load 1 plugin with just its options', async () => {
|
|
14
|
+
const plugin = jest.fn().mockResolvedValue(TEST_VALUE)
|
|
15
|
+
const option = {test: 'option directly in the option object',}
|
|
16
|
+
const result = await loadPlugins(FAKE_CONFIG, [plugin,], option)
|
|
17
|
+
expect(result).toEqual(TEST_VALUE)
|
|
18
|
+
expect(plugin.mock.calls).toHaveLength(1)
|
|
19
|
+
expect(plugin.mock.calls[0][0]).toBe(FAKE_CONFIG)
|
|
20
|
+
expect(plugin.mock.calls[0][1]).toBe(option)
|
|
21
|
+
})
|
|
22
|
+
test('Test loadPlugins', async () => {
|
|
23
|
+
const plugin = '../examples/plugin.js' as Plugin
|
|
24
|
+
const options = {}
|
|
25
|
+
const result = await loadPlugins(FAKE_CONFIG, [plugin,], options)
|
|
26
|
+
expect(result).toEqual(TEST_VALUE)
|
|
27
|
+
})
|
|
28
|
+
test('Add a function plugin', async () => {
|
|
29
|
+
const option = {}
|
|
30
|
+
const plugin = jest.fn().mockResolvedValue(TEST_VALUE)
|
|
31
|
+
const result = await loadPlugins(FAKE_CONFIG, [plugin,], {[plugin.toString()]: option,})
|
|
32
|
+
// Check that the config includes the plugin result
|
|
33
|
+
expect(result).toEqual(TEST_VALUE)
|
|
34
|
+
|
|
35
|
+
// Check the plugin calls
|
|
36
|
+
// loadPlugins is called because of the mock
|
|
37
|
+
expect(plugin.mock.calls).toHaveLength(1)
|
|
38
|
+
expect(plugin.mock.calls[0][0]).toBe(FAKE_CONFIG)
|
|
39
|
+
expect(plugin.mock.calls[0][1]).toBe(option)
|
|
40
|
+
})
|
|
41
|
+
test('Assync function support', async () => {
|
|
42
|
+
const option = {}
|
|
43
|
+
async function wait(ms = 100) {
|
|
44
|
+
return new Promise(resolve => setTimeout(resolve, ms))
|
|
45
|
+
}
|
|
46
|
+
let done = false
|
|
47
|
+
async function plugin() {
|
|
48
|
+
await wait(100)
|
|
49
|
+
done = true
|
|
50
|
+
return TEST_VALUE
|
|
51
|
+
}
|
|
52
|
+
loadPlugins(FAKE_CONFIG, [plugin,], {[plugin.toString()]: option,})
|
|
53
|
+
expect(done).toBe(false)
|
|
54
|
+
await wait(200)
|
|
55
|
+
expect(done).toBe(true)
|
|
56
|
+
})
|
|
57
|
+
})
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { Config, } from './config.js'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Plugin type
|
|
5
|
+
*/
|
|
6
|
+
export type Plugin = ((config: Config, options?: object) => object) | Promise<(config: Config, options?: object) => object> | string
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
*
|
|
10
|
+
* @param config The initial config object
|
|
11
|
+
* @param plugins The plugins to load
|
|
12
|
+
* @returns Merged results objects
|
|
13
|
+
*/
|
|
14
|
+
export async function loadPlugins(config: Config, plugins: Plugin[], options: object, baseUrl: string = null): Promise<Config> {
|
|
15
|
+
return Promise.all<Config>(plugins
|
|
16
|
+
// Load plugins
|
|
17
|
+
.map(async (plugin: Plugin) => {
|
|
18
|
+
const [construct, name,] = await ( async () => {
|
|
19
|
+
switch(typeof plugin) {
|
|
20
|
+
case 'function': return [plugin as (config: Config) => Config, plugin.toString(),]
|
|
21
|
+
case 'string': return [await loadPlugin<(config: Config, options: object) => Promise<Config>>(plugin, baseUrl), plugin as string,]
|
|
22
|
+
default: throw new Error(`Unknown type for plugin: ${typeof plugin}`)
|
|
23
|
+
}
|
|
24
|
+
})()
|
|
25
|
+
return construct(config, name && options ? options[name] ?? options : options) as Promise<Config>
|
|
26
|
+
}))
|
|
27
|
+
// Merge the results
|
|
28
|
+
.then((results: Config[]): Config => {
|
|
29
|
+
return results.reduce((finalConfig: Config, result: Config): Config => {
|
|
30
|
+
return {
|
|
31
|
+
...finalConfig,
|
|
32
|
+
...result,
|
|
33
|
+
} as Config
|
|
34
|
+
}, config)
|
|
35
|
+
})
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Load a plugin
|
|
40
|
+
* @param location The path, absolute, relative or online
|
|
41
|
+
* @returns The result of the plugin default function
|
|
42
|
+
*/
|
|
43
|
+
async function loadPlugin<T>(location: string, baseUrl: string): Promise<T> {
|
|
44
|
+
const path = getLocation(location, baseUrl)
|
|
45
|
+
const imported: {default?: () => void} = await dynamicImport(path)
|
|
46
|
+
const result = imported?.default ?? imported
|
|
47
|
+
return result as T
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function getLocation(urlOrPath: string, baseUrl: string = null): string {
|
|
51
|
+
try {
|
|
52
|
+
return new URL(urlOrPath, baseUrl).toString()
|
|
53
|
+
} catch {
|
|
54
|
+
return urlOrPath
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* This is isolated here for unit tests to mock it
|
|
60
|
+
* @param path The absolute path to laod
|
|
61
|
+
* @returns The loaded module
|
|
62
|
+
*/
|
|
63
|
+
async function dynamicImport<T>(path: string): Promise<T> {
|
|
64
|
+
return import(/* webpackIgnore: true */path)
|
|
65
|
+
}
|
|
@@ -4006,8 +4006,9 @@ See http://bgrins.github.io/spectrum/themes/ for instructions.
|
|
|
4006
4006
|
}
|
|
4007
4007
|
|
|
4008
4008
|
/**
|
|
4009
|
-
*
|
|
4010
|
-
*
|
|
4009
|
+
* DESIGN-SYSTEM.SCSS
|
|
4010
|
+
* The Silex editor design system (there is no theme-switching — this is THE
|
|
4011
|
+
* look): --silex-* semantic tokens + the styling of the editor's UI components.
|
|
4011
4012
|
*
|
|
4012
4013
|
* Design Philosophy:
|
|
4013
4014
|
* - Minimalisme structuré
|
|
@@ -4256,14 +4257,14 @@ textarea:focus {
|
|
|
4256
4257
|
}
|
|
4257
4258
|
|
|
4258
4259
|
.gjs-sm-property.gjs-sm-composite {
|
|
4259
|
-
background-color: rgba(
|
|
4260
|
-
border: 1px solid
|
|
4260
|
+
background-color: rgba(255, 255, 255, 0.02);
|
|
4261
|
+
border: 1px solid var(--silex-border-color);
|
|
4261
4262
|
border-radius: 6px;
|
|
4262
4263
|
padding: 8px;
|
|
4263
4264
|
margin-top: 4px;
|
|
4264
4265
|
}
|
|
4265
4266
|
.gjs-sm-property.gjs-sm-composite > .gjs-sm-label {
|
|
4266
|
-
color: var(--silex-
|
|
4267
|
+
color: var(--silex-text-secondary);
|
|
4267
4268
|
text-transform: uppercase;
|
|
4268
4269
|
font-size: 9px;
|
|
4269
4270
|
font-weight: 700;
|
|
@@ -4274,28 +4275,28 @@ textarea:focus {
|
|
|
4274
4275
|
background-color: transparent;
|
|
4275
4276
|
}
|
|
4276
4277
|
.gjs-sm-property.gjs-sm-composite .gjs-field {
|
|
4277
|
-
border-color:
|
|
4278
|
+
border-color: var(--silex-border-color);
|
|
4278
4279
|
}
|
|
4279
4280
|
|
|
4280
4281
|
.gjs-field-range input[type=range] {
|
|
4281
|
-
accent-color: var(--silex-
|
|
4282
|
+
accent-color: var(--silex-text-secondary);
|
|
4282
4283
|
}
|
|
4283
4284
|
.gjs-field-range input[type=range]::-webkit-slider-thumb {
|
|
4284
|
-
background-color: var(--silex-
|
|
4285
|
+
background-color: var(--silex-text-primary);
|
|
4285
4286
|
}
|
|
4286
4287
|
.gjs-field-range input[type=range]::-webkit-slider-runnable-track {
|
|
4287
|
-
background-color: var(--silex-
|
|
4288
|
+
background-color: var(--silex-text-secondary);
|
|
4288
4289
|
opacity: 0.4;
|
|
4289
4290
|
}
|
|
4290
4291
|
.gjs-field-range input[type=range]::-moz-range-thumb {
|
|
4291
|
-
background-color: var(--silex-
|
|
4292
|
+
background-color: var(--silex-text-primary);
|
|
4292
4293
|
}
|
|
4293
4294
|
.gjs-field-range input[type=range]::-moz-range-track {
|
|
4294
|
-
background-color: var(--silex-
|
|
4295
|
+
background-color: var(--silex-text-secondary);
|
|
4295
4296
|
opacity: 0.4;
|
|
4296
4297
|
}
|
|
4297
4298
|
.gjs-field-range input[type=range]::-moz-range-progress {
|
|
4298
|
-
background-color: var(--silex-
|
|
4299
|
+
background-color: var(--silex-text-secondary);
|
|
4299
4300
|
}
|
|
4300
4301
|
|
|
4301
4302
|
.gjs-sm-sector .gjs-sm-label {
|
|
@@ -4303,6 +4304,11 @@ textarea:focus {
|
|
|
4303
4304
|
color: var(--silex-text-secondary);
|
|
4304
4305
|
}
|
|
4305
4306
|
|
|
4307
|
+
.gjs-sm-sector .gjs-sm-label.gjs-four-color,
|
|
4308
|
+
.gjs-sm-property.gjs-sm-composite > .gjs-sm-label.gjs-four-color {
|
|
4309
|
+
color: var(--gjs-quaternary-color);
|
|
4310
|
+
}
|
|
4311
|
+
|
|
4306
4312
|
.gjs-sm-property {
|
|
4307
4313
|
margin-bottom: 2px;
|
|
4308
4314
|
}
|
|
@@ -4363,6 +4369,10 @@ textarea:focus {
|
|
|
4363
4369
|
padding: 3px 10px;
|
|
4364
4370
|
}
|
|
4365
4371
|
|
|
4372
|
+
.gjs-traits-label:empty {
|
|
4373
|
+
display: none;
|
|
4374
|
+
}
|
|
4375
|
+
|
|
4366
4376
|
.gjs-trait-category .gjs-title {
|
|
4367
4377
|
background-color: var(--silex-active-bg);
|
|
4368
4378
|
border-bottom: 1px solid var(--silex-border-color-strong);
|
|
@@ -5234,6 +5244,9 @@ details.silex-more label,
|
|
|
5234
5244
|
background-color: var(--silex-accent-secondary);
|
|
5235
5245
|
color: var(--silex-text-inverse);
|
|
5236
5246
|
}
|
|
5247
|
+
.gjs-pn-project-bar-panel .gjs-pn-buttons .gjs-pn-btn.block-manager-btn {
|
|
5248
|
+
font-size: 22px;
|
|
5249
|
+
}
|
|
5237
5250
|
.gjs-pn-project-bar-panel .logo {
|
|
5238
5251
|
background-image: url("../assets/logo-silex-small.png");
|
|
5239
5252
|
background-repeat: no-repeat;
|