@social-mail/social-mail-client 1.2.17 → 1.2.18

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 (238) hide show
  1. package/content/images/svg/html-editor/layouts/card.png +0 -0
  2. package/content/images/svg/html-editor/layouts/card.svg +77 -0
  3. package/content/images/svg/html-editor/layouts/column-2.png +0 -0
  4. package/content/images/svg/html-editor/layouts/column-2.svg +119 -0
  5. package/content/images/svg/html-editor/layouts/column-3.png +0 -0
  6. package/content/images/svg/html-editor/layouts/column-3.svg +155 -0
  7. package/content/images/svg/html-editor/layouts/column.png +0 -0
  8. package/content/images/svg/html-editor/layouts/column.svg +86 -0
  9. package/content/images/svg/html-editor/layouts/image.svg +1 -0
  10. package/content/images/svg/html-editor/layouts/row.png +0 -0
  11. package/content/images/svg/html-editor/layouts/row.svg +87 -0
  12. package/content/images/svg/html-editor/layouts/vertical-image-box.png +0 -0
  13. package/content/images/svg/html-editor/layouts/vertical-image-box.svg +78 -0
  14. package/dist/admin/AdminAppIndex.pack.js +1783 -601
  15. package/dist/admin/AdminAppIndex.pack.js.map +1 -1
  16. package/dist/admin/AdminAppIndex.pack.min.js +511 -45
  17. package/dist/admin/AdminAppIndex.pack.min.js.map +1 -1
  18. package/dist/services/files/LocalFileService.d.ts +1 -0
  19. package/dist/services/files/LocalFileService.d.ts.map +1 -1
  20. package/dist/services/files/LocalFileService.js +24 -8
  21. package/dist/services/files/LocalFileService.js.map +1 -1
  22. package/dist/site-editor/blocks/Block.d.ts +7 -3
  23. package/dist/site-editor/blocks/Block.d.ts.map +1 -1
  24. package/dist/site-editor/blocks/Block.js +30 -9
  25. package/dist/site-editor/blocks/Block.js.map +1 -1
  26. package/dist/site-editor/blocks/Card.d.ts +2 -0
  27. package/dist/site-editor/blocks/Card.d.ts.map +1 -0
  28. package/dist/site-editor/blocks/Card.js +28 -0
  29. package/dist/site-editor/blocks/Card.js.map +1 -0
  30. package/dist/site-editor/blocks/ColumnBox.d.ts +4 -0
  31. package/dist/site-editor/blocks/ColumnBox.d.ts.map +1 -0
  32. package/dist/site-editor/blocks/ColumnBox.js +42 -0
  33. package/dist/site-editor/blocks/ColumnBox.js.map +1 -0
  34. package/dist/site-editor/blocks/FeatureBlock.d.ts.map +1 -1
  35. package/dist/site-editor/blocks/FeatureBlock.js +8 -8
  36. package/dist/site-editor/blocks/FeatureBlock.js.map +1 -1
  37. package/dist/site-editor/blocks/Image.d.ts +2 -0
  38. package/dist/site-editor/blocks/Image.d.ts.map +1 -0
  39. package/dist/site-editor/blocks/Image.js +24 -0
  40. package/dist/site-editor/blocks/Image.js.map +1 -0
  41. package/dist/site-editor/blocks/ImageBox.d.ts +3 -0
  42. package/dist/site-editor/blocks/ImageBox.d.ts.map +1 -0
  43. package/dist/site-editor/blocks/ImageBox.js +38 -0
  44. package/dist/site-editor/blocks/ImageBox.js.map +1 -0
  45. package/dist/site-editor/blocks/ImageCard.d.ts +2 -0
  46. package/dist/site-editor/blocks/ImageCard.d.ts.map +1 -0
  47. package/dist/site-editor/blocks/ImageCard.js +26 -0
  48. package/dist/site-editor/blocks/ImageCard.js.map +1 -0
  49. package/dist/site-editor/blocks/List.d.ts +2 -0
  50. package/dist/site-editor/blocks/List.d.ts.map +1 -0
  51. package/dist/site-editor/blocks/List.js +20 -0
  52. package/dist/site-editor/blocks/List.js.map +1 -0
  53. package/dist/site-editor/blocks/RowBox.d.ts +2 -0
  54. package/dist/site-editor/blocks/RowBox.d.ts.map +1 -0
  55. package/dist/site-editor/blocks/RowBox.js +24 -0
  56. package/dist/site-editor/blocks/RowBox.js.map +1 -0
  57. package/dist/site-editor/blocks/TextBox.d.ts +2 -0
  58. package/dist/site-editor/blocks/TextBox.d.ts.map +1 -0
  59. package/dist/site-editor/blocks/TextBox.js +24 -0
  60. package/dist/site-editor/blocks/TextBox.js.map +1 -0
  61. package/dist/site-editor/blocks/VerticalImageBox.d.ts +2 -0
  62. package/dist/site-editor/blocks/VerticalImageBox.d.ts.map +1 -0
  63. package/dist/site-editor/blocks/VerticalImageBox.js +29 -0
  64. package/dist/site-editor/blocks/VerticalImageBox.js.map +1 -0
  65. package/dist/site-editor/blocks/WrapGrid.d.ts.map +1 -1
  66. package/dist/site-editor/blocks/WrapGrid.js +8 -8
  67. package/dist/site-editor/blocks/WrapGrid.js.map +1 -1
  68. package/dist/site-editor/blocks/defaultImage.d.ts +2 -0
  69. package/dist/site-editor/blocks/defaultImage.d.ts.map +1 -0
  70. package/dist/site-editor/blocks/defaultImage.js +12 -0
  71. package/dist/site-editor/blocks/defaultImage.js.map +1 -0
  72. package/dist/site-editor/editor/HtmlPageEditor.d.ts +2 -0
  73. package/dist/site-editor/editor/HtmlPageEditor.d.ts.map +1 -1
  74. package/dist/site-editor/editor/HtmlPageEditor.js +44 -5
  75. package/dist/site-editor/editor/HtmlPageEditor.js.map +1 -1
  76. package/dist/site-editor/editor/WebSitePageEditor.d.ts +2 -0
  77. package/dist/site-editor/editor/WebSitePageEditor.d.ts.map +1 -1
  78. package/dist/site-editor/editor/WebSitePageEditor.js +32 -18
  79. package/dist/site-editor/editor/WebSitePageEditor.js.map +1 -1
  80. package/dist/site-editor/properties/groups/LayoutEditor.d.ts.map +1 -1
  81. package/dist/site-editor/properties/groups/LayoutEditor.js +3 -0
  82. package/dist/site-editor/properties/groups/LayoutEditor.js.map +1 -1
  83. package/dist/site-editor/styler/Styler.d.ts +72 -0
  84. package/dist/site-editor/styler/Styler.d.ts.map +1 -1
  85. package/dist/site-editor/styler/Styler.js +19 -1
  86. package/dist/site-editor/styler/Styler.js.map +1 -1
  87. package/dist/site-editor/styler/StylerSet.d.ts +1 -0
  88. package/dist/site-editor/styler/StylerSet.d.ts.map +1 -1
  89. package/dist/site-editor/styler/StylerSet.js +13 -10
  90. package/dist/site-editor/styler/StylerSet.js.map +1 -1
  91. package/dist/site-editor/styler/properties/color-sets/stylerColorSets.d.ts +3 -0
  92. package/dist/site-editor/styler/properties/color-sets/stylerColorSets.d.ts.map +1 -0
  93. package/dist/site-editor/styler/properties/color-sets/stylerColorSets.js +60 -0
  94. package/dist/site-editor/styler/properties/color-sets/stylerColorSets.js.map +1 -0
  95. package/dist/site-editor/styler/properties/layouts/blocks/layoutBlock.d.ts +2 -0
  96. package/dist/site-editor/styler/properties/layouts/blocks/layoutBlock.d.ts.map +1 -0
  97. package/dist/site-editor/styler/properties/layouts/blocks/layoutBlock.js +22 -0
  98. package/dist/site-editor/styler/properties/layouts/blocks/layoutBlock.js.map +1 -0
  99. package/dist/site-editor/styler/properties/layouts/blocks/layoutCard.d.ts +2 -0
  100. package/dist/site-editor/styler/properties/layouts/blocks/layoutCard.d.ts.map +1 -0
  101. package/dist/site-editor/styler/properties/layouts/blocks/layoutCard.js +82 -0
  102. package/dist/site-editor/styler/properties/layouts/blocks/layoutCard.js.map +1 -0
  103. package/dist/site-editor/styler/properties/layouts/blocks/layoutColumn.d.ts +2 -0
  104. package/dist/site-editor/styler/properties/layouts/blocks/layoutColumn.d.ts.map +1 -0
  105. package/dist/site-editor/styler/properties/layouts/blocks/layoutColumn.js +50 -0
  106. package/dist/site-editor/styler/properties/layouts/blocks/layoutColumn.js.map +1 -0
  107. package/dist/site-editor/styler/properties/layouts/blocks/layoutColumn2Box.d.ts +2 -0
  108. package/dist/site-editor/styler/properties/layouts/blocks/layoutColumn2Box.d.ts.map +1 -0
  109. package/dist/site-editor/styler/properties/layouts/blocks/layoutColumn2Box.js +58 -0
  110. package/dist/site-editor/styler/properties/layouts/blocks/layoutColumn2Box.js.map +1 -0
  111. package/dist/site-editor/styler/properties/layouts/blocks/layoutColumn3Box.d.ts +2 -0
  112. package/dist/site-editor/styler/properties/layouts/blocks/layoutColumn3Box.d.ts.map +1 -0
  113. package/dist/site-editor/styler/properties/layouts/blocks/layoutColumn3Box.js +58 -0
  114. package/dist/site-editor/styler/properties/layouts/blocks/layoutColumn3Box.js.map +1 -0
  115. package/dist/site-editor/styler/properties/layouts/blocks/layoutFloatingNavBar.d.ts +2 -0
  116. package/dist/site-editor/styler/properties/layouts/blocks/layoutFloatingNavBar.d.ts.map +1 -0
  117. package/dist/site-editor/styler/properties/{layout/layout.js → layouts/blocks/layoutFloatingNavBar.js} +8 -65
  118. package/dist/site-editor/styler/properties/layouts/blocks/layoutFloatingNavBar.js.map +1 -0
  119. package/dist/site-editor/styler/properties/layouts/blocks/layoutImageBlock.d.ts +2 -0
  120. package/dist/site-editor/styler/properties/layouts/blocks/layoutImageBlock.d.ts.map +1 -0
  121. package/dist/site-editor/styler/properties/layouts/blocks/layoutImageBlock.js +56 -0
  122. package/dist/site-editor/styler/properties/layouts/blocks/layoutImageBlock.js.map +1 -0
  123. package/dist/site-editor/styler/properties/layouts/blocks/layoutImageBox.d.ts +2 -0
  124. package/dist/site-editor/styler/properties/layouts/blocks/layoutImageBox.d.ts.map +1 -0
  125. package/dist/site-editor/styler/properties/layouts/blocks/layoutImageBox.js +63 -0
  126. package/dist/site-editor/styler/properties/layouts/blocks/layoutImageBox.js.map +1 -0
  127. package/dist/site-editor/styler/properties/layouts/blocks/layoutImageCard.d.ts +2 -0
  128. package/dist/site-editor/styler/properties/layouts/blocks/layoutImageCard.d.ts.map +1 -0
  129. package/dist/site-editor/styler/properties/layouts/blocks/layoutImageCard.js +115 -0
  130. package/dist/site-editor/styler/properties/layouts/blocks/layoutImageCard.js.map +1 -0
  131. package/dist/site-editor/styler/properties/layouts/blocks/layoutNavBar.d.ts +2 -0
  132. package/dist/site-editor/styler/properties/layouts/blocks/layoutNavBar.d.ts.map +1 -0
  133. package/dist/site-editor/styler/properties/layouts/blocks/layoutNavBar.js +32 -0
  134. package/dist/site-editor/styler/properties/layouts/blocks/layoutNavBar.js.map +1 -0
  135. package/dist/site-editor/styler/properties/layouts/blocks/layoutRightImageBox.d.ts +2 -0
  136. package/dist/site-editor/styler/properties/layouts/blocks/layoutRightImageBox.d.ts.map +1 -0
  137. package/dist/site-editor/styler/properties/layouts/blocks/layoutRightImageBox.js +63 -0
  138. package/dist/site-editor/styler/properties/layouts/blocks/layoutRightImageBox.js.map +1 -0
  139. package/dist/site-editor/styler/properties/layouts/blocks/layoutRow.d.ts +2 -0
  140. package/dist/site-editor/styler/properties/layouts/blocks/layoutRow.d.ts.map +1 -0
  141. package/dist/site-editor/styler/properties/layouts/blocks/layoutRow.js +59 -0
  142. package/dist/site-editor/styler/properties/layouts/blocks/layoutRow.js.map +1 -0
  143. package/dist/site-editor/styler/properties/layouts/blocks/layoutTextBox.d.ts +2 -0
  144. package/dist/site-editor/styler/properties/layouts/blocks/layoutTextBox.d.ts.map +1 -0
  145. package/dist/site-editor/styler/properties/layouts/blocks/layoutTextBox.js +47 -0
  146. package/dist/site-editor/styler/properties/layouts/blocks/layoutTextBox.js.map +1 -0
  147. package/dist/site-editor/styler/properties/layouts/blocks/layoutWrapList.d.ts +2 -0
  148. package/dist/site-editor/styler/properties/layouts/blocks/layoutWrapList.d.ts.map +1 -0
  149. package/dist/site-editor/styler/properties/layouts/blocks/layoutWrapList.js +44 -0
  150. package/dist/site-editor/styler/properties/layouts/blocks/layoutWrapList.js.map +1 -0
  151. package/dist/site-editor/styler/properties/layouts/display.d.ts.map +1 -0
  152. package/dist/site-editor/styler/properties/layouts/display.js.map +1 -0
  153. package/dist/site-editor/styler/properties/layouts/flex/flex.d.ts.map +1 -0
  154. package/dist/site-editor/styler/properties/layouts/flex/flex.js.map +1 -0
  155. package/dist/site-editor/styler/properties/layouts/items-position/itemsPosition.d.ts.map +1 -0
  156. package/dist/site-editor/styler/properties/layouts/items-position/itemsPosition.js.map +1 -0
  157. package/dist/site-editor/styler/properties/layouts/layout.d.ts.map +1 -0
  158. package/dist/site-editor/styler/properties/layouts/layout.js +40 -0
  159. package/dist/site-editor/styler/properties/layouts/layout.js.map +1 -0
  160. package/dist/site-editor/toolbars/EditorToolbar.d.ts.map +1 -1
  161. package/dist/site-editor/toolbars/EditorToolbar.js +1 -0
  162. package/dist/site-editor/toolbars/EditorToolbar.js.map +1 -1
  163. package/dist/style/GlobalStyle.js +1 -1
  164. package/dist/style/GlobalStyle.js.map +1 -1
  165. package/dist/tsconfig.tsbuildinfo +1 -1
  166. package/dist/web/AppIndex.pack.js +1520 -338
  167. package/dist/web/AppIndex.pack.js.map +1 -1
  168. package/dist/web/AppIndex.pack.min.js +492 -26
  169. package/dist/web/AppIndex.pack.min.js.map +1 -1
  170. package/dist/web/page/files/media/ChooseMediaPage.d.ts.map +1 -1
  171. package/dist/web/page/files/media/ChooseMediaPage.js +23 -4
  172. package/dist/web/page/files/media/ChooseMediaPage.js.map +1 -1
  173. package/dist/web/page/files/service/CloudFileService.d.ts +5 -4
  174. package/dist/web/page/files/service/CloudFileService.d.ts.map +1 -1
  175. package/dist/web/page/files/service/CloudFileService.js +12 -13
  176. package/dist/web/page/files/service/CloudFileService.js.map +1 -1
  177. package/package.json +1 -1
  178. package/src/services/files/LocalFileService.tsx +25 -7
  179. package/src/site-editor/blocks/Block.tsx +35 -10
  180. package/src/site-editor/blocks/Card.tsx +12 -0
  181. package/src/site-editor/blocks/ColumnBox.tsx +39 -0
  182. package/src/site-editor/blocks/FeatureBlock.tsx +1 -5
  183. package/src/site-editor/blocks/Image.tsx +9 -0
  184. package/src/site-editor/blocks/ImageBox.tsx +27 -0
  185. package/src/site-editor/blocks/ImageCard.tsx +13 -0
  186. package/src/site-editor/blocks/List.tsx +11 -0
  187. package/src/site-editor/blocks/RowBox.tsx +13 -0
  188. package/src/site-editor/blocks/{ImageBlock.tsx → TextBox.tsx} +9 -9
  189. package/src/site-editor/blocks/VerticalImageBox.tsx +14 -0
  190. package/src/site-editor/blocks/WrapGrid.tsx +2 -5
  191. package/src/site-editor/blocks/defaultImage.ts +2 -0
  192. package/src/site-editor/editor/HtmlPageEditor.tsx +42 -3
  193. package/src/site-editor/editor/WebSitePageEditor.tsx +34 -14
  194. package/src/site-editor/properties/groups/LayoutEditor.tsx +1 -0
  195. package/src/site-editor/styler/Styler.ts +21 -0
  196. package/src/site-editor/styler/StylerSet.ts +6 -4
  197. package/src/site-editor/styler/properties/color-sets/stylerColorSets.ts +50 -0
  198. package/src/site-editor/styler/properties/layouts/blocks/layoutBlock.ts +10 -0
  199. package/src/site-editor/styler/properties/layouts/blocks/layoutCard.ts +70 -0
  200. package/src/site-editor/styler/properties/layouts/blocks/layoutColumn.ts +38 -0
  201. package/src/site-editor/styler/properties/layouts/blocks/layoutColumn2Box.ts +46 -0
  202. package/src/site-editor/styler/properties/layouts/blocks/layoutColumn3Box.ts +46 -0
  203. package/src/site-editor/styler/properties/{layout/layout.ts → layouts/blocks/layoutFloatingNavBar.ts} +6 -65
  204. package/src/site-editor/styler/properties/layouts/blocks/layoutImageBlock.ts +44 -0
  205. package/src/site-editor/styler/properties/layouts/blocks/layoutImageBox.ts +51 -0
  206. package/src/site-editor/styler/properties/layouts/blocks/layoutImageCard.ts +103 -0
  207. package/src/site-editor/styler/properties/layouts/blocks/layoutNavBar.ts +20 -0
  208. package/src/site-editor/styler/properties/layouts/blocks/layoutRightImageBox.ts +51 -0
  209. package/src/site-editor/styler/properties/layouts/blocks/layoutRow.ts +47 -0
  210. package/src/site-editor/styler/properties/layouts/blocks/layoutTextBox.ts +35 -0
  211. package/src/site-editor/styler/properties/layouts/blocks/layoutWrapList.ts +32 -0
  212. package/src/site-editor/styler/properties/layouts/layout.ts +30 -0
  213. package/src/site-editor/toolbars/EditorToolbar.tsx +1 -0
  214. package/src/style/GlobalStyle.ts +1 -1
  215. package/src/web/page/files/media/ChooseMediaPage.tsx +23 -7
  216. package/src/web/page/files/service/CloudFileService.ts +31 -13
  217. package/dist/site-editor/blocks/ImageBlock.d.ts +0 -2
  218. package/dist/site-editor/blocks/ImageBlock.d.ts.map +0 -1
  219. package/dist/site-editor/blocks/ImageBlock.js +0 -23
  220. package/dist/site-editor/blocks/ImageBlock.js.map +0 -1
  221. package/dist/site-editor/styler/properties/layout/display.d.ts.map +0 -1
  222. package/dist/site-editor/styler/properties/layout/display.js.map +0 -1
  223. package/dist/site-editor/styler/properties/layout/flex/flex.d.ts.map +0 -1
  224. package/dist/site-editor/styler/properties/layout/flex/flex.js.map +0 -1
  225. package/dist/site-editor/styler/properties/layout/items-position/itemsPosition.d.ts.map +0 -1
  226. package/dist/site-editor/styler/properties/layout/items-position/itemsPosition.js.map +0 -1
  227. package/dist/site-editor/styler/properties/layout/layout.d.ts.map +0 -1
  228. package/dist/site-editor/styler/properties/layout/layout.js.map +0 -1
  229. /package/dist/site-editor/styler/properties/{layout → layouts}/display.d.ts +0 -0
  230. /package/dist/site-editor/styler/properties/{layout → layouts}/display.js +0 -0
  231. /package/dist/site-editor/styler/properties/{layout → layouts}/flex/flex.d.ts +0 -0
  232. /package/dist/site-editor/styler/properties/{layout → layouts}/flex/flex.js +0 -0
  233. /package/dist/site-editor/styler/properties/{layout → layouts}/items-position/itemsPosition.d.ts +0 -0
  234. /package/dist/site-editor/styler/properties/{layout → layouts}/items-position/itemsPosition.js +0 -0
  235. /package/dist/site-editor/styler/properties/{layout → layouts}/layout.d.ts +0 -0
  236. /package/src/site-editor/styler/properties/{layout → layouts}/display.ts +0 -0
  237. /package/src/site-editor/styler/properties/{layout → layouts}/flex/flex.ts +0 -0
  238. /package/src/site-editor/styler/properties/{layout → layouts}/items-position/itemsPosition.ts +0 -0
