@silexlabs/silex 3.0.0-alpha.53 → 3.0.0-alpha.56

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 (39) hide show
  1. package/dist/client/client/assetUrl.d.ts +35 -0
  2. package/dist/client/client/utils.d.ts +2 -1
  3. package/dist/client/js/main.js +78 -78
  4. package/dist/client/types.d.ts +18 -16
  5. package/dist/plugins/client/client/assetUrl.d.ts +35 -0
  6. package/dist/plugins/client/client/assetUrl.js +208 -0
  7. package/dist/plugins/client/client/assetUrl.js.map +1 -0
  8. package/dist/plugins/client/client/grapesjs/PublicationManager.js +18 -12
  9. package/dist/plugins/client/client/grapesjs/PublicationManager.js.map +1 -1
  10. package/dist/plugins/client/client/grapesjs/index.js +1 -1
  11. package/dist/plugins/client/client/grapesjs/index.js.map +1 -1
  12. package/dist/plugins/client/client/grapesjs/storage.js +7 -5
  13. package/dist/plugins/client/client/grapesjs/storage.js.map +1 -1
  14. package/dist/plugins/client/client/publication-transformers.js +4 -4
  15. package/dist/plugins/client/client/publication-transformers.js.map +1 -1
  16. package/dist/plugins/client/client/utils.d.ts +2 -1
  17. package/dist/plugins/client/client/utils.js.map +1 -1
  18. package/dist/plugins/client/plugins/client/11ty.js +0 -5
  19. package/dist/plugins/client/plugins/client/11ty.js.map +1 -1
  20. package/dist/plugins/client/types.d.ts +18 -16
  21. package/dist/plugins/client/types.js +11 -0
  22. package/dist/plugins/client/types.js.map +1 -1
  23. package/dist/plugins/server/types.d.ts +18 -16
  24. package/dist/plugins/server/types.js +11 -0
  25. package/dist/plugins/server/types.js.map +1 -1
  26. package/dist/server/server/api/publicationApi.js +1 -1
  27. package/package.json +1 -1
  28. package/src/ts/client/assetUrl.ts +220 -0
  29. package/src/ts/client/grapesjs/PublicationManager.ts +25 -19
  30. package/src/ts/client/grapesjs/index.ts +1 -1
  31. package/src/ts/client/grapesjs/storage.ts +9 -7
  32. package/src/ts/client/index.ts +4 -0
  33. package/src/ts/client/publication-transformers.test.ts +1 -1
  34. package/src/ts/client/publication-transformers.ts +4 -4
  35. package/src/ts/client/utils.ts +3 -1
  36. package/src/ts/plugins/client/11ty.ts +0 -6
  37. package/src/ts/server/api/publicationApi.ts +1 -1
  38. package/src/ts/server/connectors/FsStorage.ts +1 -0
  39. package/src/ts/types.ts +34 -13
package/src/ts/types.ts CHANGED
@@ -96,8 +96,29 @@ export const defaultWebsiteData: WebsiteData = {
96
96
  //publication: {},
97
97
  } as WebsiteData
98
98
 
99
+
100
+ // **
101
+ // Grapesjs types
102
+ // From grapesjs, not imported because it breaks the build on the server side
103
+ export interface Component {
104
+ type: string,
105
+ content?: string,
106
+ attributes: { [key: string]: string },
107
+ components: Component[],
108
+ }
109
+
110
+ export interface Page {
111
+ id: string,
112
+ name: string,
113
+ slug: string,
114
+ settings: WebsiteSettings, // TODO: why is this here? It is used in the publication manager
115
+ frames: {
116
+ component: Component,
117
+ }[]
118
+ }
119
+
99
120
  export interface WebsiteData {
100
- pages: any[], // Page[], // From grapesjs, not imported because it breaks the build on the server side
121
+ pages: Page[],
101
122
  assets: Asset[],
102
123
  styles: Style[],
103
124
  //name: string,
@@ -128,23 +149,23 @@ export interface Font {
128
149
  variants: string[],
129
150
  }
130
151
 
131
- export interface Frame {
132
- component: { type: string, stylable: string[] },
133
- components: Component[],
134
- }
135
-
136
- export interface Component {
137
- type: string,
138
- content?: string,
139
- attributes: { [key: string]: string },
140
- conponents: Component[],
141
- }
152
+ //export interface Frame {
153
+ // component: { type: string, stylable: string[] },
154
+ // components: Component[],
155
+ //}
156
+ //
157
+ //export interface Component {
158
+ // type: string,
159
+ // content?: string,
160
+ // attributes: { [key: string]: string },
161
+ // conponents: Component[],
162
+ //}
142
163
 
143
164
  export enum Unit {
144
165
  PX = 'px',
145
166
  }
146
167
 
147
- export interface Asset {
168
+ export interface Asset {
148
169
  type: string,
149
170
  src: string,
150
171
  unitDim: Unit,