@silexlabs/silex 3.0.0-alpha.40 → 3.0.0-alpha.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (152) hide show
  1. package/.silex.js +29 -8
  2. package/dist/client/client/api.d.ts +83 -0
  3. package/dist/client/client/config.d.ts +12 -42
  4. package/dist/client/client/expose.d.ts +6 -0
  5. package/dist/client/client/grapesjs/LoginDialog.d.ts +14 -0
  6. package/dist/client/client/grapesjs/PublicationManager.d.ts +75 -0
  7. package/dist/client/client/grapesjs/PublicationUi.d.ts +61 -0
  8. package/dist/client/client/grapesjs/index.d.ts +18 -44
  9. package/dist/client/client/grapesjs/openImport.d.ts +5 -0
  10. package/dist/client/client/grapesjs/storage.d.ts +1 -0
  11. package/dist/client/constants.d.ts +26 -0
  12. package/dist/client/css/admin.css +86 -3
  13. package/dist/client/events.d.ts +8 -0
  14. package/dist/client/js/main.js +202 -112
  15. package/dist/client/js/main.js.LICENSE.txt +1 -1
  16. package/dist/client/page.d.ts +1 -1
  17. package/dist/client/types.d.ts +246 -36
  18. package/dist/plugins/client/client/utils.d.ts +1 -0
  19. package/dist/plugins/client/client/utils.js +25 -0
  20. package/dist/plugins/client/client/utils.js.map +1 -0
  21. package/dist/plugins/client/events.d.ts +10 -0
  22. package/dist/plugins/client/events.js +27 -0
  23. package/dist/plugins/client/events.js.map +1 -0
  24. package/dist/plugins/client/plugins/client/template.d.ts +2 -0
  25. package/dist/plugins/client/plugins/client/template.js +186 -0
  26. package/dist/plugins/client/plugins/client/template.js.map +1 -0
  27. package/dist/plugins/server/constants.d.ts +30 -0
  28. package/dist/plugins/server/constants.js +50 -0
  29. package/dist/plugins/server/constants.js.map +1 -0
  30. package/dist/plugins/server/events.d.ts +10 -0
  31. package/dist/plugins/server/events.js +30 -0
  32. package/dist/plugins/server/events.js.map +1 -0
  33. package/dist/plugins/server/plugins/server/AuthPlugin.d.ts +1 -0
  34. package/dist/plugins/server/plugins/server/AuthPlugin.js +38 -0
  35. package/dist/plugins/server/plugins/server/AuthPlugin.js.map +1 -0
  36. package/dist/plugins/server/plugins/server/Cache.d.ts +2 -0
  37. package/dist/plugins/server/plugins/server/Cache.js +32 -0
  38. package/dist/plugins/server/plugins/server/Cache.js.map +1 -0
  39. package/dist/plugins/server/plugins/server/FtpConnector.d.ts +94 -0
  40. package/dist/plugins/server/plugins/server/FtpConnector.js +521 -0
  41. package/dist/plugins/server/plugins/server/FtpConnector.js.map +1 -0
  42. package/dist/plugins/server/plugins/server/HooksPlugin.d.ts +7 -0
  43. package/dist/plugins/server/plugins/server/HooksPlugin.js +74 -0
  44. package/dist/plugins/server/plugins/server/HooksPlugin.js.map +1 -0
  45. package/dist/plugins/server/plugins/server/SslPlugin.d.ts +1 -0
  46. package/dist/plugins/server/plugins/server/SslPlugin.js +86 -0
  47. package/dist/plugins/server/plugins/server/SslPlugin.js.map +1 -0
  48. package/dist/plugins/server/plugins/server/StaticPlugin.d.ts +1 -0
  49. package/dist/plugins/server/plugins/server/StaticPlugin.js +71 -0
  50. package/dist/plugins/server/plugins/server/StaticPlugin.js.map +1 -0
  51. package/dist/plugins/server/server/config.d.ts +59 -0
  52. package/dist/plugins/server/server/config.js +184 -0
  53. package/dist/plugins/server/server/config.js.map +1 -0
  54. package/dist/plugins/server/server/connectors/FsHosting.d.ts +13 -0
  55. package/dist/plugins/server/server/connectors/FsHosting.js +55 -0
  56. package/dist/plugins/server/server/connectors/FsHosting.js.map +1 -0
  57. package/dist/plugins/server/server/connectors/FsStorage.d.ts +40 -0
  58. package/dist/plugins/server/server/connectors/FsStorage.js +237 -0
  59. package/dist/plugins/server/server/connectors/FsStorage.js.map +1 -0
  60. package/dist/plugins/server/server/connectors/connectors.d.ts +83 -0
  61. package/dist/plugins/server/server/connectors/connectors.js +98 -0
  62. package/dist/plugins/server/server/connectors/connectors.js.map +1 -0
  63. package/dist/plugins/server/server/jobs.d.ts +6 -0
  64. package/dist/plugins/server/server/jobs.js +75 -0
  65. package/dist/plugins/server/server/jobs.js.map +1 -0
  66. package/dist/plugins/server/server/utils/validation.d.ts +7 -0
  67. package/dist/plugins/server/server/utils/validation.js +38 -0
  68. package/dist/plugins/server/server/utils/validation.js.map +1 -0
  69. package/dist/plugins/server/types.d.ts +309 -0
  70. package/dist/plugins/server/types.js +52 -0
  71. package/dist/plugins/server/types.js.map +1 -0
  72. package/dist/server/constants.js +30 -0
  73. package/dist/server/events.js +13 -0
  74. package/dist/server/plugins/server/Cache.js +15 -0
  75. package/dist/server/server/api/api.js +20 -0
  76. package/dist/server/server/api/connectorApi.js +200 -0
  77. package/dist/server/server/api/publicationApi.js +116 -0
  78. package/dist/server/server/api/websiteApi.js +288 -0
  79. package/dist/server/{cli.js → server/cli.js} +1 -1
  80. package/dist/server/server/config.js +124 -0
  81. package/dist/server/server/connectors/FsHosting.js +37 -0
  82. package/dist/server/server/connectors/FsStorage.js +208 -0
  83. package/dist/server/server/connectors/connectors.js +65 -0
  84. package/dist/server/server/express.js +47 -0
  85. package/dist/server/{index.js → server/index.js} +10 -18
  86. package/dist/server/server/jobs.js +47 -0
  87. package/dist/server/server/utils/validation.js +15 -0
  88. package/dist/server/types.js +19 -0
  89. package/package.json +35 -14
  90. package/public/silex.js +17 -0
  91. package/src/css/dialog.scss +9 -2
  92. package/src/css/grapesjs.scss +79 -0
  93. package/src/css/project-bar.scss +2 -2
  94. package/src/example-client-config.js +17 -0
  95. package/src/html/templates/includes.pug +0 -1
  96. package/src/ts/client/api.ts +135 -0
  97. package/src/ts/client/config.ts +7 -6
  98. package/src/ts/client/expose.ts +11 -0
  99. package/src/ts/client/grapesjs/LoginDialog.ts +191 -0
  100. package/src/ts/client/grapesjs/PublicationManager.ts +307 -0
  101. package/src/ts/client/grapesjs/PublicationUi.ts +330 -0
  102. package/src/ts/client/grapesjs/eleventy.ts +4 -1
  103. package/src/ts/client/grapesjs/index.ts +79 -89
  104. package/src/ts/client/grapesjs/openImport.ts +5 -0
  105. package/src/ts/client/grapesjs/storage.ts +114 -0
  106. package/src/ts/client/index.ts +16 -13
  107. package/src/ts/constants.ts +31 -0
  108. package/src/ts/events.ts +8 -0
  109. package/src/ts/page.ts +1 -1
  110. package/src/ts/plugins/client/template.ts +196 -0
  111. package/src/ts/plugins/server/AuthPlugin.ts +38 -0
  112. package/src/ts/plugins/server/Cache.ts +28 -0
  113. package/src/ts/plugins/server/FtpConnector.ts +602 -0
  114. package/src/{plugins/HooksPlugin.js → ts/plugins/server/HooksPlugin.ts} +29 -10
  115. package/src/ts/plugins/server/SslPlugin.ts +84 -0
  116. package/src/ts/plugins/server/StaticPlugin.ts +72 -0
  117. package/src/ts/server/api/api.ts +19 -0
  118. package/src/ts/server/api/connectorApi.ts +322 -0
  119. package/src/ts/server/api/publicationApi.ts +179 -0
  120. package/src/ts/server/api/websiteApi.ts +397 -0
  121. package/src/ts/server/cli.ts +1 -1
  122. package/src/ts/server/config.ts +117 -36
  123. package/src/ts/server/connectors/FsHosting.ts +60 -0
  124. package/src/ts/server/connectors/FsStorage.ts +236 -0
  125. package/src/ts/server/connectors/connectors.ts +171 -0
  126. package/src/ts/server/express.ts +38 -3
  127. package/src/ts/server/index.ts +25 -15
  128. package/src/ts/server/jobs.test.ts +75 -0
  129. package/src/ts/server/jobs.ts +77 -0
  130. package/src/ts/server/utils/BackwardCompat.ts +1 -1
  131. package/src/ts/server/utils/validation.ts +34 -0
  132. package/src/ts/types.ts +203 -63
  133. package/dist/client/client/grapesjs/eleventy.d.ts +0 -1
  134. package/dist/client/client/grapesjs/publish.d.ts +0 -18
  135. package/dist/client/client/grapesjs/template.d.ts +0 -1
  136. package/dist/constants.js +0 -4
  137. package/dist/events.js +0 -5
  138. package/dist/page.js +0 -15
  139. package/dist/server/config.js +0 -70
  140. package/dist/server/express.js +0 -18
  141. package/dist/types.js +0 -34
  142. package/src/plugins/AuthPlugin.js +0 -21
  143. package/src/plugins/Cache.js +0 -11
  144. package/src/plugins/DefaultBackend.js +0 -149
  145. package/src/plugins/ExpressPlugin.js +0 -39
  146. package/src/plugins/PublishPlugin.js +0 -69
  147. package/src/plugins/SslPlugin.js +0 -66
  148. package/src/plugins/StaticPlugin.js +0 -48
  149. package/src/plugins/WebsitePlugin.js +0 -207
  150. package/src/ts/client/grapesjs/publish.ts +0 -403
  151. package/src/ts/client/grapesjs/template.ts +0 -183
  152. /package/.silex/default/{.silex.data.json → website.json} +0 -0