@@ -5,8 +5,6 @@ import sleep from "@web-atoms/core/dist/core/sleep";
5
5
  import styled from "@web-atoms/core/dist/style/styled";
6
6
  import Action from "@web-atoms/core/dist/view-model/Action";
7
7
  import { AtomControl } from "@web-atoms/core/dist/web/controls/AtomControl";
8
- import { BindableProperty } from "@web-atoms/core/dist/core/BindableProperty";
9
- import { ImageBlock } from "../blocks/ImageBlock";
10
8
  import { InstallDragDropHelper } from "../drag-drop/DragDropHelper";
11
9
  import { CodeCommand } from "../commands/CodeCommand";
12
10
  import UndoRedoToolbar from "../toolbars/UndoRedoToolbar";
@@ -17,6 +15,15 @@ import { StylerSet } from "../styler/StylerSet";
17
15
  import { SelectedElement } from "./SelectedElement";
18
16
  import { AtomBinder } from "@web-atoms/core/dist/core/AtomBinder";
19
17
  import { StylerVariable } from "../styler/Styler";
18
+ import { ImageBox, RightImageBox } from "../blocks/ImageBox";
19
+ import { RowBox } from "../blocks/RowBox";
20
+ import { ColumnBox, Columns2, Columns3 } from "../blocks/ColumnBox";
21
+ import { VerticalImageBox } from "../blocks/VerticalImageBox";
22
+ import { Image } from "../blocks/Image";
23
+ import { ImageCard } from "../blocks/ImageCard";
24
+ import { TextBox } from "../blocks/TextBox";
25
+ import { Card } from "../blocks/Card";
26
+ import { List } from "../blocks/List";
20
27
 
