@silexlabs/silex 3.0.1 → 3.0.3

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.
@@ -59,18 +59,18 @@ __________________________________________________________
59
59
 
60
60
  Create static websites visually, with dynamic content,
61
61
  in the free spirit of the web.
62
-
62
+
63
63
  ███████ ██ ██ ███████ ██ ██ ██ ██ ██████
64
64
  ██ ██ ██ ██ ██ ██ ██ ██ ██
65
65
  ███████ ██ ██ █████ ███ ██ ██ █████
66
66
  ██ ██ ██ ██ ██ ██ ██ ██ ██
67
67
  ███████ ██ ███████ ███████ ██ ██ ████ ██████ ${exports.SILEX_VERSION.slice(1)}
68
-
68
+
69
69
  Users are expected to contribute:
70
-
70
+
71
71
  * Web designers: https://docs.silex.me/en/user/contribute
72
72
  * Developers: https://docs.silex.me/en/dev/contribute
73
-
73
+
74
74
  __________________________________________________________
75
75
  `;
76
76
  //# sourceMappingURL=constants.js.map
@@ -39,17 +39,17 @@ __________________________________________________________
39
39
 
40
40
  Create static websites visually, with dynamic content,
41
41
  in the free spirit of the web.
42
-
42
+
43
43
  ███████ ██ ██ ███████ ██ ██ ██ ██ ██████
44
44
  ██ ██ ██ ██ ██ ██ ██ ██ ██
45
45
  ███████ ██ ██ █████ ███ ██ ██ █████
46
46
  ██ ██ ██ ██ ██ ██ ██ ██ ██
47
47
  ███████ ██ ███████ ███████ ██ ██ ████ ██████ ${exports.SILEX_VERSION.slice(1)}
48
-
48
+
49
49
  Users are expected to contribute:
50
-
50
+
51
51
  * Web designers: https://docs.silex.me/en/user/contribute
52
52
  * Developers: https://docs.silex.me/en/dev/contribute
53
-
53
+
54
54
  __________________________________________________________
55
55
  `;
@@ -71,9 +71,7 @@ async function silex() {
71
71
  await config.initDefaultConnectors();
72
72
  app.use('/api', (0, api_1.default)(config));
73
73
  await silexApp.start(app);
74
- console.info(`
75
- I'm ready, listening to port ${config.port}
76
- `);
74
+ console.info(`\nSilex is ready, open http://localhost:${config.port} in your browser\n`);
77
75
  if (config.debug) {
78
76
  startLiverReload();
79
77
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@silexlabs/silex",
3
3
  "description": "Free and easy website builder for everyone.",
4
- "version": "3.0.1",
4
+ "version": "3.0.3",
5
5
  "version:backwardcompat": "3.0.0",
6
6
  "author": {
7
7
  "name": "Alex Hoyau",
@@ -133,7 +133,6 @@
133
133
  "grapesjs": "^0.21.13",
134
134
  "grapesjs-blocks-basic": "1.0.2",
135
135
  "grapesjs-custom-code": "1.0.2",
136
- "grapesjs-navbar": "^1.0.2",
137
136
  "grapesjs-plugin-forms": "2.0.6",
138
137
  "grapesjs-style-bg": "^2.0.2",
139
138
  "grapesjs-style-border": "1.0.4",
@@ -32,7 +32,6 @@ import blocksBasicPlugin from 'grapesjs-blocks-basic'
32
32
  import styleFilterPlugin from 'grapesjs-style-filter'
33
33
  import formPlugin from 'grapesjs-plugin-forms'
34
34
  import codePlugin from 'grapesjs-custom-code'
35
- import navbarPlugin from 'grapesjs-navbar'
36
35
  import uiSuggestClasses from '@silexlabs/grapesjs-ui-suggest-classes'
37
36
  import filterStyles from '@silexlabs/grapesjs-filter-styles'
38
37
  import symbolsPlugin from '@silexlabs/grapesjs-symbols'
@@ -101,7 +100,6 @@ const plugins = [
101
100
  {name: './resize-panel', value: resizePanelPlugin},
102
101
  {name: '@silexlabs/grapesjs-notifications', value: notificationsPlugin},
103
102
  {name: '@silexlabs/grapesjs-keymaps-dialog', value: keymapsDialogPlugin},
104
- {name: 'grapesjs-navbar', value:navbarPlugin}
105
103
  ]
106
104
  // Check that all plugins are loaded correctly
107
105
  plugins
@@ -360,11 +358,6 @@ export function getEditorConfig(config: ClientConfig): EditorConfig {
360
358
  longPressDuration: null,
361
359
  shortcut: 'shift+h',
362
360
  },
363
- [navbarPlugin.toString()]:{
364
- block:{
365
- category: 'Components'
366
- }
367
- }
368
361
  },
369
362
  }
370
363
  }
@@ -139,26 +139,26 @@ describe('publication-transformers', () => {
139
139
  })
140
140
 