@@ -13,7 +13,7 @@
13
13
 
14
14
  /**
15
15
  * @license
16
- * Copyright 2018 Google LLC
16
+ * Copyright 2017 Google LLC
17
17
  * SPDX-License-Identifier: BSD-3-Clause
18
18
  */
19
19
 
@@ -1,2 +1,2 @@
1
- export declare function getPageSlug(pageName?: string): string;
1
+ export declare function getPageSlug(pageName: any): any;
2
2
  export declare function getPageLink(pageName?: string): string;
@@ -1,57 +1,164 @@
1
1
  /**
2
2
  * @fileoverview define types for Silex client and server
3
3
  */
4
- export declare const defaultPublicationSettings: PublicationSettings;
5
- export declare const defaultSite: WebsiteData;
6
- export interface WebsiteSettings {
7
- description: string;
8
- title: string;
9
- lang: string;
10
- head: string;
11
- favicon: string;
12
- 'og:title': string;
13
- 'og:description': string;
14
- 'og:image': string;
4
+ export interface PublicationSettings {
5
+ connector?: ConnectorData;
6
+ options?: ConnectorOptions;
7
+ url?: string;
8
+ autoHomePage?: boolean;
9
+ }
10
+ export interface WebsiteFile {
11
+ html: string;
12
+ css: string;
13
+ htmlPath: string;
14
+ cssPath: string;
15
15
  }
16
+ export type ApiError = {
17
+ message: string;
18
+ };
19
+ export type ApiPublicationPublishBody = WebsiteData;
20
+ export type ApiPublicationPublishQuery = {
21
+ websiteId: WebsiteId;
22
+ hostingId: ConnectorId;
23
+ storageId: ConnectorId;
24
+ options: ConnectorOptions;
25
+ };
26
+ export type ApiPublicationPublishResponse = {
27
+ url: string;
28
+ job: PublicationJobData;
29
+ };
30
+ export type ApiPublicationStatusQuery = {
31
+ jobId: JobId;
32
+ };
33
+ export type ApiPublicationStatusResponse = PublicationJobData;
34
+ export type ApiWebsiteReadQuery = {
35
+ websiteId: WebsiteId;
36
+ connectorId?: ConnectorId;
37
+ };
38
+ export type ApiWebsiteReadResponse = WebsiteData;
39
+ export type ApiWebsiteListQuery = {
40
+ connectorId?: ConnectorId;
41
+ };
42
+ export type ApiWebsiteListResponse = WebsiteMeta[];
43
+ export type ApiWebsiteWriteQuery = {
44
+ websiteId: WebsiteId;
45
+ connectorId?: ConnectorId;
46
+ };
47
+ export type ApiWebsiteWriteBody = WebsiteData;
48
+ export type ApiWebsiteWriteResponse = {
49
+ message: string;
50
+ };
51
+ export type ApiWebsiteCreateQuery = {
52
+ connectorId?: ConnectorId;
53
+ };
54
+ export type ApiWebsiteCreateBody = WebsiteMetaFileContent;
55
+ export type ApiWebsiteCreateResponse = {
56
+ message: string;
57
+ };
58
+ export type ApiWebsiteDeleteQuery = {
59
+ websiteId: WebsiteId;
60
+ connectorId?: ConnectorId;
61
+ };
62
+ export type ApiWebsiteMetaReadQuery = {
63
+ websiteId: WebsiteId;
64
+ connectorId?: ConnectorId;
65
+ };
66
+ export type ApiWebsiteMetaReadResponse = WebsiteMetaFileContent;
67
+ export type ApiWebsiteMetaWriteQuery = {
68
+ websiteId: WebsiteId;
69
+ connectorId?: ConnectorId;
70
+ };
71
+ export type ApiWebsiteMetaWriteBody = WebsiteMetaFileContent;
72
+ export type ApiWebsiteMetaWriteResponse = {
73
+ message: string;
74
+ };
75
+ export type ApiWebsiteAssetsReadQuery = {
76
+ websiteId: WebsiteId;
77
+ connectorId?: ConnectorId;
78
+ };
79
+ export type ApiWebsiteAssetsReadParams = {
80
+ path: string;
81
+ };
82
+ export type ApiWebsiteAssetsReadResponse = string;
83
+ export type ApiWebsiteAssetsWriteQuery = {
84
+ websiteId: WebsiteId;
85
+ connectorId?: ConnectorId;
86
+ };
87
+ export type ApiWebsiteAssetsWriteBody = ClientSideFile[];
88
+ export type ApiWebsiteAssetsWriteResponse = {
89
+ data: string[];
90
+ };
91
+ export type ApiConnectorListQuery = {
92
+ type: ConnectorType;
93
+ };
94
+ export type ApiConnectorListResponse = ConnectorData[];
95
+ export type ApiConnectorLoginQuery = {
96
+ connectorId: ConnectorId;
97
+ type: ConnectorType;
98
+ };
99
+ export type ApiConnectorLoggedInPostMessage = {
100
+ type: string;
101
+ error: boolean;
102
+ message: string;
103
+ connectorId: ConnectorId;
104
+ options: ConnectorOptions;
105
+ };
106
+ export type ApiConnectorLoginCbkQuery = {
107
+ connectorId?: ConnectorId;
108
+ type: ConnectorType;
109
+ error?: string;
110
+ };
111
+ export type ApiConnectorLoginCbkBody = object;
112
+ export type ApiConnectorSettingsQuery = {
113
+ connectorId?: ConnectorId;
114
+ type: ConnectorType;
115
+ };
116
+ export type ApiConnectorSettingsResponse = string;
117
+ export type ApiConnectorSettingsPostQuery = {
118
+ connectorId?: ConnectorId;
119
+ type: ConnectorType;
120
+ };
121
+ export type ApiConnectorSettingsPostBody = ConnectorUserSettings;
122
+ export type ApiConnectorSettingsPostResponse = {
123
+ message: string;
124
+ };
125
+ export type ApiConnectorLogoutQuery = {
126
+ connectorId?: ConnectorId;
127
+ type: ConnectorType;
128
+ };
129
+ export type ApiConnectorUserQuery = {
130
+ connectorId?: ConnectorId;
131
+ type: ConnectorType;
132
+ };
133
+ export type ApiConnectorUserResponse = ConnectorUser;
134
+ export declare const defaultWebsiteData: WebsiteData;
16
135
  export interface WebsiteData {
17
136
  pages: Page[];
18
137
  assets: Asset[];
19
138
  styles: Style[];
20
- name: string;
21
139
  settings: WebsiteSettings;
22
140
  fonts: Font[];
23
141
  symbols: symbol[];
24
142
  publication: PublicationSettings;
25
143
  }
144
+ export interface PublicationData extends WebsiteData {
145
+ files?: WebsiteFile[];
146
+ }
147
+ export interface WebsiteSettings {
148
+ description?: string;
149
+ title?: string;
150
+ lang?: string;
151
+ head?: string;
152
+ favicon?: string;
153
+ 'og:title'?: string;
154
+ 'og:description'?: string;
155
+ 'og:image'?: string;
156
+ }
26
157
  export interface Font {
27
158
  name: string;
28
159
  value: string;
29
160
  variants: string[];
30
161
  }
31
- export interface PublicationSettings {
32
- path?: string;
33
- url?: string;
34
- autoHomePage?: boolean;
35
- assets?: {
36
- path?: string;
37
- url?: string;
38
- };
39
- html?: {
40
- path?: string;
41
- ext?: string;
42
- };
43
- css?: {
44
- path?: string;
45
- url?: string;
46
- ext?: string;
47
- };
48
- }
49
- export interface File {
50
- html: string;
51
- css: string;
52
- htmlPath: string;
53
- cssPath: string;
54
- }
55
162
  export interface Page {
56
163
  name?: string;
57
164
  id: string;
@@ -60,6 +167,7 @@ export interface Page {
60
167
  settings?: WebsiteSettings;
61
168
  cssExt?: string;
62
169
  htmlExt?: string;
170
+ slug?: string;
63
171
  }
64
172
  export interface Frame {
65
173
  component: {
@@ -86,6 +194,7 @@ export interface Asset {
86
194
  height: number;
87
195
  width: number;
88
196
  name: string;
197
+ path?: string;
89
198
  }
90
199
  export interface Style {
91
200
  selectors: Selector[];
@@ -97,3 +206,104 @@ export type Selector = string | {
97
206
  name: string;
98
207
  type: number;
99
208
  };
209
+ /**
210
+ * Type for a connector id
211
+ */
212
+ export type ConnectorId = string;
213
+ export type ConnectorOptions = object;
214
+ /**
215
+ * Type for a client side file
216
+ * @see connector/File
217
+ */
218
+ export interface ClientSideFile {
219
+ path: string;
220
+ content: string;
221
+ }
222
+ /**
223
+ * Type for file listing
224
+ */
225
+ export interface FileMeta {
226
+ name: string;
227
+ isDir: boolean;
228
+ size: number;
229
+ createdAt: Date;
230
+ updatedAt: Date;
231
+ metadata?: object;
232
+ }
233
+ /**
234
+ * Enum to express if the connector is a storage or a hosting
235
+ */
236
+ export declare enum ConnectorType {
237
+ STORAGE = "STORAGE",
238
+ HOSTING = "HOSTING"
239
+ }
240
+ /**
241
+ * Type for a website id
242
+ */
243
+ export type WebsiteId = string;
244
+ /**
245
+ * Back end data shared with the front end
246
+ */
247
+ export interface ConnectorData {
248
+ connectorId: ConnectorId;
249
+ type: ConnectorType;
250
+ displayName: string;
251
+ icon: string;
252
+ disableLogout: boolean;
253
+ isLoggedIn: boolean;
254
+ oauthUrl: string | null;
255
+ }
256
+ /**
257
+ * User settings for a connector and for a given website
258
+ */
259
+ export type ConnectorUserSettings = {
260
+ [websiteId: string]: object;
261
+ };
262
+ /**
263
+ * Back end data shared with the front end
264
+ */
265
+ export interface ConnectorUser {
266
+ name: string;
267
+ email?: string;
268
+ picture?: string;
269
+ storage: ConnectorData;
270
+ }
271
+ export interface WebsiteMetaFileContent {
272
+ name: string;
273
+ imageUrl?: string;
274
+ connectorUserSettings: ConnectorUserSettings;
275
+ }
276
+ /**
277
+ * Back end data sent to the front end
278
+ * Meta data can be the root path of the websites, or the bucket name, etc.
279
+ */
280
+ export interface WebsiteMeta extends WebsiteMetaFileContent {
281
+ websiteId: WebsiteId;
282
+ createdAt: Date;
283
+ updatedAt: Date;
284
+ }
285
+ /**
286
+ * Enum to express if the job is in progress or finished or errored
287
+ */
288
+ export declare enum JobStatus {
289
+ IN_PROGRESS = "IN_PROGRESS",
290
+ SUCCESS = "SUCCESS",
291
+ ERROR = "ERROR"
292
+ }
293
+ /**
294
+ * Id used to track the progress of a publication
295
+ */
296
+ export type JobId = string;
297
+ /**
298
+ * Data structure which is sent to the client to display the progress of a job
299
+ */
300
+ export interface JobData {
301
+ jobId: JobId;
302
+ status: JobStatus;
303
+ message: string;
304
+ _timeout?: ReturnType<typeof setTimeout>;
305
+ }
306
+ export interface PublicationJobData extends JobData {
307
+ logs: string[][];
308
+ errors: string[][];
309
+ }
@@ -0,0 +1 @@
1
+ export declare function onAll(editor: any, cbk: any): void;
@@ -0,0 +1,25 @@
1
+ /*
2
+ * Silex website builder, free/libre no-code tool for makers.
3
+ * Copyright (c) 2023 lexoyo and Silex Labs foundation
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU Affero General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or any later version.
8
+ *
9
+ * This program is distributed in the hope that it will be useful,
10
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ * GNU Affero General Public License for more details.
13
+ *
14
+ * You should have received a copy of the GNU Affero General Public License
15
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
16
+ */
17
+ // Browse all elements of all pages
18
+ export function onAll(editor, cbk) {
19
+ editor.Pages.getAll()
20
+ .forEach(page => {
21
+ page.getMainComponent()
22
+ .onAll(c => cbk(c));
23
+ });
24
+ }
25
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/ts/client/utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,mCAAmC;AACnC,MAAM,UAAU,KAAK,CAAC,MAAM,EAAE,GAAG;IAC/B,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE;SAClB,OAAO,CAAC,IAAI,CAAC,EAAE;QACd,IAAI,CAAC,gBAAgB,EAAE;aACpB,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;IACvB,CAAC,CAAC,CAAA;AACN,CAAC"}
@@ -0,0 +1,10 @@
1
+ export declare const EVENT_STARTUP_START = "silex:startup:start";
2
+ export declare const EVENT_STARTUP_END = "silex:startup:end";
3
+ export declare const EVENT_PUBLISH_START = "silex:publish:start";
4
+ export declare const EVENT_PUBLISH_DATA = "silex:publish:data";
5
+ export declare const EVENT_PUBLISH_END = "silex:publish:end";
6
+ export declare const EVENT_PUBLISH_ERROR = "silex:publish:error";
7
+ export declare const EVENT_PUBLISH_LOGIN_START = "silex:publish:login:start";
8
+ export declare const EVENT_PUBLISH_LOGIN_END = "silex:publish:login:end";
9
+ export declare const EVENT_ASSET_WRITE_END = "silex:asset:write:end";
10
+ export declare const EVENT_WRITE_END = "silex:write:end";
@@ -0,0 +1,27 @@
1
+ /*
2
+ * Silex website builder, free/libre no-code tool for makers.
3
+ * Copyright (c) 2023 lexoyo and Silex Labs foundation
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU Affero General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or any later version.
8
+ *
9
+ * This program is distributed in the hope that it will be useful,
10
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ * GNU Affero General Public License for more details.
13
+ *
14
+ * You should have received a copy of the GNU Affero General Public License
15
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
16
+ */
17
+ export const EVENT_STARTUP_START = 'silex:startup:start';
18
+ export const EVENT_STARTUP_END = 'silex:startup:end';
19
+ export const EVENT_PUBLISH_START = 'silex:publish:start';
20
+ export const EVENT_PUBLISH_DATA = 'silex:publish:data';
21
+ export const EVENT_PUBLISH_END = 'silex:publish:end';
22
+ export const EVENT_PUBLISH_ERROR = 'silex:publish:error';
23
+ export const EVENT_PUBLISH_LOGIN_START = 'silex:publish:login:start';
24
+ export const EVENT_PUBLISH_LOGIN_END = 'silex:publish:login:end';
25
+ export const EVENT_ASSET_WRITE_END = 'silex:asset:write:end';
26
+ export const EVENT_WRITE_END = 'silex:write:end';
27
+ //# sourceMappingURL=events.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.js","sourceRoot":"","sources":["../../../src/ts/events.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG,qBAAqB,CAAA;AACxD,MAAM,CAAC,MAAM,iBAAiB,GAAG,mBAAmB,CAAA;AACpD,MAAM,CAAC,MAAM,mBAAmB,GAAG,qBAAqB,CAAA;AACxD,MAAM,CAAC,MAAM,kBAAkB,GAAG,oBAAoB,CAAA;AACtD,MAAM,CAAC,MAAM,iBAAiB,GAAG,mBAAmB,CAAA;AACpD,MAAM,CAAC,MAAM,mBAAmB,GAAG,qBAAqB,CAAA;AACxD,MAAM,CAAC,MAAM,yBAAyB,GAAG,2BAA2B,CAAA;AACpE,MAAM,CAAC,MAAM,uBAAuB,GAAG,yBAAyB,CAAA;AAChE,MAAM,CAAC,MAAM,qBAAqB,GAAG,uBAAuB,CAAA;AAC5D,MAAM,CAAC,MAAM,eAAe,GAAG,iBAAiB,CAAA"}
@@ -0,0 +1,2 @@
1
+ declare const _default: (config: any, opts?: any) => Promise<void>;
2
+ export default _default;
@@ -0,0 +1,186 @@
1
+ /*
2
+ * Silex website builder, free/libre no-code tool for makers.
3
+ * Copyright (c) 2023 lexoyo and Silex Labs foundation
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU Affero General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or any later version.
8
+ *
9
+ * This program is distributed in the hope that it will be useful,
10
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ * GNU Affero General Public License for more details.
13
+ *
14
+ * You should have received a copy of the GNU Affero General Public License
15
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
16
+ */
17
+ //import {html, render} from 'lit-html'
18
+ //import {styleMap} from 'lit-html/directives/style-map.js'
19
+ //import { onAll } from '@silexlabs/silex/dist/client/utils.js'
20
+ import { onAll } from '../../client/utils.js';
21
+ import { EVENT_PUBLISH_END, EVENT_PUBLISH_START, EVENT_STARTUP_END } from '../../events.js';
22
+ //// @ts-ignore
23
+ //import {html, render} from '/node_modules/lit-html/lit-html.js'
24
+ //// @ts-ignore
25
+ //import {styleMap} from '/node_modules/lit-html/directives/style-map.js'
26
+ const silex = window['silex'];
27
+ const pluginName = 'template';
28
+ const templateType = 'templateType';
29
+ const templateKey = 'template';
30
+ export default async (config, opts = {}) => {
31
+ // @ts-ignore
32
+ const { html, render } = await import('/node_modules/lit-html/lit-html.js');
33
+ // @ts-ignore
34
+ const { styleMap } = await import('/node_modules/lit-html/directives/style-map.js');
35
+ config.on(EVENT_STARTUP_END, () => {
36
+ const editor = silex.getEditor();
37
+ // Add the new trait to all component types
38
+ editor.DomComponents.getTypes().map(type => {
39
+ const originalType = editor.DomComponents.getType(type.id);
40
+ editor.DomComponents.addType(type.id, {
41
+ model: {
42
+ defaults: {
43
+ traits: [
44
+ // Keep the type original traits
45
+ ...originalType.model.prototype.defaults.traits,
46
+ // Add the new trait
47
+ {
48
+ label: false,
49
+ type: templateType,
50
+ name: pluginName,
51
+ },
52
+ ]
53
+ }
54
+ }
55
+ });
56
+ });
57
+ function doRender(el) {
58
+ const template = editor.getSelected()?.get(templateKey) || {};
59
+ const taStyle = opts.styles?.textarea ?? styleMap({
60
+ backgroundColor: 'var(--darkerPrimaryColor)',
61
+ });
62
+ const sepStyle = opts.styles?.sep ?? styleMap({ height: '10px' });
63
+ const labels = {
64
+ before: html `<strong>Before</strong> the element`,
65
+ replace: html `<strong>Replace</strong> the element's children`,
66
+ after: html `<strong>After</strong> the element`,
67
+ attributes: html `HTML attributes`,
68
+ classname: html `CSS classes`,
69
+ style: html `CSS styles`,
70
+ };
71
+ render(html `
72
+ <div>
73
+ <h3>Template</h3>
74
+ <p>This will be inserted in the published version</p>
75
+ </div>
76
+ ${['classname', 'attributes', 'style'].map(id => html `
77
+ <label>
78
+ ${labels[id]}
79
+ <input
80
+ id="template-${id}"
81
+ .value=${template[id] || ''}
82
+ style=${taStyle}
83
+ />
84
+ </label>
85
+ `)}
86
+ ${['before', 'replace', 'after'].map(id => html `
87
+ <label
88
+ for="template-${id}"
89
+ >${labels[id]}</label>
90
+ <textarea
91
+ id="template-${id}"
92
+ style=${taStyle}
93
+ .value=${template[id] || ''}
94
+ ></textarea>
95
+ `)}
96
+ `, el);
97
+ }
98
+ editor.TraitManager.addType(templateType, {
99
+ createInput({ trait }) {
100
+ // Create a new element container and add some content
101
+ const el = document.createElement('div');
102
+ el.classList.add('gjs-one-bg');
103
+ // update the UI when a page is added/renamed/removed
104
+ editor.on('page', () => doRender(el));
105
+ doRender(el);
106
+ // this will be the element passed to onEvent and onUpdate
107
+ return el;
108
+ },
109
+ // Update the component based on UI changes
110
+ // `elInput` is the result HTMLElement you get from `createInput`
111
+ onEvent({ elInput, component, event }) {
112
+ const template = {
113
+ before: elInput.querySelector('#template-before').value,
114
+ replace: elInput.querySelector('#template-replace').value,
115
+ after: elInput.querySelector('#template-after').value,
116
+ attributes: elInput.querySelector('#template-attributes').value,
117
+ classname: elInput.querySelector('#template-classname').value,
118
+ style: elInput.querySelector('#template-style').value,
119
+ };
120
+ // Store the new template
121
+ if (Object.values(template).filter(val => !!val && !!cleanup(val)).length > 0) {
122
+ component.set(templateKey, template);
123
+ }
124
+ else {
125
+ component.set(templateKey);
126
+ }
127
+ },
128
+ // Update UI on the component change
129
+ onUpdate({ elInput, component }) {
130
+ doRender(elInput);
131
+ },
132
+ });
133
+ // Make html attribute
134
+ // Quote strings, no values for boolean
135
+ function makeAttribute(key, value) {
136
+ switch (typeof value) {
137
+ case 'boolean': return value ? key : '';
138
+ default: return `${key}="${value}"`;
139
+ }
140
+ }
141
+ // Remove empty lines in templates
142
+ function cleanup(template) {
143
+ return template
144
+ // split in lines
145
+ .split('\n')
146
+ // remove lines with only spaces
147
+ .map(line => line.trim())
148
+ .filter(line => !!line)
149
+ // put back together
150
+ .join('\n');
151
+ }
152
+ editor.on(EVENT_PUBLISH_START, () => {
153
+ // Insert templates
154
+ onAll(editor, c => {
155
+ const template = c.get(templateKey);
156
+ const toHTML = c.toHTML;
157
+ const classes = c.getClasses();
158
+ const before = cleanup(template?.before || '');
159
+ const replace = cleanup(template?.replace || '');
160
+ const after = cleanup(template?.after || '');
161
+ const classname = cleanup(template?.classname || '');
162
+ const style = cleanup(template?.style || '');
163
+ const attributes = cleanup(template?.attributes || '');
164
+ // Store the initial method
165
+ if (!c.has('tmpHtml'))
166
+ c.set('tmpHtml', toHTML);
167
+ // Override the method
168
+ c.toHTML = () => {
169
+ return `${before}${c.get('tagName') ? `<${c.get('tagName')}
170
+ ${Object.entries(c.get('attributes')).map(([key, value]) => makeAttribute(key, value)).join(' ')}
171
+ ${classes.length || classname ? `class="${classes.join(' ')} ${classname}"` : ''}
172
+ ${attributes}
173
+ ${style ? `style="${style}"` : ''}
174
+ >` : ''}${replace || c.getInnerHTML()}${c.get('tagName') ? `</${c.get('tagName')}>` : ''}${after}`;
175
+ };
176
+ });
177
+ });
178
+ editor.on(EVENT_PUBLISH_END, () => {
179
+ onAll(editor, c => {
180
+ // Restore the original method
181
+ c.toHTML = c.get('tmpHtml');
182
+ });
183
+ });
184
+ });
185
+ };
186
+ //# sourceMappingURL=template.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"template.js","sourceRoot":"","sources":["../../../../../src/ts/plugins/client/template.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,uCAAuC;AACvC,2DAA2D;AAC3D,+DAA+D;AAC/D,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAA;AAC7C,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,iBAAiB,EAAuB,MAAM,iBAAiB,CAAA;AAEhH,eAAe;AACf,iEAAiE;AACjE,eAAe;AACf,yEAAyE;AAEzE,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,CAAA;AAE7B,MAAM,UAAU,GAAG,UAAU,CAAA;AAC7B,MAAM,YAAY,GAAG,cAAc,CAAA;AACnC,MAAM,WAAW,GAAG,UAAU,CAAA;AAE9B,eAAe,KAAK,EAAE,MAAM,EAAE,OAAY,EAAE,EAAE,EAAE;IAC9C,aAAa;IACb,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,MAAM,CAAC,oCAAoC,CAAC,CAAA;IAC3E,aAAa;IACb,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,MAAM,CAAC,gDAAgD,CAAC,CAAA;IAEnF,MAAM,CAAC,EAAE,CAAC,iBAAiB,EAAE,GAAG,EAAE;QAChC,MAAM,MAAM,GAAG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AS,CAAC;cACtC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,aAAa,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;cAC9F,OAAO,CAAC,MAAM,IAAI,SAAS,CAAC,CAAC,CAAC,UAAU,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,SAAS,GAAG,CAAC,CAAC,CAAC,EAAE;cAC9E,UAAU;cACV,KAAK,CAAC,CAAC,CAAC,UAAU,KAAK,GAAG,CAAC,CAAC,CAAC,EAAE;cAC/B,CAAC,CAAC,CAAC,EAAE,GAAG,OAAO,IAAI,CAAC,CAAC,YAAY,EACrC,GAAG,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,KACtD,EAAE,CAAA;gBACJ,CAAC,CAAA;YACH,CAAC,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;QACF,MAAM,CAAC,EAAE,CAAC,iBAAiB,EAAE,GAAG,EAAE;YAChC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE;gBAChB,8BAA8B;gBAC9B,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,CAAA;YAC7B,CAAC,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAA"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * @fileoverview define constants for Silex client and server
3
+ */
4
+ export declare const WEBSITE_DATA_FILE = "website.json";
5
+ export declare const WEBSITE_META_DATA_FILE = "meta.json";
6
+ export declare const DEFAULT_WEBSITE_ID = "default";
7
+ export declare const DEFAULT_CONNECTOR_ID = "";
8
+ export declare const DEFAULT_LANGUAGE = "en";
9
+ export declare const CLIENT_CONFIG_FILE_NAME = "silex.js";
10
+ export declare const API_PATH = "/api";
11
+ export declare const API_CONNECTOR_PATH = "/connector";
12
+ export declare const API_CONNECTOR_USER = "/user";
13
+ export declare const API_CONNECTOR_LIST = "/";
14
+ export declare const API_CONNECTOR_LOGOUT = "/logout";
15
+ export declare const API_CONNECTOR_LOGIN = "/login";
16
+ export declare const API_CONNECTOR_SETTINGS = "/settings";
17
+ export declare const API_CONNECTOR_LOGIN_CALLBACK = "/login/callback";
18
+ export declare const API_PUBLICATION_PATH = "/publication";
19
+ export declare const API_PUBLICATION_PUBLISH = "/";
20
+ export declare const API_PUBLICATION_STATUS = "/publication/status";
21
+ export declare const API_WEBSITE_PATH = "/website";
22
+ export declare const API_WEBSITE_READ = "/";
23
+ export declare const API_WEBSITE_WRITE = "/";
24
+ export declare const API_WEBSITE_CREATE = "/";
25
+ export declare const API_WEBSITE_DELETE = "/";
26
+ export declare const API_WEBSITE_LIST = "/";
27
+ export declare const API_WEBSITE_ASSETS_READ = "assets/:path";
28
+ export declare const API_WEBSITE_ASSETS_WRITE = "assets";
29
+ export declare const API_WEBSITE_META_READ = "/meta";
30
+ export declare const API_WEBSITE_META_WRITE = "/meta";