21
28
  styled.css `
22
29
  display: grid;
@@ -266,8 +273,19 @@ export default class HtmlPageEditor extends AtomControl {
266
273
  </EditorToolbar>
267
274
  </div>
268
275
  <EditorToolbar data-element="left">
269
- <ImageBlock/>
276
+ <TextBox/>
277
+ <Image/>
270
278
  <WrapGrid/>
279
+ <VerticalImageBox/>
280
+ <ImageBox/>
281
+ <RightImageBox/>
282
+ <Card/>
283
+ <ImageCard/>
284
+ <RowBox/>
285
+ <ColumnBox/>
286
+ <Columns2/>
287
+ <Columns3/>
288
+ <List/>
271
289
  </EditorToolbar>
272
290
  <div data-element="editor"
273
291
  style-max-width={Bind.oneWay(() => this.maxWidth > 768 ? "" : this.maxWidth + "px" )}>
@@ -339,6 +357,27 @@ export default class HtmlPageEditor extends AtomControl {
339
357
  }
340
358
  }
341
359
 
360
+ public buildXNode(node: XNode) {
361
+ const build = (n: XNode) => {
362
+ const e = this.htmlDocument.createElement(n.name as string);
363
+ if (n.attributes) {
364
+ for (const key in n.attributes) {
365
+ if (Object.prototype.hasOwnProperty.call(n.attributes, key)) {
366
+ const element = n.attributes[key];
367
+ e.setAttribute(key, element);
368
+ }
369
+ }
370
+ }
371
+ if (n.children) {
372
+ for (const iterator of n.children) {
373
+ e.appendChild(build(iterator));
374
+ }
375
+ }
376
+ return e;
377
+ };
378
+ return build(node);
379
+ }
380
+
342
381
  @Action({ onEvent: "delete-element"})
343
382
  async deleteElement() {
344
383
  const current = this.selection.element;
@@ -23,25 +23,45 @@ export default class WebSitePageEditor extends HtmlPageEditor {
23
23
  }
24
24
 
25
25
  protected async setStylerSheet() {
26
+
27
+ const stylerCSS = await this.createFile("styler.css", StylerSet.instance.toString());
28
+
29
+ await this.addStyleSheet(stylerCSS);
30
+
31
+ let vars = await this.cloudFileService.children(this.folder.appFileID, "styles/vars.css")
32
+ .firstOrDefault();
33
+ if (!vars) {
34
+ vars = await this.createFile("vars.css", `* {
35
+ }`);
36
+ }
37
+ await this.addStyleSheet(vars);
38
+
39
+ }
40
+
41
+
42
+ private async addStyleSheet(file: IAppFile) {
26
43
  const document = this.htmlDocument;
27
- document.querySelector(`style[styler-style-sheet]`)?.remove();
28
- let link = document.querySelector(`link[rel=stylesheet][styler-style]`) as HTMLLinkElement;
29
- const css = StylerSet.instance.toString();
30
- if (link) {
31
- const text = await FetchBuilder.get(link.href).responseAsText(false);
32
- if (text === css) {
33
- return;
44
+ const href = `/api/site/asset/download/${this.folder.appFileID}/${file.appFileID}/${file.fileContentID}/${file.name}`;
45
+ let link: HTMLLinkElement;
46
+ for (const iterator of Array.from(document.querySelectorAll(`link[rel="stylesheet"][styler-css]`))) {
47
+ if(iterator.getAttribute("styler-css") === file.name) {
48
+ link = iterator as HTMLLinkElement;
49
+ break;
34
50
  }
35
- } else {
36
- link = document.createElement("link");
37
- link.rel = "stylesheet";
38
- link.setAttribute("styler-style", "ref");
51
+ }
52
+ if (!link){
53
+ link ??= document.createElement("link");
39
54
  document.head.appendChild(link);
55
+ link.rel = "stylesheet";
56
+ link.setAttribute("styler-css", file.name);
40
57
  }
41
- const content = new File([css], "styler.css", { type: "text/css" });
58
+ link.href = href;
59
+ }
60
+
61
+ private async createFile(fileName: string, css: string) {
62
+ const content = new File([css], fileName, { type: "text/css" });
42
63
  const { appFileID } = await this.cloudFileService.saveFile({ parentID: this.folder.appFileID, folder: "styles", content });
43
64
  const file = await this.cloudFileService.getFile(appFileID);
44
- link.href = `/api/site/asset/download/${this.folder.appFileID}/${file.appFileID}/${file.fileContentID}/${file.name}.css`;
65
+ return file;
45
66
  }
46
-
47
67
  }
@@ -9,6 +9,7 @@ export default function LayoutEditor () {
9
9
  return <ExpanderPropertyEditor label="Layout">
10
10
  <DropDownProperty property={properties.stylerLayout}/>
11
11
  <DropDownProperty label="Display" property={properties.stylerDisplay}/>
12
+ <DropDownProperty label="Color Set" property={properties.stylerColorSets}/>
12
13
  <DropDownProperty
13
14
  style-display={BindEditor.oneWay((e) => e.selection.currentStyle.display === "flex")}
14
15
  label="Direction"
@@ -102,6 +102,27 @@ export const stylerVars = prepareVariables({
102
102
  menuColor: "#F0F0F0",
103
103
 
104
104
  linkColor: "blue",
105
+
106
+ primaryBackground: "#b372dd50",
107
+ primaryColor: "gray",
108
+ primaryAccent: "#6145a9c9",
109
+ primaryAccentText: "white",
110
+ primarySurface: "#FFFFFFA0",
111
+ primarySurfaceText: "gray",
112
+
113
+ secondaryBackground: "#00808050",
114
+ secondaryColor: "gray",
115
+ secondaryAccent: "blue",
116
+ secondaryAccentText: "white",
117
+ secondarySurface: "#00A0A080",
118
+ secondarySurfaceText: "gray",
119
+
120
+ tertiaryBackground: "#7b4fc596",
121
+ tertiaryColor: "gray",
122
+ tertiaryAccent: "blue",
123
+ tertiaryAccentText: "white",
124
+ tertiarySurface: "#0000A080",
125
+ tertiarySurfaceText: "gray",
105
126
  });
106
127
 
107
128
  export const sizeVarList = [
@@ -1,14 +1,15 @@
1
1
  import { StylerVariable, stylerVars } from "./Styler";
2
2
  import { stylerBorder } from "./properties/stylerBorder";
3
- import { stylerDisplay } from "./properties/layout/display";
4
- import { stylerFlexDirection } from "./properties/layout/flex/flex";
5
- import { itemPositions } from "./properties/layout/items-position/itemsPosition";
6
- import { stylerLayout } from "./properties/layout/layout";
3
+ import { stylerDisplay } from "./properties/layouts/display";
4
+ import { stylerFlexDirection } from "./properties/layouts/flex/flex";
5
+ import { itemPositions } from "./properties/layouts/items-position/itemsPosition";
6
+ import { stylerLayout } from "./properties/layouts/layout";
7
7
  import { stylerPosition } from "./properties/stylerPosition";
8
8
  import { stylerSizes } from "./properties/stylerSizes";
9
9
  import { stylerSpace } from "./properties/stylerSpace";
10
10
  import { stylerText } from "./properties/text/stylerText";
11
11
  import { stylerBackground } from "./properties/stylerBackground";
12
+ import { stylerColorSets } from "./properties/color-sets/stylerColorSets";
12
13
 
13
14
  const vars = [];
14
15
  for (const key in stylerVars) {
@@ -26,6 +27,7 @@ export class StylerSet {
26
27
 
27
28
  properties = {
28
29
  stylerLayout,
30
+ stylerColorSets,
29
31
  stylerDisplay,
30
32
  stylerFlexDirection,
31
33
  ... stylerBorder,
@@ -0,0 +1,50 @@
1
+ import styled from "@web-atoms/core/dist/style/styled";
2
+ import { StylerProperty, stylerVars } from "../../Styler";
3
+
4
+ export const stylerColorSets = StylerProperty.create( "styler-colors", {
5
+
6
+ "primary": styled.css `
7
+ background-color: ${stylerVars.primaryBackground};
8
+ color: ${stylerVars.primaryColor};
9
+
10
+ & [styler-element=accent] {
11
+ background-color: ${stylerVars.primaryAccent};
12
+ color: ${stylerVars.primaryAccentText};
13
+ }
14
+
15
+ & [styler-element=surface] {
16
+ background-color: ${stylerVars.primarySurface};
17
+ color: ${stylerVars.primarySurfaceText};
18
+ }
19
+ `,
20
+
21
+ "secondary": styled.css `
22
+ background-color: ${stylerVars.secondaryBackground};
23
+ color: ${stylerVars.secondaryColor};
24
+
25
+ & [styler-element=accent] {
26
+ background-color: ${stylerVars.secondaryAccent};
27
+ color: ${stylerVars.secondaryAccentText};
28
+ }
29
+
30
+ & [styler-element=surface] {
31
+ background-color: ${stylerVars.secondarySurface};
32
+ color: ${stylerVars.secondarySurfaceText};
33
+ }
34
+ `,
35
+
36
+ "tertiary": styled.css `
37
+ background-color: ${stylerVars.tertiaryBackground};
38
+ color: ${stylerVars.tertiaryColor};
39
+
40
+ & [styler-element=accent] {
41
+ background-color: ${stylerVars.tertiaryAccent};
42
+ color: ${stylerVars.tertiaryAccentText};
43
+ }
44
+
45
+ & [styler-element=surface] {
46
+ background-color: ${stylerVars.tertiarySurface};
47
+ color: ${stylerVars.tertiarySurfaceText};
48
+ }
49
+ `
50
+ });
@@ -0,0 +1,10 @@
1
+ import styled from "@web-atoms/core/dist/style/styled";
2
+ import { stylerVars } from "../../../Styler";
3
+
4
+ export const layoutBox: any = {
5
+ "block": styled.css `
6
+ display: block;
7
+ padding: ${stylerVars.sizeDefault};
8
+ margin: ${stylerVars.sizeDefault};
9
+ `,
10
+ };
@@ -0,0 +1,70 @@
1
+ import styled from "@web-atoms/core/dist/style/styled";
2
+ import { stylerVars } from "../../../Styler";
3
+
4
+ export const layoutCard: any = {
5
+ "card": styled.css `
6
+ display: grid;
7
+ margin: ${stylerVars.sizeDefault};
8
+ border-radius: ${stylerVars.sizeDefault};
9
+ grid-template-columns: 1fr;
10
+ grid-template-rows: auto 1fr;
11
+ justify-items: stretch;
12
+ align-items: stretch;
13
+ contain: content;
14
+
15
+ & > h4 {
16
+ max-width: 100%;
17
+ padding: ${stylerVars.sizeDefault};
18
+ grid-column: 1;
19
+ grid-row: 1;
20
+ margin-top: 0;
21
+ margin-bottom: 0;
22
+ }
23
+
24
+ & > section {
25
+ max-width: 100%;
26
+ margin: ${stylerVars.sizeDefault};
27
+ padding: ${stylerVars.sizeDefault};
28
+ border-radius: ${stylerVars.sizeDefault};
29
+ grid-column: 1;
30
+ grid-row: 3;
31
+ }
32
+
33
+ & > section:empty:before {
34
+ background-color: #ddd;
35
+ color: #000;
36
+ font-size: 16px;
37
+ font-weight: bold;
38
+ font-family: 'Courier New', Courier, monospace;
39
+ height: 100%;
40
+ display: flex;
41
+ justify-items: center;
42
+ align-items: center;
43
+ min-height: 30px;
44
+ opacity: 0.3;
45
+ border-radius: 3px;
46
+ white-space: nowrap;
47
+ overflow: hidden;
48
+ text-overflow: ellipsis;
49
+ content: "Container";
50
+ }
51
+ & > h4:empty:before {
52
+ background-color: #ddd;
53
+ color: #000;
54
+ font-size: 16px;
55
+ font-weight: bold;
56
+ font-family: 'Courier New', Courier, monospace;
57
+ height: 100%;
58
+ display: flex;
59
+ justify-items: center;
60
+ align-items: center;
61
+ min-height: 30px;
62
+ opacity: 0.3;
63
+ border-radius: 3px;
64
+ white-space: nowrap;
65
+ overflow: hidden;
66
+ text-overflow: ellipsis;
67
+ content: "Title";
68
+ }
69
+ `
70
+ };
@@ -0,0 +1,38 @@
1
+ import styled from "@web-atoms/core/dist/style/styled";
2
+ import { stylerVars } from "../../../Styler";
3
+
4
+ export const layoutColumn: any = {
5
+ "column": styled.css `
6
+ display: flex;
7
+ flex-direction: column;
8
+ gap: ${stylerVars.sizeDefault};
9
+ padding: ${stylerVars.sizeDefault};
10
+ border-radius: ${stylerVars.sizeDefault};
11
+ justify-items: center;
12
+ align-items: stretch;
13
+
14
+ & > * {
15
+ padding: ${stylerVars.sizeDefault};
16
+ flex: 1 1 100%;
17
+ }
18
+
19
+ & > *:empty:before {
20
+ background-color: #ddd;
21
+ color: #000;
22
+ font-size: 16px;
23
+ font-weight: bold;
24
+ font-family: 'Courier New', Courier, monospace;
25
+ height: 100%;
26
+ display: flex;
27
+ justify-items: center;
28
+ align-items: center;
29
+ min-height: 30px;
30
+ opacity: 0.3;
31
+ border-radius: 3px;
32
+ white-space: nowrap;
33
+ overflow: hidden;
34
+ text-overflow: ellipsis;
35
+ content: "Container";
36
+ }
37
+ `,
38
+ };
@@ -0,0 +1,46 @@
1
+ import styled from "@web-atoms/core/dist/style/styled";
2
+ import { stylerVars } from "../../../Styler";
3
+
4
+ export const layoutColumn2Box: any = {
5
+ "columns-2": styled.css `
6
+ display: flex;
7
+ flex-wrap: wrap;
8
+ flex-direction: column;
9
+ gap: ${stylerVars.sizeDefault};
10
+ border-radius: ${stylerVars.sizeDefault};
11
+ justify-items: center;
12
+ align-items: stretch;
13
+ contain: content;
14
+
15
+ @media (min-width: 600px) {
16
+ & {
17
+ flex-direction: row;
18
+ flex-wrap: nowrap;
19
+ }
20
+ & > * {
21
+ width: 50%;
22
+ max-width: 50%;
23
+ }
24
+ }
25
+ & > *:empty:before {
26
+ background-color: #ddd;
27
+ color: #000;
28
+ font-size: 16px;
29
+ font-weight: bold;
30
+ font-family: 'Courier New', Courier, monospace;
31
+ height: 100%;
32
+ display: flex;
33
+ justify-items: center;
34
+ align-items: center;
35
+ min-height: 30px;
36
+ opacity: 0.3;
37
+ border-radius: 3px;
38
+ white-space: nowrap;
39
+ overflow: hidden;
40
+ text-overflow: ellipsis;
41
+ content: "Container";
42
+
43
+ }
44
+
45
+ `,
46
+ };
@@ -0,0 +1,46 @@
1
+ import styled from "@web-atoms/core/dist/style/styled";
2
+ import { stylerVars } from "../../../Styler";
3
+
4
+ export const layoutColumn3Box: any = {
5
+ "columns-3": styled.css `
6
+ display: flex;
7
+ flex-wrap: wrap;
8
+ flex-direction: column;
9
+ gap: ${stylerVars.sizeDefault};
10
+ border-radius: ${stylerVars.sizeDefault};
11
+ justify-items: center;
12
+ align-items: stretch;
13
+ contain: content;
14
+
15
+ @media (min-width: 600px) {
16
+ & {
17
+ flex-direction: row;
18
+ flex-wrap: nowrap;
19
+ }
20
+ & > * {
21
+ width: 33%;
22
+ max-width: 33%;
23
+ }
24
+ }
25
+ & > *:empty:before {
26
+ background-color: #ddd;
27
+ color: #000;
28
+ font-size: 16px;
29
+ font-weight: bold;
30
+ font-family: 'Courier New', Courier, monospace;
31
+ height: 100%;
32
+ display: flex;
33
+ justify-items: center;
34
+ align-items: center;
35
+ min-height: 30px;
36
+ opacity: 0.3;
37
+ border-radius: 3px;
38
+ white-space: nowrap;
39
+ overflow: hidden;
40
+ text-overflow: ellipsis;
41
+ content: "Container";
42
+
43
+ }
44
+
45
+ `,
46
+ };
@@ -1,84 +1,25 @@
1
1
  import styled from "@web-atoms/core/dist/style/styled";
2
- import IStylerPair from "../../IStylerPair";
3
- import { StylerProperty, stylerVars } from "../../Styler";
2
+ import { stylerVars } from "../../../Styler";
4
3
 
5
4
  const svg = `<svg xmlns="http://www.w3.org/2000/svg" height="16" width="14" viewBox="0 0 448 512"><!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M0 96C0 78.3 14.3 64 32 64H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H416c17.7 0 32 14.3 32 32z"/></svg>`;