141
141
  it('should transform a style rule with background image', () => {
142
- expect(transformBgImage(editor, { 'background-image': 'url(test.png)' })).toEqual({ 'background-image': 'url(test.png)' })
142
+ expect(transformBgImage(editor, { 'background-image': 'url(test.png)' })).toEqual({ 'background-image': 'url("test.png")' })
143
143
  const transformPermalink = transformer.transformPermalink as Mock
144
144
  const transformedSrc = 'transformed.png'
145
145
  const transformedSrc2 = 'transformed2.png'
146
146
  transformPermalink.mockImplementation((url, type) => (url as string).replace('test.png', transformedSrc).replace('test2.png', transformedSrc2))
147
- expect(transformBgImage(editor, { 'background-image': 'url(test.png)' })).toEqual({ 'background-image': `url(${transformedSrc})` })
148
- expect(transformBgImage(editor, { 'background-image': 'url("test.png")' })).toEqual({ 'background-image': `url(${transformedSrc})` })
147
+ expect(transformBgImage(editor, { 'background-image': 'url(test.png)' })).toEqual({ 'background-image': `url("${transformedSrc}")` })
148
+ expect(transformBgImage(editor, { 'background-image': 'url("test.png")' })).toEqual({ 'background-image': `url("${transformedSrc}")` })
149
149
  expect(transformBgImage(editor, {
150
150
  'background-image': 'linear-gradient(to right, rgb(30 75 115 / 100%), url(test.png), linear-gradient(to left, rgb(30 75 115 / 10%), url(test2.png), rgb(255 255 255 / 0%));',
151
151
  })).toEqual({
152
- 'background-image': `linear-gradient(to right, rgb(30 75 115 / 100%), url(${transformedSrc}), linear-gradient(to left, rgb(30 75 115 / 10%), url(${transformedSrc2}), rgb(255 255 255 / 0%));`,
152
+ 'background-image': `linear-gradient(to right, rgb(30 75 115 / 100%), url("${transformedSrc}"), linear-gradient(to left, rgb(30 75 115 / 10%), url("${transformedSrc2}"), rgb(255 255 255 / 0%));`,
153
153
  })
154
154
  })
155
155
 
156
156
  it('should transform permalinks of background images in inline css', () => {
157
157
  const el = document.createElement('div')
158
158
  const [comp] = editor.addComponents(el)
159
- comp.setStyle({ 'background-image': 'url(test.png)' })
159
+ comp.setStyle({ 'background-image': 'url("test.png")' })
160
160
  //editor.addComponents(`
161
- // <div style="color: black; background-image: url(test.png);"></div>
161
+ // <div style="color: black; background-image: url("test.png");"></div>
162
162
  //`)
163
163
  const transformPermalink = transformer.transformPermalink as Mock
164
164
  const transformedSrc = 'transformed.png'
@@ -168,7 +168,7 @@ describe('publication-transformers', () => {
168
168
  expect(transformPermalink).toBeCalledTimes(1)
169
169
  expect(transformPermalink.mock.calls[0][0]).toBe('test.png')
170
170
  expect(transformPermalink.mock.calls[0][1]).toBe('asset')
171
- expect(css).toContain('url(test.png)')
171
+ expect(css).toContain('url("test.png")')
172
172
  })
173
173
  it('should transform permalinks of background images in styles', () => {
174
174
  editor.addComponents(`
@@ -176,7 +176,7 @@ describe('publication-transformers', () => {
176
176
  `)
177
177
  editor.addStyle(`
178
178
  .test {
179
- background-image: url(test.png);
179
+ background-image: url("test.png");
180
180
  }
181
181
  `)
182
182
  const transformPermalink = transformer.transformPermalink as Mock
@@ -187,7 +187,7 @@ describe('publication-transformers', () => {
187
187
  expect(transformPermalink).toBeCalledTimes(1)
188
188
  expect(transformPermalink.mock.calls[0][0]).toBe('test.png')
189
189
  expect(transformPermalink.mock.calls[0][1]).toBe('asset')
190
- expect(css).toContain(`url(${transformedSrc})`)
190
+ expect(css).toContain(`url("${transformedSrc}")`)
191
191
  })
192
192
  it('should transform links to pages to match permalinks ', () => {
193
193
  editor.addComponents(`
@@ -188,7 +188,7 @@ function doTransformPermalink(editor: Editor, cssValue: string): string {
188
188
  // Transform URLs
189
189
  const newUrl = transformPermalink(editor, cleanUrl, ClientSideFileType.ASSET, Initiator.CSS)
190
190
  // Return the new URL with url keyword
191
- return `url(${newUrl})`
191
+ return `url("${newUrl}")`
192
192
  })
193
193
  }
194
194
 
@@ -67,17 +67,17 @@ __________________________________________________________
67
67
 
68
68
  Create static websites visually, with dynamic content,
69
69
  in the free spirit of the web.
70
-
70
+
71
71
  ███████ ██ ██ ███████ ██ ██ ██ ██ ██████
72
72
  ██ ██ ██ ██ ██ ██ ██ ██ ██
73
73
  ███████ ██ ██ █████ ███ ██ ██ █████
74
74
  ██ ██ ██ ██ ██ ██ ██ ██ ██
75
75
  ███████ ██ ███████ ███████ ██ ██ ████ ██████ ${SILEX_VERSION.slice(1)}
76
-
76
+
77
77
  Users are expected to contribute:
78
-
78
+
79
79
  * Web designers: https://docs.silex.me/en/user/contribute
80
80
  * Developers: https://docs.silex.me/en/dev/contribute
81
-
81
+
82
82
  __________________________________________________________
83
83
  `
@@ -79,9 +79,7 @@ export default async function silex() {
79
79
  await silexApp.start(app)
80
80
 
81
81
  // All good, server is ready
82
- console.info(`
83
- I'm ready, listening to port ${config.port}
84
- `)
82
+ console.info(`\nSilex is ready, open http://localhost:${config.port} in your browser\n`)
85
83
  if (config.debug) {
86
84
  startLiverReload()
87
85
  }