6
5
 
7
6
  const svgCross = `<svg xmlns="http://www.w3.org/2000/svg" height="16" width="12" viewBox="0 0 384 512"><!--!Font Awesome Pro 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2024 Fonticons, Inc.--><path class="fa-secondary" opacity=".4" d="M297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6z"/><path class="fa-primary" d=""/></svg>`;
8
7
 
9
- export const stylerLayout = StylerProperty.create( "styler-layout", {
10
- "wrap-list": styled.css `
11
- display: flex;
12
- flex-direction: column;
13
- flex-wrap: wrap;
14
- gap: ${stylerVars.sizeDefault};
15
- padding: ${stylerVars.sizeDefault};
16
- margin: ${stylerVars.sizeDefault};
17
- &:empty:before {
18
- background-color: #ddd;
19
- color: #000;
20
- font-size: 16px;
21
- font-weight: bold;
22
- font-family: 'Courier New', Courier, monospace;
23
- height: 100%;
24
- display: flex;
25
- justify-items: center;
26
- align-items: center;
27
- min-height: 30px;
28
- opacity: 0.3;
29
- border-radius: 3px;
30
- white-space: nowrap;
31
- overflow: hidden;
32
- text-overflow: ellipsis;
33
- content: "Container";
34
- }
35
- `,
36
-
37
- "column": styled.css `
38
- display: flex;
39
- flex-direction: column;
40
- flex-wrap: nowrap;
41
- gap: ${stylerVars.sizeDefault};
42
- padding: ${stylerVars.sizeDefault};
43
- margin: ${stylerVars.sizeDefault};
44
- `,
45
-
46
- "row": styled.css `
47
- display: flex;
48
- flex-direction: row;
49
- flex-wrap: nowrap;
50
- gap: ${stylerVars.sizeDefault};
51
- padding: ${stylerVars.sizeDefault};
52
- margin: ${stylerVars.sizeDefault};
53
- `,
54
8
 
55
- "block": styled.css `
56
- display: block;
57
- padding: ${stylerVars.sizeDefault};
58
- margin: ${stylerVars.sizeDefault};
59
- `,
60
- "nav-bar": styled.css `
61
- display: flex;
62
- padding: ${stylerVars.sizeSmall};
63
- margin: ${stylerVars.sizeDefault};
64
- border-radius: ${stylerVars.sizeLarge};
65
- align-items: center;
66
- justify-content: space-between;
67
- & > h1, & > h2, & > h3, & > h5, & > h6 {
68
- margin-block-start: 0;
69
- margin-block-end: 0;
70
- }
71
- `,
9
+ export const layoutFloatingNavBar: any = {
72
10
 
73
11
  "floating-nav-bar": styled.css `
74
12
  display: flex;
75
13
  padding: ${stylerVars.sizeSmall};
14
+ padding-left: ${stylerVars.sizeLarge};
15
+ padding-right: ${stylerVars.sizeLarge};
76
16
  margin: ${stylerVars.sizeDefault};
77
17
  position: sticky;
78
18
  top: ${stylerVars.sizeDefault};
79
19
  border-radius: ${stylerVars.sizeLarge};
80
20
  align-items: center;
81
21
  justify-content: space-between;
22
+ z-index: 20;
82
23
  & > h1, & > h2, & > h3, & > h5, & > h6 {
83
24
  margin-block-start: 0;
84
25
  margin-block-end: 0;
@@ -134,4 +75,4 @@ export const stylerLayout = StylerProperty.create( "styler-layout", {
134
75
 
135
76
  }
136
77
  `,
137
- });
78
+ };
@@ -0,0 +1,44 @@
1
+ import styled from "@web-atoms/core/dist/style/styled";
2
+ import { stylerVars } from "../../../Styler";
3
+
4
+ export const layoutImageBlock: any = {
5
+ "image-block": styled.css `
6
+ display: flex;
7
+ flex-direction: row;
8
+ gap: ${stylerVars.sizeDefault};
9
+ padding: ${stylerVars.sizeDefault};
10
+ margin: ${stylerVars.sizeDefault};
11
+ border-radius: ${stylerVars.sizeDefault};
12
+ justify-items: center;
13
+ align-items: stretch;
14
+ contain: content;
15
+
16
+ & > img {
17
+ align-self: center;
18
+ }
19
+
20
+ & > * {
21
+ padding: ${stylerVars.sizeDefault};
22
+ flex: 1 1 100%;
23
+ }
24
+
25
+ & > *:empty:before {
26
+ background-color: #ddd;
27
+ color: #000;
28
+ font-size: 16px;
29
+ font-weight: bold;
30
+ font-family: 'Courier New', Courier, monospace;
31
+ height: 100%;
32
+ display: flex;
33
+ justify-items: center;
34
+ align-items: center;
35
+ min-height: 30px;
36
+ opacity: 0.3;
37
+ border-radius: 3px;
38
+ white-space: nowrap;
39
+ overflow: hidden;
40
+ text-overflow: ellipsis;
41
+ content: "Container";
42
+ }
43
+ `,
44
+ };
@@ -0,0 +1,51 @@
1
+ import styled from "@web-atoms/core/dist/style/styled";
2
+ import { stylerVars } from "../../../Styler";
3
+
4
+ export const layoutImageBox: any = {
5
+ "image-box": styled.css `
6
+ display: flex;
7
+ flex-direction: column;
8
+ gap: ${stylerVars.sizeDefault};
9
+ padding: ${stylerVars.sizeDefault};
10
+ margin: ${stylerVars.sizeDefault};
11
+ border-radius: ${stylerVars.sizeDefault};
12
+ justify-items: center;
13
+ align-items: stretch;
14
+ contain: content;
15
+
16
+ @media (min-width: 600px) {
17
+ & {
18
+ flex-direction: row;
19
+ }
20
+ }
21
+
22
+ & > img {
23
+ align-self: center;
24
+ }
25
+
26
+ & > * {
27
+ padding: ${stylerVars.sizeDefault};
28
+ flex: 1 1 100%;
29
+ max-width: 50%;
30
+ }
31
+
32
+ & > *:empty:before {
33
+ background-color: #ddd;
34
+ color: #000;
35
+ font-size: 16px;
36
+ font-weight: bold;
37
+ font-family: 'Courier New', Courier, monospace;
38
+ height: 100%;
39
+ display: flex;
40
+ justify-items: center;
41
+ align-items: center;
42
+ min-height: 30px;
43
+ opacity: 0.3;
44
+ border-radius: 3px;
45
+ white-space: nowrap;
46
+ overflow: hidden;
47
+ text-overflow: ellipsis;
48
+ content: "Container";
49
+ }
50
+ `,
51
+ };